diff options
author | Water-Team <water@pad.test.qt.nokia.com> | 2011-11-17 00:00:12 (GMT) |
---|---|---|
committer | Water-Team <water@pad.test.qt.nokia.com> | 2011-11-17 00:00:12 (GMT) |
commit | 54c6d478fcad7f13563da713958bb359a17e7363 (patch) | |
tree | 808e83a83141e2d8e93180bd34775bf3bc22c780 | |
parent | f992096a065c99f8307965f73e29ebad49ee6b9b (diff) | |
parent | b0d54f150e9b4211e263b4835dd2c64ac07a8c86 (diff) | |
download | Qt-54c6d478fcad7f13563da713958bb359a17e7363.zip Qt-54c6d478fcad7f13563da713958bb359a17e7363.tar.gz Qt-54c6d478fcad7f13563da713958bb359a17e7363.tar.bz2 |
Merge branch '4.8-upstream' into master-water
38 files changed, 485 insertions, 180 deletions
@@ -816,6 +816,7 @@ l_FLAGS= QCONFIG_FLAGS= XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++" or "symbian-gcce" XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*) +XPLATFORM_INTEGRITY=no # Whether target platform is INTEGRITY (*integrity*) XPLATFORM_SYMBIAN=no # Whether target platform is SYMBIAN (*symbian*) XPLATFORM_SYMBIAN_SBSV2=no # Whether target platform is SYMBIAN_SBSV2 (symbian-sbsv2) PLATFORM=$QMAKESPEC @@ -1596,6 +1597,7 @@ while [ "$#" -gt 0 ]; do xplatform) XPLATFORM="$VAL" case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac + case "$XPLATFORM" in *integrity*) XPLATFORM_INTEGRITY=yes;; esac case "$XPLATFORM" in *symbian*) XPLATFORM_SYMBIAN=yes;; esac case "$XPLATFORM" in symbian-sbsv2) XPLATFORM_SYMBIAN_SBSV2=yes;; esac ;; @@ -2899,6 +2901,7 @@ fi [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM" case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac +case "$XPLATFORM" in *integrity*) XPLATFORM_INTEGRITY=yes;; esac case "$XPLATFORM" in *symbian*) XPLATFORM_SYMBIAN=yes;; esac case "$XPLATFORM" in symbian-sbsv2) XPLATFORM_SYMBIAN_SBSV2=yes;; esac @@ -3179,6 +3182,8 @@ if [ "$PLATFORM" != "$XPLATFORM" -a "$CFG_EMBEDDED" != "no" ]; then esac elif [ "$XPLATFORM_MINGW" = "yes" ]; then [ -z "$CFG_ARCH" ] && CFG_ARCH="windows" +elif [ "$XPLATFORM_INTEGRITY" = "yes" ]; then + CFG_ARCH=integrity elif [ "$XPLATFORM_SYMBIAN" = "yes" ]; then CFG_ARCH=symbian elif [ "$PLATFORM_MAC" = "yes" ] || [ -z "$CFG_ARCH" ]; then @@ -3531,6 +3536,19 @@ if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then [ -z "$QT_INSTALL_SETTINGS" ] && QT_INSTALL_SETTINGS= [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES= [ -z "$QT_INSTALL_DEMOS" ] && QT_INSTALL_DEMOS= +elif [ "$XPLATFORM_INTEGRITY" = "yes" ]; then + [ -z "$QT_HOST_PREFIX" ] && QT_HOST_PREFIX="$QT_INSTALL_PREFIX" + [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" + [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include" + [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" + [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" + [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" + [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" + [ -z "$QT_INSTALL_DATA" ] && QT_INSTALL_DATA="$QT_INSTALL_PREFIX" + [ -z "$QT_INSTALL_TRANSLATIONS" ] && QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations" + [ -z "$QT_INSTALL_SETTINGS" ] && QT_INSTALL_SETTINGS="$QT_INSTALL_PREFIX" + [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" + [ -z "$QT_INSTALL_DEMOS" ] && QT_INSTALL_DEMOS="$QT_INSTALL_PREFIX/demos" else #docs if [ -z "$QT_INSTALL_DOCS" ]; then #default @@ -4422,6 +4440,8 @@ if [ "$PLATFORM_QWS" = "yes" ]; then Platform="Qt for Embedded Linux" elif [ "$PLATFORM_QPA" = "yes" ]; then Platform="Qt Lighthouse" +elif [ "$XPLATFORM_INTEGRITY" = "yes" ]; then + Platform="Qt for INTEGRITY" elif [ "$XPLATFORM_SYMBIAN" = "yes" ]; then Platform="Qt for Symbian" elif [ "$PLATFORM_MAC" = "yes" ]; then @@ -5115,6 +5135,26 @@ if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then fi fi fi +# Adjust all variables for INTEGRITY +if [ "$XPLATFORM_INTEGRITY" = "yes" ]; then + QMakeVar set gfx-drivers "integrityfb" + QMakeVar set kbd-drivers "integrity" + QMakeVar set mouse-drivers "integrity" + CFG_TIFF="no" + CFG_KBD_ON="integrity" + CFG_MOUSE_ON="integrity" + CFG_GFX_ON="integrityfb" + CFG_LARGEFILE="no" + CFG_STL="yes" + CFG_OPENSSL="no" + CFG_GLIB="no" + CFG_SHARED="no" + if [ "$CFG_SCRIPT" != "yes" ]; then + CFG_SCRIPT="no" + fi + CFG_BUILD_PARTS="libs examples demos" + CFG_GIF="no" +fi # check IPC support if ! "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ipc_sysv "ipc_sysv" $L_FLAGS $I_FLAGS $l_FLAGS ; then @@ -6584,7 +6624,7 @@ if [ "$CFG_DOUBLEFORMAT" = "auto" ]; then fi HAVE_STL=no -if [ "$XPLATFORM_SYMBIAN" = "yes" ] || "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS; then +if [ "$XPLATFORM_SYMBIAN" = "yes" ] || [ "$XPLATFORM_INTEGRITY" = "yes" ] || "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS; then HAVE_STL=yes fi @@ -6980,9 +7020,9 @@ case "$PLATFORM,$CFG_MAC_COCOA" in ;; esac -# disable Qt 3 support on VxWorks and Symbian +# disable Qt 3 support on VxWorks, Symbian and INTEGRITY case "$XPLATFORM" in - unsupported/vxworks*|symbian*) + unsupported/vxworks*|symbian*|unsupported/integrity*) CFG_QT3SUPPORT="no" ;; esac @@ -7122,10 +7162,17 @@ if [ "$XPLATFORM_MINGW" != "yes" ]; then # debug and release precompiled headers are kept separate. QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR" fi -QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR" -QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR" -QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR" -QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR" +if [ "$XPLATFORM_INTEGRITY" = "yes" ]; then + QMakeVar set OBJECTS_DIR "$PWD/work" + QMakeVar set MOC_DIR "$PWD/work" + QMakeVar set RCC_DIR "$PWD/work" + QMakeVar set UI_DIR "$PWD/work" +else + QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR" + QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR" + QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR" + QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR" +fi if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then QMAKE_CONFIG="$QMAKE_CONFIG largefile" fi diff --git a/configure.exe b/configure.exe Binary files differindex 9538a4b..5487fda 100755 --- a/configure.exe +++ b/configure.exe diff --git a/mkspecs/unsupported/integrity-ghs/qmake.conf b/mkspecs/unsupported/integrity-ghs/qmake.conf index 822d6bb..803b2da 100644 --- a/mkspecs/unsupported/integrity-ghs/qmake.conf +++ b/mkspecs/unsupported/integrity-ghs/qmake.conf @@ -7,9 +7,10 @@ MAKEFILE_GENERATOR = GBUILD TEMPLATE = app CONFIG += qt warn_on release integrity unix QT += core gui network +DEFINES += QT_NO_SHAREDMEMORY QT_NO_PROCESS QT_NO_QWS_MULTIPROCESS QT_NO_SYSTEMSEMAPHORE QT_NO_PRINTER QT_NO_QWS_QPF2 -QMAKE_CFLAGS = -bsp $$INTEGRITY_BSP -os_dir $__OS_DIR -QMAKE_CFLAGS += --diag_suppress=1,228,236,381,611,997 +QMAKE_CFLAGS = -bsp $$INTEGRITY_BSP -os_dir $__OS_DIR +QMAKE_CFLAGS += --diag_suppress=1,228,236,381,611,997,1795 QMAKE_CFLAGS_WARN_ON = QMAKE_CFLAGS_WARN_OFF = -w QMAKE_CFLAGS_RELEASE = -g -Ospeed -Olink --signed_fields --no_commons @@ -17,7 +18,7 @@ QMAKE_CFLAGS_DEBUG = -g --no_commons --signed_fields QMAKE_CFLAGS_SHLIB = QMAKE_CFLAGS_THREAD = -D_REENTRANT -QMAKE_CXXFLAGS = $$QMAKE_CFLAGS --no_implicit_include --link_once_templates +QMAKE_CXXFLAGS = $$QMAKE_CFLAGS --no_implicit_include --link_once_templates -non_shared QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE @@ -37,9 +38,9 @@ QMAKE_LIBDIR_OPENGL = QMAKE_INCDIR_QTOPIA = $(QPEDIR)/include QMAKE_LIBDIR_QTOPIA = $(QPEDIR)/lib -QMAKE_LFLAGS = -lposix -livfs -lnet -lsocket -lfbdev -ldl +QMAKE_LFLAGS = -lposix -livfs -lnet -lsocket -lfbdev -lhiddev -ldl QMAKE_LFLAGS_RELEASE = -g -Ospeed -Olink --no_commons -non_shared --link_once_templates -QMAKE_LFLAGS_DEBUG = -g --no_commons +QMAKE_LFLAGS_DEBUG = -g --no_commons -non_shared --link_once_templates QMAKE_LFLAGS_SHLIB = QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB QMAKE_LFLAGS_SONAME = diff --git a/mkspecs/win32-g++-4.6/qmake.conf b/mkspecs/win32-g++-4.6/qmake.conf new file mode 100644 index 0000000..2c94587 --- /dev/null +++ b/mkspecs/win32-g++-4.6/qmake.conf @@ -0,0 +1,3 @@ +include(../win32-g++/qmake.conf) +QMAKE_CFLAGS *= -fno-keep-inline-dllexport +QMAKE_CXXFLAGS *= -fno-keep-inline-dllexport diff --git a/mkspecs/win32-g++-4.6/qplatformdefs.h b/mkspecs/win32-g++-4.6/qplatformdefs.h new file mode 100644 index 0000000..630a6a4 --- /dev/null +++ b/mkspecs/win32-g++-4.6/qplatformdefs.h @@ -0,0 +1,159 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the qmake spec of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this +** file. Please review the following information to ensure the GNU Lesser +** General Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QPLATFORMDEFS_H +#define QPLATFORMDEFS_H + +#ifdef UNICODE +#ifndef _UNICODE +#define _UNICODE +#endif +#endif + +// Get Qt defines/settings + +#include "qglobal.h" + +#include <tchar.h> +#include <io.h> +#include <direct.h> +#include <stdio.h> +#include <fcntl.h> +#include <errno.h> +#include <sys/stat.h> +#include <stdlib.h> +#include <qt_windows.h> +#include <limits.h> + +#if !defined(_WIN32_WINNT) || (_WIN32_WINNT-0 < 0x0500) +typedef enum { + NameUnknown = 0, + NameFullyQualifiedDN = 1, + NameSamCompatible = 2, + NameDisplay = 3, + NameUniqueId = 6, + NameCanonical = 7, + NameUserPrincipal = 8, + NameCanonicalEx = 9, + NameServicePrincipal = 10, + NameDnsDomain = 12 +} EXTENDED_NAME_FORMAT, *PEXTENDED_NAME_FORMAT; +#endif + +#define Q_FS_FAT +#ifdef QT_LARGEFILE_SUPPORT +#define QT_STATBUF struct _stati64 // non-ANSI defs +#define QT_STATBUF4TSTAT struct _stati64 // non-ANSI defs +#define QT_STAT ::_stati64 +#define QT_FSTAT ::_fstati64 +#else +#define QT_STATBUF struct _stat // non-ANSI defs +#define QT_STATBUF4TSTAT struct _stat // non-ANSI defs +#define QT_STAT ::_stat +#define QT_FSTAT ::_fstat +#endif +#define QT_STAT_REG _S_IFREG +#define QT_STAT_DIR _S_IFDIR +#define QT_STAT_MASK _S_IFMT +#if defined(_S_IFLNK) +# define QT_STAT_LNK _S_IFLNK +#endif +#define QT_FILENO _fileno +#define QT_OPEN ::_open +#define QT_CLOSE ::_close +#ifdef QT_LARGEFILE_SUPPORT +#define QT_LSEEK ::_lseeki64 +#ifndef UNICODE +#define QT_TSTAT ::_stati64 +#else +#define QT_TSTAT ::_wstati64 +#endif +#else +#define QT_LSEEK ::_lseek +#ifndef UNICODE +#define QT_TSTAT ::_stat +#else +#define QT_TSTAT ::_wstat +#endif +#endif +#define QT_READ ::_read +#define QT_WRITE ::_write +#define QT_ACCESS ::_access +#define QT_GETCWD ::_getcwd +#define QT_CHDIR ::_chdir +#define QT_MKDIR ::_mkdir +#define QT_RMDIR ::_rmdir +#define QT_OPEN_LARGEFILE 0 +#define QT_OPEN_RDONLY _O_RDONLY +#define QT_OPEN_WRONLY _O_WRONLY +#define QT_OPEN_RDWR _O_RDWR +#define QT_OPEN_CREAT _O_CREAT +#define QT_OPEN_TRUNC _O_TRUNC +#define QT_OPEN_APPEND _O_APPEND +#if defined(O_TEXT) +# define QT_OPEN_TEXT _O_TEXT +# define QT_OPEN_BINARY _O_BINARY +#endif + +#include "../common/c89/qplatformdefs.h" + +#ifdef QT_LARGEFILE_SUPPORT +#undef QT_FSEEK +#undef QT_FTELL +#undef QT_OFF_T + +#define QT_FSEEK ::fseeko64 +#define QT_FTELL ::ftello64 +#define QT_OFF_T off64_t +#endif + +#define QT_SIGNAL_ARGS int + +#define QT_VSNPRINTF ::_vsnprintf +#define QT_SNPRINTF ::_snprintf + +# define F_OK 0 +# define X_OK 1 +# define W_OK 2 +# define R_OK 4 + + +#endif // QPLATFORMDEFS_H diff --git a/projects.pro b/projects.pro index bf4dc5e..0b498f8 100644 --- a/projects.pro +++ b/projects.pro @@ -8,7 +8,7 @@ TEMPLATE = subdirs cross_compile: CONFIG += nostrip isEmpty(QT_BUILD_PARTS) { #defaults - symbian { + symbian|integrity { QT_BUILD_PARTS = libs tools examples demos } else { QT_BUILD_PARTS = libs tools examples demos docs translations diff --git a/qmake/Makefile.win32-g++ b/qmake/Makefile.win32-g++ index d40dc29..5fa1e5e 100644 --- a/qmake/Makefile.win32-g++ +++ b/qmake/Makefile.win32-g++ @@ -27,7 +27,7 @@ CFLAGS = -c -o$@ -O \ -DQT_BUILD_QMAKE -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM \ -DQT_BOOTSTRAPPED -DQLIBRARYINFO_EPOCROOT CXXFLAGS = $(CFLAGS) -LFLAGS = -static-libgcc -static-libstdc++ -s +LFLAGS = -static-libgcc -s LIBS = -lole32 -luuid -ladvapi32 -lkernel32 LINKQMAKE = g++ $(LFLAGS) -o qmake.exe $(OBJS) $(QTOBJS) $(LIBS) ADDCLEAN = diff --git a/qmake/generators/integrity/gbuild.cpp b/qmake/generators/integrity/gbuild.cpp index f9fdb38..8df858a 100644 --- a/qmake/generators/integrity/gbuild.cpp +++ b/qmake/generators/integrity/gbuild.cpp @@ -64,7 +64,7 @@ GBuildMakefileGenerator::GBuildMakefileGenerator() : MakefileGenerator() } bool -GBuildMakefileGenerator::write() +GBuildMakefileGenerator::writeMakefile(QTextStream &text) { QStringList tmp; QString filename(Option::output.fileName()); @@ -77,13 +77,13 @@ GBuildMakefileGenerator::write() /* correct output for non-prl, non-recursive case */ QString outname(qmake_getpwd()); outname += QDir::separator(); - outname += fileInfo(Option::output.fileName()).baseName(); + outname += strtarget; outname += projectSuffix(); Option::output.close(); Option::output.setFileName(outname); MakefileGenerator::openOutput(Option::output, QString()); - if (strtarget != fileInfo(project->projectFile()).baseName()) { + if (strtarget != fileInfo(project->projectFile()).baseName().section('.', -2, -2)) { QString gpjname(strtarget); QString outputName(qmake_getpwd()); outputName += QDir::separator(); @@ -141,18 +141,19 @@ GBuildMakefileGenerator::write() ti << "\tHeapSize\t0x00D00000" << "\n"; ti << "\tTask\tInitial" << "\n"; ti << "\t\tStackSize\t0x30000" << "\n"; + ti << "\t\tStartIt\tTrue" << "\n"; ti << "\tEndTask" << "\n"; ti << "EndAddressSpace" << "\n"; ti.flush(); /* change current project file to <projectname>_app.gpj and continue * generation */ - filename.insert(filename.lastIndexOf("."), "_app"); + outname.insert(outname.lastIndexOf("."), "_app"); Option::output.close(); - Option::output.setFileName(filename); + Option::output.setFileName(outname); MakefileGenerator::openOutput(Option::output, QString()); } else if ((project->first("TEMPLATE") == "lib") - && project->isActiveConfig("shared")) { + && project->isActiveConfig("dll")) { QString gpjname(strtarget); gpjname += "_shared"; gpjname += projectSuffix(); @@ -188,26 +189,28 @@ GBuildMakefileGenerator::write() tl << "}\n" "-sec\n" "{\n" - " .picbase __INTEGRITY_LibCBaseAddress :\n" + " .picbase __INTEGRITY_LibCBaseAddress :\n" " .text :\n" - " .syscall :\n" + " .syscall :\n" " .intercall :\n" " .interfunc :\n" - " .secinfo :\n" - " .rodata align(16) :\n" - " .fixaddr :\n" - " .fixtype :\n" + " .secinfo :\n" + " .rodata align(16) :\n" + " .fixaddr :\n" + " .fixtype :\n" " .rombeg :\n" " .textchecksum :\n" " // The above sections may be large. Leave a bigger gap for large pages.\n" - " .pidbase align(__INTEGRITY_MaxPageAlign) :\n" + " .pidbase align(__INTEGRITY_MaxPageAlign) :\n" " .sdabase :\n" " .data :\n" " .toc :\n" " .opd :\n" " .datachecksum :\n" - " .bss align(__INTEGRITY_MinPageAlign) :\n" - " .heap :\n" + " .sbss : \n" + " .bss align(__INTEGRITY_MinPageAlign) :\n" + " .argsection(__INTEGRITY_MaxPageAlign) :\n" + " .heap : \n" "}\n"; tl.flush(); dllbase += DLLOFFSET; @@ -215,7 +218,9 @@ GBuildMakefileGenerator::write() warn_msg(WarnParser, Option::output.fileName().toAscii()); QTextStream t(&Option::output); - QString primaryTarget(project->values("QMAKE_CXX").at(0)); + QString primaryTarget; + if (!project->values("QMAKE_CXX").isEmpty()) + primaryTarget = project->values("QMAKE_CXX").at(0); pathtoremove += QDir::separator(); filename.remove(qmake_getpwd()); @@ -254,6 +259,8 @@ GBuildMakefileGenerator::write() t << "\t:sourceDir=." << "\n"; t << "\t:outputDir=work" << relpath << "\n"; + t << "\t-I${%expand_path(.)}/work" << relpath << "\n"; + t << "\t--cxx_include_directory ${%expand_path(.)}/work" << relpath << "\n"; if (filename.endsWith("projects.gpj")) { t << "\t:sourceDir=work\n"; t << "\t-Iwork\n"; @@ -270,7 +277,8 @@ GBuildMakefileGenerator::write() } t << "\n"; - t << varGlue("DEFINES", "\t-D", "\n\t-D", "\n"); + if (project->first("TEMPLATE") != "project") + t << varGlue("DEFINES", "\t-D", "\n\t-D", "\n"); t << "\t-I.\n\t-I" << specdir() << "\n"; t << varGlue("INCLUDEPATH", "\t-I", "\n\t-I", "\n"); @@ -306,9 +314,11 @@ GBuildMakefileGenerator::write() continue; if (!project->first((*it) + ".subdir").isEmpty()) gpjname = project->first((*it) + ".subdir"); + /* some SUBDIRS are not actually subdirs, instead .pro files */ + if (gpjname.endsWith(".pro")) + gpjname.chop(4); else - gpjname.replace("_", QDir::separator()); - gpjname += QDir::separator() + gpjname.section(QDir::separator(), -1); + gpjname += QDir::separator() + gpjname.section(QDir::separator(), -1); gpjname += projectSuffix(); /* make relative */ if (!project->values("QT_SOURCE_TREE").isEmpty()) { @@ -328,7 +338,7 @@ GBuildMakefileGenerator::write() t << "\t-name " << tmpstr << "\n"; tmpstr.insert(tmpstr.lastIndexOf(QDir::separator()) + 1, "qrc_"); tmpstr.append(".cpp"); - t << "\t-o work/" << tmpstr << "\n"; + t << "\t-o work/" << relpath << QDir::separator() << tmpstr << "\n"; } } { @@ -340,7 +350,7 @@ GBuildMakefileGenerator::write() tmpstr.insert(tmpstr.lastIndexOf(QDir::separator()) + 1, "ui_"); tmpstr.remove(".ui"); tmpstr.append(".h"); - t << "\t-o work/" << tmpstr << "\n"; + t << "\t-o work/" << relpath << QDir::separator() << tmpstr << "\n"; } } @@ -363,7 +373,7 @@ GBuildMakefileGenerator::write() { QStringList &l = project->values("GENERATED_SOURCES"); for (QStringList::Iterator it = l.begin(); it != l.end(); ++it) { - t << "work/" << (*it).section(QDir::separator(), -1) << "\n"; + t << "work/" << relpath << QDir::separator() << (*it).section(QDir::separator(), -1) << "\n"; } } @@ -373,8 +383,9 @@ GBuildMakefileGenerator::write() QString GBuildMakefileGenerator::writeOne(QString filename, QString pathtoremove) { QString s(""); + QString origfilename(filename); s += filename.remove(pathtoremove); - if (filename.endsWith(Option::h_ext.first())) { + if (filename.endsWith(Option::h_ext.first()) && mocable(origfilename)) { QString corename(filename.section(QDir::separator(), -1)); corename.remove(Option::h_ext.first()); corename.append(Option::cpp_ext.first()); @@ -382,6 +393,8 @@ QString GBuildMakefileGenerator::writeOne(QString filename, QString pathtoremove s += "\t[MOC/Qt Header]\n"; s += "\t-o "; s += "work/"; + s += pathtoremove; + s += QDir::separator(); s += corename; s += "\n"; } else if (filename.section(QDir::separator(), -1).startsWith("qrc_")) { @@ -390,7 +403,7 @@ QString GBuildMakefileGenerator::writeOne(QString filename, QString pathtoremove s += tmpstr; s += ".qrc"; s += "\n"; - } else if (filename.endsWith(Option::cpp_ext.first())) { + } else if (filename.endsWith(Option::cpp_ext.first()) && mocable(origfilename)) { QString tmpstr(filename.section("/", -1)); QString filepath(pathtoremove); if (!project->values("QT_SOURCE_TREE").isEmpty()) { @@ -406,6 +419,8 @@ QString GBuildMakefileGenerator::writeOne(QString filename, QString pathtoremove s += " -o "; tmpstr.replace(Option::cpp_ext.first(), Option::cpp_moc_ext); s += "work/"; + s += pathtoremove; + s += QDir::separator(); s += tmpstr; s += "\n"; } else diff --git a/qmake/generators/integrity/gbuild.h b/qmake/generators/integrity/gbuild.h index 0927a2e..6f9a5c0 100644 --- a/qmake/generators/integrity/gbuild.h +++ b/qmake/generators/integrity/gbuild.h @@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE class GBuildMakefileGenerator : public MakefileGenerator { - virtual bool write(); + virtual bool writeMakefile(QTextStream &text); QString projectSuffix() const { return QString(".gpj"); }; QString writeOne(QString filename, QString pathtoremove = ""); diff --git a/qmake/qmake.pri b/qmake/qmake.pri index c2fc1d5..f2a3705 100644 --- a/qmake/qmake.pri +++ b/qmake/qmake.pri @@ -22,7 +22,8 @@ SOURCES += project.cpp property.cpp main.cpp generators/makefile.cpp \ generators/symbian/initprojectdeploy_symbian.cpp \ generators/integrity/gbuild.cpp \ windows/registry.cpp \ - symbian/epocroot.cpp + symbian/epocroot.cpp \ + generators/integrity/gbuild.cpp HEADERS += project.h property.h generators/makefile.h \ generators/unix/unixmake.h meta.h option.h cachekeys.h \ @@ -39,7 +40,8 @@ HEADERS += project.h property.h generators/makefile.h \ generators/symbian/initprojectdeploy_symbian.h \ generators/integrity/gbuild.h \ windows/registry_p.h \ - symbian/epocroot_p.h + symbian/epocroot_p.h \ + generators/integrity/gbuild.h contains(QT_EDITION, OpenSource) { DEFINES += QMAKE_OPENSOURCE_EDITION diff --git a/qmake/qmake.pro b/qmake/qmake.pro index b602afa..38e0fce 100644 --- a/qmake/qmake.pro +++ b/qmake/qmake.pro @@ -25,6 +25,7 @@ INCLUDEPATH += . \ generators/win32 \ generators/mac \ generators/symbian \ + generators/integrity \ $$QT_SOURCE_TREE/include \ $$QT_SOURCE_TREE/include/QtCore \ $$QT_SOURCE_TREE/qmake diff --git a/src/corelib/arch/qatomic_integrity.h b/src/corelib/arch/qatomic_integrity.h index f957297..c72a48d 100644 --- a/src/corelib/arch/qatomic_integrity.h +++ b/src/corelib/arch/qatomic_integrity.h @@ -203,7 +203,7 @@ inline int QBasicAtomicInt::fetchAndAddRelease(int valueToAdd) template <typename T> Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetOrdered(T *expectedValue, T *newValue) { - return TestAndSet((Address*)&_q_value, qt_addr(expectedValue), qt_addr(newValue)) == Success; + return TestAndSet(reinterpret_cast<Address *>(const_cast<T **>(&_q_value)), qt_addr(expectedValue), qt_addr(newValue)) == Success; } template <typename T> @@ -231,7 +231,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreOrdered(T *newValue) { Address old_val; do { - old_val = *reinterpret_cast<Address *>(const_cast<T *>(newValue)); + old_val = *reinterpret_cast<Address *>(const_cast<T *>(_q_value)); } while (TestAndSet(reinterpret_cast<Address *>(const_cast<T **>(&_q_value)), old_val, qt_addr(newValue)) != Success); return reinterpret_cast<T *>(old_val); } @@ -259,7 +259,8 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelease(T *newValue) template <typename T> Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddOrdered(qptrdiff valueToAdd) { - AtomicModify(qt_p2addr(&_q_value), qt_addr(_q_value), qt_addr(_q_value) + valueToAdd * sizeof(T)); + Address old_value; + AtomicModify(reinterpret_cast<volatile Address*>(&_q_value), &old_value, 0, valueToAdd * sizeof(T)); return _q_value; } diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index cfe5eea..e8c611b 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -1824,7 +1824,7 @@ inline T *q_check_ptr(T *p) { Q_CHECK_PTR(p); return p; } #elif defined(_MSC_VER) # define Q_FUNC_INFO __FUNCSIG__ #else -# if defined(Q_OS_SOLARIS) || defined(Q_CC_XLC) || defined(Q_OS_SYMBIAN) +# if defined(Q_OS_SOLARIS) || defined(Q_CC_XLC) || defined(Q_OS_SYMBIAN) || defined(Q_OS_INTEGRITY) # define Q_FUNC_INFO __FILE__ "(line number unavailable)" # else /* These two macros makes it possible to turn the builtin line expander into a diff --git a/src/corelib/tools/qlocale_tools.cpp b/src/corelib/tools/qlocale_tools.cpp index df31bf9..750379c 100644 --- a/src/corelib/tools/qlocale_tools.cpp +++ b/src/corelib/tools/qlocale_tools.cpp @@ -2253,6 +2253,13 @@ static int quorem(Bigint *b, Bigint *S) * calculation. */ +#if defined(Q_OS_WIN) && defined (Q_CC_GNU) && !defined(_clear87) // See QTBUG-7576 +extern "C" { +__attribute__ ((dllimport)) unsigned int __cdecl __MINGW_NOTHROW _control87 (unsigned int unNew, unsigned int unMask); +__attribute__ ((dllimport)) unsigned int __cdecl __MINGW_NOTHROW _clearfp (void); /* Clear the FPU status word */ +} +# define _clear87 _clearfp +#endif /* This actually sometimes returns a pointer to a string literal cast to a char*. Do NOT try to modify the return value. */ diff --git a/src/gui/dialogs/qfiledialog.cpp b/src/gui/dialogs/qfiledialog.cpp index 817cd38..970d111 100644 --- a/src/gui/dialogs/qfiledialog.cpp +++ b/src/gui/dialogs/qfiledialog.cpp @@ -869,6 +869,7 @@ Q_AUTOTEST_EXPORT QString qt_tildeExpansion(const QString &path, bool *expanded if (!path.startsWith(QLatin1Char('~'))) return path; QString ret = path; +#if !defined(Q_OS_INTEGRITY) QStringList tokens = ret.split(QDir::separator()); if (tokens.first() == QLatin1String("~")) { ret.replace(0, 1, QDir::homePath()); @@ -899,6 +900,7 @@ Q_AUTOTEST_EXPORT QString qt_tildeExpansion(const QString &path, bool *expanded } if (expanded != 0) *expanded = true; +#endif return ret; } #endif diff --git a/src/gui/embedded/qscreenintegrityfb_qws.cpp b/src/gui/embedded/qscreenintegrityfb_qws.cpp index 6f30812..5b1e0d5 100644 --- a/src/gui/embedded/qscreenintegrityfb_qws.cpp +++ b/src/gui/embedded/qscreenintegrityfb_qws.cpp @@ -64,7 +64,8 @@ public: ~QIntfbScreenPrivate(); FBHandle handle; - struct FBInfoStruct fbinfo; + FBInfo fbinfo; + FBDriver *fbdrv; QWSMouseHandler *mouse; #ifndef QT_NO_QWS_KEYBOARD @@ -172,15 +173,14 @@ static QIntfbScreen *connected = 0; bool QIntfbScreen::connect(const QString &displaySpec) { - FBDriver *fbdev; - - CheckSuccess(gh_FB_get_driver(0, &fbdev)); - CheckSuccess(gh_FB_init_device(fbdev, 0, &d_ptr->handle)); + CheckSuccess(gh_FB_get_driver(0, &d_ptr->fbdrv)); + CheckSuccess(gh_FB_check_info(d_ptr->fbdrv, &d_ptr->fbinfo)); + CheckSuccess(gh_FB_open(d_ptr->fbdrv, &d_ptr->fbinfo, &d_ptr->handle)); CheckSuccess(gh_FB_get_info(d_ptr->handle, &d_ptr->fbinfo)); - data = (uchar *)d_ptr->fbinfo.start; + data = (uchar *)d_ptr->fbinfo.Start; - d = d_ptr->fbinfo.bitsperpixel; + d = d_ptr->fbinfo.BitsPerPixel; switch (d) { case 1: setPixelFormat(QImage::Format_Mono); @@ -205,24 +205,24 @@ bool QIntfbScreen::connect(const QString &displaySpec) #ifdef QT_QWS_DEPTH_GENERIC #if Q_BYTE_ORDER != Q_BIG_ENDIAN qt_set_generic_blit(this, 24, - d_ptr->fbinfo.redbits, - d_ptr->fbinfo.greenbits, - d_ptr->fbinfo.bluebits, - d_ptr->fbinfo.alphabits, - d_ptr->fbinfo.redoffset, - d_ptr->fbinfo.greenoffset, - d_ptr->fbinfo.blueoffset, - d_ptr->fbinfo.alphaoffset); + d_ptr->fbinfo.Red.Bits, + d_ptr->fbinfo.Green.Bits, + d_ptr->fbinfo.Blue.Bits, + d_ptr->fbinfo.Alpha.Bits, + d_ptr->fbinfo.Red.Offset, + d_ptr->fbinfo.Green.Offset, + d_ptr->fbinfo.Blue.Offset, + d_ptr->fbinfo.Alpha.Offset); #else qt_set_generic_blit(this, 24, - d_ptr->fbinfo.redbits, - d_ptr->fbinfo.greenbits, - d_ptr->fbinfo.bluebits, - d_ptr->fbinfo.alphabits, - 16 - d_ptr->fbinfo.redoffset, - 16 - d_ptr->fbinfo.greenoffset, - 16 - d_ptr->fbinfo.blueoffset, - d_ptr->fbinfo.alphaoffset); + d_ptr->fbinfo.Red.Bits, + d_ptr->fbinfo.Green.Bits, + d_ptr->fbinfo.Blue.Bits, + d_ptr->fbinfo.Alpha.Bits, + 16 - d_ptr->fbinfo.Red.Offset, + 16 - d_ptr->fbinfo.Green.Offset, + 16 - d_ptr->fbinfo.Blue.Offset, + 16 - d_ptr->fbinfo.Alpha.Offset); #endif #endif break; @@ -231,31 +231,31 @@ bool QIntfbScreen::connect(const QString &displaySpec) #ifdef QT_QWS_DEPTH_GENERIC #if Q_BYTE_ORDER != Q_BIG_ENDIAN qt_set_generic_blit(this, 32, - d_ptr->fbinfo.redbits, - d_ptr->fbinfo.greenbits, - d_ptr->fbinfo.bluebits, - d_ptr->fbinfo.alphabits, - d_ptr->fbinfo.redoffset, - d_ptr->fbinfo.greenoffset, - d_ptr->fbinfo.blueoffset, - d_ptr->fbinfo.alphaoffset); + d_ptr->fbinfo.Red.Bits, + d_ptr->fbinfo.Green.Bits, + d_ptr->fbinfo.Blue.Bits, + d_ptr->fbinfo.Alpha.Bits, + d_ptr->fbinfo.Red.Offset, + d_ptr->fbinfo.Green.Offset, + d_ptr->fbinfo.Blue.Offset, + d_ptr->fbinfo.Alpha.Offset); #else qt_set_generic_blit(this, 32, - d_ptr->fbinfo.redbits, - d_ptr->fbinfo.greenbits, - d_ptr->fbinfo.bluebits, - d_ptr->fbinfo.alphabits, - 24 - d_ptr->fbinfo.redoffset, - 24 - d_ptr->fbinfo.greenoffset, - 24 - d_ptr->fbinfo.blueoffset, - d_ptr->fbinfo.alphaoffset ? 24 - d_ptr->fbinfo.alphaoffset : 0); + d_ptr->fbinfo.Red.Bits, + d_ptr->fbinfo.Green.Bits, + d_ptr->fbinfo.Blue.Bits, + d_ptr->fbinfo.Alpha.Bits, + 24 - d_ptr->fbinfo.Red.Offset, + 24 - d_ptr->fbinfo.Green.Offset, + 24 - d_ptr->fbinfo.Blue.Offset, + 24 - d_ptr->fbinfo.Alpha.Offset); #endif #endif break; } - dw = w = d_ptr->fbinfo.width; - dh = h = d_ptr->fbinfo.height; + dw = w = d_ptr->fbinfo.Width; + dh = h = d_ptr->fbinfo.Height; /* assumes no padding */ lstep = w * ((d + 7) >> 3); @@ -286,72 +286,6 @@ void QIntfbScreen::disconnect() bool QIntfbScreen::initDevice() { - - CheckSuccess(gh_FB_set_info(d_ptr->handle, &d_ptr->fbinfo, false)); - CheckSuccess(gh_FB_get_info(d_ptr->handle, &d_ptr->fbinfo)); - data = (uchar *)d_ptr->fbinfo.start; - d = d_ptr->fbinfo.bitsperpixel; - dw = w = d_ptr->fbinfo.width; - dh = h = d_ptr->fbinfo.height; - mapsize = d_ptr->fbinfo.length; - /* assumes no padding */ - lstep = w * ((d + 7) >> 3); - - mapsize = size = h * lstep; - - data = (uchar *)d_ptr->fbinfo.start; - - d = d_ptr->fbinfo.bitsperpixel; - switch (d) { - case 1: - setPixelFormat(QImage::Format_Mono); - break; - case 8: - setPixelFormat(QImage::Format_Indexed8); - break; - case 12: - setPixelFormat(QImage::Format_RGB444); - break; - case 15: - setPixelFormat(QImage::Format_RGB555); - break; - case 16: - setPixelFormat(QImage::Format_RGB16); - break; - case 18: - setPixelFormat(QImage::Format_RGB666); - break; - case 24: - setPixelFormat(QImage::Format_RGB888); - break; - case 32: - setPixelFormat(QImage::Format_ARGB32_Premultiplied); - break; - } -#ifdef QT_QWS_DEPTH_GENERIC -#if defined(__BIG_ENDIAN__) - qt_set_generic_blit(this, d, - d_ptr->fbinfo.redbits, - d_ptr->fbinfo.greenbits, - d_ptr->fbinfo.bluebits, - d_ptr->fbinfo.alphabits, - 24 - d_ptr->fbinfo.redoffset, - 24 - d_ptr->fbinfo.greenoffset, - 24 - d_ptr->fbinfo.blueoffset, - d_ptr->fbinfo.alphaoffset ? 24 - d_ptr->fbinfo.alphaoffset : 0); -#else - qt_set_generic_blit(this, d, - d_ptr->fbinfo.redbits, - d_ptr->fbinfo.greenbits, - d_ptr->fbinfo.bluebits, - d_ptr->fbinfo.alphabits, - d_ptr->fbinfo.redoffset, - d_ptr->fbinfo.greenoffset, - d_ptr->fbinfo.blueoffset, - d_ptr->fbinfo.alphaoffset); -#endif -#endif - #ifndef QT_NO_QWS_CURSOR QScreenCursor::initSoftwareCursor(); #endif @@ -384,9 +318,9 @@ void QIntfbScreen::setDirty(const QRect& rect) FBRect fbrect; fbrect.dx = rect.x(); fbrect.dy = rect.y(); - fbrect.width = rect.width(); - fbrect.height = rect.height(); - gh_FB_expose(d_ptr->handle, &fbrect); + fbrect.Width = rect.width(); + fbrect.Height = rect.height(); + gh_FB_expose(d_ptr->handle, &fbrect, 0); } void QIntfbScreen::setBrightness(int b) diff --git a/src/network/ssl/qssl.cpp b/src/network/ssl/qssl.cpp index b556328..01297c9 100644 --- a/src/network/ssl/qssl.cpp +++ b/src/network/ssl/qssl.cpp @@ -141,9 +141,15 @@ QT_BEGIN_NAMESPACE \value SslOptionDisableServerNameIndication Disables the SSL server name indication extension. When enabled, this tells the server the virtual host being accessed allowing it to respond with the correct certificate. + \value SslOptionDisableLegacyRenegotiation Disables the older insecure + mechanism for renegotiating the connection parameters. When enabled, this + option can allow connections for legacy servers, but it introduces the + possibility that an attacker could inject plaintext into the SSL session. By default, SslOptionDisableEmptyFragments is turned on since this causes - problems with a large number of servers, but the other options are disabled. + problems with a large number of servers. SslOptionDisableLegacyRenegotiation + is also turned on, since it introduces a security risk. The other options + are turned off. Note: Availability of above options depends on the version of the SSL backend in use. diff --git a/src/network/ssl/qssl.h b/src/network/ssl/qssl.h index 453d4da..571aa1f 100644 --- a/src/network/ssl/qssl.h +++ b/src/network/ssl/qssl.h @@ -87,7 +87,8 @@ namespace QSsl { SslOptionDisableEmptyFragments = 0x01, SslOptionDisableSessionTickets = 0x02, SslOptionDisableCompression = 0x04, - SslOptionDisableServerNameIndication = 0x08 + SslOptionDisableServerNameIndication = 0x08, + SslOptionDisableLegacyRenegotiation = 0x10 }; Q_DECLARE_FLAGS(SslOptions, SslOption) } diff --git a/src/network/ssl/qsslconfiguration.cpp b/src/network/ssl/qsslconfiguration.cpp index e24076e..727130b 100644 --- a/src/network/ssl/qsslconfiguration.cpp +++ b/src/network/ssl/qsslconfiguration.cpp @@ -201,7 +201,7 @@ bool QSslConfiguration::isNull() const d->privateKey.isNull() && d->peerCertificate.isNull() && d->peerCertificateChain.count() == 0 && - d->sslOptions == 0); + d->sslOptions == QSsl::SslOptionDisableEmptyFragments|QSsl::SslOptionDisableLegacyRenegotiation); } /*! diff --git a/src/network/ssl/qsslconfiguration_p.h b/src/network/ssl/qsslconfiguration_p.h index b83edb9..a711eeb 100644 --- a/src/network/ssl/qsslconfiguration_p.h +++ b/src/network/ssl/qsslconfiguration_p.h @@ -82,7 +82,8 @@ public: QSslConfigurationPrivate() : protocol(QSsl::SecureProtocols), peerVerifyMode(QSslSocket::AutoVerifyPeer), - peerVerifyDepth(0) + peerVerifyDepth(0), + sslOptions(QSsl::SslOptionDisableEmptyFragments|QSsl::SslOptionDisableLegacyRenegotiation) { } QSslCertificate peerCertificate; diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp index 3942209..5f520f7 100644 --- a/src/network/ssl/qsslsocket_openssl.cpp +++ b/src/network/ssl/qsslsocket_openssl.cpp @@ -298,6 +298,14 @@ init_context: else options &= ~SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS; +#ifdef SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION + // This option is disabled by default, so we need to be able to clear it + if (configuration.sslOptions & QSsl::SslOptionDisableLegacyRenegotiation) + options &= ~SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION; + else + options |= SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION; +#endif + #ifdef SSL_OP_NO_TICKET if (configuration.sslOptions & QSsl::SslOptionDisableSessionTickets) options |= SSL_OP_NO_TICKET; diff --git a/src/src.pro b/src/src.pro index 9314fbd..c51683b 100644 --- a/src/src.pro +++ b/src/src.pro @@ -8,7 +8,7 @@ SRC_SUBDIRS += src_corelib src_xml src_network src_sql src_testlib nacl: SRC_SUBDIRS -= src_network src_testlib !symbian:contains(QT_CONFIG, dbus):SRC_SUBDIRS += src_dbus !contains(QT_CONFIG, no-gui): SRC_SUBDIRS += src_gui -!wince*:!symbian:!vxworks:contains(QT_CONFIG, qt3support): SRC_SUBDIRS += src_qt3support +!wince*:!symbian:!vxworks:!integrity:contains(QT_CONFIG, qt3support): SRC_SUBDIRS += src_qt3support !wince*:!symbian-abld:!symbian-sbsv2:include(tools/tools.pro) win32:!win32-g++*:SRC_SUBDIRS += src_activeqt diff --git a/tests/auto/qbytearray/qbytearray.pro b/tests/auto/qbytearray/qbytearray.pro index f195dc8..b954ca0 100644 --- a/tests/auto/qbytearray/qbytearray.pro +++ b/tests/auto/qbytearray/qbytearray.pro @@ -14,6 +14,8 @@ wince* { DEFINES += SRCDIR=\\\"./\\\" } else:symbian { TARGET.EPOCHEAPSIZE="0x100 0x800000" +} else:integrity { + DEFINES += SRCDIR=\"/\" } else { DEFINES += SRCDIR=\\\"$$PWD/\\\" } diff --git a/tests/auto/qchar/qchar.pro b/tests/auto/qchar/qchar.pro index 1681220..cbbde7c 100644 --- a/tests/auto/qchar/qchar.pro +++ b/tests/auto/qchar/qchar.pro @@ -10,6 +10,8 @@ DEPLOYMENT += deploy symbian: { DEFINES += SRCDIR="" +} else:integrity { + DEFINES += SRCDIR=\"/\" } else { DEFINES += SRCDIR=\\\"$$PWD/\\\" } diff --git a/tests/auto/qelapsedtimer/qelapsedtimer.pro b/tests/auto/qelapsedtimer/qelapsedtimer.pro index 8768876..1d74fc5 100644 --- a/tests/auto/qelapsedtimer/qelapsedtimer.pro +++ b/tests/auto/qelapsedtimer/qelapsedtimer.pro @@ -7,6 +7,8 @@ wince* { } else:symbian { # do not define SRCDIR at all TARGET.EPOCHEAPSIZE = 0x100000 0x3000000 +} else:integrity { + DEFINES += SRCDIR=\"/\" } else { DEFINES += SRCDIR=\\\"$$PWD/\\\" } diff --git a/tests/auto/qfileinfo/qfileinfo.pro b/tests/auto/qfileinfo/qfileinfo.pro index 7a2cf9c..d0e284b 100644 --- a/tests/auto/qfileinfo/qfileinfo.pro +++ b/tests/auto/qfileinfo/qfileinfo.pro @@ -26,6 +26,8 @@ wince* { DEFINES += SRCDIR=\\\"\\\" } else:symbian { # do not define SRCDIR at all +} else:integrity { + DEFINES += SRCDIR=\"/\" } else { DEFINES += SRCDIR=\\\"$$PWD/\\\" } diff --git a/tests/auto/qlibrary/qlibrary.pro b/tests/auto/qlibrary/qlibrary.pro index 5dc129f..b351753 100644 --- a/tests/auto/qlibrary/qlibrary.pro +++ b/tests/auto/qlibrary/qlibrary.pro @@ -6,6 +6,8 @@ symbian: { # Can't build two versions of lib with same name in symbian, so just build one SUBDIRS = lib2 \ tst +} else:integrity { +# no shared support, empty test } else { SUBDIRS = lib \ lib2 \ diff --git a/tests/auto/qplugin/qplugin.pro b/tests/auto/qplugin/qplugin.pro index 37a12da..1dcf0a7 100644 --- a/tests/auto/qplugin/qplugin.pro +++ b/tests/auto/qplugin/qplugin.pro @@ -22,7 +22,7 @@ mac { SUBDIRS = debugplugin releaseplugin tst_qplugin_pro.depends += debugplugin releaseplugin } -SUBDIRS += tst_qplugin.pro +!integrity:SUBDIRS += tst_qplugin.pro CONFIG += parallel_test diff --git a/tests/auto/qpluginloader/qpluginloader.pro b/tests/auto/qpluginloader/qpluginloader.pro index 6e41b4c..cb25b0f 100644 --- a/tests/auto/qpluginloader/qpluginloader.pro +++ b/tests/auto/qpluginloader/qpluginloader.pro @@ -1,10 +1,10 @@ QT = core TEMPLATE = subdirs CONFIG += ordered -SUBDIRS = lib \ +!integrity:SUBDIRS = lib \ theplugin \ tst -!win32: !macx-*: !symbian: SUBDIRS += almostplugin +!win32: !macx-*: !symbian: !integrity: SUBDIRS += almostplugin TARGET = tst_qpluginloader # no special install rule for subdir diff --git a/tests/auto/qresourceengine/qresourceengine.pro b/tests/auto/qresourceengine/qresourceengine.pro index 9ca6994..6359549 100644 --- a/tests/auto/qresourceengine/qresourceengine.pro +++ b/tests/auto/qresourceengine/qresourceengine.pro @@ -40,6 +40,8 @@ wince*|symbian:{ testsub2.path = testqrc/test/test DEPLOYMENT += deploy test alias other search1 search2 sub testsub testsub2 !symbian:DEFINES += SRCDIR=\\\"\\\" +} else:integrity { + DEFINES += SRCDIR=\"/\" } else { DEFINES += SRCDIR=\\\"$$PWD/\\\" } diff --git a/tests/auto/qsharedpointer/qsharedpointer.pro b/tests/auto/qsharedpointer/qsharedpointer.pro index 014006e..37ab4ce 100644 --- a/tests/auto/qsharedpointer/qsharedpointer.pro +++ b/tests/auto/qsharedpointer/qsharedpointer.pro @@ -9,7 +9,12 @@ HEADERS += forwarddeclared.h \ wrapper.h QT = core -!symbian:DEFINES += SRCDIR=\\\"$$PWD/\\\" + +integrity { + DEFINES += SRCDIR=\"/\" +} else:!symbian { + DEFINES += SRCDIR=\\\"$$PWD/\\\" +} include(externaltests.pri) CONFIG += parallel_test diff --git a/tests/auto/qtemporaryfile/qtemporaryfile.pro b/tests/auto/qtemporaryfile/qtemporaryfile.pro index 64a043b..4cbc76d 100644 --- a/tests/auto/qtemporaryfile/qtemporaryfile.pro +++ b/tests/auto/qtemporaryfile/qtemporaryfile.pro @@ -7,6 +7,8 @@ symbian { testData.files = tst_qtemporaryfile.cpp testData.path = . DEPLOYMENT += testData +} else:integrity { + DEFINES += SRCDIR=\"/\" }else { DEFINES += SRCDIR=\\\"$$PWD/\\\" } diff --git a/tests/auto/qtextboundaryfinder/qtextboundaryfinder.pro b/tests/auto/qtextboundaryfinder/qtextboundaryfinder.pro index 5f3cb11..c52ca52 100644 --- a/tests/auto/qtextboundaryfinder/qtextboundaryfinder.pro +++ b/tests/auto/qtextboundaryfinder/qtextboundaryfinder.pro @@ -2,7 +2,11 @@ load(qttest_p4) QT = core HEADERS += SOURCES += tst_qtextboundaryfinder.cpp -!symbian:*:DEFINES += SRCDIR=\\\"$$PWD\\\" +integrity { + DEFINES += SRCDIR=\"/\" +} else:!symbian { + DEFINES += SRCDIR=\\\"$$PWD/\\\" +} wince*|symbian:{ addFiles.files = data diff --git a/tests/auto/selftests/selftests.pro b/tests/auto/selftests/selftests.pro index 74cd075..1494e38 100644 --- a/tests/auto/selftests/selftests.pro +++ b/tests/auto/selftests/selftests.pro @@ -12,5 +12,6 @@ INSTALLS = QT = core +integrity: SUBDIRS -= test CONFIG += parallel_test diff --git a/tests/manual/qssloptions/main.cpp b/tests/manual/qssloptions/main.cpp index 6f2f361..727ad23 100644 --- a/tests/manual/qssloptions/main.cpp +++ b/tests/manual/qssloptions/main.cpp @@ -56,6 +56,7 @@ int main(int argc, char **argv) out << "disable_session_tickets" << endl; out << "disable_compression" << endl; out << "disable_sni" << endl; + out << "enable_unsafe_reneg" << endl; return 1; } @@ -75,6 +76,8 @@ int main(int argc, char **argv) config.setSslOption(QSsl::SslOptionDisableCompression, true); else if (option == QLatin1String("disable_sni")) config.setSslOption(QSsl::SslOptionDisableServerNameIndication, true); + else if (option == QStringLiteral("enable_unsafe_reneg")) + config.setSslOption(QSsl::SslOptionDisableLegacyRenegotiation, false); } QSslConfiguration::setDefaultConfiguration(config); diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index e6d8526..60996e3 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -1263,17 +1263,18 @@ void Configure::parseCmdLine() } cout << "See the README file for a list of supported operating systems and compilers." << endl; } else { - if (dictionary[ "QMAKESPEC" ].endsWith("-icc") || - dictionary[ "QMAKESPEC" ].endsWith("-msvc") || - dictionary[ "QMAKESPEC" ].endsWith("-msvc.net") || - dictionary[ "QMAKESPEC" ].endsWith("-msvc2002") || - dictionary[ "QMAKESPEC" ].endsWith("-msvc2003") || - dictionary[ "QMAKESPEC" ].endsWith("-msvc2005") || - dictionary[ "QMAKESPEC" ].endsWith("-msvc2008") || - dictionary[ "QMAKESPEC" ].endsWith("-msvc2010")) { + const QString qmakeSpec = dictionary[ "QMAKESPEC" ]; + if (qmakeSpec.endsWith("-icc") || + qmakeSpec.endsWith("-msvc") || + qmakeSpec.endsWith("-msvc.net") || + qmakeSpec.endsWith("-msvc2002") || + qmakeSpec.endsWith("-msvc2003") || + qmakeSpec.endsWith("-msvc2005") || + qmakeSpec.endsWith("-msvc2008") || + qmakeSpec.endsWith("-msvc2010")) { if (dictionary[ "MAKE" ].isEmpty()) dictionary[ "MAKE" ] = "nmake"; dictionary[ "QMAKEMAKEFILE" ] = "Makefile.win32"; - } else if (dictionary[ "QMAKESPEC" ] == QString("win32-g++")) { + } else if (qmakeSpec.contains("win32-g++")) { if (dictionary[ "MAKE" ].isEmpty()) dictionary[ "MAKE" ] = "mingw32-make"; if (Environment::detectExecutable("sh.exe")) { dictionary[ "QMAKEMAKEFILE" ] = "Makefile.win32-g++-sh"; @@ -1329,7 +1330,7 @@ void Configure::parseCmdLine() } } - useUnixSeparators = (dictionary["QMAKESPEC"] == "win32-g++"); + useUnixSeparators = dictionary["QMAKESPEC"].contains("win32-g++"); // Allow tests for private classes to be compiled against internal builds if (dictionary["BUILDDEV"] == "yes") @@ -2201,7 +2202,9 @@ bool Configure::checkAvailability(const QString &part) } else if (part == "MULTIMEDIA" || part == "SCRIPT" || part == "SCRIPTTOOLS" || part == "DECLARATIVE") { available = true; } else if (part == "WEBKIT") { - available = (dictionary.value("QMAKESPEC") == "win32-msvc2005") || (dictionary.value("QMAKESPEC") == "win32-msvc2008") || (dictionary.value("QMAKESPEC") == "win32-msvc2010") || (dictionary.value("QMAKESPEC") == "win32-g++"); + const QString qmakeSpec = dictionary.value("QMAKESPEC"); + available = qmakeSpec == "win32-msvc2005" || qmakeSpec == "win32-msvc2008" || + qmakeSpec == "win32-msvc2010" || qmakeSpec.startsWith("win32-g++"); if (dictionary[ "SHARED" ] == "no") { cout << endl << "WARNING: Using static linking will disable the WebKit module." << endl << endl; @@ -2376,7 +2379,7 @@ bool Configure::verifyConfiguration() dictionary["SQL_SQLITE_LIB"] = "qt"; // Set to Qt's bundled lib an continue } - if (dictionary["QMAKESPEC"].endsWith("-g++") + if (dictionary["QMAKESPEC"].contains("-g++") && dictionary["SQL_OCI"] != "no") { cout << "WARNING: Qt does not support compiling the Oracle database driver with" << endl << "MinGW, due to lack of such support from Oracle. Consider disabling the" << endl @@ -2456,7 +2459,7 @@ void Configure::generateBuildKey() QString spec = dictionary["QMAKESPEC"]; QString compiler = "msvc"; // ICC is compatible - if (spec.endsWith("-g++")) + if (spec.contains("-g++")) compiler = "mingw"; else if (spec.endsWith("-borland")) compiler = "borland"; @@ -2874,7 +2877,7 @@ void Configure::generateOutputVars() if (!qmakeStylePlugins.isEmpty()) qmakeVars += QString("style-plugins += ") + qmakeStylePlugins.join(" "); - if (dictionary["QMAKESPEC"].endsWith("-g++")) { + if (dictionary["QMAKESPEC"].contains("-g++")) { QString includepath = qgetenv("INCLUDE"); bool hasSh = Environment::detectExecutable("sh.exe"); QChar separator = (!includepath.contains(":\\") && hasSh ? QChar(':') : QChar(';')); diff --git a/tools/configure/environment.cpp b/tools/configure/environment.cpp index f9b3e85..78e1d87 100644 --- a/tools/configure/environment.cpp +++ b/tools/configure/environment.cpp @@ -120,6 +120,9 @@ QString Environment::detectQMakeSpec() spec = "win32-icc"; break; case CC_MINGW: + spec = "win32-g++-4.6"; + break; + case CC_MINGW_44: spec = "win32-g++"; break; case CC_BORLAND: @@ -173,6 +176,12 @@ Compiler Environment::detectCompiler() if (executable.length() && Environment::detectExecutable(executable)) { ++installed; detectedCompiler = compiler_info[i].compiler; + if (detectedCompiler == CC_MINGW) { + bool is64bit; + const int version = detectGPlusPlusVersion(executable, &is64bit); + if (version < 0x040600) + detectedCompiler = CC_MINGW_44; + } break; } } @@ -184,7 +193,7 @@ Compiler Environment::detectCompiler() } return detectedCompiler; #endif -}; +} /*! Returns true if the \a executable could be loaded, else false. @@ -214,6 +223,81 @@ bool Environment::detectExecutable(const QString &executable) } /*! + Determine the g++ version. +*/ + +int Environment::detectGPlusPlusVersion(const QString &executable, + bool *is64bit) +{ + QRegExp regexp(QLatin1String("[gG]\\+\\+[\\.exEX]{0,4} ([^\\s]+) (\\d+)\\.(\\d+)\\.(\\d+)")); + QString stdOut = readProcessStandardOutput(executable + QLatin1String(" --version")); + if (regexp.indexIn(stdOut) != -1) { + const QString compiler = regexp.cap(1); + // Check for "tdm64-1" + *is64bit = compiler.contains(QLatin1String("64")); + const int major = regexp.cap(2).toInt(); + const int minor = regexp.cap(3).toInt(); + const int patch = regexp.cap(4).toInt(); + return (major << 16) + (minor << 8) + patch; + } + *is64bit = false; + return 0; +} + +/*! + Run a process and return its standard output. +*/ + +QString Environment::readProcessStandardOutput(const QString &commandLine) +{ + QString stdOut; + TCHAR tempFileName[MAX_PATH]; + TCHAR tempPathBuffer[MAX_PATH]; + if (!GetTempPath(MAX_PATH, tempPathBuffer) + || !GetTempFileName(tempPathBuffer, TEXT("qtconfigure"), 0, tempFileName)) + return stdOut; + + STARTUPINFO startInfo; + memset(&startInfo, 0, sizeof(startInfo)); + startInfo.cb = sizeof(startInfo); + startInfo.dwFlags |= STARTF_USESTDHANDLES; + + SECURITY_ATTRIBUTES securityAttributes; + securityAttributes.nLength = sizeof(SECURITY_ATTRIBUTES); + securityAttributes.bInheritHandle = TRUE; + securityAttributes.lpSecurityDescriptor = NULL; + + startInfo.hStdOutput = CreateFile(tempFileName, GENERIC_WRITE, 0, &securityAttributes, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); + if (startInfo.hStdOutput == INVALID_HANDLE_VALUE) + return stdOut; + + PROCESS_INFORMATION procInfo; + memset(&procInfo, 0, sizeof(procInfo)); + + if (!CreateProcess(0, (wchar_t*)commandLine.utf16(), + 0, 0, TRUE, + 0, + 0, 0, &startInfo, &procInfo)) { + CloseHandle(startInfo.hStdOutput); + DeleteFile(tempFileName); + return stdOut; + } + + WaitForSingleObject(procInfo.hProcess, INFINITE); + CloseHandle(procInfo.hThread); + CloseHandle(procInfo.hProcess); + CloseHandle(startInfo.hStdOutput); + QFile file(QString::fromWCharArray(tempFileName)); + + if (file.open(QIODevice::Text| QIODevice::ReadOnly)) { + stdOut = QString::fromLocal8Bit(file.readAll()); + file.close(); + } + DeleteFile(tempFileName); + return stdOut; +} + +/*! Creates a commandling from \a program and it \a arguments, escaping characters that needs it. */ diff --git a/tools/configure/environment.h b/tools/configure/environment.h index 9bbd096..81c232a 100644 --- a/tools/configure/environment.h +++ b/tools/configure/environment.h @@ -49,6 +49,7 @@ enum Compiler { CC_UNKNOWN = 0, CC_BORLAND = 0x01, CC_MINGW = 0x02, + CC_MINGW_44 = 0x21, CC_INTEL = 0x03, CC_NET2003 = 0x71, CC_NET2005 = 0x80, @@ -63,6 +64,8 @@ public: static Compiler detectCompiler(); static QString detectQMakeSpec(); static bool detectExecutable(const QString &executable); + static int detectGPlusPlusVersion(const QString &executable, bool *is64bit); + static QString readProcessStandardOutput(const QString &commandLine); static int execute(QStringList arguments, const QStringList &additionalEnv, const QStringList &removeEnv); static bool cpdir(const QString &srcDir, |