diff options
author | Olivier Goffart <olivier.goffart@nokia.com> | 2011-04-12 11:21:56 (GMT) |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2011-04-12 11:22:16 (GMT) |
commit | f62e846c7ebe243a2a36e7577d070f1275f2ec47 (patch) | |
tree | 0cbfa6cd832b6f20ea699e8f172b1b3afe96b2c2 /qmake | |
parent | 6a8beac59f5824e1fc826f513495fbb8478b79ce (diff) | |
parent | d2b05885a28aafa331b25cdf3b647b782605df08 (diff) | |
download | Qt-f62e846c7ebe243a2a36e7577d070f1275f2ec47.zip Qt-f62e846c7ebe243a2a36e7577d070f1275f2ec47.tar.gz Qt-f62e846c7ebe243a2a36e7577d070f1275f2ec47.tar.bz2 |
Merge earth-team into origin/master'
Diffstat (limited to 'qmake')
-rw-r--r-- | qmake/Makefile.win32-g++ | 2 | ||||
-rw-r--r-- | qmake/Makefile.win32-g++-sh | 2 | ||||
-rw-r--r-- | qmake/main.cpp | 4 | ||||
-rw-r--r-- | qmake/option.cpp | 6 | ||||
-rw-r--r-- | qmake/option.h | 5 | ||||
-rw-r--r-- | qmake/property.cpp | 14 | ||||
-rw-r--r-- | qmake/property.h | 1 | ||||
-rw-r--r-- | qmake/qmake.pri | 2 |
8 files changed, 29 insertions, 7 deletions
diff --git a/qmake/Makefile.win32-g++ b/qmake/Makefile.win32-g++ index 46bda58..d40dc29 100644 --- a/qmake/Makefile.win32-g++ +++ b/qmake/Makefile.win32-g++ @@ -28,7 +28,7 @@ CFLAGS = -c -o$@ -O \ -DQT_BOOTSTRAPPED -DQLIBRARYINFO_EPOCROOT CXXFLAGS = $(CFLAGS) LFLAGS = -static-libgcc -static-libstdc++ -s -LIBS = -lole32 -luuid +LIBS = -lole32 -luuid -ladvapi32 -lkernel32 LINKQMAKE = g++ $(LFLAGS) -o qmake.exe $(OBJS) $(QTOBJS) $(LIBS) ADDCLEAN = diff --git a/qmake/Makefile.win32-g++-sh b/qmake/Makefile.win32-g++-sh index 53103b2..49ccfbc 100644 --- a/qmake/Makefile.win32-g++-sh +++ b/qmake/Makefile.win32-g++-sh @@ -28,7 +28,7 @@ CFLAGS = -c -o$@ -O \ -DQT_BOOTSTRAPPED -DQLIBRARYINFO_EPOCROOT CXXFLAGS = $(CFLAGS) LFLAGS = -static-libgcc -static-libstdc++ -s -LIBS = -lole32 -luuid +LIBS = -lole32 -luuid -ladvapi32 -lkernel32 LINKQMAKE = g++ $(LFLAGS) -o qmake.exe $(OBJS) $(QTOBJS) $(LIBS) ADDCLEAN = diff --git a/qmake/main.cpp b/qmake/main.cpp index 7dab23d..7d4d458 100644 --- a/qmake/main.cpp +++ b/qmake/main.cpp @@ -126,7 +126,9 @@ int runQMake(int argc, char **argv) } QMakeProperty prop; - if(Option::qmake_mode == Option::QMAKE_QUERY_PROPERTY || Option::qmake_mode == Option::QMAKE_SET_PROPERTY) + if(Option::qmake_mode == Option::QMAKE_QUERY_PROPERTY || + Option::qmake_mode == Option::QMAKE_SET_PROPERTY || + Option::qmake_mode == Option::QMAKE_UNSET_PROPERTY) return prop.exec() ? 0 : 101; QMakeProject project(&prop); diff --git a/qmake/option.cpp b/qmake/option.cpp index cbf8d29..dd28336 100644 --- a/qmake/option.cpp +++ b/qmake/option.cpp @@ -192,6 +192,7 @@ bool usage(const char *a0) " -norecursive Don't do a recursive search\n" " -recursive Do a recursive search\n" " -set <prop> <value> Set persistent property\n" + " -unset <prop> Unset persistent property\n" " -query <prop> Query persistent property. Show all if <prop> is empty.\n" " -cache file Use file as cache [makefile mode only]\n" " -spec spec Use spec as QMAKESPEC [makefile mode only]\n" @@ -226,6 +227,8 @@ Option::parseCommandLine(int argc, char **argv, int skip) Option::qmake_mode = Option::QMAKE_GENERATE_PRL; } else if(opt == "set") { Option::qmake_mode = Option::QMAKE_SET_PROPERTY; + } else if(opt == "unset") { + Option::qmake_mode = Option::QMAKE_UNSET_PROPERTY; } else if(opt == "query") { Option::qmake_mode = Option::QMAKE_QUERY_PROPERTY; } else if(opt == "makefile") { @@ -336,7 +339,8 @@ Option::parseCommandLine(int argc, char **argv, int skip) } else { bool handled = true; if(Option::qmake_mode == Option::QMAKE_QUERY_PROPERTY || - Option::qmake_mode == Option::QMAKE_SET_PROPERTY) { + Option::qmake_mode == Option::QMAKE_SET_PROPERTY || + Option::qmake_mode == Option::QMAKE_UNSET_PROPERTY) { Option::prop::properties.append(arg); } else { QFileInfo fi(arg); diff --git a/qmake/option.h b/qmake/option.h index bc87343..e17ce5a 100644 --- a/qmake/option.h +++ b/qmake/option.h @@ -148,8 +148,9 @@ struct Option } //global qmake mode, can only be in one mode per invocation! - enum QMAKE_MODE { QMAKE_GENERATE_NOTHING, QMAKE_GENERATE_PROJECT, QMAKE_GENERATE_MAKEFILE, - QMAKE_GENERATE_PRL, QMAKE_SET_PROPERTY, QMAKE_QUERY_PROPERTY }; + enum QMAKE_MODE { QMAKE_GENERATE_NOTHING, + QMAKE_GENERATE_PROJECT, QMAKE_GENERATE_MAKEFILE, QMAKE_GENERATE_PRL, + QMAKE_SET_PROPERTY, QMAKE_UNSET_PROPERTY, QMAKE_QUERY_PROPERTY }; static QMAKE_MODE qmake_mode; //all modes diff --git a/qmake/property.cpp b/qmake/property.cpp index d84f8e1..0c36c1c 100644 --- a/qmake/property.cpp +++ b/qmake/property.cpp @@ -160,6 +160,13 @@ QMakeProperty::setValue(QString var, const QString &val) settings->setValue(keyBase() + var, val); } +void +QMakeProperty::remove(const QString &var) +{ + initSettings(); + settings->remove(keyBase() + var); +} + bool QMakeProperty::exec() { @@ -230,6 +237,13 @@ QMakeProperty::exec() if(!var.startsWith(".")) setValue(var, (*it)); } + } else if(Option::qmake_mode == Option::QMAKE_UNSET_PROPERTY) { + for(QStringList::ConstIterator it = Option::prop::properties.begin(); + it != Option::prop::properties.end(); it++) { + QString var = (*it); + if(!var.startsWith(".")) + remove(var); + } } return ret; } diff --git a/qmake/property.h b/qmake/property.h index 43b7529..5e8379e 100644 --- a/qmake/property.h +++ b/qmake/property.h @@ -62,6 +62,7 @@ public: bool hasValue(QString); QString value(QString v) { return value(v, false); } void setValue(QString, const QString &); + void remove(const QString &); bool exec(); }; diff --git a/qmake/qmake.pri b/qmake/qmake.pri index bc7ddb8..d6c5f09 100644 --- a/qmake/qmake.pri +++ b/qmake/qmake.pri @@ -141,7 +141,7 @@ bootstrap { #Qt code SOURCES += qfilesystemengine_win.cpp qfsfileengine_win.cpp qfilesystemiterator_win.cpp qsettings_win.cpp \ qsystemlibrary.cpp win32-msvc*:LIBS += ole32.lib advapi32.lib - win32-g++*:LIBS += -lole32 -luuid + win32-g++*:LIBS += -lole32 -luuid -ladvapi32 -lkernel32 } qnx { |