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>
This commit is contained in:
parent
5e0406cbdf
commit
6ab6b0fc1c
@ -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
|
||||
|
||||
|
@ -115,7 +115,6 @@ QTOBJS= \
|
||||
qsettings.obj \
|
||||
qlibraryinfo.obj \
|
||||
qvariant.obj \
|
||||
qurl.obj \
|
||||
qsettings_win.obj \
|
||||
qmetatype.obj \
|
||||
qxmlstream.obj \
|
||||
|
@ -116,7 +116,6 @@ QTOBJS= \
|
||||
qtextstream.o \
|
||||
quuid.o \
|
||||
qvector.o \
|
||||
qurl.o \
|
||||
qsettings.o \
|
||||
qsettings_win.o \
|
||||
qvariant.o \
|
||||
|
@ -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 \
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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 \
|
||||
|
@ -61,7 +61,6 @@ OBJECTS = \
|
||||
qvsnprintf.o \
|
||||
qvariant.o \
|
||||
qsystemerror.o \
|
||||
qurl.o \
|
||||
qmetatype.o \
|
||||
qmalloc.o \
|
||||
qxmlstream.o \
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user