From 21e5823e431bb8a64a048e61419b7bfc56f674d6 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 28 Jul 2009 18:10:22 +0200 Subject: Remove "no-stl" from the build key and add compatibility for old plugins. STL support hasn't had binary compatibility effects for the entire lifetime of Qt 4, so it should never have been there. It is a legacy thing I am now correcting. When inspecting a plugin, remove the "no-stl" from its loaded build key. That indicates a pre-4.6 build, since now Qt no longer adds it to its own build keys. Note that you have to remove the 4.6 plugin cache from $HOME/.config/Trolltech.conf or the registry for this change to work (if you compile Qt with -no-stl). Otherwise, plugins that have already been scanned will fail to load. Reviewed-by: Bradley T. Hughes --- configure | 12 ++---------- src/corelib/plugin/qlibrary.cpp | 5 ++++- src/corelib/tools/qvector.h | 4 ---- tools/configure/configureapp.cpp | 2 -- 4 files changed, 6 insertions(+), 17 deletions(-) diff --git a/configure b/configure index a25a706..843d370 100755 --- a/configure +++ b/configure @@ -6377,10 +6377,8 @@ esac # Different edition modules: # network canvas table xml opengl sql # -# Options: -# stl -# # Things that do not affect the Qt API/ABI: +# stl # system-jpeg no-jpeg jpeg # system-mng no-mng mng # system-png no-png png @@ -6401,7 +6399,7 @@ esac # X11 : x11sm xinerama xcursor xfixes xrandr xrender mitshm fontconfig xkb # Embedded: embedded freetype # -ALL_OPTIONS="stl" +ALL_OPTIONS= BUILD_CONFIG= BUILD_OPTIONS= @@ -6415,12 +6413,6 @@ for config_option in $QMAKE_CONFIG $QT_CONFIG; do BUILD_CONFIG="$config_option" ;; - stl) - # these config options affect the Qt API/ABI. they should influence - # the generation of the buildkey, so we don't skip them - SKIP="no" - ;; - *) # skip all other options since they don't affect the Qt API/ABI. ;; esac diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp index 8f364ba..309bfb8 100644 --- a/src/corelib/plugin/qlibrary.cpp +++ b/src/corelib/plugin/qlibrary.cpp @@ -667,12 +667,15 @@ bool QLibraryPrivate::isPlugin(QSettings *settings) #endif } + // Qt 4.5 compatibility: stl doesn't affect binary compatibility + key.replace(" no-stl", ""); + +#ifndef QT_NO_SETTINGS QStringList queried; queried << QString::number(qt_version,16) << QString::number((int)debug) << QLatin1String(key) << lastModified; -#ifndef QT_NO_SETTINGS settings->setValue(regkey, queried); #endif } diff --git a/src/corelib/tools/qvector.h b/src/corelib/tools/qvector.h index 51a6709..dcd87b7 100644 --- a/src/corelib/tools/qvector.h +++ b/src/corelib/tools/qvector.h @@ -252,11 +252,7 @@ public: typedef const value_type* const_pointer; typedef value_type& reference; typedef const value_type& const_reference; -#ifndef QT_NO_STL typedef ptrdiff_t difference_type; -#else - typedef int difference_type; -#endif typedef iterator Iterator; typedef const_iterator ConstIterator; typedef int size_type; diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 39588e6..c938919 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -2045,8 +2045,6 @@ void Configure::generateBuildKey() QStringList build_options; if (!dictionary["QCONFIG"].isEmpty()) build_options += dictionary["QCONFIG"] + "-config "; - if (dictionary["STL"] == "no") - build_options += "no-stl"; build_options.sort(); // Sorted defines that start with QT_NO_ -- cgit v0.12