Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-16830

Make Qt build with QT_STRICT_ITERATORS

    XMLWordPrintable

Details

    Description

      In an embedded cross compile environment:

      ./configure -embedded -prefix $MIPS_PREFIX -release -no-qt3support -no-xmlpatterns -no-svg -no-webkit -system-zlib -qt-gif -system-libpng -qt-libmng -system-libjpeg -make libs -nomake tools -nomake examples -nomake docs -nomake demo -no-nis -no-cups -no-iconv -no-openssl -embedded mips -little-endian -qt-freetype -depths all -qt-gfx-linuxfb -no-gfx-transformed -no-gfx-multiscreen -no-gfx-vnc -no-gfx-qvfb -qt-kbd-tty -qt-mouse-linuxinput -qt-mouse-tslib -no-glib -xplatform qws/linux-mips-g++ -dbus -force-pkg-config -declarative -confirm-license -commercial -DQT_QWS_CLIENTBLIT -DQT_NO_QWS_CURSOR -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII -DQT_STRICT_ITERATORS -DQT_NO_URL_CAST_FROM_ASCII
      

      One fix at least is:

      diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp
      index 6a3037d..785db21 100644
      --- a/src/corelib/io/qurl.cpp
      +++ b/src/corelib/io/qurl.cpp
      @@ -5967,6 +5967,7 @@ bool QUrl::operator !=(const QUrl &url) const
           return !(*this == url);
       }
       
      +#ifndef QT_NO_URL_CAST_FROM_STRING
       /*!
           Assigns the specified \a url to this object.
       */
      @@ -6000,6 +6001,7 @@ QUrl &QUrl::operator =(const QString &url)
           }
           return *this;
       }
      +#endif
       
       /*! \internal
      

      src/gui/embedded fails with the ascii casts:

      pseltools-gcc412-lnx26/mipsel-linux/include -o .obj/release-shared-emb-mips/qcopchannel_qws.o embedded/qcopchannel_qws.cpp
      mips-linux-g++ -c -include .pch/release-shared-emb-mips/QtGui -pipe -mips32 -fno-exceptions -O2 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -D_REENTRANT -fPIC -DQT_SHARED -DQT_EDITION=QT_EDITION_DESKTOP -DQT_QWS_CLIENTBLIT -DQT_NO_QWS_CURSOR -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII -DQT_BUILD_GUI_LIB -DQT_NO_USING_NAMESPACE -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_FAST_OPERATOR_PLUS -DQT_USE_FAST_CONCATENATION -DQT_NO_FONTCONFIG -DFT2_BUILD_LIBRARY -DFT_CONFIG_OPTION_SYSTEM_ZLIB -DQT_NO_OPENTYPE -DQT_NO_STYLE_MAC -DQT_NO_STYLE_WINDOWSVISTA -DQT_NO_STYLE_WINDOWSXP -DQT_NO_STYLE_GTK -DQT_NO_STYLE_WINDOWSCE -DQT_NO_STYLE_WINDOWSMOBILE -DQT_NO_STYLE_S60 -DQ_INTERNAL_QAPP_SRC -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_CORE_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I../../mkspecs/qws/linux-mips-g++ -I. -I../../include/QtCore -I../../include/QtNetwork -I../../include -I../../include/QtGui -I.rcc/release-shared-emb-mips -Iimage -I../3rdparty/freetype/builds/unix -I../3rdparty/freetype/src -I../3rdparty/freetype/include -I../3rdparty/harfbuzz/src -Idialogs -I.moc/release-shared-emb-mips -I.uic/release-shared-emb-mips -I/home/kde-devel/mips/mipseltools-gcc412-lnx26/mipsel-linux/include -o .obj/release-shared-emb-mips/qsoundqss_qws.o embedded/qsoundqss_qws.cpp
      ../../include/QtCore/../../src/corelib/tools/qstring.h: In constructor 'QWSSoundServerSocket::QWSSoundServerSocket(QObject*)':
      ../../include/QtCore/../../src/corelib/tools/qstring.h:601: error: 'QString::QString(const char*)' is private
      embedded/qsoundqss_qws.cpp:712: error: within this context
      ../../include/QtCore/../../src/corelib/tools/qstring.h: In constructor 'QWSSoundClient::QWSSoundClient(QObject*)':
      ../../include/QtCore/../../src/corelib/tools/qstring.h:601: error: 'QString::QString(const char*)' is private
      embedded/qsoundqss_qws.cpp:1399: error: within this context
      ../../include/QtCore/../../src/corelib/tools/qstring.h: In member function 'void QWSSoundClient::reconnect()':
      ../../include/QtCore/../../src/corelib/tools/qstring.h:601: error: 'QString::QString(const char*)' is private
      embedded/qsoundqss_qws.cpp:1413: error: within this context
      make[1]: *** [.obj/release-shared-emb-mips/qsoundqss_qws.o] Error 1
      make[1]: Leaving directory `/home/kde-devel/dev/src/qt_static/src/gui'
      make: *** [sub-gui-make_default-ordered] Error 2
      

      Dbus uses iterators in a way that fails with QT_STRICT_ITERATORS.

      And there seem to be several failures with the url cast.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            steveire Stephen Kelly (Personal)
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes