From 1cc7a13c71240507a5c6aa31fdf63e2db30d4117 Mon Sep 17 00:00:00 2001
From: David Faure <faure@kde.org>
Date: Sun, 19 Aug 2012 12:01:06 +0200
Subject: Remove qurl.cpp from qmake and bootstrap, it's not needed.

(and I need this out to be able to use QMutex in QUrl)

Change-Id: Ic3eec2b41bd8626ce99f31c83a167c1c197dad82
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
---
 qmake/Makefile.unix               |  7 ++-----
 qmake/Makefile.win32              |  1 -
 qmake/Makefile.win32-g++          |  4 ----
 qmake/Makefile.win32-g++-sh       |  4 ----
 qmake/qmake.pri                   |  2 --
 src/corelib/kernel/qvariant.cpp   | 18 +++++++++++++++++-
 src/tools/bootstrap/bootstrap.pro |  1 -
 7 files changed, 19 insertions(+), 18 deletions(-)

diff --git a/qmake/Makefile.unix b/qmake/Makefile.unix
index 9dbe035..93a211c 100644
--- a/qmake/Makefile.unix
+++ b/qmake/Makefile.unix
@@ -21,7 +21,7 @@ QOBJS=qtextcodec.o qutfcodec.o qstring.o qtextstream.o qiodevice.o qmalloc.o qgl
       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 \
       $(QTOBJS)
 
@@ -58,7 +58,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/qlocale.cpp \
 	   $(SOURCE_PATH)/src/corelib/tools/qlocale_tools.cpp \
 	   $(SOURCE_PATH)/src/corelib/tools/qlocale_unix.cpp \
@@ -147,9 +147,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 d40000e..a15d19f 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 5fa1e5e..460dd88 100644
--- a/qmake/Makefile.win32-g++
+++ b/qmake/Makefile.win32-g++
@@ -89,7 +89,6 @@ QTOBJS= \
 	qtextstream.o \
 	quuid.o \
 	qvector.o \
-	qurl.o \
 	qsettings.o \
 	qsettings_win.o \
 	qvariant.o \
@@ -130,9 +129,6 @@ qsettings.o: $(SOURCE_PATH)/src/corelib/io/qsettings.cpp
 qvariant.o: $(SOURCE_PATH)/src/corelib/kernel/qvariant.cpp
 	$(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/kernel/qvariant.cpp
 
-qurl.o: $(SOURCE_PATH)/src/corelib/io/qurl.cpp
-	$(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qurl.cpp
-
 qtextstream.o: $(SOURCE_PATH)/src/corelib/io/qtextstream.cpp
 	$(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qtextstream.cpp
 
diff --git a/qmake/Makefile.win32-g++-sh b/qmake/Makefile.win32-g++-sh
index 49ccfbc..0c26251 100644
--- a/qmake/Makefile.win32-g++-sh
+++ b/qmake/Makefile.win32-g++-sh
@@ -89,7 +89,6 @@ QTOBJS= \
 	qtextstream.o \
 	quuid.o \
 	qvector.o \
-	qurl.o \
 	qsettings.o \
 	qsettings_win.o \
 	qvariant.o \
@@ -129,9 +128,6 @@ qsettings.o: $(SOURCE_PATH)/src/corelib/io/qsettings.cpp
 qvariant.o: $(SOURCE_PATH)/src/corelib/kernel/qvariant.cpp
 	$(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/kernel/qvariant.cpp
 
-qurl.o: $(SOURCE_PATH)/src/corelib/io/qurl.cpp
-	$(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qurl.cpp
-
 qtextstream.o: $(SOURCE_PATH)/src/corelib/io/qtextstream.cpp
 	$(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qtextstream.cpp
 
diff --git a/qmake/qmake.pri b/qmake/qmake.pri
index f2a3705..31f67f4 100644
--- a/qmake/qmake.pri
+++ b/qmake/qmake.pri
@@ -82,7 +82,6 @@ bootstrap { #Qt code
         qstringlist.cpp \
         qtemporaryfile.cpp \
         qtextstream.cpp \
-        qurl.cpp \
         quuid.cpp \
         qsettings.cpp \
         qlibraryinfo.cpp \
@@ -127,7 +126,6 @@ bootstrap { #Qt code
         qsystemerror_p.h \
         qtemporaryfile.h \
         qtextstream.h \
-        qurl.h \
         quuid.h \
         qvector.h \
         qxmlstream.h \
diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp
index 3ff8cde..d591350 100644
--- a/src/corelib/kernel/qvariant.cpp
+++ b/src/corelib/kernel/qvariant.cpp
@@ -136,9 +136,11 @@ static void construct(QVariant::Private *x, const void *copy)
         v_construct<QPointF>(x, copy);
         break;
 #endif
+#ifndef QT_BOOTSTRAPPED
     case QVariant::Url:
         v_construct<QUrl>(x, copy);
         break;
+#endif
     case QVariant::Locale:
         v_construct<QLocale>(x, copy);
         break;
@@ -254,9 +256,11 @@ static void clear(QVariant::Private *d)
         v_clear<QRectF>(d);
         break;
 #endif
+#ifndef QT_BOOTSTRAPPED
     case QVariant::Url:
         v_clear<QUrl>(d);
         break;
+#endif
     case QVariant::Locale:
         v_clear<QLocale>(d);
         break;
@@ -330,8 +334,8 @@ static bool isNull(const QVariant::Private *d)
 #endif
 #ifndef QT_BOOTSTRAPPED
     case QVariant::EasingCurve:
-#endif
     case QVariant::Url:
+#endif
     case QVariant::Locale:
     case QVariant::RegExp:
     case QVariant::StringList:
@@ -419,8 +423,10 @@ static bool compare(const QVariant::Private *a, const QVariant::Private *b)
     case QVariant::PointF:
         return *v_cast<QPointF>(a) == *v_cast<QPointF>(b);
 #endif
+#ifndef QT_BOOTSTRAPPED
     case QVariant::Url:
         return *v_cast<QUrl>(a) == *v_cast<QUrl>(b);
+#endif
     case QVariant::Locale:
         return *v_cast<QLocale>(a) == *v_cast<QLocale>(b);
 #ifndef QT_NO_REGEXP
@@ -625,6 +631,7 @@ static bool convert(const QVariant::Private *d, QVariant::Type t, void *result,
         ok = &dummy;
 
     switch (uint(t)) {
+#ifndef QT_BOOTSTRAPPED
     case QVariant::Url:
         switch (d->type) {
         case QVariant::String:
@@ -634,6 +641,7 @@ static bool convert(const QVariant::Private *d, QVariant::Type t, void *result,
             return false;
         }
         break;
+#endif
     case QVariant::String: {
         QString *str = static_cast<QString *>(result);
         switch (d->type) {
@@ -683,9 +691,11 @@ static bool convert(const QVariant::Private *d, QVariant::Type t, void *result,
             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
         default:
             return false;
         }
@@ -1119,9 +1129,11 @@ static void streamDebug(QDebug dbg, const QVariant &v)
     case QVariant::ByteArray:
         dbg.nospace() << v.toByteArray();
         break;
+#ifndef QT_BOOTSTRAPPED
     case QVariant::Url:
         dbg.nospace() << v.toUrl();
         break;
+#endif
 #ifndef QT_NO_GEOM_VARIANT
     case QVariant::Point:
         dbg.nospace() << v.toPoint();
@@ -1728,7 +1740,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 &regExp) { d.is_null = false; d.type = RegExp; v_construct<QRegExp>(&d, regExp); }
@@ -2341,6 +2355,7 @@ QPointF QVariant::toPointF() const
 
 #endif // QT_NO_GEOM_VARIANT
 
+#ifndef QT_BOOTSTRAPPED
 /*!
     \fn QUrl QVariant::toUrl() const
 
@@ -2353,6 +2368,7 @@ QUrl QVariant::toUrl() const
 {
     return qVariantToHelper<QUrl>(d, Url, handler);
 }
+#endif
 
 /*!
     \fn QLocale QVariant::toLocale() const
diff --git a/src/tools/bootstrap/bootstrap.pro b/src/tools/bootstrap/bootstrap.pro
index 50ae2cf..e351f55 100644
--- a/src/tools/bootstrap/bootstrap.pro
+++ b/src/tools/bootstrap/bootstrap.pro
@@ -66,7 +66,6 @@ SOURCES += \
            ../../corelib/io/qiodevice.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 \
-- 
cgit v0.12