Make the default Qt API be Qt 5.0's
authorThiago Macieira <thiago.macieira@intel.com>
Mon, 30 Apr 2012 14:03:18 +0000 (16:03 +0200)
committerQt by Nokia <qt-info@nokia.com>
Sat, 8 Sep 2012 12:57:59 +0000 (14:57 +0200)
This means user applications will default to Qt 5.0's API. Higher
versions or Qt 4 compatibility are opt-in.

Also set the default for Qt's own build to be 5.0 on all platforms
except Windows. On Windows, we need to set it to 4.9.

Task-number: QTBUG-25053
Change-Id: I603e0fda4785e64e1413cd82153a89e48005aa40
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
mkspecs/features/qt_module.prf
src/corelib/global/qglobal.h

index 4930c36..4663e17 100644 (file)
@@ -226,6 +226,15 @@ DEFINES *= QT_MOC_COMPAT #we don't need warnings from calling moc code in our ge
 DEFINES *= QT_USE_QSTRINGBUILDER
 DEFINES *= QT_DEPRECATED_WARNINGS
 
+win32 {
+    # On Windows, due to the way DLLs work, we need to export all functions,
+    # including the inlines
+    DEFINES *= QT_DISABLE_DEPRECATED_BEFORE=0x040900
+} else {
+    # On other platforms, Qt's own compilation goes needs to compile the Qt 5.0 API
+    DEFINES *= QT_DISABLE_DEPRECATED_BEFORE=0x050000
+}
+
 TARGET = $$qtLibraryTarget($$TARGET$$QT_LIBINFIX) #do this towards the end
 
 # Provides useful info normally only contained in the internal .qmake.cache file
index 8aea18d..d3e2898 100644 (file)
@@ -332,8 +332,7 @@ QT_END_INCLUDE_NAMESPACE
 #endif
 
 #ifndef QT_DISABLE_DEPRECATED_BEFORE
-// ### Qt5: remember to change that to 5 when we reach feature freeze
-#define QT_DISABLE_DEPRECATED_BEFORE QT_VERSION_CHECK(4, 9, 0)
+#define QT_DISABLE_DEPRECATED_BEFORE QT_VERSION_CHECK(5, 0, 0)
 #endif
 
 /*