diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2011-09-09 15:27:36 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-24 16:30:58 +0100 |
commit | 6ab6b0fc1c594a589d96d17b5ab7bdc237290f6e (patch) | |
tree | 32aeee16ce365def37daec8da690650758479556 | |
parent | 5e0406cbdf60302379fec092c0bac8f1745b62df (diff) |
Disable QUrl support in QVariant in bootstrapped mode
The only use of QUrl in qmake, moc, uic and rcc is due to QVariant's
internals, so let's disable it. This means those binaries are now
probably a lot smaller since the parsing and IDNA code don't need to
be present.
Change-Id: Ie156b0817d119b2ba5d3dcb9712a9fea2ee7d4a1
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
-rw-r--r-- | qmake/Makefile.unix | 7 | ||||
-rw-r--r-- | qmake/Makefile.win32 | 1 | ||||
-rw-r--r-- | qmake/Makefile.win32-g++ | 1 | ||||
-rw-r--r-- | qmake/qmake.pri | 2 | ||||
-rw-r--r-- | src/corelib/io/qurl.cpp | 4 | ||||
-rw-r--r-- | src/corelib/io/qurl.h | 2 | ||||
-rw-r--r-- | src/corelib/kernel/qvariant.cpp | 9 | ||||
-rw-r--r-- | src/corelib/kernel/qvariant.h | 4 | ||||
-rw-r--r-- | src/tools/bootstrap/bootstrap.pro | 1 | ||||
-rw-r--r-- | tools/configure/Makefile.mingw | 1 | ||||
-rw-r--r-- | tools/configure/Makefile.win32 | 2 |
11 files changed, 13 insertions, 21 deletions
diff --git a/qmake/Makefile.unix b/qmake/Makefile.unix index a263fb4022..03defe26ea 100644 --- a/qmake/Makefile.unix +++ b/qmake/Makefile.unix @@ -23,7 +23,7 @@ QOBJS=qtextcodec.o qutfcodec.o qstring.o qstringbuilder.o qtextstream.o qiodevic qfsfileengine_iterator.o qregexp.o qvector.o qbitarray.o qdir.o qdiriterator.o quuid.o qhash.o \ qfileinfo.o qdatetime.o qstringlist.o qabstractfileengine.o qtemporaryfile.o \ qmap.o qmetatype.o qsettings.o qsystemerror.o qlibraryinfo.o qvariant.o qvsnprintf.o \ - qlocale.o qlocale_tools.o qlocale_unix.o qlinkedlist.o qurl.o qnumeric.o qcryptographichash.o \ + qlocale.o qlocale_tools.o qlocale_unix.o qlinkedlist.o qnumeric.o qcryptographichash.o \ qxmlstream.o qxmlutils.o qlogging.o \ $(QTOBJS) @@ -56,7 +56,7 @@ DEPEND_SRC=project.cpp property.cpp meta.cpp main.cpp generators/makefile.cpp ge $(SOURCE_PATH)/src/corelib/io/qdir.cpp $(SOURCE_PATH)/src/corelib/plugin/quuid.cpp \ $(SOURCE_PATH)/src/corelib/io/qfileinfo.cpp $(SOURCE_PATH)/src/corelib/tools/qdatetime.cpp \ $(SOURCE_PATH)/src/corelib/tools/qstringlist.cpp $(SOURCE_PATH)/src/corelib/tools/qmap.cpp \ - $(SOURCE_PATH)/src/corelib/global/qconfig.cpp $(SOURCE_PATH)/src/corelib/io/qurl.cpp \ + $(SOURCE_PATH)/src/corelib/global/qconfig.cpp \ $(SOURCE_PATH)/src/corelib/tools/qstringbuilder.cpp \ $(SOURCE_PATH)/src/corelib/tools/qlocale.cpp \ $(SOURCE_PATH)/src/corelib/tools/qlocale_tools.cpp \ @@ -214,9 +214,6 @@ qmetatype.o: $(SOURCE_PATH)/src/corelib/kernel/qmetatype.cpp qcore_mac.o: $(SOURCE_PATH)/src/corelib/kernel/qcore_mac.cpp $(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/kernel/qcore_mac.cpp -qurl.o: $(SOURCE_PATH)/src/corelib/io/qurl.cpp - $(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qurl.cpp - qutfcodec.o: $(SOURCE_PATH)/src/corelib/codecs/qutfcodec.cpp $(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/codecs/qutfcodec.cpp diff --git a/qmake/Makefile.win32 b/qmake/Makefile.win32 index 2379473af0..4365f114ab 100644 --- a/qmake/Makefile.win32 +++ b/qmake/Makefile.win32 @@ -115,7 +115,6 @@ QTOBJS= \ qsettings.obj \ qlibraryinfo.obj \ qvariant.obj \ - qurl.obj \ qsettings_win.obj \ qmetatype.obj \ qxmlstream.obj \ diff --git a/qmake/Makefile.win32-g++ b/qmake/Makefile.win32-g++ index 8754e10b29..65a6b294a1 100644 --- a/qmake/Makefile.win32-g++ +++ b/qmake/Makefile.win32-g++ @@ -116,7 +116,6 @@ QTOBJS= \ qtextstream.o \ quuid.o \ qvector.o \ - qurl.o \ qsettings.o \ qsettings_win.o \ qvariant.o \ diff --git a/qmake/qmake.pri b/qmake/qmake.pri index b8b9d43035..9320456b9e 100644 --- a/qmake/qmake.pri +++ b/qmake/qmake.pri @@ -67,7 +67,6 @@ bootstrap { #Qt code qstringlist.cpp \ qtemporaryfile.cpp \ qtextstream.cpp \ - qurl.cpp \ quuid.cpp \ qsettings.cpp \ qlibraryinfo.cpp \ @@ -114,7 +113,6 @@ bootstrap { #Qt code qsystemerror_p.h \ qtemporaryfile.h \ qtextstream.h \ - qurl.h \ quuid.h \ qvector.h \ qxmlstream.h \ diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index 9b15c1fd98..1629f5745d 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -201,9 +201,7 @@ #include "qstack.h" #include "qvarlengtharray.h" #include "qdebug.h" -#ifndef QT_BOOTSTRAPPED #include "qtldurl_p.h" -#endif #if defined(Q_OS_WINCE_WM) #pragma optimize("g", off) #endif @@ -5569,12 +5567,10 @@ bool QUrl::hasFragment() const URL does not contain a valid TLD, in which case the function returns an empty string. */ -#ifndef QT_BOOTSTRAPPED QString QUrl::topLevelDomain() const { return qTopLevelDomain(host()); } -#endif /*! Returns the result of the merge of this URL with \a relative. This diff --git a/src/corelib/io/qurl.h b/src/corelib/io/qurl.h index fc49231594..33fac9db57 100644 --- a/src/corelib/io/qurl.h +++ b/src/corelib/io/qurl.h @@ -175,9 +175,7 @@ public: void setEncodedFragment(const QByteArray &fragment); QByteArray encodedFragment() const; bool hasFragment() const; -#ifndef QT_BOOTSTRAPPED QString topLevelDomain() const; -#endif QUrl resolved(const QUrl &relative) const; diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp index 19b999a1e2..b687c01238 100644 --- a/src/corelib/kernel/qvariant.cpp +++ b/src/corelib/kernel/qvariant.cpp @@ -109,6 +109,7 @@ struct TypeDefinition { #ifdef QT_BOOTSTRAPPED template<> struct TypeDefinition<QEasingCurve> { static const bool IsAvailable = false; }; template<> struct TypeDefinition<QModelIndex> { static const bool IsAvailable = false; }; +template<> struct TypeDefinition<QUrl> { static const bool IsAvailable = false; }; template<> struct TypeDefinition<QRegularExpression> { static const bool IsAvailable = false; }; template<> struct TypeDefinition<QJsonValue> { static const bool IsAvailable = false; }; template<> struct TypeDefinition<QJsonObject> { static const bool IsAvailable = false; }; @@ -297,6 +298,7 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok) ok = &dummy; switch (uint(t)) { +#ifndef QT_BOOTSTRAPPED case QVariant::Url: switch (d->type) { case QVariant::String: @@ -306,6 +308,7 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok) return false; } break; +#endif case QVariant::String: { QString *str = static_cast<QString *>(result); switch (d->type) { @@ -355,9 +358,11 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok) if (v_cast<QStringList>(d)->count() == 1) *str = v_cast<QStringList>(d)->at(0); break; +#ifndef QT_BOOTSTRAPPED case QVariant::Url: *str = v_cast<QUrl>(d)->toString(); break; +#endif case QVariant::Uuid: *str = v_cast<QUuid>(d)->toString(); break; @@ -1449,7 +1454,9 @@ QVariant::QVariant(const QRect &r) { d.is_null = false; d.type = Rect; v_constru QVariant::QVariant(const QSize &s) { d.is_null = false; d.type = Size; v_construct<QSize>(&d, s); } QVariant::QVariant(const QSizeF &s) { d.is_null = false; d.type = SizeF; v_construct<QSizeF>(&d, s); } #endif +#ifndef QT_BOOTSTRAPPED QVariant::QVariant(const QUrl &u) { d.is_null = false; d.type = Url; v_construct<QUrl>(&d, u); } +#endif QVariant::QVariant(const QLocale &l) { d.is_null = false; d.type = Locale; v_construct<QLocale>(&d, l); } #ifndef QT_NO_REGEXP QVariant::QVariant(const QRegExp ®Exp) { d.is_null = false; d.type = RegExp; v_construct<QRegExp>(&d, regExp); } @@ -2094,6 +2101,7 @@ QPointF QVariant::toPointF() const #endif // QT_NO_GEOM_VARIANT +#ifndef QT_BOOTSTRAPPED /*! \fn QUrl QVariant::toUrl() const @@ -2106,6 +2114,7 @@ QUrl QVariant::toUrl() const { return qVariantToHelper<QUrl>(d, handlerManager); } +#endif /*! \fn QLocale QVariant::toLocale() const diff --git a/src/corelib/kernel/qvariant.h b/src/corelib/kernel/qvariant.h index cc502d93a7..fb0e059f45 100644 --- a/src/corelib/kernel/qvariant.h +++ b/src/corelib/kernel/qvariant.h @@ -237,7 +237,6 @@ class Q_CORE_EXPORT QVariant QVariant(const QRect &rect); QVariant(const QRectF &rect); #endif - QVariant(const QUrl &url); QVariant(const QLocale &locale); #ifndef QT_NO_REGEXP QVariant(const QRegExp ®Exp); @@ -246,6 +245,7 @@ class Q_CORE_EXPORT QVariant #endif // QT_BOOTSTRAPPED #endif // QT_NO_REGEXP #ifndef QT_BOOTSTRAPPED + QVariant(const QUrl &url); QVariant(const QEasingCurve &easing); #endif QVariant(Qt::GlobalColor color); @@ -303,7 +303,6 @@ class Q_CORE_EXPORT QVariant QLineF toLineF() const; QRectF toRectF() const; #endif - QUrl toUrl() const; QLocale toLocale() const; #ifndef QT_NO_REGEXP QRegExp toRegExp() const; @@ -312,6 +311,7 @@ class Q_CORE_EXPORT QVariant #endif // QT_BOOTSTRAPPED #endif // QT_NO_REGEXP #ifndef QT_BOOTSTRAPPED + QUrl toUrl() const; QEasingCurve toEasingCurve() const; #endif diff --git a/src/tools/bootstrap/bootstrap.pro b/src/tools/bootstrap/bootstrap.pro index 813882b6f6..2fd98071fc 100644 --- a/src/tools/bootstrap/bootstrap.pro +++ b/src/tools/bootstrap/bootstrap.pro @@ -65,7 +65,6 @@ SOURCES += \ ../../corelib/io/qfiledevice.cpp \ ../../corelib/io/qtemporaryfile.cpp \ ../../corelib/io/qtextstream.cpp \ - ../../corelib/io/qurl.cpp \ ../../corelib/kernel/qmetatype.cpp \ ../../corelib/kernel/qvariant.cpp \ ../../corelib/kernel/qsystemerror.cpp \ diff --git a/tools/configure/Makefile.mingw b/tools/configure/Makefile.mingw index ce923db5bc..c4255f545f 100644 --- a/tools/configure/Makefile.mingw +++ b/tools/configure/Makefile.mingw @@ -61,7 +61,6 @@ OBJECTS = \ qvsnprintf.o \ qvariant.o \ qsystemerror.o \ - qurl.o \ qmetatype.o \ qmalloc.o \ qxmlstream.o \ diff --git a/tools/configure/Makefile.win32 b/tools/configure/Makefile.win32 index 57fe6726c2..9d38f261f8 100644 --- a/tools/configure/Makefile.win32 +++ b/tools/configure/Makefile.win32 @@ -59,7 +59,6 @@ OBJECTS = \ qvsnprintf.obj \ qvariant.obj \ qsystemerror.obj \ - qurl.obj \ qmetatype.obj \ qmalloc.obj \ qxmlstream.obj \ @@ -128,7 +127,6 @@ qstringlist.obj: $(CORESRC)\tools\qstringlist.cpp $(PCH) qvsnprintf.obj: $(CORESRC)\tools\qvsnprintf.cpp $(PCH) qvariant.obj: $(CORESRC)\kernel\qvariant.cpp $(PCH) qsystemerror.obj: $(CORESRC)\kernel\qsystemerror.cpp $(PCH) -qurl.obj: $(CORESRC)\io\qurl.cpp $(PCH) qline.obj: $(CORESRC)\tools\qline.cpp $(PCH) qsize.obj: $(CORESRC)\tools\qsize.cpp $(PCH) qpoint.obj: $(CORESRC)\tools\qpoint.cpp $(PCH) |