diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2015-10-23 14:01:35 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> | 2015-10-23 14:45:03 +0200 |
commit | 790aef362fd195adf97d8c780a7cbbbade27d51f (patch) | |
tree | 8be464687ab21806cfe9f7ada27098b563aa41b2 /tools | |
parent | 9720efbd1035c2e939b0581163e6d804c713dd96 (diff) | |
parent | 07475c662eb73c833da2d461b8ef2702ca1e2cfb (diff) |
Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
.qmake.conf
configure
src/corelib/global/qglobal.h
src/tools/qdoc/node.cpp
src/tools/qdoc/qdocdatabase.cpp
tests/auto/corelib/io/qsettings/tst_qsettings.cpp
tools/configure/configureapp.cpp
Change-Id: I66028ae5e441a06b73ee85ba72a03a3af3e8593f
Diffstat (limited to 'tools')
-rw-r--r-- | tools/configure/Makefile.mingw | 2 | ||||
-rw-r--r-- | tools/configure/Makefile.win32 | 4 | ||||
-rw-r--r-- | tools/configure/configureapp.cpp | 45 |
3 files changed, 33 insertions, 18 deletions
diff --git a/tools/configure/Makefile.mingw b/tools/configure/Makefile.mingw index f4513c64d6..5bdfc3f32c 100644 --- a/tools/configure/Makefile.mingw +++ b/tools/configure/Makefile.mingw @@ -4,7 +4,7 @@ CONFSRC = $(TOOLSRC)/configure RAW_PCH = configure_pch.h PCH = $(RAW_PCH).gch/c++ -DEFINES = -DUNICODE -DQT_NO_DATASTREAM -DQT_NO_CODECS -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NO_COMPRESS -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -D_CRT_SECURE_NO_DEPRECATE -DQT_BOOTSTRAPPED -DQT_BUILD_CONFIGURE +DEFINES = -DUNICODE -DQT_NO_DATASTREAM -DQT_NO_CODECS -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NO_COMPRESS -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -D_CRT_SECURE_NO_DEPRECATE -DQT_BOOTSTRAPPED -DQT_BUILD_CONFIGURE -DQT_VERSION_STR=\"$(QTVERSION)\" -DQT_VERSION_MAJOR=$(QT_VERSION_MAJOR) -DQT_VERSION_MINOR=$(QT_VERSION_MINOR) -DQT_VERSION_PATCH=$(QT_VERSION_PATCH) INCPATH = -I"../../include" -I"../../include/QtCore" -I"../../include/QtCore/$(QTVERSION)" -I"../../include/QtCore/$(QTVERSION)/QtCore" -I"$(TOOLSRC)/shared" -I"$(QTSRC)mkspecs/win32-g++" CXXFLAGS_BARE = -fno-rtti -fno-exceptions -mthreads -Wall -Wextra $(DEFINES) $(INCPATH) CXXFLAGS = -include $(RAW_PCH) $(CXXFLAGS_BARE) diff --git a/tools/configure/Makefile.win32 b/tools/configure/Makefile.win32 index da5b430bb1..8d6fe8bf72 100644 --- a/tools/configure/Makefile.win32 +++ b/tools/configure/Makefile.win32 @@ -3,9 +3,9 @@ TOOLSRC = $(QTSRC)tools CONFSRC = $(TOOLSRC)\configure PCH = configure_pch.pch -DEFINES = -DUNICODE -DQT_NO_CODECS -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NO_COMPRESS -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -D_CRT_SECURE_NO_DEPRECATE -DQT_BOOTSTRAPPED -DQT_BUILD_CONFIGURE +DEFINES = -DUNICODE -DQT_NO_CODECS -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NO_COMPRESS -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -D_CRT_SECURE_NO_DEPRECATE -DQT_BOOTSTRAPPED -DQT_BUILD_CONFIGURE -DQT_VERSION_STR=\"$(QTVERSION)\" -DQT_VERSION_MAJOR=$(QT_VERSION_MAJOR) -DQT_VERSION_MINOR=$(QT_VERSION_MINOR) -DQT_VERSION_PATCH=$(QT_VERSION_PATCH) INCPATH = -I"..\..\include" -I"..\..\include\QtCore" -I"..\..\include\QtCore\$(QTVERSION)" -I"..\..\include\QtCore\$(QTVERSION)\QtCore" -I"$(TOOLSRC)\shared" -I"$(QTSRC)mkspecs\win32-msvc2008" -CXXFLAGS_BARE = -nologo -Zc:wchar_t -W3 -GR -EHsc -w34100 -w34189 $(CFLAGS_CRT) $(EXTRA_CXXFLAGS) $(DEFINES) $(INCPATH) +CXXFLAGS_BARE = -nologo -Zc:wchar_t -W3 -GR -EHsc -w34100 -w34189 -wd4577 $(CFLAGS_CRT) $(EXTRA_CXXFLAGS) $(DEFINES) $(INCPATH) CXXFLAGS = -FIconfigure_pch.h -Yuconfigure_pch.h -Fp$(PCH) -MP $(CXXFLAGS_BARE) LINK = link LFLAGS = /NOLOGO /DYNAMICBASE /NXCOMPAT /INCREMENTAL:NO /SUBSYSTEM:CONSOLE "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST /MANIFESTFILE:"configure.intermediate.manifest" diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 2d5ccbfee5..f688647009 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -199,20 +199,18 @@ Configure::Configure(int& argc, char** argv) : verbose(0) dictionary[ "QT_INSTALL_SETTINGS" ] = "/etc/xdg"; QString version; - QFile qglobal_h(sourcePath + "/src/corelib/global/qglobal.h"); - if (qglobal_h.open(QFile::ReadOnly)) { - QTextStream read(&qglobal_h); - QRegExp version_regexp("^# *define *QT_VERSION_STR *\"([^\"]*)\""); - QString line; - while (!read.atEnd()) { - line = read.readLine(); - if (version_regexp.exactMatch(line)) { - version = version_regexp.cap(1).trimmed(); - if (!version.isEmpty()) - break; - } + QFile qmake_conf(sourcePath + "/.qmake.conf"); + if (qmake_conf.open(QFile::ReadOnly)) { + while (!qmake_conf.atEnd()) { + static const char beginning[] = "MODULE_VERSION = "; + QByteArray line = qmake_conf.readLine(); + if (!line.startsWith(beginning)) + continue; + + version = qMove(line).mid(int(strlen(beginning))).trimmed(); + break; } - qglobal_h.close(); + qmake_conf.close(); } if (version.isEmpty()) @@ -3661,6 +3659,12 @@ void Configure::generateConfigfiles() { FileWriter tmpStream(buildPath + "/src/corelib/global/qconfig.h"); + tmpStream << "#define QT_VERSION_MAJOR " << dictionary["VERSION_MAJOR"] << endl + << "#define QT_VERSION_MINOR " << dictionary["VERSION_MINOR"] << endl + << "#define QT_VERSION_PATCH " << dictionary["VERSION_PATCH"] << endl + << "#define QT_VERSION_STR \"" << dictionary["VERSION"] << "\"\n" + << endl; + if (dictionary[ "QCONFIG" ] == "full") { tmpStream << "/* Everything */" << endl; } else { @@ -4041,6 +4045,14 @@ void Configure::displayConfig() << "will be the same unless you are cross-compiling)." << endl << endl; } + if (dictionary["C++STD"] == "c++98") { + sout << endl + << "NOTE: The -no-c++11 / -c++-level c++98 option is deprecated." << endl + << endl + << "Qt 5.7 will require C++11 support. The options are in effect for this" << endl + << "Qt 5.6 build, but you should update your build scripts to remove the" << endl + << "option and, if necessary, upgrade your compiler." << endl; + } if (!dictionary["PREFIX_COMPLAINTS"].isEmpty()) { sout << endl << dictionary["PREFIX_COMPLAINTS"] << endl @@ -4067,7 +4079,7 @@ void Configure::generateHeaders() QStringList args; args << "perl" << "-w"; args += sourcePath + "/bin/syncqt.pl"; - args << "-minimal" << "-module" << "QtCore"; + args << "-version" << dictionary["VERSION"] << "-minimal" << "-module" << "QtCore"; args += sourcePath; int retc = Environment::execute(args, QStringList(), QStringList()); if (retc) { @@ -4330,7 +4342,10 @@ void Configure::buildQmake() << "INC_PATH = " << QDir::toNativeSeparators( (QFile::exists(sourcePath + "/.git") ? ".." : sourcePath) + "/include") << endl; - stream << "QT_VERSION = " << dictionary["VERSION"] << endl; + stream << "QT_VERSION = " << dictionary["VERSION"] << endl + << "QT_MAJOR_VERSION = " << dictionary["VERSION_MAJOR"] << endl + << "QT_MINOR_VERSION = " << dictionary["VERSION_MINOR"] << endl + << "QT_PATCH_VERSION = " << dictionary["VERSION_PATCH"] << endl; if (dictionary[ "QMAKESPEC" ].startsWith("win32-g++")) { stream << "QMAKESPEC = $(SOURCE_PATH)\\mkspecs\\" << dictionary[ "QMAKESPEC" ] << endl << "EXTRA_CFLAGS = -DUNICODE -ffunction-sections" << endl |