diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-03-28 12:33:32 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-03-28 12:33:32 +0100 |
commit | ad809526d63b2c6a1dd94282fa0a807f72ee580d (patch) | |
tree | 05501efa0dae0b4b8cf72d254efbbbab2ad3cb2d | |
parent | 9149f31aeaf3fce0c5ba5c20da0b9f2b56368abb (diff) | |
parent | c7cca2dd74bcfb0a2020fbb537fd47b50b2775c0 (diff) |
Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
src/plugins/platforms/qnx/qqnxtheme.cpp
src/widgets/dialogs/qfileinfogatherer.cpp
src/widgets/dialogs/qfilesystemmodel.cpp
Change-Id: Ifa536969c4beafcdfeebbf6beda1674b86750be8
704 files changed, 6954 insertions, 4349 deletions
diff --git a/.qmake.conf b/.qmake.conf index 5de255cb69..17dbc553bb 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -1,2 +1,5 @@ load(qt_build_config) CONFIG += qt_example_installs + +# In qtbase, all modules follow qglobal.h +MODULE_VERSION = $$QT_VERSION diff --git a/bin/syncqt b/bin/syncqt index d503e3a87e..90b32a1a81 100755 --- a/bin/syncqt +++ b/bin/syncqt @@ -83,9 +83,6 @@ our $quoted_basedir; # Make sure we use Windows line endings for chomp and friends on Windows. $INPUT_RECORD_SEPARATOR = "\r\n" if ($^O eq "msys"); -my $mkspecsdir = dirname(dirname($0)); -normalizePath(\$mkspecsdir) if (defined $mkspecsdir); - # will be defined based on the modules sync.profile our (%modules, %moduleheaders, @allmoduleheadersprivate, %classnames, %explicitheaders, %deprecatedheaders); our @qpa_headers = (); @@ -103,6 +100,7 @@ my $copy_headers = 0; my $create_uic_class_map = 0; my $create_private_headers = 1; my $minimal = 0; +my $module_version = 0; my @modules_to_sync ; $force_relative = 1 if ( -d "/System/Library/Frameworks" ); @@ -128,7 +126,7 @@ sub showUsage print " -showonly Show action but not perform (default: " . ($showonly ? "yes" : "no") . ")\n"; print " -minimal Do not create CamelCase headers (default: " . ($minimal ? "yes" : "no") . ")\n"; print " -outdir <PATH> Specify output directory for sync (default: $out_basedir)\n"; - print " -mkspecsdir <PATH> Set the path to the mkspecs (detected: " . (defined $mkspecsdir ? $mkspecsdir : "-none-") . ")\n"; + print " -version <VERSION> Specify the module's version (default: detect from qglobal.h)\n"; print " -quiet Only report problems, not activity (same as -verbose 0)\n"; print " -v, -verbose <level> Sets the verbosity level (max. 4) (default: $verbose_level)\n"; print " The short form increases the level by +1\n"; @@ -662,8 +660,8 @@ while ( @ARGV ) { } elsif($arg eq "-private") { $var = "create_private_headers"; $val = "yes"; - } elsif($arg eq "-mkspecsdir") { - $var = "mkspecsdir"; + } elsif($arg eq "-version") { + $var = "version"; $val = shift @ARGV; } elsif($arg =~/^-/) { print "Unknown option: $arg\n\n" if(!$var); @@ -739,12 +737,11 @@ while ( @ARGV ) { push @modules_to_sync, $module; $moduleheaders{$module} = $headerdir; $create_uic_class_map = 0; - } elsif ($var eq "mkspecsdir") { + } elsif ($var eq "version") { if($val) { - $mkspecsdir = $val; - normalizePath(\$mkspecsdir); + $module_version = $val; } else { - die "The -mkspecsdir option requires an argument"; + die "The -version option requires an argument"; } } elsif ($var eq "output") { my $outdir = $val; @@ -759,11 +756,6 @@ while ( @ARGV ) { } } -die "Cannot automatically detect/use provided path to QtBase's build directory!\n" . - "QTDIR detected/provided: " . (defined $mkspecsdir ? $mkspecsdir : "-none-") . "\n" . - "Please use the -mkspecsdir option to provide the correct path.\nsyncqt failed" - if (!$mkspecsdir || !-d $mkspecsdir); - # if we have no $basedir we cannot be sure which sources you want, so die die "Could not find any sync.profile for your module!\nPass <module directory> to syncqt to sync your header files.\nsyncqt failed" if (!$basedir); @@ -784,12 +776,12 @@ my %allmoduleheadersprivate = map { $_ => 1 } @allmoduleheadersprivate; $isunix = checkUnix; #cache checkUnix -my $qt_version = fileContents($mkspecsdir."/qconfig.pri"); -if (length($qt_version)) { - $qt_version =~ s,.*^QT_VERSION[ \t]*=[ \t]*(\S+).*,$1,sm; -} else { - $qt_version = fileContents($basedir."/src/corelib/global/qglobal.h"); - $qt_version =~ s,.*^#[ \t]*define[ \t]+QT_VERSION_STR[ \t]+"([^"]+)".*,$1,sm; +if (!$module_version) { + my $filco = fileContents($basedir."/src/corelib/global/qglobal.h"); + if ($filco !~ m,.*^#[ \t]*define[ \t]+QT_VERSION_STR[ \t]+"([^"]+)".*,sm) { + die "Cannot determine Qt/Module version. Use -version.\n"; + } + $module_version = $1; } foreach my $lib (@modules_to_sync) { die "No such module: $lib" unless(defined $modules{$lib}); @@ -798,11 +790,6 @@ foreach my $lib (@modules_to_sync) { my @dirs = split(/;/, $modules{$lib}); my $dir = $dirs[0]; - my $project = $dir; - $project =~ s,/([^/]+)$,/$1/$1.pro,; - my $module_version = fileContents($project); - $module_version = $qt_version unless ($module_version =~ s,.*^VERSION[ \t]*=[ \t]*(\S+).*,$1,sm); - my $pathtoheaders = ""; $pathtoheaders = $moduleheaders{$lib} if ($moduleheaders{$lib}); @@ -885,6 +885,7 @@ CFG_KMS=auto CFG_LIBUDEV=auto CFG_OBSOLETE_WAYLAND=no CFG_EVDEV=auto +CFG_TSLIB=no CFG_NIS=auto CFG_CUPS=auto CFG_ICONV=auto @@ -1196,18 +1197,10 @@ while [ "$#" -gt 0 ]; do VAL=`echo $1 | sed 's,-R,,'` fi ;; - -largefile) - VAR="largefile" - VAL="yes" - ;; - -l?*|-l) + -l) # -lfoo is handled differently VAR="add_link" - if [ "$1" = "-l" ]; then - shift - VAL="$1" - else - VAL=`echo $1 | sed 's,-l,,'` - fi + shift + VAL="$1" ;; -F?*|-F) VAR="add_fpath" @@ -1218,14 +1211,10 @@ while [ "$#" -gt 0 ]; do VAL=`echo $1 | sed 's,-F,,'` fi ;; - -fw?*|-fw) + -fw) # -fwfoo is handled differently VAR="add_framework" - if [ "$1" = "-fw" ]; then - shift - VAL="$1" - else - VAL=`echo $1 | sed 's,-fw,,'` - fi + shift + VAL="$1" ;; -W*) VAR="add_warn" @@ -1504,7 +1493,7 @@ while [ "$#" -gt 0 ]; do device-option) DEV_VAR=`echo $VAL | sed "s,^\(.*\)=.*,\1,"` DEV_VAL=`echo $VAL | sed "s,^.*=\(.*\),\1,"` - DeviceVar set $DEV_VAR $DEV_VAL + DeviceVar set $DEV_VAR "$DEV_VAL" ;; qpa) QT_QPA_DEFAULT_PLATFORM="$VAL" @@ -1879,6 +1868,13 @@ while [ "$#" -gt 0 ]; do UNKNOWN_OPT=yes fi ;; + tslib) + if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then + CFG_TSLIB="$VAL" + else + UNKNOWN_OPT=yes + fi + ;; cups) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then CFG_CUPS="$VAL" @@ -2240,6 +2236,16 @@ while [ "$#" -gt 0 ]; do android-toolchain-version) CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION="$VAL" ;; + l*) # -lfoo + L_FLAGS="$L_FLAGS -l\"${VAR#l}\"" + ;; + fw*) # -fwfoo + if [ "$BUILD_ON_MAC" = "yes" ]; then + L_FLAGS="$L_FLAGS -framework \"${VAR#fw}\"" + else + UNKNOWN_OPT=yes + fi + ;; *) UNKNOWN_OPT=yes ;; @@ -2351,7 +2357,7 @@ if [ "$OPT_SHADOW" = "yes" ]; then if [ -x "$relpath/bin/syncqt" ]; then mkdir -p "$outpath/bin" echo "#!/bin/sh" >"$outpath/bin/syncqt" - echo "perl \"$relpath/bin/syncqt\" -mkspecsdir \"$outpath/mkspecs\" \"\$@\"" >>"$outpath/bin/syncqt" + echo "perl \"$relpath/bin/syncqt\" \"\$@\"" >>"$outpath/bin/syncqt" chmod 755 "$outpath/bin/syncqt" fi @@ -3855,7 +3861,7 @@ setBootstrapVariable() # build qmake if true; then ###[ '!' -f "$outpath/bin/qmake" ]; - echo "Creating qmake. Please wait..." + echo "Creating qmake..." mkdir -p "$outpath/qmake" || exit # fix makefiles @@ -4000,6 +4006,8 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ]; (cd "$outpath/qmake"; "$MAKE") || exit 2 fi # Build qmake +echo "Running configuration tests..." + #------------------------------------------------------------------------------- # create a qt.conf for the Qt build tree itself #------------------------------------------------------------------------------- @@ -4162,7 +4170,12 @@ fi # Detect C++11 support if [ "$CFG_CXX11" != "no" ]; then - if compileTest common/c++11 "C++11"; then + # Configure detects compiler features based on cross compiler, so we need + # to explicitly disable C++11 on Mac to avoid breaking builds where the + # host compiler does not support it. + if [ "$PLATFORM_MAC" = "yes" ] && [ "$XPLATFORM_ANDROID" = "yes" ]; then + CFG_CXX11="no" + elif compileTest common/c++11 "C++11"; then CFG_CXX11="yes" elif [ "$CFG_CXX11" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then echo "C++11 support cannot be enabled due to functionality tests!" @@ -4626,7 +4639,7 @@ for _SQLDR in $CFG_SQL_AVAILABLE; do if [ "$CFG_SQL_sqlite" != "no" ]; then SQLITE_AUTODETECT_FAILED="no" if [ "$CFG_SQLITE" = "system" ]; then - if [ -n "$PKG_CONFIG" ]; then + if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists sqlite3 2>/dev/null; then QT_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null` QT_LFLAGS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null` else @@ -5066,6 +5079,18 @@ if [ "$CFG_EVDEV" = "no" ]; then QMakeVar add DEFINES QT_NO_EVDEV fi +if [ "$CFG_TSLIB" != "no" ]; then + if compileTest unix/tslib "tslib"; then + CFG_TSLIB=yes + QT_CONFIG="$QT_CONFIG tslib" + elif [ "$CFG_TSLIB" = "yes" ]; then + echo "The tslib functionality test failed!" + exit 1 + else + CFG_TSLIB=no + fi +fi + # Check we actually have X11 :-) if compileTest x11/xlib "XLib"; then QT_CONFIG="$QT_CONFIG xlib" @@ -5212,8 +5237,8 @@ if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "xkbcommon >= 0.2.0" 2>/dev/null QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`" QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon 2>/dev/null`" QT_CONFIG="$QT_CONFIG xkbcommon" -else - echo "WARNING: Qt requires the libxkbcommon version 0.2.0 (or higher)." +elif [ "$CFG_XCB" != "no" ]; then + echo "WARNING: XCB support enabled but libxkbcommon 0.2.0 (or higher) not found." echo "Not satisfying this requirement will disable the compose key functionality," echo "which includes text input with dead keys." QMakeVar add DEFINES QT_NO_XKBCOMMON @@ -5253,7 +5278,7 @@ elif [ "$CFG_OPENGL" = "desktop" ]; then fi if [ "$CFG_EGLFS" != "no" ]; then - if [ "$CFG_OPENGL" = "es2" ] && [ "$CFG_EVDEV" = "yes" ]; then + if [ "$CFG_OPENGL" = "es2" ] && [ "$XPLATFORM_QNX" = "no" ]; then CFG_EGLFS="$CFG_EGL" else CFG_EGLFS="no" @@ -6054,11 +6079,11 @@ if [ "$CFG_QML_DEBUG" = "no" ]; then fi case "$QMAKE_CONF_COMPILER" in -*clang++*) +*clang*) # Clang - COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -v 2>&1 | sed -n ' -/^Apple clang version /{s///; s/^\([0-9]*\)\.\([0-9]*\).*$/QT_APPLE_CLANG_MAJOR_VERSION=\1; QT_APPLE_CLANG_MINOR_VERSION=\2/;p;q;} -/^clang version /{s///; s/^\([0-9]*\)\.\([0-9]*\).*$/QT_CLANG_MAJOR_VERSION=\1; QT_CLANG_MINOR_VERSION=\2/;p;q;}'` + COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -v 2>&1 | sed -n -E ' +/^Apple (clang|LLVM) version /{s///; s/^([0-9]*)\.([0-9]*).*$/QT_APPLE_CLANG_MAJOR_VERSION=\1; QT_APPLE_CLANG_MINOR_VERSION=\2/;p;q;} +/^clang version /{s///; s/^([0-9]*)\.([0-9]*).*$/QT_CLANG_MAJOR_VERSION=\1; QT_CLANG_MINOR_VERSION=\2/;p;q;}'` eval "$COMPILER_VERSION" ;; *icpc) diff --git a/dist/changes-5.1.0 b/dist/changes-5.1.0 index c9fdba2685..d89914ce1a 100644 --- a/dist/changes-5.1.0 +++ b/dist/changes-5.1.0 @@ -123,6 +123,17 @@ Qt for Windows CE **************************************************************************** +* Tools * +**************************************************************************** + +- qmake + + * Windows: The feature of finding the highest version number of LIBS + entries is turned off by default. + It can be turned on with "CONFIG += link_highest_lib_version". + + +**************************************************************************** * Plugins * **************************************************************************** diff --git a/doc/global/qt-cpp-ignore.qdocconf b/doc/global/qt-cpp-ignore.qdocconf index 89d24152a2..6c71263bff 100644 --- a/doc/global/qt-cpp-ignore.qdocconf +++ b/doc/global/qt-cpp-ignore.qdocconf @@ -111,4 +111,5 @@ Cpp.ignoredirectives = \ Q_INTERFACES \ Q_PRIVATE_PROPERTY \ QT_FORWARD_DECLARE_CLASS \ - Q_DECLARE_HANDLE + Q_DECLARE_HANDLE \ + Q_REVISION diff --git a/examples/gui/openglwindow/main.cpp b/examples/gui/openglwindow/main.cpp index cd6dca3352..237680a889 100644 --- a/examples/gui/openglwindow/main.cpp +++ b/examples/gui/openglwindow/main.cpp @@ -80,7 +80,7 @@ int main(int argc, char **argv) QGuiApplication app(argc, argv); QSurfaceFormat format; - format.setSamples(4); + format.setSamples(16); TriangleWindow window; window.setFormat(format); @@ -136,7 +136,8 @@ void TriangleWindow::initialize() //! [5] void TriangleWindow::render() { - glViewport(0, 0, width(), height()); + const qreal retinaScale = devicePixelRatio(); + glViewport(0, 0, width() * retinaScale, height() * retinaScale); glClear(GL_COLOR_BUFFER_BIT); diff --git a/examples/gui/openglwindow/openglwindow.cpp b/examples/gui/openglwindow/openglwindow.cpp index 5b247ebf19..afebf521f3 100644 --- a/examples/gui/openglwindow/openglwindow.cpp +++ b/examples/gui/openglwindow/openglwindow.cpp @@ -99,6 +99,7 @@ bool OpenGLWindow::event(QEvent *event) { switch (event->type()) { case QEvent::UpdateRequest: + m_update_pending = false; renderNow(); return true; default: @@ -113,14 +114,6 @@ void OpenGLWindow::exposeEvent(QExposeEvent *event) if (isExposed()) renderNow(); } - -void OpenGLWindow::resizeEvent(QResizeEvent *event) -{ - Q_UNUSED(event); - - if (isExposed()) - renderNow(); -} //! [3] //! [4] @@ -129,8 +122,6 @@ void OpenGLWindow::renderNow() if (!isExposed()) return; - m_update_pending = false; - bool needsInitialize = false; if (!m_context) { diff --git a/examples/gui/openglwindow/openglwindow.h b/examples/gui/openglwindow/openglwindow.h index 21ec033261..f6b53e3b33 100644 --- a/examples/gui/openglwindow/openglwindow.h +++ b/examples/gui/openglwindow/openglwindow.h @@ -70,7 +70,6 @@ protected: bool event(QEvent *event); void exposeEvent(QExposeEvent *event); - void resizeEvent(QResizeEvent *event); private: bool m_update_pending; diff --git a/mkspecs/aix-g++-64/qmake.conf b/mkspecs/aix-g++-64/qmake.conf index 2aa7d9fb1d..25acf04eda 100644 --- a/mkspecs/aix-g++-64/qmake.conf +++ b/mkspecs/aix-g++-64/qmake.conf @@ -2,65 +2,65 @@ # qmake configuration for aix-g++-64 # -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = aix +MAKEFILE_GENERATOR = UNIX +QMAKE_PLATFORM = aix -QMAKE_COMPILER = gcc +QMAKE_COMPILER = gcc -QMAKE_CC = gcc -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -maix64 -QMAKE_CFLAGS_DEPS = -M -QMAKE_CFLAGS_WARN_ON = -Wall -W -QMAKE_CFLAGS_WARN_OFF = -w -QMAKE_CFLAGS_RELEASE = -O2 -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_SHLIB = -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses -QMAKE_CFLAGS_THREAD = -D_THREAD_SAFE +QMAKE_CC = gcc +QMAKE_LEX = flex +QMAKE_LEXFLAGS = +QMAKE_YACC = yacc +QMAKE_YACCFLAGS = -d +QMAKE_CFLAGS = -maix64 +QMAKE_CFLAGS_DEPS = -M +QMAKE_CFLAGS_WARN_ON = -Wall -W +QMAKE_CFLAGS_WARN_OFF = -w +QMAKE_CFLAGS_RELEASE = -O2 +QMAKE_CFLAGS_DEBUG = -g +QMAKE_CFLAGS_SHLIB = +QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses +QMAKE_CFLAGS_THREAD = -D_THREAD_SAFE -QMAKE_CXX = g++ -QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS -QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CXX = g++ +QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS +QMAKE_CXXFLAGS = $$QMAKE_CFLAGS +QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON +QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF +QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD +QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC +QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD -QMAKE_INCDIR = -QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = /usr/X11R6/include -QMAKE_LIBDIR_X11 = /usr/X11R6/lib -QMAKE_INCDIR_OPENGL = /usr/X11R6/include -QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib +QMAKE_INCDIR = +QMAKE_LIBDIR = +QMAKE_INCDIR_X11 = /usr/X11R6/include +QMAKE_LIBDIR_X11 = /usr/X11R6/lib +QMAKE_INCDIR_OPENGL = /usr/X11R6/include +QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib -QMAKE_LINK = g++ -QMAKE_LINK_SHLIB = g++ -QMAKE_LINK_C = gcc -QMAKE_LINK_C_SHLIB = gcc -QMAKE_LFLAGS = -maix64 -QMAKE_LFLAGS_RELEASE = -QMAKE_LFLAGS_DEBUG = -QMAKE_LFLAGS_SHLIB = -shared -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME = -QMAKE_LFLAGS_THREAD = -L/usr/lib/threads -QMAKE_LFLAGS_NOUNDEF = -QMAKE_AIX_SHLIB = 1 +QMAKE_LINK = g++ +QMAKE_LINK_SHLIB = g++ +QMAKE_LINK_C = gcc +QMAKE_LINK_C_SHLIB = gcc +QMAKE_LFLAGS = -maix64 +QMAKE_LFLAGS_RELEASE = +QMAKE_LFLAGS_DEBUG = +QMAKE_LFLAGS_SHLIB = -shared +QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB +QMAKE_LFLAGS_SONAME = +QMAKE_LFLAGS_THREAD = -L/usr/lib/threads +QMAKE_LFLAGS_NOUNDEF = +QMAKE_AIX_SHLIB = 1 -QMAKE_LIBS = -QMAKE_LIBS_DYNLOAD = -ldl -QMAKE_LIBS_X11 = -lXext -lX11 -lm -QMAKE_LIBS_OPENGL = -lGL -QMAKE_LIBS_THREAD = -lpthreads +QMAKE_LIBS = +QMAKE_LIBS_DYNLOAD = -ldl +QMAKE_LIBS_X11 = -lXext -lX11 -lm +QMAKE_LIBS_OPENGL = -lGL +QMAKE_LIBS_THREAD = -lpthreads QMAKE_AR = ar -X64 cq QMAKE_OBJCOPY = objcopy diff --git a/mkspecs/aix-g++/qmake.conf b/mkspecs/aix-g++/qmake.conf index 04a186aef8..94dbbd12ef 100644 --- a/mkspecs/aix-g++/qmake.conf +++ b/mkspecs/aix-g++/qmake.conf @@ -2,69 +2,69 @@ # qmake configuration for aix-g++ # -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = aix +MAKEFILE_GENERATOR = UNIX +QMAKE_PLATFORM = aix -QMAKE_COMPILER = gcc +QMAKE_COMPILER = gcc -QMAKE_CC = gcc -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -mpowerpc -QMAKE_CFLAGS_DEPS = -M -QMAKE_CFLAGS_WARN_ON = -Wall -W -QMAKE_CFLAGS_WARN_OFF = -w -QMAKE_CFLAGS_RELEASE = -O2 -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_SHLIB = -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses -QMAKE_CFLAGS_THREAD = -D_THREAD_SAFE +QMAKE_CC = gcc +QMAKE_LEX = flex +QMAKE_LEXFLAGS = +QMAKE_YACC = yacc +QMAKE_YACCFLAGS = -d +QMAKE_CFLAGS = -mpowerpc +QMAKE_CFLAGS_DEPS = -M +QMAKE_CFLAGS_WARN_ON = -Wall -W +QMAKE_CFLAGS_WARN_OFF = -w +QMAKE_CFLAGS_RELEASE = -O2 +QMAKE_CFLAGS_DEBUG = -g +QMAKE_CFLAGS_SHLIB = +QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses +QMAKE_CFLAGS_THREAD = -D_THREAD_SAFE -QMAKE_CXX = g++ -QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS -QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CXX = g++ +QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS +QMAKE_CXXFLAGS = $$QMAKE_CFLAGS +QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON +QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF +QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD +QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC +QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD -QMAKE_INCDIR = -QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = /usr/X11R6/include -QMAKE_LIBDIR_X11 = /usr/X11R6/lib -QMAKE_INCDIR_OPENGL = /usr/X11R6/include -QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib +QMAKE_INCDIR = +QMAKE_LIBDIR = +QMAKE_INCDIR_X11 = /usr/X11R6/include +QMAKE_LIBDIR_X11 = /usr/X11R6/lib +QMAKE_INCDIR_OPENGL = /usr/X11R6/include +QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib -QMAKE_LINK = g++ -QMAKE_LINK_SHLIB = g++ -QMAKE_LINK_C = gcc -QMAKE_LINK_C_SHLIB = gcc -QMAKE_LFLAGS = -QMAKE_LFLAGS_RELEASE = -QMAKE_LFLAGS_DEBUG = -QMAKE_LFLAGS_SHLIB = -shared -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME = -QMAKE_LFLAGS_THREAD = -L/usr/lib/threads -QMAKE_LFLAGS_NOUNDEF = -QMAKE_AIX_SHLIB = 1 +QMAKE_LINK = g++ +QMAKE_LINK_SHLIB = g++ +QMAKE_LINK_C = gcc +QMAKE_LINK_C_SHLIB = gcc +QMAKE_LFLAGS = +QMAKE_LFLAGS_RELEASE = +QMAKE_LFLAGS_DEBUG = +QMAKE_LFLAGS_SHLIB = -shared +QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB +QMAKE_LFLAGS_SONAME = +QMAKE_LFLAGS_THREAD = -L/usr/lib/threads +QMAKE_LFLAGS_NOUNDEF = +QMAKE_AIX_SHLIB = 1 -QMAKE_LIBS = -QMAKE_LIBS_DYNLOAD = -ldl -QMAKE_LIBS_X11 = -lXext -lX11 -lm -QMAKE_LIBS_OPENGL = -lGL -QMAKE_LIBS_THREAD = -lpthreads +QMAKE_LIBS = +QMAKE_LIBS_DYNLOAD = -ldl +QMAKE_LIBS_X11 = -lXext -lX11 -lm +QMAKE_LIBS_OPENGL = -lGL +QMAKE_LIBS_THREAD = -lpthreads -QMAKE_AR = ar cqs +QMAKE_AR = ar cqs QMAKE_OBJCOPY = objcopy -QMAKE_RANLIB = +QMAKE_RANLIB = include(../common/unix.conf) load(qt_config) diff --git a/mkspecs/aix-xlc-64/qmake.conf b/mkspecs/aix-xlc-64/qmake.conf index 71a8c8327b..d4b9718d74 100644 --- a/mkspecs/aix-xlc-64/qmake.conf +++ b/mkspecs/aix-xlc-64/qmake.conf @@ -2,68 +2,68 @@ # qmake configuration for aix-xlc # -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = aix +MAKEFILE_GENERATOR = UNIX +QMAKE_PLATFORM = aix -QMAKE_COMPILER = ibm_xlc +QMAKE_COMPILER = ibm_xlc -QMAKE_CC = xlc -QMAKE_CC_THREAD = xlc_r -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -qstrict -q64 +QMAKE_CC = xlc +QMAKE_CC_THREAD = xlc_r +QMAKE_LEX = flex +QMAKE_LEXFLAGS = +QMAKE_YACC = yacc +QMAKE_YACCFLAGS = -d +QMAKE_CFLAGS = -qstrict -q64 QMAKE_CFLAGS_WARN_ON = -QMAKE_CFLAGS_WARN_OFF = -QMAKE_CFLAGS_RELEASE = -O3 -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_SHLIB = -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = +QMAKE_CFLAGS_WARN_OFF = +QMAKE_CFLAGS_RELEASE = -O3 +QMAKE_CFLAGS_DEBUG = -g +QMAKE_CFLAGS_SHLIB = +QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CFLAGS_YACC = QMAKE_CFLAGS_THREAD = -qthreaded -qtls -QMAKE_CXX = xlC -QMAKE_CXX_THREAD = xlC_r -QMAKE_CXXFLAGS = -+ $$QMAKE_CFLAGS -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CXX = xlC +QMAKE_CXX_THREAD = xlC_r +QMAKE_CXXFLAGS = -+ $$QMAKE_CFLAGS +QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON +QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF +QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD -QMAKE_COMPILER_DEFINES += __xlC__ +QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC +QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD +QMAKE_COMPILER_DEFINES += __xlC__ -QMAKE_INCDIR = -QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = -QMAKE_LIBDIR_X11 = -QMAKE_INCDIR_OPENGL = -QMAKE_LIBDIR_OPENGL = +QMAKE_INCDIR = +QMAKE_LIBDIR = +QMAKE_INCDIR_X11 = +QMAKE_LIBDIR_X11 = +QMAKE_INCDIR_OPENGL = +QMAKE_LIBDIR_OPENGL = -QMAKE_LINK = xlC -QMAKE_LINK_THREAD = xlC_r -QMAKE_LINK_SHLIB = ld -QMAKE_LFLAGS = -q64 -bbigtoc -QMAKE_LFLAGS_RELEASE = -QMAKE_LFLAGS_DEBUG = -QMAKE_LFLAGS_SHLIB = -qmkshrobj -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME = -QMAKE_LFLAGS_THREAD = -L/usr/lib/threads -QMAKE_AIX_SHLIB = 1 +QMAKE_LINK = xlC +QMAKE_LINK_THREAD = xlC_r +QMAKE_LINK_SHLIB = ld +QMAKE_LFLAGS = -q64 -bbigtoc +QMAKE_LFLAGS_RELEASE = +QMAKE_LFLAGS_DEBUG = +QMAKE_LFLAGS_SHLIB = -qmkshrobj +QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB +QMAKE_LFLAGS_SONAME = +QMAKE_LFLAGS_THREAD = -L/usr/lib/threads +QMAKE_AIX_SHLIB = 1 -QMAKE_LIBS = -QMAKE_LIBS_DYNLOAD = -ldl -QMAKE_LIBS_X11 = -lXext -lX11 -lm -QMAKE_LIBS_OPENGL = -lGL -QMAKE_LIBS_THREAD = -lpthreads +QMAKE_LIBS = +QMAKE_LIBS_DYNLOAD = -ldl +QMAKE_LIBS_X11 = -lXext -lX11 -lm +QMAKE_LIBS_OPENGL = -lGL +QMAKE_LIBS_THREAD = -lpthreads -QMAKE_AR = ar -X64 cq +QMAKE_AR = ar -X64 cq QMAKE_OBJCOPY = objcopy -QMAKE_RANLIB = ranlib -X64 +QMAKE_RANLIB = ranlib -X64 include(../common/unix.conf) load(qt_config) diff --git a/mkspecs/aix-xlc/qmake.conf b/mkspecs/aix-xlc/qmake.conf index e0d3284462..adcac80ea1 100644 --- a/mkspecs/aix-xlc/qmake.conf +++ b/mkspecs/aix-xlc/qmake.conf @@ -2,69 +2,69 @@ # qmake configuration for aix-xlc # -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = aix +MAKEFILE_GENERATOR = UNIX +QMAKE_PLATFORM = aix -QMAKE_COMPILER = ibm_xlc +QMAKE_COMPILER = ibm_xlc -QMAKE_CC = xlc -QMAKE_CC_THREAD = xlc_r -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -qstrict -QMAKE_CFLAGS_WARN_ON = -QMAKE_CFLAGS_WARN_OFF = -QMAKE_CFLAGS_RELEASE = -O3 -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_SHLIB = -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = -QMAKE_CFLAGS_THREAD = -qthreaded -qtls +QMAKE_CC = xlc +QMAKE_CC_THREAD = xlc_r +QMAKE_LEX = flex +QMAKE_LEXFLAGS = +QMAKE_YACC = yacc +QMAKE_YACCFLAGS = -d +QMAKE_CFLAGS = -qstrict +QMAKE_CFLAGS_WARN_ON = +QMAKE_CFLAGS_WARN_OFF = +QMAKE_CFLAGS_RELEASE = -O3 +QMAKE_CFLAGS_DEBUG = -g +QMAKE_CFLAGS_SHLIB = +QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CFLAGS_YACC = +QMAKE_CFLAGS_THREAD = -qthreaded -qtls -QMAKE_CXX = xlC -QMAKE_CXX_THREAD = xlC_r -QMAKE_CXXFLAGS = -+ $$QMAKE_CFLAGS -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CXX = xlC +QMAKE_CXX_THREAD = xlC_r +QMAKE_CXXFLAGS = -+ $$QMAKE_CFLAGS +QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON +QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF +QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD -QMAKE_COMPILER_DEFINES += __xlC__ +QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC +QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD +QMAKE_COMPILER_DEFINES += __xlC__ -QMAKE_INCDIR = -QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = -QMAKE_LIBDIR_X11 = -QMAKE_INCDIR_OPENGL = -QMAKE_LIBDIR_OPENGL = +QMAKE_INCDIR = +QMAKE_LIBDIR = +QMAKE_INCDIR_X11 = +QMAKE_LIBDIR_X11 = +QMAKE_INCDIR_OPENGL = +QMAKE_LIBDIR_OPENGL = -QMAKE_LINK = xlC -QMAKE_LINK_THREAD = xlC_r -QMAKE_LINK_SHLIB = ld -QMAKE_LFLAGS = -bmaxdata:0x80000000 -QMAKE_LFLAGS_RELEASE = -QMAKE_LFLAGS_DEBUG = -QMAKE_LFLAGS_SHLIB = -qmkshrobj -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME = -QMAKE_LFLAGS_THREAD = -L/usr/lib/threads -QMAKE_LFLAGS_NOUNDEF = -QMAKE_AIX_SHLIB = 1 +QMAKE_LINK = xlC +QMAKE_LINK_THREAD = xlC_r +QMAKE_LINK_SHLIB = ld +QMAKE_LFLAGS = -bmaxdata:0x80000000 +QMAKE_LFLAGS_RELEASE = +QMAKE_LFLAGS_DEBUG = +QMAKE_LFLAGS_SHLIB = -qmkshrobj +QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB +QMAKE_LFLAGS_SONAME = +QMAKE_LFLAGS_THREAD = -L/usr/lib/threads +QMAKE_LFLAGS_NOUNDEF = +QMAKE_AIX_SHLIB = 1 -QMAKE_LIBS = -QMAKE_LIBS_DYNLOAD = -ldl -QMAKE_LIBS_X11 = -lXext -lX11 -lm -QMAKE_LIBS_OPENGL = -lGL -QMAKE_LIBS_THREAD = -lpthreads +QMAKE_LIBS = +QMAKE_LIBS_DYNLOAD = -ldl +QMAKE_LIBS_X11 = -lXext -lX11 -lm +QMAKE_LIBS_OPENGL = -lGL +QMAKE_LIBS_THREAD = -lpthreads -QMAKE_AR = ar cq +QMAKE_AR = ar cq QMAKE_OBJCOPY = objcopy -QMAKE_RANLIB = ranlib +QMAKE_RANLIB = ranlib include(../common/unix.conf) load(qt_config) diff --git a/mkspecs/android-g++/qmake.conf b/mkspecs/android-g++/qmake.conf index 4901f0b0e2..e12bb03560 100644 --- a/mkspecs/android-g++/qmake.conf +++ b/mkspecs/android-g++/qmake.conf @@ -1,10 +1,10 @@ # qmake configuration for building with android-g++ -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = android -QMAKE_COMPILER = gcc +MAKEFILE_GENERATOR = UNIX +QMAKE_PLATFORM = android +QMAKE_COMPILER = gcc -CONFIG += android_install -DEFINES += QT_NO_PRINTDIALOG +CONFIG += android_install +DEFINES += QT_NO_PRINTDIALOG include(../qdevice.pri) include(../common/linux.conf) @@ -163,9 +163,9 @@ contains(NDK_ROOT, ".*r6")|contains(NDK_ROOT, ".*r5.*") { QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB QMAKE_LFLAGS_SONAME = -QMAKE_LFLAGS_NOUNDEF = -Wl,--no-undefined -QMAKE_LFLAGS_RPATH = -Wl,-rpath= -QMAKE_LFLAGS_RPATHLINK = -Wl,-rpath-link= +QMAKE_LFLAGS_NOUNDEF = -Wl,--no-undefined +QMAKE_LFLAGS_RPATH = -Wl,-rpath= +QMAKE_LFLAGS_RPATHLINK = -Wl,-rpath-link= QMAKE_LIBS = -lgnustl_shared -lsupc++ -llog -lz -lm -ldl -lc -lgcc QMAKE_LIBS_X11 = diff --git a/mkspecs/common/armcc.conf b/mkspecs/common/armcc.conf index 443ff40db4..a52fefc106 100644 --- a/mkspecs/common/armcc.conf +++ b/mkspecs/common/armcc.conf @@ -2,41 +2,41 @@ # qmake configuration for armcc # -QMAKE_COMPILER = armcc +QMAKE_COMPILER = armcc -CONFIG += rvct_linker -QMAKE_CC = armcc -QMAKE_CFLAGS += -QMAKE_CFLAGS_DEPS += -M -QMAKE_CFLAGS_WARN_ON += -QMAKE_CFLAGS_WARN_OFF += -W -QMAKE_CFLAGS_RELEASE += -O2 -QMAKE_CFLAGS_DEBUG += -g -O0 -QMAKE_CFLAGS_HIDESYMS += --visibility_inlines_hidden +CONFIG += rvct_linker +QMAKE_CC = armcc +QMAKE_CFLAGS += +QMAKE_CFLAGS_DEPS += -M +QMAKE_CFLAGS_WARN_ON += +QMAKE_CFLAGS_WARN_OFF += -W +QMAKE_CFLAGS_RELEASE += -O2 +QMAKE_CFLAGS_DEBUG += -g -O0 +QMAKE_CFLAGS_HIDESYMS += --visibility_inlines_hidden -QMAKE_CXX = armcc -QMAKE_CXXFLAGS += $$QMAKE_CFLAGS --exceptions --exceptions_unwind -QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS -QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB +QMAKE_CXX = armcc +QMAKE_CXXFLAGS += $$QMAKE_CFLAGS --exceptions --exceptions_unwind +QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS +QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON +QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF +QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC +QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS -QMAKE_LINK = armlink -QMAKE_LINK_SHLIB = armlink -QMAKE_LINK_C = armlink -QMAKE_LINK_C_SHLIB = armlink -QMAKE_LFLAGS += -QMAKE_LFLAGS_RELEASE += -QMAKE_LFLAGS_DEBUG += -QMAKE_LFLAGS_APP += -QMAKE_LFLAGS_SHLIB += -QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_THREAD += +QMAKE_LINK = armlink +QMAKE_LINK_SHLIB = armlink +QMAKE_LINK_C = armlink +QMAKE_LINK_C_SHLIB = armlink +QMAKE_LFLAGS += +QMAKE_LFLAGS_RELEASE += +QMAKE_LFLAGS_DEBUG += +QMAKE_LFLAGS_APP += +QMAKE_LFLAGS_SHLIB += +QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB +QMAKE_LFLAGS_THREAD += QMAKE_AR = armar --create QMAKE_LIB = armar --create diff --git a/mkspecs/common/clang.conf b/mkspecs/common/clang.conf index 8c97644044..3ce04b679e 100644 --- a/mkspecs/common/clang.conf +++ b/mkspecs/common/clang.conf @@ -2,31 +2,31 @@ # Qmake configuration for Clang on Linux and Mac # -QMAKE_COMPILER = gcc clang llvm # clang pretends to be gcc +QMAKE_COMPILER = gcc clang llvm # clang pretends to be gcc -QMAKE_CC = clang -QMAKE_CXX = clang++ +QMAKE_CC = clang +QMAKE_CXX = clang++ -QMAKE_LINK = $$QMAKE_CXX -QMAKE_LINK_SHLIB = $$QMAKE_CXX +QMAKE_LINK = $$QMAKE_CXX +QMAKE_LINK_SHLIB = $$QMAKE_CXX -CONFIG += clang_pch_style -QMAKE_PCH_OUTPUT_EXT = .pch +CONFIG += clang_pch_style +QMAKE_PCH_OUTPUT_EXT = .pch QMAKE_CFLAGS_PRECOMPILE = -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} QMAKE_CFLAGS_USE_PRECOMPILE = -Xclang -include-pch -Xclang ${QMAKE_PCH_OUTPUT} QMAKE_CXXFLAGS_PRECOMPILE = -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE -QMAKE_CXXFLAGS_CXX11 = -std=c++11 -QMAKE_LFLAGS_CXX11 = +QMAKE_CXXFLAGS_CXX11 = -std=c++11 +QMAKE_LFLAGS_CXX11 = -QMAKE_CFLAGS_SSE2 += -msse2 -QMAKE_CFLAGS_SSE3 += -msse3 -QMAKE_CFLAGS_SSSE3 += -mssse3 -QMAKE_CFLAGS_SSE4_1 += -msse4.1 -QMAKE_CFLAGS_SSE4_2 += -msse4.2 -QMAKE_CFLAGS_AVX += -mavx -QMAKE_CFLAGS_AVX2 += -mavx2 -QMAKE_CFLAGS_IWMMXT += -mcpu=iwmmxt -QMAKE_CFLAGS_NEON += -mfpu=neon +QMAKE_CFLAGS_SSE2 += -msse2 +QMAKE_CFLAGS_SSE3 += -msse3 +QMAKE_CFLAGS_SSSE3 += -mssse3 +QMAKE_CFLAGS_SSE4_1 += -msse4.1 +QMAKE_CFLAGS_SSE4_2 += -msse4.2 +QMAKE_CFLAGS_AVX += -mavx +QMAKE_CFLAGS_AVX2 += -mavx2 +QMAKE_CFLAGS_IWMMXT += -mcpu=iwmmxt +QMAKE_CFLAGS_NEON += -mfpu=neon diff --git a/mkspecs/common/g++-base.conf b/mkspecs/common/g++-base.conf index 0661298b18..4d38813710 100644 --- a/mkspecs/common/g++-base.conf +++ b/mkspecs/common/g++-base.conf @@ -8,28 +8,28 @@ # you can use the manual test in tests/manual/mkspecs. # -QMAKE_COMPILER = gcc +QMAKE_COMPILER = gcc -QMAKE_CC = gcc +QMAKE_CC = gcc -QMAKE_LINK_C = $$QMAKE_CC -QMAKE_LINK_C_SHLIB = $$QMAKE_CC +QMAKE_LINK_C = $$QMAKE_CC +QMAKE_LINK_C_SHLIB = $$QMAKE_CC QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -g -QMAKE_CXX = g++ +QMAKE_CXX = g++ -QMAKE_LINK = $$QMAKE_CXX -QMAKE_LINK_SHLIB = $$QMAKE_CXX +QMAKE_LINK = $$QMAKE_CXX +QMAKE_LINK_SHLIB = $$QMAKE_CXX QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO -QMAKE_PCH_OUTPUT_EXT = .gch +QMAKE_PCH_OUTPUT_EXT = .gch QMAKE_CFLAGS_PRECOMPILE = -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} QMAKE_CFLAGS_USE_PRECOMPILE = -include ${QMAKE_PCH_OUTPUT_BASE} QMAKE_CXXFLAGS_PRECOMPILE = -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE -QMAKE_CXXFLAGS_CXX11 = -std=c++0x -QMAKE_LFLAGS_CXX11 = +QMAKE_CXXFLAGS_CXX11 = -std=c++0x +QMAKE_LFLAGS_CXX11 = diff --git a/mkspecs/common/g++-unix.conf b/mkspecs/common/g++-unix.conf index 96e301e8fa..a493cd5984 100644 --- a/mkspecs/common/g++-unix.conf +++ b/mkspecs/common/g++-unix.conf @@ -10,5 +10,5 @@ include(g++-base.conf) -QMAKE_LFLAGS_RELEASE += -Wl,-O1 -QMAKE_LFLAGS_NOUNDEF += -Wl,--no-undefined +QMAKE_LFLAGS_RELEASE += -Wl,-O1 +QMAKE_LFLAGS_NOUNDEF += -Wl,--no-undefined diff --git a/mkspecs/common/gcc-base-mac.conf b/mkspecs/common/gcc-base-mac.conf index cee129e774..fa2b5765bf 100644 --- a/mkspecs/common/gcc-base-mac.conf +++ b/mkspecs/common/gcc-base-mac.conf @@ -12,9 +12,9 @@ include(gcc-base.conf) QMAKE_COMPILER_DEFINES += __APPLE__ __GNUC__=4 -QMAKE_CFLAGS_DEBUG += -gdwarf-2 +QMAKE_CFLAGS_DEBUG += -gdwarf-2 -QMAKE_CXXFLAGS_DEBUG += -gdwarf-2 +QMAKE_CXXFLAGS_DEBUG += -gdwarf-2 QMAKE_OBJECTIVE_CFLAGS = $$QMAKE_CFLAGS QMAKE_OBJECTIVE_CFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON @@ -23,12 +23,12 @@ QMAKE_OBJECTIVE_CFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG QMAKE_OBJECTIVE_CFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE QMAKE_OBJECTIVE_CFLAGS_HIDESYMS = $$QMAKE_CXXFLAGS_HIDESYMS -QMAKE_LFLAGS += -headerpad_max_install_names +QMAKE_LFLAGS += -headerpad_max_install_names -QMAKE_LFLAGS_SHLIB += -single_module -dynamiclib -QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_INCREMENTAL += -undefined suppress -flat_namespace -QMAKE_LFLAGS_SONAME += -install_name$${LITERAL_WHITESPACE} -QMAKE_LFLAGS_VERSION += -current_version$${LITERAL_WHITESPACE} +QMAKE_LFLAGS_SHLIB += -single_module -dynamiclib +QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB +QMAKE_LFLAGS_INCREMENTAL += -undefined suppress -flat_namespace +QMAKE_LFLAGS_SONAME += -install_name$${LITERAL_WHITESPACE} +QMAKE_LFLAGS_VERSION += -current_version$${LITERAL_WHITESPACE} QMAKE_LFLAGS_COMPAT_VERSION += -compatibility_version$${LITERAL_WHITESPACE} diff --git a/mkspecs/common/gcc-base-unix.conf b/mkspecs/common/gcc-base-unix.conf index dadaecaa29..84ef88aa4f 100644 --- a/mkspecs/common/gcc-base-unix.conf +++ b/mkspecs/common/gcc-base-unix.conf @@ -10,12 +10,12 @@ include(gcc-base.conf) -QMAKE_LFLAGS_SHLIB += -shared -QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME += -Wl,-soname, -QMAKE_LFLAGS_THREAD += -QMAKE_LFLAGS_RPATH = -Wl,-rpath, -QMAKE_LFLAGS_RPATHLINK = -Wl,-rpath-link, +QMAKE_LFLAGS_SHLIB += -shared +QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB +QMAKE_LFLAGS_SONAME += -Wl,-soname, +QMAKE_LFLAGS_THREAD += +QMAKE_LFLAGS_RPATH = -Wl,-rpath, +QMAKE_LFLAGS_RPATHLINK = -Wl,-rpath-link, # -Bsymbolic-functions (ld) support QMAKE_LFLAGS_BSYMBOLIC_FUNC = -Wl,-Bsymbolic-functions diff --git a/mkspecs/common/gcc-base.conf b/mkspecs/common/gcc-base.conf index 7459be65bf..b1f2ad4979 100644 --- a/mkspecs/common/gcc-base.conf +++ b/mkspecs/common/gcc-base.conf @@ -31,17 +31,17 @@ # you can use the manual test in tests/manual/mkspecs. # -QMAKE_CFLAGS += -pipe -QMAKE_CFLAGS_DEPS += -M -QMAKE_CFLAGS_WARN_ON += -Wall -W -QMAKE_CFLAGS_WARN_OFF += -w -QMAKE_CFLAGS_RELEASE += -O2 -QMAKE_CFLAGS_DEBUG += -g -QMAKE_CFLAGS_SHLIB += -fPIC -QMAKE_CFLAGS_STATIC_LIB += -fPIC -QMAKE_CFLAGS_APP += -fPIE -QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses -QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden +QMAKE_CFLAGS += -pipe +QMAKE_CFLAGS_DEPS += -M +QMAKE_CFLAGS_WARN_ON += -Wall -W +QMAKE_CFLAGS_WARN_OFF += -w +QMAKE_CFLAGS_RELEASE += -O2 +QMAKE_CFLAGS_DEBUG += -g +QMAKE_CFLAGS_SHLIB += -fPIC +QMAKE_CFLAGS_STATIC_LIB += -fPIC +QMAKE_CFLAGS_APP += -fPIE +QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses +QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden QMAKE_CFLAGS_EXCEPTIONS_OFF += -fno-exceptions QMAKE_CXXFLAGS += $$QMAKE_CFLAGS @@ -57,18 +57,18 @@ QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden QMAKE_CXXFLAGS_EXCEPTIONS_OFF += $$QMAKE_CFLAGS_EXCEPTIONS_OFF -QMAKE_LFLAGS += -QMAKE_LFLAGS_DEBUG += -QMAKE_LFLAGS_APP += -QMAKE_LFLAGS_RELEASE += +QMAKE_LFLAGS += +QMAKE_LFLAGS_DEBUG += +QMAKE_LFLAGS_APP += +QMAKE_LFLAGS_RELEASE += QMAKE_LFLAGS_EXCEPTIONS_OFF += -QMAKE_CFLAGS_SSE2 += -msse2 -QMAKE_CFLAGS_SSE3 += -msse3 -QMAKE_CFLAGS_SSSE3 += -mssse3 -QMAKE_CFLAGS_SSE4_1 += -msse4.1 -QMAKE_CFLAGS_SSE4_2 += -msse4.2 -QMAKE_CFLAGS_AVX += -mavx -QMAKE_CFLAGS_AVX2 += -mavx2 -QMAKE_CFLAGS_IWMMXT += -mcpu=iwmmxt -QMAKE_CFLAGS_NEON += -mfpu=neon +QMAKE_CFLAGS_SSE2 += -msse2 +QMAKE_CFLAGS_SSE3 += -msse3 +QMAKE_CFLAGS_SSSE3 += -mssse3 +QMAKE_CFLAGS_SSE4_1 += -msse4.1 +QMAKE_CFLAGS_SSE4_2 += -msse4.2 +QMAKE_CFLAGS_AVX += -mavx +QMAKE_CFLAGS_AVX2 += -mavx2 +QMAKE_CFLAGS_IWMMXT += -mcpu=iwmmxt +QMAKE_CFLAGS_NEON += -mfpu=neon diff --git a/mkspecs/common/ios.conf b/mkspecs/common/ios.conf index b7d2b84ec9..67705faf44 100644 --- a/mkspecs/common/ios.conf +++ b/mkspecs/common/ios.conf @@ -2,7 +2,7 @@ # qmake common configuration for iOS # -QMAKE_PLATFORM += ios -QMAKE_MAC_SDK = iphoneos +QMAKE_PLATFORM += ios +QMAKE_MAC_SDK = iphoneos include(mac.conf) diff --git a/mkspecs/common/ios/clang.conf b/mkspecs/common/ios/clang.conf index ced937ba59..5da7e5a233 100644 --- a/mkspecs/common/ios/clang.conf +++ b/mkspecs/common/ios/clang.conf @@ -14,15 +14,15 @@ QMAKE_IOS_OBJ_CFLAGS += -Wno-arc-abi # Based on the following information, http://clang.llvm.org/doxygen/ObjCRuntime_8h_source.html, # we can conclude that it's safe to always pass the following flags -QMAKE_IOS_OBJ_CFLAGS += -fobjc-nonfragile-abi -fobjc-legacy-dispatch +QMAKE_IOS_OBJ_CFLAGS += -fobjc-nonfragile-abi -fobjc-legacy-dispatch # But these only apply to non-ARM targets !contains(QT_ARCH, arm): QMAKE_IOS_CFLAGS += -fexceptions -fasm-blocks # Clang 3.1 (and above) flags -QMAKE_IOS_CFLAGS += -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-implicit-atomic-properties -Wformat -Wno-missing-braces -Wno-unused-function -Wno-unused-label -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-sign-compare -Wpointer-sign -Wno-newline-eof -Wdeprecated-declarations -Winvalid-offsetof -Wno-conversion -QMAKE_IOS_CXXFLAGS += -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -QMAKE_IOS_OBJ_CFLAGS += -Wno-deprecated-implementations -Wprotocol -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector +QMAKE_IOS_CFLAGS += -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-implicit-atomic-properties -Wformat -Wno-missing-braces -Wno-unused-function -Wno-unused-label -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-sign-compare -Wpointer-sign -Wno-newline-eof -Wdeprecated-declarations -Winvalid-offsetof -Wno-conversion +QMAKE_IOS_CXXFLAGS += -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors +QMAKE_IOS_OBJ_CFLAGS += -Wno-deprecated-implementations -Wprotocol -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector # Warn about unsupported (later than 4.5) Xcode versions !lessThan(QMAKE_XCODE_VERSION, "4.7"): warning("The version of Xcode installed on this system is not recognised - custom compiler settings may be necessary") @@ -32,6 +32,6 @@ QMAKE_CFLAGS += $$QMAKE_IOS_CFLAGS QMAKE_CXXFLAGS += $$QMAKE_IOS_CFLAGS $$QMAKE_IOS_CXXFLAGS QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_IOS_CFLAGS $$QMAKE_IOS_CXXFLAGS $$QMAKE_IOS_OBJ_CFLAGS -QMAKE_IOS_CFLAGS = -QMAKE_IOS_CXXFLAGS = -QMAKE_IOS_OBJ_CFLAGS = +QMAKE_IOS_CFLAGS = +QMAKE_IOS_CXXFLAGS = +QMAKE_IOS_OBJ_CFLAGS = diff --git a/mkspecs/common/linux-android.conf b/mkspecs/common/linux-android.conf index a93ec68e01..363dac3a34 100644 --- a/mkspecs/common/linux-android.conf +++ b/mkspecs/common/linux-android.conf @@ -1,7 +1,7 @@ MAKEFILE_GENERATOR = UNIX QMAKE_INCREMENTAL_STYLE = sublib -QMAKE_PLATFORM += android +QMAKE_PLATFORM += android include(linux.conf) include(gcc-base-unix.conf) diff --git a/mkspecs/common/linux.conf b/mkspecs/common/linux.conf index 83096dd3da..1c46ab7c21 100644 --- a/mkspecs/common/linux.conf +++ b/mkspecs/common/linux.conf @@ -2,57 +2,57 @@ # qmake configuration for common linux # -QMAKE_PLATFORM += linux +QMAKE_PLATFORM += linux -QMAKE_CFLAGS_THREAD += -D_REENTRANT -QMAKE_CXXFLAGS_THREAD += $$QMAKE_CFLAGS_THREAD +QMAKE_CFLAGS_THREAD += -D_REENTRANT +QMAKE_CXXFLAGS_THREAD += $$QMAKE_CFLAGS_THREAD -QMAKE_INCDIR = -QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = -QMAKE_LIBDIR_X11 = -QMAKE_INCDIR_OPENGL = -QMAKE_LIBDIR_OPENGL = +QMAKE_INCDIR = +QMAKE_LIBDIR = +QMAKE_INCDIR_X11 = +QMAKE_LIBDIR_X11 = +QMAKE_INCDIR_OPENGL = +QMAKE_LIBDIR_OPENGL = QMAKE_INCDIR_OPENGL_ES1 = $$QMAKE_INCDIR_OPENGL QMAKE_LIBDIR_OPENGL_ES1 = $$QMAKE_LIBDIR_OPENGL QMAKE_INCDIR_OPENGL_ES2 = $$QMAKE_INCDIR_OPENGL QMAKE_LIBDIR_OPENGL_ES2 = $$QMAKE_LIBDIR_OPENGL -QMAKE_INCDIR_EGL = -QMAKE_LIBDIR_EGL = -QMAKE_INCDIR_OPENVG = -QMAKE_LIBDIR_OPENVG = - -QMAKE_LIBS = -QMAKE_LIBS_DYNLOAD = -ldl -QMAKE_LIBS_X11 = -lXext -lX11 -lm -QMAKE_LIBS_NIS = -lnsl -QMAKE_LIBS_EGL = -lEGL -QMAKE_LIBS_OPENGL = -lGL -QMAKE_LIBS_OPENGL_ES1 = -lGLESv1_CM -QMAKE_LIBS_OPENGL_ES2 = -lGLESv2 -QMAKE_LIBS_OPENVG = -lOpenVG -QMAKE_LIBS_THREAD = -lpthread -QMAKE_LIBS_LIBUDEV = -ludev - -QMAKE_CFLAGS_WAYLAND = -QMAKE_INCDIR_WAYLAND = +QMAKE_INCDIR_EGL = +QMAKE_LIBDIR_EGL = +QMAKE_INCDIR_OPENVG = +QMAKE_LIBDIR_OPENVG = + +QMAKE_LIBS = +QMAKE_LIBS_DYNLOAD = -ldl +QMAKE_LIBS_X11 = -lXext -lX11 -lm +QMAKE_LIBS_NIS = -lnsl +QMAKE_LIBS_EGL = -lEGL +QMAKE_LIBS_OPENGL = -lGL +QMAKE_LIBS_OPENGL_ES1 = -lGLESv1_CM +QMAKE_LIBS_OPENGL_ES2 = -lGLESv2 +QMAKE_LIBS_OPENVG = -lOpenVG +QMAKE_LIBS_THREAD = -lpthread +QMAKE_LIBS_LIBUDEV = -ludev + +QMAKE_CFLAGS_WAYLAND = +QMAKE_INCDIR_WAYLAND = QMAKE_LIBS_WAYLAND_CLIENT = -lwayland-client QMAKE_LIBS_WAYLAND_SERVER = -lwayland-server -QMAKE_LIBDIR_WAYLAND = -QMAKE_DEFINES_WAYLAND = -QMAKE_WAYLAND_SCANNER = wayland-scanner - -QMAKE_CFLAGS_XCB = -QMAKE_LIBS_XCB = -QMAKE_DEFINES_XCB = - -QMAKE_AR = ar cqs -QMAKE_OBJCOPY = objcopy -QMAKE_RANLIB = - -QMAKE_STRIP = strip -QMAKE_STRIPFLAGS_LIB += --strip-unneeded -QMAKE_INSTALL_FILE = install -m 644 -p -QMAKE_INSTALL_PROGRAM = install -m 755 -p +QMAKE_LIBDIR_WAYLAND = +QMAKE_DEFINES_WAYLAND = +QMAKE_WAYLAND_SCANNER = wayland-scanner + +QMAKE_CFLAGS_XCB = +QMAKE_LIBS_XCB = +QMAKE_DEFINES_XCB = + +QMAKE_AR = ar cqs +QMAKE_OBJCOPY = objcopy +QMAKE_RANLIB = + +QMAKE_STRIP = strip +QMAKE_STRIPFLAGS_LIB += --strip-unneeded +QMAKE_INSTALL_FILE = install -m 644 -p +QMAKE_INSTALL_PROGRAM = install -m 755 -p include(unix.conf) diff --git a/mkspecs/common/llvm.conf b/mkspecs/common/llvm.conf index 7d0622de59..8f6946f9a2 100644 --- a/mkspecs/common/llvm.conf +++ b/mkspecs/common/llvm.conf @@ -2,17 +2,17 @@ # Qmake configuration for LLVM on Linux and Mac # -QMAKE_COMPILER = gcc llvm +QMAKE_COMPILER = gcc llvm -QMAKE_CC = llvm-gcc -QMAKE_CXX = llvm-g++ +QMAKE_CC = llvm-gcc +QMAKE_CXX = llvm-g++ -QMAKE_LINK = $$QMAKE_CXX -QMAKE_LINK_SHLIB = $$QMAKE_CXX +QMAKE_LINK = $$QMAKE_CXX +QMAKE_LINK_SHLIB = $$QMAKE_CXX -QMAKE_PCH_OUTPUT_EXT = .gch +QMAKE_PCH_OUTPUT_EXT = .gch QMAKE_CFLAGS_PRECOMPILE = -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} QMAKE_CFLAGS_USE_PRECOMPILE = -include ${QMAKE_PCH_OUTPUT_BASE} QMAKE_CXXFLAGS_PRECOMPILE = -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} -QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
\ No newline at end of file +QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE diff --git a/mkspecs/common/mac.conf b/mkspecs/common/mac.conf index 5d7cb1a91b..cf54f3f580 100644 --- a/mkspecs/common/mac.conf +++ b/mkspecs/common/mac.conf @@ -4,26 +4,26 @@ !load(device_config): error(Could not successfully load device configuration) -QMAKE_PLATFORM += mac +QMAKE_PLATFORM += mac QMAKE_RESOURCE = /Developer/Tools/Rez QMAKE_EXTENSION_SHLIB = dylib QMAKE_LIBDIR = # sdk.prf will prefix the proper SDK sysroot -QMAKE_INCDIR_OPENGL = \ +QMAKE_INCDIR_OPENGL = \ /System/Library/Frameworks/OpenGL.framework/Headers \ /System/Library/Frameworks/AGL.framework/Headers/ QMAKE_FIX_RPATH = install_name_tool -id -QMAKE_LFLAGS_RPATH = +QMAKE_LFLAGS_RPATH = -QMAKE_LIBS_DYNLOAD = -QMAKE_LIBS_OPENGL = -framework OpenGL -framework AGL -QMAKE_LIBS_THREAD = +QMAKE_LIBS_DYNLOAD = +QMAKE_LIBS_OPENGL = -framework OpenGL -framework AGL +QMAKE_LIBS_THREAD = -QMAKE_AR = ar cq -QMAKE_RANLIB = ranlib -s +QMAKE_AR = ar cq +QMAKE_RANLIB = ranlib -s include(unix.conf) diff --git a/mkspecs/common/macx.conf b/mkspecs/common/macx.conf index eb39d1cf8d..7f9f54ec12 100644 --- a/mkspecs/common/macx.conf +++ b/mkspecs/common/macx.conf @@ -2,7 +2,7 @@ # qmake configuration for common Mac OS X # -QMAKE_PLATFORM += macx -QMAKE_MAC_SDK = macosx +QMAKE_PLATFORM += macx +QMAKE_MAC_SDK = macosx include(mac.conf) diff --git a/mkspecs/common/nacl/nacl-base.conf b/mkspecs/common/nacl/nacl-base.conf index 20a0f7507e..d94c5c96d7 100644 --- a/mkspecs/common/nacl/nacl-base.conf +++ b/mkspecs/common/nacl/nacl-base.conf @@ -1,11 +1,11 @@ -QMAKE_PLATFORM = nacl $$QMAKE_PLATFORM +QMAKE_PLATFORM = nacl $$QMAKE_PLATFORM # Work around linker crash when using PIC. We are building # statically so this is safe. QMAKE_CFLAGS_STATIC_LIB -= -fPIC -QMAKE_CFLAGS_SHLIB -= -fPIC +QMAKE_CFLAGS_SHLIB -= -fPIC QMAKE_CXXFLAGS_STATIC_LIB -= -fPIC -QMAKE_CXXFLAGS_SHLIB -= -fPIC +QMAKE_CXXFLAGS_SHLIB -= -fPIC -QMAKE_LIBS_DYNLOAD -= -ldl -QMAKE_LIBS_OPENGL_ES2 = -lppapi_gles2 +QMAKE_LIBS_DYNLOAD -= -ldl +QMAKE_LIBS_OPENGL_ES2 = -lppapi_gles2 diff --git a/mkspecs/common/qcc-base-qnx.conf b/mkspecs/common/qcc-base-qnx.conf index b1bae7122d..d28fe1fc63 100644 --- a/mkspecs/common/qcc-base-qnx.conf +++ b/mkspecs/common/qcc-base-qnx.conf @@ -4,17 +4,17 @@ include(qcc-base.conf) -CONFIG += qnx +CONFIG += qnx #Choose qnx QPA Plugin as default QT_QPA_DEFAULT_PLATFORM = qnx -QMAKE_LFLAGS_SHLIB += -shared -QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME += -Wl,-soname, -QMAKE_LFLAGS_THREAD += -QMAKE_LFLAGS_RPATH = -Wl,-rpath, -QMAKE_LFLAGS_RPATHLINK = -Wl,-rpath-link, +QMAKE_LFLAGS_SHLIB += -shared +QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB +QMAKE_LFLAGS_SONAME += -Wl,-soname, +QMAKE_LFLAGS_THREAD += +QMAKE_LFLAGS_RPATH = -Wl,-rpath, +QMAKE_LFLAGS_RPATHLINK = -Wl,-rpath-link, # -Bsymbolic-functions (ld) support QMAKE_LFLAGS_BSYMBOLIC_FUNC = -Wl,-Bsymbolic-functions @@ -23,7 +23,7 @@ QMAKE_LFLAGS_DYNAMIC_LIST = -Wl,--dynamic-list, # Generic options for all BlackBerry/QNX qcc mkspecs QMAKE_CFLAGS_THREAD = -D_REENTRANT QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD -QMAKE_COMPILER_DEFINES += __QNXNTO__ +QMAKE_COMPILER_DEFINES += __QNXNTO__ QMAKE_LIBS = -lm QMAKE_LIBS_NETWORK = -lsocket @@ -37,9 +37,8 @@ QMAKE_LIBS_EGL = -lEGL # against the NDK's target directory which is referenced by the QNX_TARGET environment # variable, and which is guaranteed by the NDK to be set. QNX_DIR = $$(QNX_TARGET) - isEmpty(QNX_DIR) { - error(QNX_TARGET environment variable not set) + error("QNX_TARGET environment variable not set") } QMAKE_INCDIR = $${QNX_DIR}/usr/include $${QNX_DIR}/usr/include/freetype2 @@ -54,7 +53,7 @@ QMAKE_LINK_C_SHLIB = $$QMAKE_CC QMAKE_LINK = $$QMAKE_CXX QMAKE_LINK_SHLIB = $$QMAKE_CXX -QMAKE_STRIPFLAGS_LIB += --strip-unneeded +QMAKE_STRIPFLAGS_LIB += --strip-unneeded equals(QMAKE_HOST.os, Windows) { isEmpty(QMAKE_SH): error("This mkspec requires an MSYS environment.") diff --git a/mkspecs/common/qcc-base.conf b/mkspecs/common/qcc-base.conf index 76d3d1362f..32645e539a 100644 --- a/mkspecs/common/qcc-base.conf +++ b/mkspecs/common/qcc-base.conf @@ -9,44 +9,44 @@ # 2) -Wno-psabi is added to silence harmless warnings about va_list mangling # -QMAKE_COMPILER = rim_qcc gcc # qcc is mostly gcc in disguise +QMAKE_COMPILER = rim_qcc gcc # qcc is mostly gcc in disguise -QMAKE_CFLAGS += -Wno-psabi -QMAKE_CFLAGS_DEPS += -M -QMAKE_CFLAGS_WARN_ON += -Wall -W -QMAKE_CFLAGS_WARN_OFF += -w -QMAKE_CFLAGS_RELEASE += -O2 -QMAKE_CFLAGS_DEBUG += -g -QMAKE_CFLAGS_SHLIB += -fPIC -shared -QMAKE_CFLAGS_STATIC_LIB += -fPIC -QMAKE_CFLAGS_APP += -fPIE -QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses -QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden -QMAKE_CFLAGS_SSE2 += -msse2 -QMAKE_CFLAGS_SSE3 += -msse3 -QMAKE_CFLAGS_SSSE3 += -mssse3 -QMAKE_CFLAGS_SSE4_1 += -msse4.1 -QMAKE_CFLAGS_SSE4_2 += -msse4.2 -QMAKE_CFLAGS_AVX += -mavx -QMAKE_CFLAGS_AVX2 += -mavx2 -QMAKE_CFLAGS_IWMMXT += -mcpu=iwmmxt -QMAKE_CFLAGS_NEON += -mfpu=neon +QMAKE_CFLAGS += -Wno-psabi +QMAKE_CFLAGS_DEPS += -M +QMAKE_CFLAGS_WARN_ON += -Wall -W +QMAKE_CFLAGS_WARN_OFF += -w +QMAKE_CFLAGS_RELEASE += -O2 +QMAKE_CFLAGS_DEBUG += -g +QMAKE_CFLAGS_SHLIB += -fPIC -shared +QMAKE_CFLAGS_STATIC_LIB += -fPIC +QMAKE_CFLAGS_APP += -fPIE +QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses +QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden +QMAKE_CFLAGS_SSE2 += -msse2 +QMAKE_CFLAGS_SSE3 += -msse3 +QMAKE_CFLAGS_SSSE3 += -mssse3 +QMAKE_CFLAGS_SSE4_1 += -msse4.1 +QMAKE_CFLAGS_SSE4_2 += -msse4.2 +QMAKE_CFLAGS_AVX += -mavx +QMAKE_CFLAGS_AVX2 += -mavx2 +QMAKE_CFLAGS_IWMMXT += -mcpu=iwmmxt +QMAKE_CFLAGS_NEON += -mfpu=neon -QMAKE_CXXFLAGS += $$QMAKE_CFLAGS -lang-c++ -QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS -QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB +QMAKE_CXXFLAGS += $$QMAKE_CFLAGS -lang-c++ +QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS +QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON +QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF +QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_APP += $$QMAKE_CFLAGS_APP -QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden +QMAKE_CXXFLAGS_APP += $$QMAKE_CFLAGS_APP +QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC +QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden QMAKE_CFLAGS_PRECOMPILE = -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} QMAKE_CFLAGS_USE_PRECOMPILE = -Wc,-include -Wc,${QMAKE_PCH_OUTPUT_BASE} QMAKE_CXXFLAGS_PRECOMPILE = -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE -QMAKE_LFLAGS += -lang-c++ +QMAKE_LFLAGS += -lang-c++ diff --git a/mkspecs/common/shell-unix.conf b/mkspecs/common/shell-unix.conf index 17c3612fdc..a533e77cb5 100644 --- a/mkspecs/common/shell-unix.conf +++ b/mkspecs/common/shell-unix.conf @@ -1,14 +1,14 @@ -QMAKE_TAR = tar -cf -QMAKE_GZIP = gzip -9f +QMAKE_TAR = tar -cf +QMAKE_GZIP = gzip -9f -QMAKE_COPY = cp -f -QMAKE_COPY_FILE = $$QMAKE_COPY -QMAKE_COPY_DIR = $$QMAKE_COPY -R -QMAKE_MOVE = mv -f -QMAKE_DEL_FILE = rm -f -QMAKE_DEL_DIR = rmdir -QMAKE_CHK_DIR_EXISTS = test -d -QMAKE_CHK_FILE_EXISTS = test -f -QMAKE_CHK_EXISTS_GLUE = "|| " -QMAKE_MKDIR = mkdir -p -QMAKE_STREAM_EDITOR = sed +QMAKE_COPY = cp -f +QMAKE_COPY_FILE = $$QMAKE_COPY +QMAKE_COPY_DIR = $$QMAKE_COPY -R +QMAKE_MOVE = mv -f +QMAKE_DEL_FILE = rm -f +QMAKE_DEL_DIR = rmdir +QMAKE_CHK_EXISTS = test -e %1 || +QMAKE_CHK_DIR_EXISTS = test -d # legacy +QMAKE_MKDIR = mkdir -p # legacy +QMAKE_MKDIR_CMD = test -d %1 || mkdir -p %1 +QMAKE_STREAM_EDITOR = sed diff --git a/mkspecs/common/shell-win32.conf b/mkspecs/common/shell-win32.conf index 826e87e34f..a4b813cf7d 100644 --- a/mkspecs/common/shell-win32.conf +++ b/mkspecs/common/shell-win32.conf @@ -1,14 +1,14 @@ -QMAKE_ZIP = zip -r -9 +QMAKE_ZIP = zip -r -9 -QMAKE_COPY = copy /y -QMAKE_COPY_DIR = xcopy /s /q /y /i -QMAKE_MOVE = move -QMAKE_DEL_FILE = del -QMAKE_DEL_DIR = rmdir -QMAKE_CHK_DIR_EXISTS = if not exist -QMAKE_CHK_FILE_EXISTS = if not exist -QMAKE_CHK_EXISTS_GLUE = -QMAKE_MKDIR = mkdir +QMAKE_COPY = copy /y +QMAKE_COPY_DIR = xcopy /s /q /y /i +QMAKE_MOVE = move +QMAKE_DEL_FILE = del +QMAKE_DEL_DIR = rmdir +QMAKE_CHK_EXISTS = if not exist %1 +QMAKE_CHK_DIR_EXISTS = if not exist # legacy +QMAKE_MKDIR = mkdir # legacy +QMAKE_MKDIR_CMD = if not exist %1 mkdir %1 & if not exist %1 exit 1 # xcopy copies the contained files if source is a directory. Deal with it. -CONFIG += copy_dir_files +CONFIG += copy_dir_files diff --git a/mkspecs/common/unix.conf b/mkspecs/common/unix.conf index a8f8c57323..c0deafd141 100644 --- a/mkspecs/common/unix.conf +++ b/mkspecs/common/unix.conf @@ -2,13 +2,13 @@ # qmake configuration for common unix # -QMAKE_PLATFORM += unix posix +QMAKE_PLATFORM += unix posix -QMAKE_LEX = flex -QMAKE_LEXFLAGS += -QMAKE_YACC = yacc -QMAKE_YACCFLAGS += -d -QMAKE_YACCFLAGS_MANGLE += -p $base -b $base +QMAKE_LEX = flex +QMAKE_LEXFLAGS += +QMAKE_YACC = yacc +QMAKE_YACCFLAGS += -d +QMAKE_YACCFLAGS_MANGLE += -p $base -b $base QMAKE_YACC_HEADER = $base.tab.h QMAKE_YACC_SOURCE = $base.tab.c QMAKE_PREFIX_SHLIB = lib diff --git a/mkspecs/common/wince/qmake.conf b/mkspecs/common/wince/qmake.conf index a0ef0d0c83..b006992702 100644 --- a/mkspecs/common/wince/qmake.conf +++ b/mkspecs/common/wince/qmake.conf @@ -2,80 +2,80 @@ # qmake configuration for common Windows CE # -MAKEFILE_GENERATOR = MSVC.NET -QMAKE_PLATFORM += wince win32 -CONFIG += incremental flat precompile_header autogen_precompile_source debug_and_release debug_and_release_target +MAKEFILE_GENERATOR = MSVC.NET +QMAKE_PLATFORM += wince win32 +CONFIG += incremental flat precompile_header autogen_precompile_source debug_and_release debug_and_release_target -DEFINES += UNDER_CE WINCE _WINDOWS _UNICODE UNICODE _WIN32 QT_NO_PRINTER QT_NO_PRINTDIALOG +DEFINES += UNDER_CE WINCE _WINDOWS _UNICODE UNICODE _WIN32 QT_NO_PRINTER QT_NO_PRINTDIALOG -QMAKE_COMPILER_DEFINES += _MSC_VER=1400 +QMAKE_COMPILER_DEFINES += _MSC_VER=1400 -QMAKE_COMPILER = msvc +QMAKE_COMPILER = msvc -QMAKE_CC = cl -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = byacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -nologo -Zm200 -Zc:wchar_t- -QMAKE_CFLAGS_WARN_ON = -W3 -QMAKE_CFLAGS_WARN_OFF = -W0 +QMAKE_CC = cl +QMAKE_LEX = flex +QMAKE_LEXFLAGS = +QMAKE_YACC = byacc +QMAKE_YACCFLAGS = -d +QMAKE_CFLAGS = -nologo -Zm200 -Zc:wchar_t- +QMAKE_CFLAGS_WARN_ON = -W3 +QMAKE_CFLAGS_WARN_OFF = -W0 QMAKE_CFLAGS_RELEASE = -O2 -MD QMAKE_CFLAGS_LTCG = -GL -QMAKE_CFLAGS_DEBUG = -DDEBUG -D_DEBUG -Zi -MDd -QMAKE_CFLAGS_YACC = +QMAKE_CFLAGS_DEBUG = -DDEBUG -D_DEBUG -Zi -MDd +QMAKE_CFLAGS_YACC = # Uncomment the following lines to reduce library sizes # with potential cost of performance # QMAKE_CFLAGS += -Os # QMAKE_CFLAGS_RELEASE += -Os -QMAKE_CXX = $$QMAKE_CC -QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -w34100 -w34189 -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG +QMAKE_CXX = $$QMAKE_CC +QMAKE_CXXFLAGS = $$QMAKE_CFLAGS +QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -w34100 -w34189 +QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF +QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG QMAKE_CXXFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_STL_ON = -EHsc -QMAKE_CXXFLAGS_STL_OFF = -QMAKE_CXXFLAGS_RTTI_ON = -GR -QMAKE_CXXFLAGS_RTTI_OFF = +QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC +QMAKE_CXXFLAGS_STL_ON = -EHsc +QMAKE_CXXFLAGS_STL_OFF = +QMAKE_CXXFLAGS_RTTI_ON = -GR +QMAKE_CXXFLAGS_RTTI_OFF = QMAKE_CXXFLAGS_EXCEPTIONS_ON = -EHsc QMAKE_CXXFLAGS_EXCEPTIONS_OFF = -EHs-c- -QMAKE_INCDIR = +QMAKE_INCDIR = -QMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$obj $src -QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ $< -QMAKE_RUN_CC_IMP_BATCH = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ @<< -QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$obj $src -QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ $< -QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<< +QMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$obj $src +QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ $< +QMAKE_RUN_CC_IMP_BATCH = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ @<< +QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$obj $src +QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ $< +QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<< -QMAKE_LINK = link -QMAKE_LFLAGS = /NOLOGO /NODEFAULTLIB:OLDNAMES.LIB +QMAKE_LINK = link +QMAKE_LFLAGS = /NOLOGO /NODEFAULTLIB:OLDNAMES.LIB QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO -QMAKE_LFLAGS_DEBUG = /DEBUG +QMAKE_LFLAGS_DEBUG = /DEBUG QMAKE_LFLAGS_LTCG = /LTCG QMAKE_LIBS_NETWORK = ws2.lib QMAKE_LIBS_OPENGL = QMAKE_LIBS_COMPAT = QMAKE_LIBS_EGL = libEGL.lib -QMAKE_LIBS_OPENGL_ES1 = libGLES_CM.lib -QMAKE_LIBS_OPENGL_ES2 = libGLESv2.lib +QMAKE_LIBS_OPENGL_ES1 = libGLES_CM.lib +QMAKE_LIBS_OPENGL_ES2 = libGLESv2.lib -QMAKE_LIBS_QT_ENTRY = -lqtmain +QMAKE_LIBS_QT_ENTRY = -lqtmain -QMAKE_IDL = midl -QMAKE_LIB = lib -QMAKE_RC = rc +QMAKE_IDL = midl +QMAKE_LIB = lib +QMAKE_RC = rc include(../shell-win32.conf) -VCPROJ_EXTENSION = .vcproj -VCSOLUTION_EXTENSION = .sln -VCPROJ_KEYWORD = Qt4VSv1.0 +VCPROJ_EXTENSION = .vcproj +VCSOLUTION_EXTENSION = .sln +VCPROJ_KEYWORD = Qt4VSv1.0 load(qt_config) diff --git a/mkspecs/cygwin-g++/qmake.conf b/mkspecs/cygwin-g++/qmake.conf index fe9691cf39..a8e9d41485 100644 --- a/mkspecs/cygwin-g++/qmake.conf +++ b/mkspecs/cygwin-g++/qmake.conf @@ -4,9 +4,9 @@ # Written for Qt/X11 on Windows using Cygwin's POSIX API # -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = cygwin unix posix -CONFIG += incremental +MAKEFILE_GENERATOR = UNIX +QMAKE_PLATFORM = cygwin unix posix +CONFIG += incremental QMAKE_INCREMENTAL_STYLE = sublib QMAKE_COMPILER = gcc diff --git a/mkspecs/darwin-g++/qmake.conf b/mkspecs/darwin-g++/qmake.conf index 2e0fd0276c..21a13a3bb5 100644 --- a/mkspecs/darwin-g++/qmake.conf +++ b/mkspecs/darwin-g++/qmake.conf @@ -4,79 +4,79 @@ # Written for Qt/X11 on Darwin and XFree86 # -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = mac macx -CONFIG += native_precompiled_headers -DEFINES += __USE_WS_X11__ +MAKEFILE_GENERATOR = UNIX +QMAKE_PLATFORM = mac macx +CONFIG += native_precompiled_headers +DEFINES += __USE_WS_X11__ -QMAKE_COMPILER = gcc +QMAKE_COMPILER = gcc -QMAKE_CC = cc -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -pipe -QMAKE_CFLAGS_DEPS = -M -QMAKE_CFLAGS_WARN_ON = -Wall -W -QMAKE_CFLAGS_WARN_OFF = -w -QMAKE_CFLAGS_RELEASE = -O2 -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_SHLIB = -fPIC -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_EXTENSION_SHLIB = dylib -QMAKE_EXTENSION_PLUGIN = so -QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses -QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden -QMAKE_CFLAGS_THREAD = -QMAKE_CFLAGS_PRECOMPILE += -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} +QMAKE_CC = cc +QMAKE_LEX = flex +QMAKE_LEXFLAGS = +QMAKE_YACC = yacc +QMAKE_YACCFLAGS = -d +QMAKE_CFLAGS = -pipe +QMAKE_CFLAGS_DEPS = -M +QMAKE_CFLAGS_WARN_ON = -Wall -W +QMAKE_CFLAGS_WARN_OFF = -w +QMAKE_CFLAGS_RELEASE = -O2 +QMAKE_CFLAGS_DEBUG = -g +QMAKE_CFLAGS_SHLIB = -fPIC +QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_EXTENSION_SHLIB = dylib +QMAKE_EXTENSION_PLUGIN = so +QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses +QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden +QMAKE_CFLAGS_THREAD = +QMAKE_CFLAGS_PRECOMPILE += -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} QMAKE_CFLAGS_USE_PRECOMPILE += -include ${QMAKE_PCH_OUTPUT_BASE} -QMAKE_CXX = c++ -QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CXX = c++ +QMAKE_CXXFLAGS = $$QMAKE_CFLAGS +QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS +QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON +QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF +QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden -QMAKE_CXXFLAGS_THREAD = +QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC +QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden +QMAKE_CXXFLAGS_THREAD = -QMAKE_INCDIR = -QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = /usr/X11R6/include -QMAKE_LIBDIR_X11 = /usr/X11R6/lib -QMAKE_INCDIR_OPENGL = /usr/X11R6/include -QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib +QMAKE_INCDIR = +QMAKE_LIBDIR = +QMAKE_INCDIR_X11 = /usr/X11R6/include +QMAKE_LIBDIR_X11 = /usr/X11R6/lib +QMAKE_INCDIR_OPENGL = /usr/X11R6/include +QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib -QMAKE_LINK = c++ -QMAKE_LINK_SHLIB = c++ -QMAKE_LFLAGS += -headerpad_max_install_names -QMAKE_LFLAGS = -QMAKE_LFLAGS_RELEASE = -QMAKE_LFLAGS_DEBUG = +QMAKE_LINK = c++ +QMAKE_LINK_SHLIB = c++ +QMAKE_LFLAGS += -headerpad_max_install_names +QMAKE_LFLAGS = +QMAKE_LFLAGS_RELEASE = +QMAKE_LFLAGS_DEBUG = QMAKE_LFLAGS_APP = -prebind -QMAKE_LFLAGS_SHLIB = -prebind -dynamiclib -single_module -QMAKE_LFLAGS_PLUGIN = -prebind -bundle -QMAKE_LFLAGS_THREAD = -QMAKE_LFLAGS_SONAME += -install_name$${LITERAL_WHITESPACE} +QMAKE_LFLAGS_SHLIB = -prebind -dynamiclib -single_module +QMAKE_LFLAGS_PLUGIN = -prebind -bundle +QMAKE_LFLAGS_THREAD = +QMAKE_LFLAGS_SONAME += -install_name$${LITERAL_WHITESPACE} QMAKE_LFLAGS_VERSION = -current_version$${LITERAL_WHITESPACE} QMAKE_LFLAGS_COMPAT_VERSION = -compatibility_version$${LITERAL_WHITESPACE} -QMAKE_LFLAGS_RPATH = +QMAKE_LFLAGS_RPATH = -QMAKE_LIBS_DYNLOAD = -QMAKE_LIBS_X11 = -lXext -lX11 -lm -QMAKE_LIBS_OPENGL = -lGL -QMAKE_LIBS_THREAD = +QMAKE_LIBS_DYNLOAD = +QMAKE_LIBS_X11 = -lXext -lX11 -lm +QMAKE_LIBS_OPENGL = -lGL +QMAKE_LIBS_THREAD = -QMAKE_AR = ar cq +QMAKE_AR = ar cq QMAKE_OBJCOPY = objcopy -QMAKE_RANLIB = ranlib -s +QMAKE_RANLIB = ranlib -s QMAKE_PCH_OUTPUT_EXT = .gch diff --git a/mkspecs/devices/common/linux_device_pre.conf b/mkspecs/devices/common/linux_device_pre.conf index ef9280b1f6..6d80fc7e1d 100644 --- a/mkspecs/devices/common/linux_device_pre.conf +++ b/mkspecs/devices/common/linux_device_pre.conf @@ -1,7 +1,7 @@ QT_QPA_DEFAULT_PLATFORM = eglfs -MAKEFILE_GENERATOR = UNIX -CONFIG += incremental gdb_dwarf_index +MAKEFILE_GENERATOR = UNIX +CONFIG += incremental gdb_dwarf_index QMAKE_INCREMENTAL_STYLE = sublib include(../../common/linux.conf) diff --git a/mkspecs/devices/linux-archos-gen8-g++/qmake.conf b/mkspecs/devices/linux-archos-gen8-g++/qmake.conf index a480d072cc..a2c831e7fe 100644 --- a/mkspecs/devices/linux-archos-gen8-g++/qmake.conf +++ b/mkspecs/devices/linux-archos-gen8-g++/qmake.conf @@ -7,7 +7,7 @@ # http://github.com/KDAB/OpenEmbedded-Archos MAKEFILE_GENERATOR = UNIX -CONFIG += incremental gdb_dwarf_index +CONFIG += incremental gdb_dwarf_index QMAKE_INCREMENTAL_STYLE = sublib include(../../common/linux.conf) diff --git a/mkspecs/devices/linux-arm-amlogic-8726M-g++/qmake.conf b/mkspecs/devices/linux-arm-amlogic-8726M-g++/qmake.conf index afc0814907..3f884ccb88 100644 --- a/mkspecs/devices/linux-arm-amlogic-8726M-g++/qmake.conf +++ b/mkspecs/devices/linux-arm-amlogic-8726M-g++/qmake.conf @@ -2,8 +2,8 @@ # qmake configuration for linux-g++ # -MAKEFILE_GENERATOR = UNIX -CONFIG += incremental gdb_dwarf_index +MAKEFILE_GENERATOR = UNIX +CONFIG += incremental gdb_dwarf_index QMAKE_INCREMENTAL_STYLE = sublib include(../../common/linux.conf) diff --git a/mkspecs/devices/linux-arm-trident-pnx8473-g++/qmake.conf b/mkspecs/devices/linux-arm-trident-pnx8473-g++/qmake.conf index 21751453cb..3c8c78e0c7 100644 --- a/mkspecs/devices/linux-arm-trident-pnx8473-g++/qmake.conf +++ b/mkspecs/devices/linux-arm-trident-pnx8473-g++/qmake.conf @@ -5,7 +5,7 @@ # MAKEFILE_GENERATOR = UNIX -CONFIG += incremental gdb_dwarf_index +CONFIG += incremental gdb_dwarf_index QMAKE_INCREMENTAL_STYLE = sublib include(../../common/linux.conf) @@ -31,23 +31,23 @@ QMAKE_LINK_SHLIB = $${CROSS_COMPILE}g++ # # Because of this fact not using "-sysroot <sysroot path>" and hence following code is required # -QMAKE_CFLAGS += --sysroot=$${TRIDENT_SHINER_SDK_BUILDTREE}/open_source_archive/linux/toolchains/gcc-4.5.2_uclibc/ -QMAKE_CXXFLAGS += --sysroot=$${TRIDENT_SHINER_SDK_BUILDTREE}/open_source_archive/linux/toolchains/gcc-4.5.2_uclibc/ -QMAKE_LFLAGS += --sysroot=$${TRIDENT_SHINER_SDK_BUILDTREE}/open_source_archive/linux/toolchains/gcc-4.5.2_uclibc/ +QMAKE_CFLAGS += --sysroot=$${TRIDENT_SHINER_SDK_BUILDTREE}/open_source_archive/linux/toolchains/gcc-4.5.2_uclibc/ +QMAKE_CXXFLAGS += --sysroot=$${TRIDENT_SHINER_SDK_BUILDTREE}/open_source_archive/linux/toolchains/gcc-4.5.2_uclibc/ +QMAKE_LFLAGS += --sysroot=$${TRIDENT_SHINER_SDK_BUILDTREE}/open_source_archive/linux/toolchains/gcc-4.5.2_uclibc/ deviceSanityCheckCompiler() -QMAKE_CFLAGS = -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard -QMAKE_CXXFLAGS = $$QMAKE_CFLAGS +QMAKE_CFLAGS = -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard +QMAKE_CXXFLAGS = $$QMAKE_CFLAGS # modifications to linux.conf QMAKE_AR = $${CROSS_COMPILE}ar cqs QMAKE_OBJCOPY = $${CROSS_COMPILE}objcopy QMAKE_STRIP = $${CROSS_COMPILE}strip -QMAKE_INCDIR += $${TRIDENT_SHINER_SDK_BUILDTREE}/target/output/objs/$${TRIDENT_SHINER_SDK_BUILDSPEC}/comps/generic_apps/usr/include -QMAKE_LIBDIR += $${TRIDENT_SHINER_SDK_BUILDTREE}/target/output/objs/$${TRIDENT_SHINER_SDK_BUILDSPEC}/comps/generic_apps/usr/lib -QMAKE_LIBDIR += $${TRIDENT_SHINER_SDK_BUILDTREE}/target/output/objs/$${TRIDENT_SHINER_SDK_BUILDSPEC}/comps/generated/lib/armgnu_linux_el_cortex-a9 +QMAKE_INCDIR += $${TRIDENT_SHINER_SDK_BUILDTREE}/target/output/objs/$${TRIDENT_SHINER_SDK_BUILDSPEC}/comps/generic_apps/usr/include +QMAKE_LIBDIR += $${TRIDENT_SHINER_SDK_BUILDTREE}/target/output/objs/$${TRIDENT_SHINER_SDK_BUILDSPEC}/comps/generic_apps/usr/lib +QMAKE_LIBDIR += $${TRIDENT_SHINER_SDK_BUILDTREE}/target/output/objs/$${TRIDENT_SHINER_SDK_BUILDSPEC}/comps/generated/lib/armgnu_linux_el_cortex-a9 QMAKE_INCDIR_EGL = $${TRIDENT_SHINER_SDK_INCDIR_EGL_OPENGL_ES2} QMAKE_LIBDIR_EGL = $${TRIDENT_SHINER_SDK_LIBDIR_EGL_OPENGL_ES2} diff --git a/mkspecs/devices/linux-beagleboard-g++/qmake.conf b/mkspecs/devices/linux-beagleboard-g++/qmake.conf index fd5b0b3ca2..54fe994bfa 100644 --- a/mkspecs/devices/linux-beagleboard-g++/qmake.conf +++ b/mkspecs/devices/linux-beagleboard-g++/qmake.conf @@ -3,7 +3,7 @@ # http://beagleboard.org/ MAKEFILE_GENERATOR = UNIX -CONFIG += incremental gdb_dwarf_index +CONFIG += incremental gdb_dwarf_index QMAKE_INCREMENTAL_STYLE = sublib include(../../common/linux.conf) diff --git a/mkspecs/devices/linux-maemo-n9-g++/qmake.conf b/mkspecs/devices/linux-maemo-n9-g++/qmake.conf index 804de84dc7..fadeb85e8c 100644 --- a/mkspecs/devices/linux-maemo-n9-g++/qmake.conf +++ b/mkspecs/devices/linux-maemo-n9-g++/qmake.conf @@ -3,10 +3,10 @@ # http://wiki.qt-project.org/Devices/N9 MAKEFILE_GENERATOR = UNIX -CONFIG += incremental gdb_dwarf_index +CONFIG += incremental gdb_dwarf_index QMAKE_INCREMENTAL_STYLE = sublib -QMAKE_PLATFORM = maemo +QMAKE_PLATFORM = maemo include(../../common/linux.conf) include(../../common/gcc-base-unix.conf) diff --git a/mkspecs/devices/linux-mipsel-broadcom-97425-g++/qmake.conf b/mkspecs/devices/linux-mipsel-broadcom-97425-g++/qmake.conf index b23419f64b..bca69c3969 100644 --- a/mkspecs/devices/linux-mipsel-broadcom-97425-g++/qmake.conf +++ b/mkspecs/devices/linux-mipsel-broadcom-97425-g++/qmake.conf @@ -3,7 +3,7 @@ # MAKEFILE_GENERATOR = UNIX -CONFIG += incremental gdb_dwarf_index +CONFIG += incremental gdb_dwarf_index QMAKE_INCREMENTAL_STYLE = sublib include(../../common/linux.conf) @@ -47,13 +47,13 @@ QMAKE_LIBDIR_OPENGL_ES2 = $${BRCM_ROCKFORD_PATH}/middleware/v3d/lib_$${BRCM_PLAT QMAKE_LIBS_OPENGL_ES2 = -lv3ddriver -lrt QMAKE_LIBS_EGL = -INCLUDEPATH += $${BRCM_APPLIBS_PATH}/opensource/zlib/zlib-1.2.3 -QMAKE_LIBDIR += $${BRCM_APPLIBS_PATH}/opensource/zlib/zlib-1.2.3 +INCLUDEPATH += $${BRCM_APPLIBS_PATH}/opensource/zlib/zlib-1.2.3 +QMAKE_LIBDIR += $${BRCM_APPLIBS_PATH}/opensource/zlib/zlib-1.2.3 -QMAKE_LFLAGS += -Wl,-rpath-link,$$QMAKE_LIBDIR_OPENGL_ES2 -Wl,-rpath-link,$${BRCM_APPLIBS_PATH}/opensource/zlib/zlib-1.2.3 +QMAKE_LFLAGS += -Wl,-rpath-link,$$QMAKE_LIBDIR_OPENGL_ES2 -Wl,-rpath-link,$${BRCM_APPLIBS_PATH}/opensource/zlib/zlib-1.2.3 # DirectFB platform hooks for this hardware -QT_CONFIG += directfb_egl egl +QT_CONFIG += directfb_egl egl DIRECTFB_PLATFORM_HOOKS_SOURCES = $$PWD/qdirectfbeglhooks_bcm97425.cpp DIRECTFB_PLATFORM_HOOKS_INCLUDEPATH = $${BRCM_ROCKFORD_PATH}/middleware/platform/directfb DIRECTFB_PLATFORM_HOOKS_LIBS = -ldbpl diff --git a/mkspecs/devices/linux-rasp-pi-g++/qmake.conf b/mkspecs/devices/linux-rasp-pi-g++/qmake.conf index a6365d87ef..d6fea474a6 100644 --- a/mkspecs/devices/linux-rasp-pi-g++/qmake.conf +++ b/mkspecs/devices/linux-rasp-pi-g++/qmake.conf @@ -6,12 +6,14 @@ include(../common/linux_device_pre.conf) QT_QPA_DEFAULT_PLATFORM = wayland -QMAKE_LFLAGS += -Wl,-rpath-link,$$[QT_SYSROOT]/opt/vc/lib +QMAKE_LFLAGS += -Wl,-rpath-link,$$[QT_SYSROOT]/opt/vc/lib QMAKE_LIBDIR_OPENGL_ES2 = $$[QT_SYSROOT]/opt/vc/lib QMAKE_LIBDIR_EGL = $$QMAKE_LIBDIR_OPENGL_ES2 -QMAKE_INCDIR_EGL = $$[QT_SYSROOT]/opt/vc/include $$[QT_SYSROOT]/opt/vc/include/interface/vcos/pthreads +QMAKE_INCDIR_EGL = $$[QT_SYSROOT]/opt/vc/include \ + $$[QT_SYSROOT]/opt/vc/include/interface/vcos/pthreads \ + $$[QT_SYSROOT]/opt/vc/include/interface/vmcs_host/linux QMAKE_INCDIR_OPENGL_ES2 = $${QMAKE_INCDIR_EGL} QMAKE_LIBS_EGL = -lEGL -lGLESv2 @@ -28,7 +30,7 @@ contains(DISTRO, squeeze) { DISTRO_OPTS += hard-float } -QMAKE_CFLAGS += \ +QMAKE_CFLAGS += \ -marm \ -mfpu=vfp \ -mtune=arm1176jzf-s \ diff --git a/mkspecs/devices/linux-sh4-stmicro-ST7108-g++/qmake.conf b/mkspecs/devices/linux-sh4-stmicro-ST7108-g++/qmake.conf index d0cf2b8655..526716e991 100644 --- a/mkspecs/devices/linux-sh4-stmicro-ST7108-g++/qmake.conf +++ b/mkspecs/devices/linux-sh4-stmicro-ST7108-g++/qmake.conf @@ -5,7 +5,7 @@ # MAKEFILE_GENERATOR = UNIX -CONFIG += incremental gdb_dwarf_index +CONFIG += incremental gdb_dwarf_index QMAKE_INCREMENTAL_STYLE = sublib include(../../common/linux.conf) @@ -25,7 +25,7 @@ QMAKE_STRIP = $${CROSS_COMPILE}strip deviceSanityCheckCompiler() -QMAKE_LIBS_EGL += -lMali +QMAKE_LIBS_EGL += -lMali QT_QPA_DEFAULT_PLATFORM = eglfs diff --git a/mkspecs/devices/linux-sh4-stmicro-ST7540-g++/qmake.conf b/mkspecs/devices/linux-sh4-stmicro-ST7540-g++/qmake.conf index 83f54c38b6..caf9537f39 100644 --- a/mkspecs/devices/linux-sh4-stmicro-ST7540-g++/qmake.conf +++ b/mkspecs/devices/linux-sh4-stmicro-ST7540-g++/qmake.conf @@ -5,7 +5,7 @@ # MAKEFILE_GENERATOR = UNIX -CONFIG += incremental gdb_dwarf_index +CONFIG += incremental gdb_dwarf_index QMAKE_INCREMENTAL_STYLE = sublib include(../../common/linux.conf) @@ -25,18 +25,18 @@ QMAKE_STRIP = $${CROSS_COMPILE}strip deviceSanityCheckCompiler() -QMAKE_INCDIR_EGL += $$[QT_SYSROOT]/root/modules/include/ -QMAKE_LIBDIR_EGL += $$[QT_SYSROOT]/root/modules/ +QMAKE_INCDIR_EGL += $$[QT_SYSROOT]/root/modules/include/ +QMAKE_LIBDIR_EGL += $$[QT_SYSROOT]/root/modules/ # # The EGL library used for ST7540 is based on DirectFB so it has to be linked with # 1. libdirectfb.so 2. libfusion.so 3. libdirect.so # -QMAKE_LIBS_EGL += -lMali -ldirectfb -lfusion -ldirect +QMAKE_LIBS_EGL += -lMali -ldirectfb -lfusion -ldirect QMAKE_INCDIR_OPENGL_ES2 += $$QMAKE_INCDIR_EGL QMAKE_LIBDIR_OPENGL_ES2 += $$QMAKE_LIBDIR_EGL -QMAKE_LIBS_OPENGL_ES2 += $$QMAKE_LIBS_EGL +QMAKE_LIBS_OPENGL_ES2 += $$QMAKE_LIBS_EGL QT_QPA_DEFAULT_PLATFORM = eglfs diff --git a/mkspecs/devices/linux-snowball-g++/qmake.conf b/mkspecs/devices/linux-snowball-g++/qmake.conf index b0f6129aa7..f0d77fbb4a 100644 --- a/mkspecs/devices/linux-snowball-g++/qmake.conf +++ b/mkspecs/devices/linux-snowball-g++/qmake.conf @@ -2,8 +2,8 @@ # qmake configuration for ST Ericsson's Snowball # http://qt-project.org/wiki/Snowball -MAKEFILE_GENERATOR = UNIX -CONFIG += incremental gdb_dwarf_index +MAKEFILE_GENERATOR = UNIX +CONFIG += incremental gdb_dwarf_index QMAKE_INCREMENTAL_STYLE = sublib include(../../common/linux.conf) @@ -22,8 +22,8 @@ QMAKE_AR = $${CROSS_COMPILE}ar cqs QMAKE_OBJCOPY = $${CROSS_COMPILE}objcopy QMAKE_STRIP = $${CROSS_COMPILE}strip -QMAKE_LFLAGS += -Wl,-rpath-link,$$[QT_SYSROOT]/usr/lib/arm-linux-gnueabihf \ - -Wl,-rpath-link,$$[QT_SYSROOT]/lib/arm-linux-gnueabihf +QMAKE_LFLAGS += -Wl,-rpath-link,$$[QT_SYSROOT]/usr/lib/arm-linux-gnueabihf \ + -Wl,-rpath-link,$$[QT_SYSROOT]/lib/arm-linux-gnueabihf deviceSanityCheckCompiler() diff --git a/mkspecs/devices/linux-tegra2-g++/qmake.conf b/mkspecs/devices/linux-tegra2-g++/qmake.conf index c846801a10..1c7a8cc52a 100644 --- a/mkspecs/devices/linux-tegra2-g++/qmake.conf +++ b/mkspecs/devices/linux-tegra2-g++/qmake.conf @@ -12,19 +12,19 @@ include(../common/linux_device_pre.conf) -QMAKE_INCDIR += $$[QT_SYSROOT]/usr/include +QMAKE_INCDIR += $$[QT_SYSROOT]/usr/include -QMAKE_LIBDIR += $$[QT_SYSROOT]/usr/lib \ - $$[QT_SYSROOT]/lib/arm-linux-gnueabi \ - $$[QT_SYSROOT]/usr/lib/arm-linux-gnueabi +QMAKE_LIBDIR += $$[QT_SYSROOT]/usr/lib \ + $$[QT_SYSROOT]/lib/arm-linux-gnueabi \ + $$[QT_SYSROOT]/usr/lib/arm-linux-gnueabi -QMAKE_LFLAGS += -Wl,-rpath-link,$$[QT_SYSROOT]/usr/lib \ - -Wl,-rpath-link,$$[QT_SYSROOT]/usr/lib/arm-linux-gnueabi \ - -Wl,-rpath-link,$$[QT_SYSROOT]/lib/arm-linux-gnueabi +QMAKE_LFLAGS += -Wl,-rpath-link,$$[QT_SYSROOT]/usr/lib \ + -Wl,-rpath-link,$$[QT_SYSROOT]/usr/lib/arm-linux-gnueabi \ + -Wl,-rpath-link,$$[QT_SYSROOT]/lib/arm-linux-gnueabi -TEGRA2_CFLAGS = -mtune=cortex-a9 -march=armv7-a -mhard-float -mfloat-abi=softfp -mfpu=vfpv3-d16 -QMAKE_CFLAGS += $$TEGRA2_CFLAGS -QMAKE_CXXFLAGS += $$TEGRA2_CFLAGS +TEGRA2_CFLAGS = -mtune=cortex-a9 -march=armv7-a -mhard-float -mfloat-abi=softfp -mfpu=vfpv3-d16 +QMAKE_CFLAGS += $$TEGRA2_CFLAGS +QMAKE_CXXFLAGS += $$TEGRA2_CFLAGS include(../common/linux_device_post.conf) diff --git a/mkspecs/features/ctest_testcase.prf b/mkspecs/features/ctest_testcase.prf index 7e841de790..79adde3446 100644 --- a/mkspecs/features/ctest_testcase.prf +++ b/mkspecs/features/ctest_testcase.prf @@ -18,6 +18,8 @@ isEmpty(CMAKE_VERSION) { CMAKE_VERSION_MAJOR = $$section(CMAKE_VERSION, ., 0, 0) CMAKE_VERSION_MINOR = $$section(CMAKE_VERSION, ., 1, 1) CMAKE_VERSION_PATCH = $$section(CMAKE_VERSION, ., 2, 2) + # CMake can report versions like 2.8.11-rc1, so strip off the rc part. + CMAKE_VERSION_PATCH ~= s,-.*,, VERSION_OK = greaterThan(CMAKE_VERSION_MAJOR, 2) { @@ -42,14 +44,21 @@ isEmpty(CMAKE_VERSION) { for(d, $$list($$split($$list($$[QMAKE_MKSPECS]), $$DIRLIST_SEPARATOR))) { CMAKE_PREFIX_PATH *= $$dirname(d) } + CMAKE_PREFIX_PATH=\"$$join(CMAKE_PREFIX_PATH, ;)\" + + !qtHaveModule(widgets): CMAKE_MODULE_DEFINES += -DNO_WIDGETS=True + !qtHaveModule(dbus): CMAKE_MODULE_DEFINES += -DNO_DBUS=True dependentmodules = $$resolve_depends(CMAKE_QT_MODULES_UNDER_TEST, "QT.") dependentmodules -= $$CMAKE_QT_MODULES_UNDER_TEST dependentmodules = $$cmakeModuleList($$dependentmodules) + SET = set + equals(QMAKE_DIR_SEP, "/"):SET = export + check.commands = \ - $(MKDIR) $$BUILD_DIR && cd $$BUILD_DIR && \ - cmake $$_PRO_FILE_PWD_ $$CMAKE_GENERATOR -DCMAKE_BUILD_TYPE=$${CMAKE_BUILD_TYPE} -DCMAKE_PREFIX_PATH=\"$$join(CMAKE_PREFIX_PATH, ;)\" -DQt5_MODULE_TEST_DEPENDS=\"$${dependentmodules}\" && \ + $(MKDIR) $$BUILD_DIR && cd $$BUILD_DIR && $$SET VERBOSE=1 && \ + cmake $$_PRO_FILE_PWD_ $$CMAKE_GENERATOR $$CMAKE_MODULE_DEFINES -DCMAKE_BUILD_TYPE=$${CMAKE_BUILD_TYPE} -DCMAKE_PREFIX_PATH=$$CMAKE_PREFIX_PATH -DQt5_MODULE_TEST_DEPENDS=\"$${dependentmodules}\" && \ $(TESTRUNNER) ctest --output-on-failure } @@ -60,6 +69,4 @@ insignificant_test:!isEmpty(check.commands) { check.commands = -$${check.commands} } -!qtHaveModule(widgets): CONFIG += insignificant_test # QTBUG-28540 - QMAKE_EXTRA_TARGETS *= check diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in index 2940ad9dc1..e5bbc97161 100644 --- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in +++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in @@ -47,13 +47,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) !!IF !no_module_headers !!IF isEmpty(CMAKE_INCLUDE_DIR_IS_ABSOLUTE) - set(Qt5$${CMAKE_MODULE_NAME}_INCLUDE_DIRS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}\") + set(Qt5$${CMAKE_MODULE_NAME}_INCLUDE_DIRS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$$CMAKE_INCLUDE_DIR\" \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}\") set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/${Qt5$${CMAKE_MODULE_NAME}_VERSION_STRING}\" \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/${Qt5$${CMAKE_MODULE_NAME}_VERSION_STRING}/$${MODULE_INCNAME}\" ) !!ELSE - set(Qt5$${CMAKE_MODULE_NAME}_INCLUDE_DIRS \"$${CMAKE_INCLUDE_DIR}Qt$${CMAKE_MODULE_NAME}\") + set(Qt5$${CMAKE_MODULE_NAME}_INCLUDE_DIRS \"$$CMAKE_INCLUDE_DIR\" \"$${CMAKE_INCLUDE_DIR}Qt$${CMAKE_MODULE_NAME}\") set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/${Qt5$${CMAKE_MODULE_NAME}_VERSION_STRING}\" \"$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/${Qt5$${CMAKE_MODULE_NAME}_VERSION_STRING}/$${MODULE_INCNAME}\" @@ -77,10 +77,15 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) if (Qt5$${CMAKE_MODULE_NAME}_FIND_QUIETLY) set(_Qt5$${CMAKE_MODULE_NAME}_DEPENDENCIES_FIND_QUIET QUIET) endif() + set(_Qt5$${CMAKE_MODULE_NAME}_FIND_VERSION_EXACT) + if (Qt5$${CMAKE_MODULE_NAME}_FIND_VERSION_EXACT) + set(_Qt5$${CMAKE_MODULE_NAME}_FIND_VERSION_EXACT EXACT) + endif() foreach(_module_dep ${_Qt5$${CMAKE_MODULE_NAME}_MODULE_DEPENDENCIES}) if (NOT Qt5${_module_dep}_FOUND) find_package(Qt5${_module_dep} + ${Qt5$${CMAKE_MODULE_NAME}_VERSION_STRING} ${_Qt5$${CMAKE_MODULE_NAME}_FIND_VERSION_EXACT} ${_Qt5$${CMAKE_MODULE_NAME}_DEPENDENCIES_FIND_QUIET} ${_Qt5$${CMAKE_MODULE_NAME}_FIND_DEPENDENCIES_REQUIRED} PATHS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}\" NO_DEFAULT_PATH @@ -118,6 +123,11 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY FRAMEWORK 1) !!ENDIF + set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY + INTERFACE_INCLUDE_DIRECTORIES ${Qt5$${CMAKE_MODULE_NAME}_INCLUDE_DIRS}) + set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY + INTERFACE_COMPILE_DEFINITIONS $${MODULE_DEFINE}) + !!IF !isEmpty(CMAKE_RELEASE_TYPE) !!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD) _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" \"\" ) diff --git a/mkspecs/features/exclusive_builds.prf b/mkspecs/features/exclusive_builds.prf index 0e0da05c70..adcad79fe1 100644 --- a/mkspecs/features/exclusive_builds.prf +++ b/mkspecs/features/exclusive_builds.prf @@ -33,15 +33,15 @@ defineTest(addExclusiveBuilds) { contains(TEMPLATE, subdirs) { eval(sub_$${firstBuildName}.target = $$firstBuild) - export(sub_$${firstBuildName}.target) + export(sub_$${firstBuildName}.target) eval(sub_$${firstBuildName}.CONFIG = recursive) - export(sub_$${firstBuildName}.CONFIG) + export(sub_$${firstBuildName}.CONFIG) eval(sub_$${secondBuildName}.target = $$secondBuild) - export(sub_$${secondBuildName}.target) + export(sub_$${secondBuildName}.target) eval(sub_$${secondBuildName}.CONFIG = recursive) - export(sub_$${secondBuildName}.CONFIG) - QMAKE_EXTRA_TARGETS += sub_$${firstBuildName} sub_$${secondBuildName} - export(QMAKE_EXTRA_TARGETS) + export(sub_$${secondBuildName}.CONFIG) + QMAKE_EXTRA_TARGETS += sub_$${firstBuildName} sub_$${secondBuildName} + export(QMAKE_EXTRA_TARGETS) } else:!build_pass { first_BUILDS = second_BUILDS = @@ -56,32 +56,32 @@ defineTest(addExclusiveBuilds) { else: permutationName = -$$permutation # Makefile target rule eval($${firstBuildName}$${permutation}.target = $${firstBuild}$$lower($${permutationName})) - export($${firstBuildName}$${permutation}.target) + export($${firstBuildName}$${permutation}.target) # IDE name eval($${firstBuildName}$${permutation}.name = $${firstBuildName}$${permutationName}) - export($${firstBuildName}$${permutation}.name) - # prl import CONFIG option + export($${firstBuildName}$${permutation}.name) + # prl import CONFIG option eval($${firstBuildName}$${permutation}.PRL_CONFIG = $${firstBuild}$${permutation}) export($${firstBuildName}$${permutation}.PRL_CONFIG) # Individual CONFIG option eval($${firstBuildName}$${permutation}.CONFIG = $${firstBuild} $${firstBuildName}Build $$eval($${permutation}.CONFIG)) - export($${firstBuildName}$${permutation}.CONFIG) + export($${firstBuildName}$${permutation}.CONFIG) eval($${secondBuildName}$${permutation}.target = $${secondBuild}$$lower($${permutationName})) - export($${secondBuildName}$${permutation}.target) + export($${secondBuildName}$${permutation}.target) eval($${secondBuildName}$${permutation}.name = $${secondBuildName}$${permutationName}) - export($${secondBuildName}$${permutation}.name) - eval($${secondBuildName}$${permutation}.PRL_CONFIG = $${secondBuild}$${permutation}) - export($${secondBuildName}$${permutation}.PRL_CONFIG) + export($${secondBuildName}$${permutation}.name) + eval($${secondBuildName}$${permutation}.PRL_CONFIG = $${secondBuild}$${permutation}) + export($${secondBuildName}$${permutation}.PRL_CONFIG) eval($${secondBuildName}$${permutation}.CONFIG = $${secondBuild} $${secondBuildName}Build $$eval($${permutation}.CONFIG)) - export($${secondBuildName}$${permutation}.CONFIG) - + export($${secondBuildName}$${permutation}.CONFIG) + first_BUILDS += $${firstBuildName}$${permutation} second_BUILDS += $${secondBuildName}$${permutation} } - + # A mutual exclusive block. - CONFIG($${firstBuild}, $${firstBuild}|$${secondBuild}): BUILDS = $$first_BUILDS $$second_BUILDS + CONFIG($${firstBuild}, $${firstBuild}|$${secondBuild}): BUILDS = $$first_BUILDS $$second_BUILDS else: BUILDS = $$second_BUILDS $$first_BUILDS export(BUILDS) } else { diff --git a/mkspecs/features/mac/default_post.prf b/mkspecs/features/mac/default_post.prf index 273094d4cd..714b4c7d06 100644 --- a/mkspecs/features/mac/default_post.prf +++ b/mkspecs/features/mac/default_post.prf @@ -4,7 +4,7 @@ load(default_post) # Pick a suitable default architecture for qmake-based applications. # If the Qt package contains one of x86 and x86_64, pick that one. If it # contains both then use the compiler default. Make a similiar decision for -# PowerPC-based systems. Note that this logic assumes that Qt has been +# PowerPC-based systems. Note that this logic assumes that Qt has been # configured with an architecture that is usable on the system. qt:!isEmpty(QT_CONFIG) { contains(QMAKE_HOST.arch, ppc)|contains(QMAKE_HOST.arch, "Power Macintosh") { diff --git a/mkspecs/features/moc.prf b/mkspecs/features/moc.prf index 8bd512844d..59ac9db05b 100644 --- a/mkspecs/features/moc.prf +++ b/mkspecs/features/moc.prf @@ -9,7 +9,7 @@ isEmpty(QMAKE_EXT_CPP_MOC):QMAKE_EXT_CPP_MOC = .moc # has too many includes. We do this to overcome a command-line limit on Win < XP INCLUDETEMP= WIN_INCLUDETEMP= -win32:count($$list($$INCLUDEPATH), 40, >) { +win32:count(INCLUDEPATH, 40, >) { INCLUDETEMP = $$MOC_DIR/mocinclude.tmp WIN_INCLUDETEMP=$$INCLUDETEMP @@ -23,7 +23,7 @@ win32:count($$list($$INCLUDEPATH), 40, >) { unset(INCFILELIST) RET = - for(incfile, $$list($$INCLUDEPATH)) { + for(incfile, INCLUDEPATH) { INCFILELIST = -I$$incfile isEmpty(RET): RET += @echo $$INCFILELIST> $$WIN_INCLUDETEMP $$EOC else: RET += @echo $$INCFILELIST>> $$WIN_INCLUDETEMP $$EOC @@ -38,15 +38,17 @@ win32:count($$list($$INCLUDEPATH), 40, >) { } defineReplace(mocCmdBase) { + RET = !isEmpty(WIN_INCLUDETEMP) { - RET = contains(TEMPLATE, "vc.*") { RET += $$mocinclude.commands } - RET += $$QMAKE_MOC $(DEFINES) @$$WIN_INCLUDETEMP $$join(QMAKE_COMPILER_DEFINES, " -D", -D) $$QMAKE_MOC_OPTIONS - return($$RET) + incvar = @$$WIN_INCLUDETEMP + } else { + incvar = $(INCPATH) } - return($$QMAKE_MOC $(DEFINES) $(INCPATH) $$join(QMAKE_COMPILER_DEFINES, " -D", -D) $$QMAKE_MOC_OPTIONS) + RET += $$QMAKE_MOC $(DEFINES) $$join(QMAKE_COMPILER_DEFINES, " -D", -D) $$incvar $$join(QMAKE_DEFAULT_INCDIRS, " -I", -I) $$QMAKE_MOC_OPTIONS + return($$RET) } #moc headers @@ -58,7 +60,7 @@ moc_header.input = HEADERS moc_header.variable_out = SOURCES moc_header.name = MOC ${QMAKE_FILE_IN} !contains(TEMPLATE, "vc.*") { - !isEmpty(INCLUDETEMP):moc_header.depends += $$INCLUDETEMP + !isEmpty(INCLUDETEMP):moc_header.depends += $$INCLUDETEMP } silent:moc_header.commands = @echo moc ${QMAKE_FILE_IN} && $$moc_header.commands QMAKE_EXTRA_COMPILERS += moc_header @@ -72,7 +74,7 @@ moc_source.output = $$MOC_DIR/$${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}$${QMAKE_EX moc_source.input = SOURCES OBJECTIVE_SOURCES moc_source.name = MOC ${QMAKE_FILE_IN} !contains(TEMPLATE, "vc.*") { - !isEmpty(INCLUDETEMP):moc_source.depends += $$INCLUDETEMP + !isEmpty(INCLUDETEMP):moc_source.depends += $$INCLUDETEMP } silent:moc_source.commands = @echo moc ${QMAKE_FILE_IN} && $$moc_source.commands QMAKE_EXTRA_COMPILERS += moc_source diff --git a/mkspecs/features/qml_module.prf b/mkspecs/features/qml_module.prf index db5f6787b3..d6ff25eed5 100644 --- a/mkspecs/features/qml_module.prf +++ b/mkspecs/features/qml_module.prf @@ -25,7 +25,7 @@ qml1_target: \ else: \ instbase = $$[QT_INSTALL_QML] -!prefix_build { +!force_independent { # These bizarre rules copy the files to the qtbase build directory defineReplace(qmlModStripSrcDir) { diff --git a/mkspecs/features/qt_build_config.prf b/mkspecs/features/qt_build_config.prf index c53bc960a2..4cbd08910c 100644 --- a/mkspecs/features/qt_build_config.prf +++ b/mkspecs/features/qt_build_config.prf @@ -20,10 +20,11 @@ debug(1, "Not loading qmodule.pri twice") } +# force_independent can be set externally. prefix_build not. !exists($$[QT_HOST_DATA]/.qmake.cache): \ - CONFIG += prefix_build + CONFIG += prefix_build force_independent -!build_pass:!isEmpty(_QMAKE_SUPER_CACHE_):prefix_build { +!build_pass:!isEmpty(_QMAKE_SUPER_CACHE_):force_independent { # When doing a -prefix build of top-level qt5/qt.pro, we need to announce # this repo's module pris' location to the other repos. isEmpty(MODULE_QMAKE_OUTDIR): MODULE_QMAKE_OUTDIR = $$shadowed($$dirname(_QMAKE_CONF_)) diff --git a/mkspecs/features/qt_docs.prf b/mkspecs/features/qt_docs.prf index 31f7b65c38..c80efb03e0 100644 --- a/mkspecs/features/qt_docs.prf +++ b/mkspecs/features/qt_docs.prf @@ -25,11 +25,13 @@ QDOC += -outputdir $$QMAKE_DOCS_OUTPUTDIR !build_online_docs: \ QDOC += -installdir $$[QT_INSTALL_DOCS] qtver.name = QT_VERSION -qtver.value = $$QT_VERSION +qtver.value = $$VERSION +isEmpty(qtver.value): qtver.value = $$MODULE_VERSION +isEmpty(qtver.value): error("No version for documentation specified.") qtmver.name = QT_VER -qtmver.value = $${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION} +qtmver.value = $$replace(qtver.value, ^(\\d+\\.\\d+).*$, \\1) qtvertag.name = QT_VERSION_TAG -qtvertag.value = $$replace(QT_VERSION, \.,) +qtvertag.value = $$replace(qtver.value, \.,) qtAddToolEnv(QDOC, qtver qtmver qtvertag) doc_command = $$QDOC $$QMAKE_DOCS prepare_docs { diff --git a/mkspecs/features/qt_example_installs.prf b/mkspecs/features/qt_example_installs.prf index 04d7a17ab9..479a16a90b 100644 --- a/mkspecs/features/qt_example_installs.prf +++ b/mkspecs/features/qt_example_installs.prf @@ -26,7 +26,7 @@ defineTest(addInstallFiles) { } probase = $$relative_path($$_PRO_FILE_PWD_, $$dirname(_QMAKE_CONF_)/examples) -!isEmpty(probase):!contains(probase, ^\\..*) { +!isEmpty(probase):!contains(probase, ^\\..*):!isEmpty(_QMAKE_CACHE_) { for(ex, EXAMPLE_FILES): \ sourcefiles += $$files($$absolute_path($$ex, $$_PRO_FILE_PWD_)) for(res, RESOURCES) { diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf index 478c255836..8cd2473224 100644 --- a/mkspecs/features/qt_functions.prf +++ b/mkspecs/features/qt_functions.prf @@ -236,13 +236,10 @@ defineTest(qtAddToolEnv) { defineTest(qtAddTargetEnv) { deps = $$replace(QT, -private$, ) - deps = $$resolve_depends(deps, "QT.") + deps = $$resolve_depends(deps, "QT.", ".depends" ".private_depends" ".run_depends") !isEmpty(deps) { - for(dep, deps) { + for(dep, deps): \ deppath += $$shell_path($$eval(QT.$${dep}.libs)) - for(rpath, QT.$${dep}.rpath_link): \ - deppath += $$shell_path($$rpath) - } equals(QMAKE_HOST.os, Windows) { deppath.name = PATH } else:contains(QMAKE_HOST.os, Linux|FreeBSD) { diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf index ff74901a4a..cfafa15629 100644 --- a/mkspecs/features/qt_module.prf +++ b/mkspecs/features/qt_module.prf @@ -20,7 +20,8 @@ load(qt_build_config) # loads qmodule.pri if hasn't been loaded already isEmpty(MODULE):MODULE = $$section($$list($$basename(_PRO_FILE_)), ., 0, 0) -isEmpty(VERSION):VERSION = $$QT_VERSION +isEmpty(VERSION): VERSION = $$MODULE_VERSION +isEmpty(VERSION): error("Module does not define version.") # Compile as shared/DLL or static according to the option given to configure # unless overridden. Host builds are always static @@ -132,7 +133,7 @@ unix|win32-g++* { !isEmpty(_QMAKE_SUPER_CACHE_): \ rplbase = $$dirname(_QMAKE_SUPER_CACHE_)/[^/][^/]* else: \ - rplbase = $$MODULE_QMAKE_OUTDIR + rplbase = $$MODULE_BASE_OUTDIR include_replace.match = $$rplbase/include include_replace.replace = $$[QT_INSTALL_HEADERS/raw] lib_replace.match = $$rplbase/lib diff --git a/mkspecs/features/qt_module_headers.prf b/mkspecs/features/qt_module_headers.prf index 1ddc28bed0..298ca102bc 100644 --- a/mkspecs/features/qt_module_headers.prf +++ b/mkspecs/features/qt_module_headers.prf @@ -18,10 +18,9 @@ load(qt_build_paths) } else { contains(QT_CONFIG, private_tests): \ # -developer-build QMAKE_SYNCQT += -check-includes - QMAKE_SYNCQT += -module $$MODULE_INCNAME + QMAKE_SYNCQT += -module $$MODULE_INCNAME -version $$VERSION } QMAKE_SYNCQT += \ - -mkspecsdir $$[QT_HOST_DATA/get]/mkspecs \ -outdir $$MODULE_BASE_OUTDIR $$MODULE_BASE_DIR !silent: message($$QMAKE_SYNCQT) system($$QMAKE_SYNCQT)|error("Failed to run: $$QMAKE_SYNCQT") diff --git a/mkspecs/features/qt_module_pris.prf b/mkspecs/features/qt_module_pris.prf index 2822e70b05..bedcfd4c47 100644 --- a/mkspecs/features/qt_module_pris.prf +++ b/mkspecs/features/qt_module_pris.prf @@ -11,7 +11,7 @@ load(qt_build_paths) MODULE_FWD_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules/qt_lib_$${MODULE}.pri -prefix_build: \ +force_independent: \ MODULE_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules-inst/qt_lib_$${MODULE}.pri else: \ MODULE_PRI = $$MODULE_FWD_PRI @@ -71,11 +71,11 @@ else: \ $$module_config \ "QT.$${MODULE}.DEFINES = $$MODULE_DEFINES" \ # assume sufficient quoting "" \ - "QT_CONFIG += $$MODULE" # this is obsolete, but some code still depends on it + "QT_MODULES += $$MODULE" write_file($$MODULE_PRI, MODULE_PRI_CONT)|error("Aborting.") MODULE_PRI_FILES = $$MODULE_PRI - prefix_build { + force_independent { # Create a forwarding module .pri file MODULE_FWD_PRI_CONT = \ @@ -113,7 +113,7 @@ else: \ includes private_includes bins libs libexecs plugins imports qml \ rpath_link rpath_link_private \ )):defined(QT.$${MODULE}.$$var, var):cache(QT.$${MODULE}.$$var, transient) - cache(QT_CONFIG, transient) + cache(QT_MODULES, transient) } # !build_pass diff --git a/mkspecs/features/qt_plugin.prf b/mkspecs/features/qt_plugin.prf index 98710431c3..9f4882c5db 100644 --- a/mkspecs/features/qt_plugin.prf +++ b/mkspecs/features/qt_plugin.prf @@ -57,7 +57,7 @@ unix|win32-g++* { !isEmpty(_QMAKE_SUPER_CACHE_): \ rplbase = $$dirname(_QMAKE_SUPER_CACHE_)/[^/][^/]* else: \ - rplbase = $$MODULE_QMAKE_OUTDIR + rplbase = $$MODULE_BASE_OUTDIR lib_replace.match = $$rplbase/lib lib_replace.replace = $$[QT_INSTALL_LIBS/raw] QMAKE_PRL_INSTALL_REPLACE += lib_replace diff --git a/mkspecs/features/qt_tool.prf b/mkspecs/features/qt_tool.prf index 56ba1169a1..46d031fb32 100644 --- a/mkspecs/features/qt_tool.prf +++ b/mkspecs/features/qt_tool.prf @@ -37,8 +37,7 @@ load(qt_common) # If we are doing a prefix build, create a "module" pri which enables # qtPrepareTool() to work with the non-installed build. # Non-bootstrapped tools always need this because of the environment setup. -!build_pass:if(!host_build|!force_bootstrap|prefix_build) { - +!build_pass:if(!host_build|!force_bootstrap|force_independent) { isEmpty(MODULE):MODULE = $$TARGET MODULE_DEPENDS = $$replace(QT, -private$, ) diff --git a/mkspecs/freebsd-g++/qmake.conf b/mkspecs/freebsd-g++/qmake.conf index 1e1fa0ca5a..4e078ce2f2 100644 --- a/mkspecs/freebsd-g++/qmake.conf +++ b/mkspecs/freebsd-g++/qmake.conf @@ -2,33 +2,33 @@ # qmake configuration for freebsd-g++ # -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = freebsd bsd -CONFIG += gdb_dwarf_index +MAKEFILE_GENERATOR = UNIX +QMAKE_PLATFORM = freebsd bsd +CONFIG += gdb_dwarf_index -QMAKE_CFLAGS_THREAD = -pthread -D_THREAD_SAFE +QMAKE_CFLAGS_THREAD = -pthread -D_THREAD_SAFE -QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD +QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD # Addon software goes into /usr/local on the BSDs, by default we will look there -QMAKE_INCDIR = /usr/local/include -QMAKE_LIBDIR = /usr/local/lib -QMAKE_INCDIR_X11 = /usr/X11R6/include -QMAKE_LIBDIR_X11 = /usr/X11R6/lib -QMAKE_INCDIR_OPENGL = /usr/X11R6/include -QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib - -QMAKE_LFLAGS_THREAD = -pthread - -QMAKE_LIBS = -QMAKE_LIBS_DYNLOAD = -QMAKE_LIBS_X11 = -lXext -lX11 -lm -QMAKE_LIBS_OPENGL = -lGL -QMAKE_LIBS_THREAD = - -QMAKE_AR = ar cqs +QMAKE_INCDIR = /usr/local/include +QMAKE_LIBDIR = /usr/local/lib +QMAKE_INCDIR_X11 = /usr/X11R6/include +QMAKE_LIBDIR_X11 = /usr/X11R6/lib +QMAKE_INCDIR_OPENGL = /usr/X11R6/include +QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib + +QMAKE_LFLAGS_THREAD = -pthread + +QMAKE_LIBS = +QMAKE_LIBS_DYNLOAD = +QMAKE_LIBS_X11 = -lXext -lX11 -lm +QMAKE_LIBS_OPENGL = -lGL +QMAKE_LIBS_THREAD = + +QMAKE_AR = ar cqs QMAKE_OBJCOPY = objcopy -QMAKE_RANLIB = +QMAKE_RANLIB = include(../common/unix.conf) include(../common/gcc-base-unix.conf) diff --git a/mkspecs/freebsd-g++46/qmake.conf b/mkspecs/freebsd-g++46/qmake.conf index 9bb5a795b0..364dcd6233 100644 --- a/mkspecs/freebsd-g++46/qmake.conf +++ b/mkspecs/freebsd-g++46/qmake.conf @@ -2,33 +2,33 @@ # qmake configuration for freebsd-g++46 (using g++46 from ports/lang/gcc) # -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = freebsd bsd -CONFIG += gdb_dwarf_index +MAKEFILE_GENERATOR = UNIX +QMAKE_PLATFORM = freebsd bsd +CONFIG += gdb_dwarf_index -QMAKE_CFLAGS_THREAD = -pthread -D_THREAD_SAFE +QMAKE_CFLAGS_THREAD = -pthread -D_THREAD_SAFE -QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD +QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD # Addon software goes into /usr/local on the BSDs, by default we will look there -QMAKE_INCDIR = /usr/local/include -QMAKE_LIBDIR = /usr/local/lib -QMAKE_INCDIR_X11 = /usr/X11R6/include -QMAKE_LIBDIR_X11 = /usr/X11R6/lib -QMAKE_INCDIR_OPENGL = /usr/X11R6/include -QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib - -QMAKE_LFLAGS_THREAD = -pthread - -QMAKE_LIBS = -QMAKE_LIBS_DYNLOAD = -QMAKE_LIBS_X11 = -lXext -lX11 -lm -QMAKE_LIBS_OPENGL = -lGL -QMAKE_LIBS_THREAD = - -QMAKE_AR = ar cqs +QMAKE_INCDIR = /usr/local/include +QMAKE_LIBDIR = /usr/local/lib +QMAKE_INCDIR_X11 = /usr/X11R6/include +QMAKE_LIBDIR_X11 = /usr/X11R6/lib +QMAKE_INCDIR_OPENGL = /usr/X11R6/include +QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib + +QMAKE_LFLAGS_THREAD = -pthread + +QMAKE_LIBS = +QMAKE_LIBS_DYNLOAD = +QMAKE_LIBS_X11 = -lXext -lX11 -lm +QMAKE_LIBS_OPENGL = -lGL +QMAKE_LIBS_THREAD = + +QMAKE_AR = ar cqs QMAKE_OBJCOPY = objcopy -QMAKE_RANLIB = +QMAKE_RANLIB = include(../common/unix.conf) include(../common/gcc-base-unix.conf) @@ -36,11 +36,11 @@ include(../common/g++-unix.conf) # Redefined here because g++-base.conf sets QMAKE_CC and QMAKE_CXX # to gcc and g++, respectively. -QMAKE_CC = gcc46 -QMAKE_CXX = g++46 -QMAKE_LINK_C = $$QMAKE_CC -QMAKE_LINK_C_SHLIB = $$QMAKE_CC -QMAKE_LINK = $$QMAKE_CXX -QMAKE_LINK_SHLIB = $$QMAKE_CXX +QMAKE_CC = gcc46 +QMAKE_CXX = g++46 +QMAKE_LINK_C = $$QMAKE_CC +QMAKE_LINK_C_SHLIB = $$QMAKE_CC +QMAKE_LINK = $$QMAKE_CXX +QMAKE_LINK_SHLIB = $$QMAKE_CXX load(qt_config) diff --git a/mkspecs/freebsd-icc/qmake.conf b/mkspecs/freebsd-icc/qmake.conf index 3514d15838..91aeb25520 100644 --- a/mkspecs/freebsd-icc/qmake.conf +++ b/mkspecs/freebsd-icc/qmake.conf @@ -27,67 +27,67 @@ # warning #1572: floating-point equality and inequality comparisons are unreliable # -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = freebsd bsd +MAKEFILE_GENERATOR = UNIX +QMAKE_PLATFORM = freebsd bsd -QMAKE_COMPILER = gcc intel_icc # icc pretends to be gcc +QMAKE_COMPILER = gcc intel_icc # icc pretends to be gcc -QMAKE_CC = icc -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -wd858,1572 -QMAKE_CFLAGS_DEPS = -M -QMAKE_CFLAGS_WARN_ON = -w2 -wd171,193,279,304,310,383,424,444,488,810,967,981,1418,1419,1476,1477 -QMAKE_CFLAGS_WARN_OFF = -w -QMAKE_CFLAGS_RELEASE = -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_SHLIB = -fpic -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = -QMAKE_CFLAGS_THREAD = -D_THREAD_SAFE +QMAKE_CC = icc +QMAKE_LEX = flex +QMAKE_LEXFLAGS = +QMAKE_YACC = yacc +QMAKE_YACCFLAGS = -d +QMAKE_CFLAGS = -wd858,1572 +QMAKE_CFLAGS_DEPS = -M +QMAKE_CFLAGS_WARN_ON = -w2 -wd171,193,279,304,310,383,424,444,488,810,967,981,1418,1419,1476,1477 +QMAKE_CFLAGS_WARN_OFF = -w +QMAKE_CFLAGS_RELEASE = +QMAKE_CFLAGS_DEBUG = -g +QMAKE_CFLAGS_SHLIB = -fpic +QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CFLAGS_YACC = +QMAKE_CFLAGS_THREAD = -D_THREAD_SAFE -QMAKE_CXX = icpc -QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CXX = icpc +QMAKE_CXXFLAGS = $$QMAKE_CFLAGS +QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS +QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON +QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF +QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD +QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC +QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD # Addon software goes into /usr/local on the BSDs, by default we will look there -QMAKE_INCDIR = /usr/local/include -QMAKE_LIBDIR = /usr/local/lib -QMAKE_INCDIR_X11 = /usr/X11R6/include -QMAKE_LIBDIR_X11 = /usr/X11R6/lib -QMAKE_INCDIR_OPENGL = /usr/X11R6/include -QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib +QMAKE_INCDIR = /usr/local/include +QMAKE_LIBDIR = /usr/local/lib +QMAKE_INCDIR_X11 = /usr/X11R6/include +QMAKE_LIBDIR_X11 = /usr/X11R6/lib +QMAKE_INCDIR_OPENGL = /usr/X11R6/include +QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib -QMAKE_LINK = icpc -QMAKE_LINK_SHLIB = icpc -QMAKE_LFLAGS = -QMAKE_LFLAGS_RELEASE = -QMAKE_LFLAGS_DEBUG = -QMAKE_LFLAGS_SHLIB = -shared -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME = -Qoption,ld,-soname, -QMAKE_LFLAGS_THREAD = -mt -QMAKE_LFLAGS_RPATH = -Qoption,ld,-rpath, +QMAKE_LINK = icpc +QMAKE_LINK_SHLIB = icpc +QMAKE_LFLAGS = +QMAKE_LFLAGS_RELEASE = +QMAKE_LFLAGS_DEBUG = +QMAKE_LFLAGS_SHLIB = -shared +QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB +QMAKE_LFLAGS_SONAME = -Qoption,ld,-soname, +QMAKE_LFLAGS_THREAD = -mt +QMAKE_LFLAGS_RPATH = -Qoption,ld,-rpath, -QMAKE_LIBS = -QMAKE_LIBS_DYNLOAD = -QMAKE_LIBS_X11 = -lXext -lX11 -lm -QMAKE_LIBS_OPENGL = -lGL -QMAKE_LIBS_THREAD = +QMAKE_LIBS = +QMAKE_LIBS_DYNLOAD = +QMAKE_LIBS_X11 = -lXext -lX11 -lm +QMAKE_LIBS_OPENGL = -lGL +QMAKE_LIBS_THREAD = -QMAKE_AR = ar cqs +QMAKE_AR = ar cqs QMAKE_OBJCOPY = objcopy -QMAKE_RANLIB = +QMAKE_RANLIB = include(../common/unix.conf) load(qt_config) diff --git a/mkspecs/hpux-acc-64/qmake.conf b/mkspecs/hpux-acc-64/qmake.conf index 6d1abe0949..60c87c29bf 100644 --- a/mkspecs/hpux-acc-64/qmake.conf +++ b/mkspecs/hpux-acc-64/qmake.conf @@ -4,111 +4,111 @@ # We define _POSIX_C_SOURCE to 199506L when using threads, therefore # we also need to redefine _HPUX_SOURCE. # From pthread(3t): -# Some documentation will recommend the use of -D_REENTRANT for -# compilation. While this also functions properly, it is considered -# an obsolescent form. +# Some documentation will recommend the use of -D_REENTRANT for +# compilation. While this also functions properly, it is considered +# an obsolescent form. # See pthread(3t) for more details. # # From the "HP aC++ Online Programmer's Guide": -# When +DA2.0W is specified: -# * 64-bit SVR4 Executable and Linking Format (ELF) object files -# are generated for PA-RISC 2.0. -# * The preprocessor predefined macro, __LP64__ is defined. -# * The correct path for 64-bit system and language libraries is -# selected. -# When +DD32 is specified: -# * The size of an int, long, or pointer data type is 32-bits. -# The size of an int data type is 32-bits. The size of a long or -# pointer data type is 64-bits. -# * This is the default, currently equivalent to +DA1.1 architecture. -# When +DD64 is specified: -# * The size of an int data type is 32-bits. The size of a long or -# pointer data type is 64-bits. -# * This is currently equivalent to +DA2.OW architecture. -# * The preprocessor predefined macro, __LP64__ is defined. -# Using +DS to Specify Instruction Scheduling: -# * By default, the compiler performs scheduling tuned for the system -# on which you are compiling, or, if specified, tuned for the setting -# of the +DA option. +# When +DA2.0W is specified: +# * 64-bit SVR4 Executable and Linking Format (ELF) object files +# are generated for PA-RISC 2.0. +# * The preprocessor predefined macro, __LP64__ is defined. +# * The correct path for 64-bit system and language libraries is +# selected. +# When +DD32 is specified: +# * The size of an int, long, or pointer data type is 32-bits. +# The size of an int data type is 32-bits. The size of a long or +# pointer data type is 64-bits. +# * This is the default, currently equivalent to +DA1.1 architecture. +# When +DD64 is specified: +# * The size of an int data type is 32-bits. The size of a long or +# pointer data type is 64-bits. +# * This is currently equivalent to +DA2.OW architecture. +# * The preprocessor predefined macro, __LP64__ is defined. +# Using +DS to Specify Instruction Scheduling: +# * By default, the compiler performs scheduling tuned for the system +# on which you are compiling, or, if specified, tuned for the setting +# of the +DA option. # # From the online "C/HP-UX Reference Manual": -# -Aa -# Enables strict ANSI C compliance. -# -Ae -# Enables ANSI C compliance, HP value-added features (as described -# for +e option), and _HPUX_SOURCE name space macro. It is equivalent -# to -Aa +e -D_HPUX_SOURCE. -# +e -# Enables the following HP value added features while compiling in -# ANSI C mode: sized enum, long long, long pointers, compiler supplied -# defaults for missing arguments to intrinsic calls, and $ in identifier -# HP C extensions. +# -Aa +# Enables strict ANSI C compliance. +# -Ae +# Enables ANSI C compliance, HP value-added features (as described +# for +e option), and _HPUX_SOURCE name space macro. It is equivalent +# to -Aa +e -D_HPUX_SOURCE. +# +e +# Enables the following HP value added features while compiling in +# ANSI C mode: sized enum, long long, long pointers, compiler supplied +# defaults for missing arguments to intrinsic calls, and $ in identifier +# HP C extensions. # -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = hpux -QMAKE_COMPILER_DEFINES += __hpux __HP_aCC +MAKEFILE_GENERATOR = UNIX +QMAKE_PLATFORM = hpux +QMAKE_COMPILER_DEFINES += __hpux __HP_aCC -QMAKE_COMPILER = hp_acc +QMAKE_COMPILER = hp_acc -QMAKE_CC = cc -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -Ae +DA2.0W -w -QMAKE_CFLAGS_WARN_ON = -QMAKE_CFLAGS_WARN_OFF = -w -QMAKE_CFLAGS_RELEASE = +O1 -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_SHLIB = +Z -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = -QMAKE_CFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L -D_HPUX_SOURCE -mt +QMAKE_CC = cc +QMAKE_LEX = flex +QMAKE_LEXFLAGS = +QMAKE_YACC = yacc +QMAKE_YACCFLAGS = -d +QMAKE_CFLAGS = -Ae +DA2.0W -w +QMAKE_CFLAGS_WARN_ON = +QMAKE_CFLAGS_WARN_OFF = -w +QMAKE_CFLAGS_RELEASE = +O1 +QMAKE_CFLAGS_DEBUG = -g +QMAKE_CFLAGS_SHLIB = +Z +QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CFLAGS_YACC = +QMAKE_CFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L -D_HPUX_SOURCE -mt -QMAKE_CXX = aCC -QMAKE_CXXFLAGS = -AA +DA2.0W -w -D__STRICT_ANSI__ -D_HPUX_SOURCE -QMAKE_CXXFLAGS_DEPS = +M -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CXX = aCC +QMAKE_CXXFLAGS = -AA +DA2.0W -w -D__STRICT_ANSI__ -D_HPUX_SOURCE +QMAKE_CXXFLAGS_DEPS = +M +QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON +QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF +QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L -mt +QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC +QMAKE_CXXFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L -mt -QMAKE_INCDIR = -QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = /usr/include/X11R6 -QMAKE_LIBDIR_X11 = /usr/lib/X11R6/pa20_64 -QMAKE_INCDIR_OPENGL = /opt/graphics/OpenGL/include /usr/contrib/X11R6/include -QMAKE_LIBDIR_OPENGL = /opt/graphics/OpenGL/lib/pa20_64 /usr/contrib/X11R6/lib/pa20_64 +QMAKE_INCDIR = +QMAKE_LIBDIR = +QMAKE_INCDIR_X11 = /usr/include/X11R6 +QMAKE_LIBDIR_X11 = /usr/lib/X11R6/pa20_64 +QMAKE_INCDIR_OPENGL = /opt/graphics/OpenGL/include /usr/contrib/X11R6/include +QMAKE_LIBDIR_OPENGL = /opt/graphics/OpenGL/lib/pa20_64 /usr/contrib/X11R6/lib/pa20_64 -QMAKE_LINK = aCC -QMAKE_LINK_SHLIB = aCC -QMAKE_LFLAGS = -AA +DA2.0W -Wl,+s -QMAKE_LFLAGS_RELEASE = -O -QMAKE_LFLAGS_DEBUG = -g -QMAKE_LFLAGS_SHLIB = -b -Wl,-a,shared -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME = -Wl,+h, -QMAKE_LFLAGS_THREAD = -QMAKE_LFLAGS_NOUNDEF = -Wl,+noallowunsats -QMAKE_LFLAGS_RPATH = -Wl,+b, -QMAKE_HPUX_SHLIB = 3 -QMAKE_EXTENSION_SHLIB = sl +QMAKE_LINK = aCC +QMAKE_LINK_SHLIB = aCC +QMAKE_LFLAGS = -AA +DA2.0W -Wl,+s +QMAKE_LFLAGS_RELEASE = -O +QMAKE_LFLAGS_DEBUG = -g +QMAKE_LFLAGS_SHLIB = -b -Wl,-a,shared +QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB +QMAKE_LFLAGS_SONAME = -Wl,+h, +QMAKE_LFLAGS_THREAD = +QMAKE_LFLAGS_NOUNDEF = -Wl,+noallowunsats +QMAKE_LFLAGS_RPATH = -Wl,+b, +QMAKE_HPUX_SHLIB = 3 +QMAKE_EXTENSION_SHLIB = sl -QMAKE_LIBS = -lm -QMAKE_LIBS_DYNLOAD = -ldl -QMAKE_LIBS_X11 = -lXext -lX11 -QMAKE_LIBS_OPENGL = -lGL -lXt -QMAKE_LIBS_THREAD = -lpthread -QMAKE_LIBS_YACC = -ly +QMAKE_LIBS = -lm +QMAKE_LIBS_DYNLOAD = -ldl +QMAKE_LIBS_X11 = -lXext -lX11 +QMAKE_LIBS_OPENGL = -lGL -lXt +QMAKE_LIBS_THREAD = -lpthread +QMAKE_LIBS_YACC = -ly -QMAKE_AR = ar cqs +QMAKE_AR = ar cqs QMAKE_OBJCOPY = objcopy -QMAKE_RANLIB = +QMAKE_RANLIB = include(../common/unix.conf) load(qt_config) diff --git a/mkspecs/hpux-acc-o64/qmake.conf b/mkspecs/hpux-acc-o64/qmake.conf index f6ceb93c23..c11909fb81 100644 --- a/mkspecs/hpux-acc-o64/qmake.conf +++ b/mkspecs/hpux-acc-o64/qmake.conf @@ -61,7 +61,7 @@ QMAKE_CFLAGS_WARN_OFF = QMAKE_CFLAGS_RELEASE = -O +Oentrysched +Onolimit QMAKE_CFLAGS_DEBUG = -y -g QMAKE_CFLAGS_SHLIB = +Z -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB QMAKE_CFLAGS_YACC = QMAKE_CFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L -D_HPUX_SOURCE diff --git a/mkspecs/hpux-acc/qmake.conf b/mkspecs/hpux-acc/qmake.conf index ef16219ec9..5d1427c1f3 100644 --- a/mkspecs/hpux-acc/qmake.conf +++ b/mkspecs/hpux-acc/qmake.conf @@ -5,89 +5,89 @@ # we also need to redefine _HPUX_SOURCE. See pthread(3t) for more details. # # From the "HP aC++ Online Programmer's Guide": -# Using +DS to Specify Instruction Scheduling: -# * By default, the compiler performs scheduling tuned for the system -# on which you are compiling, or, if specified, tuned for the setting -# of the +DA option. +# Using +DS to Specify Instruction Scheduling: +# * By default, the compiler performs scheduling tuned for the system +# on which you are compiling, or, if specified, tuned for the setting +# of the +DA option. # # From the online "C/HP-UX Reference Manual": -# -Aa -# Enables strict ANSI C compliance. -# -Ae -# Enables ANSI C compliance, HP value-added features (as described -# for +e option), and _HPUX_SOURCE name space macro. It is equivalent -# to -Aa +e -D_HPUX_SOURCE. -# +e -# Enables the following HP value added features while compiling in -# ANSI C mode: sized enum, long long, long pointers, compiler supplied -# defaults for missing arguments to intrinsic calls, and $ in identifier -# HP C extensions. +# -Aa +# Enables strict ANSI C compliance. +# -Ae +# Enables ANSI C compliance, HP value-added features (as described +# for +e option), and _HPUX_SOURCE name space macro. It is equivalent +# to -Aa +e -D_HPUX_SOURCE. +# +e +# Enables the following HP value added features while compiling in +# ANSI C mode: sized enum, long long, long pointers, compiler supplied +# defaults for missing arguments to intrinsic calls, and $ in identifier +# HP C extensions. # -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = hpux -QMAKE_COMPILER_DEFINES += __hpux __HP_aCC +MAKEFILE_GENERATOR = UNIX +QMAKE_PLATFORM = hpux +QMAKE_COMPILER_DEFINES += __hpux __HP_aCC -QMAKE_COMPILER = hp_acc +QMAKE_COMPILER = hp_acc -QMAKE_CC = cc -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -Ae +DAportable -w -QMAKE_CFLAGS_WARN_ON = -QMAKE_CFLAGS_WARN_OFF = -w -QMAKE_CFLAGS_RELEASE = +O1 -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_SHLIB = +Z -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = -QMAKE_CFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L -D_HPUX_SOURCE -mt +QMAKE_CC = cc +QMAKE_LEX = flex +QMAKE_LEXFLAGS = +QMAKE_YACC = yacc +QMAKE_YACCFLAGS = -d +QMAKE_CFLAGS = -Ae +DAportable -w +QMAKE_CFLAGS_WARN_ON = +QMAKE_CFLAGS_WARN_OFF = -w +QMAKE_CFLAGS_RELEASE = +O1 +QMAKE_CFLAGS_DEBUG = -g +QMAKE_CFLAGS_SHLIB = +Z +QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CFLAGS_YACC = +QMAKE_CFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L -D_HPUX_SOURCE -mt -QMAKE_CXX = aCC -QMAKE_CXXFLAGS = -AA +DAportable -w -D__STRICT_ANSI__ -D_HPUX_SOURCE -QMAKE_CXXFLAGS_DEPS = +M -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CXX = aCC +QMAKE_CXXFLAGS = -AA +DAportable -w -D__STRICT_ANSI__ -D_HPUX_SOURCE +QMAKE_CXXFLAGS_DEPS = +M +QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON +QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF +QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L -mt +QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC +QMAKE_CXXFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L -mt -QMAKE_INCDIR = -QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = /usr/include/X11R6 -QMAKE_LIBDIR_X11 = /usr/lib/X11R6 -QMAKE_INCDIR_OPENGL = /opt/graphics/OpenGL/include /usr/contrib/X11R6/include -QMAKE_LIBDIR_OPENGL = /opt/graphics/OpenGL/lib /usr/contrib/X11R6/lib +QMAKE_INCDIR = +QMAKE_LIBDIR = +QMAKE_INCDIR_X11 = /usr/include/X11R6 +QMAKE_LIBDIR_X11 = /usr/lib/X11R6 +QMAKE_INCDIR_OPENGL = /opt/graphics/OpenGL/include /usr/contrib/X11R6/include +QMAKE_LIBDIR_OPENGL = /opt/graphics/OpenGL/lib /usr/contrib/X11R6/lib -QMAKE_LINK = aCC -QMAKE_LINK_SHLIB = aCC -QMAKE_LFLAGS = -AA +DAportable -Wl,+s -QMAKE_LFLAGS_RELEASE = -O -QMAKE_LFLAGS_DEBUG = -g -QMAKE_LFLAGS_SHLIB = -b -Wl,-a,shared -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME = -Wl,+h, -QMAKE_LFLAGS_THREAD = -QMAKE_LFLAGS_NOUNDEF = -Wl,+noallowunsats -QMAKE_LFLAGS_RPATH = -Wl,+b, -QMAKE_HPUX_SHLIB = 1 -QMAKE_EXTENSION_SHLIB = sl +QMAKE_LINK = aCC +QMAKE_LINK_SHLIB = aCC +QMAKE_LFLAGS = -AA +DAportable -Wl,+s +QMAKE_LFLAGS_RELEASE = -O +QMAKE_LFLAGS_DEBUG = -g +QMAKE_LFLAGS_SHLIB = -b -Wl,-a,shared +QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB +QMAKE_LFLAGS_SONAME = -Wl,+h, +QMAKE_LFLAGS_THREAD = +QMAKE_LFLAGS_NOUNDEF = -Wl,+noallowunsats +QMAKE_LFLAGS_RPATH = -Wl,+b, +QMAKE_HPUX_SHLIB = 1 +QMAKE_EXTENSION_SHLIB = sl -QMAKE_LIBS = -lm -QMAKE_LIBS_DYNLOAD = -ldld -QMAKE_LIBS_X11 = -lXext -lX11 -QMAKE_LIBS_OPENGL = -lGL -lXt -QMAKE_LIBS_THREAD = -lpthread -QMAKE_LIBS_YACC = -ly +QMAKE_LIBS = -lm +QMAKE_LIBS_DYNLOAD = -ldld +QMAKE_LIBS_X11 = -lXext -lX11 +QMAKE_LIBS_OPENGL = -lGL -lXt +QMAKE_LIBS_THREAD = -lpthread +QMAKE_LIBS_YACC = -ly -QMAKE_AR = ar cqs +QMAKE_AR = ar cqs QMAKE_OBJCOPY = objcopy -QMAKE_RANLIB = +QMAKE_RANLIB = include(../common/unix.conf) load(qt_config) diff --git a/mkspecs/hpux-g++/qmake.conf b/mkspecs/hpux-g++/qmake.conf index 4c232ee30b..2f02e8e904 100644 --- a/mkspecs/hpux-g++/qmake.conf +++ b/mkspecs/hpux-g++/qmake.conf @@ -5,73 +5,73 @@ # therefore we also need to redefine _HPUX_SOURCE. # -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = hpux -CONFIG += plugin_no_soname +MAKEFILE_GENERATOR = UNIX +QMAKE_PLATFORM = hpux +CONFIG += plugin_no_soname -QMAKE_COMPILER = gcc +QMAKE_COMPILER = gcc -QMAKE_CC = gcc -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -QMAKE_CFLAGS_DEPS = -M -QMAKE_CFLAGS_WARN_ON = -Wall -W -QMAKE_CFLAGS_WARN_OFF = -w -QMAKE_CFLAGS_RELEASE = -O2 -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_SHLIB = -fPIC -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses -QMAKE_CFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L -D_HPUX_SOURCE +QMAKE_CC = gcc +QMAKE_LEX = flex +QMAKE_LEXFLAGS = +QMAKE_YACC = yacc +QMAKE_YACCFLAGS = -d +QMAKE_CFLAGS = +QMAKE_CFLAGS_DEPS = -M +QMAKE_CFLAGS_WARN_ON = -Wall -W +QMAKE_CFLAGS_WARN_OFF = -w +QMAKE_CFLAGS_RELEASE = -O2 +QMAKE_CFLAGS_DEBUG = -g +QMAKE_CFLAGS_SHLIB = -fPIC +QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses +QMAKE_CFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L -D_HPUX_SOURCE -QMAKE_CXX = g++ -QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -D_HPUX_SOURCE -DGLU_VERSION_1_2 -QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CXX = g++ +QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -D_HPUX_SOURCE -DGLU_VERSION_1_2 +QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS +QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON +QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF +QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L +QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC +QMAKE_CXXFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L -QMAKE_INCDIR = -QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = -QMAKE_LIBDIR_X11 = /usr/lib/X11R6 -QMAKE_INCDIR_OPENGL = /opt/Mesa/include /usr/contrib/X11R6/include -QMAKE_LIBDIR_OPENGL = /opt/Mesa/lib /usr/contrib/X11R6/lib +QMAKE_INCDIR = +QMAKE_LIBDIR = +QMAKE_INCDIR_X11 = +QMAKE_LIBDIR_X11 = /usr/lib/X11R6 +QMAKE_INCDIR_OPENGL = /opt/Mesa/include /usr/contrib/X11R6/include +QMAKE_LIBDIR_OPENGL = /opt/Mesa/lib /usr/contrib/X11R6/lib -QMAKE_LINK = g++ -QMAKE_LINK_SHLIB = g++ -QMAKE_LINK_C = gcc -QMAKE_LINK_C_SHLIB = gcc -QMAKE_LFLAGS = -Wl,+s -QMAKE_LFLAGS_RELEASE = -QMAKE_LFLAGS_DEBUG = -QMAKE_LFLAGS_SHLIB = -fPIC -shared -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME = -Wl,+h, -QMAKE_LFLAGS_THREAD = -QMAKE_LFLAGS_NOUNDEF = -Wl,+noallowunsats -QMAKE_LFLAGS_RPATH = -Wl,+b, -QMAKE_HPUX_SHLIB = 1 -QMAKE_EXTENSION_SHLIB = sl +QMAKE_LINK = g++ +QMAKE_LINK_SHLIB = g++ +QMAKE_LINK_C = gcc +QMAKE_LINK_C_SHLIB = gcc +QMAKE_LFLAGS = -Wl,+s +QMAKE_LFLAGS_RELEASE = +QMAKE_LFLAGS_DEBUG = +QMAKE_LFLAGS_SHLIB = -fPIC -shared +QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB +QMAKE_LFLAGS_SONAME = -Wl,+h, +QMAKE_LFLAGS_THREAD = +QMAKE_LFLAGS_NOUNDEF = -Wl,+noallowunsats +QMAKE_LFLAGS_RPATH = -Wl,+b, +QMAKE_HPUX_SHLIB = 1 +QMAKE_EXTENSION_SHLIB = sl -QMAKE_LIBS = -QMAKE_LIBS_DYNLOAD = -ldld -QMAKE_LIBS_X11 = -lXext -lX11 -lm -QMAKE_LIBS_OPENGL = -lGL -QMAKE_LIBS_THREAD = -lpthread -QMAKE_LIBS_YACC = -ly +QMAKE_LIBS = +QMAKE_LIBS_DYNLOAD = -ldld +QMAKE_LIBS_X11 = -lXext -lX11 -lm +QMAKE_LIBS_OPENGL = -lGL +QMAKE_LIBS_THREAD = -lpthread +QMAKE_LIBS_YACC = -ly -QMAKE_AR = ar cqs +QMAKE_AR = ar cqs QMAKE_OBJCOPY = objcopy -QMAKE_RANLIB = +QMAKE_RANLIB = include(../common/unix.conf) load(qt_config) diff --git a/mkspecs/hpuxi-acc-32/qmake.conf b/mkspecs/hpuxi-acc-32/qmake.conf index 14487f28de..a469b4f34c 100644 --- a/mkspecs/hpuxi-acc-32/qmake.conf +++ b/mkspecs/hpuxi-acc-32/qmake.conf @@ -2,68 +2,68 @@ # qmake configuration for hpuxi-acc-32 # -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = hpux -CONFIG += plugin_no_soname +MAKEFILE_GENERATOR = UNIX +QMAKE_PLATFORM = hpux +CONFIG += plugin_no_soname -QMAKE_COMPILER = hp_acc +QMAKE_COMPILER = hp_acc -QMAKE_CC = cc -QMAKE_LEX = lex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = +DSitanium -w -QMAKE_CFLAGS_WARN_ON = -QMAKE_CFLAGS_WARN_OFF = -w -QMAKE_CFLAGS_RELEASE = +O1 -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_SHLIB = +Z -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = -QMAKE_CFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L -D_HPUX_SOURCE -D_REENTRANT -mt +QMAKE_CC = cc +QMAKE_LEX = lex +QMAKE_LEXFLAGS = +QMAKE_YACC = yacc +QMAKE_YACCFLAGS = -d +QMAKE_CFLAGS = +DSitanium -w +QMAKE_CFLAGS_WARN_ON = +QMAKE_CFLAGS_WARN_OFF = -w +QMAKE_CFLAGS_RELEASE = +O1 +QMAKE_CFLAGS_DEBUG = -g +QMAKE_CFLAGS_SHLIB = +Z +QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CFLAGS_YACC = +QMAKE_CFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L -D_HPUX_SOURCE -D_REENTRANT -mt -QMAKE_CXX = aCC -QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -D__STRICT_ANSI__ -D_HPUX_SOURCE -QMAKE_CXXFLAGS_DEPS = +M -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CXX = aCC +QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -D__STRICT_ANSI__ -D_HPUX_SOURCE +QMAKE_CXXFLAGS_DEPS = +M +QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON +QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF +QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L -D_REENTRANT -mt +QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC +QMAKE_CXXFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L -D_REENTRANT -mt -QMAKE_INCDIR = -QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = /usr/include/X11R6 -QMAKE_LIBDIR_X11 = /usr/lib/hpux32/X11R6 -QMAKE_INCDIR_OPENGL = /opt/graphics/OpenGL/include /usr/contrib/X11R6/include -QMAKE_LIBDIR_OPENGL = /opt/graphics/OpenGL/lib/hpux32 /usr/contrib/X11R6/lib/hpux32 +QMAKE_INCDIR = +QMAKE_LIBDIR = +QMAKE_INCDIR_X11 = /usr/include/X11R6 +QMAKE_LIBDIR_X11 = /usr/lib/hpux32/X11R6 +QMAKE_INCDIR_OPENGL = /opt/graphics/OpenGL/include /usr/contrib/X11R6/include +QMAKE_LIBDIR_OPENGL = /opt/graphics/OpenGL/lib/hpux32 /usr/contrib/X11R6/lib/hpux32 -QMAKE_LINK = aCC -QMAKE_LINK_SHLIB = aCC -QMAKE_LFLAGS = +DSitanium -Wl,+s -QMAKE_LFLAGS_RELEASE = -O -QMAKE_LFLAGS_DEBUG = -g -QMAKE_LFLAGS_SHLIB = -b -Wl,-a,shared -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME = -Wl,+h, -QMAKE_LFLAGS_NOUNDEF = -Wl,+noallowunsats -QMAKE_LFLAGS_THREAD = -QMAKE_LFLAGS_RPATH = +QMAKE_LINK = aCC +QMAKE_LINK_SHLIB = aCC +QMAKE_LFLAGS = +DSitanium -Wl,+s +QMAKE_LFLAGS_RELEASE = -O +QMAKE_LFLAGS_DEBUG = -g +QMAKE_LFLAGS_SHLIB = -b -Wl,-a,shared +QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB +QMAKE_LFLAGS_SONAME = -Wl,+h, +QMAKE_LFLAGS_NOUNDEF = -Wl,+noallowunsats +QMAKE_LFLAGS_THREAD = +QMAKE_LFLAGS_RPATH = -QMAKE_LIBS = -lm -QMAKE_LIBS_DYNLOAD = -ldl -QMAKE_LIBS_X11 = -lXext -lX11 -QMAKE_LIBS_OPENGL = -lGL -lXt -QMAKE_LIBS_THREAD = -lpthread -QMAKE_LIBS_YACC = -ly +QMAKE_LIBS = -lm +QMAKE_LIBS_DYNLOAD = -ldl +QMAKE_LIBS_X11 = -lXext -lX11 +QMAKE_LIBS_OPENGL = -lGL -lXt +QMAKE_LIBS_THREAD = -lpthread +QMAKE_LIBS_YACC = -ly -QMAKE_AR = ar cqs +QMAKE_AR = ar cqs QMAKE_OBJCOPY = objcopy -QMAKE_RANLIB = +QMAKE_RANLIB = include(../common/unix.conf) load(qt_config) diff --git a/mkspecs/hpuxi-acc-64/qmake.conf b/mkspecs/hpuxi-acc-64/qmake.conf index e320a83eec..a3b0ad0849 100644 --- a/mkspecs/hpuxi-acc-64/qmake.conf +++ b/mkspecs/hpuxi-acc-64/qmake.conf @@ -47,7 +47,7 @@ MAKEFILE_GENERATOR = UNIX QMAKE_PLATFORM = hpux -CONFIG += plugin_no_soname +CONFIG += plugin_no_soname QMAKE_COMPILER = hp_acc diff --git a/mkspecs/hpuxi-g++-64/qmake.conf b/mkspecs/hpuxi-g++-64/qmake.conf index 7d83639987..756d361bb9 100644 --- a/mkspecs/hpuxi-g++-64/qmake.conf +++ b/mkspecs/hpuxi-g++-64/qmake.conf @@ -4,76 +4,76 @@ # We define _POSIX_C_SOURCE to 199506L when using threads, therefore # we also need to redefine _HPUX_SOURCE. # From pthread(3t): -# Some documentation will recommend the use of -D_REENTRANT for -# compilation. While this also functions properly, it is considered -# an obsolescent form. +# Some documentation will recommend the use of -D_REENTRANT for +# compilation. While this also functions properly, it is considered +# an obsolescent form. # See pthread(3t) for more details. # -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = hpux +MAKEFILE_GENERATOR = UNIX +QMAKE_PLATFORM = hpux -QMAKE_COMPILER = gcc +QMAKE_COMPILER = gcc -QMAKE_CC = gcc -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -mlp64 -QMAKE_CFLAGS_DEPS = -M -QMAKE_CFLAGS_WARN_ON = -Wall -W -QMAKE_CFLAGS_WARN_OFF = -w -QMAKE_CFLAGS_RELEASE = -O2 -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_SHLIB = -fPIC -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses -QMAKE_CFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L -D_HPUX_SOURCE +QMAKE_CC = gcc +QMAKE_LEX = flex +QMAKE_LEXFLAGS = +QMAKE_YACC = yacc +QMAKE_YACCFLAGS = -d +QMAKE_CFLAGS = -mlp64 +QMAKE_CFLAGS_DEPS = -M +QMAKE_CFLAGS_WARN_ON = -Wall -W +QMAKE_CFLAGS_WARN_OFF = -w +QMAKE_CFLAGS_RELEASE = -O2 +QMAKE_CFLAGS_DEBUG = -g +QMAKE_CFLAGS_SHLIB = -fPIC +QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses +QMAKE_CFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L -D_HPUX_SOURCE -QMAKE_CXX = g++ -QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -D_HPUX_SOURCE -QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CXX = g++ +QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -D_HPUX_SOURCE +QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS +QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON +QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF +QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L +QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC +QMAKE_CXXFLAGS_THREAD = -D_POSIX_C_SOURCE=199506L -QMAKE_INCDIR = -QMAKE_LIBDIR = /usr/lib/hpux64 -QMAKE_INCDIR_X11 = /usr/include/X11R6 -QMAKE_LIBDIR_X11 = /usr/lib/hpux64/X11R6 -QMAKE_INCDIR_OPENGL = /opt/graphics/OpenGL/include /usr/contrib/X11R6/include -QMAKE_LIBDIR_OPENGL = /opt/graphics/OpenGL/lib/hpux64 /usr/contrib/X11R6/lib/hpux64 +QMAKE_INCDIR = +QMAKE_LIBDIR = /usr/lib/hpux64 +QMAKE_INCDIR_X11 = /usr/include/X11R6 +QMAKE_LIBDIR_X11 = /usr/lib/hpux64/X11R6 +QMAKE_INCDIR_OPENGL = /opt/graphics/OpenGL/include /usr/contrib/X11R6/include +QMAKE_LIBDIR_OPENGL = /opt/graphics/OpenGL/lib/hpux64 /usr/contrib/X11R6/lib/hpux64 -QMAKE_LINK = g++ -QMAKE_LINK_SHLIB = g++ -QMAKE_LINK_C = gcc -QMAKE_LINK_C_SHLIB = gcc -QMAKE_LFLAGS = -mlp64 -Wl,+s -QMAKE_LFLAGS_RELEASE = -QMAKE_LFLAGS_DEBUG = -QMAKE_LFLAGS_SHLIB = -fPIC -shared -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME = -Wl,+h, -QMAKE_LFLAGS_THREAD = -lpthread -QMAKE_LFLAGS_NOUNDEF = -Wl,+noallowunsats -QMAKE_LFLAGS_RPATH = -Wl,+b, +QMAKE_LINK = g++ +QMAKE_LINK_SHLIB = g++ +QMAKE_LINK_C = gcc +QMAKE_LINK_C_SHLIB = gcc +QMAKE_LFLAGS = -mlp64 -Wl,+s +QMAKE_LFLAGS_RELEASE = +QMAKE_LFLAGS_DEBUG = +QMAKE_LFLAGS_SHLIB = -fPIC -shared +QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB +QMAKE_LFLAGS_SONAME = -Wl,+h, +QMAKE_LFLAGS_THREAD = -lpthread +QMAKE_LFLAGS_NOUNDEF = -Wl,+noallowunsats +QMAKE_LFLAGS_RPATH = -Wl,+b, -QMAKE_LIBS = -lm -QMAKE_LIBS_DYNLOAD = -ldl -QMAKE_LIBS_X11 = -lXext -lX11 -QMAKE_LIBS_OPENGL = -lGL -QMAKE_LIBS_THREAD = -lpthread -QMAKE_LIBS_YACC = -ly +QMAKE_LIBS = -lm +QMAKE_LIBS_DYNLOAD = -ldl +QMAKE_LIBS_X11 = -lXext -lX11 +QMAKE_LIBS_OPENGL = -lGL +QMAKE_LIBS_THREAD = -lpthread +QMAKE_LIBS_YACC = -ly -QMAKE_AR = ar cqs +QMAKE_AR = ar cqs QMAKE_OBJCOPY = objcopy -QMAKE_RANLIB = +QMAKE_RANLIB = include(../common/unix.conf) load(qt_config) diff --git a/mkspecs/hurd-g++/qmake.conf b/mkspecs/hurd-g++/qmake.conf index 36437ead30..9a3e83f373 100644 --- a/mkspecs/hurd-g++/qmake.conf +++ b/mkspecs/hurd-g++/qmake.conf @@ -2,48 +2,48 @@ # qmake configuration for hurd-g++ # -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = hurd -CONFIG += incremental gdb_dwarf_index +MAKEFILE_GENERATOR = UNIX +QMAKE_PLATFORM = hurd +CONFIG += incremental gdb_dwarf_index QMAKE_INCREMENTAL_STYLE = sublib -QMAKE_CFLAGS_THREAD += -D_REENTRANT -QMAKE_CXXFLAGS_THREAD += $$QMAKE_CFLAGS_THREAD +QMAKE_CFLAGS_THREAD += -D_REENTRANT +QMAKE_CXXFLAGS_THREAD += $$QMAKE_CFLAGS_THREAD -QMAKE_INCDIR = -QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = /usr/X11R6/include -QMAKE_LIBDIR_X11 = /usr/X11R6/lib -QMAKE_INCDIR_OPENGL = /usr/X11R6/include -QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib +QMAKE_INCDIR = +QMAKE_LIBDIR = +QMAKE_INCDIR_X11 = /usr/X11R6/include +QMAKE_LIBDIR_X11 = /usr/X11R6/lib +QMAKE_INCDIR_OPENGL = /usr/X11R6/include +QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib QMAKE_INCDIR_OPENGL_ES1 = $$QMAKE_INCDIR_OPENGL QMAKE_LIBDIR_OPENGL_ES1 = $$QMAKE_LIBDIR_OPENGL QMAKE_INCDIR_OPENGL_ES2 = $$QMAKE_INCDIR_OPENGL QMAKE_LIBDIR_OPENGL_ES2 = $$QMAKE_LIBDIR_OPENGL -QMAKE_INCDIR_EGL = -QMAKE_LIBDIR_EGL = -QMAKE_INCDIR_OPENVG = -QMAKE_LIBDIR_OPENVG = - -QMAKE_LIBS = -QMAKE_LIBS_DYNLOAD = -ldl -QMAKE_LIBS_X11 = -lXext -lX11 -lm -QMAKE_LIBS_NIS = -lnsl -QMAKE_LIBS_EGL = -lEGL -QMAKE_LIBS_OPENGL = -lGL -QMAKE_LIBS_OPENGL_ES1 = -lGLES_CM -QMAKE_LIBS_OPENGL_ES2 = -lGLESv2 -QMAKE_LIBS_OPENVG = -lOpenVG -QMAKE_LIBS_THREAD = -lpthread - -QMAKE_AR = ar cqs -QMAKE_OBJCOPY = objcopy -QMAKE_RANLIB = - -QMAKE_STRIP = strip -QMAKE_STRIPFLAGS_LIB += --strip-unneeded -QMAKE_INSTALL_FILE = install -m 644 -p -QMAKE_INSTALL_PROGRAM = install -m 755 -p +QMAKE_INCDIR_EGL = +QMAKE_LIBDIR_EGL = +QMAKE_INCDIR_OPENVG = +QMAKE_LIBDIR_OPENVG = + +QMAKE_LIBS = +QMAKE_LIBS_DYNLOAD = -ldl +QMAKE_LIBS_X11 = -lXext -lX11 -lm +QMAKE_LIBS_NIS = -lnsl +QMAKE_LIBS_EGL = -lEGL +QMAKE_LIBS_OPENGL = -lGL +QMAKE_LIBS_OPENGL_ES1 = -lGLES_CM +QMAKE_LIBS_OPENGL_ES2 = -lGLESv2 +QMAKE_LIBS_OPENVG = -lOpenVG +QMAKE_LIBS_THREAD = -lpthread + +QMAKE_AR = ar cqs +QMAKE_OBJCOPY = objcopy +QMAKE_RANLIB = + +QMAKE_STRIP = strip +QMAKE_STRIPFLAGS_LIB += --strip-unneeded +QMAKE_INSTALL_FILE = install -m 644 -p +QMAKE_INSTALL_PROGRAM = install -m 755 -p include(../common/unix.conf) include(../common/gcc-base-unix.conf) @@ -51,4 +51,4 @@ include(../common/g++-unix.conf) load(qt_config) # This is tricky but needed -QMAKE_LIBS += $$QMAKE_LIBS_THREAD +QMAKE_LIBS += $$QMAKE_LIBS_THREAD diff --git a/mkspecs/irix-cc-64/qmake.conf b/mkspecs/irix-cc-64/qmake.conf index 05c2031cdb..33514486f9 100644 --- a/mkspecs/irix-cc-64/qmake.conf +++ b/mkspecs/irix-cc-64/qmake.conf @@ -2,105 +2,105 @@ # qmake configuration for irix-cc-64 # # From cc(1): -# -64 -# Generates a 64-bit object. This defaults to -mips4 if -mips3 has -# not been specified. -# -LANG: ... -# The language feature option group controls the source language -# interpretation assumed by the compiler. The individual controls -# in this group are as follows: -# ansi-for-init-scope [ = ( ON|OFF ) ] -# Enables or disables the ANSI scoping rules for for-init -# declarations (the scope of the name declared extends to -# the end of the for statement). This enables the behavior -# that is required by the C++ standard. The default value -# is OFF, which is the ARM behavior (the scope of the name -# declared extends to the end of the block enclosing the for -# statement). -# bool [ = ( ON|OFF ) ] -# Enables or disables the predefined bool data type, along -# with the predefined values true and false. Use this option -# only to suppress this type in old code that defines bool -# itself. Because this option changes the mangling of function -# names with bool parameters, all files comprising a program -# should be compiled with consistent options. -# Default is ON. -# The _BOOL feature macro can be used in #ifdefs to do conditional -# compilation based on whether or not this option is enabled. -# std -# Enables use of the standard C++ library and standard- -# conforming iostream library. Specifying this flag also -# triggers other standard-conforming behavior, such as the -# new rules for the scope of for loop initializers. +# -64 +# Generates a 64-bit object. This defaults to -mips4 if -mips3 has +# not been specified. +# -LANG: ... +# The language feature option group controls the source language +# interpretation assumed by the compiler. The individual controls +# in this group are as follows: +# ansi-for-init-scope [ = ( ON|OFF ) ] +# Enables or disables the ANSI scoping rules for for-init +# declarations (the scope of the name declared extends to +# the end of the for statement). This enables the behavior +# that is required by the C++ standard. The default value +# is OFF, which is the ARM behavior (the scope of the name +# declared extends to the end of the block enclosing the for +# statement). +# bool [ = ( ON|OFF ) ] +# Enables or disables the predefined bool data type, along +# with the predefined values true and false. Use this option +# only to suppress this type in old code that defines bool +# itself. Because this option changes the mangling of function +# names with bool parameters, all files comprising a program +# should be compiled with consistent options. +# Default is ON. +# The _BOOL feature macro can be used in #ifdefs to do conditional +# compilation based on whether or not this option is enabled. +# std +# Enables use of the standard C++ library and standard- +# conforming iostream library. Specifying this flag also +# triggers other standard-conforming behavior, such as the +# new rules for the scope of for loop initializers. # -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = irix -QMAKE_COMPILER_DEFINES += __sgi __EDG +MAKEFILE_GENERATOR = UNIX +QMAKE_PLATFORM = irix +QMAKE_COMPILER_DEFINES += __sgi __EDG -QMAKE_COMPILER = sgi_cc +QMAKE_COMPILER = sgi_cc -QMAKE_CC = cc -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -64 -signed -woff 1209,1355,1375,1424,3303 -QMAKE_CFLAGS_DEPS = -M -QMAKE_CFLAGS_WARN_ON = -fullwarn -QMAKE_CFLAGS_WARN_OFF = -QMAKE_CFLAGS_RELEASE = -O2 -OPT:Olimit=3000 -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_SHLIB = -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = -woff 1110,1174,3262 -QMAKE_CFLAGS_THREAD = +QMAKE_CC = cc +QMAKE_LEX = flex +QMAKE_LEXFLAGS = +QMAKE_YACC = yacc +QMAKE_YACCFLAGS = -d +QMAKE_CFLAGS = -64 -signed -woff 1209,1355,1375,1424,3303 +QMAKE_CFLAGS_DEPS = -M +QMAKE_CFLAGS_WARN_ON = -fullwarn +QMAKE_CFLAGS_WARN_OFF = +QMAKE_CFLAGS_RELEASE = -O2 -OPT:Olimit=3000 +QMAKE_CFLAGS_DEBUG = -g +QMAKE_CFLAGS_SHLIB = +QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CFLAGS_YACC = -woff 1110,1174,3262 +QMAKE_CFLAGS_THREAD = QMAKE_CFLAGS_EXCEPTIONS_OFF = -LANG:exceptions=off -QMAKE_CXX = CC -QMAKE_CXXFLAGS = -64 -signed -LANG:std:libc_in_namespace_std=ON -woff 1209,1355,1375,1424,3303 -QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CXX = CC +QMAKE_CXXFLAGS = -64 -signed -LANG:std:libc_in_namespace_std=ON -woff 1209,1355,1375,1424,3303 +QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS +QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON +QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF +QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_THREAD = +QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC +QMAKE_CXXFLAGS_THREAD = QMAKE_CXXFLAGS_EXCEPTIONS_OFF = $$QMAKE_CFLAGS_EXCEPTIONS_OFF -QMAKE_INCDIR = -QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = -QMAKE_LIBDIR_X11 = -QMAKE_INCDIR_OPENGL = -QMAKE_LIBDIR_OPENGL = +QMAKE_INCDIR = +QMAKE_LIBDIR = +QMAKE_INCDIR_X11 = +QMAKE_LIBDIR_X11 = +QMAKE_INCDIR_OPENGL = +QMAKE_LIBDIR_OPENGL = -QMAKE_LINK = CC -QMAKE_LINK_SHLIB = CC -QMAKE_LFLAGS = -64 -QMAKE_LFLAGS_RELEASE = -QMAKE_LFLAGS_DEBUG = -g -QMAKE_LFLAGS_SHLIB = -shared -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME = -Wl,-soname, -QMAKE_LFLAGS_THREAD = -QMAKE_LFLAGS_NOUNDEF = -Wl,-no_unresolved -QMAKE_LFLAGS_RPATH = -Wl,-rpath, +QMAKE_LINK = CC +QMAKE_LINK_SHLIB = CC +QMAKE_LFLAGS = -64 +QMAKE_LFLAGS_RELEASE = +QMAKE_LFLAGS_DEBUG = -g +QMAKE_LFLAGS_SHLIB = -shared +QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB +QMAKE_LFLAGS_SONAME = -Wl,-soname, +QMAKE_LFLAGS_THREAD = +QMAKE_LFLAGS_NOUNDEF = -Wl,-no_unresolved +QMAKE_LFLAGS_RPATH = -Wl,-rpath, QMAKE_LFLAGS_EXCEPTIONS_OFF = $$QMAKE_CFLAGS_EXCEPTIONS_OFF -QMAKE_LIBS = -QMAKE_LIBS_DYNLOAD = -QMAKE_LIBS_X11 = -lXext -lX11 -lm -QMAKE_LIBS_OPENGL = -lGL -lm -QMAKE_LIBS_THREAD = -lpthread +QMAKE_LIBS = +QMAKE_LIBS_DYNLOAD = +QMAKE_LIBS_X11 = -lXext -lX11 -lm +QMAKE_LIBS_OPENGL = -lGL -lm +QMAKE_LIBS_THREAD = -lpthread -QMAKE_AR = CC -ar -o +QMAKE_AR = CC -ar -o QMAKE_OBJCOPY = objcopy -QMAKE_RANLIB = +QMAKE_RANLIB = -QMAKE_CLEAN = -r $(OBJECTS_DIR)so_locations $(OBJECTS_DIR)ii_files +QMAKE_CLEAN = -r $(OBJECTS_DIR)so_locations $(OBJECTS_DIR)ii_files include(../common/unix.conf) load(qt_config) diff --git a/mkspecs/irix-cc/qmake.conf b/mkspecs/irix-cc/qmake.conf index cfd7a98213..8073cf4012 100644 --- a/mkspecs/irix-cc/qmake.conf +++ b/mkspecs/irix-cc/qmake.conf @@ -2,105 +2,105 @@ # qmake configuration for irix-cc # # From cc(1): -# -n32 -# Generates a (new) 32-bit object. This defaults to -mips3 if -# -mips4 has not been specified. -# -LANG: ... -# The language feature option group controls the source language -# interpretation assumed by the compiler. The individual controls -# in this group are as follows: -# ansi-for-init-scope [ = ( ON|OFF ) ] -# Enables or disables the ANSI scoping rules for for-init -# declarations (the scope of the name declared extends to -# the end of the for statement). This enables the behavior -# that is required by the C++ standard. The default value -# is OFF, which is the ARM behavior (the scope of the name -# declared extends to the end of the block enclosing the for -# statement). -# bool [ = ( ON|OFF ) ] -# Enables or disables the predefined bool data type, along -# with the predefined values true and false. Use this option -# only to suppress this type in old code that defines bool -# itself. Because this option changes the mangling of function -# names with bool parameters, all files comprising a program -# should be compiled with consistent options. -# Default is ON. -# The _BOOL feature macro can be used in #ifdefs to do conditional -# compilation based on whether or not this option is enabled. -# std -# Enables use of the standard C++ library and standard- -# conforming iostream library. Specifying this flag also -# triggers other standard-conforming behavior, such as the -# new rules for the scope of for loop initializers. +# -n32 +# Generates a (new) 32-bit object. This defaults to -mips3 if +# -mips4 has not been specified. +# -LANG: ... +# The language feature option group controls the source language +# interpretation assumed by the compiler. The individual controls +# in this group are as follows: +# ansi-for-init-scope [ = ( ON|OFF ) ] +# Enables or disables the ANSI scoping rules for for-init +# declarations (the scope of the name declared extends to +# the end of the for statement). This enables the behavior +# that is required by the C++ standard. The default value +# is OFF, which is the ARM behavior (the scope of the name +# declared extends to the end of the block enclosing the for +# statement). +# bool [ = ( ON|OFF ) ] +# Enables or disables the predefined bool data type, along +# with the predefined values true and false. Use this option +# only to suppress this type in old code that defines bool +# itself. Because this option changes the mangling of function +# names with bool parameters, all files comprising a program +# should be compiled with consistent options. +# Default is ON. +# The _BOOL feature macro can be used in #ifdefs to do conditional +# compilation based on whether or not this option is enabled. +# std +# Enables use of the standard C++ library and standard- +# conforming iostream library. Specifying this flag also +# triggers other standard-conforming behavior, such as the +# new rules for the scope of for loop initializers. # -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = irix -QMAKE_COMPILER_DEFINES += __sgi __EDG +MAKEFILE_GENERATOR = UNIX +QMAKE_PLATFORM = irix +QMAKE_COMPILER_DEFINES += __sgi __EDG -QMAKE_COMPILER = sgi_cc +QMAKE_COMPILER = sgi_cc -QMAKE_CC = cc -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -n32 -signed -woff 1209,1355,1375,1424,3303 -QMAKE_CFLAGS_DEPS = -M -QMAKE_CFLAGS_WARN_ON = -fullwarn -QMAKE_CFLAGS_WARN_OFF = -QMAKE_CFLAGS_RELEASE = -O2 -OPT:Olimit=3000 -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_SHLIB = -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = -woff 1110,1174,3262 -QMAKE_CFLAGS_THREAD = +QMAKE_CC = cc +QMAKE_LEX = flex +QMAKE_LEXFLAGS = +QMAKE_YACC = yacc +QMAKE_YACCFLAGS = -d +QMAKE_CFLAGS = -n32 -signed -woff 1209,1355,1375,1424,3303 +QMAKE_CFLAGS_DEPS = -M +QMAKE_CFLAGS_WARN_ON = -fullwarn +QMAKE_CFLAGS_WARN_OFF = +QMAKE_CFLAGS_RELEASE = -O2 -OPT:Olimit=3000 +QMAKE_CFLAGS_DEBUG = -g +QMAKE_CFLAGS_SHLIB = +QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CFLAGS_YACC = -woff 1110,1174,3262 +QMAKE_CFLAGS_THREAD = QMAKE_CFLAGS_EXCEPTIONS_OFF = -LANG:exceptions=off -QMAKE_CXX = CC -QMAKE_CXXFLAGS = -n32 -signed -LANG:std:libc_in_namespace_std=ON -woff 1209,1355,1375,1424,3303 -QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CXX = CC +QMAKE_CXXFLAGS = -n32 -signed -LANG:std:libc_in_namespace_std=ON -woff 1209,1355,1375,1424,3303 +QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS +QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON +QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF +QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_THREAD = +QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC +QMAKE_CXXFLAGS_THREAD = QMAKE_CXXFLAGS_EXCEPTIONS_OFF = $$QMAKE_CFLAGS_EXCEPTIONS_OFF -QMAKE_INCDIR = -QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = -QMAKE_LIBDIR_X11 = -QMAKE_INCDIR_OPENGL = -QMAKE_LIBDIR_OPENGL = +QMAKE_INCDIR = +QMAKE_LIBDIR = +QMAKE_INCDIR_X11 = +QMAKE_LIBDIR_X11 = +QMAKE_INCDIR_OPENGL = +QMAKE_LIBDIR_OPENGL = -QMAKE_LINK = CC -QMAKE_LINK_SHLIB = CC -QMAKE_LFLAGS = -n32 -QMAKE_LFLAGS_RELEASE = -QMAKE_LFLAGS_DEBUG = -g -QMAKE_LFLAGS_SHLIB = -shared -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME = -Wl,-soname, -QMAKE_LFLAGS_THREAD = -QMAKE_LFLAGS_NOUNDEF = -Wl,-no_unresolved -QMAKE_LFLAGS_RPATH = -Wl,-rpath, +QMAKE_LINK = CC +QMAKE_LINK_SHLIB = CC +QMAKE_LFLAGS = -n32 +QMAKE_LFLAGS_RELEASE = +QMAKE_LFLAGS_DEBUG = -g +QMAKE_LFLAGS_SHLIB = -shared +QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB +QMAKE_LFLAGS_SONAME = -Wl,-soname, +QMAKE_LFLAGS_THREAD = +QMAKE_LFLAGS_NOUNDEF = -Wl,-no_unresolved +QMAKE_LFLAGS_RPATH = -Wl,-rpath, QMAKE_LFLAGS_EXCEPTIONS_OFF = $$QMAKE_CFLAGS_EXCEPTIONS_OFF -QMAKE_LIBS = -QMAKE_LIBS_DYNLOAD = -QMAKE_LIBS_X11 = -lXext -lX11 -lm -QMAKE_LIBS_OPENGL = -lGL -lm -QMAKE_LIBS_THREAD = -lpthread +QMAKE_LIBS = +QMAKE_LIBS_DYNLOAD = +QMAKE_LIBS_X11 = -lXext -lX11 -lm +QMAKE_LIBS_OPENGL = -lGL -lm +QMAKE_LIBS_THREAD = -lpthread -QMAKE_AR = CC -ar -o +QMAKE_AR = CC -ar -o QMAKE_OBJCOPY = objcopy -QMAKE_RANLIB = +QMAKE_RANLIB = -QMAKE_CLEAN = -r $(OBJECTS_DIR)so_locations $(OBJECTS_DIR)ii_files +QMAKE_CLEAN = -r $(OBJECTS_DIR)so_locations $(OBJECTS_DIR)ii_files include(../common/unix.conf) load(qt_config) diff --git a/mkspecs/irix-g++-64/qmake.conf b/mkspecs/irix-g++-64/qmake.conf index 5f679553ac..845ded9667 100644 --- a/mkspecs/irix-g++-64/qmake.conf +++ b/mkspecs/irix-g++-64/qmake.conf @@ -2,75 +2,75 @@ # qmake configuration for irix-g++-64 # -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = irix -QMAKE_COMPILER_DEFINES += __sgi __GNUC__ +MAKEFILE_GENERATOR = UNIX +QMAKE_PLATFORM = irix +QMAKE_COMPILER_DEFINES += __sgi __GNUC__ -QMAKE_COMPILER = gcc +QMAKE_COMPILER = gcc -QMAKE_CC = gcc -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -mabi=64 -QMAKE_CFLAGS_DEPS = -M -QMAKE_CFLAGS_WARN_ON = -Wall -W -QMAKE_CFLAGS_WARN_OFF = -w -QMAKE_CFLAGS_RELEASE = -O2 -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_SHLIB = -fPIC -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses -QMAKE_CFLAGS_THREAD = +QMAKE_CC = gcc +QMAKE_LEX = flex +QMAKE_LEXFLAGS = +QMAKE_YACC = yacc +QMAKE_YACCFLAGS = -d +QMAKE_CFLAGS = -mabi=64 +QMAKE_CFLAGS_DEPS = -M +QMAKE_CFLAGS_WARN_ON = -Wall -W +QMAKE_CFLAGS_WARN_OFF = -w +QMAKE_CFLAGS_RELEASE = -O2 +QMAKE_CFLAGS_DEBUG = -g +QMAKE_CFLAGS_SHLIB = -fPIC +QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses +QMAKE_CFLAGS_THREAD = -QMAKE_CXX = g++ -QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CXX = g++ +QMAKE_CXXFLAGS = $$QMAKE_CFLAGS +QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS +QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON +QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF +QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_THREAD = +QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC +QMAKE_CXXFLAGS_THREAD = -QMAKE_INCDIR = -QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = -QMAKE_LIBDIR_X11 = -QMAKE_INCDIR_OPENGL = -QMAKE_LIBDIR_OPENGL = +QMAKE_INCDIR = +QMAKE_LIBDIR = +QMAKE_INCDIR_X11 = +QMAKE_LIBDIR_X11 = +QMAKE_INCDIR_OPENGL = +QMAKE_LIBDIR_OPENGL = -QMAKE_LINK = g++ -QMAKE_LINK_SHLIB = g++ -QMAKE_LINK_C = gcc -QMAKE_LINK_C_SHLIB = gcc -QMAKE_LFLAGS = -mabi=64 -QMAKE_LFLAGS_RELEASE = -QMAKE_LFLAGS_DEBUG = -QMAKE_LFLAGS_SHLIB = -shared -Wl,-LD_LAYOUT:lgot_buffer=1000 -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME = -Wl,-soname, -QMAKE_LFLAGS_THREAD = -QMAKE_LFLAGS_NOUNDEF = -Wl,-no_unresolved -QMAKE_LFLAGS_RPATH = -Wl,-rpath, +QMAKE_LINK = g++ +QMAKE_LINK_SHLIB = g++ +QMAKE_LINK_C = gcc +QMAKE_LINK_C_SHLIB = gcc +QMAKE_LFLAGS = -mabi=64 +QMAKE_LFLAGS_RELEASE = +QMAKE_LFLAGS_DEBUG = +QMAKE_LFLAGS_SHLIB = -shared -Wl,-LD_LAYOUT:lgot_buffer=1000 +QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB +QMAKE_LFLAGS_SONAME = -Wl,-soname, +QMAKE_LFLAGS_THREAD = +QMAKE_LFLAGS_NOUNDEF = -Wl,-no_unresolved +QMAKE_LFLAGS_RPATH = -Wl,-rpath, -QMAKE_LIBS = -lC -QMAKE_LIBS_DYNLOAD = -QMAKE_LIBS_X11 = -lXext -lX11 -lm +QMAKE_LIBS = -lC +QMAKE_LIBS_DYNLOAD = +QMAKE_LIBS_X11 = -lXext -lX11 -lm # libGLU is using the SGI C++ library internally and this somehow clashes # with the GNU C++ library (similar name mangling and symbol names?) # so we add -lC so that the SGI C++ library is used first... -QMAKE_LIBS_OPENGL = -lGL -QMAKE_LIBS_THREAD = -lpthread +QMAKE_LIBS_OPENGL = -lGL +QMAKE_LIBS_THREAD = -lpthread -QMAKE_AR = ar cq +QMAKE_AR = ar cq QMAKE_OBJCOPY = objcopy -QMAKE_RANLIB = +QMAKE_RANLIB = -QMAKE_CLEAN = so_locations +QMAKE_CLEAN = so_locations include(../common/unix.conf) load(qt_config) diff --git a/mkspecs/irix-g++/qmake.conf b/mkspecs/irix-g++/qmake.conf index 8783af4b54..af5f5fe91d 100644 --- a/mkspecs/irix-g++/qmake.conf +++ b/mkspecs/irix-g++/qmake.conf @@ -2,75 +2,75 @@ # qmake configuration for irix-g++ # -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = irix -QMAKE_COMPILER_DEFINES += __sgi __GNUC__ +MAKEFILE_GENERATOR = UNIX +QMAKE_PLATFORM = irix +QMAKE_COMPILER_DEFINES += __sgi __GNUC__ -QMAKE_COMPILER = gcc +QMAKE_COMPILER = gcc -QMAKE_CC = gcc -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -QMAKE_CFLAGS_DEPS = -M -QMAKE_CFLAGS_WARN_ON = -Wall -W -QMAKE_CFLAGS_WARN_OFF = -w -QMAKE_CFLAGS_RELEASE = -O2 -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_SHLIB = -fPIC -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses -QMAKE_CFLAGS_THREAD = +QMAKE_CC = gcc +QMAKE_LEX = flex +QMAKE_LEXFLAGS = +QMAKE_YACC = yacc +QMAKE_YACCFLAGS = -d +QMAKE_CFLAGS = +QMAKE_CFLAGS_DEPS = -M +QMAKE_CFLAGS_WARN_ON = -Wall -W +QMAKE_CFLAGS_WARN_OFF = -w +QMAKE_CFLAGS_RELEASE = -O2 +QMAKE_CFLAGS_DEBUG = -g +QMAKE_CFLAGS_SHLIB = -fPIC +QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses +QMAKE_CFLAGS_THREAD = -QMAKE_CXX = g++ -QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CXX = g++ +QMAKE_CXXFLAGS = $$QMAKE_CFLAGS +QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS +QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON +QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF +QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_THREAD = +QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC +QMAKE_CXXFLAGS_THREAD = -QMAKE_INCDIR = -QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = -QMAKE_LIBDIR_X11 = -QMAKE_INCDIR_OPENGL = -QMAKE_LIBDIR_OPENGL = +QMAKE_INCDIR = +QMAKE_LIBDIR = +QMAKE_INCDIR_X11 = +QMAKE_LIBDIR_X11 = +QMAKE_INCDIR_OPENGL = +QMAKE_LIBDIR_OPENGL = -QMAKE_LINK = g++ -QMAKE_LINK_SHLIB = g++ -QMAKE_LINK_C = gcc -QMAKE_LINK_C_SHLIB = gcc -QMAKE_LFLAGS = -QMAKE_LFLAGS_RELEASE = -QMAKE_LFLAGS_DEBUG = -QMAKE_LFLAGS_SHLIB = -shared -Wl,-LD_LAYOUT:lgot_buffer=1000 -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME = -Wl,-soname, -QMAKE_LFLAGS_THREAD = -QMAKE_LFLAGS_NOUNDEF = -Wl,-no_unresolved -QMAKE_LFLAGS_RPATH = -Wl,-rpath, +QMAKE_LINK = g++ +QMAKE_LINK_SHLIB = g++ +QMAKE_LINK_C = gcc +QMAKE_LINK_C_SHLIB = gcc +QMAKE_LFLAGS = +QMAKE_LFLAGS_RELEASE = +QMAKE_LFLAGS_DEBUG = +QMAKE_LFLAGS_SHLIB = -shared -Wl,-LD_LAYOUT:lgot_buffer=1000 +QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB +QMAKE_LFLAGS_SONAME = -Wl,-soname, +QMAKE_LFLAGS_THREAD = +QMAKE_LFLAGS_NOUNDEF = -Wl,-no_unresolved +QMAKE_LFLAGS_RPATH = -Wl,-rpath, -QMAKE_LIBS = -lC -QMAKE_LIBS_DYNLOAD = -QMAKE_LIBS_X11 = -lXext -lX11 -lm +QMAKE_LIBS = -lC +QMAKE_LIBS_DYNLOAD = +QMAKE_LIBS_X11 = -lXext -lX11 -lm # libGLU is using the SGI C++ library internally and this somehow clashes # with the GNU C++ library (similar name mangling and symbol names?) # so we add -lC so that the SGI C++ library is used first... -QMAKE_LIBS_OPENGL = -lGL -QMAKE_LIBS_THREAD = -lpthread +QMAKE_LIBS_OPENGL = -lGL +QMAKE_LIBS_THREAD = -lpthread -QMAKE_AR = ar cq +QMAKE_AR = ar cq QMAKE_OBJCOPY = objcopy -QMAKE_RANLIB = +QMAKE_RANLIB = -QMAKE_CLEAN = so_locations +QMAKE_CLEAN = so_locations include(../common/unix.conf) load(qt_config) diff --git a/mkspecs/linux-arm-gnueabi-g++/qmake.conf b/mkspecs/linux-arm-gnueabi-g++/qmake.conf index 574faa7456..d402f00d4d 100644 --- a/mkspecs/linux-arm-gnueabi-g++/qmake.conf +++ b/mkspecs/linux-arm-gnueabi-g++/qmake.conf @@ -3,7 +3,7 @@ # MAKEFILE_GENERATOR = UNIX -CONFIG += incremental gdb_dwarf_index +CONFIG += incremental gdb_dwarf_index QMAKE_INCREMENTAL_STYLE = sublib include(../common/linux.conf) diff --git a/mkspecs/linux-cxx/qmake.conf b/mkspecs/linux-cxx/qmake.conf index bc9a1b4800..1c7cafc6f2 100644 --- a/mkspecs/linux-cxx/qmake.conf +++ b/mkspecs/linux-cxx/qmake.conf @@ -4,62 +4,62 @@ # Written for Compaq C++ for GNU/Linux on Alpha # -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = linux +MAKEFILE_GENERATOR = UNIX +QMAKE_PLATFORM = linux -QMAKE_COMPILER = compaq_cc +QMAKE_COMPILER = compaq_cc -QMAKE_CC = ccc -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -w -QMAKE_CFLAGS_DEPS = -M -QMAKE_CFLAGS_WARN_ON = -QMAKE_CFLAGS_WARN_OFF = -QMAKE_CFLAGS_RELEASE = -O2 -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_SHLIB = -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = -Olimit 1000 +QMAKE_CC = ccc +QMAKE_LEX = flex +QMAKE_LEXFLAGS = +QMAKE_YACC = yacc +QMAKE_YACCFLAGS = -d +QMAKE_CFLAGS = -w +QMAKE_CFLAGS_DEPS = -M +QMAKE_CFLAGS_WARN_ON = +QMAKE_CFLAGS_WARN_OFF = +QMAKE_CFLAGS_RELEASE = -O2 +QMAKE_CFLAGS_DEBUG = -g +QMAKE_CFLAGS_SHLIB = +QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CFLAGS_YACC = -Olimit 1000 -QMAKE_CXX = cxx -QMAKE_CXXFLAGS = -w -QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CXX = cxx +QMAKE_CXXFLAGS = -w +QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS +QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON +QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF +QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC +QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_INCDIR = -QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = -QMAKE_LIBDIR_X11 = -QMAKE_INCDIR_OPENGL = -QMAKE_LIBDIR_OPENGL = +QMAKE_INCDIR = +QMAKE_LIBDIR = +QMAKE_INCDIR_X11 = +QMAKE_LIBDIR_X11 = +QMAKE_INCDIR_OPENGL = +QMAKE_LIBDIR_OPENGL = -QMAKE_LINK = cxx -QMAKE_LINK_SHLIB = cxx -QMAKE_LFLAGS = -QMAKE_LFLAGS_RELEASE = -QMAKE_LFLAGS_DEBUG = -QMAKE_LFLAGS_SHLIB = -shared -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME = -Wl,-soname, +QMAKE_LINK = cxx +QMAKE_LINK_SHLIB = cxx +QMAKE_LFLAGS = +QMAKE_LFLAGS_RELEASE = +QMAKE_LFLAGS_DEBUG = +QMAKE_LFLAGS_SHLIB = -shared +QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB +QMAKE_LFLAGS_SONAME = -Wl,-soname, -QMAKE_LIBS = -QMAKE_LIBS_DYNLOAD = -ldl -QMAKE_LIBS_X11 = -lXext -lX11 -lm -QMAKE_LIBS_NIS = -lnsl +QMAKE_LIBS = +QMAKE_LIBS_DYNLOAD = -ldl +QMAKE_LIBS_X11 = -lXext -lX11 -lm +QMAKE_LIBS_NIS = -lnsl -QMAKE_LIBS_OPENGL = -lGL +QMAKE_LIBS_OPENGL = -lGL -QMAKE_AR = ar cqs -QMAKE_RANLIB = +QMAKE_AR = ar cqs +QMAKE_RANLIB = include(../common/unix.conf) load(qt_config) diff --git a/mkspecs/linux-g++-32/qmake.conf b/mkspecs/linux-g++-32/qmake.conf index ffbccec6d0..56dfe8c1b2 100644 --- a/mkspecs/linux-g++-32/qmake.conf +++ b/mkspecs/linux-g++-32/qmake.conf @@ -2,12 +2,12 @@ # qmake configuration for linux-g++ # -MAKEFILE_GENERATOR = UNIX -CONFIG += incremental gdb_dwarf_index +MAKEFILE_GENERATOR = UNIX +CONFIG += incremental gdb_dwarf_index QMAKE_INCREMENTAL_STYLE = sublib -QMAKE_CFLAGS = -m32 -QMAKE_LFLAGS = -m32 +QMAKE_CFLAGS = -m32 +QMAKE_LFLAGS = -m32 include(../common/linux.conf) include(../common/gcc-base-unix.conf) diff --git a/mkspecs/linux-g++-64/qmake.conf b/mkspecs/linux-g++-64/qmake.conf index 9e9c37ac56..fc7672f19d 100644 --- a/mkspecs/linux-g++-64/qmake.conf +++ b/mkspecs/linux-g++-64/qmake.conf @@ -5,19 +5,19 @@ # like the AMD Opteron. # -MAKEFILE_GENERATOR = UNIX -CONFIG += incremental gdb_dwarf_index +MAKEFILE_GENERATOR = UNIX +CONFIG += incremental gdb_dwarf_index QMAKE_INCREMENTAL_STYLE = sublib -QMAKE_CFLAGS = -m64 -QMAKE_LFLAGS = -m64 +QMAKE_CFLAGS = -m64 +QMAKE_LFLAGS = -m64 include(../common/linux.conf) include(../common/gcc-base-unix.conf) include(../common/g++-unix.conf) -QMAKE_LIBDIR_X11 = /usr/X11R6/lib64 -QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib64 +QMAKE_LIBDIR_X11 = /usr/X11R6/lib64 +QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib64 load(qt_config) diff --git a/mkspecs/linux-g++/qmake.conf b/mkspecs/linux-g++/qmake.conf index 9c1e0d7ab1..0c9634adf8 100644 --- a/mkspecs/linux-g++/qmake.conf +++ b/mkspecs/linux-g++/qmake.conf @@ -2,8 +2,8 @@ # qmake configuration for linux-g++ # -MAKEFILE_GENERATOR = UNIX -CONFIG += incremental gdb_dwarf_index +MAKEFILE_GENERATOR = UNIX +CONFIG += incremental gdb_dwarf_index QMAKE_INCREMENTAL_STYLE = sublib include(../common/linux.conf) diff --git a/mkspecs/linux-icc-64/qmake.conf b/mkspecs/linux-icc-64/qmake.conf index 79620267a5..003cb5097d 100644 --- a/mkspecs/linux-icc-64/qmake.conf +++ b/mkspecs/linux-icc-64/qmake.conf @@ -12,5 +12,5 @@ include(../linux-icc/qmake.conf) # Change the all LIBDIR variables to use lib64 instead of lib -QMAKE_LIBDIR_X11 = /usr/X11R6/lib64 -QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib64 +QMAKE_LIBDIR_X11 = /usr/X11R6/lib64 +QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib64 diff --git a/mkspecs/linux-icc/qmake.conf b/mkspecs/linux-icc/qmake.conf index 353aa8833b..4c3bbb5183 100644 --- a/mkspecs/linux-icc/qmake.conf +++ b/mkspecs/linux-icc/qmake.conf @@ -2,84 +2,84 @@ # qmake configuration for linux-icc # -MAKEFILE_GENERATOR = UNIX -CONFIG += gdb_dwarf_index +MAKEFILE_GENERATOR = UNIX +CONFIG += gdb_dwarf_index -QMAKE_COMPILER = gcc intel_icc # icc pretends to be gcc +QMAKE_COMPILER = gcc intel_icc # icc pretends to be gcc -QMAKE_CC = icc -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -QMAKE_CFLAGS_DEPS = -M -QMAKE_CFLAGS_WARN_ON = -w1 -Wcheck -wd654,1572,411,873,1125,2259,2261 -QMAKE_CFLAGS_WARN_OFF = -w -QMAKE_CFLAGS_RELEASE = -O2 -falign-functions=16 -ansi-alias -fstrict-aliasing -QMAKE_CFLAGS_DEBUG = -O0 -g -QMAKE_CFLAGS_SHLIB = -fPIC -fno-jump-tables -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = -QMAKE_CFLAGS_THREAD = -D_REENTRANT +QMAKE_CC = icc +QMAKE_LEX = flex +QMAKE_LEXFLAGS = +QMAKE_YACC = yacc +QMAKE_YACCFLAGS = -d +QMAKE_CFLAGS = +QMAKE_CFLAGS_DEPS = -M +QMAKE_CFLAGS_WARN_ON = -w1 -Wcheck -wd654,1572,411,873,1125,2259,2261 +QMAKE_CFLAGS_WARN_OFF = -w +QMAKE_CFLAGS_RELEASE = -O2 -falign-functions=16 -ansi-alias -fstrict-aliasing +QMAKE_CFLAGS_DEBUG = -O0 -g +QMAKE_CFLAGS_SHLIB = -fPIC -fno-jump-tables +QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CFLAGS_YACC = +QMAKE_CFLAGS_THREAD = -D_REENTRANT -QMAKE_CFLAGS_SSE2 += -xSSE2 -QMAKE_CFLAGS_SSE3 += -xSSE3 -QMAKE_CFLAGS_SSSE3 += -xSSSE3 -QMAKE_CFLAGS_SSE4_1 += -xSSE4.1 -QMAKE_CFLAGS_SSE4_2 += -xSSE4.2 -QMAKE_CFLAGS_AVX += -xAVX -QMAKE_CFLAGS_AVX2 += -xCORE-AVX2 +QMAKE_CFLAGS_SSE2 += -xSSE2 +QMAKE_CFLAGS_SSE3 += -xSSE3 +QMAKE_CFLAGS_SSSE3 += -xSSSE3 +QMAKE_CFLAGS_SSE4_1 += -xSSE4.1 +QMAKE_CFLAGS_SSE4_2 += -xSSE4.2 +QMAKE_CFLAGS_AVX += -xAVX +QMAKE_CFLAGS_AVX2 += -xCORE-AVX2 -QMAKE_CXX = icpc -QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CXX = icpc +QMAKE_CXXFLAGS = $$QMAKE_CFLAGS +QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS +QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON +QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF +QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD +QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC +QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD QMAKE_CXXFLAGS_CXX11 = -std=c++0x -QMAKE_INCDIR = -QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = -QMAKE_LIBDIR_X11 = -QMAKE_INCDIR_OPENGL = -QMAKE_LIBDIR_OPENGL = +QMAKE_INCDIR = +QMAKE_LIBDIR = +QMAKE_INCDIR_X11 = +QMAKE_LIBDIR_X11 = +QMAKE_INCDIR_OPENGL = +QMAKE_LIBDIR_OPENGL = -QMAKE_LINK = icpc -QMAKE_LINK_SHLIB = icpc -QMAKE_LFLAGS = -QMAKE_LFLAGS_RELEASE = -QMAKE_LFLAGS_DEBUG = -QMAKE_LFLAGS_SHLIB = -shared -shared-intel -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME = -Wl,-soname, -QMAKE_LFLAGS_THREAD = -QMAKE_LFLAGS_NOUNDEF = -Wl,-z,defs -QMAKE_LFLAGS_RPATH = -Wl,-rpath, +QMAKE_LINK = icpc +QMAKE_LINK_SHLIB = icpc +QMAKE_LFLAGS = +QMAKE_LFLAGS_RELEASE = +QMAKE_LFLAGS_DEBUG = +QMAKE_LFLAGS_SHLIB = -shared -shared-intel +QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB +QMAKE_LFLAGS_SONAME = -Wl,-soname, +QMAKE_LFLAGS_THREAD = +QMAKE_LFLAGS_NOUNDEF = -Wl,-z,defs +QMAKE_LFLAGS_RPATH = -Wl,-rpath, QMAKE_LFLAGS_CXX11 = -QMAKE_LIBS = -QMAKE_LIBS_DYNLOAD = -ldl -QMAKE_LIBS_X11 = -lXext -lX11 -lm -QMAKE_LIBS_NIS = -lnsl -QMAKE_LIBS_OPENGL = -lGL -QMAKE_LIBS_THREAD = -lpthread +QMAKE_LIBS = +QMAKE_LIBS_DYNLOAD = -ldl +QMAKE_LIBS_X11 = -lXext -lX11 -lm +QMAKE_LIBS_NIS = -lnsl +QMAKE_LIBS_OPENGL = -lGL +QMAKE_LIBS_THREAD = -lpthread -QMAKE_AR = xiar cqs +QMAKE_AR = xiar cqs QMAKE_OBJCOPY = objcopy -QMAKE_RANLIB = +QMAKE_RANLIB = -QMAKE_CLEAN = -r $(OBJECTS_DIR)/ti_files +QMAKE_CLEAN = -r $(OBJECTS_DIR)/ti_files # pch support CONFIG += icc_pch_style -QMAKE_PCH_OUTPUT_EXT = .pchi +QMAKE_PCH_OUTPUT_EXT = .pchi QMAKE_CXXFLAGS_USE_PRECOMPILE = -pch-use ${QMAKE_PCH_OUTPUT} -include ${QMAKE_PCH_INPUT} QMAKE_CXXFLAGS_PRECOMPILE = -c -pch-create ${QMAKE_PCH_OUTPUT} -include ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_TEMP_OBJECT} ${QMAKE_PCH_TEMP_SOURCE} diff --git a/mkspecs/linux-kcc/qmake.conf b/mkspecs/linux-kcc/qmake.conf index 723522100e..921b4e6390 100644 --- a/mkspecs/linux-kcc/qmake.conf +++ b/mkspecs/linux-kcc/qmake.conf @@ -7,75 +7,75 @@ # # From the KAI C++ man page for Linux: # --[no_]thread_safe -# [Waive or] Request thread-safe handling of system-allocated objects. -# To guarantee thread safety, this option must be used when both -# compiling and linking. Thread-safe C++ is not link-compatible with -# (the default) non-thread-safe C++. +# [Waive or] Request thread-safe handling of system-allocated objects. +# To guarantee thread safety, this option must be used when both +# compiling and linking. Thread-safe C++ is not link-compatible with +# (the default) non-thread-safe C++. # -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = linux +MAKEFILE_GENERATOR = UNIX +QMAKE_PLATFORM = linux -QMAKE_COMPILER = kai_cc +QMAKE_COMPILER = kai_cc -QMAKE_CC = KCC -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = --c --display_error_number --backend -pipe -QMAKE_CFLAGS_DEPS = -M -QMAKE_CFLAGS_WARN_ON = -QMAKE_CFLAGS_WARN_OFF = -w -QMAKE_CFLAGS_RELEASE = +K2 -QMAKE_CFLAGS_DEBUG = +K0 -QMAKE_CFLAGS_SHLIB = -fPIC -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = --diag_suppress 111,177 -QMAKE_CFLAGS_THREAD = --thread_safe +QMAKE_CC = KCC +QMAKE_LEX = flex +QMAKE_LEXFLAGS = +QMAKE_YACC = yacc +QMAKE_YACCFLAGS = -d +QMAKE_CFLAGS = --c --display_error_number --backend -pipe +QMAKE_CFLAGS_DEPS = -M +QMAKE_CFLAGS_WARN_ON = +QMAKE_CFLAGS_WARN_OFF = -w +QMAKE_CFLAGS_RELEASE = +K2 +QMAKE_CFLAGS_DEBUG = +K0 +QMAKE_CFLAGS_SHLIB = -fPIC +QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CFLAGS_YACC = --diag_suppress 111,177 +QMAKE_CFLAGS_THREAD = --thread_safe -QMAKE_CXX = KCC -QMAKE_CXXFLAGS = --display_error_number --diag_suppress 611,1142 --backend -pipe -QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CXX = KCC +QMAKE_CXXFLAGS = --display_error_number --diag_suppress 611,1142 --backend -pipe +QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS +QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON +QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF +QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD +QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC +QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD -QMAKE_INCDIR = -QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = -QMAKE_LIBDIR_X11 = -QMAKE_INCDIR_OPENGL = -QMAKE_LIBDIR_OPENGL = +QMAKE_INCDIR = +QMAKE_LIBDIR = +QMAKE_INCDIR_X11 = +QMAKE_LIBDIR_X11 = +QMAKE_INCDIR_OPENGL = +QMAKE_LIBDIR_OPENGL = -QMAKE_LINK = KCC -QMAKE_LINK_SHLIB = KCC -QMAKE_LFLAGS = -QMAKE_LFLAGS_RELEASE = -QMAKE_LFLAGS_DEBUG = -QMAKE_LFLAGS_SHLIB = -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME = --soname$$LITERAL_WHITESPACE -QMAKE_LFLAGS_THREAD = --thread_safe -QMAKE_LFLAGS_RPATH = -rpath$$LITERAL_WHITESPACE +QMAKE_LINK = KCC +QMAKE_LINK_SHLIB = KCC +QMAKE_LFLAGS = +QMAKE_LFLAGS_RELEASE = +QMAKE_LFLAGS_DEBUG = +QMAKE_LFLAGS_SHLIB = +QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB +QMAKE_LFLAGS_SONAME = --soname$$LITERAL_WHITESPACE +QMAKE_LFLAGS_THREAD = --thread_safe +QMAKE_LFLAGS_RPATH = -rpath$$LITERAL_WHITESPACE -QMAKE_LIBS = -QMAKE_LIBS_DYNLOAD = -ldl -QMAKE_LIBS_X11 = -lXext -lX11 -lm -QMAKE_LIBS_NIS = -lnsl -QMAKE_LIBS_OPENGL = -lGL -QMAKE_LIBS_THREAD = +QMAKE_LIBS = +QMAKE_LIBS_DYNLOAD = -ldl +QMAKE_LIBS_X11 = -lXext -lX11 -lm +QMAKE_LIBS_NIS = -lnsl +QMAKE_LIBS_OPENGL = -lGL +QMAKE_LIBS_THREAD = -QMAKE_AR = ar cqs +QMAKE_AR = ar cqs QMAKE_OBJCOPY = objcopy -QMAKE_RANLIB = +QMAKE_RANLIB = -QMAKE_CLEAN = -r $(OBJECTS_DIR)ti_files +QMAKE_CLEAN = -r $(OBJECTS_DIR)ti_files include(../common/unix.conf) load(qt_config) diff --git a/mkspecs/linux-llvm/qmake.conf b/mkspecs/linux-llvm/qmake.conf index 3b7034d1b6..6a9fed64c2 100644 --- a/mkspecs/linux-llvm/qmake.conf +++ b/mkspecs/linux-llvm/qmake.conf @@ -2,8 +2,8 @@ # qmake configuration for llvm # -MAKEFILE_GENERATOR = UNIX -CONFIG += incremental gdb_dwarf_index +MAKEFILE_GENERATOR = UNIX +CONFIG += incremental gdb_dwarf_index QMAKE_INCREMENTAL_STYLE = sublib include(../common/linux.conf) diff --git a/mkspecs/linux-lsb-g++/qmake.conf b/mkspecs/linux-lsb-g++/qmake.conf index 72d6a920fb..10a4014d65 100644 --- a/mkspecs/linux-lsb-g++/qmake.conf +++ b/mkspecs/linux-lsb-g++/qmake.conf @@ -3,7 +3,7 @@ # MAKEFILE_GENERATOR = UNIX -CONFIG += incremental gdb_dwarf_index +CONFIG += incremental gdb_dwarf_index QMAKE_INCREMENTAL_STYLE = sublib include(../common/linux.conf) @@ -15,7 +15,7 @@ QMAKE_LIBS_THREAD += -lrt QMAKE_LSB = 1 QMAKE_CC = lsbcc -QMAKE_CXX = lsbc++ +QMAKE_CXX = lsbc++ QMAKE_LINK_C = $$QMAKE_CC QMAKE_LINK_C_SHLIB = $$QMAKE_CC diff --git a/mkspecs/linux-pgcc/qmake.conf b/mkspecs/linux-pgcc/qmake.conf index 8e5bc7118f..404c1de1e9 100644 --- a/mkspecs/linux-pgcc/qmake.conf +++ b/mkspecs/linux-pgcc/qmake.conf @@ -4,67 +4,67 @@ # Written for the Portland Group compiler 6.0-5 # -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = linux +MAKEFILE_GENERATOR = UNIX +QMAKE_PLATFORM = linux -QMAKE_COMPILER = portland_cc +QMAKE_COMPILER = portland_cc -QMAKE_CC = pgcc -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -QMAKE_CFLAGS_DEPS = -M -QMAKE_CFLAGS_WARN_ON = -QMAKE_CFLAGS_WARN_OFF = -w -QMAKE_CFLAGS_RELEASE = -fast -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_SHLIB = -fpic -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = -QMAKE_CFLAGS_THREAD = -D_REENTRANT +QMAKE_CC = pgcc +QMAKE_LEX = flex +QMAKE_LEXFLAGS = +QMAKE_YACC = yacc +QMAKE_YACCFLAGS = -d +QMAKE_CFLAGS = +QMAKE_CFLAGS_DEPS = -M +QMAKE_CFLAGS_WARN_ON = +QMAKE_CFLAGS_WARN_OFF = -w +QMAKE_CFLAGS_RELEASE = -fast +QMAKE_CFLAGS_DEBUG = -g +QMAKE_CFLAGS_SHLIB = -fpic +QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CFLAGS_YACC = +QMAKE_CFLAGS_THREAD = -D_REENTRANT -QMAKE_CXX = pgCC -QMAKE_CXXFLAGS = --display_error_number --diag_suppress815 $$QMAKE_CFLAGS -QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CXX = pgCC +QMAKE_CXXFLAGS = --display_error_number --diag_suppress815 $$QMAKE_CFLAGS +QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS +QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON +QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF +QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD +QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC +QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD -QMAKE_INCDIR = -QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = -QMAKE_LIBDIR_X11 = -QMAKE_INCDIR_OPENGL = -QMAKE_LIBDIR_OPENGL = +QMAKE_INCDIR = +QMAKE_LIBDIR = +QMAKE_INCDIR_X11 = +QMAKE_LIBDIR_X11 = +QMAKE_INCDIR_OPENGL = +QMAKE_LIBDIR_OPENGL = -QMAKE_LINK = pgCC -QMAKE_LINK_SHLIB = pgCC -QMAKE_LFLAGS = -QMAKE_LFLAGS_RELEASE = -QMAKE_LFLAGS_DEBUG = -QMAKE_LFLAGS_SHLIB = -shared -fpic -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME = -Wl,-soname, -QMAKE_LFLAGS_THREAD = -QMAKE_LFLAGS_RPATH = -R +QMAKE_LINK = pgCC +QMAKE_LINK_SHLIB = pgCC +QMAKE_LFLAGS = +QMAKE_LFLAGS_RELEASE = +QMAKE_LFLAGS_DEBUG = +QMAKE_LFLAGS_SHLIB = -shared -fpic +QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB +QMAKE_LFLAGS_SONAME = -Wl,-soname, +QMAKE_LFLAGS_THREAD = +QMAKE_LFLAGS_RPATH = -R -QMAKE_LIBS = -QMAKE_LIBS_DYNLOAD = -ldl -QMAKE_LIBS_X11 = -lXext -lX11 -lm -QMAKE_LIBS_NIS = -lnsl -QMAKE_LIBS_OPENGL = -lGL -QMAKE_LIBS_THREAD = -lpthread +QMAKE_LIBS = +QMAKE_LIBS_DYNLOAD = -ldl +QMAKE_LIBS_X11 = -lXext -lX11 -lm +QMAKE_LIBS_NIS = -lnsl +QMAKE_LIBS_OPENGL = -lGL +QMAKE_LIBS_THREAD = -lpthread -QMAKE_AR = ar cqs +QMAKE_AR = ar cqs QMAKE_OBJCOPY = objcopy -QMAKE_RANLIB = +QMAKE_RANLIB = include(../common/unix.conf) load(qt_config) diff --git a/mkspecs/lynxos-g++/qmake.conf b/mkspecs/lynxos-g++/qmake.conf index 4d5b031f39..ab887825d6 100644 --- a/mkspecs/lynxos-g++/qmake.conf +++ b/mkspecs/lynxos-g++/qmake.conf @@ -4,74 +4,74 @@ # Written for LynxOS 4.0 # -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = lynxos -CONFIG += incremental +MAKEFILE_GENERATOR = UNIX +QMAKE_PLATFORM = lynxos +CONFIG += incremental QMAKE_INCREMENTAL_STYLE = sublib -QMAKE_COMPILER = gcc +QMAKE_COMPILER = gcc -QMAKE_CC = gcc -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -pipe -QMAKE_CFLAGS_DEPS = -M -QMAKE_CFLAGS_WARN_ON = -Wall -W -QMAKE_CFLAGS_WARN_OFF = -w -QMAKE_CFLAGS_RELEASE = -O2 -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_SHLIB = -fPIC -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses -QMAKE_CFLAGS_THREAD = -D_REENTRANT +QMAKE_CC = gcc +QMAKE_LEX = flex +QMAKE_LEXFLAGS = +QMAKE_YACC = yacc +QMAKE_YACCFLAGS = -d +QMAKE_CFLAGS = -pipe +QMAKE_CFLAGS_DEPS = -M +QMAKE_CFLAGS_WARN_ON = -Wall -W +QMAKE_CFLAGS_WARN_OFF = -w +QMAKE_CFLAGS_RELEASE = -O2 +QMAKE_CFLAGS_DEBUG = -g +QMAKE_CFLAGS_SHLIB = -fPIC +QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses +QMAKE_CFLAGS_THREAD = -D_REENTRANT -QMAKE_CXX = g++ -QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CXX = g++ +QMAKE_CXXFLAGS = $$QMAKE_CFLAGS +QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS +QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON +QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF +QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD +QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC +QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD -QMAKE_INCDIR = -QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = /usr/include/X11 -QMAKE_LIBDIR_X11 = -QMAKE_INCDIR_OPENGL = /usr/include/GL -QMAKE_LIBDIR_OPENGL = +QMAKE_INCDIR = +QMAKE_LIBDIR = +QMAKE_INCDIR_X11 = /usr/include/X11 +QMAKE_LIBDIR_X11 = +QMAKE_INCDIR_OPENGL = /usr/include/GL +QMAKE_LIBDIR_OPENGL = -QMAKE_LINK = g++ -QMAKE_LINK_SHLIB = g++ -QMAKE_LINK_C = gcc -QMAKE_LINK_C_SHLIB = gcc -QMAKE_LFLAGS = -QMAKE_LFLAGS_RELEASE = -QMAKE_LFLAGS_DEBUG = -QMAKE_LFLAGS_SHLIB = -shared -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME = -Wl,-soname, -QMAKE_LFLAGS_THREAD = -QMAKE_LFLAGS_RPATH = -Wl,-rpath, +QMAKE_LINK = g++ +QMAKE_LINK_SHLIB = g++ +QMAKE_LINK_C = gcc +QMAKE_LINK_C_SHLIB = gcc +QMAKE_LFLAGS = +QMAKE_LFLAGS_RELEASE = +QMAKE_LFLAGS_DEBUG = +QMAKE_LFLAGS_SHLIB = -shared +QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB +QMAKE_LFLAGS_SONAME = -Wl,-soname, +QMAKE_LFLAGS_THREAD = +QMAKE_LFLAGS_RPATH = -Wl,-rpath, -QMAKE_LIBS = -QMAKE_LIBS_DYNLOAD = -ldl -QMAKE_LIBS_X11 = -lXext -lX11 -lm -QMAKE_LIBS_NIS = -lnsl -QMAKE_LIBS_OPENGL = -lGL -QMAKE_LIBS_THREAD = -lpthread +QMAKE_LIBS = +QMAKE_LIBS_DYNLOAD = -ldl +QMAKE_LIBS_X11 = -lXext -lX11 -lm +QMAKE_LIBS_NIS = -lnsl +QMAKE_LIBS_OPENGL = -lGL +QMAKE_LIBS_THREAD = -lpthread -QMAKE_AR = ar cqs +QMAKE_AR = ar cqs QMAKE_OBJCOPY = objcopy -QMAKE_RANLIB = +QMAKE_RANLIB = QMAKE_STRIP = strip -QMAKE_STRIPFLAGS_LIB += --strip-unneeded +QMAKE_STRIPFLAGS_LIB += --strip-unneeded include(../common/unix.conf) load(qt_config) diff --git a/mkspecs/macx-clang-32/qmake.conf b/mkspecs/macx-clang-32/qmake.conf index 6a0b65d641..e0c4bd57b7 100644 --- a/mkspecs/macx-clang-32/qmake.conf +++ b/mkspecs/macx-clang-32/qmake.conf @@ -2,8 +2,8 @@ # qmake configuration for 32-bit Clang on OS X # -MAKEFILE_GENERATOR = UNIX -CONFIG += app_bundle incremental global_init_link_order lib_version_first plugin_no_soname +MAKEFILE_GENERATOR = UNIX +CONFIG += app_bundle incremental global_init_link_order lib_version_first plugin_no_soname QMAKE_INCREMENTAL_STYLE = sublib include(../common/macx.conf) @@ -13,9 +13,9 @@ include(../common/clang-mac.conf) QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6 -QMAKE_CFLAGS += -arch i386 +QMAKE_CFLAGS += -arch i386 QMAKE_OBJECTIVE_CFLAGS += -arch i386 -QMAKE_CXXFLAGS += -arch i386 -QMAKE_LFLAGS += -arch i386 +QMAKE_CXXFLAGS += -arch i386 +QMAKE_LFLAGS += -arch i386 load(qt_config) diff --git a/mkspecs/macx-clang-libc++-32/qmake.conf b/mkspecs/macx-clang-libc++-32/qmake.conf index 4ba249be22..aea19a4bc3 100644 --- a/mkspecs/macx-clang-libc++-32/qmake.conf +++ b/mkspecs/macx-clang-libc++-32/qmake.conf @@ -2,8 +2,8 @@ # qmake configuration for 32-bit Clang on OS X # -MAKEFILE_GENERATOR = UNIX -CONFIG += app_bundle incremental global_init_link_order lib_version_first plugin_no_soname +MAKEFILE_GENERATOR = UNIX +CONFIG += app_bundle incremental global_init_link_order lib_version_first plugin_no_soname QMAKE_INCREMENTAL_STYLE = sublib include(../common/macx.conf) @@ -13,9 +13,9 @@ include(../common/clang-mac.conf) QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7 -QMAKE_CFLAGS += -arch i386 +QMAKE_CFLAGS += -arch i386 QMAKE_OBJECTIVE_CFLAGS += -arch i386 -stdlib=libc++ -QMAKE_CXXFLAGS += -arch i386 -stdlib=libc++ -QMAKE_LFLAGS += -arch i386 -stdlib=libc++ +QMAKE_CXXFLAGS += -arch i386 -stdlib=libc++ +QMAKE_LFLAGS += -arch i386 -stdlib=libc++ load(qt_config) diff --git a/mkspecs/macx-clang-libc++/qmake.conf b/mkspecs/macx-clang-libc++/qmake.conf index a8858f0b73..94cc0036d2 100644 --- a/mkspecs/macx-clang-libc++/qmake.conf +++ b/mkspecs/macx-clang-libc++/qmake.conf @@ -2,8 +2,8 @@ # qmake configuration for Clang on OS X # -MAKEFILE_GENERATOR = UNIX -CONFIG += app_bundle incremental global_init_link_order lib_version_first plugin_no_soname +MAKEFILE_GENERATOR = UNIX +CONFIG += app_bundle incremental global_init_link_order lib_version_first plugin_no_soname QMAKE_INCREMENTAL_STYLE = sublib include(../common/macx.conf) @@ -14,7 +14,7 @@ include(../common/clang-mac.conf) QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7 QMAKE_OBJECTIVE_CFLAGS += -stdlib=libc++ -QMAKE_CXXFLAGS += -stdlib=libc++ -QMAKE_LFLAGS += -stdlib=libc++ +QMAKE_CXXFLAGS += -stdlib=libc++ +QMAKE_LFLAGS += -stdlib=libc++ load(qt_config) diff --git a/mkspecs/macx-clang/qmake.conf b/mkspecs/macx-clang/qmake.conf index 2a6a5a95bc..f28b728bd9 100644 --- a/mkspecs/macx-clang/qmake.conf +++ b/mkspecs/macx-clang/qmake.conf @@ -2,8 +2,8 @@ # qmake configuration for Clang on OS X # -MAKEFILE_GENERATOR = UNIX -CONFIG += app_bundle incremental global_init_link_order lib_version_first plugin_no_soname +MAKEFILE_GENERATOR = UNIX +CONFIG += app_bundle incremental global_init_link_order lib_version_first plugin_no_soname QMAKE_INCREMENTAL_STYLE = sublib include(../common/macx.conf) diff --git a/mkspecs/macx-g++-32/qmake.conf b/mkspecs/macx-g++-32/qmake.conf index aa3df18ec6..bf8f68c680 100644 --- a/mkspecs/macx-g++-32/qmake.conf +++ b/mkspecs/macx-g++-32/qmake.conf @@ -6,8 +6,8 @@ # Mac OS X + command-line compiler # -MAKEFILE_GENERATOR = UNIX -CONFIG += app_bundle incremental global_init_link_order lib_version_first plugin_no_soname +MAKEFILE_GENERATOR = UNIX +CONFIG += app_bundle incremental global_init_link_order lib_version_first plugin_no_soname QMAKE_INCREMENTAL_STYLE = sublib include(../common/macx.conf) @@ -16,9 +16,9 @@ include(../common/g++-macx.conf) QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6 -QMAKE_CFLAGS += -arch i386 +QMAKE_CFLAGS += -arch i386 QMAKE_OBJECTIVE_CFLAGS += -arch i386 -QMAKE_CXXFLAGS += -arch i386 -QMAKE_LFLAGS += -arch i386 +QMAKE_CXXFLAGS += -arch i386 +QMAKE_LFLAGS += -arch i386 load(qt_config) diff --git a/mkspecs/macx-g++/qmake.conf b/mkspecs/macx-g++/qmake.conf index c7aa9752d1..96d9f6e487 100644 --- a/mkspecs/macx-g++/qmake.conf +++ b/mkspecs/macx-g++/qmake.conf @@ -6,8 +6,8 @@ # Mac OS X + command-line compiler # -MAKEFILE_GENERATOR = UNIX -CONFIG += app_bundle incremental global_init_link_order lib_version_first plugin_no_soname +MAKEFILE_GENERATOR = UNIX +CONFIG += app_bundle incremental global_init_link_order lib_version_first plugin_no_soname QMAKE_INCREMENTAL_STYLE = sublib include(../common/macx.conf) diff --git a/mkspecs/macx-g++40/qmake.conf b/mkspecs/macx-g++40/qmake.conf index 23aee379a9..fe7683e02d 100644 --- a/mkspecs/macx-g++40/qmake.conf +++ b/mkspecs/macx-g++40/qmake.conf @@ -6,8 +6,8 @@ # Mac OS X + command-line compiler # -MAKEFILE_GENERATOR = UNIX -CONFIG += app_bundle incremental global_init_link_order lib_version_first plugin_no_soname +MAKEFILE_GENERATOR = UNIX +CONFIG += app_bundle incremental global_init_link_order lib_version_first plugin_no_soname QMAKE_INCREMENTAL_STYLE = sublib include(../common/macx.conf) @@ -16,12 +16,12 @@ include(../common/g++-macx.conf) QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6 -QMAKE_CC = gcc-4.0 -QMAKE_CXX = g++-4.0 +QMAKE_CC = gcc-4.0 +QMAKE_CXX = g++-4.0 -QMAKE_LINK = $$QMAKE_CXX -QMAKE_LINK_SHLIB = $$QMAKE_CXX -QMAKE_LINK_C = $$QMAKE_CC -QMAKE_LINK_C_SHLIB = $$QMAKE_CC +QMAKE_LINK = $$QMAKE_CXX +QMAKE_LINK_SHLIB = $$QMAKE_CXX +QMAKE_LINK_C = $$QMAKE_CC +QMAKE_LINK_C_SHLIB = $$QMAKE_CC load(qt_config) diff --git a/mkspecs/macx-g++42/qmake.conf b/mkspecs/macx-g++42/qmake.conf index 5c1df37027..9041d8ba05 100644 --- a/mkspecs/macx-g++42/qmake.conf +++ b/mkspecs/macx-g++42/qmake.conf @@ -6,8 +6,8 @@ # Mac OS X + command-line compiler # -MAKEFILE_GENERATOR = UNIX -CONFIG += app_bundle incremental global_init_link_order lib_version_first plugin_no_soname +MAKEFILE_GENERATOR = UNIX +CONFIG += app_bundle incremental global_init_link_order lib_version_first plugin_no_soname QMAKE_INCREMENTAL_STYLE = sublib include(../common/macx.conf) @@ -16,12 +16,12 @@ include(../common/g++-macx.conf) QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6 -QMAKE_CC = gcc-4.2 -QMAKE_CXX = g++-4.2 +QMAKE_CC = gcc-4.2 +QMAKE_CXX = g++-4.2 -QMAKE_LINK = $$QMAKE_CXX -QMAKE_LINK_SHLIB = $$QMAKE_CXX -QMAKE_LINK_C = $$QMAKE_CC -QMAKE_LINK_C_SHLIB = $$QMAKE_CC +QMAKE_LINK = $$QMAKE_CXX +QMAKE_LINK_SHLIB = $$QMAKE_CXX +QMAKE_LINK_C = $$QMAKE_CC +QMAKE_LINK_C_SHLIB = $$QMAKE_CC load(qt_config) diff --git a/mkspecs/macx-icc/qmake.conf b/mkspecs/macx-icc/qmake.conf index 45e826ba4c..2522d5c382 100644 --- a/mkspecs/macx-icc/qmake.conf +++ b/mkspecs/macx-icc/qmake.conf @@ -13,9 +13,9 @@ # MAKEFILE_GENERATOR = UNIX -CONFIG += app_bundle +CONFIG += app_bundle QMAKE_INCREMENTAL_STYLE = sublibs -QMAKE_COMPILER_DEFINES += __APPLE__ __GNUC__ +QMAKE_COMPILER_DEFINES += __APPLE__ __GNUC__ QMAKE_COMPILER = gcc intel_icc # icc pretends to be gcc diff --git a/mkspecs/macx-llvm/qmake.conf b/mkspecs/macx-llvm/qmake.conf index daacd1f00e..7e6ee1c9de 100644 --- a/mkspecs/macx-llvm/qmake.conf +++ b/mkspecs/macx-llvm/qmake.conf @@ -6,8 +6,8 @@ # Mac OS X + command-line compiler # -MAKEFILE_GENERATOR = UNIX -CONFIG += app_bundle incremental global_init_link_order lib_version_first plugin_no_soname +MAKEFILE_GENERATOR = UNIX +CONFIG += app_bundle incremental global_init_link_order lib_version_first plugin_no_soname QMAKE_INCREMENTAL_STYLE = sublib include(../common/macx.conf) diff --git a/mkspecs/netbsd-g++/qmake.conf b/mkspecs/netbsd-g++/qmake.conf index 7aa1bf0561..ee36b3ac5d 100644 --- a/mkspecs/netbsd-g++/qmake.conf +++ b/mkspecs/netbsd-g++/qmake.conf @@ -2,71 +2,71 @@ # qmake configuration for netbsd-g++ # -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = netbsd bsd -CONFIG += gdb_dwarf_index +MAKEFILE_GENERATOR = UNIX +QMAKE_PLATFORM = netbsd bsd +CONFIG += gdb_dwarf_index -QMAKE_COMPILER = gcc +QMAKE_COMPILER = gcc -QMAKE_CC = gcc -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -pipe -QMAKE_CFLAGS_DEPS = -M -QMAKE_CFLAGS_WARN_ON = -Wall -W -QMAKE_CFLAGS_WARN_OFF = -w -QMAKE_CFLAGS_RELEASE = -O2 -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_SHLIB = -fPIC -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses -QMAKE_CFLAGS_THREAD = -pthread +QMAKE_CC = gcc +QMAKE_LEX = flex +QMAKE_LEXFLAGS = +QMAKE_YACC = yacc +QMAKE_YACCFLAGS = -d +QMAKE_CFLAGS = -pipe +QMAKE_CFLAGS_DEPS = -M +QMAKE_CFLAGS_WARN_ON = -Wall -W +QMAKE_CFLAGS_WARN_OFF = -w +QMAKE_CFLAGS_RELEASE = -O2 +QMAKE_CFLAGS_DEBUG = -g +QMAKE_CFLAGS_SHLIB = -fPIC +QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses +QMAKE_CFLAGS_THREAD = -pthread -QMAKE_CXX = g++ -QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CXX = g++ +QMAKE_CXXFLAGS = $$QMAKE_CFLAGS +QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS +QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON +QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF +QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD +QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC +QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD -QMAKE_INCDIR = /usr/local/include -QMAKE_LIBDIR = /usr/local/lib -QMAKE_INCDIR_X11 = /usr/X11R6/include -QMAKE_LIBDIR_X11 = /usr/X11R6/lib -QMAKE_INCDIR_OPENGL = /usr/X11R6/include -QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib +QMAKE_INCDIR = /usr/local/include +QMAKE_LIBDIR = /usr/local/lib +QMAKE_INCDIR_X11 = /usr/X11R6/include +QMAKE_LIBDIR_X11 = /usr/X11R6/lib +QMAKE_INCDIR_OPENGL = /usr/X11R6/include +QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib -QMAKE_LINK = g++ -QMAKE_LINK_SHLIB = g++ -QMAKE_LINK_C = gcc -QMAKE_LINK_C_SHLIB = gcc +QMAKE_LINK = g++ +QMAKE_LINK_SHLIB = g++ +QMAKE_LINK_C = gcc +QMAKE_LINK_C_SHLIB = gcc QMAKE_LINK_SHLIB_CMD = $$QMAKE_LINK_SHLIB $$QMAKE_LFLAGS_SHLIB $(LFLAGS) $$QMAKE_LFLAGS -o $(TARGETD) $(OBJECTS) $(OBJMOC) $(LIBS) -QMAKE_LFLAGS = -QMAKE_LFLAGS_RELEASE = -QMAKE_LFLAGS_DEBUG = -QMAKE_LFLAGS_SHLIB = -shared -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME = -Wl,-soname, -QMAKE_LFLAGS_THREAD = -pthread -QMAKE_LFLAGS_NOUNDEF = -Wl,-no_unresolved -QMAKE_LFLAGS_RPATH = -Wl,-rpath, +QMAKE_LFLAGS = +QMAKE_LFLAGS_RELEASE = +QMAKE_LFLAGS_DEBUG = +QMAKE_LFLAGS_SHLIB = -shared +QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB +QMAKE_LFLAGS_SONAME = -Wl,-soname, +QMAKE_LFLAGS_THREAD = -pthread +QMAKE_LFLAGS_NOUNDEF = -Wl,-no_unresolved +QMAKE_LFLAGS_RPATH = -Wl,-rpath, -QMAKE_LIBS = -QMAKE_LIBS_DYNLOAD = -QMAKE_LIBS_X11 = -lXext -lX11 -lm -QMAKE_LIBS_OPENGL = -lGL -QMAKE_LIBS_THREAD = +QMAKE_LIBS = +QMAKE_LIBS_DYNLOAD = +QMAKE_LIBS_X11 = -lXext -lX11 -lm +QMAKE_LIBS_OPENGL = -lGL +QMAKE_LIBS_THREAD = -QMAKE_AR = ar cqs +QMAKE_AR = ar cqs QMAKE_OBJCOPY = objcopy -QMAKE_RANLIB = ranlib +QMAKE_RANLIB = ranlib include(../common/unix.conf) load(qt_config) diff --git a/mkspecs/openbsd-g++/qmake.conf b/mkspecs/openbsd-g++/qmake.conf index bc13ad3892..f7b19cfe48 100644 --- a/mkspecs/openbsd-g++/qmake.conf +++ b/mkspecs/openbsd-g++/qmake.conf @@ -2,72 +2,72 @@ # qmake configuration for openbsd-g++ # -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = openbsd bsd -CONFIG += gdb_dwarf_index +MAKEFILE_GENERATOR = UNIX +QMAKE_PLATFORM = openbsd bsd +CONFIG += gdb_dwarf_index -QMAKE_COMPILER = gcc +QMAKE_COMPILER = gcc -QMAKE_CC = gcc -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -pipe -QMAKE_CFLAGS_DEPS = -M -QMAKE_CFLAGS_WARN_ON = -Wall -W -QMAKE_CFLAGS_WARN_OFF = -w -QMAKE_CFLAGS_RELEASE = -O2 -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_SHLIB = -fPIC -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses -QMAKE_CFLAGS_THREAD = -pthread +QMAKE_CC = gcc +QMAKE_LEX = flex +QMAKE_LEXFLAGS = +QMAKE_YACC = yacc +QMAKE_YACCFLAGS = -d +QMAKE_CFLAGS = -pipe +QMAKE_CFLAGS_DEPS = -M +QMAKE_CFLAGS_WARN_ON = -Wall -W +QMAKE_CFLAGS_WARN_OFF = -w +QMAKE_CFLAGS_RELEASE = -O2 +QMAKE_CFLAGS_DEBUG = -g +QMAKE_CFLAGS_SHLIB = -fPIC +QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses +QMAKE_CFLAGS_THREAD = -pthread -QMAKE_CXX = g++ -QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CXX = g++ +QMAKE_CXXFLAGS = $$QMAKE_CFLAGS +QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS +QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON +QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF +QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD +QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC +QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD -QMAKE_INCDIR = /usr/local/include -QMAKE_LIBDIR = /usr/local/lib -QMAKE_INCDIR_X11 = /usr/X11R6/include -QMAKE_LIBDIR_X11 = /usr/X11R6/lib -QMAKE_INCDIR_OPENGL = /usr/X11R6/include -QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib +QMAKE_INCDIR = /usr/local/include +QMAKE_LIBDIR = /usr/local/lib +QMAKE_INCDIR_X11 = /usr/X11R6/include +QMAKE_LIBDIR_X11 = /usr/X11R6/lib +QMAKE_INCDIR_OPENGL = /usr/X11R6/include +QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib -QMAKE_LINK = g++ -QMAKE_LINK_SHLIB = g++ -QMAKE_LINK_C = gcc -QMAKE_LINK_C_SHLIB = gcc -QMAKE_LINK_SHLIB_CMD = $$QMAKE_LINK_SHLIB $(LFLAGS) \ - $$QMAKE_CFLAGS_SHLIB $$QMAKE_LFLAGS \ - -o $(TARGETD) $(OBJECTS) $(OBJMOC) $(LIBS) -QMAKE_LFLAGS = -QMAKE_LFLAGS_RELEASE = -QMAKE_LFLAGS_DEBUG = -QMAKE_LFLAGS_SHLIB = -shared -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME = -Wl,-soname, -QMAKE_LFLAGS_THREAD = -pthread -QMAKE_LFLAGS_NOUNDEF = -Wl,-no_unresolved +QMAKE_LINK = g++ +QMAKE_LINK_SHLIB = g++ +QMAKE_LINK_C = gcc +QMAKE_LINK_C_SHLIB = gcc +QMAKE_LINK_SHLIB_CMD = $$QMAKE_LINK_SHLIB $(LFLAGS) \ + $$QMAKE_CFLAGS_SHLIB $$QMAKE_LFLAGS \ + -o $(TARGETD) $(OBJECTS) $(OBJMOC) $(LIBS) +QMAKE_LFLAGS = +QMAKE_LFLAGS_RELEASE = +QMAKE_LFLAGS_DEBUG = +QMAKE_LFLAGS_SHLIB = -shared +QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB +QMAKE_LFLAGS_SONAME = -Wl,-soname, +QMAKE_LFLAGS_THREAD = -pthread +QMAKE_LFLAGS_NOUNDEF = -Wl,-no_unresolved -QMAKE_LIBS = -QMAKE_LIBS_DYNLOAD = -QMAKE_LIBS_X11 = -lXext -lX11 -lm -QMAKE_LIBS_OPENGL = -lGL -QMAKE_LIBS_THREAD = +QMAKE_LIBS = +QMAKE_LIBS_DYNLOAD = +QMAKE_LIBS_X11 = -lXext -lX11 -lm +QMAKE_LIBS_OPENGL = -lGL +QMAKE_LIBS_THREAD = -QMAKE_AR = ar q +QMAKE_AR = ar q QMAKE_OBJCOPY = objcopy -QMAKE_RANLIB = ranlib +QMAKE_RANLIB = ranlib include(../common/unix.conf) load(qt_config) diff --git a/mkspecs/sco-cc/qmake.conf b/mkspecs/sco-cc/qmake.conf index daf3582e01..a1ebc5d033 100644 --- a/mkspecs/sco-cc/qmake.conf +++ b/mkspecs/sco-cc/qmake.conf @@ -4,63 +4,63 @@ # Written for SCO OpenServer with UDK # # -Wf,--diag_suppress,838 -# turns off warning about missing return types in X headers +# turns off warning about missing return types in X headers # -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = sco +MAKEFILE_GENERATOR = UNIX +QMAKE_PLATFORM = sco -QMAKE_COMPILER = sco_cc +QMAKE_COMPILER = sco_cc -QMAKE_CC = cc -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -QMAKE_CFLAGS_WARN_ON = -QMAKE_CFLAGS_WARN_OFF = -w -QMAKE_CFLAGS_RELEASE = -O -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_SHLIB = -KPIC -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = -Wf,--diag_suppress,111 -Wf,--diag_suppress,177 +QMAKE_CC = cc +QMAKE_LEX = flex +QMAKE_LEXFLAGS = +QMAKE_YACC = yacc +QMAKE_YACCFLAGS = -d +QMAKE_CFLAGS = +QMAKE_CFLAGS_WARN_ON = +QMAKE_CFLAGS_WARN_OFF = -w +QMAKE_CFLAGS_RELEASE = -O +QMAKE_CFLAGS_DEBUG = -g +QMAKE_CFLAGS_SHLIB = -KPIC +QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CFLAGS_YACC = -Wf,--diag_suppress,111 -Wf,--diag_suppress,177 -QMAKE_CXX = CC -QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -Wf,--display_error_number -Wf,--diag_suppress,838 -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -Tused -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CXX = CC +QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -Wf,--display_error_number -Wf,--diag_suppress,838 +QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON +QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF +QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -Tused +QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC +QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_INCDIR = -QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = -QMAKE_LIBDIR_X11 = /usr/X/lib -QMAKE_INCDIR_OPENGL = -QMAKE_LIBDIR_OPENGL = +QMAKE_INCDIR = +QMAKE_LIBDIR = +QMAKE_INCDIR_X11 = +QMAKE_LIBDIR_X11 = /usr/X/lib +QMAKE_INCDIR_OPENGL = +QMAKE_LIBDIR_OPENGL = -QMAKE_LINK = CC -QMAKE_LINK_SHLIB = CC -QMAKE_LFLAGS = -QMAKE_LFLAGS_RELEASE = -QMAKE_LFLAGS_DEBUG = -QMAKE_LFLAGS_SHLIB = -G -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME = -h$$LITERAL_WHITESPACE +QMAKE_LINK = CC +QMAKE_LINK_SHLIB = CC +QMAKE_LFLAGS = +QMAKE_LFLAGS_RELEASE = +QMAKE_LFLAGS_DEBUG = +QMAKE_LFLAGS_SHLIB = -G +QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB +QMAKE_LFLAGS_SONAME = -h$$LITERAL_WHITESPACE -QMAKE_LIBS = -QMAKE_LIBS_DYNLOAD = -ldl -QMAKE_LIBS_X11 = -lXext -lX11 -lresolv -lsocket -lnsl -lm +QMAKE_LIBS = +QMAKE_LIBS_DYNLOAD = -ldl +QMAKE_LIBS_X11 = -lXext -lX11 -lresolv -lsocket -lnsl -lm -QMAKE_LIBS_OPENGL = -lGL -lXt +QMAKE_LIBS_OPENGL = -lGL -lXt -QMAKE_AR = ar cq +QMAKE_AR = ar cq QMAKE_OBJCOPY = objcopy -QMAKE_RANLIB = +QMAKE_RANLIB = include(../common/unix.conf) load(qt_config) diff --git a/mkspecs/sco-g++/qmake.conf b/mkspecs/sco-g++/qmake.conf index 85c7ce3756..38ea4f65b7 100644 --- a/mkspecs/sco-g++/qmake.conf +++ b/mkspecs/sco-g++/qmake.conf @@ -4,65 +4,65 @@ # Written for SCO OpenServer 5.0.6 with Skunkware's compiler # -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = sco +MAKEFILE_GENERATOR = UNIX +QMAKE_PLATFORM = sco -QMAKE_COMPILER = gcc +QMAKE_COMPILER = gcc -QMAKE_CC = gcc -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -QMAKE_CFLAGS_DEPS = -M -QMAKE_CFLAGS_WARN_ON = -Wall -W -QMAKE_CFLAGS_WARN_OFF = -w -QMAKE_CFLAGS_RELEASE = -O2 -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_SHLIB = -fPIC -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses +QMAKE_CC = gcc +QMAKE_LEX = flex +QMAKE_LEXFLAGS = +QMAKE_YACC = yacc +QMAKE_YACCFLAGS = -d +QMAKE_CFLAGS = +QMAKE_CFLAGS_DEPS = -M +QMAKE_CFLAGS_WARN_ON = -Wall -W +QMAKE_CFLAGS_WARN_OFF = -w +QMAKE_CFLAGS_RELEASE = -O2 +QMAKE_CFLAGS_DEBUG = -g +QMAKE_CFLAGS_SHLIB = -fPIC +QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses -QMAKE_CXX = g++ -QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CXX = g++ +QMAKE_CXXFLAGS = $$QMAKE_CFLAGS +QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS +QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON +QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF +QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC +QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_INCDIR = -QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = -QMAKE_LIBDIR_X11 = -QMAKE_INCDIR_OPENGL = -QMAKE_LIBDIR_OPENGL = +QMAKE_INCDIR = +QMAKE_LIBDIR = +QMAKE_INCDIR_X11 = +QMAKE_LIBDIR_X11 = +QMAKE_INCDIR_OPENGL = +QMAKE_LIBDIR_OPENGL = -QMAKE_LINK = g++ -QMAKE_LINK_SHLIB = g++ -QMAKE_LINK_C = gcc -QMAKE_LINK_C_SHLIB = gcc -QMAKE_LFLAGS = -QMAKE_LFLAGS_RELEASE = -QMAKE_LFLAGS_DEBUG = -QMAKE_LFLAGS_SHLIB = -G -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME = -h$$LITERAL_WHITESPACE -QMAKE_LFLAGS_RPATH = +QMAKE_LINK = g++ +QMAKE_LINK_SHLIB = g++ +QMAKE_LINK_C = gcc +QMAKE_LINK_C_SHLIB = gcc +QMAKE_LFLAGS = +QMAKE_LFLAGS_RELEASE = +QMAKE_LFLAGS_DEBUG = +QMAKE_LFLAGS_SHLIB = -G +QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB +QMAKE_LFLAGS_SONAME = -h$$LITERAL_WHITESPACE +QMAKE_LFLAGS_RPATH = -QMAKE_LIBS = -QMAKE_LIBS_DYNLOAD = -ldl -QMAKE_LIBS_X11 = -lXext -lX11 -lsocket -lm +QMAKE_LIBS = +QMAKE_LIBS_DYNLOAD = -ldl +QMAKE_LIBS_X11 = -lXext -lX11 -lsocket -lm -QMAKE_LIBS_OPENGL = -lGL +QMAKE_LIBS_OPENGL = -lGL -QMAKE_AR = ar cqs +QMAKE_AR = ar cqs QMAKE_OBJCOPY = objcopy -QMAKE_RANLIB = +QMAKE_RANLIB = include(../common/unix.conf) load(qt_config) diff --git a/mkspecs/solaris-cc-64-stlport/qmake.conf b/mkspecs/solaris-cc-64-stlport/qmake.conf index 3437b8fd22..355b8a3515 100644 --- a/mkspecs/solaris-cc-64-stlport/qmake.conf +++ b/mkspecs/solaris-cc-64-stlport/qmake.conf @@ -4,5 +4,5 @@ include(../solaris-cc-64/qmake.conf) -QMAKE_CXXFLAGS += -library=stlport4 -QMAKE_LFLAGS += -library=stlport4 +QMAKE_CXXFLAGS += -library=stlport4 +QMAKE_LFLAGS += -library=stlport4 diff --git a/mkspecs/solaris-cc-64/qmake.conf b/mkspecs/solaris-cc-64/qmake.conf index 48207f5545..fc761420d3 100644 --- a/mkspecs/solaris-cc-64/qmake.conf +++ b/mkspecs/solaris-cc-64/qmake.conf @@ -4,90 +4,90 @@ # Written for Forte Developer 6 and Sun ONE Studio 7 and 8 # # From the standards(5) manual page: -# The XNS4 specification is safe for use only in ILP32 (32-bit) -# environments and should not be used for LP64 (64-bit) -# application environments. Use XNS5, which has LP64-clean -# interfaces that are portable across ILP32 and LP64 environments. -# [...] -# For platforms supporting the LP64 (64-bit) programming environment -# where the SC5.0 Compilers have been installed, SUSv2-conforming LP64 -# applications using XNS5 library calls should be built with command -# lines of the form: -# c89 $(getconf XBS5_LP64_OFF64_CFLAGS) -D_XOPEN_SOURCE=500 \ -# $(getconf XBS5_LP64_OFF64_LDFLAGS) foo.c -o foo \ -# $(getconf XBS5_LP64_OFF64_LIBS) -lxnet +# The XNS4 specification is safe for use only in ILP32 (32-bit) +# environments and should not be used for LP64 (64-bit) +# application environments. Use XNS5, which has LP64-clean +# interfaces that are portable across ILP32 and LP64 environments. +# [...] +# For platforms supporting the LP64 (64-bit) programming environment +# where the SC5.0 Compilers have been installed, SUSv2-conforming LP64 +# applications using XNS5 library calls should be built with command +# lines of the form: +# c89 $(getconf XBS5_LP64_OFF64_CFLAGS) -D_XOPEN_SOURCE=500 \ +# $(getconf XBS5_LP64_OFF64_LDFLAGS) foo.c -o foo \ +# $(getconf XBS5_LP64_OFF64_LIBS) -lxnet # So it appears that _XOPEN_SOURCE=500 should be defined when building # 64-bit applications (on Solaris 7 and better). But then __EXTENSIONS__ # should be defined as well to recover all the default system interface. # -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = solaris +MAKEFILE_GENERATOR = UNIX +QMAKE_PLATFORM = solaris -QMAKE_COMPILER = sun_cc +QMAKE_COMPILER = sun_cc -QMAKE_CC = cc -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -xarch=generic64 -QMAKE_CFLAGS_DEPS = -xM -QMAKE_CFLAGS_WARN_ON = -QMAKE_CFLAGS_WARN_OFF = -w -QMAKE_CFLAGS_RELEASE = -O -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_SHLIB = -KPIC -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = -QMAKE_CFLAGS_THREAD = -mt +QMAKE_CC = cc +QMAKE_LEX = flex +QMAKE_LEXFLAGS = +QMAKE_YACC = yacc +QMAKE_YACCFLAGS = -d +QMAKE_CFLAGS = -xarch=generic64 +QMAKE_CFLAGS_DEPS = -xM +QMAKE_CFLAGS_WARN_ON = +QMAKE_CFLAGS_WARN_OFF = -w +QMAKE_CFLAGS_RELEASE = -O +QMAKE_CFLAGS_DEBUG = -g +QMAKE_CFLAGS_SHLIB = -KPIC +QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CFLAGS_YACC = +QMAKE_CFLAGS_THREAD = -mt QMAKE_CFLAGS_HIDESYMS = -xldscope=hidden -QMAKE_CXX = CC -QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = -O -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CXX = CC +QMAKE_CXXFLAGS = $$QMAKE_CFLAGS +QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS +QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON +QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF +QMAKE_CXXFLAGS_RELEASE = -O +QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD +QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC +QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD QMAKE_CXXFLAGS_HIDESYMS = $$QMAKE_CFLAGS_HIDESYMS -QMAKE_INCDIR = /usr/sfw/include -QMAKE_LIBDIR = /usr/sfw/lib/64 -QMAKE_INCDIR_X11 = /usr/openwin/include -QMAKE_LIBDIR_X11 = /usr/openwin/lib/64 -QMAKE_INCDIR_OPENGL = /usr/openwin/include -QMAKE_LIBDIR_OPENGL = /usr/openwin/lib/64 +QMAKE_INCDIR = /usr/sfw/include +QMAKE_LIBDIR = /usr/sfw/lib/64 +QMAKE_INCDIR_X11 = /usr/openwin/include +QMAKE_LIBDIR_X11 = /usr/openwin/lib/64 +QMAKE_INCDIR_OPENGL = /usr/openwin/include +QMAKE_LIBDIR_OPENGL = /usr/openwin/lib/64 -QMAKE_LINK = CC -QMAKE_LINK_SHLIB = CC -QMAKE_LFLAGS = -xarch=generic64 -QMAKE_LFLAGS_RELEASE = -QMAKE_LFLAGS_DEBUG = -QMAKE_LFLAGS_SHLIB = -G -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME = -h$$LITERAL_WHITESPACE -QMAKE_LFLAGS_THREAD = -mt -QMAKE_LFLAGS_NOUNDEF = -z defs -QMAKE_LFLAGS_RPATH = -R +QMAKE_LINK = CC +QMAKE_LINK_SHLIB = CC +QMAKE_LFLAGS = -xarch=generic64 +QMAKE_LFLAGS_RELEASE = +QMAKE_LFLAGS_DEBUG = +QMAKE_LFLAGS_SHLIB = -G +QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB +QMAKE_LFLAGS_SONAME = -h$$LITERAL_WHITESPACE +QMAKE_LFLAGS_THREAD = -mt +QMAKE_LFLAGS_NOUNDEF = -z defs +QMAKE_LFLAGS_RPATH = -R -QMAKE_LIBS = -QMAKE_LIBS_DYNLOAD = -ldl -QMAKE_LIBS_X11 = -lXext -lX11 -lresolv -lsocket -lnsl -QMAKE_LIBS_NIS = -QMAKE_LIBS_OPENGL = -lGL -QMAKE_LIBS_THREAD = -lpthread -lrt +QMAKE_LIBS = +QMAKE_LIBS_DYNLOAD = -ldl +QMAKE_LIBS_X11 = -lXext -lX11 -lresolv -lsocket -lnsl +QMAKE_LIBS_NIS = +QMAKE_LIBS_OPENGL = -lGL +QMAKE_LIBS_THREAD = -lpthread -lrt QMAKE_LIBS_NETWORK = -lresolv -lsocket -lxnet -lnsl -QMAKE_AR = CC -xar -o +QMAKE_AR = CC -xar -o QMAKE_OBJCOPY = objcopy -QMAKE_RANLIB = +QMAKE_RANLIB = -QMAKE_CLEAN = -r $(OBJECTS_DIR)Templates.DB $(OBJECTS_DIR)SunWS_cache +QMAKE_CLEAN = -r $(OBJECTS_DIR)Templates.DB $(OBJECTS_DIR)SunWS_cache include(../common/unix.conf) load(qt_config) diff --git a/mkspecs/solaris-cc-stlport/qmake.conf b/mkspecs/solaris-cc-stlport/qmake.conf index b0df45e949..449b1c571f 100644 --- a/mkspecs/solaris-cc-stlport/qmake.conf +++ b/mkspecs/solaris-cc-stlport/qmake.conf @@ -4,5 +4,5 @@ include(../solaris-cc/qmake.conf) -QMAKE_CXXFLAGS += -library=stlport4 -QMAKE_LFLAGS += -library=stlport4 +QMAKE_CXXFLAGS += -library=stlport4 +QMAKE_LFLAGS += -library=stlport4 diff --git a/mkspecs/solaris-cc/qmake.conf b/mkspecs/solaris-cc/qmake.conf index 4d3716518a..29fbec38c0 100644 --- a/mkspecs/solaris-cc/qmake.conf +++ b/mkspecs/solaris-cc/qmake.conf @@ -4,73 +4,73 @@ # Written for Forte Developer 6 and Sun ONE Studio 7 and 8 # -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = solaris +MAKEFILE_GENERATOR = UNIX +QMAKE_PLATFORM = solaris -QMAKE_COMPILER = sun_cc +QMAKE_COMPILER = sun_cc -QMAKE_CC = cc -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -QMAKE_CFLAGS_DEPS = -xM -QMAKE_CFLAGS_WARN_ON = -QMAKE_CFLAGS_WARN_OFF = -w -QMAKE_CFLAGS_RELEASE = -O -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_SHLIB = -KPIC -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = -QMAKE_CFLAGS_THREAD = -mt +QMAKE_CC = cc +QMAKE_LEX = flex +QMAKE_LEXFLAGS = +QMAKE_YACC = yacc +QMAKE_YACCFLAGS = -d +QMAKE_CFLAGS = +QMAKE_CFLAGS_DEPS = -xM +QMAKE_CFLAGS_WARN_ON = +QMAKE_CFLAGS_WARN_OFF = -w +QMAKE_CFLAGS_RELEASE = -O +QMAKE_CFLAGS_DEBUG = -g +QMAKE_CFLAGS_SHLIB = -KPIC +QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CFLAGS_YACC = +QMAKE_CFLAGS_THREAD = -mt QMAKE_CFLAGS_HIDESYMS = -xldscope=hidden -QMAKE_CXX = CC -QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = -O2 -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CXX = CC +QMAKE_CXXFLAGS = $$QMAKE_CFLAGS +QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS +QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON +QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF +QMAKE_CXXFLAGS_RELEASE = -O2 +QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD +QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC +QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD QMAKE_CXXFLAGS_HIDESYMS = $$QMAKE_CFLAGS_HIDESYMS -QMAKE_INCDIR = /usr/sfw/include -QMAKE_LIBDIR = /usr/sfw/lib -QMAKE_INCDIR_X11 = /usr/openwin/include -QMAKE_LIBDIR_X11 = /usr/openwin/lib -QMAKE_INCDIR_OPENGL = /usr/openwin/include -QMAKE_LIBDIR_OPENGL = /usr/openwin/lib +QMAKE_INCDIR = /usr/sfw/include +QMAKE_LIBDIR = /usr/sfw/lib +QMAKE_INCDIR_X11 = /usr/openwin/include +QMAKE_LIBDIR_X11 = /usr/openwin/lib +QMAKE_INCDIR_OPENGL = /usr/openwin/include +QMAKE_LIBDIR_OPENGL = /usr/openwin/lib -QMAKE_LINK = CC -QMAKE_LINK_SHLIB = CC -QMAKE_LFLAGS = -QMAKE_LFLAGS_RELEASE = -QMAKE_LFLAGS_DEBUG = -QMAKE_LFLAGS_SHLIB = -G -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME = -h$$LITERAL_WHITESPACE -QMAKE_LFLAGS_THREAD = -mt -QMAKE_LFLAGS_NOUNDEF = -z defs -QMAKE_LFLAGS_RPATH = -R +QMAKE_LINK = CC +QMAKE_LINK_SHLIB = CC +QMAKE_LFLAGS = +QMAKE_LFLAGS_RELEASE = +QMAKE_LFLAGS_DEBUG = +QMAKE_LFLAGS_SHLIB = -G +QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB +QMAKE_LFLAGS_SONAME = -h$$LITERAL_WHITESPACE +QMAKE_LFLAGS_THREAD = -mt +QMAKE_LFLAGS_NOUNDEF = -z defs +QMAKE_LFLAGS_RPATH = -R -QMAKE_LIBS = -QMAKE_LIBS_DYNLOAD = -ldl -QMAKE_LIBS_X11 = -lXext -lX11 -lresolv -lsocket -lnsl -QMAKE_LIBS_NIS = -QMAKE_LIBS_OPENGL = -lGL -QMAKE_LIBS_THREAD = -lpthread -lrt +QMAKE_LIBS = +QMAKE_LIBS_DYNLOAD = -ldl +QMAKE_LIBS_X11 = -lXext -lX11 -lresolv -lsocket -lnsl +QMAKE_LIBS_NIS = +QMAKE_LIBS_OPENGL = -lGL +QMAKE_LIBS_THREAD = -lpthread -lrt QMAKE_LIBS_NETWORK = -lresolv -lsocket -lxnet -lnsl -QMAKE_AR = CC -xar -o +QMAKE_AR = CC -xar -o QMAKE_OBJCOPY = objcopy -QMAKE_RANLIB = +QMAKE_RANLIB = -QMAKE_CLEAN = -r $(OBJECTS_DIR)Templates.DB $(OBJECTS_DIR)SunWS_cache +QMAKE_CLEAN = -r $(OBJECTS_DIR)Templates.DB $(OBJECTS_DIR)SunWS_cache include(../common/unix.conf) load(qt_config) diff --git a/mkspecs/solaris-g++-64/qmake.conf b/mkspecs/solaris-g++-64/qmake.conf index 5723b7584c..e0c2f2de9c 100644 --- a/mkspecs/solaris-g++-64/qmake.conf +++ b/mkspecs/solaris-g++-64/qmake.conf @@ -8,88 +8,88 @@ # because we don't use -isystem. # # From the standards(5) manual page: -# The XNS4 specification is safe for use only in ILP32 (32-bit) -# environments and should not be used for LP64 (64-bit) -# application environments. Use XNS5, which has LP64-clean -# interfaces that are portable across ILP32 and LP64 environments. -# [...] -# For platforms supporting the LP64 (64-bit) programming environment -# where the SC5.0 Compilers have been installed, SUSv2-conforming LP64 -# applications using XNS5 library calls should be built with command -# lines of the form: -# c89 $(getconf XBS5_LP64_OFF64_CFLAGS) -D_XOPEN_SOURCE=500 \ -# $(getconf XBS5_LP64_OFF64_LDFLAGS) foo.c -o foo \ -# $(getconf XBS5_LP64_OFF64_LIBS) -lxnet +# The XNS4 specification is safe for use only in ILP32 (32-bit) +# environments and should not be used for LP64 (64-bit) +# application environments. Use XNS5, which has LP64-clean +# interfaces that are portable across ILP32 and LP64 environments. +# [...] +# For platforms supporting the LP64 (64-bit) programming environment +# where the SC5.0 Compilers have been installed, SUSv2-conforming LP64 +# applications using XNS5 library calls should be built with command +# lines of the form: +# c89 $(getconf XBS5_LP64_OFF64_CFLAGS) -D_XOPEN_SOURCE=500 \ +# $(getconf XBS5_LP64_OFF64_LDFLAGS) foo.c -o foo \ +# $(getconf XBS5_LP64_OFF64_LIBS) -lxnet # So it appears that _XOPEN_SOURCE=500 should be defined when building # 64-bit applications (on Solaris 7 and better). But then __EXTENSIONS__ # should be defined as well to recover all the default system interface. # -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = solaris +MAKEFILE_GENERATOR = UNIX +QMAKE_PLATFORM = solaris -QMAKE_COMPILER = gcc +QMAKE_COMPILER = gcc -QMAKE_CC = gcc -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -m64 -D_XOPEN_SOURCE=500 -D__EXTENSIONS__ -QMAKE_CFLAGS_DEPS = -M -QMAKE_CFLAGS_WARN_ON = -Wall -W -QMAKE_CFLAGS_WARN_OFF = -w -QMAKE_CFLAGS_RELEASE = -O2 -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_SHLIB = -fPIC -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses -QMAKE_CFLAGS_THREAD = -D_REENTRANT +QMAKE_CC = gcc +QMAKE_LEX = flex +QMAKE_LEXFLAGS = +QMAKE_YACC = yacc +QMAKE_YACCFLAGS = -d +QMAKE_CFLAGS = -m64 -D_XOPEN_SOURCE=500 -D__EXTENSIONS__ +QMAKE_CFLAGS_DEPS = -M +QMAKE_CFLAGS_WARN_ON = -Wall -W +QMAKE_CFLAGS_WARN_OFF = -w +QMAKE_CFLAGS_RELEASE = -O2 +QMAKE_CFLAGS_DEBUG = -g +QMAKE_CFLAGS_SHLIB = -fPIC +QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses +QMAKE_CFLAGS_THREAD = -D_REENTRANT -QMAKE_CXX = g++ -QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CXX = g++ +QMAKE_CXXFLAGS = $$QMAKE_CFLAGS +QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS +QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON +QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF +QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD +QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC +QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD -QMAKE_INCDIR = /usr/sfw/include -QMAKE_LIBDIR = /usr/sfw/lib/64 -QMAKE_INCDIR_X11 = /usr/openwin/include -QMAKE_LIBDIR_X11 = /usr/openwin/lib/64 -QMAKE_INCDIR_OPENGL = /usr/openwin/include -QMAKE_LIBDIR_OPENGL = /usr/openwin/lib/64 +QMAKE_INCDIR = /usr/sfw/include +QMAKE_LIBDIR = /usr/sfw/lib/64 +QMAKE_INCDIR_X11 = /usr/openwin/include +QMAKE_LIBDIR_X11 = /usr/openwin/lib/64 +QMAKE_INCDIR_OPENGL = /usr/openwin/include +QMAKE_LIBDIR_OPENGL = /usr/openwin/lib/64 -QMAKE_LINK = g++ -QMAKE_LINK_SHLIB = g++ -QMAKE_LINK_C = gcc -QMAKE_LINK_C_SHLIB = gcc -QMAKE_LFLAGS = -m64 -QMAKE_LFLAGS_RELEASE = -QMAKE_LFLAGS_DEBUG = -g -QMAKE_LFLAGS_SHLIB = -shared -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME = -h$$LITERAL_WHITESPACE -QMAKE_LFLAGS_THREAD = -QMAKE_LFLAGS_NOUNDEF = -z defs -QMAKE_LFLAGS_RPATH = -Wl,-R, +QMAKE_LINK = g++ +QMAKE_LINK_SHLIB = g++ +QMAKE_LINK_C = gcc +QMAKE_LINK_C_SHLIB = gcc +QMAKE_LFLAGS = -m64 +QMAKE_LFLAGS_RELEASE = +QMAKE_LFLAGS_DEBUG = -g +QMAKE_LFLAGS_SHLIB = -shared +QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB +QMAKE_LFLAGS_SONAME = -h$$LITERAL_WHITESPACE +QMAKE_LFLAGS_THREAD = +QMAKE_LFLAGS_NOUNDEF = -z defs +QMAKE_LFLAGS_RPATH = -Wl,-R, -QMAKE_LIBS = -QMAKE_LIBS_DYNLOAD = -ldl -QMAKE_LIBS_X11 = -lXext -lX11 -lresolv -lsocket -lnsl -QMAKE_LIBS_NIS = -QMAKE_LIBS_OPENGL = -lGL -QMAKE_LIBS_THREAD = -lpthread -lrt +QMAKE_LIBS = +QMAKE_LIBS_DYNLOAD = -ldl +QMAKE_LIBS_X11 = -lXext -lX11 -lresolv -lsocket -lnsl +QMAKE_LIBS_NIS = +QMAKE_LIBS_OPENGL = -lGL +QMAKE_LIBS_THREAD = -lpthread -lrt QMAKE_LIBS_NETWORK = -lresolv -lsocket -lxnet -lnsl -QMAKE_AR = ar cq +QMAKE_AR = ar cq QMAKE_OBJCOPY = objcopy -QMAKE_RANLIB = +QMAKE_RANLIB = include(../common/unix.conf) load(qt_config) diff --git a/mkspecs/solaris-g++/qmake.conf b/mkspecs/solaris-g++/qmake.conf index 1c3cb53ec6..9f714ea2d1 100644 --- a/mkspecs/solaris-g++/qmake.conf +++ b/mkspecs/solaris-g++/qmake.conf @@ -8,71 +8,71 @@ # because we don't use -isystem. # -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = solaris +MAKEFILE_GENERATOR = UNIX +QMAKE_PLATFORM = solaris -QMAKE_COMPILER = gcc +QMAKE_COMPILER = gcc -QMAKE_CC = gcc -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -QMAKE_CFLAGS_DEPS = -M -QMAKE_CFLAGS_WARN_ON = -Wall -W -QMAKE_CFLAGS_WARN_OFF = -w -QMAKE_CFLAGS_RELEASE = -O2 -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_SHLIB = -fPIC -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses -QMAKE_CFLAGS_THREAD = -D_REENTRANT +QMAKE_CC = gcc +QMAKE_LEX = flex +QMAKE_LEXFLAGS = +QMAKE_YACC = yacc +QMAKE_YACCFLAGS = -d +QMAKE_CFLAGS = +QMAKE_CFLAGS_DEPS = -M +QMAKE_CFLAGS_WARN_ON = -Wall -W +QMAKE_CFLAGS_WARN_OFF = -w +QMAKE_CFLAGS_RELEASE = -O2 +QMAKE_CFLAGS_DEBUG = -g +QMAKE_CFLAGS_SHLIB = -fPIC +QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses +QMAKE_CFLAGS_THREAD = -D_REENTRANT -QMAKE_CXX = g++ -QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CXX = g++ +QMAKE_CXXFLAGS = $$QMAKE_CFLAGS +QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS +QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON +QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF +QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD +QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC +QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD -QMAKE_INCDIR = /usr/sfw/include -QMAKE_LIBDIR = /usr/sfw/lib -QMAKE_INCDIR_X11 = /usr/openwin/include -QMAKE_LIBDIR_X11 = /usr/openwin/lib -QMAKE_INCDIR_OPENGL = /usr/openwin/include -QMAKE_LIBDIR_OPENGL = /usr/openwin/lib +QMAKE_INCDIR = /usr/sfw/include +QMAKE_LIBDIR = /usr/sfw/lib +QMAKE_INCDIR_X11 = /usr/openwin/include +QMAKE_LIBDIR_X11 = /usr/openwin/lib +QMAKE_INCDIR_OPENGL = /usr/openwin/include +QMAKE_LIBDIR_OPENGL = /usr/openwin/lib -QMAKE_LINK = g++ -QMAKE_LINK_SHLIB = g++ -QMAKE_LINK_C = gcc -QMAKE_LINK_C_SHLIB = gcc -QMAKE_LFLAGS = -QMAKE_LFLAGS_RELEASE = -QMAKE_LFLAGS_DEBUG = -g -QMAKE_LFLAGS_SHLIB = -shared -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME = -h$$LITERAL_WHITESPACE -QMAKE_LFLAGS_THREAD = -QMAKE_LFLAGS_NOUNDEF = -z defs -QMAKE_LFLAGS_RPATH = -Wl,-R, +QMAKE_LINK = g++ +QMAKE_LINK_SHLIB = g++ +QMAKE_LINK_C = gcc +QMAKE_LINK_C_SHLIB = gcc +QMAKE_LFLAGS = +QMAKE_LFLAGS_RELEASE = +QMAKE_LFLAGS_DEBUG = -g +QMAKE_LFLAGS_SHLIB = -shared +QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB +QMAKE_LFLAGS_SONAME = -h$$LITERAL_WHITESPACE +QMAKE_LFLAGS_THREAD = +QMAKE_LFLAGS_NOUNDEF = -z defs +QMAKE_LFLAGS_RPATH = -Wl,-R, -QMAKE_LIBS = -QMAKE_LIBS_DYNLOAD = -ldl -QMAKE_LIBS_X11 = -lXext -lX11 -lresolv -lsocket -lnsl -QMAKE_LIBS_NIS = -QMAKE_LIBS_OPENGL = -lGL -QMAKE_LIBS_THREAD = -lpthread -lrt +QMAKE_LIBS = +QMAKE_LIBS_DYNLOAD = -ldl +QMAKE_LIBS_X11 = -lXext -lX11 -lresolv -lsocket -lnsl +QMAKE_LIBS_NIS = +QMAKE_LIBS_OPENGL = -lGL +QMAKE_LIBS_THREAD = -lpthread -lrt QMAKE_LIBS_NETWORK = -lresolv -lsocket -lxnet -lnsl -QMAKE_AR = ar cq +QMAKE_AR = ar cq QMAKE_OBJCOPY = objcopy -QMAKE_RANLIB = +QMAKE_RANLIB = include(../common/unix.conf) load(qt_config) diff --git a/mkspecs/tru64-cxx/qmake.conf b/mkspecs/tru64-cxx/qmake.conf index 6c5c52df17..04cbe59b13 100644 --- a/mkspecs/tru64-cxx/qmake.conf +++ b/mkspecs/tru64-cxx/qmake.conf @@ -2,67 +2,67 @@ # qmake configuration for tru64-cxx # -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = tru64 -CONFIG += plugin_no_soname +MAKEFILE_GENERATOR = UNIX +QMAKE_PLATFORM = tru64 +CONFIG += plugin_no_soname -QMAKE_COMPILER = dec_cc +QMAKE_COMPILER = dec_cc -QMAKE_CC = cc -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -QMAKE_CFLAGS_DEPS = -M -QMAKE_CFLAGS_WARN_ON = -QMAKE_CFLAGS_WARN_OFF = -QMAKE_CFLAGS_RELEASE = -O2 -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_SHLIB = -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = -Olimit 1000 -QMAKE_CFLAGS_THREAD = -pthread +QMAKE_CC = cc +QMAKE_LEX = flex +QMAKE_LEXFLAGS = +QMAKE_YACC = yacc +QMAKE_YACCFLAGS = -d +QMAKE_CFLAGS = +QMAKE_CFLAGS_DEPS = -M +QMAKE_CFLAGS_WARN_ON = +QMAKE_CFLAGS_WARN_OFF = +QMAKE_CFLAGS_RELEASE = -O2 +QMAKE_CFLAGS_DEBUG = -g +QMAKE_CFLAGS_SHLIB = +QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CFLAGS_YACC = -Olimit 1000 +QMAKE_CFLAGS_THREAD = -pthread -QMAKE_CXX = cxx -QMAKE_CXXFLAGS = -x cxx -model ansi $$QMAKE_CFLAGS -QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CXX = cxx +QMAKE_CXXFLAGS = -x cxx -model ansi $$QMAKE_CFLAGS +QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS +QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON +QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF +QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD +QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC +QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD -QMAKE_INCDIR = -QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = -QMAKE_LIBDIR_X11 = -QMAKE_INCDIR_OPENGL = -QMAKE_LIBDIR_OPENGL = +QMAKE_INCDIR = +QMAKE_LIBDIR = +QMAKE_INCDIR_X11 = +QMAKE_LIBDIR_X11 = +QMAKE_INCDIR_OPENGL = +QMAKE_LIBDIR_OPENGL = -QMAKE_LINK = cxx -QMAKE_LINK_SHLIB = cxx -QMAKE_LFLAGS = -model ansi -QMAKE_LFLAGS_RELEASE = -QMAKE_LFLAGS_DEBUG = -QMAKE_LFLAGS_SHLIB = -shared -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_THREAD = -pthread -QMAKE_LFLAGS_SONAME = -soname$$LITERAL_WHITESPACE -QMAKE_LFLAGS_RPATH = -rpath$$LITERAL_WHITESPACE +QMAKE_LINK = cxx +QMAKE_LINK_SHLIB = cxx +QMAKE_LFLAGS = -model ansi +QMAKE_LFLAGS_RELEASE = +QMAKE_LFLAGS_DEBUG = +QMAKE_LFLAGS_SHLIB = -shared +QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB +QMAKE_LFLAGS_THREAD = -pthread +QMAKE_LFLAGS_SONAME = -soname$$LITERAL_WHITESPACE +QMAKE_LFLAGS_RPATH = -rpath$$LITERAL_WHITESPACE -QMAKE_LIBS = -lm -QMAKE_LIBS_DYNLOAD = -QMAKE_LIBS_X11 = -lXext -lX11 -QMAKE_LIBS_OPENGL = -lGL -QMAKE_LIBS_THREAD = -lrt +QMAKE_LIBS = -lm +QMAKE_LIBS_DYNLOAD = +QMAKE_LIBS_X11 = -lXext -lX11 +QMAKE_LIBS_OPENGL = -lGL +QMAKE_LIBS_THREAD = -lrt -QMAKE_AR = ar cqs +QMAKE_AR = ar cqs QMAKE_OBJCOPY = objcopy -QMAKE_RANLIB = +QMAKE_RANLIB = include(../common/unix.conf) load(qt_config) diff --git a/mkspecs/tru64-g++/qmake.conf b/mkspecs/tru64-g++/qmake.conf index ef27702680..a3f08220f6 100644 --- a/mkspecs/tru64-g++/qmake.conf +++ b/mkspecs/tru64-g++/qmake.conf @@ -2,69 +2,69 @@ # qmake configuration for tru64-g++ # -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = tru64 -CONFIG += plugin_no_soname +MAKEFILE_GENERATOR = UNIX +QMAKE_PLATFORM = tru64 +CONFIG += plugin_no_soname -QMAKE_COMPILER = gcc +QMAKE_COMPILER = gcc -QMAKE_CC = gcc -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -QMAKE_CFLAGS_DEPS = -M -QMAKE_CFLAGS_WARN_ON = -Wall -W -QMAKE_CFLAGS_WARN_OFF = -w -QMAKE_CFLAGS_RELEASE = -O2 -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_SHLIB = -fPIC -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses -QMAKE_CFLAGS_THREAD = -D_REENTRANT +QMAKE_CC = gcc +QMAKE_LEX = flex +QMAKE_LEXFLAGS = +QMAKE_YACC = yacc +QMAKE_YACCFLAGS = -d +QMAKE_CFLAGS = +QMAKE_CFLAGS_DEPS = -M +QMAKE_CFLAGS_WARN_ON = -Wall -W +QMAKE_CFLAGS_WARN_OFF = -w +QMAKE_CFLAGS_RELEASE = -O2 +QMAKE_CFLAGS_DEBUG = -g +QMAKE_CFLAGS_SHLIB = -fPIC +QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses +QMAKE_CFLAGS_THREAD = -D_REENTRANT -QMAKE_CXX = g++ -QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CXX = g++ +QMAKE_CXXFLAGS = $$QMAKE_CFLAGS +QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS +QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON +QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF +QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD +QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC +QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD -QMAKE_INCDIR = -QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = -QMAKE_LIBDIR_X11 = -QMAKE_INCDIR_OPENGL = -QMAKE_LIBDIR_OPENGL = +QMAKE_INCDIR = +QMAKE_LIBDIR = +QMAKE_INCDIR_X11 = +QMAKE_LIBDIR_X11 = +QMAKE_INCDIR_OPENGL = +QMAKE_LIBDIR_OPENGL = -QMAKE_LINK = g++ -QMAKE_LINK_SHLIB = g++ -QMAKE_LINK_C = gcc -QMAKE_LINK_C_SHLIB = gcc -QMAKE_LFLAGS = -QMAKE_LFLAGS_RELEASE = -QMAKE_LFLAGS_DEBUG = -QMAKE_LFLAGS_SHLIB = -shared -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_THREAD = -QMAKE_LFLAGS_SONAME = -Wl,-soname, -QMAKE_LFLAGS_RPATH = -Wl,-rpath, +QMAKE_LINK = g++ +QMAKE_LINK_SHLIB = g++ +QMAKE_LINK_C = gcc +QMAKE_LINK_C_SHLIB = gcc +QMAKE_LFLAGS = +QMAKE_LFLAGS_RELEASE = +QMAKE_LFLAGS_DEBUG = +QMAKE_LFLAGS_SHLIB = -shared +QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB +QMAKE_LFLAGS_THREAD = +QMAKE_LFLAGS_SONAME = -Wl,-soname, +QMAKE_LFLAGS_RPATH = -Wl,-rpath, -QMAKE_LIBS = -QMAKE_LIBS_DYNLOAD = -QMAKE_LIBS_X11 = -lXext -lX11 -lm -QMAKE_LIBS_OPENGL = -lGL -QMAKE_LIBS_THREAD = -lpthread -lexc -lrt +QMAKE_LIBS = +QMAKE_LIBS_DYNLOAD = +QMAKE_LIBS_X11 = -lXext -lX11 -lm +QMAKE_LIBS_OPENGL = -lGL +QMAKE_LIBS_THREAD = -lpthread -lexc -lrt -QMAKE_AR = ar cqs +QMAKE_AR = ar cqs QMAKE_OBJCOPY = objcopy -QMAKE_RANLIB = +QMAKE_RANLIB = include(../common/unix.conf) load(qt_config) diff --git a/mkspecs/unixware-cc/qmake.conf b/mkspecs/unixware-cc/qmake.conf index e96f8e890b..68018213c9 100644 --- a/mkspecs/unixware-cc/qmake.conf +++ b/mkspecs/unixware-cc/qmake.conf @@ -4,69 +4,69 @@ # Written for UnixWare 7 with UDK or OUDK # # -Wf,--diag_suppress,838 -# turns off warning about missing return types in X headers +# turns off warning about missing return types in X headers # -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = unixware +MAKEFILE_GENERATOR = UNIX +QMAKE_PLATFORM = unixware -QMAKE_COMPILER = sco_cc +QMAKE_COMPILER = sco_cc -QMAKE_CC = cc -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -QMAKE_CFLAGS_WARN_ON = -QMAKE_CFLAGS_WARN_OFF = -w -QMAKE_CFLAGS_RELEASE = -O -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_SHLIB = -KPIC -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = -Wf,--diag_suppress,111 -Wf,--diag_suppress,177 -QMAKE_CFLAGS_THREAD = -Kthread +QMAKE_CC = cc +QMAKE_LEX = flex +QMAKE_LEXFLAGS = +QMAKE_YACC = yacc +QMAKE_YACCFLAGS = -d +QMAKE_CFLAGS = +QMAKE_CFLAGS_WARN_ON = +QMAKE_CFLAGS_WARN_OFF = -w +QMAKE_CFLAGS_RELEASE = -O +QMAKE_CFLAGS_DEBUG = -g +QMAKE_CFLAGS_SHLIB = -KPIC +QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CFLAGS_YACC = -Wf,--diag_suppress,111 -Wf,--diag_suppress,177 +QMAKE_CFLAGS_THREAD = -Kthread -QMAKE_CXX = CC -QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -Wf,--display_error_number -Wf,--diag_suppress,838 -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -Tused -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CXX = CC +QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -Wf,--display_error_number -Wf,--diag_suppress,838 +QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON +QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF +QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -Tused +QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD +QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC +QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD -QMAKE_INCDIR = -QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = -QMAKE_LIBDIR_X11 = /usr/X/lib -QMAKE_INCDIR_OPENGL = -QMAKE_LIBDIR_OPENGL = +QMAKE_INCDIR = +QMAKE_LIBDIR = +QMAKE_INCDIR_X11 = +QMAKE_LIBDIR_X11 = /usr/X/lib +QMAKE_INCDIR_OPENGL = +QMAKE_LIBDIR_OPENGL = -QMAKE_LINK = CC -QMAKE_LINK_SHLIB = CC -QMAKE_LFLAGS = -QMAKE_LFLAGS_RELEASE = -QMAKE_LFLAGS_DEBUG = -QMAKE_LFLAGS_SHLIB = -G -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME = -h$$LITERAL_WHITESPACE -QMAKE_LFLAGS_THREAD = -Kthread -QMAKE_LFLAGS_RPATH = -R +QMAKE_LINK = CC +QMAKE_LINK_SHLIB = CC +QMAKE_LFLAGS = +QMAKE_LFLAGS_RELEASE = +QMAKE_LFLAGS_DEBUG = +QMAKE_LFLAGS_SHLIB = -G +QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB +QMAKE_LFLAGS_SONAME = -h$$LITERAL_WHITESPACE +QMAKE_LFLAGS_THREAD = -Kthread +QMAKE_LFLAGS_RPATH = -R -QMAKE_LIBS = -QMAKE_LIBS_DYNLOAD = -ldl -QMAKE_LIBS_X11 = -lXext -lX11 -lresolv -lsocket -lnsl -lm +QMAKE_LIBS = +QMAKE_LIBS_DYNLOAD = -ldl +QMAKE_LIBS_X11 = -lXext -lX11 -lresolv -lsocket -lnsl -lm -QMAKE_LIBS_OPENGL = -lGL -lXt +QMAKE_LIBS_OPENGL = -lGL -lXt -QMAKE_LIBS_THREAD = +QMAKE_LIBS_THREAD = -QMAKE_AR = ar cq +QMAKE_AR = ar cq QMAKE_OBJCOPY = objcopy -QMAKE_RANLIB = +QMAKE_RANLIB = include(../common/unix.conf) load(qt_config) diff --git a/mkspecs/unixware-g++/qmake.conf b/mkspecs/unixware-g++/qmake.conf index 6e5ea9fbb1..28f4314386 100644 --- a/mkspecs/unixware-g++/qmake.conf +++ b/mkspecs/unixware-g++/qmake.conf @@ -4,68 +4,68 @@ # Written for UnixWare 7 with OSTK # -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = unixware +MAKEFILE_GENERATOR = UNIX +QMAKE_PLATFORM = unixware -QMAKE_COMPILER = gcc +QMAKE_COMPILER = gcc -QMAKE_CC = gcc -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = yacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -QMAKE_CFLAGS_DEPS = -M -QMAKE_CFLAGS_WARN_ON = -Wall -W -QMAKE_CFLAGS_WARN_OFF = -w -QMAKE_CFLAGS_RELEASE = -O2 -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_SHLIB = -fPIC -QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses -QMAKE_CFLAGS_THREAD = +QMAKE_CC = gcc +QMAKE_LEX = flex +QMAKE_LEXFLAGS = +QMAKE_YACC = yacc +QMAKE_YACCFLAGS = -d +QMAKE_CFLAGS = +QMAKE_CFLAGS_DEPS = -M +QMAKE_CFLAGS_WARN_ON = -Wall -W +QMAKE_CFLAGS_WARN_OFF = -w +QMAKE_CFLAGS_RELEASE = -O2 +QMAKE_CFLAGS_DEBUG = -g +QMAKE_CFLAGS_SHLIB = -fPIC +QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses +QMAKE_CFLAGS_THREAD = -QMAKE_CXX = g++ -QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CXX = g++ +QMAKE_CXXFLAGS = $$QMAKE_CFLAGS +QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS +QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON +QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF +QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD +QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC +QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD -QMAKE_INCDIR = -QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = -QMAKE_LIBDIR_X11 = /usr/X/lib -QMAKE_INCDIR_OPENGL = -QMAKE_LIBDIR_OPENGL = +QMAKE_INCDIR = +QMAKE_LIBDIR = +QMAKE_INCDIR_X11 = +QMAKE_LIBDIR_X11 = /usr/X/lib +QMAKE_INCDIR_OPENGL = +QMAKE_LIBDIR_OPENGL = -QMAKE_LINK = g++ -QMAKE_LINK_SHLIB = g++ -QMAKE_LINK_C = gcc -QMAKE_LINK_C_SHLIB = gcc -QMAKE_LFLAGS = -QMAKE_LFLAGS_RELEASE = -QMAKE_LFLAGS_DEBUG = -QMAKE_LFLAGS_SHLIB = -shared -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME = -QMAKE_LFLAGS_THREAD = -QMAKE_LFLAGS_RPATH = -Wl,-R, +QMAKE_LINK = g++ +QMAKE_LINK_SHLIB = g++ +QMAKE_LINK_C = gcc +QMAKE_LINK_C_SHLIB = gcc +QMAKE_LFLAGS = +QMAKE_LFLAGS_RELEASE = +QMAKE_LFLAGS_DEBUG = +QMAKE_LFLAGS_SHLIB = -shared +QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB +QMAKE_LFLAGS_SONAME = +QMAKE_LFLAGS_THREAD = +QMAKE_LFLAGS_RPATH = -Wl,-R, -QMAKE_LIBS = -QMAKE_LIBS_DYNLOAD = -ldl -QMAKE_LIBS_X11 = -lXext -lX11 -lresolv -lsocket -lnsl -lm -QMAKE_LIBS_OPENGL = -lGL -lXt -QMAKE_LIBS_THREAD = -lthread +QMAKE_LIBS = +QMAKE_LIBS_DYNLOAD = -ldl +QMAKE_LIBS_X11 = -lXext -lX11 -lresolv -lsocket -lnsl -lm +QMAKE_LIBS_OPENGL = -lGL -lXt +QMAKE_LIBS_THREAD = -lthread -QMAKE_AR = ar cq +QMAKE_AR = ar cq QMAKE_OBJCOPY = objcopy -QMAKE_RANLIB = +QMAKE_RANLIB = include(../common/unix.conf) load(qt_config) diff --git a/mkspecs/unsupported/android-g++/qmake.conf b/mkspecs/unsupported/android-g++/qmake.conf index 1955054880..71b843af7e 100644 --- a/mkspecs/unsupported/android-g++/qmake.conf +++ b/mkspecs/unsupported/android-g++/qmake.conf @@ -135,26 +135,26 @@ QMAKE_INCDIR_OPENGL_ES2 = QMAKE_LIBDIR_OPENGL_ES2 = -QMAKE_LINK = $$QMAKE_CXX -QMAKE_LINK_SHLIB = $$QMAKE_CXX -QMAKE_LFLAGS = $${ANDROID_TARGET_LDFLAGS} \ - -nostdlib \ - -L${ANDROID_PRODUCT_OUT}/obj/lib \ - -Wl,-rpath-link,${ANDROID_PRODUCT_OUT}/obj/lib +QMAKE_LINK = $$QMAKE_CXX +QMAKE_LINK_SHLIB = $$QMAKE_CXX +QMAKE_LFLAGS = $${ANDROID_TARGET_LDFLAGS} \ + -nostdlib \ + -L${ANDROID_PRODUCT_OUT}/obj/lib \ + -Wl,-rpath-link,${ANDROID_PRODUCT_OUT}/obj/lib -QMAKE_LFLAGS_PLUGIN = -Wl,-T,${ANDROID_BUILD_TOP}/build/core/armelf.xsc \ - -Wl,-shared,-Bsymbolic +QMAKE_LFLAGS_PLUGIN = -Wl,-T,${ANDROID_BUILD_TOP}/build/core/armelf.xsc \ + -Wl,-shared,-Bsymbolic #apparantly this file is missing from some builds. #it does work without, but this may change in future. #QMAKE_LFLAGS_APP = -Wl,-T,${ANDROID_BUILD_TOP}/build/core/armelf.xs \ -QMAKE_LFLAGS_APP = ${ANDROID_PRODUCT_OUT}/obj/lib/crtbegin_dynamic.o \ - ${ANDROID_PRODUCT_OUT}/obj/lib/crtend_android.o +QMAKE_LFLAGS_APP = ${ANDROID_PRODUCT_OUT}/obj/lib/crtbegin_dynamic.o \ + ${ANDROID_PRODUCT_OUT}/obj/lib/crtend_android.o -QMAKE_LFLAGS_SHLIB = -Wl,-T,${ANDROID_BUILD_TOP}/build/core/armelf.xsc \ - -Wl,-shared,-Bsymbolic \ - ${ANDROID_PRODUCT_OUT}/obj/lib/crtbegin_so.o \ - ${ANDROID_PRODUCT_OUT}/obj/lib/crtend_so.o +QMAKE_LFLAGS_SHLIB = -Wl,-T,${ANDROID_BUILD_TOP}/build/core/armelf.xsc \ + -Wl,-shared,-Bsymbolic \ + ${ANDROID_PRODUCT_OUT}/obj/lib/crtbegin_so.o \ + ${ANDROID_PRODUCT_OUT}/obj/lib/crtend_so.o QMAKE_LFLAGS_SONAME = QMAKE_LFLAGS_NOUNDEF = -Wl,--no-undefined @@ -174,12 +174,12 @@ QMAKE_LIBS_OPENGL = QMAKE_LIBS_OPENGL_ES1 = -lGLESv1_CM QMAKE_LIBS_OPENGL_ES2 = -lEGL -lGLESv2 $$QMAKE_LIBS -CONFIG += linux-android-9 android-9 linux-android android android-no-sdk android_app +CONFIG += linux-android-9 android-9 linux-android android android-no-sdk android_app load(qt_config) # we don't support exceptions, but right now this has no effect # you need to manually delete mkspecs/features/exceptions.prf -CONFIG -= exceptions -CONFIG += exceptions_off +CONFIG -= exceptions +CONFIG += exceptions_off diff --git a/mkspecs/unsupported/integrity-ghs/qmake.conf b/mkspecs/unsupported/integrity-ghs/qmake.conf index 72f31477df..1ffc2ccec8 100644 --- a/mkspecs/unsupported/integrity-ghs/qmake.conf +++ b/mkspecs/unsupported/integrity-ghs/qmake.conf @@ -2,51 +2,51 @@ # qmake configuration for integrity-ghs # -MAKEFILE_GENERATOR = GBUILD -QMAKE_PLATFORM = integrity unix posix -CONFIG -= link_prl # Not implemented - -QMAKE_CFLAGS = -bsp $$INTEGRITY_BSP -os_dir $__OS_DIR -QMAKE_CFLAGS += --diag_suppress=1,228,236,381,611,997 -QMAKE_CFLAGS_WARN_ON = -QMAKE_CFLAGS_WARN_OFF = -w -QMAKE_CFLAGS_RELEASE = -g -Ospeed -Olink --signed_fields --no_commons -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_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD - -QMAKE_INCDIR = -QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = -QMAKE_LIBDIR_X11 = -QMAKE_INCDIR_OPENGL = -QMAKE_LIBDIR_OPENGL = - -QMAKE_LFLAGS = -lposix -livfs -lnet -lsocket -lfbdev -ldl -QMAKE_LFLAGS_RELEASE = -g -Ospeed -Olink --no_commons -non_shared --link_once_templates -QMAKE_LFLAGS_DEBUG = -g --no_commons +MAKEFILE_GENERATOR = GBUILD +QMAKE_PLATFORM = integrity unix posix +CONFIG -= link_prl # Not implemented + +QMAKE_CFLAGS = -bsp $$INTEGRITY_BSP -os_dir $__OS_DIR +QMAKE_CFLAGS += --diag_suppress=1,228,236,381,611,997 +QMAKE_CFLAGS_WARN_ON = +QMAKE_CFLAGS_WARN_OFF = -w +QMAKE_CFLAGS_RELEASE = -g -Ospeed -Olink --signed_fields --no_commons +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_WARN_ON = $$QMAKE_CFLAGS_WARN_ON +QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF +QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB +QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC +QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD + +QMAKE_INCDIR = +QMAKE_LIBDIR = +QMAKE_INCDIR_X11 = +QMAKE_LIBDIR_X11 = +QMAKE_INCDIR_OPENGL = +QMAKE_LIBDIR_OPENGL = + +QMAKE_LFLAGS = -lposix -livfs -lnet -lsocket -lfbdev -ldl +QMAKE_LFLAGS_RELEASE = -g -Ospeed -Olink --no_commons -non_shared --link_once_templates +QMAKE_LFLAGS_DEBUG = -g --no_commons QMAKE_LFLAGS_SHLIB = QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB QMAKE_LFLAGS_SONAME = QMAKE_LFLAGS_THREAD = QMAKE_LFLAGS_RPATH = -QMAKE_LIBS = +QMAKE_LIBS = QMAKE_LIBS_DYNLOAD = -ldl -QMAKE_LIBS_X11 = +QMAKE_LIBS_X11 = QMAKE_LIBS_THREAD = -QMAKE_AR = ar cqs -QMAKE_RANLIB = +QMAKE_AR = ar cqs +QMAKE_RANLIB = include(../../common/shell-unix.conf) load(qt_config) diff --git a/mkspecs/unsupported/linux-armcc/qmake.conf b/mkspecs/unsupported/linux-armcc/qmake.conf index a65f8d534e..2c7eb7c2d8 100644 --- a/mkspecs/unsupported/linux-armcc/qmake.conf +++ b/mkspecs/unsupported/linux-armcc/qmake.conf @@ -3,7 +3,7 @@ # MAKEFILE_GENERATOR = UNIX -CONFIG += incremental armcc_linker +CONFIG += incremental armcc_linker QMAKE_INCREMENTAL_STYLE = sublib include(../../common/linux.conf) @@ -11,19 +11,19 @@ include(../../common/armcc.conf) load(qt_config) # use armcc for linking since armlink doesn't understand the arm_linux_config_file option -QMAKE_LINK = armcc -QMAKE_LINK_SHLIB = armcc -QMAKE_LINK_C = armcc -QMAKE_LINK_C_SHLIB = armcc +QMAKE_LINK = armcc +QMAKE_LINK_SHLIB = armcc +QMAKE_LINK_C = armcc +QMAKE_LINK_C_SHLIB = armcc -QMAKE_LFLAGS_SHLIB += --apcs=/fpic --shared +QMAKE_LFLAGS_SHLIB += --apcs=/fpic --shared QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LIBS += libstdc++.so librt.so +QMAKE_LIBS += libstdc++.so librt.so -CONFIG -= rvct_linker +CONFIG -= rvct_linker -QMAKE_CFLAGS += --gnu --arm_linux --dllimport_runtime --thumb --cpu Cortex-A9 --arm_linux_config_file="$(HOME)/qt_rvct_config" --arm-linux-paths --apcs=/interwork --visibility_inlines_hidden --diag_suppress 1300,2523 -QMAKE_CXXFLAGS += $$QMAKE_CFLAGS --cpp +QMAKE_CFLAGS += --gnu --arm_linux --dllimport_runtime --thumb --cpu Cortex-A9 --arm_linux_config_file="$(HOME)/qt_rvct_config" --arm-linux-paths --apcs=/interwork --visibility_inlines_hidden --diag_suppress 1300,2523 +QMAKE_CXXFLAGS += $$QMAKE_CFLAGS --cpp -QMAKE_LFLAGS += --diag_suppress 6331,6780,6439 --arm_linux_config_file="$(HOME)/qt_rvct_config" --arm-linux-paths +QMAKE_LFLAGS += --diag_suppress 6331,6780,6439 --arm_linux_config_file="$(HOME)/qt_rvct_config" --arm-linux-paths diff --git a/mkspecs/unsupported/linux-host-g++/qmake.conf b/mkspecs/unsupported/linux-host-g++/qmake.conf index 47579600c1..710c1876aa 100644 --- a/mkspecs/unsupported/linux-host-g++/qmake.conf +++ b/mkspecs/unsupported/linux-host-g++/qmake.conf @@ -12,41 +12,41 @@ # configure has a bug which stops re-assignments working # for QMake variables (I.e. "QMAKE_foo = bar" is broken). -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = linux -CONFIG += incremental +MAKEFILE_GENERATOR = UNIX +QMAKE_PLATFORM = linux +CONFIG += incremental QMAKE_INCREMENTAL_STYLE = sublib # # qmake configuration for common gcc # -QMAKE_COMPILER = gcc +QMAKE_COMPILER = gcc QMAKE_CC = host-gcc -QMAKE_CFLAGS += -pipe -QMAKE_CFLAGS_DEPS += -M -QMAKE_CFLAGS_WARN_ON += -Wall -W -QMAKE_CFLAGS_WARN_OFF += -w -QMAKE_CFLAGS_RELEASE += -O2 -QMAKE_CFLAGS_DEBUG += -g -QMAKE_CFLAGS_SHLIB += -fPIC +QMAKE_CFLAGS += -pipe +QMAKE_CFLAGS_DEPS += -M +QMAKE_CFLAGS_WARN_ON += -Wall -W +QMAKE_CFLAGS_WARN_OFF += -w +QMAKE_CFLAGS_RELEASE += -O2 +QMAKE_CFLAGS_DEBUG += -g +QMAKE_CFLAGS_SHLIB += -fPIC QMAKE_CFLAGS_STATIC_LIB += -fPIC -QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses -QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden +QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses +QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden QMAKE_CFLAGS_PRECOMPILE += -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} QMAKE_CFLAGS_USE_PRECOMPILE += -include ${QMAKE_PCH_OUTPUT_BASE} QMAKE_CXX = host-g++ -QMAKE_CXXFLAGS += $$QMAKE_CFLAGS -QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS -QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON +QMAKE_CXXFLAGS += $$QMAKE_CFLAGS +QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS +QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB +QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC +QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden QMAKE_CXXFLAGS_PRECOMPILE += -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE @@ -55,15 +55,15 @@ QMAKE_LINK = host-g++ QMAKE_LINK_SHLIB = host-g++ QMAKE_LINK_C = host-gcc QMAKE_LINK_C_SHLIB = host-gcc -QMAKE_LFLAGS += -QMAKE_LFLAGS_RELEASE += -Wl,-O1 -QMAKE_LFLAGS_DEBUG += -QMAKE_LFLAGS_APP += -QMAKE_LFLAGS_SHLIB += -shared -QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME += -Wl,-soname, -QMAKE_LFLAGS_THREAD += -QMAKE_LFLAGS_NOUNDEF += -Wl,--no-undefined +QMAKE_LFLAGS += +QMAKE_LFLAGS_RELEASE += -Wl,-O1 +QMAKE_LFLAGS_DEBUG += +QMAKE_LFLAGS_APP += +QMAKE_LFLAGS_SHLIB += -shared +QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB +QMAKE_LFLAGS_SONAME += -Wl,-soname, +QMAKE_LFLAGS_THREAD += +QMAKE_LFLAGS_NOUNDEF += -Wl,--no-undefined QMAKE_LFLAGS_RPATH = -Wl,-rpath, QMAKE_PCH_OUTPUT_EXT = .gch @@ -76,43 +76,43 @@ QMAKE_LFLAGS_DYNAMIC_LIST = -Wl,--dynamic-list, # qmake configuration for common linux # -QMAKE_CFLAGS_THREAD += -D_REENTRANT -QMAKE_CXXFLAGS_THREAD += $$QMAKE_CFLAGS_THREAD +QMAKE_CFLAGS_THREAD += -D_REENTRANT +QMAKE_CXXFLAGS_THREAD += $$QMAKE_CFLAGS_THREAD -QMAKE_INCDIR = -QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = -QMAKE_LIBDIR_X11 = -QMAKE_INCDIR_OPENGL = -QMAKE_LIBDIR_OPENGL = +QMAKE_INCDIR = +QMAKE_LIBDIR = +QMAKE_INCDIR_X11 = +QMAKE_LIBDIR_X11 = +QMAKE_INCDIR_OPENGL = +QMAKE_LIBDIR_OPENGL = QMAKE_INCDIR_OPENGL_ES1 = $$QMAKE_INCDIR_OPENGL QMAKE_LIBDIR_OPENGL_ES1 = $$QMAKE_LIBDIR_OPENGL QMAKE_INCDIR_OPENGL_ES2 = $$QMAKE_INCDIR_OPENGL QMAKE_LIBDIR_OPENGL_ES2 = $$QMAKE_LIBDIR_OPENGL -QMAKE_INCDIR_EGL = -QMAKE_LIBDIR_EGL = -QMAKE_INCDIR_OPENVG = -QMAKE_LIBDIR_OPENVG = +QMAKE_INCDIR_EGL = +QMAKE_LIBDIR_EGL = +QMAKE_INCDIR_OPENVG = +QMAKE_LIBDIR_OPENVG = -QMAKE_LIBS = -QMAKE_LIBS_DYNLOAD = -ldl -QMAKE_LIBS_X11 = -lXext -lX11 -lm -QMAKE_LIBS_NIS = -lnsl -QMAKE_LIBS_EGL = -lEGL -QMAKE_LIBS_OPENGL = -lGL -QMAKE_LIBS_OPENGL_ES1 = -lGLES_CM -QMAKE_LIBS_OPENGL_ES2 = -lGLESv2 -QMAKE_LIBS_OPENVG = -lOpenVG -QMAKE_LIBS_THREAD = -lpthread +QMAKE_LIBS = +QMAKE_LIBS_DYNLOAD = -ldl +QMAKE_LIBS_X11 = -lXext -lX11 -lm +QMAKE_LIBS_NIS = -lnsl +QMAKE_LIBS_EGL = -lEGL +QMAKE_LIBS_OPENGL = -lGL +QMAKE_LIBS_OPENGL_ES1 = -lGLES_CM +QMAKE_LIBS_OPENGL_ES2 = -lGLESv2 +QMAKE_LIBS_OPENVG = -lOpenVG +QMAKE_LIBS_THREAD = -lpthread -QMAKE_AR = host-ar cqs -QMAKE_OBJCOPY = host-objcopy -QMAKE_RANLIB = +QMAKE_AR = host-ar cqs +QMAKE_OBJCOPY = host-objcopy +QMAKE_RANLIB = -QMAKE_STRIP = host-strip -QMAKE_STRIPFLAGS_LIB += --strip-unneeded -QMAKE_INSTALL_FILE = install -m 644 -p -QMAKE_INSTALL_PROGRAM = install -m 755 -p +QMAKE_STRIP = host-strip +QMAKE_STRIPFLAGS_LIB += --strip-unneeded +QMAKE_INSTALL_FILE = install -m 644 -p +QMAKE_INSTALL_PROGRAM = install -m 755 -p include(../../common/unix.conf) load(qt_config) diff --git a/mkspecs/unsupported/linux-scratchbox2-g++/qmake.conf b/mkspecs/unsupported/linux-scratchbox2-g++/qmake.conf index 069b016adb..a300712d33 100644 --- a/mkspecs/unsupported/linux-scratchbox2-g++/qmake.conf +++ b/mkspecs/unsupported/linux-scratchbox2-g++/qmake.conf @@ -11,8 +11,8 @@ # correctly query and utilize your targets .pc files (normally stored in # $staging/usr/lib/pkgconfig) -MAKEFILE_GENERATOR = UNIX -CONFIG += incremental +MAKEFILE_GENERATOR = UNIX +CONFIG += incremental QMAKE_INCREMENTAL_STYLE = sublib include(../../common/linux.conf) diff --git a/mkspecs/unsupported/macx-ios-clang/qmake.conf b/mkspecs/unsupported/macx-ios-clang/qmake.conf index 7805c079bb..32d10a06ed 100644 --- a/mkspecs/unsupported/macx-ios-clang/qmake.conf +++ b/mkspecs/unsupported/macx-ios-clang/qmake.conf @@ -9,8 +9,8 @@ QMAKE_INCREMENTAL_STYLE = sublib QMAKE_MACOSX_DEPLOYMENT_TARGET = QMAKE_IOS_DEPLOYMENT_TARGET = 4.3 -INCLUDEPATH += $$PWD/ios -DEFINES += DARWIN_NO_CARBON QT_NO_CORESERVICES QT_NO_PRINTER QT_NO_PRINTDIALOG +INCLUDEPATH += $$PWD/ios +DEFINES += DARWIN_NO_CARBON QT_NO_CORESERVICES QT_NO_PRINTER QT_NO_PRINTDIALOG # Universal target (iPhone and iPad) QMAKE_IOS_TARGETED_DEVICE_FAMILY = 1,2 diff --git a/mkspecs/unsupported/qnx-X11-g++/qmake.conf b/mkspecs/unsupported/qnx-X11-g++/qmake.conf index 21b76df9b0..8d2c63f330 100644 --- a/mkspecs/unsupported/qnx-X11-g++/qmake.conf +++ b/mkspecs/unsupported/qnx-X11-g++/qmake.conf @@ -4,36 +4,36 @@ # Written for QNX RTOS v6 with X11 # -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = qnx +MAKEFILE_GENERATOR = UNIX +QMAKE_PLATFORM = qnx include(../common/gcc-base-unix.conf) include(../common/g++-unix.conf) include(../common/unix.conf) -QMAKE_CFLAGS_THREAD = -D_REENTRANT -QMAKE_CXXFLAGS_THREAD = $$QMAKE_CLFAGS_THREAD -QMAKE_COMPILER_DEFINES += __QNXNTO__ - -QMAKE_INCDIR = -QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = /opt/X11R6/include -QMAKE_LIBDIR_X11 = /opt/X11R6/lib -QMAKE_INCDIR_OPENGL = /opt/X11R6/include -QMAKE_LIBDIR_OPENGL = /opt/X11R6/lib - -#QMAKE_LIBS = -lunix -QMAKE_LIBS = -QMAKE_LIBS_DYNLOAD = -QMAKE_LIBS_X11 = -lXext -lX11 -lm -lsocket -QMAKE_LIBS_OPENGL = -lGL -QMAKE_LIBS_THREAD = +QMAKE_CFLAGS_THREAD = -D_REENTRANT +QMAKE_CXXFLAGS_THREAD = $$QMAKE_CLFAGS_THREAD +QMAKE_COMPILER_DEFINES += __QNXNTO__ + +QMAKE_INCDIR = +QMAKE_LIBDIR = +QMAKE_INCDIR_X11 = /opt/X11R6/include +QMAKE_LIBDIR_X11 = /opt/X11R6/lib +QMAKE_INCDIR_OPENGL = /opt/X11R6/include +QMAKE_LIBDIR_OPENGL = /opt/X11R6/lib + +#QMAKE_LIBS = -lunix +QMAKE_LIBS = +QMAKE_LIBS_DYNLOAD = +QMAKE_LIBS_X11 = -lXext -lX11 -lm -lsocket +QMAKE_LIBS_OPENGL = -lGL +QMAKE_LIBS_THREAD = QMAKE_LIBS_NETWORK = -lsocket -QMAKE_AR = ar cqs -QMAKE_RANLIB = +QMAKE_AR = ar cqs +QMAKE_RANLIB = -QMAKE_STRIP = strip -QMAKE_STRIPFLAGS_LIB += --strip-unneeded +QMAKE_STRIP = strip +QMAKE_STRIPFLAGS_LIB += --strip-unneeded load(qt_config) diff --git a/mkspecs/unsupported/vxworks-ppc-dcc/qmake.conf b/mkspecs/unsupported/vxworks-ppc-dcc/qmake.conf index afb92485b3..806484369b 100644 --- a/mkspecs/unsupported/vxworks-ppc-dcc/qmake.conf +++ b/mkspecs/unsupported/vxworks-ppc-dcc/qmake.conf @@ -2,58 +2,58 @@ # qmake configuration for vxworks-ppc-dcc # -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = vxworks -CONFIG += incremental +MAKEFILE_GENERATOR = UNIX +QMAKE_PLATFORM = vxworks +CONFIG += incremental QMAKE_INCREMENTAL_STYLE = sublib -VXWORKS_ARCH = ppc -VXWORKS_CPU = PPC32 -VXWORKS_DIAB_SPEC = -tPPC7400FV:vxworks66 -VXWORKS_ARCH_MUNCH = ppc - -QMAKE_COMPILER = wr_dcc - -QMAKE_CC = dcc -QMAKE_CFLAGS += $$VXWORKS_DIAB_SPEC -Xkeywords=0x0 -Xcode-absolute-far -Xansi -Xforce-declarations -I$(WIND_BASE)/target/h -I$(WIND_BASE)/target/h/wrn/coreip -DCPU=$$upper($$VXWORKS_ARCH) -DVX_CPU_FAMILY=$$VXWORKS_ARCH -DTOOL_FAMILY=diab -DTOOL=diab -D_WRS_KERNEL -DVXWORKS -D_VSB_CONFIG_FILE=\'<../lib/h/config/vsbConfig.h>\' -QMAKE_CFLAGS_DEPS += -QMAKE_CFLAGS_WARN_ON += -QMAKE_CFLAGS_WARN_OFF += -Xsuppress-warnings -QMAKE_CFLAGS_RELEASE += -QMAKE_CFLAGS_DEBUG += -g -QMAKE_CFLAGS_SHLIB += -QMAKE_CFLAGS_STATIC_LIB += -QMAKE_CFLAGS_YACC += -QMAKE_CFLAGS_HIDESYMS += +VXWORKS_ARCH = ppc +VXWORKS_CPU = PPC32 +VXWORKS_DIAB_SPEC = -tPPC7400FV:vxworks66 +VXWORKS_ARCH_MUNCH = ppc + +QMAKE_COMPILER = wr_dcc + +QMAKE_CC = dcc +QMAKE_CFLAGS += $$VXWORKS_DIAB_SPEC -Xkeywords=0x0 -Xcode-absolute-far -Xansi -Xforce-declarations -I$(WIND_BASE)/target/h -I$(WIND_BASE)/target/h/wrn/coreip -DCPU=$$upper($$VXWORKS_ARCH) -DVX_CPU_FAMILY=$$VXWORKS_ARCH -DTOOL_FAMILY=diab -DTOOL=diab -D_WRS_KERNEL -DVXWORKS -D_VSB_CONFIG_FILE=\'<../lib/h/config/vsbConfig.h>\' +QMAKE_CFLAGS_DEPS += +QMAKE_CFLAGS_WARN_ON += +QMAKE_CFLAGS_WARN_OFF += -Xsuppress-warnings +QMAKE_CFLAGS_RELEASE += +QMAKE_CFLAGS_DEBUG += -g +QMAKE_CFLAGS_SHLIB += +QMAKE_CFLAGS_STATIC_LIB += +QMAKE_CFLAGS_YACC += +QMAKE_CFLAGS_HIDESYMS += QMAKE_CFLAGS_PRECOMPILE += QMAKE_CFLAGS_USE_PRECOMPILE += -QMAKE_CXX = dcc -QMAKE_CXXFLAGS += $$QMAKE_CFLAGS -QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS -QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB +QMAKE_CXX = dcc +QMAKE_CXXFLAGS += $$QMAKE_CFLAGS +QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS +QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON +QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF +QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC +QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS QMAKE_CXXFLAGS_PRECOMPILE += QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE -QMAKE_LINK = dld -QMAKE_LINK_SHLIB = dld -QMAKE_LFLAGS += $$VXWORKS_DIAB_SPEC -QMAKE_LFLAGS_RELEASE += -QMAKE_LFLAGS_DEBUG += -QMAKE_LFLAGS_APP += -r5 -QMAKE_LFLAGS_SHLIB += -QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME += -QMAKE_LFLAGS_THREAD += -QMAKE_LFLAGS_NOUNDEF += -QMAKE_LFLAGS_RPATH = +QMAKE_LINK = dld +QMAKE_LINK_SHLIB = dld +QMAKE_LFLAGS += $$VXWORKS_DIAB_SPEC +QMAKE_LFLAGS_RELEASE += +QMAKE_LFLAGS_DEBUG += +QMAKE_LFLAGS_APP += -r5 +QMAKE_LFLAGS_SHLIB += +QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB +QMAKE_LFLAGS_SONAME += +QMAKE_LFLAGS_THREAD += +QMAKE_LFLAGS_NOUNDEF += +QMAKE_LFLAGS_RPATH = QMAKE_PCH_OUTPUT_EXT = .gch @@ -61,33 +61,33 @@ QMAKE_PCH_OUTPUT_EXT = .gch QMAKE_LFLAGS_BSYMBOLIC_FUNC = QMAKE_LFLAGS_DYNAMIC_LIST = -QMAKE_CFLAGS_THREAD += -D_REENTRANT -QMAKE_CXXFLAGS_THREAD += $$QMAKE_CFLAGS_THREAD - -QMAKE_INCDIR = -QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = $(WIND_HOME)/GSS/include -QMAKE_LIBDIR_X11 = $(WIND_HOME)/GSS/lib -QMAKE_INCDIR_OPENGL = $$QMAKE_INCDIR_X11 -QMAKE_LIBDIR_OPENGL = $$QMAKE_LIBDIR_X11 - -QMAKE_LIBS = -QMAKE_LIBS_DYNLOAD = -QMAKE_LIBS_X11 = -lXext -lX11 -QMAKE_LIBS_NIS = -lnsl -QMAKE_LIBS_OPENGL = -lGL -QMAKE_LIBS_THREAD = -QMAKE_LIBS_NETWORK = # -lnetwrap # only needed if kernel is missing gethostbyname and friends - - -QMAKE_AR = ar cqs -QMAKE_OBJCOPY = objcopy -QMAKE_RANLIB = - -QMAKE_STRIP = strip -QMAKE_STRIPFLAGS_LIB += --strip-unneeded -QMAKE_INSTALL_FILE = install -m 644 -p -QMAKE_INSTALL_PROGRAM = install -m 755 -p +QMAKE_CFLAGS_THREAD += -D_REENTRANT +QMAKE_CXXFLAGS_THREAD += $$QMAKE_CFLAGS_THREAD + +QMAKE_INCDIR = +QMAKE_LIBDIR = +QMAKE_INCDIR_X11 = $(WIND_HOME)/GSS/include +QMAKE_LIBDIR_X11 = $(WIND_HOME)/GSS/lib +QMAKE_INCDIR_OPENGL = $$QMAKE_INCDIR_X11 +QMAKE_LIBDIR_OPENGL = $$QMAKE_LIBDIR_X11 + +QMAKE_LIBS = +QMAKE_LIBS_DYNLOAD = +QMAKE_LIBS_X11 = -lXext -lX11 +QMAKE_LIBS_NIS = -lnsl +QMAKE_LIBS_OPENGL = -lGL +QMAKE_LIBS_THREAD = +QMAKE_LIBS_NETWORK = # -lnetwrap # only needed if kernel is missing gethostbyname and friends + + +QMAKE_AR = ar cqs +QMAKE_OBJCOPY = objcopy +QMAKE_RANLIB = + +QMAKE_STRIP = strip +QMAKE_STRIPFLAGS_LIB += --strip-unneeded +QMAKE_INSTALL_FILE = install -m 644 -p +QMAKE_INSTALL_PROGRAM = install -m 755 -p include(../../common/unix.conf) load(qt_config) diff --git a/mkspecs/unsupported/vxworks-ppc-g++/qmake.conf b/mkspecs/unsupported/vxworks-ppc-g++/qmake.conf index e659639ae4..1d3e9f4eb4 100644 --- a/mkspecs/unsupported/vxworks-ppc-g++/qmake.conf +++ b/mkspecs/unsupported/vxworks-ppc-g++/qmake.conf @@ -2,36 +2,36 @@ # qmake configuration for vxworks-simpentium-g++ # -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = vxworks -CONFIG += incremental +MAKEFILE_GENERATOR = UNIX +QMAKE_PLATFORM = vxworks +CONFIG += incremental QMAKE_INCREMENTAL_STYLE = sublib -DEFINES += VXWORKS +DEFINES += VXWORKS -VXWORKS_ARCH = ppc -VXWORKS_CPU = PPC32 -VXWORKS_ARCH_MUNCH = ppc +VXWORKS_ARCH = ppc +VXWORKS_CPU = PPC32 +VXWORKS_ARCH_MUNCH = ppc include(../../common/gcc-base-unix.conf) include(../../common/g++-unix.conf) include(../../common/linux.conf) -QMAKE_CC = cc$$VXWORKS_ARCH_MUNCH -QMAKE_CFLAGS = -fno-builtin -I$(WIND_BASE)/target/h -I$(WIND_BASE)/target/h/wrn/coreip -DCPU=$$upper($$VXWORKS_ARCH) -DVX_CPU_FAMILY=$$VXWORKS_ARCH -DTOOL_FAMILY=gnu -DTOOL=gnu -D_WRS_KERNEL -D_VSB_CONFIG_FILE=\'<../lib/h/config/vsbConfig.h>\' -QMAKE_CFLAGS_SHLIB = # remove -fPIC -QMAKE_CFLAGS_STATIC_LIB = # remove -fPIC -QMAKE_CXX = c++$$VXWORKS_ARCH_MUNCH -QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -QMAKE_CXXFLAGS_SHLIB= # remove -fPIC -QMAKE_CXXFLAGS_STATIC_LIB= # remove -fPIC -QMAKE_LINK = $$QMAKE_CXX -QMAKE_LINK_SHLIB = $$QMAKE_CXX -QMAKE_LFLAGS_SHLIB = -Wl,-Ur -L $(WIND_BASE)/target/lib/$$VXWORKS_ARCH/$$VXWORKS_CPU/common # remove -shared -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_APP += -Wl,-Ur -L $(WIND_BASE)/target/lib/$$VXWORKS_ARCH/$$VXWORKS_CPU/common +QMAKE_CC = cc$$VXWORKS_ARCH_MUNCH +QMAKE_CFLAGS = -fno-builtin -I$(WIND_BASE)/target/h -I$(WIND_BASE)/target/h/wrn/coreip -DCPU=$$upper($$VXWORKS_ARCH) -DVX_CPU_FAMILY=$$VXWORKS_ARCH -DTOOL_FAMILY=gnu -DTOOL=gnu -D_WRS_KERNEL -D_VSB_CONFIG_FILE=\'<../lib/h/config/vsbConfig.h>\' +QMAKE_CFLAGS_SHLIB = # remove -fPIC +QMAKE_CFLAGS_STATIC_LIB = # remove -fPIC +QMAKE_CXX = c++$$VXWORKS_ARCH_MUNCH +QMAKE_CXXFLAGS = $$QMAKE_CFLAGS +QMAKE_CXXFLAGS_SHLIB = # remove -fPIC +QMAKE_CXXFLAGS_STATIC_LIB = # remove -fPIC +QMAKE_LINK = $$QMAKE_CXX +QMAKE_LINK_SHLIB = $$QMAKE_CXX +QMAKE_LFLAGS_SHLIB = -Wl,-Ur -L $(WIND_BASE)/target/lib/$$VXWORKS_ARCH/$$VXWORKS_CPU/common # remove -shared +QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB +QMAKE_LFLAGS_APP += -Wl,-Ur -L $(WIND_BASE)/target/lib/$$VXWORKS_ARCH/$$VXWORKS_CPU/common # QMAKE_LIBS_NETWORK = # -lnetwrap # only needed if kernel is missing gethostbyname() and friends -QMAKE_LIBS_DYNLOAD = -QMAKE_LIBS_THREAD = +QMAKE_LIBS_DYNLOAD = +QMAKE_LIBS_THREAD = load(qt_config) diff --git a/mkspecs/unsupported/vxworks-simpentium-dcc/qmake.conf b/mkspecs/unsupported/vxworks-simpentium-dcc/qmake.conf index 323da44243..d349189878 100644 --- a/mkspecs/unsupported/vxworks-simpentium-dcc/qmake.conf +++ b/mkspecs/unsupported/vxworks-simpentium-dcc/qmake.conf @@ -2,58 +2,58 @@ # qmake configuration for vxworks-simpentium-dcc # -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = vxworks -CONFIG += incremental +MAKEFILE_GENERATOR = UNIX +QMAKE_PLATFORM = vxworks +CONFIG += incremental QMAKE_INCREMENTAL_STYLE = sublib -VXWORKS_ARCH = simlinux -VXWORKS_CPU = SIMLINUX -VXWORKS_DIAB_SPEC = -tX86LH:vxworks66 -VXWORKS_ARCH_MUNCH = pentium +VXWORKS_ARCH = simlinux +VXWORKS_CPU = SIMLINUX +VXWORKS_DIAB_SPEC = -tX86LH:vxworks66 +VXWORKS_ARCH_MUNCH = pentium -QMAKE_COMPILER = wr_dcc +QMAKE_COMPILER = wr_dcc -QMAKE_CC = dcc -QMAKE_CFLAGS += $$VXWORKS_DIAB_SPEC -Xkeywords=0x0 -Xcode-absolute-far -Xansi -Xforce-declarations -I$(WIND_BASE)/target/h -I$(WIND_BASE)/target/h/wrn/coreip -DCPU=$$upper($$VXWORKS_ARCH) -DVX_CPU_FAMILY=$$VXWORKS_ARCH -DTOOL_FAMILY=diab -DTOOL=diab -D_WRS_KERNEL -DVXWORKS -D_VSB_CONFIG_FILE=\'<../lib/h/config/vsbConfig.h>\' -QMAKE_CFLAGS_DEPS += -QMAKE_CFLAGS_WARN_ON += -QMAKE_CFLAGS_WARN_OFF += -Xsuppress-warnings -QMAKE_CFLAGS_RELEASE += -QMAKE_CFLAGS_DEBUG += -g -QMAKE_CFLAGS_SHLIB += -QMAKE_CFLAGS_STATIC_LIB += -QMAKE_CFLAGS_YACC += -QMAKE_CFLAGS_HIDESYMS += +QMAKE_CC = dcc +QMAKE_CFLAGS += $$VXWORKS_DIAB_SPEC -Xkeywords=0x0 -Xcode-absolute-far -Xansi -Xforce-declarations -I$(WIND_BASE)/target/h -I$(WIND_BASE)/target/h/wrn/coreip -DCPU=$$upper($$VXWORKS_ARCH) -DVX_CPU_FAMILY=$$VXWORKS_ARCH -DTOOL_FAMILY=diab -DTOOL=diab -D_WRS_KERNEL -DVXWORKS -D_VSB_CONFIG_FILE=\'<../lib/h/config/vsbConfig.h>\' +QMAKE_CFLAGS_DEPS += +QMAKE_CFLAGS_WARN_ON += +QMAKE_CFLAGS_WARN_OFF += -Xsuppress-warnings +QMAKE_CFLAGS_RELEASE += +QMAKE_CFLAGS_DEBUG += -g +QMAKE_CFLAGS_SHLIB += +QMAKE_CFLAGS_STATIC_LIB += +QMAKE_CFLAGS_YACC += +QMAKE_CFLAGS_HIDESYMS += QMAKE_CFLAGS_PRECOMPILE += QMAKE_CFLAGS_USE_PRECOMPILE += -QMAKE_CXX = dcc -QMAKE_CXXFLAGS += $$QMAKE_CFLAGS -QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS -QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB +QMAKE_CXX = dcc +QMAKE_CXXFLAGS += $$QMAKE_CFLAGS +QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS +QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON +QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF +QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC +QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS QMAKE_CXXFLAGS_PRECOMPILE += QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE -QMAKE_LINK = dld -QMAKE_LINK_SHLIB = dld -QMAKE_LFLAGS += $$VXWORKS_DIAB_SPEC -L $(WIND_BASE)/target/lib/$$VXWORKS_ARCH/$$VXWORKS_CPU/common -QMAKE_LFLAGS_RELEASE += -QMAKE_LFLAGS_DEBUG += -QMAKE_LFLAGS_APP += -r5 -QMAKE_LFLAGS_SHLIB += -QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME += -QMAKE_LFLAGS_THREAD += -QMAKE_LFLAGS_NOUNDEF += -QMAKE_LFLAGS_RPATH = +QMAKE_LINK = dld +QMAKE_LINK_SHLIB = dld +QMAKE_LFLAGS += $$VXWORKS_DIAB_SPEC -L $(WIND_BASE)/target/lib/$$VXWORKS_ARCH/$$VXWORKS_CPU/common +QMAKE_LFLAGS_RELEASE += +QMAKE_LFLAGS_DEBUG += +QMAKE_LFLAGS_APP += -r5 +QMAKE_LFLAGS_SHLIB += +QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB +QMAKE_LFLAGS_SONAME += +QMAKE_LFLAGS_THREAD += +QMAKE_LFLAGS_NOUNDEF += +QMAKE_LFLAGS_RPATH = QMAKE_PCH_OUTPUT_EXT = .gch @@ -61,32 +61,32 @@ QMAKE_PCH_OUTPUT_EXT = .gch QMAKE_LFLAGS_BSYMBOLIC_FUNC = QMAKE_LFLAGS_DYNAMIC_LIST = -QMAKE_CFLAGS_THREAD += -D_REENTRANT -QMAKE_CXXFLAGS_THREAD += $$QMAKE_CFLAGS_THREAD +QMAKE_CFLAGS_THREAD += -D_REENTRANT +QMAKE_CXXFLAGS_THREAD += $$QMAKE_CFLAGS_THREAD -QMAKE_INCDIR = -QMAKE_LIBDIR = -QMAKE_INCDIR_X11 = $(WIND_HOME)/GSS/include -QMAKE_LIBDIR_X11 = $(WIND_HOME)/GSS/lib -QMAKE_INCDIR_OPENGL = $$QMAKE_INCDIR_X11 -QMAKE_LIBDIR_OPENGL = $$QMAKE_LIBDIR_X11 +QMAKE_INCDIR = +QMAKE_LIBDIR = +QMAKE_INCDIR_X11 = $(WIND_HOME)/GSS/include +QMAKE_LIBDIR_X11 = $(WIND_HOME)/GSS/lib +QMAKE_INCDIR_OPENGL = $$QMAKE_INCDIR_X11 +QMAKE_LIBDIR_OPENGL = $$QMAKE_LIBDIR_X11 -QMAKE_LIBS = -QMAKE_LIBS_DYNLOAD = -QMAKE_LIBS_X11 = -lXext -lX11 -QMAKE_LIBS_NIS = -lnsl -QMAKE_LIBS_OPENGL = -lGL -QMAKE_LIBS_THREAD = -QMAKE_LIBS_NETWORK = # -lnet # only needed if kernel is missing gethostbyname and friends +QMAKE_LIBS = +QMAKE_LIBS_DYNLOAD = +QMAKE_LIBS_X11 = -lXext -lX11 +QMAKE_LIBS_NIS = -lnsl +QMAKE_LIBS_OPENGL = -lGL +QMAKE_LIBS_THREAD = +QMAKE_LIBS_NETWORK = # -lnet # only needed if kernel is missing gethostbyname and friends -QMAKE_AR = ar cqs -QMAKE_OBJCOPY = objcopy -QMAKE_RANLIB = +QMAKE_AR = ar cqs +QMAKE_OBJCOPY = objcopy +QMAKE_RANLIB = -QMAKE_STRIP = strip -QMAKE_STRIPFLAGS_LIB += --strip-unneeded -QMAKE_INSTALL_FILE = install -m 644 -p -QMAKE_INSTALL_PROGRAM = install -m 755 -p +QMAKE_STRIP = strip +QMAKE_STRIPFLAGS_LIB += --strip-unneeded +QMAKE_INSTALL_FILE = install -m 644 -p +QMAKE_INSTALL_PROGRAM = install -m 755 -p include(../../common/unix.conf) load(qt_config) diff --git a/mkspecs/unsupported/vxworks-simpentium-g++/qmake.conf b/mkspecs/unsupported/vxworks-simpentium-g++/qmake.conf index 3adfd1089e..3c8fd12d4a 100644 --- a/mkspecs/unsupported/vxworks-simpentium-g++/qmake.conf +++ b/mkspecs/unsupported/vxworks-simpentium-g++/qmake.conf @@ -2,36 +2,36 @@ # qmake configuration for vxworks-simpentium-g++ # -MAKEFILE_GENERATOR = UNIX -QMAKE_PLATFORM = vxworks -CONFIG += incremental +MAKEFILE_GENERATOR = UNIX +QMAKE_PLATFORM = vxworks +CONFIG += incremental QMAKE_INCREMENTAL_STYLE = sublib -DEFINES += VXWORKS +DEFINES += VXWORKS -VXWORKS_ARCH = simlinux -VXWORKS_CPU = SIMLINUX -VXWORKS_ARCH_MUNCH = pentium +VXWORKS_ARCH = simlinux +VXWORKS_CPU = SIMLINUX +VXWORKS_ARCH_MUNCH = pentium include(../../common/gcc-base-unix.conf) include(../../common/g++-unix.conf) include(../../common/linux.conf) -QMAKE_CC = cc$$VXWORKS_ARCH_MUNCH -QMAKE_CFLAGS = -fno-builtin -I$(WIND_BASE)/target/h -I$(WIND_BASE)/target/h/wrn/coreip -DCPU=$$upper($$VXWORKS_ARCH) -DVX_CPU_FAMILY=$$VXWORKS_ARCH -DTOOL_FAMILY=gnu -DTOOL=gnu -D_WRS_KERNEL -D_VSB_CONFIG_FILE=\'<../lib/h/config/vsbConfig.h>\' -QMAKE_CFLAGS_SHLIB = # remove -fPIC -QMAKE_CFLAGS_STATIC_LIB = # remove -fPIC -QMAKE_CXX = c++$$VXWORKS_ARCH_MUNCH -QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -QMAKE_CXXFLAGS_SHLIB= # remove -fPIC -QMAKE_CXXFLAGS_STATIC_LIB= # remove -fPIC -QMAKE_LINK = $$QMAKE_CXX -QMAKE_LINK_SHLIB = $$QMAKE_CXX -QMAKE_LFLAGS_SHLIB = -Wl,-Ur -L $(WIND_BASE)/target/lib/$$VXWORKS_ARCH/$$VXWORKS_CPU/common # remove -shared -QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_APP += -Wl,-Ur -L $(WIND_BASE)/target/lib/$$VXWORKS_ARCH/$$VXWORKS_CPU/common -QMAKE_LIBS_NETWORK = # -lnetwrap # only needed if kernel is missing gethostbyname() and friends -QMAKE_LIBS_DYNLOAD = -QMAKE_LIBS_THREAD = +QMAKE_CC = cc$$VXWORKS_ARCH_MUNCH +QMAKE_CFLAGS = -fno-builtin -I$(WIND_BASE)/target/h -I$(WIND_BASE)/target/h/wrn/coreip -DCPU=$$upper($$VXWORKS_ARCH) -DVX_CPU_FAMILY=$$VXWORKS_ARCH -DTOOL_FAMILY=gnu -DTOOL=gnu -D_WRS_KERNEL -D_VSB_CONFIG_FILE=\'<../lib/h/config/vsbConfig.h>\' +QMAKE_CFLAGS_SHLIB = # remove -fPIC +QMAKE_CFLAGS_STATIC_LIB = # remove -fPIC +QMAKE_CXX = c++$$VXWORKS_ARCH_MUNCH +QMAKE_CXXFLAGS = $$QMAKE_CFLAGS +QMAKE_CXXFLAGS_SHLIB = # remove -fPIC +QMAKE_CXXFLAGS_STATIC_LIB = # remove -fPIC +QMAKE_LINK = $$QMAKE_CXX +QMAKE_LINK_SHLIB = $$QMAKE_CXX +QMAKE_LFLAGS_SHLIB = -Wl,-Ur -L $(WIND_BASE)/target/lib/$$VXWORKS_ARCH/$$VXWORKS_CPU/common # remove -shared +QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB +QMAKE_LFLAGS_APP += -Wl,-Ur -L $(WIND_BASE)/target/lib/$$VXWORKS_ARCH/$$VXWORKS_CPU/common +QMAKE_LIBS_NETWORK = # -lnetwrap # only needed if kernel is missing gethostbyname() and friends +QMAKE_LIBS_DYNLOAD = +QMAKE_LIBS_THREAD = load(qt_config) diff --git a/mkspecs/unsupported/win32-msvc2003/qmake.conf b/mkspecs/unsupported/win32-msvc2003/qmake.conf index e510b74738..a65a9929c3 100644 --- a/mkspecs/unsupported/win32-msvc2003/qmake.conf +++ b/mkspecs/unsupported/win32-msvc2003/qmake.conf @@ -6,11 +6,11 @@ MAKEFILE_GENERATOR = MSVC.NET QMAKE_PLATFORM = win32 -CONFIG += incremental flat precompile_header autogen_precompile_source debug_and_release debug_and_release_target -DEFINES += UNICODE WIN32 -QMAKE_COMPILER_DEFINES += _MSC_VER=1310 WIN32 +CONFIG += incremental flat precompile_header autogen_precompile_source debug_and_release debug_and_release_target +DEFINES += UNICODE WIN32 +QMAKE_COMPILER_DEFINES += _MSC_VER=1310 WIN32 -QMAKE_COMPILER = msvc +QMAKE_COMPILER = msvc QMAKE_CC = cl QMAKE_LEX = flex @@ -74,5 +74,5 @@ include(../../common/shell-win32.conf) VCPROJ_EXTENSION = .vcproj VCSOLUTION_EXTENSION = .sln -VCPROJ_KEYWORD = Qt4VSv1.0 +VCPROJ_KEYWORD = Qt4VSv1.0 load(qt_config) diff --git a/mkspecs/win32-g++/qmake.conf b/mkspecs/win32-g++/qmake.conf index d46294b2b1..22277e1e82 100644 --- a/mkspecs/win32-g++/qmake.conf +++ b/mkspecs/win32-g++/qmake.conf @@ -9,29 +9,29 @@ load(device_config) -MAKEFILE_GENERATOR = MINGW -QMAKE_PLATFORM = win32 mingw -CONFIG += debug_and_release debug_and_release_target precompile_header -DEFINES += UNICODE -QMAKE_COMPILER_DEFINES += __GNUC__ WIN32 +MAKEFILE_GENERATOR = MINGW +QMAKE_PLATFORM = win32 mingw +CONFIG += debug_and_release debug_and_release_target precompile_header +DEFINES += UNICODE +QMAKE_COMPILER_DEFINES += __GNUC__ WIN32 QMAKE_EXT_OBJ = .o QMAKE_EXT_RES = _res.o -QMAKE_COMPILER = gcc +QMAKE_COMPILER = gcc -QMAKE_CC = $${CROSS_COMPILE}gcc -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = byacc -QMAKE_YACCFLAGS = -d +QMAKE_CC = $${CROSS_COMPILE}gcc +QMAKE_LEX = flex +QMAKE_LEXFLAGS = +QMAKE_YACC = byacc +QMAKE_YACCFLAGS = -d QMAKE_CFLAGS = -pipe -fno-keep-inline-dllexport -QMAKE_CFLAGS_DEPS = -M -QMAKE_CFLAGS_WARN_ON = -Wall -Wextra -QMAKE_CFLAGS_WARN_OFF = -w -QMAKE_CFLAGS_RELEASE = -O2 -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses +QMAKE_CFLAGS_DEPS = -M +QMAKE_CFLAGS_WARN_ON = -Wall -Wextra +QMAKE_CFLAGS_WARN_OFF = -w +QMAKE_CFLAGS_RELEASE = -O2 +QMAKE_CFLAGS_DEBUG = -g +QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses QMAKE_CFLAGS_SSE2 = -msse2 QMAKE_CFLAGS_SSE3 = -msse3 QMAKE_CFLAGS_SSSE3 = -mssse3 @@ -42,45 +42,45 @@ QMAKE_CFLAGS_AVX2 = -mavx2 QMAKE_CFLAGS_IWMMXT = -mcpu=iwmmxt QMAKE_CFLAGS_NEON = -mfpu=neon -QMAKE_CXX = $${CROSS_COMPILE}g++ -QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD -QMAKE_CXXFLAGS_RTTI_ON = -frtti -QMAKE_CXXFLAGS_RTTI_OFF = -fno-rtti +QMAKE_CXX = $${CROSS_COMPILE}g++ +QMAKE_CXXFLAGS = $$QMAKE_CFLAGS +QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS +QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON +QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF +QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC +QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD +QMAKE_CXXFLAGS_RTTI_ON = -frtti +QMAKE_CXXFLAGS_RTTI_OFF = -fno-rtti QMAKE_CXXFLAGS_EXCEPTIONS_ON = -fexceptions -mthreads QMAKE_CXXFLAGS_EXCEPTIONS_OFF = -fno-exceptions QMAKE_CXXFLAGS_CXX11 = -std=c++0x -QMAKE_INCDIR = +QMAKE_INCDIR = -QMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -o $obj $src -QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $< -QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $obj $src -QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< +QMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -o $obj $src +QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $< +QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $obj $src +QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< -QMAKE_LINK = $${CROSS_COMPILE}g++ -QMAKE_LINK_C = $${CROSS_COMPILE}gcc -QMAKE_LFLAGS = +QMAKE_LINK = $${CROSS_COMPILE}g++ +QMAKE_LINK_C = $${CROSS_COMPILE}gcc +QMAKE_LFLAGS = QMAKE_LFLAGS_EXCEPTIONS_ON = -mthreads QMAKE_LFLAGS_EXCEPTIONS_OFF = -QMAKE_LFLAGS_RELEASE = -Wl,-s -QMAKE_LFLAGS_DEBUG = -QMAKE_LFLAGS_CONSOLE = -Wl,-subsystem,console -QMAKE_LFLAGS_WINDOWS = -Wl,-subsystem,windows +QMAKE_LFLAGS_RELEASE = -Wl,-s +QMAKE_LFLAGS_DEBUG = +QMAKE_LFLAGS_CONSOLE = -Wl,-subsystem,console +QMAKE_LFLAGS_WINDOWS = -Wl,-subsystem,windows QMAKE_LFLAGS_DLL = -shared QMAKE_LFLAGS_CXX11 = -QMAKE_LINK_OBJECT_MAX = 10 -QMAKE_LINK_OBJECT_SCRIPT= object_script +QMAKE_LINK_OBJECT_MAX = 10 +QMAKE_LINK_OBJECT_SCRIPT = object_script QMAKE_PREFIX_STATICLIB = lib QMAKE_EXTENSION_STATICLIB = a -QMAKE_LIBS = +QMAKE_LIBS = QMAKE_LIBS_CORE = -lole32 -luuid -lws2_32 -ladvapi32 -lshell32 -luser32 -lkernel32 QMAKE_LIBS_GUI = -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lws2_32 -lole32 -luuid -luser32 -ladvapi32 QMAKE_LIBS_NETWORK = -lws2_32 @@ -92,16 +92,16 @@ QMAKE_LIBS_QT_ENTRY = -lmingw32 -lqtmain !isEmpty(QMAKE_SH) { MINGW_IN_SHELL = 1 - QMAKE_DIR_SEP = / + QMAKE_DIR_SEP = / include(../common/shell-unix.conf) } else { include(../common/shell-win32.conf) } -QMAKE_IDL = midl -QMAKE_LIB = $${CROSS_COMPILE}ar -ru -QMAKE_RC = $${CROSS_COMPILE}windres +QMAKE_IDL = midl +QMAKE_LIB = $${CROSS_COMPILE}ar -ru +QMAKE_RC = $${CROSS_COMPILE}windres -QMAKE_STRIP = $${CROSS_COMPILE}strip -QMAKE_STRIPFLAGS_LIB += --strip-unneeded +QMAKE_STRIP = $${CROSS_COMPILE}strip +QMAKE_STRIPFLAGS_LIB += --strip-unneeded load(qt_config) diff --git a/mkspecs/win32-icc/qmake.conf b/mkspecs/win32-icc/qmake.conf index 0b05873a8b..1ee07c64b6 100644 --- a/mkspecs/win32-icc/qmake.conf +++ b/mkspecs/win32-icc/qmake.conf @@ -36,7 +36,7 @@ QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC QMAKE_CXXFLAGS_STL_ON = -GX QMAKE_CXXFLAGS_STL_OFF = QMAKE_CXXFLAGS_RTTI_ON = -GR -QMAKE_CXXFLAGS_RTTI_OFF = +QMAKE_CXXFLAGS_RTTI_OFF = QMAKE_CXXFLAGS_EXCEPTIONS_ON = -GX QMAKE_CXXFLAGS_EXCEPTIONS_OFF = @@ -47,7 +47,7 @@ QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ $< QMAKE_RUN_CC_IMP_BATCH = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ @<< QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$obj $src QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ $< -QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<< +QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<< QMAKE_LINK = xilink QMAKE_LFLAGS = /NOLOGO diff --git a/mkspecs/win32-msvc2005/qmake.conf b/mkspecs/win32-msvc2005/qmake.conf index 10f435b640..6d072242c9 100644 --- a/mkspecs/win32-msvc2005/qmake.conf +++ b/mkspecs/win32-msvc2005/qmake.conf @@ -6,11 +6,11 @@ MAKEFILE_GENERATOR = MSVC.NET QMAKE_PLATFORM = win32 -CONFIG += incremental flat precompile_header autogen_precompile_source debug_and_release debug_and_release_target embed_manifest_dll embed_manifest_exe -DEFINES += UNICODE WIN32 -QMAKE_COMPILER_DEFINES += _MSC_VER=1400 WIN32 +CONFIG += incremental flat precompile_header autogen_precompile_source debug_and_release debug_and_release_target embed_manifest_dll embed_manifest_exe +DEFINES += UNICODE WIN32 +QMAKE_COMPILER_DEFINES += _MSC_VER=1400 WIN32 -QMAKE_COMPILER = msvc +QMAKE_COMPILER = msvc QMAKE_CC = cl QMAKE_LEX = flex @@ -86,5 +86,5 @@ include(../common/shell-win32.conf) VCPROJ_EXTENSION = .vcproj VCSOLUTION_EXTENSION = .sln -VCPROJ_KEYWORD = Qt4VSv1.0 +VCPROJ_KEYWORD = Qt4VSv1.0 load(qt_config) diff --git a/mkspecs/win32-msvc2008/qmake.conf b/mkspecs/win32-msvc2008/qmake.conf index 348f5fb870..bd9a83a5d1 100644 --- a/mkspecs/win32-msvc2008/qmake.conf +++ b/mkspecs/win32-msvc2008/qmake.conf @@ -6,11 +6,11 @@ MAKEFILE_GENERATOR = MSVC.NET QMAKE_PLATFORM = win32 -CONFIG += incremental flat precompile_header autogen_precompile_source debug_and_release debug_and_release_target embed_manifest_dll embed_manifest_exe -DEFINES += UNICODE WIN32 -QMAKE_COMPILER_DEFINES += _MSC_VER=1500 WIN32 +CONFIG += incremental flat precompile_header autogen_precompile_source debug_and_release debug_and_release_target embed_manifest_dll embed_manifest_exe +DEFINES += UNICODE WIN32 +QMAKE_COMPILER_DEFINES += _MSC_VER=1500 WIN32 -QMAKE_COMPILER = msvc +QMAKE_COMPILER = msvc QMAKE_CC = cl QMAKE_LEX = flex @@ -88,5 +88,5 @@ include(../common/shell-win32.conf) VCPROJ_EXTENSION = .vcproj VCSOLUTION_EXTENSION = .sln -VCPROJ_KEYWORD = Qt4VSv1.0 +VCPROJ_KEYWORD = Qt4VSv1.0 load(qt_config) diff --git a/mkspecs/win32-msvc2010/qmake.conf b/mkspecs/win32-msvc2010/qmake.conf index de1edfa36a..f0e44078f9 100644 --- a/mkspecs/win32-msvc2010/qmake.conf +++ b/mkspecs/win32-msvc2010/qmake.conf @@ -6,11 +6,11 @@ MAKEFILE_GENERATOR = MSBUILD QMAKE_PLATFORM = win32 -CONFIG += incremental flat precompile_header autogen_precompile_source debug_and_release debug_and_release_target embed_manifest_dll embed_manifest_exe -DEFINES += UNICODE WIN32 -QMAKE_COMPILER_DEFINES += _MSC_VER=1600 WIN32 +CONFIG += incremental flat precompile_header autogen_precompile_source debug_and_release debug_and_release_target embed_manifest_dll embed_manifest_exe +DEFINES += UNICODE WIN32 +QMAKE_COMPILER_DEFINES += _MSC_VER=1600 WIN32 -QMAKE_COMPILER = msvc +QMAKE_COMPILER = msvc QMAKE_CC = cl QMAKE_LEX = flex @@ -90,5 +90,5 @@ include(../common/shell-win32.conf) VCPROJ_EXTENSION = .vcxproj VCSOLUTION_EXTENSION = .sln -VCPROJ_KEYWORD = Qt4VSv1.0 +VCPROJ_KEYWORD = Qt4VSv1.0 load(qt_config) diff --git a/mkspecs/win32-msvc2012/qmake.conf b/mkspecs/win32-msvc2012/qmake.conf index 8a595d16b1..c9e3f8c8e0 100644 --- a/mkspecs/win32-msvc2012/qmake.conf +++ b/mkspecs/win32-msvc2012/qmake.conf @@ -5,11 +5,11 @@ # MAKEFILE_GENERATOR = MSBUILD -CONFIG += incremental flat precompile_header autogen_precompile_source debug_and_release debug_and_release_target embed_manifest_dll embed_manifest_exe -DEFINES += UNICODE WIN32 -QMAKE_COMPILER_DEFINES += _MSC_VER=1700 WIN32 +CONFIG += incremental flat precompile_header autogen_precompile_source debug_and_release debug_and_release_target embed_manifest_dll embed_manifest_exe +DEFINES += UNICODE WIN32 +QMAKE_COMPILER_DEFINES += _MSC_VER=1700 WIN32 -QMAKE_COMPILER = msvc +QMAKE_COMPILER = msvc QMAKE_CC = cl QMAKE_LEX = flex @@ -89,5 +89,5 @@ include(../common/shell-win32.conf) VCPROJ_EXTENSION = .vcxproj VCSOLUTION_EXTENSION = .sln -VCPROJ_KEYWORD = Qt4VSv1.0 +VCPROJ_KEYWORD = Qt4VSv1.0 load(qt_config) diff --git a/mkspecs/wince50standard-armv4i-msvc2005/qmake.conf b/mkspecs/wince50standard-armv4i-msvc2005/qmake.conf index 28ca6a6448..5883c75579 100644 --- a/mkspecs/wince50standard-armv4i-msvc2005/qmake.conf +++ b/mkspecs/wince50standard-armv4i-msvc2005/qmake.conf @@ -5,10 +5,10 @@ # include(../common/wince/qmake.conf) -CE_SDK = STANDARDSDK_500 -CE_ARCH = ARMV4I +CE_SDK = STANDARDSDK_500 +CE_ARCH = ARMV4I -DEFINES += STANDARDSHELL_UI_MODEL _WIN32_WCE=0x500 $$CE_ARCH _ARMV4I_ armv4i _ARM_ ARM _M_ARM ARM __arm__ Q_OS_WINCE_STD QT_NO_PRINTER QT_NO_PRINTDIALOG +DEFINES += STANDARDSHELL_UI_MODEL _WIN32_WCE=0x500 $$CE_ARCH _ARMV4I_ armv4i _ARM_ ARM _M_ARM ARM __arm__ Q_OS_WINCE_STD QT_NO_PRINTER QT_NO_PRINTDIALOG QMAKE_CFLAGS += -QRarch4T -QRinterwork-return diff --git a/mkspecs/wince50standard-mipsii-msvc2005/qmake.conf b/mkspecs/wince50standard-mipsii-msvc2005/qmake.conf index 0cc1ab03a0..40ef0566ae 100644 --- a/mkspecs/wince50standard-mipsii-msvc2005/qmake.conf +++ b/mkspecs/wince50standard-mipsii-msvc2005/qmake.conf @@ -5,13 +5,13 @@ # include(../common/wince/qmake.conf) -CE_SDK = STANDARDSDK_500 -CE_ARCH = MIPSII +CE_SDK = STANDARDSDK_500 +CE_ARCH = MIPSII -DEFINES += STANDARDSHELL_UI_MODEL _WIN32_WCE=0x500 _M_MRX000=3000 MIPS _MIPS_ Q_OS_WINCE_STD QT_NO_PRINTER QT_NO_PRINTDIALOG +DEFINES += STANDARDSHELL_UI_MODEL _WIN32_WCE=0x500 _M_MRX000=3000 MIPS _MIPS_ Q_OS_WINCE_STD QT_NO_PRINTER QT_NO_PRINTDIALOG -QMAKE_CFLAGS += -QMmips2 -QMAKE_CXXFLAGS += -QMmips2 +QMAKE_CFLAGS += -QMmips2 +QMAKE_CXXFLAGS += -QMmips2 QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:WINDOWSCE,5.00 /MACHINE:MIPS /ENTRY:mainACRTStartup QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWSCE,5.00 /MACHINE:MIPS diff --git a/mkspecs/wince50standard-mipsiv-msvc2005/qmake.conf b/mkspecs/wince50standard-mipsiv-msvc2005/qmake.conf index a22505c14d..b94f3f35d9 100644 --- a/mkspecs/wince50standard-mipsiv-msvc2005/qmake.conf +++ b/mkspecs/wince50standard-mipsiv-msvc2005/qmake.conf @@ -5,10 +5,10 @@ # include(../common/wince/qmake.conf) -CE_SDK = STANDARDSDK_500 -CE_ARCH = MIPSIV +CE_SDK = STANDARDSDK_500 +CE_ARCH = MIPSIV -DEFINES += STANDARDSHELL_UI_MODEL _WIN32_WCE=0x500 _M_MRX000=4000 MIPS _MIPS_ Q_OS_WINCE_STD QT_NO_PRINTER QT_NO_PRINTDIALOG MIPS_HAS_FPU +DEFINES += STANDARDSHELL_UI_MODEL _WIN32_WCE=0x500 _M_MRX000=4000 MIPS _MIPS_ Q_OS_WINCE_STD QT_NO_PRINTER QT_NO_PRINTDIALOG MIPS_HAS_FPU QMAKE_CFLAGS += -QMmips4 QMAKE_CXXFLAGS += -QMmips4 diff --git a/mkspecs/wince50standard-sh4-msvc2005/qmake.conf b/mkspecs/wince50standard-sh4-msvc2005/qmake.conf index 1ee8950a44..3fdfdbfe43 100644 --- a/mkspecs/wince50standard-sh4-msvc2005/qmake.conf +++ b/mkspecs/wince50standard-sh4-msvc2005/qmake.conf @@ -5,10 +5,10 @@ # include(../common/wince/qmake.conf) -CE_SDK = STANDARDSDK_500 -CE_ARCH = SH4 +CE_SDK = STANDARDSDK_500 +CE_ARCH = SH4 -DEFINES += STANDARDSHELL_UI_MODEL _WIN32_WCE=0x500 _M_SH SHx _SHX_ Q_OS_WINCE_STD QT_NO_PRINTER QT_NO_PRINTDIALOG +DEFINES += STANDARDSHELL_UI_MODEL _WIN32_WCE=0x500 _M_SH SHx _SHX_ Q_OS_WINCE_STD QT_NO_PRINTER QT_NO_PRINTDIALOG QMAKE_CFLAGS = -nologo -Zm200 -Zc:wchar_t- -QSsh4 diff --git a/mkspecs/wince50standard-x86-msvc2005/qmake.conf b/mkspecs/wince50standard-x86-msvc2005/qmake.conf index d16d1f0f5b..850711d4c1 100644 --- a/mkspecs/wince50standard-x86-msvc2005/qmake.conf +++ b/mkspecs/wince50standard-x86-msvc2005/qmake.conf @@ -5,10 +5,10 @@ # include(../common/wince/qmake.conf) -CE_SDK = STANDARDSDK_500 -CE_ARCH = x86 +CE_SDK = STANDARDSDK_500 +CE_ARCH = x86 -DEFINES += STANDARDSHELL_UI_MODEL _WIN32_WCE=0x500 $$CE_ARCH _X86_ _M_IX86 Q_OS_WINCE_STD QT_NO_PRINTER QT_NO_PRINTDIALOG +DEFINES += STANDARDSHELL_UI_MODEL _WIN32_WCE=0x500 $$CE_ARCH _X86_ _M_IX86 Q_OS_WINCE_STD QT_NO_PRINTER QT_NO_PRINTDIALOG QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:WINDOWSCE,5.00 /MACHINE:X86 /ENTRY:mainACRTStartup QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWSCE,5.00 /MACHINE:X86 diff --git a/mkspecs/wince60standard-armv4i-msvc2005/qmake.conf b/mkspecs/wince60standard-armv4i-msvc2005/qmake.conf index 2fe971b4f4..3460e28fa4 100644 --- a/mkspecs/wince60standard-armv4i-msvc2005/qmake.conf +++ b/mkspecs/wince60standard-armv4i-msvc2005/qmake.conf @@ -7,15 +7,15 @@ include(../common/wince/qmake.conf) -CE_SDK = STANDARDSDK_600 # replace with actual SDK name -CE_ARCH = ARMV4I +CE_SDK = STANDARDSDK_600 # replace with actual SDK name +CE_ARCH = ARMV4I -DEFINES += STANDARDSHELL_UI_MODEL _WIN32_WCE=0x600 $$CE_ARCH _ARMV4I_ armv4i _ARM_ ARM _M_ARM ARM _WIN32 __arm__ +DEFINES += STANDARDSHELL_UI_MODEL _WIN32_WCE=0x600 $$CE_ARCH _ARMV4I_ armv4i _ARM_ ARM _M_ARM ARM _WIN32 __arm__ -QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:WINDOWSCE,6.00 /MACHINE:THUMB /ENTRY:mainACRTStartup -QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWSCE,6.00 /MACHINE:THUMB +QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:WINDOWSCE,6.00 /MACHINE:THUMB /ENTRY:mainACRTStartup +QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWSCE,6.00 /MACHINE:THUMB QMAKE_LFLAGS_DLL = /SUBSYSTEM:WINDOWSCE,6.00 /MACHINE:THUMB /DLL /SAFESEH:NO -QMAKE_LIBFLAGS_RELEASE = /LTCG +QMAKE_LIBFLAGS_RELEASE = /LTCG QMAKE_LIBS = corelibc.lib coredll.lib QMAKE_LIBS_CORE = libcmt.lib corelibc.lib ole32.lib oleaut32.lib uuid.lib commctrl.lib coredll.lib winsock.lib QMAKE_LIBS_GUI = ceshell.lib ole32.lib $$QMAKE_LIBS_CORE @@ -23,5 +23,5 @@ QMAKE_LIBS_NETWORK = ws2.lib $$QMAKE_LIBS_GUI QMAKE_LIBS_OPENGL = QMAKE_LIBS_COMPAT = -QMAKE_RC = rc /DUNDER_CE=600 /D_WIN32_WCE=0x600 +QMAKE_RC = rc /DUNDER_CE=600 /D_WIN32_WCE=0x600 diff --git a/mkspecs/wince60standard-x86-msvc2005/qmake.conf b/mkspecs/wince60standard-x86-msvc2005/qmake.conf index 2896c69a02..4314483f7f 100644 --- a/mkspecs/wince60standard-x86-msvc2005/qmake.conf +++ b/mkspecs/wince60standard-x86-msvc2005/qmake.conf @@ -7,10 +7,10 @@ include(../common/wince/qmake.conf) -CE_SDK = STANDARDSDK_600 # replace with actual SDK name -CE_ARCH = x86 +CE_SDK = STANDARDSDK_600 # replace with actual SDK name +CE_ARCH = x86 -DEFINES += STANDARDSHELL_UI_MODEL _WIN32_WCE=0x600 $$CE_ARCH _X86_ _M_IX86 +DEFINES += STANDARDSHELL_UI_MODEL _WIN32_WCE=0x600 $$CE_ARCH _X86_ _M_IX86 QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:WINDOWSCE,6.00 /MACHINE:X86 /ENTRY:mainACRTStartup QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWSCE,6.00 /MACHINE:X86 @@ -23,5 +23,5 @@ QMAKE_LIBS_NETWORK = ws2.lib $$QMAKE_LIBS_GUI QMAKE_LIBS_OPENGL = QMAKE_LIBS_COMPAT = -QMAKE_RC = rc /DUNDER_CE=600 /D_WIN32_WCE=0x600 +QMAKE_RC = rc /DUNDER_CE=600 /D_WIN32_WCE=0x600 diff --git a/mkspecs/wince70embedded-armv4i-msvc2008/qmake.conf b/mkspecs/wince70embedded-armv4i-msvc2008/qmake.conf index c9ca718812..fa00f24716 100644 --- a/mkspecs/wince70embedded-armv4i-msvc2008/qmake.conf +++ b/mkspecs/wince70embedded-armv4i-msvc2008/qmake.conf @@ -8,7 +8,7 @@ include(../common/wince/qmake.conf) CE_SDK = WEC7_SDK_NAME # replace with actual SDK name CE_ARCH = armv4i -DEFINES += QT_NO_NATIVE_GESTURES QT_NOSTANDARDSHELL_UI_MODEL _CRT_SECURE_NO_DEPRECATE _WIN32_WCE=0x700 $$CE_ARCH _AMRV7_ armv7 _ARM_ +DEFINES += QT_NO_CLIPBOARD QT_NO_ACCESSIBILITY QT_NO_NATIVE_GESTURES QT_NOSTANDARDSHELL_UI_MODEL _CRT_SECURE_NO_DEPRECATE _WIN32_WCE=0x700 $$CE_ARCH _AMRV7_ armv7 _ARM_ QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:WINDOWSCE,7.00 /MACHINE:THUMB /ENTRY:mainACRTStartup QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWSCE,7.00 /MACHINE:THUMB @@ -21,8 +21,9 @@ QMAKE_LIBS_NETWORK = ws2.lib $$QMAKE_LIBS_GUI QMAKE_LIBS_OPENGL = QMAKE_LIBS_COMPAT = QMAKE_LIBS_OPENVG = libopenvg.lib +QMAKE_LIBS_OPENGL_ES2 = libEGL.lib libGLESv2.lib QMAKE_RC = rc -QMAKE_COMPILER_DEFINES -= _MSC_VER=1400 -QMAKE_COMPILER_DEFINES += _MSC_VER=1500 +QMAKE_COMPILER_DEFINES -= _MSC_VER=1400 +QMAKE_COMPILER_DEFINES += _MSC_VER=1500 diff --git a/mkspecs/wince70embedded-x86-msvc2008/qmake.conf b/mkspecs/wince70embedded-x86-msvc2008/qmake.conf index 89d912a347..156f767182 100644 --- a/mkspecs/wince70embedded-x86-msvc2008/qmake.conf +++ b/mkspecs/wince70embedded-x86-msvc2008/qmake.conf @@ -7,7 +7,7 @@ include(../common/wince/qmake.conf) CE_SDK = Platform Builder CE_ARCH = _TGTCPU -DEFINES += QT_NO_NATIVE_GESTURES QT_NOSTANDARDSHELL_UI_MODEL _CRT_SECURE_NO_DEPRECATE _WIN32_WCE=0x700 $$CE_ARCH _X86_ _M_IX86 +DEFINES += QT_NO_NATIVE_GESTURES QT_NOSTANDARDSHELL_UI_MODEL _CRT_SECURE_NO_DEPRECATE _WIN32_WCE=0x700 $$CE_ARCH _X86_ _M_IX86 QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:WINDOWSCE,7.00 /MACHINE:X86 /ENTRY:mainACRTStartup QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWSCE,7.00 /MACHINE:X86 diff --git a/mkspecs/wincewm50pocket-msvc2005/qmake.conf b/mkspecs/wincewm50pocket-msvc2005/qmake.conf index 657b68b616..f92cdb50f9 100644 --- a/mkspecs/wincewm50pocket-msvc2005/qmake.conf +++ b/mkspecs/wincewm50pocket-msvc2005/qmake.conf @@ -5,10 +5,10 @@ # include(../common/wince/qmake.conf) -CE_SDK = Windows Mobile 5.0 Pocket PC SDK -CE_ARCH = ARMV4I +CE_SDK = Windows Mobile 5.0 Pocket PC SDK +CE_ARCH = ARMV4I -DEFINES += _WIN32_WCE=0x501 $$CE_ARCH _ARMV4I_ armv4i _ARM_ ARM _M_ARM ARM __arm__ Q_OS_WINCE_WM QT_NO_PRINTER QT_NO_PRINTDIALOG +DEFINES += _WIN32_WCE=0x501 $$CE_ARCH _ARMV4I_ armv4i _ARM_ ARM _M_ARM ARM __arm__ Q_OS_WINCE_WM QT_NO_PRINTER QT_NO_PRINTDIALOG QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:WINDOWSCE,5.01 /MACHINE:THUMB /ENTRY:mainACRTStartup QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWSCE,5.01 /MACHINE:THUMB diff --git a/mkspecs/wincewm50smart-msvc2005/qmake.conf b/mkspecs/wincewm50smart-msvc2005/qmake.conf index 36e2fcdf37..9ac41c2866 100644 --- a/mkspecs/wincewm50smart-msvc2005/qmake.conf +++ b/mkspecs/wincewm50smart-msvc2005/qmake.conf @@ -5,10 +5,10 @@ # include(../common/wince/qmake.conf) -CE_SDK = Windows Mobile 5.0 Smartphone SDK -CE_ARCH = ARMV4I +CE_SDK = Windows Mobile 5.0 Smartphone SDK +CE_ARCH = ARMV4I -DEFINES += SMARTPHONE2003_UI_MODEL _WIN32_WCE=0x501 $$CE_ARCH _ARMV4I_ armv4i _ARM_ ARM _M_ARM ARM __arm__ Q_OS_WINCE_WM QT_NO_PRINTER QT_NO_PRINTDIALOG QT_KEYPAD_NAVIGATION +DEFINES += SMARTPHONE2003_UI_MODEL _WIN32_WCE=0x501 $$CE_ARCH _ARMV4I_ armv4i _ARM_ ARM _M_ARM ARM __arm__ Q_OS_WINCE_WM QT_NO_PRINTER QT_NO_PRINTDIALOG QT_KEYPAD_NAVIGATION QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:WINDOWSCE,5.01 /MACHINE:THUMB /ENTRY:mainACRTStartup QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWSCE,5.01 /MACHINE:THUMB diff --git a/mkspecs/wincewm60professional-msvc2005/qmake.conf b/mkspecs/wincewm60professional-msvc2005/qmake.conf index 5528db3afd..029ea08652 100644 --- a/mkspecs/wincewm60professional-msvc2005/qmake.conf +++ b/mkspecs/wincewm60professional-msvc2005/qmake.conf @@ -3,8 +3,8 @@ include(../wincewm50pocket-msvc2005/qmake.conf) CE_SDK = Windows Mobile 6 Professional SDK CE_ARCH = ARMV4I -DEFINES -= _WIN32_WCE=0x501 -DEFINES += _WIN32_WCE=0x502 +DEFINES -= _WIN32_WCE=0x501 +DEFINES += _WIN32_WCE=0x502 QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:WINDOWSCE,5.02 /MACHINE:THUMB /ENTRY:mainACRTStartup QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWSCE,5.02 /MACHINE:THUMB diff --git a/mkspecs/wincewm60standard-msvc2005/qmake.conf b/mkspecs/wincewm60standard-msvc2005/qmake.conf index c80339047b..aa1ade030a 100644 --- a/mkspecs/wincewm60standard-msvc2005/qmake.conf +++ b/mkspecs/wincewm60standard-msvc2005/qmake.conf @@ -1,18 +1,18 @@ include(../wincewm50smart-msvc2005/qmake.conf) -CE_SDK = Windows Mobile 6 Standard SDK -CE_ARCH = ARMV4I +CE_SDK = Windows Mobile 6 Standard SDK +CE_ARCH = ARMV4I -DEFINES -= _WIN32_WCE=0x501 -DEFINES += _WIN32_WCE=0x502 +DEFINES -= _WIN32_WCE=0x501 +DEFINES += _WIN32_WCE=0x502 # Windows Mobile 6 Standard edition defines # GWES_ICONCURS=1 although there is no cursor support -DEFINES += QT_NO_CURSOR +DEFINES += QT_NO_CURSOR -QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:WINDOWSCE,5.02 /MACHINE:THUMB /ENTRY:mainACRTStartup -QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWSCE,5.02 /MACHINE:THUMB +QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:WINDOWSCE,5.02 /MACHINE:THUMB /ENTRY:mainACRTStartup +QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWSCE,5.02 /MACHINE:THUMB QMAKE_LFLAGS_DLL = /SUBSYSTEM:WINDOWSCE,5.02 /MACHINE:THUMB /DLL QMAKE_LIBFLAGS = $$QMAKE_LFLAGS_WINDOWS diff --git a/mkspecs/wincewm65professional-msvc2005/qmake.conf b/mkspecs/wincewm65professional-msvc2005/qmake.conf index b4ae0966cc..561c0495c9 100644 --- a/mkspecs/wincewm65professional-msvc2005/qmake.conf +++ b/mkspecs/wincewm65professional-msvc2005/qmake.conf @@ -1,5 +1,5 @@ include(../wincewm60professional-msvc2005/qmake.conf) -DEFINES += QT_WINCE_GESTURES -QMAKE_LIBS_GUI += TouchGestureCore.lib +DEFINES += QT_WINCE_GESTURES +QMAKE_LIBS_GUI += TouchGestureCore.lib diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp index 6b23cbe42e..a09e10c55e 100644 --- a/qmake/generators/mac/pbuilder_pbx.cpp +++ b/qmake/generators/mac/pbuilder_pbx.cpp @@ -137,6 +137,7 @@ ProjectBuilderMakefileGenerator::writeSubDirs(QTextStream &t) QList<ProjectBuilderSubDirs*> pb_subdirs; pb_subdirs.append(new ProjectBuilderSubDirs(project, QString(), false)); QString oldpwd = qmake_getpwd(); + QString oldoutpwd = Option::output_dir; QMap<QString, ProStringList> groups; for(int pb_subdir = 0; pb_subdir < pb_subdirs.size(); ++pb_subdir) { ProjectBuilderSubDirs *pb = pb_subdirs[pb_subdir]; @@ -173,6 +174,7 @@ ProjectBuilderMakefileGenerator::writeSubDirs(QTextStream &t) if(!qmake_setpwd(dir)) fprintf(stderr, "Cannot find directory: %s\n", dir.toLatin1().constData()); } + Option::output_dir = Option::globals->shadowedPath(QDir::cleanPath(fi.absoluteFilePath())); if(tmp_proj.read(fn)) { if(tmp_proj.first("TEMPLATE") == "subdirs") { QMakeProject *pp = new QMakeProject(&tmp_proj); @@ -190,13 +192,13 @@ ProjectBuilderMakefileGenerator::writeSubDirs(QTextStream &t) bool in_root = true; QString name = qmake_getpwd(); if(project->isActiveConfig("flat")) { - QString flat_file = fileFixify(name, oldpwd, Option::output_dir, FileFixifyRelative); + QString flat_file = fileFixify(name, oldpwd, oldoutpwd, FileFixifyRelative); if(flat_file.indexOf(Option::dir_sep) != -1) { QStringList dirs = flat_file.split(Option::dir_sep); name = dirs.back(); } } else { - QString flat_file = fileFixify(name, oldpwd, Option::output_dir, FileFixifyRelative); + QString flat_file = fileFixify(name, oldpwd, oldoutpwd, FileFixifyRelative); if(QDir::isRelativePath(flat_file) && flat_file.indexOf(Option::dir_sep) != -1) { QString last_grp("QMAKE_SUBDIR_PBX_HEIR_GROUP"); QStringList dirs = flat_file.split(Option::dir_sep); @@ -278,6 +280,7 @@ ProjectBuilderMakefileGenerator::writeSubDirs(QTextStream &t) } nextfile: qmake_setpwd(oldpwd); + Option::output_dir = oldoutpwd; } } } diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index 3cac073d72..69a8c809ac 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -92,18 +92,8 @@ bool MakefileGenerator::canExecute(const QStringList &cmdline, int *a) const QString MakefileGenerator::mkdir_p_asstring(const QString &dir, bool escape) const { - QString ret = "@" + chkdir + " "; - if(escape) - ret += escapeFilePath(dir); - else - ret += dir; - ret += " " + chkglue + "$(MKDIR) "; - if(escape) - ret += escapeFilePath(dir); - else - ret += dir; - ret += " "; - return ret; + QString edir = escape ? escapeFilePath(dir) : dir; + return "@" + makedir.arg(edir); } bool MakefileGenerator::mkdir(const QString &in_path) const @@ -440,13 +430,20 @@ MakefileGenerator::init() if (v["TARGET"].isEmpty()) warn_msg(WarnLogic, "TARGET is empty"); - chkdir = v["QMAKE_CHK_DIR_EXISTS"].join(' '); - chkfile = v["QMAKE_CHK_FILE_EXISTS"].join(' '); - if (chkfile.isEmpty()) // Backwards compat with Qt4 specs - chkfile = isWindowsShell() ? "if not exist" : "test -f"; - chkglue = v["QMAKE_CHK_EXISTS_GLUE"].join(' '); - if (chkglue.isEmpty()) // Backwards compat with Qt4 specs - chkglue = isWindowsShell() ? "" : "|| "; + makedir = v["QMAKE_MKDIR_CMD"].join(' '); + chkexists = v["QMAKE_CHK_EXISTS"].join(' '); + if (makedir.isEmpty()) { // Backwards compat with Qt < 5.0.2 specs + if (isWindowsShell()) { + makedir = "if not exist %1 mkdir %1 & if not exist %1 exit 1"; + chkexists = "if not exist %1"; + } else { + makedir = "test -d %1 || mkdir -p %1"; + chkexists = "test -e %1 ||"; + } + } + + if (v["QMAKE_CC_O_FLAG"].isEmpty()) + v["QMAKE_CC_O_FLAG"].append("-o "); if (v["QMAKE_LINK_O_FLAG"].isEmpty()) v["QMAKE_LINK_O_FLAG"].append("-o "); @@ -2401,8 +2398,8 @@ MakefileGenerator::writeSubTargetCall(QTextStream &t, if (!in.isEmpty()) { if (!in_directory.isEmpty()) t << "\n\t" << mkdir_p_asstring(out_directory); - pfx = "( " + chkfile + " " + out + " " + chkglue - + "$(QMAKE) " + in + buildArgs() + " -o " + out + pfx = "( " + chkexists.arg(out) + + + " $(QMAKE) " + in + buildArgs() + " -o " + out + " ) && "; } writeSubMakeCall(t, out_directory_cdin + pfx, makefilein); diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h index e1447c61c3..47acc8098f 100644 --- a/qmake/generators/makefile.h +++ b/qmake/generators/makefile.h @@ -81,7 +81,7 @@ class MakefileGenerator : protected QMakeSourceFileInfo QString spec; bool init_opath_already, init_already, no_io; QHash<QString, bool> init_compiler_already; - QString chkdir, chkfile, chkglue; + QString makedir, chkexists; QString build_args(const QString &outdir=QString()); //internal caches diff --git a/qmake/generators/makefiledeps.cpp b/qmake/generators/makefiledeps.cpp index a4f3e665b3..898903a423 100644 --- a/qmake/generators/makefiledeps.cpp +++ b/qmake/generators/makefiledeps.cpp @@ -392,8 +392,11 @@ bool QMakeSourceFileInfo::findDeps(SourceFile *file) #else fd = open(sourceFile.local().toLatin1().constData(), O_RDONLY); #endif - if(fd == -1 || fstat(fd, &fst) || S_ISDIR(fst.st_mode)) + if (fd == -1 || fstat(fd, &fst) || S_ISDIR(fst.st_mode)) { + if (fd != -1) + QT_CLOSE(fd); return false; + } buffer = getBuffer(fst.st_size); for(int have_read = 0; (have_read = QT_READ(fd, buffer + buffer_len, fst.st_size - buffer_len)); @@ -702,8 +705,11 @@ bool QMakeSourceFileInfo::findMocs(SourceFile *file) #else fd = open(fixPathForFile(file->file, true).local().toLocal8Bit().constData(), O_RDONLY); #endif - if(fd == -1 || fstat(fd, &fst) || S_ISDIR(fst.st_mode)) + if (fd == -1 || fstat(fd, &fst) || S_ISDIR(fst.st_mode)) { + if (fd != -1) + QT_CLOSE(fd); return false; //shouldn't happen + } buffer = getBuffer(fst.st_size); for(int have_read = buffer_len = 0; (have_read = QT_READ(fd, buffer + buffer_len, fst.st_size - buffer_len)); diff --git a/qmake/generators/metamakefile.cpp b/qmake/generators/metamakefile.cpp index 8c10d7d306..a037a966f6 100644 --- a/qmake/generators/metamakefile.cpp +++ b/qmake/generators/metamakefile.cpp @@ -79,7 +79,7 @@ public: virtual bool init(); virtual int type() const { return BUILDSMETATYPE; } - virtual bool write(const QString &); + virtual bool write(); }; void @@ -149,7 +149,7 @@ BuildsMetaMakefileGenerator::init() } bool -BuildsMetaMakefileGenerator::write(const QString &oldpwd) +BuildsMetaMakefileGenerator::write() { Build *glue = 0; if(!makefiles.isEmpty() && !makefiles.first()->build.isNull()) { @@ -181,7 +181,6 @@ BuildsMetaMakefileGenerator::write(const QString &oldpwd) if(Option::output.fileName().isEmpty() && Option::qmake_mode == Option::QMAKE_GENERATE_MAKEFILE) Option::output.setFileName(project->first("QMAKE_MAKEFILE").toQString()); - Option::output_dir = oldpwd; QString build_name = build->name; if(!build->build.isEmpty()) { if(!build_name.isEmpty()) @@ -268,7 +267,7 @@ public: virtual bool init(); virtual int type() const { return SUBDIRSMETATYPE; } - virtual bool write(const QString &); + virtual bool write(); }; bool @@ -349,7 +348,7 @@ SubdirsMetaMakefileGenerator::init() } else { const QString output_name = Option::output.fileName(); Option::output.setFileName(sub->output_file); - hasError |= !sub->makefile->write(sub->output_dir); + hasError |= !sub->makefile->write(); delete sub; qmakeClearCaches(); sub = 0; @@ -378,7 +377,7 @@ SubdirsMetaMakefileGenerator::init() } bool -SubdirsMetaMakefileGenerator::write(const QString &oldpwd) +SubdirsMetaMakefileGenerator::write() { bool ret = true; const QString &pwd = qmake_getpwd(); @@ -386,21 +385,16 @@ SubdirsMetaMakefileGenerator::write(const QString &oldpwd) const QString &output_name = Option::output.fileName(); for(int i = 0; ret && i < subs.count(); i++) { const Subdir *sub = subs.at(i); - qmake_setpwd(subs.at(i)->input_dir); - Option::output_dir = QFileInfo(subs.at(i)->output_dir).absoluteFilePath(); - if(Option::output_dir.at(Option::output_dir.length()-1) != QLatin1Char('/')) - Option::output_dir += QLatin1Char('/'); - Option::output.setFileName(subs.at(i)->output_file); + qmake_setpwd(sub->input_dir); + Option::output_dir = QFileInfo(sub->output_dir).absoluteFilePath(); + Option::output.setFileName(sub->output_file); if(i != subs.count()-1) { for (int ind = 0; ind < sub->indent; ++ind) printf(" "); printf("Writing %s\n", QDir::cleanPath(Option::output_dir+"/"+ Option::output.fileName()).toLatin1().constData()); } - QString writepwd = Option::fixPathToLocalOS(qmake_getpwd()); - if(!writepwd.startsWith(Option::fixPathToLocalOS(oldpwd))) - writepwd = oldpwd; - if(!(ret = subs.at(i)->makefile->write(writepwd))) + if (!(ret = sub->makefile->write())) break; //restore because I'm paranoid qmake_setpwd(pwd); diff --git a/qmake/generators/metamakefile.h b/qmake/generators/metamakefile.h index 85106a674d..aff2f422a6 100644 --- a/qmake/generators/metamakefile.h +++ b/qmake/generators/metamakefile.h @@ -69,7 +69,7 @@ public: virtual bool init() = 0; virtual int type() const { return -1; } - virtual bool write(const QString &oldpwd) = 0; + virtual bool write() = 0; }; QT_END_NAMESPACE diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp index 4f28321b09..9adcc3af7c 100644 --- a/qmake/generators/unix/unixmake.cpp +++ b/qmake/generators/unix/unixmake.cpp @@ -256,10 +256,10 @@ UnixMakefileGenerator::init() const ProKey runComp("QMAKE_RUN_" + compiler); if(project->isEmpty(runComp)) - project->values(runComp).append("$(" + compiler + ") " + compile_flag + " -o $obj $src"); + project->values(runComp).append("$(" + compiler + ") " + compile_flag + " " + var("QMAKE_CC_O_FLAG") + "$obj $src"); const ProKey runCompImp("QMAKE_RUN_" + compiler + "_IMP"); if(project->isEmpty(runCompImp)) - project->values(runCompImp).append("$(" + compiler + ") " + compile_flag + " -o \"$@\" \"$<\""); + project->values(runCompImp).append("$(" + compiler + ") " + compile_flag + " " + var("QMAKE_CC_O_FLAG") + "\"$@\" \"$<\""); } if(project->isActiveConfig("macx") && !project->isEmpty("TARGET") && !project->isActiveConfig("compile_libtool") && diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp index e64b2160b3..be4f203f01 100644 --- a/qmake/generators/win32/mingw_make.cpp +++ b/qmake/generators/win32/mingw_make.cpp @@ -299,16 +299,16 @@ void MingwMakefileGenerator::init() project->values("QMAKE_RUN_CC").clear(); project->values("QMAKE_RUN_CC").append("$(CC) -c -include " + preCompHeader + - " $(CFLAGS) $(INCPATH) -o $obj $src"); + " $(CFLAGS) $(INCPATH) " + var("QMAKE_CC_O_FLAG") + "$obj $src"); project->values("QMAKE_RUN_CC_IMP").clear(); project->values("QMAKE_RUN_CC_IMP").append("$(CC) -c -include " + preCompHeader + - " $(CFLAGS) $(INCPATH) -o $@ $<"); + " $(CFLAGS) $(INCPATH) " + var("QMAKE_CC_O_FLAG") + "$@ $<"); project->values("QMAKE_RUN_CXX").clear(); project->values("QMAKE_RUN_CXX").append("$(CXX) -c -include " + preCompHeader + - " $(CXXFLAGS) $(INCPATH) -o $obj $src"); + " $(CXXFLAGS) $(INCPATH) " + var("QMAKE_CC_O_FLAG") + "$obj $src"); project->values("QMAKE_RUN_CXX_IMP").clear(); project->values("QMAKE_RUN_CXX_IMP").append("$(CXX) -c -include " + preCompHeader + - " $(CXXFLAGS) $(INCPATH) -o $@ $<"); + " $(CXXFLAGS) $(INCPATH) " + var("QMAKE_CC_O_FLAG") + "$@ $<"); } if(project->isActiveConfig("dll")) { diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp index b620c270e0..ee53f94d90 100644 --- a/qmake/generators/win32/msvc_nmake.cpp +++ b/qmake/generators/win32/msvc_nmake.cpp @@ -49,7 +49,7 @@ QT_BEGIN_NAMESPACE -NmakeMakefileGenerator::NmakeMakefileGenerator() : Win32MakefileGenerator(), init_flag(false) +NmakeMakefileGenerator::NmakeMakefileGenerator() : Win32MakefileGenerator(), init_flag(false), usePCH(false) { } diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp index fce2147ed5..793c2ad1ad 100644 --- a/qmake/generators/win32/msvc_vcproj.cpp +++ b/qmake/generators/win32/msvc_vcproj.cpp @@ -434,18 +434,21 @@ ProStringList VcprojGenerator::collectDependencies(QMakeProject *proj, QHash<QSt projLookup.insert(profileKey, fi.absoluteFilePath()); } QString oldpwd = qmake_getpwd(); + QString oldoutpwd = Option::output_dir; QMakeProject tmp_proj; QString dir = fi.absolutePath(), fn = fi.fileName(); if (!dir.isEmpty()) { if (!qmake_setpwd(dir)) fprintf(stderr, "Cannot find directory: %s", dir.toLatin1().constData()); } + Option::output_dir = Option::globals->shadowedPath(QDir::cleanPath(fi.absoluteFilePath())); if (tmp_proj.read(fn)) { // Check if all requirements are fulfilled if (!tmp_proj.isEmpty("QMAKE_FAILED_REQUIREMENTS")) { fprintf(stderr, "Project file(%s) not added to Solution because all requirements not met:\n\t%s\n", fn.toLatin1().constData(), tmp_proj.values("QMAKE_FAILED_REQUIREMENTS").join(" ").toLatin1().constData()); qmake_setpwd(oldpwd); + Option::output_dir = oldoutpwd; continue; } if (tmp_proj.first("TEMPLATE") == "vcsubdirs") { @@ -460,13 +463,10 @@ ProStringList VcprojGenerator::collectDependencies(QMakeProject *proj, QHash<QSt // and to be able to extract all the dependencies Option::QMAKE_MODE old_mode = Option::qmake_mode; Option::qmake_mode = Option::QMAKE_GENERATE_NOTHING; - QString old_output_dir = Option::output_dir; - Option::output_dir = QFileInfo(fileFixify(dir, qmake_getpwd(), Option::output_dir)).canonicalFilePath(); VcprojGenerator tmp_vcproj; tmp_vcproj.setNoIO(true); tmp_vcproj.setProjectFile(&tmp_proj); Option::qmake_mode = old_mode; - Option::output_dir = old_output_dir; // We assume project filename is [QMAKE_PROJECT_NAME].vcproj QString vcproj = unescapeFilePath(tmp_vcproj.project->first("QMAKE_PROJECT_NAME") + project->first("VCPROJ_EXTENSION")); @@ -578,6 +578,7 @@ ProStringList VcprojGenerator::collectDependencies(QMakeProject *proj, QHash<QSt } nextfile: qmake_setpwd(oldpwd); + Option::output_dir = oldoutpwd; } } } diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp index cac63ed932..08674a323c 100644 --- a/qmake/generators/win32/winmakefile.cpp +++ b/qmake/generators/win32/winmakefile.cpp @@ -77,7 +77,7 @@ Win32MakefileGenerator::findHighestVersion(const QString &d, const QString &stem return vover.first().toInt(); int biggest=-1; - if(!project->isActiveConfig("no_versionlink")) { + if (project->isActiveConfig("link_highest_lib_version")) { static QHash<QString, QStringList> dirEntryListCache; QStringList entries = dirEntryListCache.value(bd); if (entries.isEmpty()) { @@ -122,7 +122,7 @@ Win32MakefileGenerator::findLibraries() if(opt.startsWith("/LIBPATH:")) { dirs.append(QMakeLocalFileName(opt.mid(9))); } else if(opt.startsWith("-L") || opt.startsWith("/L")) { - QString libpath = opt.mid(2); + QString libpath = Option::fixPathToTargetOS(opt.mid(2), false, false); QMakeLocalFileName l(libpath); if(!dirs.contains(l)) { dirs.append(l); diff --git a/qmake/library/qmakeevaluator.cpp b/qmake/library/qmakeevaluator.cpp index 4f4e5854f1..0515fe1c98 100644 --- a/qmake/library/qmakeevaluator.cpp +++ b/qmake/library/qmakeevaluator.cpp @@ -1062,7 +1062,7 @@ bool QMakeEvaluator::prepareProject(const QString &inDir) forever { QString superfile = superdir + QLatin1String("/.qmake.super"); if (IoUtils::exists(superfile)) { - m_superfile = superfile; + m_superfile = QDir::cleanPath(superfile); break; } QFileInfo qdfi(superdir); @@ -1099,8 +1099,8 @@ bool QMakeEvaluator::prepareProject(const QString &inDir) } else { m_buildRoot = QFileInfo(cachefile).path(); } - m_conffile = conffile; - m_cachefile = cachefile; + m_conffile = QDir::cleanPath(conffile); + m_cachefile = QDir::cleanPath(cachefile); } no_cache: diff --git a/qmake/main.cpp b/qmake/main.cpp index 6ef0707da9..55f915b52f 100644 --- a/qmake/main.cpp +++ b/qmake/main.cpp @@ -97,15 +97,8 @@ int runQMake(int argc, char **argv) } QString oldpwd = qmake_getpwd(); -#ifdef Q_OS_WIN - if(!(oldpwd.length() == 3 && oldpwd[0].isLetter() && oldpwd.endsWith(":/"))) -#endif - { - if(!oldpwd.endsWith(QLatin1Char('/'))) - oldpwd += QLatin1Char('/'); - } - Option::output_dir = oldpwd; //for now this is the output dir + Option::output_dir = oldpwd; //for now this is the output dir if(Option::output.fileName() != "-") { QFileInfo fi(Option::output); QString dir; @@ -124,7 +117,7 @@ int runQMake(int argc, char **argv) if(!dir.isNull() && dir != ".") Option::output_dir = dir; if(QDir::isRelativePath(Option::output_dir)) - Option::output_dir.prepend(oldpwd); + Option::output_dir.prepend(oldpwd + QLatin1Char('/')); Option::output_dir = QDir::cleanPath(Option::output_dir); } @@ -192,7 +185,7 @@ int runQMake(int argc, char **argv) if (!success) exit_val = 3; - if(mkfile && !mkfile->write(oldpwd)) { + if (mkfile && !mkfile->write()) { if(Option::qmake_mode == Option::QMAKE_GENERATE_PROJECT) fprintf(stderr, "Unable to generate project file.\n"); else diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-gpos.c b/src/3rdparty/harfbuzz/src/harfbuzz-gpos.c index 1e1b92b010..90e31a589c 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-gpos.c +++ b/src/3rdparty/harfbuzz/src/harfbuzz-gpos.c @@ -3782,7 +3782,7 @@ static HB_Error Load_ContextPos2( HB_ContextPosFormat2* cpf2, return HB_Err_Ok; Fail1: - for ( m = 0; m < n; n++ ) + for ( m = 0; m < n; m++ ) Free_PosClassSet( &pcs[m] ); FREE( pcs ); diff --git a/src/android/java/AndroidManifest.xml b/src/android/java/AndroidManifest.xml index 7a77d6fd83..1161b15e8d 100644 --- a/src/android/java/AndroidManifest.xml +++ b/src/android/java/AndroidManifest.xml @@ -1,5 +1,5 @@ <?xml version='1.0' encoding='utf-8'?> -<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="org.kde.necessitas.example"> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="org.qtproject.example"> <application android:name="org.qtproject.qt5.android.bindings.QtApplication" android:label="@string/app_name"> <activity android:name="org.qtproject.qt5.android.bindings.QtActivity" android:label="@string/app_name" android:configChanges="orientation|locale|fontScale|keyboard|keyboardHidden" > <intent-filter> @@ -9,6 +9,12 @@ <meta-data android:name="android.app.qt_libs_resource_id" android:resource="@array/qt_libs"/> <meta-data android:name="android.app.bundled_libs_resource_id" android:resource="@array/bundled_libs"/> <meta-data android:name="android.app.lib_name" android:value=""/> + <!-- Run with local libs --> + <meta-data android:name="android.app.use_local_qt_libs" android:value="0"/> + <meta-data android:name="android.app.libs_prefix" android:value="/data/local/tmp/qt/"/> + <meta-data android:name="android.app.load_local_libs" android:value=""/> + <meta-data android:name="android.app.load_local_jars" android:value=""/> + <meta-data android:name="android.app.static_init_classes" android:value=""/> <!-- Messages maps --> <meta-data android:name="android.app.ministro_not_found_msg" android:value="@string/ministro_not_found_msg"/> <meta-data android:name="android.app.ministro_needed_msg" android:value="@string/ministro_needed_msg"/> diff --git a/src/android/java/java.pro b/src/android/java/java.pro index fe5bf2f62b..2b6ac16a3c 100644 --- a/src/android/java/java.pro +++ b/src/android/java/java.pro @@ -1,3 +1,5 @@ +CONFIG -= qt + javaresources.files = \ $$PWD/AndroidManifest.xml \ $$PWD/res \ diff --git a/src/android/java/src/org/qtproject/qt5/android/bindings/QtActivity.java b/src/android/java/src/org/qtproject/qt5/android/bindings/QtActivity.java index c3d82bca8d..4b01d29143 100644 --- a/src/android/java/src/org/qtproject/qt5/android/bindings/QtActivity.java +++ b/src/android/java/src/org/qtproject/qt5/android/bindings/QtActivity.java @@ -304,23 +304,22 @@ public class QtActivity extends Activity m_qtLibs = getResources().getStringArray(resourceId); } - if (getIntent().getExtras()!= null - && getIntent().getExtras().containsKey("use_local_qt_libs") - && getIntent().getExtras().getString("use_local_qt_libs").equals("true")) { - ArrayList<String> libraryList= new ArrayList<String>(); + if (ai.metaData.containsKey("android.app.use_local_qt_libs") + && ai.metaData.getInt("android.app.use_local_qt_libs") == 1) { + ArrayList<String> libraryList = new ArrayList<String>(); - String localPrefix="/data/local/tmp/qt/"; - if (getIntent().getExtras().containsKey("libs_prefix")) - localPrefix=getIntent().getExtras().getString("libs_prefix"); + String localPrefix = "/data/local/tmp/qt/"; + if (ai.metaData.containsKey("android.app.libs_prefix")) + localPrefix = ai.metaData.getString("android.app.libs_prefix"); if (m_qtLibs != null) { for (int i=0;i<m_qtLibs.length;i++) libraryList.add(localPrefix+"lib/lib"+m_qtLibs[i]+".so"); } - if (getIntent().getExtras().containsKey("load_local_libs")) { - String[] extraLibs=getIntent().getExtras().getString("load_local_libs").split(":"); - for (String lib:extraLibs) { + if (ai.metaData.containsKey("android.app.load_local_libs")) { + String[] extraLibs = ai.metaData.getString("android.app.load_local_libs").split(":"); + for (String lib : extraLibs) { if (lib.length() > 0) libraryList.add(localPrefix + lib); } @@ -328,8 +327,8 @@ public class QtActivity extends Activity String dexPaths = new String(); String pathSeparator = System.getProperty("path.separator", ":"); - if (getIntent().getExtras().containsKey("load_local_jars")) { - String[] jarFiles = getIntent().getExtras().getString("load_local_jars").split(":"); + if (ai.metaData.containsKey("android.app.load_local_jars")) { + String[] jarFiles = ai.metaData.getString("android.app.load_local_jars").split(":"); for (String jar:jarFiles) { if (jar.length() > 0) { if (dexPaths.length() > 0) @@ -342,12 +341,10 @@ public class QtActivity extends Activity Bundle loaderParams = new Bundle(); loaderParams.putInt(ERROR_CODE_KEY, 0); loaderParams.putString(DEX_PATH_KEY, dexPaths); - loaderParams.putString(LOADER_CLASS_NAME_KEY, getIntent().getExtras().containsKey("loader_class_name") - ? getIntent().getExtras().getString("loader_class_name") - : "org.qtproject.qt5.android.QtActivityDelegate"); - if (getIntent().getExtras().containsKey("static_init_classes")) { + loaderParams.putString(LOADER_CLASS_NAME_KEY, "org.qtproject.qt5.android.QtActivityDelegate"); + if (ai.metaData.containsKey("android.app.static_init_classes")) { loaderParams.putStringArray(STATIC_INIT_CLASSES_KEY, - getIntent().getExtras().getString("static_init_classes").split(":")); + ai.metaData.getString("android.app.static_init_classes").split(":")); } loaderParams.putStringArrayList(NATIVE_LIBRARIES_KEY, libraryList); loaderParams.putString(ENVIRONMENT_VARIABLES_KEY, ENVIRONMENT_VARIABLES diff --git a/src/angle/angle.pro b/src/angle/angle.pro index 371e39868f..721caf880a 100644 --- a/src/angle/angle.pro +++ b/src/angle/angle.pro @@ -6,5 +6,5 @@ SUBDIRS += src # 2) If we made a 'QtANGLE' module, the include directory would be flattened which won't work since # we need to support "#include <GLES2/gl2.h>" CONFIG += minimal_syncqt -QMAKE_SYNCQT_OPTIONS = -module KHR -module EGL -module GLES2 +QMAKE_SYNCQT_OPTIONS = -module KHR -module EGL -module GLES2 -version none load(qt_module_headers) diff --git a/src/corelib/Qt5CTestMacros.cmake b/src/corelib/Qt5CTestMacros.cmake index 60b98a7138..32af44a79d 100644 --- a/src/corelib/Qt5CTestMacros.cmake +++ b/src/corelib/Qt5CTestMacros.cmake @@ -19,6 +19,13 @@ if (CMAKE_TOOLCHAIN_FILE) list(APPEND BUILD_OPTIONS_LIST "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}") endif() +if (NO_WIDGETS) + list(APPEND BUILD_OPTIONS_LIST "-DNO_WIDGETS=True") +endif() +if (NO_DBUS) + list(APPEND BUILD_OPTIONS_LIST "-DNO_DBUS=True") +endif() + macro(expect_pass _dir) string(REPLACE "(" "_" testname "${_dir}") string(REPLACE ")" "_" testname "${testname}") @@ -80,7 +87,7 @@ function(test_module_includes) set(packages_string " ${packages_string} - find_package(Qt5${_package} REQUIRED) + find_package(Qt5${_package} 5.0.0 REQUIRED) " ) endforeach() @@ -90,22 +97,10 @@ function(test_module_includes) list(REMOVE_AT all_args 0 1) set(packages_string "${packages_string} - find_package(Qt5${qtmodule} REQUIRED) + find_package(Qt5${qtmodule} 5.0.0 REQUIRED) include_directories(\${Qt5${qtmodule}_INCLUDE_DIRS}) add_definitions(\${Qt5${qtmodule}_DEFINITIONS})\n" ) - - # Because the CI system tests built packages before installation, - # the include dir allowing module-includes for the new module is not - # the same as the dir for QtCore (because that is at the installation - # location). The CI system is untypical here in that it attempts to use - # packages while they are in an intermediate state, so we work around - # that in the test system. - set(packages_string - "${packages_string} - include_directories(\"\${Qt5${qtmodule}_DIR}/../../../include\")\n" - ) - set(libraries_string "${libraries_string} Qt5::${qtmodule}") endwhile() @@ -127,18 +122,23 @@ function(test_module_includes) set(instances_string "") while(all_args) list(GET all_args 0 qtmodule) - list(GET all_args 1 qtinclude) + list(GET all_args 1 qtclass) + if (${qtclass}_NAMESPACE) + set(qtinstancetype ${${qtclass}_NAMESPACE}::${qtclass}) + else() + set(qtinstancetype ${qtclass}) + endif() list(REMOVE_AT all_args 0 1) set(includes_string "${includes_string} - #include <${qtinclude}> - #include <Qt${qtmodule}/${qtinclude}> + #include <${qtclass}> + #include <Qt${qtmodule}/${qtclass}> #include <Qt${qtmodule}> #include <Qt${qtmodule}/Qt${qtmodule}>" ) set(instances_string "${instances_string} - ${qtinclude} local${qtinclude}; + ${qtinstancetype} local${qtclass}; ") endwhile() diff --git a/src/corelib/Qt5CoreConfigExtras.cmake.in b/src/corelib/Qt5CoreConfigExtras.cmake.in index 4e0fcda20e..bdafc85796 100644 --- a/src/corelib/Qt5CoreConfigExtras.cmake.in +++ b/src/corelib/Qt5CoreConfigExtras.cmake.in @@ -41,23 +41,34 @@ set(Qt5Core_QMAKE_EXECUTABLE Qt5::qmake) set(Qt5Core_MOC_EXECUTABLE Qt5::moc) set(Qt5Core_RCC_EXECUTABLE Qt5::rcc) +set_property(TARGET Qt5::Core PROPERTY INTERFACE_QT_MAJOR_VERSION 5) +set_property(TARGET Qt5::Core APPEND PROPERTY + COMPATIBLE_INTERFACE_STRING QT_MAJOR_VERSION +) + !!IF isEmpty(CMAKE_ARCHDATA_DIR_IS_ABSOLUTE) -list(APPEND Qt5Core_INCLUDE_DIRS \"${_qt5Core_install_prefix}/$$CMAKE_INCLUDE_DIR\" \"${_qt5Core_install_prefix}/$${CMAKE_ARCHDATA_DIR}/mkspecs/$${CMAKE_MKSPEC}\") +set(_qt5_corelib_extra_includes \"${_qt5Core_install_prefix}/$${CMAKE_ARCHDATA_DIR}/mkspecs/$${CMAKE_MKSPEC}\") !!ELSE -list(APPEND Qt5Core_INCLUDE_DIRS \"$$CMAKE_INCLUDE_DIR\" \"$${CMAKE_ARCHDATA_DIR}mkspecs/$${CMAKE_MKSPEC}\") +set(_qt5_corelib_extra_includes \"$${CMAKE_ARCHDATA_DIR}mkspecs/$${CMAKE_MKSPEC}\") !!ENDIF +list(APPEND Qt5Core_INCLUDE_DIRS ${_qt5_corelib_extra_includes}) +set_property(TARGET Qt5::Core APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${_qt5_corelib_extra_includes}) +set(_qt5_corelib_extra_includes) + !!IF !isEmpty(CMAKE_ADD_FPIE_FLAGS) # Targets using Qt need to use the POSITION_INDEPENDENT_CODE property. The # Qt5_POSITION_INDEPENDENT_CODE variable is used in the # qt5_use_module # macro to add it. set(Qt5_POSITION_INDEPENDENT_CODE True) +set_property(TARGET Qt5::Core PROPERTY INTERFACE_POSITION_INDEPENDENT_CODE \"ON\") set(Qt5Core_EXECUTABLE_COMPILE_FLAGS \"-fPIE\") !!ENDIF !!IF !isEmpty(QT_NAMESPACE) list(APPEND Qt5Core_DEFINITIONS -DQT_NAMESPACE=$$QT_NAMESPACE) list(APPEND Qt5Core_COMPILE_DEFINITIONS QT_NAMESPACE=$$QT_NAMESPACE) +set_property(TARGET Qt5::Core APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS QT_NAMESPACE=$$QT_NAMESPACE) !!ENDIF !!IF contains(QT_CONFIG, reduce_exports) @@ -95,6 +106,25 @@ if (NOT TARGET Qt5::WinMain) !!ENDIF ) !!ENDIF + + if (NOT CMAKE_VERSION VERSION_LESS 2.8.11 AND NOT Qt5_NO_LINK_QTMAIN) + set(_isExe $<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>) + set(_isWin32 $<BOOL:$<TARGET_PROPERTY:WIN32_EXECUTABLE>>) + set(_isNotExcluded $<NOT:$<BOOL:$<TARGET_PROPERTY:Qt5_NO_LINK_QTMAIN>>>) + set(_isPolicyNEW $<TARGET_POLICY:CMP0020>) + get_target_property(_configs Qt5::Core IMPORTED_CONFIGURATIONS) + foreach(_config ${_configs}) + set_property(TARGET Qt5::Core APPEND PROPERTY + IMPORTED_LINK_INTERFACE_LIBRARIES_${_config} + $<$<AND:${_isExe},${_isWin32},${_isNotExcluded},${_isPolicyNEW}>:Qt5::WinMain> + ) + endforeach() + unset(_configs) + unset(_isExe) + unset(_isWin32) + unset(_isNotExcluded) + unset(_isPolicyNEW) + endif() endif() !!ENDIF diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index 0d9cacdb1f..b6ce9e03fd 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -2504,6 +2504,9 @@ to be explicitly set for instances of QListWidgetItem, QTableWidgetItem, and QTreeWidgetItem. + Note that it is undefined behavior to reimplement QAbstractItemModel::hasChildren + to return true for an index if that index has the Qt::ItemNeverHasChildren flag set. + \sa QAbstractItemModel */ diff --git a/src/corelib/global/qtypetraits.h b/src/corelib/global/qtypetraits.h index 7ccad067d0..2ae66da92b 100644 --- a/src/corelib/global/qtypetraits.h +++ b/src/corelib/global/qtypetraits.h @@ -245,6 +245,10 @@ template<> struct is_integral<unsigned long long> : true_type { }; template <class T> struct is_integral<const T> : is_integral<T> { }; template <class T> struct is_integral<volatile T> : is_integral<T> { }; template <class T> struct is_integral<const volatile T> : is_integral<T> { }; +#if defined (Q_COMPILER_UNICODE_STRINGS) +template<> struct is_integral<char16_t> : true_type { }; +template<> struct is_integral<char32_t> : true_type { }; +#endif // is_floating_point is false except for the built-in floating-point types. // A cv-qualified type is integral if and only if the underlying type is. diff --git a/src/corelib/io/qfsfileengine_win.cpp b/src/corelib/io/qfsfileengine_win.cpp index 23ab507dad..41526d1eac 100644 --- a/src/corelib/io/qfsfileengine_win.cpp +++ b/src/corelib/io/qfsfileengine_win.cpp @@ -522,7 +522,7 @@ bool QFSFileEngine::renameOverwrite(const QString &newName) Q_D(QFSFileEngine); bool ret = ::MoveFileEx((wchar_t*)d->fileEntry.nativeFilePath().utf16(), (wchar_t*)QFileSystemEntry(newName).nativeFilePath().utf16(), - MOVEFILE_REPLACE_EXISTING | MOVEFILE_COPY_ALLOWED) != 0; + MOVEFILE_REPLACE_EXISTING) != 0; if (!ret) setError(QFile::RenameError, QSystemError(::GetLastError(), QSystemError::NativeError).toString()); return ret; diff --git a/src/corelib/io/qnoncontiguousbytedevice.cpp b/src/corelib/io/qnoncontiguousbytedevice.cpp index 2bac7c761c..253aa2aafb 100644 --- a/src/corelib/io/qnoncontiguousbytedevice.cpp +++ b/src/corelib/io/qnoncontiguousbytedevice.cpp @@ -388,9 +388,16 @@ bool QNonContiguousByteDeviceIoDeviceImpl::reset() { if (resetDisabled) return false; - - if (device->seek(initialPosition)) { + bool reset = (initialPosition == 0) ? device->reset() : device->seek(initialPosition); + if (reset) { eof = false; // assume eof is false, it will be true after a read has been attempted + totalAdvancements = 0; //reset the progress counter + if (currentReadBuffer) { + delete currentReadBuffer; + currentReadBuffer = 0; + } + currentReadBufferAmount = 0; + currentReadBufferPosition = 0; return true; } diff --git a/src/corelib/io/qprocess_unix.cpp b/src/corelib/io/qprocess_unix.cpp index 997848851d..7f7066271b 100644 --- a/src/corelib/io/qprocess_unix.cpp +++ b/src/corelib/io/qprocess_unix.cpp @@ -380,7 +380,7 @@ bool QProcessPrivate::createChannel(Channel &channel) return false; // create the socket notifiers - if (threadData->eventDispatcher) { + if (threadData->hasEventDispatcher()) { if (&channel == &stdinChannel) { channel.notifier = new QSocketNotifier(channel.pipe[1], QSocketNotifier::Write, q); @@ -562,7 +562,7 @@ void QProcessPrivate::startProcess() return; } - if (threadData->eventDispatcher) { + if (threadData->hasEventDispatcher()) { startupSocketNotifier = new QSocketNotifier(childStartedPipe[0], QSocketNotifier::Read, q); QObject::connect(startupSocketNotifier, SIGNAL(activated(int)), diff --git a/src/corelib/io/qprocess_win.cpp b/src/corelib/io/qprocess_win.cpp index 693778e629..0f36c3adbf 100644 --- a/src/corelib/io/qprocess_win.cpp +++ b/src/corelib/io/qprocess_win.cpp @@ -312,11 +312,13 @@ void QProcessPrivate::destroyChannel(Channel *channel) } } else if (channel == &stdoutChannel) { if (stdoutReader) { + stdoutReader->stop(); stdoutReader->deleteLater(); stdoutReader = 0; } } else if (channel == &stderrChannel) { if (stderrReader) { + stderrReader->stop(); stderrReader->deleteLater(); stderrReader = 0; } @@ -526,7 +528,7 @@ void QProcessPrivate::startProcess() if (!pid) return; - if (threadData->eventDispatcher) { + if (threadData->hasEventDispatcher()) { processFinishedNotifier = new QWinEventNotifier(pid->hProcess, q); QObject::connect(processFinishedNotifier, SIGNAL(activated(HANDLE)), q, SLOT(_q_processDied())); processFinishedNotifier->setEnabled(true); @@ -795,8 +797,8 @@ void QProcessPrivate::findExitCode() DWORD theExitCode; if (GetExitCodeProcess(pid->hProcess, &theExitCode)) { exitCode = theExitCode; - //### for now we assume a crash if exit code is less than -1 or the magic number - crashed = (exitCode == 0xf291 || (int)exitCode < 0); + crashed = (exitCode == 0xf291 // our magic number, see killProcess + || (theExitCode >= 0x80000000 && theExitCode < 0xD0000000)); } } diff --git a/src/corelib/io/qprocess_wince.cpp b/src/corelib/io/qprocess_wince.cpp index 4d3f550db5..712748aa59 100644 --- a/src/corelib/io/qprocess_wince.cpp +++ b/src/corelib/io/qprocess_wince.cpp @@ -158,7 +158,7 @@ void QProcessPrivate::startProcess() if (!pid) return; - if (threadData->eventDispatcher) { + if (threadData->hasEventDispatcher()) { processFinishedNotifier = new QWinEventNotifier(pid->hProcess, q); QObject::connect(processFinishedNotifier, SIGNAL(activated(HANDLE)), q, SLOT(_q_processDied())); processFinishedNotifier->setEnabled(true); diff --git a/src/corelib/io/qtemporaryfile.cpp b/src/corelib/io/qtemporaryfile.cpp index d3a6e3c238..c2f421843c 100644 --- a/src/corelib/io/qtemporaryfile.cpp +++ b/src/corelib/io/qtemporaryfile.cpp @@ -160,7 +160,14 @@ static bool createFileFromTemplate(NativeFileHandle &file, return true; DWORD err = GetLastError(); - if (err != ERROR_FILE_EXISTS) { + if (err == ERROR_ACCESS_DENIED) { + DWORD attributes = GetFileAttributes((const wchar_t *)path.constData()); + if (attributes == INVALID_FILE_ATTRIBUTES) { + // Potential write error (read-only parent directory, etc.). + error = QSystemError(err, QSystemError::NativeError); + return false; + } // else file already exists as a directory. + } else if (err != ERROR_FILE_EXISTS) { error = QSystemError(err, QSystemError::NativeError); return false; } diff --git a/src/corelib/io/qwindowspipereader.cpp b/src/corelib/io/qwindowspipereader.cpp index efadb357a9..2cb5845768 100644 --- a/src/corelib/io/qwindowspipereader.cpp +++ b/src/corelib/io/qwindowspipereader.cpp @@ -64,7 +64,7 @@ QWindowsPipeReader::QWindowsPipeReader(QObject *parent) connect(dataReadNotifier, &QWinOverlappedIoNotifier::notified, this, &QWindowsPipeReader::notified); } -static void qt_cancelIo(HANDLE handle, OVERLAPPED *overlapped) +static bool qt_cancelIo(HANDLE handle, OVERLAPPED *overlapped) { typedef BOOL (WINAPI *PtrCancelIoEx)(HANDLE, LPOVERLAPPED); static PtrCancelIoEx ptrCancelIoEx = 0; @@ -74,16 +74,18 @@ static void qt_cancelIo(HANDLE handle, OVERLAPPED *overlapped) ptrCancelIoEx = PtrCancelIoEx(GetProcAddress(kernel32, "CancelIoEx")); } if (ptrCancelIoEx) - ptrCancelIoEx(handle, overlapped); + return ptrCancelIoEx(handle, overlapped); else - CancelIo(handle); + return CancelIo(handle); } QWindowsPipeReader::~QWindowsPipeReader() { if (readSequenceStarted) { - qt_cancelIo(handle, &overlapped); - dataReadNotifier->waitForNotified(-1, &overlapped); + if (qt_cancelIo(handle, &overlapped)) + dataReadNotifier->waitForNotified(-1, &overlapped); + else + qErrnoWarning("QWindowsPipeReader: qt_cancelIo on handle %x failed.", handle); } } diff --git a/src/corelib/itemmodels/qabstractitemmodel.cpp b/src/corelib/itemmodels/qabstractitemmodel.cpp index 989456efbb..f152dec5e6 100644 --- a/src/corelib/itemmodels/qabstractitemmodel.cpp +++ b/src/corelib/itemmodels/qabstractitemmodel.cpp @@ -1679,6 +1679,9 @@ bool QAbstractItemModel::hasIndex(int row, int column, const QModelIndex &parent Use rowCount() on the parent to find out the number of children. + Note that it is undefined behavior to report that a particular index hasChildren + with this method if the same index has the flag Qt::ItemNeverHasChildren set. + \sa parent(), index() */ bool QAbstractItemModel::hasChildren(const QModelIndex &parent) const @@ -2109,9 +2112,8 @@ void QAbstractItemModel::fetchMore(const QModelIndex &) The default implementation always returns false. - If canFetchMore() returns true, QAbstractItemView will call fetchMore(). - However, the fetchMore() function is only called when the model is being - populated incrementally. + If canFetchMore() returns true, the fetchMore() function should + be called. This is the behavior of QAbstractItemView, for example. \sa fetchMore() */ diff --git a/src/corelib/kernel/qabstracteventdispatcher.cpp b/src/corelib/kernel/qabstracteventdispatcher.cpp index c4e02c0347..6558893036 100644 --- a/src/corelib/kernel/qabstracteventdispatcher.cpp +++ b/src/corelib/kernel/qabstracteventdispatcher.cpp @@ -172,7 +172,7 @@ QAbstractEventDispatcher::~QAbstractEventDispatcher() QAbstractEventDispatcher *QAbstractEventDispatcher::instance(QThread *thread) { QThreadData *data = thread ? QThreadData::get2(thread) : QThreadData::current(); - return data->eventDispatcher; + return data->eventDispatcher.load(); } /*! diff --git a/src/corelib/kernel/qabstractnativeeventfilter.cpp b/src/corelib/kernel/qabstractnativeeventfilter.cpp index ad5e7f888c..b38e225f0d 100644 --- a/src/corelib/kernel/qabstractnativeeventfilter.cpp +++ b/src/corelib/kernel/qabstractnativeeventfilter.cpp @@ -61,6 +61,7 @@ QT_BEGIN_NAMESPACE */ QAbstractNativeEventFilter::QAbstractNativeEventFilter() { + Q_UNUSED(d); } /*! diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index 3540e3163d..61a8b6a18c 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -689,7 +689,7 @@ void QCoreApplication::init() #ifndef QT_NO_QOBJECT // use the event dispatcher created by the app programmer (if any) if (!QCoreApplicationPrivate::eventDispatcher) - QCoreApplicationPrivate::eventDispatcher = d->threadData->eventDispatcher; + QCoreApplicationPrivate::eventDispatcher = d->threadData->eventDispatcher.load(); // otherwise we create one if (!QCoreApplicationPrivate::eventDispatcher) d->createEventDispatcher(); @@ -725,6 +725,10 @@ void QCoreApplication::init() qt_call_pre_routines(); qt_startup_hook(); + +#ifndef QT_NO_QOBJECT + QCoreApplicationPrivate::is_app_running = true; // No longer starting up. +#endif } /*! @@ -1027,9 +1031,9 @@ bool QCoreApplication::closingDown() void QCoreApplication::processEvents(QEventLoop::ProcessEventsFlags flags) { QThreadData *data = QThreadData::current(); - if (!data->eventDispatcher) + if (!data->hasEventDispatcher()) return; - data->eventDispatcher->processEvents(flags); + data->eventDispatcher.load()->processEvents(flags); } /*! @@ -1051,11 +1055,11 @@ void QCoreApplication::processEvents(QEventLoop::ProcessEventsFlags flags) void QCoreApplication::processEvents(QEventLoop::ProcessEventsFlags flags, int maxtime) { QThreadData *data = QThreadData::current(); - if (!data->eventDispatcher) + if (!data->hasEventDispatcher()) return; QElapsedTimer start; start.start(); - while (data->eventDispatcher->processEvents(flags & ~QEventLoop::WaitForMoreEvents)) { + while (data->eventDispatcher.load()->processEvents(flags & ~QEventLoop::WaitForMoreEvents)) { if (start.elapsed() > maxtime) break; } @@ -1254,8 +1258,9 @@ void QCoreApplication::postEvent(QObject *receiver, QEvent *event, int priority) data->canWait = false; locker.unlock(); - if (data->eventDispatcher) - data->eventDispatcher->wakeUp(); + QAbstractEventDispatcher* dispatcher = data->eventDispatcher.loadAcquire(); + if (dispatcher) + dispatcher->wakeUp(); } /*! @@ -1375,8 +1380,8 @@ void QCoreApplicationPrivate::sendPostedEvents(QObject *receiver, int event_type } --data->postEventList.recursion; - if (!data->postEventList.recursion && !data->canWait && data->eventDispatcher) - data->eventDispatcher->wakeUp(); + if (!data->postEventList.recursion && !data->canWait && data->hasEventDispatcher()) + data->eventDispatcher.load()->wakeUp(); // clear the global list, i.e. remove everything that was // delivered. diff --git a/src/corelib/kernel/qeventdispatcher_glib.cpp b/src/corelib/kernel/qeventdispatcher_glib.cpp index 17830868da..e87e830c39 100644 --- a/src/corelib/kernel/qeventdispatcher_glib.cpp +++ b/src/corelib/kernel/qeventdispatcher_glib.cpp @@ -259,10 +259,11 @@ static gboolean postEventSourcePrepare(GSource *s, gint *timeout) gint dummy; if (!timeout) timeout = &dummy; - *timeout = data->canWait ? -1 : 0; + const bool canWait = data->canWaitLocked(); + *timeout = canWait ? -1 : 0; GPostEventSource *source = reinterpret_cast<GPostEventSource *>(s); - return (!data->canWait + return (!canWait || (source->serialNumber.load() != source->lastSerialNumber)); } diff --git a/src/corelib/kernel/qeventdispatcher_unix.cpp b/src/corelib/kernel/qeventdispatcher_unix.cpp index c79fe89105..69363bc3c9 100644 --- a/src/corelib/kernel/qeventdispatcher_unix.cpp +++ b/src/corelib/kernel/qeventdispatcher_unix.cpp @@ -147,8 +147,6 @@ QEventDispatcherUNIXPrivate::QEventDispatcherUNIXPrivate() qFatal("QEventDispatcherUNIXPrivate(): Can not continue without a thread pipe"); sn_highest = -1; - - interrupt = false; } QEventDispatcherUNIXPrivate::~QEventDispatcherUNIXPrivate() @@ -322,8 +320,6 @@ QEventDispatcherUNIX::QEventDispatcherUNIX(QEventDispatcherUNIXPrivate &dd, QObj QEventDispatcherUNIX::~QEventDispatcherUNIX() { - Q_D(QEventDispatcherUNIX); - d->threadData->eventDispatcher = 0; } int QEventDispatcherUNIX::select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, @@ -584,21 +580,21 @@ int QEventDispatcherUNIX::activateSocketNotifiers() bool QEventDispatcherUNIX::processEvents(QEventLoop::ProcessEventsFlags flags) { Q_D(QEventDispatcherUNIX); - d->interrupt = false; + d->interrupt.store(0); // we are awake, broadcast it emit awake(); QCoreApplicationPrivate::sendPostedEvents(0, 0, d->threadData); int nevents = 0; - const bool canWait = (d->threadData->canWait - && !d->interrupt + const bool canWait = (d->threadData->canWaitLocked() + && !d->interrupt.load() && (flags & QEventLoop::WaitForMoreEvents)); if (canWait) emit aboutToBlock(); - if (!d->interrupt) { + if (!d->interrupt.load()) { // return the maximum time we can wait for an event. timespec *tm = 0; timespec wait_tm = { 0l, 0l }; @@ -667,7 +663,7 @@ void QEventDispatcherUNIX::wakeUp() void QEventDispatcherUNIX::interrupt() { Q_D(QEventDispatcherUNIX); - d->interrupt = true; + d->interrupt.store(1); wakeUp(); } diff --git a/src/corelib/kernel/qeventdispatcher_unix_p.h b/src/corelib/kernel/qeventdispatcher_unix_p.h index db89b7c444..5d69d5e396 100644 --- a/src/corelib/kernel/qeventdispatcher_unix_p.h +++ b/src/corelib/kernel/qeventdispatcher_unix_p.h @@ -162,7 +162,7 @@ public: QSockNotType::List sn_pending_list; QAtomicInt wakeUps; - bool interrupt; + QAtomicInt interrupt; // bool }; QT_END_NAMESPACE diff --git a/src/corelib/kernel/qeventloop.cpp b/src/corelib/kernel/qeventloop.cpp index fe254b5593..549b8db9ca 100644 --- a/src/corelib/kernel/qeventloop.cpp +++ b/src/corelib/kernel/qeventloop.cpp @@ -103,7 +103,7 @@ QEventLoop::QEventLoop(QObject *parent) Q_D(QEventLoop); if (!QCoreApplication::instance()) { qWarning("QEventLoop: Cannot be used without QApplication"); - } else if (!d->threadData->eventDispatcher) { + } else if (!d->threadData->eventDispatcher.load()) { QThreadPrivate::createEventDispatcher(d->threadData); } } @@ -131,9 +131,9 @@ QEventLoop::~QEventLoop() bool QEventLoop::processEvents(ProcessEventsFlags flags) { Q_D(QEventLoop); - if (!d->threadData->eventDispatcher) + if (!d->threadData->eventDispatcher.load()) return false; - return d->threadData->eventDispatcher->processEvents(flags); + return d->threadData->eventDispatcher.load()->processEvents(flags); } /*! @@ -234,7 +234,7 @@ int QEventLoop::exec(ProcessEventsFlags flags) void QEventLoop::processEvents(ProcessEventsFlags flags, int maxTime) { Q_D(QEventLoop); - if (!d->threadData->eventDispatcher) + if (!d->threadData->eventDispatcher.load()) return; QElapsedTimer start; @@ -263,12 +263,12 @@ void QEventLoop::processEvents(ProcessEventsFlags flags, int maxTime) void QEventLoop::exit(int returnCode) { Q_D(QEventLoop); - if (!d->threadData->eventDispatcher) + if (!d->threadData->eventDispatcher.load()) return; d->returnCode = returnCode; d->exit = true; - d->threadData->eventDispatcher->interrupt(); + d->threadData->eventDispatcher.load()->interrupt(); } /*! @@ -292,9 +292,9 @@ bool QEventLoop::isRunning() const void QEventLoop::wakeUp() { Q_D(QEventLoop); - if (!d->threadData->eventDispatcher) + if (!d->threadData->eventDispatcher.load()) return; - d->threadData->eventDispatcher->wakeUp(); + d->threadData->eventDispatcher.load()->wakeUp(); } diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index 1312e64d8b..583e580762 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -216,8 +216,8 @@ QObjectPrivate::~QObjectPrivate() { if (extraData && !extraData->runningTimers.isEmpty()) { // unregister pending timers - if (threadData->eventDispatcher) - threadData->eventDispatcher->unregisterTimers(q_ptr); + if (threadData->eventDispatcher.load()) + threadData->eventDispatcher.load()->unregisterTimers(q_ptr); // release the timer ids back to the pool for (int i = 0; i < extraData->runningTimers.size(); ++i) @@ -1074,7 +1074,7 @@ bool QObject::event(QEvent *e) case QEvent::ThreadChange: { Q_D(QObject); QThreadData *threadData = d->threadData; - QAbstractEventDispatcher *eventDispatcher = threadData->eventDispatcher; + QAbstractEventDispatcher *eventDispatcher = threadData->eventDispatcher.load(); if (eventDispatcher) { QList<QAbstractEventDispatcher::TimerInfo> timers = eventDispatcher->registeredTimers(this); if (!timers.isEmpty()) { @@ -1354,9 +1354,9 @@ void QObjectPrivate::setThreadData_helper(QThreadData *currentData, QThreadData ++eventsMoved; } } - if (eventsMoved > 0 && targetData->eventDispatcher) { + if (eventsMoved > 0 && targetData->eventDispatcher.load()) { targetData->canWait = false; - targetData->eventDispatcher->wakeUp(); + targetData->eventDispatcher.load()->wakeUp(); } // the current emitting thread shouldn't restore currentSender after calling moveToThread() @@ -1379,7 +1379,7 @@ void QObjectPrivate::_q_reregisterTimers(void *pointer) { Q_Q(QObject); QList<QAbstractEventDispatcher::TimerInfo> *timerList = reinterpret_cast<QList<QAbstractEventDispatcher::TimerInfo> *>(pointer); - QAbstractEventDispatcher *eventDispatcher = threadData->eventDispatcher; + QAbstractEventDispatcher *eventDispatcher = threadData->eventDispatcher.load(); for (int i = 0; i < timerList->size(); ++i) { const QAbstractEventDispatcher::TimerInfo &ti = timerList->at(i); eventDispatcher->registerTimer(ti.timerId, ti.interval, ti.timerType, q); @@ -1438,11 +1438,11 @@ int QObject::startTimer(int interval, Qt::TimerType timerType) return 0; } - if (!d->threadData->eventDispatcher) { + if (!d->threadData->eventDispatcher.load()) { qWarning("QObject::startTimer: QTimer can only be used with threads started with QThread"); return 0; } - int timerId = d->threadData->eventDispatcher->registerTimer(interval, timerType, this); + int timerId = d->threadData->eventDispatcher.load()->registerTimer(interval, timerType, this); if (!d->extraData) d->extraData = new QObjectPrivate::ExtraData; d->extraData->runningTimers.append(timerId); @@ -1472,8 +1472,8 @@ void QObject::killTimer(int id) return; } - if (d->threadData->eventDispatcher) - d->threadData->eventDispatcher->unregisterTimer(id); + if (d->threadData->eventDispatcher.load()) + d->threadData->eventDispatcher.load()->unregisterTimer(id); d->extraData->runningTimers.remove(at); QAbstractEventDispatcherPrivate::releaseTimerId(id); diff --git a/src/corelib/kernel/qsocketnotifier.cpp b/src/corelib/kernel/qsocketnotifier.cpp index ad687491f1..e0c7f171c3 100644 --- a/src/corelib/kernel/qsocketnotifier.cpp +++ b/src/corelib/kernel/qsocketnotifier.cpp @@ -187,10 +187,10 @@ QSocketNotifier::QSocketNotifier(qintptr socket, Type type, QObject *parent) d->sntype = type; d->snenabled = true; - if (!d->threadData->eventDispatcher) { + if (!d->threadData->eventDispatcher.load()) { qWarning("QSocketNotifier: Can only be used with threads started with QThread"); } else { - d->threadData->eventDispatcher->registerSocketNotifier(this); + d->threadData->eventDispatcher.load()->registerSocketNotifier(this); } } @@ -273,12 +273,12 @@ void QSocketNotifier::setEnabled(bool enable) return; d->snenabled = enable; - if (!d->threadData->eventDispatcher) // perhaps application/thread is shutting down + if (!d->threadData->eventDispatcher.load()) // perhaps application/thread is shutting down return; if (d->snenabled) - d->threadData->eventDispatcher->registerSocketNotifier(this); + d->threadData->eventDispatcher.load()->registerSocketNotifier(this); else - d->threadData->eventDispatcher->unregisterSocketNotifier(this); + d->threadData->eventDispatcher.load()->unregisterSocketNotifier(this); } diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp index ed1a8a4974..c1bb460e7b 100644 --- a/src/corelib/kernel/qvariant.cpp +++ b/src/corelib/kernel/qvariant.cpp @@ -1940,9 +1940,10 @@ inline T qVariantToHelper(const QVariant::Private &d, const HandlersManager &han /*! \fn QStringList QVariant::toStringList() const - Returns the variant as a QStringList if the variant has type() - StringList, \l String, or \l List of a type that can be converted - to QString; otherwise returns an empty list. + Returns the variant as a QStringList if the variant has userType() + \l QMetaType::QStringList, \l QMetaType::QString, or + \l QMetaType::QVariantList of a type that can be converted to QString; + otherwise returns an empty list. \sa canConvert(), convert() */ @@ -1952,10 +1953,12 @@ QStringList QVariant::toStringList() const } /*! - Returns the variant as a QString if the variant has type() \l - String, \l Bool, \l ByteArray, \l Char, \l Date, \l DateTime, \l - Double, \l Int, \l LongLong, \l StringList, \l Time, \l UInt, or - \l ULongLong; otherwise returns an empty string. + Returns the variant as a QString if the variant has userType() \l + QMetaType::QString, \l QMetaType::Bool, \l QMetaType::QByteArray, + \l QMetaType::QChar, \l QMetaType::QDate, \l QMetaType::QDateTime, + \l QMetaType::Double, \l QMetaType::Int, \l QMetaType::LongLong, + \l QMetaType::QStringList, \l QMetaType::QTime, \l QMetaType::UInt, or + \l QMetaType::ULongLong; otherwise returns an empty string. \sa canConvert(), convert() */ @@ -1966,7 +1969,7 @@ QString QVariant::toString() const /*! Returns the variant as a QMap<QString, QVariant> if the variant - has type() \l Map; otherwise returns an empty map. + has type() \l QMetaType::QVariantMap; otherwise returns an empty map. \sa canConvert(), convert() */ @@ -1977,7 +1980,7 @@ QVariantMap QVariant::toMap() const /*! Returns the variant as a QHash<QString, QVariant> if the variant - has type() \l Hash; otherwise returns an empty map. + has type() \l QMetaType::QVariantHash; otherwise returns an empty map. \sa canConvert(), convert() */ @@ -1989,11 +1992,12 @@ QVariantHash QVariant::toHash() const /*! \fn QDate QVariant::toDate() const - Returns the variant as a QDate if the variant has type() \l Date, - \l DateTime, or \l String; otherwise returns an invalid date. + Returns the variant as a QDate if the variant has userType() + \l QMetaType::QDate, \l QMetaType::QDateTime, or \l QMetaType::QString; + otherwise returns an invalid date. - If the type() is \l String, an invalid date will be returned if the - string cannot be parsed as a Qt::ISODate format date. + If the type() is \l QMetaType::QString, an invalid date will be returned if + the string cannot be parsed as a Qt::ISODate format date. \sa canConvert(), convert() */ @@ -2005,10 +2009,11 @@ QDate QVariant::toDate() const /*! \fn QTime QVariant::toTime() const - Returns the variant as a QTime if the variant has type() \l Time, - \l DateTime, or \l String; otherwise returns an invalid time. + Returns the variant as a QTime if the variant has userType() + \l QMetaType::QTime, \l QMetaType::QDateTime, or \l QMetaType::QString; + otherwise returns an invalid time. - If the type() is \l String, an invalid time will be returned if + If the type() is \l QMetaType::QString, an invalid time will be returned if the string cannot be parsed as a Qt::ISODate format time. \sa canConvert(), convert() @@ -2021,12 +2026,12 @@ QTime QVariant::toTime() const /*! \fn QDateTime QVariant::toDateTime() const - Returns the variant as a QDateTime if the variant has type() \l - DateTime, \l Date, or \l String; otherwise returns an invalid - date/time. + Returns the variant as a QDateTime if the variant has userType() + \l QMetaType::QDateTime, \l QMetaType::QDate, or \l QMetaType::QString; + otherwise returns an invalid date/time. - If the type() is \l String, an invalid date/time will be returned - if the string cannot be parsed as a Qt::ISODate format date/time. + If the type() is \l QMetaType::QString, an invalid date/time will be + returned if the string cannot be parsed as a Qt::ISODate format date/time. \sa canConvert(), convert() */ @@ -2039,8 +2044,8 @@ QDateTime QVariant::toDateTime() const \since 4.7 \fn QEasingCurve QVariant::toEasingCurve() const - Returns the variant as a QEasingCurve if the variant has type() \l - EasingCurve; otherwise returns a default easing curve. + Returns the variant as a QEasingCurve if the variant has userType() + \l QMetaType::QEasingCurve; otherwise returns a default easing curve. \sa canConvert(), convert() */ @@ -2054,9 +2059,9 @@ QEasingCurve QVariant::toEasingCurve() const /*! \fn QByteArray QVariant::toByteArray() const - Returns the variant as a QByteArray if the variant has type() \l - ByteArray or \l String (converted using QString::fromUtf8()); - otherwise returns an empty byte array. + Returns the variant as a QByteArray if the variant has userType() + \l QMetaType::QByteArray or \l QMetaType::QString (converted using + QString::fromUtf8()); otherwise returns an empty byte array. \sa canConvert(), convert() */ @@ -2069,8 +2074,9 @@ QByteArray QVariant::toByteArray() const /*! \fn QPoint QVariant::toPoint() const - Returns the variant as a QPoint if the variant has type() - \l Point or \l PointF; otherwise returns a null QPoint. + Returns the variant as a QPoint if the variant has userType() + \l QMetaType::QPointF or \l QMetaType::QPointF; otherwise returns a null + QPoint. \sa canConvert(), convert() */ @@ -2082,8 +2088,8 @@ QPoint QVariant::toPoint() const /*! \fn QRect QVariant::toRect() const - Returns the variant as a QRect if the variant has type() \l Rect; - otherwise returns an invalid QRect. + Returns the variant as a QRect if the variant has userType() + \l QMetaType::QRect; otherwise returns an invalid QRect. \sa canConvert(), convert() */ @@ -2095,8 +2101,8 @@ QRect QVariant::toRect() const /*! \fn QSize QVariant::toSize() const - Returns the variant as a QSize if the variant has type() \l Size; - otherwise returns an invalid QSize. + Returns the variant as a QSize if the variant has userType() + \l QMetaType::QSize; otherwise returns an invalid QSize. \sa canConvert(), convert() */ @@ -2108,8 +2114,8 @@ QSize QVariant::toSize() const /*! \fn QSizeF QVariant::toSizeF() const - Returns the variant as a QSizeF if the variant has type() \l - SizeF; otherwise returns an invalid QSizeF. + Returns the variant as a QSizeF if the variant has userType() \l + QMetaType::QSizeF; otherwise returns an invalid QSizeF. \sa canConvert(), convert() */ @@ -2121,8 +2127,9 @@ QSizeF QVariant::toSizeF() const /*! \fn QRectF QVariant::toRectF() const - Returns the variant as a QRectF if the variant has type() \l Rect - or \l RectF; otherwise returns an invalid QRectF. + Returns the variant as a QRectF if the variant has userType() + \l QMetaType::QRect or \l QMetaType::QRectF; otherwise returns an invalid + QRectF. \sa canConvert(), convert() */ @@ -2134,8 +2141,8 @@ QRectF QVariant::toRectF() const /*! \fn QLineF QVariant::toLineF() const - Returns the variant as a QLineF if the variant has type() \l - LineF; otherwise returns an invalid QLineF. + Returns the variant as a QLineF if the variant has userType() + \l QMetaType::QLineF; otherwise returns an invalid QLineF. \sa canConvert(), convert() */ @@ -2147,8 +2154,8 @@ QLineF QVariant::toLineF() const /*! \fn QLine QVariant::toLine() const - Returns the variant as a QLine if the variant has type() \l Line; - otherwise returns an invalid QLine. + Returns the variant as a QLine if the variant has userType() + \l QMetaType::QLine; otherwise returns an invalid QLine. \sa canConvert(), convert() */ @@ -2160,8 +2167,9 @@ QLine QVariant::toLine() const /*! \fn QPointF QVariant::toPointF() const - Returns the variant as a QPointF if the variant has type() \l - Point or \l PointF; otherwise returns a null QPointF. + Returns the variant as a QPointF if the variant has userType() \l + QMetaType::QPoint or \l QMetaType::QPointF; otherwise returns a null + QPointF. \sa canConvert(), convert() */ @@ -2176,8 +2184,8 @@ QPointF QVariant::toPointF() const /*! \fn QUrl QVariant::toUrl() const - Returns the variant as a QUrl if the variant has type() - \l Url; otherwise returns an invalid QUrl. + Returns the variant as a QUrl if the variant has userType() + \l QMetaType::QUrl; otherwise returns an invalid QUrl. \sa canConvert(), convert() */ @@ -2190,8 +2198,8 @@ QUrl QVariant::toUrl() const /*! \fn QLocale QVariant::toLocale() const - Returns the variant as a QLocale if the variant has type() - \l Locale; otherwise returns an invalid QLocale. + Returns the variant as a QLocale if the variant has userType() + \l QMetaType::QLocale; otherwise returns an invalid QLocale. \sa canConvert(), convert() */ @@ -2204,8 +2212,8 @@ QLocale QVariant::toLocale() const \fn QRegExp QVariant::toRegExp() const \since 4.1 - Returns the variant as a QRegExp if the variant has type() \l - RegExp; otherwise returns an empty QRegExp. + Returns the variant as a QRegExp if the variant has userType() + \l QMetaType::QRegExp; otherwise returns an empty QRegExp. \sa canConvert(), convert() */ @@ -2221,7 +2229,7 @@ QRegExp QVariant::toRegExp() const \fn QRegularExpression QVariant::toRegularExpression() const \since 5.0 - Returns the variant as a QRegularExpression if the variant has type() \l + Returns the variant as a QRegularExpression if the variant has userType() \l QRegularExpression; otherwise returns an empty QRegularExpression. \sa canConvert(), convert() @@ -2236,7 +2244,7 @@ QRegularExpression QVariant::toRegularExpression() const /*! \since 5.0 - Returns the variant as a QUuid if the variant has type() \l + Returns the variant as a QUuid if the variant has userType() \l QUuid; otherwise returns a default constructed QUuid. \sa canConvert(), convert() @@ -2249,7 +2257,7 @@ QUuid QVariant::toUuid() const /*! \since 5.0 - Returns the variant as a QModelIndex if the variant has type() \l + Returns the variant as a QModelIndex if the variant has userType() \l QModelIndex; otherwise returns a default constructed QModelIndex. \sa canConvert(), convert() @@ -2262,7 +2270,7 @@ QModelIndex QVariant::toModelIndex() const /*! \since 5.0 - Returns the variant as a QJsonValue if the variant has type() \l + Returns the variant as a QJsonValue if the variant has userType() \l QJsonValue; otherwise returns a default constructed QJsonValue. \sa canConvert(), convert() @@ -2275,7 +2283,7 @@ QJsonValue QVariant::toJsonValue() const /*! \since 5.0 - Returns the variant as a QJsonObject if the variant has type() \l + Returns the variant as a QJsonObject if the variant has userType() \l QJsonObject; otherwise returns a default constructed QJsonObject. \sa canConvert(), convert() @@ -2288,7 +2296,7 @@ QJsonObject QVariant::toJsonObject() const /*! \since 5.0 - Returns the variant as a QJsonArray if the variant has type() \l + Returns the variant as a QJsonArray if the variant has userType() \l QJsonArray; otherwise returns a default constructed QJsonArray. \sa canConvert(), convert() @@ -2301,7 +2309,7 @@ QJsonArray QVariant::toJsonArray() const /*! \since 5.0 - Returns the variant as a QJsonDocument if the variant has type() \l + Returns the variant as a QJsonDocument if the variant has userType() \l QJsonDocument; otherwise returns a default constructed QJsonDocument. \sa canConvert(), convert() @@ -2315,8 +2323,9 @@ QJsonDocument QVariant::toJsonDocument() const /*! \fn QChar QVariant::toChar() const - Returns the variant as a QChar if the variant has type() \l Char, - \l Int, or \l UInt; otherwise returns an invalid QChar. + Returns the variant as a QChar if the variant has userType() + \l QMetaType::QChar, \l QMetaType::Int, or \l QMetaType::UInt; otherwise + returns an invalid QChar. \sa canConvert(), convert() */ @@ -2326,8 +2335,8 @@ QChar QVariant::toChar() const } /*! - Returns the variant as a QBitArray if the variant has type() - \l BitArray; otherwise returns an empty bit array. + Returns the variant as a QBitArray if the variant has userType() + \l QMetaType::QBitArray; otherwise returns an empty bit array. \sa canConvert(), convert() */ @@ -2353,16 +2362,19 @@ inline T qNumVariantToHelper(const QVariant::Private &d, } /*! - Returns the variant as an int if the variant has type() \l Int, - \l Bool, \l ByteArray, \l Char, \l Double, \l LongLong, \l - String, \l UInt, or \l ULongLong; otherwise returns 0. + Returns the variant as an int if the variant has userType() + \l QMetaType::Int, \l QMetaType::Bool, \l QMetaType::QByteArray, + \l QMetaType::QChar, \l QMetaType::Double, \l QMetaType::LongLong, + \l QMetaType::QString, \l QMetaType::UInt, or \l QMetaType::ULongLong; + otherwise returns 0. If \a ok is non-null: \c{*}\a{ok} is set to true if the value could be converted to an int; otherwise \c{*}\a{ok} is set to false. - \b{Warning:} If the value is convertible to a \l LongLong but is too - large to be represented in an int, the resulting arithmetic overflow will - not be reflected in \a ok. A simple workaround is to use QString::toInt(). + \b{Warning:} If the value is convertible to a \l QMetaType::LongLong but is + too large to be represented in an int, the resulting arithmetic overflow + will not be reflected in \a ok. A simple workaround is to use + QString::toInt(). \sa canConvert(), convert() */ @@ -2372,16 +2384,19 @@ int QVariant::toInt(bool *ok) const } /*! - Returns the variant as an unsigned int if the variant has type() - \l UInt, \l Bool, \l ByteArray, \l Char, \l Double, \l Int, \l - LongLong, \l String, or \l ULongLong; otherwise returns 0. + Returns the variant as an unsigned int if the variant has userType() + \l QMetaType::UInt, \l QMetaType::Bool, \l QMetaType::QByteArray, + \l QMetaType::QChar, \l QMetaType::Double, \l QMetaType::Int, + \l QMetaType::LongLong, \l QMetaType::QString, or \l QMetaType::ULongLong; + otherwise returns 0. If \a ok is non-null: \c{*}\a{ok} is set to true if the value could be converted to an unsigned int; otherwise \c{*}\a{ok} is set to false. - \b{Warning:} If the value is convertible to a \l ULongLong but is too - large to be represented in an unsigned int, the resulting arithmetic overflow will - not be reflected in \a ok. A simple workaround is to use QString::toUInt(). + \b{Warning:} If the value is convertible to a \l QMetaType::ULongLong but is + too large to be represented in an unsigned int, the resulting arithmetic + overflow will not be reflected in \a ok. A simple workaround is to use + QString::toUInt(). \sa canConvert(), convert() */ @@ -2391,9 +2406,11 @@ uint QVariant::toUInt(bool *ok) const } /*! - Returns the variant as a long long int if the variant has type() - \l LongLong, \l Bool, \l ByteArray, \l Char, \l Double, \l Int, - \l String, \l UInt, or \l ULongLong; otherwise returns 0. + Returns the variant as a long long int if the variant has userType() + \l QMetaType::LongLong, \l QMetaType::Bool, \l QMetaType::QByteArray, + \l QMetaType::QChar, \l QMetaType::Double, \l QMetaType::Int, + \l QMetaType::QString, \l QMetaType::UInt, or \l QMetaType::ULongLong; + otherwise returns 0. If \a ok is non-null: \c{*}\c{ok} is set to true if the value could be converted to an int; otherwise \c{*}\c{ok} is set to false. @@ -2407,9 +2424,10 @@ qlonglong QVariant::toLongLong(bool *ok) const /*! Returns the variant as as an unsigned long long int if the - variant has type() \l ULongLong, \l Bool, \l ByteArray, \l Char, - \l Double, \l Int, \l LongLong, \l String, or \l UInt; otherwise - returns 0. + variant has type() \l QMetaType::ULongLong, \l QMetaType::Bool, + \l QMetaType::QByteArray, \l QMetaType::QChar, \l QMetaType::Double, + \l QMetaType::Int, \l QMetaType::LongLong, \l QMetaType::QString, or + \l QMetaType::UInt; otherwise returns 0. If \a ok is non-null: \c{*}\a{ok} is set to true if the value could be converted to an int; otherwise \c{*}\a{ok} is set to false. @@ -2422,13 +2440,14 @@ qulonglong QVariant::toULongLong(bool *ok) const } /*! - Returns the variant as a bool if the variant has type() Bool. + Returns the variant as a bool if the variant has userType() Bool. - Returns true if the variant has type() \l Bool, \l Char, \l Double, - \l Int, \l LongLong, \l UInt, or \l ULongLong and the value is - non-zero, or if the variant has type \l String or \l ByteArray and - its lower-case content is not one of the following: empty, "0" - or "false"; otherwise returns false. + Returns true if the variant has userType() \l QMetaType::Bool, + \l QMetaType::QChar, \l QMetaType::Double, \l QMetaType::Int, + \l QMetaType::LongLong, \l QMetaType::UInt, or \l QMetaType::ULongLong and + the value is non-zero, or if the variant has type \l QMetaType::QString or + \l QMetaType::QByteArray and its lower-case content is not one of the + following: empty, "0" or "false"; otherwise returns false. \sa canConvert(), convert() */ @@ -2444,9 +2463,11 @@ bool QVariant::toBool() const } /*! - Returns the variant as a double if the variant has type() \l - Double, \l QMetaType::Float, \l Bool, \l ByteArray, \l Int, \l LongLong, \l String, \l - UInt, or \l ULongLong; otherwise returns 0.0. + Returns the variant as a double if the variant has userType() + \l QMetaType::Double, \l QMetaType::Float, \l QMetaType::Bool, + \l QMetaType::QByteArray, \l QMetaType::Int, \l QMetaType::LongLong, + \l QMetaType::QString, \l QMetaType::UInt, or \l QMetaType::ULongLong; + otherwise returns 0.0. If \a ok is non-null: \c{*}\a{ok} is set to true if the value could be converted to a double; otherwise \c{*}\a{ok} is set to false. @@ -2459,9 +2480,11 @@ double QVariant::toDouble(bool *ok) const } /*! - Returns the variant as a float if the variant has type() \l - Double, \l QMetaType::Float, \l Bool, \l ByteArray, \l Int, \l LongLong, \l String, \l - UInt, or \l ULongLong; otherwise returns 0.0. + Returns the variant as a float if the variant has userType() + \l QMetaType::Double, \l QMetaType::Float, \l QMetaType::Bool, + \l QMetaType::QByteArray, \l QMetaType::Int, \l QMetaType::LongLong, + \l QMetaType::QString, \l QMetaType::UInt, or \l QMetaType::ULongLong; + otherwise returns 0.0. \since 4.6 @@ -2476,9 +2499,11 @@ float QVariant::toFloat(bool *ok) const } /*! - Returns the variant as a qreal if the variant has type() \l - Double, \l QMetaType::Float, \l Bool, \l ByteArray, \l Int, \l LongLong, \l String, \l - UInt, or \l ULongLong; otherwise returns 0.0. + Returns the variant as a qreal if the variant has userType() + \l QMetaType::Double, \l QMetaType::Float, \l QMetaType::Bool, + \l QMetaType::QByteArray, \l QMetaType::Int, \l QMetaType::LongLong, + \l QMetaType::QString, \l QMetaType::UInt, or \l QMetaType::ULongLong; + otherwise returns 0.0. \since 4.6 @@ -2493,8 +2518,9 @@ qreal QVariant::toReal(bool *ok) const } /*! - Returns the variant as a QVariantList if the variant has type() - \l List or \l StringList; otherwise returns an empty list. + Returns the variant as a QVariantList if the variant has userType() + \l QMetaType::QVariantList or \l QMetaType::QStringList; otherwise returns + an empty list. \sa canConvert(), convert() */ @@ -2633,27 +2659,51 @@ static bool canConvertMetaObject(int fromId, int toId, QObject *fromObject) \table \header \li Type \li Automatically Cast To - \row \li \l Bool \li \l Char, \l Double, \l Int, \l LongLong, \l String, \l UInt, \l ULongLong - \row \li \l ByteArray \li \l Double, \l Int, \l LongLong, \l String, \l UInt, \l ULongLong - \row \li \l Char \li \l Bool, \l Int, \l UInt, \l LongLong, \l ULongLong - \row \li \l Color \li \l String - \row \li \l Date \li \l DateTime, \l String - \row \li \l DateTime \li \l Date, \l String, \l Time - \row \li \l Double \li \l Bool, \l Int, \l LongLong, \l String, \l UInt, \l ULongLong - \row \li \l Font \li \l String - \row \li \l Int \li \l Bool, \l Char, \l Double, \l LongLong, \l String, \l UInt, \l ULongLong - \row \li \l KeySequence \li \l Int, \l String - \row \li \l List \li \l StringList (if the list's items can be converted to strings) - \row \li \l LongLong \li \l Bool, \l ByteArray, \l Char, \l Double, \l Int, \l String, \l UInt, \l ULongLong - \row \li \l Point \li PointF - \row \li \l Rect \li RectF - \row \li \l String \li \l Bool, \l ByteArray, \l Char, \l Color, \l Date, \l DateTime, \l Double, - \l Font, \l Int, \l KeySequence, \l LongLong, \l StringList, \l Time, \l UInt, - \l ULongLong - \row \li \l StringList \li \l List, \l String (if the list contains exactly one item) - \row \li \l Time \li \l String - \row \li \l UInt \li \l Bool, \l Char, \l Double, \l Int, \l LongLong, \l String, \l ULongLong - \row \li \l ULongLong \li \l Bool, \l Char, \l Double, \l Int, \l LongLong, \l String, \l UInt + \row \li \l QMetaType::Bool \li \l QMetaType::QChar, \l QMetaType::Double, + \l QMetaType::Int, \l QMetaType::LongLong, \l QMetaType::QString, + \l QMetaType::UInt, \l QMetaType::ULongLong + \row \li \l QMetaType::QByteArray \li \l QMetaType::Double, + \l QMetaType::Int, \l QMetaType::LongLong, \l QMetaType::QString, + \l QMetaType::UInt, \l QMetaType::ULongLong + \row \li \l QMetaType::QChar \li \l QMetaType::Bool, \l QMetaType::Int, + \l QMetaType::UInt, \l QMetaType::LongLong, \l QMetaType::ULongLong + \row \li \l QMetaType::QColor \li \l QMetaType::QString + \row \li \l QMetaType::QDate \li \l QMetaType::QDateTime, + \l QMetaType::QString + \row \li \l QMetaType::QDateTime \li \l QMetaType::QDate, + \l QMetaType::QString, \l QMetaType::QTime + \row \li \l QMetaType::Double \li \l QMetaType::Bool, \l QMetaType::Int, + \l QMetaType::LongLong, \l QMetaType::QString, \l QMetaType::UInt, + \l QMetaType::ULongLong + \row \li \l QMetaType::QFont \li \l QMetaType::QString + \row \li \l QMetaType::Int \li \l QMetaType::Bool, \l QMetaType::QChar, + \l QMetaType::Double, \l QMetaType::LongLong, \l QMetaType::QString, + \l QMetaType::UInt, \l QMetaType::ULongLong + \row \li \l QMetaType::QKeySequence \li \l QMetaType::Int, + \l QMetaType::QString + \row \li \l QMetaType::QVariantList \li \l QMetaType::QStringList (if the + list's items can be converted to QStrings) + \row \li \l QMetaType::LongLong \li \l QMetaType::Bool, + \l QMetaType::QByteArray, \l QMetaType::QChar, \l QMetaType::Double, + \l QMetaType::Int, \l QMetaType::QString, \l QMetaType::UInt, + \l QMetaType::ULongLong + \row \li \l QMetaType::QPoint \li QMetaType::QPointF + \row \li \l QMetaType::QRect \li QMetaType::QRectF + \row \li \l QMetaType::QString \li \l QMetaType::Bool, + \l QMetaType::QByteArray, \l QMetaType::QChar, \l QMetaType::QColor, + \l QMetaType::QDate, \l QMetaType::QDateTime, \l QMetaType::Double, + \l QMetaType::QFont, \l QMetaType::Int, \l QMetaType::QKeySequence, + \l QMetaType::LongLong, \l QMetaType::QStringList, \l QMetaType::QTime, + \l QMetaType::UInt, \l QMetaType::ULongLong + \row \li \l QMetaType::QStringList \li \l QMetaType::QVariantList, + \l QMetaType::QString (if the list contains exactly one item) + \row \li \l QMetaType::QTime \li \l QMetaType::QString + \row \li \l QMetaType::UInt \li \l QMetaType::Bool, \l QMetaType::QChar, + \l QMetaType::Double, \l QMetaType::Int, \l QMetaType::LongLong, + \l QMetaType::QString, \l QMetaType::ULongLong + \row \li \l QMetaType::ULongLong \li \l QMetaType::Bool, + \l QMetaType::QChar, \l QMetaType::Double, \l QMetaType::Int, + \l QMetaType::LongLong, \l QMetaType::QString, \l QMetaType::UInt \endtable A QVariant containing a pointer to a type derived from QObject will also return true for this diff --git a/src/corelib/kernel/qwineventnotifier.cpp b/src/corelib/kernel/qwineventnotifier.cpp index f24843dc4a..242702b304 100644 --- a/src/corelib/kernel/qwineventnotifier.cpp +++ b/src/corelib/kernel/qwineventnotifier.cpp @@ -135,7 +135,7 @@ QWinEventNotifier::QWinEventNotifier(HANDLE hEvent, QObject *parent) : QObject(*new QWinEventNotifierPrivate(hEvent, false), parent) { Q_D(QWinEventNotifier); - QAbstractEventDispatcher *eventDispatcher = d->threadData->eventDispatcher; + QAbstractEventDispatcher *eventDispatcher = d->threadData->eventDispatcher.load(); if (!eventDispatcher) { qWarning("QWinEventNotifier: Can only be used with threads started with QThread"); } else { @@ -208,7 +208,7 @@ void QWinEventNotifier::setEnabled(bool enable) return; d->enabled = enable; - QAbstractEventDispatcher *eventDispatcher = d->threadData->eventDispatcher; + QAbstractEventDispatcher *eventDispatcher = d->threadData->eventDispatcher.load(); if (!eventDispatcher) // perhaps application is shutting down return; diff --git a/src/corelib/plugin/qplugin.qdoc b/src/corelib/plugin/qplugin.qdoc index 74c4289017..eacfe995ae 100644 --- a/src/corelib/plugin/qplugin.qdoc +++ b/src/corelib/plugin/qplugin.qdoc @@ -43,7 +43,7 @@ to the interface class called \a ClassName. The \a Identifier must be unique. For example: - \snippet tools/plugandpaint/interfaces.h 3 + \snippet plugins/interfaces.h 3 This macro is normally used right after the class definition for \a ClassName, in a header file. See the diff --git a/src/corelib/thread/qthread.cpp b/src/corelib/thread/qthread.cpp index dd4d4e74ae..4d5bee3154 100644 --- a/src/corelib/thread/qthread.cpp +++ b/src/corelib/thread/qthread.cpp @@ -593,6 +593,16 @@ void QThread::run() \sa Priority, priority(), start() */ +void QThread::setPriority(Priority priority) +{ + Q_D(QThread); + QMutexLocker locker(&d->mutex); + if (!d->running) { + qWarning("QThread::setPriority: Cannot set priority, thread is not running"); + return; + } + d->setPriority(priority); +} /*! \since 4.1 @@ -752,7 +762,7 @@ QThread::QThread(QThreadPrivate &dd, QObject *parent) QAbstractEventDispatcher *QThread::eventDispatcher() const { Q_D(const QThread); - return d->data->eventDispatcher; + return d->data->eventDispatcher.load(); } /*! @@ -767,7 +777,7 @@ QAbstractEventDispatcher *QThread::eventDispatcher() const void QThread::setEventDispatcher(QAbstractEventDispatcher *eventDispatcher) { Q_D(QThread); - if (d->data->eventDispatcher != 0) { + if (d->data->hasEventDispatcher()) { qWarning("QThread::setEventDispatcher: An event dispatcher has already been created for this thread"); } else { eventDispatcher->moveToThread(this); diff --git a/src/corelib/thread/qthread_p.h b/src/corelib/thread/qthread_p.h index 2cf988260f..9d773b3c1c 100644 --- a/src/corelib/thread/qthread_p.h +++ b/src/corelib/thread/qthread_p.h @@ -142,6 +142,8 @@ public: QThreadPrivate(QThreadData *d = 0); ~QThreadPrivate(); + void setPriority(QThread::Priority prio); + mutable QMutex mutex; QAtomicInt quitLockRef; @@ -230,12 +232,20 @@ public: void ref(); void deref(); + inline bool hasEventDispatcher() const + { return eventDispatcher.load() != 0; } + + bool canWaitLocked() + { + QMutexLocker locker(&postEventList.mutex); + return canWait; + } QThread *thread; Qt::HANDLE threadId; bool quitNow; int loopLevel; - QAbstractEventDispatcher *eventDispatcher; + QAtomicPointer<QAbstractEventDispatcher> eventDispatcher; QStack<QEventLoop *> eventLoops; QPostEventList postEventList; bool canWait; diff --git a/src/corelib/thread/qthread_unix.cpp b/src/corelib/thread/qthread_unix.cpp index 44ad8d3ac2..f123e1813b 100644 --- a/src/corelib/thread/qthread_unix.cpp +++ b/src/corelib/thread/qthread_unix.cpp @@ -258,19 +258,19 @@ typedef void*(*QtThreadCallback)(void*); void QThreadPrivate::createEventDispatcher(QThreadData *data) { #if defined(Q_OS_BLACKBERRY) - data->eventDispatcher = new QEventDispatcherBlackberry; + data->eventDispatcher.storeRelease(new QEventDispatcherBlackberry); #else #if !defined(QT_NO_GLIB) if (qEnvironmentVariableIsEmpty("QT_NO_GLIB") && qEnvironmentVariableIsEmpty("QT_NO_THREADED_GLIB") && QEventDispatcherGlib::versionSupported()) - data->eventDispatcher = new QEventDispatcherGlib; + data->eventDispatcher.storeRelease(new QEventDispatcherGlib); else #endif - data->eventDispatcher = new QEventDispatcherUNIX; + data->eventDispatcher.storeRelease(new QEventDispatcherUNIX); #endif - data->eventDispatcher->startingUp(); + data->eventDispatcher.load()->startingUp(); } #ifndef QT_NO_THREAD @@ -300,22 +300,23 @@ void *QThreadPrivate::start(void *arg) QThread *thr = reinterpret_cast<QThread *>(arg); QThreadData *data = QThreadData::get2(thr); - // do we need to reset the thread priority? - if (int(thr->d_func()->priority) & ThreadPriorityResetFlag) { - thr->setPriority(QThread::Priority(thr->d_func()->priority & ~ThreadPriorityResetFlag)); - } - - data->threadId = (Qt::HANDLE)pthread_self(); - set_thread_data(data); - - data->ref(); { QMutexLocker locker(&thr->d_func()->mutex); + + // do we need to reset the thread priority? + if (int(thr->d_func()->priority) & ThreadPriorityResetFlag) { + thr->d_func()->setPriority(QThread::Priority(thr->d_func()->priority & ~ThreadPriorityResetFlag)); + } + + data->threadId = (Qt::HANDLE)pthread_self(); + set_thread_data(data); + + data->ref(); data->quitNow = thr->d_func()->exited; } - if (data->eventDispatcher) // custom event dispatcher set? - data->eventDispatcher->startingUp(); + if (data->eventDispatcher.load()) // custom event dispatcher set? + data->eventDispatcher.load()->startingUp(); else createEventDispatcher(data); @@ -358,7 +359,7 @@ void QThreadPrivate::finish(void *arg) QThreadStorageData::finish((void **)data); locker.relock(); - QAbstractEventDispatcher *eventDispatcher = d->data->eventDispatcher; + QAbstractEventDispatcher *eventDispatcher = d->data->eventDispatcher.load(); if (eventDispatcher) { d->data->eventDispatcher = 0; locker.unlock(); @@ -687,16 +688,10 @@ void QThread::setTerminationEnabled(bool enabled) #endif } -void QThread::setPriority(Priority priority) +// Caller must lock the mutex +void QThreadPrivate::setPriority(QThread::Priority threadPriority) { - Q_D(QThread); - QMutexLocker locker(&d->mutex); - if (!d->running) { - qWarning("QThread::setPriority: Cannot set priority, thread is not running"); - return; - } - - d->priority = priority; + priority = threadPriority; // copied from start() with a few modifications: @@ -704,7 +699,7 @@ void QThread::setPriority(Priority priority) int sched_policy; sched_param param; - if (pthread_getschedparam(d->thread_id, &sched_policy, ¶m) != 0) { + if (pthread_getschedparam(thread_id, &sched_policy, ¶m) != 0) { // failed to get the scheduling policy, don't bother setting // the priority qWarning("QThread::setPriority: Cannot get scheduler parameters"); @@ -720,15 +715,15 @@ void QThread::setPriority(Priority priority) } param.sched_priority = prio; - int status = pthread_setschedparam(d->thread_id, sched_policy, ¶m); + int status = pthread_setschedparam(thread_id, sched_policy, ¶m); # ifdef SCHED_IDLE // were we trying to set to idle priority and failed? if (status == -1 && sched_policy == SCHED_IDLE && errno == EINVAL) { // reset to lowest priority possible - pthread_getschedparam(d->thread_id, &sched_policy, ¶m); + pthread_getschedparam(thread_id, &sched_policy, ¶m); param.sched_priority = sched_get_priority_min(sched_policy); - pthread_setschedparam(d->thread_id, sched_policy, ¶m); + pthread_setschedparam(thread_id, sched_policy, ¶m); } # else Q_UNUSED(status); diff --git a/src/corelib/thread/qthread_win.cpp b/src/corelib/thread/qthread_win.cpp index 0cf903bb3a..a0fac8eff2 100644 --- a/src/corelib/thread/qthread_win.cpp +++ b/src/corelib/thread/qthread_win.cpp @@ -306,8 +306,9 @@ void qt_set_thread_name(HANDLE threadId, LPCSTR threadName) void QThreadPrivate::createEventDispatcher(QThreadData *data) { - data->eventDispatcher = new QEventDispatcherWin32; - data->eventDispatcher->startingUp(); + QEventDispatcherWin32 *theEventDispatcher = new QEventDispatcherWin32; + data->eventDispatcher.storeRelease(theEventDispatcher); + theEventDispatcher->startingUp(); } #ifndef QT_NO_THREAD @@ -328,8 +329,8 @@ unsigned int __stdcall QT_ENSURE_STACK_ALIGNED_FOR_SSE QThreadPrivate::start(voi data->quitNow = thr->d_func()->exited; } - if (data->eventDispatcher) // custom event dispatcher set? - data->eventDispatcher->startingUp(); + if (data->eventDispatcher.load()) // custom event dispatcher set? + data->eventDispatcher.load()->startingUp(); else createEventDispatcher(data); @@ -364,7 +365,7 @@ void QThreadPrivate::finish(void *arg, bool lockAnyway) QThreadStorageData::finish(tls_data); locker.relock(); - QAbstractEventDispatcher *eventDispatcher = d->data->eventDispatcher; + QAbstractEventDispatcher *eventDispatcher = d->data->eventDispatcher.load(); if (eventDispatcher) { d->data->eventDispatcher = 0; locker.unlock(); @@ -587,55 +588,49 @@ void QThread::setTerminationEnabled(bool enabled) } } -void QThread::setPriority(Priority priority) +// Caller must hold the mutex +void QThreadPrivate::setPriority(QThread::Priority threadPriority) { - Q_D(QThread); - QMutexLocker locker(&d->mutex); - if (!d->running) { - qWarning("QThread::setPriority: Cannot set priority, thread is not running"); - return; - } - // copied from start() with a few modifications: int prio; - d->priority = priority; - switch (d->priority) { - case IdlePriority: + priority = threadPriority; + switch (priority) { + case QThread::IdlePriority: prio = THREAD_PRIORITY_IDLE; break; - case LowestPriority: + case QThread::LowestPriority: prio = THREAD_PRIORITY_LOWEST; break; - case LowPriority: + case QThread::LowPriority: prio = THREAD_PRIORITY_BELOW_NORMAL; break; - case NormalPriority: + case QThread::NormalPriority: prio = THREAD_PRIORITY_NORMAL; break; - case HighPriority: + case QThread::HighPriority: prio = THREAD_PRIORITY_ABOVE_NORMAL; break; - case HighestPriority: + case QThread::HighestPriority: prio = THREAD_PRIORITY_HIGHEST; break; - case TimeCriticalPriority: + case QThread::TimeCriticalPriority: prio = THREAD_PRIORITY_TIME_CRITICAL; break; - case InheritPriority: + case QThread::InheritPriority: default: qWarning("QThread::setPriority: Argument cannot be InheritPriority"); return; } - if (!SetThreadPriority(d->handle, prio)) { + if (!SetThreadPriority(handle, prio)) { qErrnoWarning("QThread::setPriority: Failed to set thread priority"); } } diff --git a/src/corelib/tools/qbytearraymatcher.cpp b/src/corelib/tools/qbytearraymatcher.cpp index 59d7629c27..bcd6a56aad 100644 --- a/src/corelib/tools/qbytearraymatcher.cpp +++ b/src/corelib/tools/qbytearraymatcher.cpp @@ -164,6 +164,7 @@ QByteArrayMatcher::QByteArrayMatcher(const QByteArrayMatcher &other) */ QByteArrayMatcher::~QByteArrayMatcher() { + Q_UNUSED(d); } /*! diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp index 31c870b012..07b617ee2e 100644 --- a/src/corelib/tools/qdatetime.cpp +++ b/src/corelib/tools/qdatetime.cpp @@ -260,8 +260,7 @@ static QString fmtDateTime(const QString& f, const QTime* dt = 0, const QDate* d If the specified date is invalid, the date is not set and isValid() returns false. - \warning Years 0 to 99 are interpreted as is, i.e., years - 0-99. + \warning Years 1 to 99 are interpreted as is. Year 0 is invalid. \sa isValid() */ @@ -1483,10 +1482,7 @@ int QTime::msec() const If \a format is Qt::ISODate, the string format corresponds to the ISO 8601 extended specification for representations of dates, - which is also HH:MM:SS. (However, contrary to ISO 8601, dates - before 15 October 1582 are handled as Julian dates, not Gregorian - dates. See \l{QDate G and J} {Use of Gregorian and Julian - Calendars}. This might change in a future version of Qt.) + which is also HH:MM:SS. If the \a format is Qt::SystemLocaleShortDate or Qt::SystemLocaleLongDate, the string format depends on the locale @@ -1555,9 +1551,9 @@ QString QTime::toString(Qt::DateFormat format) const \row \li z \li the milliseconds without leading zeroes (0 to 999) \row \li zzz \li the milliseconds with leading zeroes (000 to 999) \row \li AP or A - \li use AM/PM display. \e AP will be replaced by either "AM" or "PM". + \li use AM/PM display. \e A/AP will be replaced by either "AM" or "PM". \row \li ap or a - \li use am/pm display. \e ap will be replaced by either "am" or "pm". + \li use am/pm display. \e a/ap will be replaced by either "am" or "pm". \row \li t \li the timezone (for example "CEST") \endtable @@ -3754,8 +3750,7 @@ static bool hasUnquotedAP(const QString &f) for (int i=0; i<max; ++i) { if (f.at(i) == quote) { inquote = !inquote; - } else if (!inquote && f.at(i).toUpper() == QLatin1Char('A') - && i + 1 < max && f.at(i + 1).toUpper() == QLatin1Char('P')) { + } else if (!inquote && f.at(i).toUpper() == QLatin1Char('A')) { return true; } } diff --git a/src/corelib/tools/qlist.cpp b/src/corelib/tools/qlist.cpp index 49f5ae4210..760c944c29 100644 --- a/src/corelib/tools/qlist.cpp +++ b/src/corelib/tools/qlist.cpp @@ -511,7 +511,8 @@ void **QListData::erase(void **xi) Construct a list from the std::initializer_list specified by \a args. - This constructor is only enabled if the compiler supports C++0x + This constructor is only enabled if the compiler supports C++11 initializer + lists. */ /*! \fn QList::~QList() diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp index 63028cff66..21a01c4867 100644 --- a/src/corelib/tools/qlocale.cpp +++ b/src/corelib/tools/qlocale.cpp @@ -736,13 +736,13 @@ QLocale::QLocale(QLocalePrivate &dd) The separator can be either underscore or a minus sign. If the string violates the locale format, or language is not - a valid ISO 369 code, the "C" locale is used instead. If country + a valid ISO 639 code, the "C" locale is used instead. If country is not present, or is not a valid ISO 3166 code, the most appropriate country is chosen for the specified language. The language, script and country codes are converted to their respective \c Language, \c Script and \c Country enums. After this conversion is - performed the constructor behaves exactly like QLocale(Country, Script, + performed, the constructor behaves exactly like QLocale(Country, Script, Language). This constructor is much slower than QLocale(Country, Script, Language). diff --git a/src/corelib/tools/qlocale_blackberry.cpp b/src/corelib/tools/qlocale_blackberry.cpp index 01576dd732..030ed2184b 100644 --- a/src/corelib/tools/qlocale_blackberry.cpp +++ b/src/corelib/tools/qlocale_blackberry.cpp @@ -67,11 +67,19 @@ QBBSystemLocaleData::QBBSystemLocaleData() , regionNotifier(0) , measurementNotifier(0) , hourNotifier(0) - , languageFd(-1) - , regionFd(-1) - , measurementFd(-1) - , hourFd(-1) { + if ((measurementFd = qt_safe_open(ppsUomPath, O_RDONLY)) == -1) + qWarning("Failed to open uom pps, errno=%d", errno); + + if ((regionFd = qt_safe_open(ppsRegionLocalePath, O_RDONLY)) == -1) + qWarning("Failed to open region pps, errno=%d", errno); + + if ((languageFd = qt_safe_open(ppsLanguageLocalePath, O_RDONLY)) == -1) + qWarning("Failed to open language pps, errno=%d", errno); + + if ((hourFd = qt_safe_open(ppsHourFormatPath, O_RDONLY)) == -1) + qWarning("Failed to open hour format pps, errno=%d", errno); + // we cannot call this directly, because by the time this constructor is // called, the event dispatcher has not yet been created, causing the // subsequent call to QSocketNotifier constructor to fail. @@ -149,41 +157,35 @@ void QBBSystemLocaleData::installSocketNotifiers() void QBBSystemLocaleData::readLangageLocale() { - lc_langage = readPpsValue(ppsLanguageLocalePath, "_CS_LOCALE", &languageFd); + lc_langage = readPpsValue("_CS_LOCALE", languageFd); } void QBBSystemLocaleData::readRegionLocale() { - lc_region = readPpsValue(ppsRegionLocalePath, "region", ®ionFd); + lc_region = readPpsValue("region", regionFd); } void QBBSystemLocaleData::readMeasurementSystem() { - QByteArray measurement = readPpsValue(ppsUomPath, "uom", &measurementFd); + QByteArray measurement = readPpsValue("uom", measurementFd); m_measurementSystem = (qstrcmp(measurement, "imperial") == 0) ? QLocale::ImperialSystem : QLocale::MetricSystem; } void QBBSystemLocaleData::readHourFormat() { - QByteArray hourFormat = readPpsValue(ppsHourFormatPath, "hourFormat", &hourFd); + QByteArray hourFormat = readPpsValue("hourFormat", hourFd); is24HourFormat = (qstrcmp(hourFormat, "24") == 0); } -QByteArray QBBSystemLocaleData::readPpsValue(const char *ppsPath, const char *ppsObject, int *ppsFd) +QByteArray QBBSystemLocaleData::readPpsValue(const char *ppsObject, int ppsFd) { QByteArray result; - if (!ppsPath || !ppsObject) + if (!ppsObject || ppsFd == -1) return result; - *ppsFd = qt_safe_open(ppsPath, O_RDONLY); - if (*ppsFd == -1) { - qWarning("Failed to open Locale pps, errno=%d", errno); - return result; - } - char buffer[ppsBufferSize]; - int bytes = qt_safe_read(*ppsFd, buffer, ppsBufferSize - 1); + int bytes = qt_safe_read(ppsFd, buffer, ppsBufferSize - 1); if (bytes == -1) { qWarning("Failed to read Locale pps, errno=%d", errno); return result; diff --git a/src/corelib/tools/qlocale_blackberry.h b/src/corelib/tools/qlocale_blackberry.h index 8e9560d6c1..67f403a017 100644 --- a/src/corelib/tools/qlocale_blackberry.h +++ b/src/corelib/tools/qlocale_blackberry.h @@ -42,9 +42,9 @@ #ifndef QLOCALE_BLACKBERRY_H #define QLOCALE_BLACKBERRY_H -#include "qsocketnotifier.h" -#include "qreadwritelock.h" -#include "qlocale.h" +#include <QtCore/qsocketnotifier.h> +#include <QtCore/qreadwritelock.h> +#include <QtCore/qlocale.h> QT_BEGIN_NAMESPACE @@ -73,7 +73,7 @@ public Q_SLOTS: void readHourFormat(); private: - QByteArray readPpsValue(const char* ppsPath, const char* ppsObject, int* ppsFd); + QByteArray readPpsValue(const char* ppsObject, int ppsFd); QString getCorrectFormat(const QString &baseFormat, QLocale::FormatType typeFormat); QByteArray lc_langage; diff --git a/src/corelib/tools/qsimd.cpp b/src/corelib/tools/qsimd.cpp index f2cb5e88ee..97a64eb5bb 100644 --- a/src/corelib/tools/qsimd.cpp +++ b/src/corelib/tools/qsimd.cpp @@ -54,7 +54,7 @@ # include <intrin.h> # endif # endif -#elif defined(Q_OS_LINUX) && defined(__arm__) +#elif defined(Q_OS_LINUX) && (defined(Q_PROCESSOR_ARM) || defined(QT_COMPILER_SUPPORTS_IWMMXT) || defined(QT_COMPILER_SUPPORTS_NEON)) #include "private/qcore_unix_p.h" // the kernel header definitions for HWCAP_* diff --git a/src/corelib/tools/qsimd_p.h b/src/corelib/tools/qsimd_p.h index b9d546452f..98eb473da0 100644 --- a/src/corelib/tools/qsimd_p.h +++ b/src/corelib/tools/qsimd_p.h @@ -228,7 +228,7 @@ static const uint qCompilerCpuFeatures = 0 extern Q_CORE_EXPORT QBasicAtomicInt qt_cpu_features; Q_CORE_EXPORT void qDetectCpuFeatures(); -inline uint qCpuFeatures() +static inline uint qCpuFeatures() { int features = qt_cpu_features.load(); if (Q_UNLIKELY(features == 0)) { @@ -239,7 +239,7 @@ inline uint qCpuFeatures() return uint(features); } -inline uint qCpuHasFeature(CPUFeatures feature) +static inline uint qCpuHasFeature(CPUFeatures feature) { return qCompilerCpuFeatures & feature || qCpuFeatures() & feature; } diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index eb8750838b..54b1a084b2 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -2953,7 +2953,7 @@ QString& QString::replace(const QRegExp &rx, const QString &after) QString &QString::replace(const QRegularExpression &re, const QString &after) { if (!re.isValid()) { - qWarning("QString::replace: invalid QRegularExpresssion object"); + qWarning("QString::replace: invalid QRegularExpression object"); return *this; } @@ -3278,7 +3278,7 @@ int QString::count(const QRegExp& rx) const int QString::indexOf(const QRegularExpression& re, int from) const { if (!re.isValid()) { - qWarning("QString::indexOf: invalid QRegularExpresssion object"); + qWarning("QString::indexOf: invalid QRegularExpression object"); return -1; } @@ -3304,7 +3304,7 @@ int QString::indexOf(const QRegularExpression& re, int from) const int QString::lastIndexOf(const QRegularExpression &re, int from) const { if (!re.isValid()) { - qWarning("QString::lastIndexOf: invalid QRegularExpresssion object"); + qWarning("QString::lastIndexOf: invalid QRegularExpression object"); return -1; } @@ -3333,7 +3333,7 @@ int QString::lastIndexOf(const QRegularExpression &re, int from) const bool QString::contains(const QRegularExpression &re) const { if (!re.isValid()) { - qWarning("QString::contains: invalid QRegularExpresssion object"); + qWarning("QString::contains: invalid QRegularExpression object"); return false; } QRegularExpressionMatch match = re.match(*this); @@ -3382,7 +3382,7 @@ bool QString::contains(const QRegularExpression &re, QRegularExpressionMatch *ma int QString::count(const QRegularExpression &re) const { if (!re.isValid()) { - qWarning("QString::count: invalid QRegularExpresssion object"); + qWarning("QString::count: invalid QRegularExpression object"); return 0; } int count = 0; @@ -4128,6 +4128,13 @@ QString::Data *QString::fromAscii_helper(const char *str, int size) \sa toLatin1(), fromUtf8(), fromLocal8Bit() */ +/*! + \fn QString QString::fromLatin1(const QByteArray &str) + \overload + \since 5.0 + + Returns a QString initialized with the Latin-1 string \a str. +*/ /*! \fn QString QString::fromLocal8Bit(const char *str, int size) Returns a QString initialized with the first \a size characters @@ -4140,6 +4147,14 @@ QString::Data *QString::fromAscii_helper(const char *str, int size) \sa toLocal8Bit(), fromLatin1(), fromUtf8() */ + +/*! + \fn QString QString::fromLocal8Bit(const QByteArray &str) + \overload + \since 5.0 + + Returns a QString initialized with the 8-bit string \a str. +*/ QString QString::fromLocal8Bit_helper(const char *str, int size) { if (!str) @@ -4172,6 +4187,15 @@ QString QString::fromLocal8Bit_helper(const char *str, int size) \sa toAscii(), fromLatin1(), fromUtf8(), fromLocal8Bit() */ +/*! + \fn QString QString::fromAscii(const QByteArray &str) + \deprecated + \overload + \since 5.0 + + Returns a QString initialized with the string \a str. +*/ + /*! \fn QString QString::fromUtf8(const char *str, int size) Returns a QString initialized with the first \a size bytes of the UTF-8 string \a str. @@ -4193,6 +4217,14 @@ QString QString::fromLocal8Bit_helper(const char *str, int size) \sa toUtf8(), fromLatin1(), fromLocal8Bit() */ + +/*! + \fn QString QString::fromUtf8(const QByteArray &str) + \overload + \since 5.0 + + Returns a QString initialized with the UTF-8 string \a str. +*/ QString QString::fromUtf8_helper(const char *str, int size) { if (!str) diff --git a/src/corelib/tools/qstringlist.cpp b/src/corelib/tools/qstringlist.cpp index fa2e12b67b..a5559a181b 100644 --- a/src/corelib/tools/qstringlist.cpp +++ b/src/corelib/tools/qstringlist.cpp @@ -738,7 +738,8 @@ int QtPrivate::QStringList_removeDuplicates(QStringList *that) Construct a list from a std::initializer_list given by \a args. - This constructor is only enabled if the compiler supports C++0x + This constructor is only enabled if the compiler supports C++11 initializer + lists. */ diff --git a/src/corelib/tools/qstringmatcher.cpp b/src/corelib/tools/qstringmatcher.cpp index 0aacea4762..d54e9c7ba7 100644 --- a/src/corelib/tools/qstringmatcher.cpp +++ b/src/corelib/tools/qstringmatcher.cpp @@ -198,6 +198,7 @@ QStringMatcher::QStringMatcher(const QStringMatcher &other) */ QStringMatcher::~QStringMatcher() { + Q_UNUSED(d_ptr); } /*! diff --git a/src/corelib/tools/qtextboundaryfinder.cpp b/src/corelib/tools/qtextboundaryfinder.cpp index eb861b7289..7b8fbebb22 100644 --- a/src/corelib/tools/qtextboundaryfinder.cpp +++ b/src/corelib/tools/qtextboundaryfinder.cpp @@ -229,6 +229,7 @@ QTextBoundaryFinder &QTextBoundaryFinder::operator=(const QTextBoundaryFinder &o */ QTextBoundaryFinder::~QTextBoundaryFinder() { + Q_UNUSED(unused); if (freePrivate) free(d); } diff --git a/src/corelib/tools/qvector.cpp b/src/corelib/tools/qvector.cpp index 725cf894c6..a443a6b4e8 100644 --- a/src/corelib/tools/qvector.cpp +++ b/src/corelib/tools/qvector.cpp @@ -230,7 +230,8 @@ Construct a vector from the std::initilizer_list given by \a args. - This constructor is only enabled if the compiler supports C++0x + This constructor is only enabled if the compiler supports C++11 initializer + lists. */ diff --git a/src/corelib/tools/tools.pri b/src/corelib/tools/tools.pri index bb152987e6..40858e5336 100644 --- a/src/corelib/tools/tools.pri +++ b/src/corelib/tools/tools.pri @@ -128,8 +128,19 @@ contains(QT_CONFIG, zlib) { contains(QT_CONFIG,icu) { SOURCES += tools/qlocale_icu.cpp DEFINES += QT_USE_ICU - win32:LIBS_PRIVATE += -licuin -licuuc - else:LIBS_PRIVATE += -licui18n -licuuc + win32 { + CONFIG(static, static|shared) { + CONFIG(debug, debug|release) { + LIBS_PRIVATE += -lsicuind -lsicuucd -lsicudtd + } else { + LIBS_PRIVATE += -lsicuin -lsicuuc -lsicudt + } + } else { + LIBS_PRIVATE += -licuin -licuuc + } + } else { + LIBS_PRIVATE += -licui18n -licuuc + } } pcre { diff --git a/src/gui/QtGui.dynlist b/src/gui/QtGui.dynlist new file mode 100644 index 0000000000..7e15e37845 --- /dev/null +++ b/src/gui/QtGui.dynlist @@ -0,0 +1,5 @@ +{ + extern "C++" { + "QGuiApplication::notify(QObject*, QEvent*)"; + }; +}; diff --git a/src/gui/accessible/qaccessible.cpp b/src/gui/accessible/qaccessible.cpp index 4a998dc4b8..3468ebc8a7 100644 --- a/src/gui/accessible/qaccessible.cpp +++ b/src/gui/accessible/qaccessible.cpp @@ -1349,7 +1349,7 @@ QColor QAccessibleInterface::backgroundColor() const QAccessibleInterface *QAccessibleEvent::accessibleInterface() const { QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(m_object); - if (!iface) { + if (!iface || !iface->isValid()) { static bool hasWarned = false; if (!hasWarned) { qWarning() << "Problem creating accessible interface for: " << m_object << endl diff --git a/src/gui/gui.pro b/src/gui/gui.pro index f21c7a5ce7..14c267df70 100644 --- a/src/gui/gui.pro +++ b/src/gui/gui.pro @@ -35,3 +35,4 @@ include(itemmodels/itemmodels.pri) QMAKE_LIBS += $$QMAKE_LIBS_GUI +QMAKE_DYNAMIC_LIST_FILE = $$PWD/QtGui.dynlist diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp index 6b91ead666..683fe51d2b 100644 --- a/src/gui/image/qicon.cpp +++ b/src/gui/image/qicon.cpp @@ -119,6 +119,25 @@ static void qt_cleanup_icon_cache() qtIconCache()->clear(); } +/*! \internal + + Returns the effective device pixel ratio, using + the provided window pointer if possible. + + if Qt::AA_UseHighDpiPixmaps is not set this function + returns 1.0 to keep non-hihdpi aware code working. +*/ +static qreal qt_effective_device_pixel_ratio(QWindow *window = 0) +{ + if (!qApp->testAttribute(Qt::AA_UseHighDpiPixmaps)) + return qreal(1.0); + + if (window) + return window->devicePixelRatio(); + + return qApp->devicePixelRatio(); // Don't know which window to target. +} + QIconPrivate::QIconPrivate() : engine(0), ref(1), serialNum(serialNumCounter.fetchAndAddRelaxed(1)), @@ -126,6 +145,25 @@ QIconPrivate::QIconPrivate() { } +/*! \internal + Computes the displayDevicePixelRatio for a pixmap. + + If displayDevicePixelRatio is 1.0 the reurned value is 1.0, always. + + For a displayDevicePixelRatio of 2.0 the returned value will be between + 1.0 and 2.0, depending on requestedSize and actualsize: + * If actualsize < requestedSize : 1.0 (not enough pixels for a normal-dpi pixmap) + * If actualsize == requestedSize * 2.0 : 2.0 (enough pixels for a high-dpi pixmap) + * else : a scaled value between 1.0 and 2.0. (pixel count is between normal-dpi and high-dpi) +*/ +qreal QIconPrivate::pixmapDevicePixelRatio(qreal displayDevicePixelRatio, const QSize &requestedSize, const QSize &actualSize) +{ + QSize targetSize = requestedSize * displayDevicePixelRatio; + qreal scale = 0.5 * (qreal(actualSize.width()) / qreal(targetSize.width()) + + qreal(actualSize.height() / qreal(targetSize.height()))); + return qMax(qreal(1.0), displayDevicePixelRatio *scale); +} + QPixmapIconEngine::QPixmapIconEngine() { } @@ -141,10 +179,8 @@ QPixmapIconEngine::~QPixmapIconEngine() void QPixmapIconEngine::paint(QPainter *painter, const QRect &rect, QIcon::Mode mode, QIcon::State state) { - QSize pixmapSize = rect.size(); -#if defined(Q_WS_MAC) - pixmapSize *= qt_mac_get_scalefactor(); -#endif + QSize pixmapSize = rect.size() * qt_effective_device_pixel_ratio(0); + QPixmap px = pixmap(pixmapSize, mode, state); painter->drawPixmap(rect, pixmap(pixmapSize, mode, state)); } @@ -345,6 +381,9 @@ void QPixmapIconEngine::addFile(const QString &fileName, const QSize &_size, QIc } if (pe->size == QSize() && pe->pixmap.isNull()) { pe->pixmap = QPixmap(pe->fileName); + // Reset the devicePixelRatio. The pixmap may be loaded from a @2x file, + // but be used as a 1x pixmap by QIcon. + pe->pixmap.setDevicePixelRatio(1.0); pe->size = pe->pixmap.size(); } if(pe->size == size) { @@ -658,13 +697,17 @@ qint64 QIcon::cacheKey() const state, generating one if necessary. The pixmap might be smaller than requested, but never larger. + Setting the Qt::AA_UseHighDpiPixmaps application attribute enables this + function to return pixmaps that are larger than the requested size. Such + images will have a devicePixelRatio larger than 1. + \sa actualSize(), paint() */ QPixmap QIcon::pixmap(const QSize &size, Mode mode, State state) const { if (!d) return QPixmap(); - return d->engine->pixmap(size, mode, state); + return pixmap(0, size, mode, state); } /*! @@ -674,6 +717,10 @@ QPixmap QIcon::pixmap(const QSize &size, Mode mode, State state) const Returns a pixmap of size QSize(\a w, \a h). The pixmap might be smaller than requested, but never larger. + + Setting the Qt::AA_UseHighDpiPixmaps application attribute enables this + function to return pixmaps that are larger than the requested size. Such + images will have a devicePixelRatio larger than 1. */ /*! @@ -683,11 +730,16 @@ QPixmap QIcon::pixmap(const QSize &size, Mode mode, State state) const Returns a pixmap of size QSize(\a extent, \a extent). The pixmap might be smaller than requested, but never larger. + + Setting the Qt::AA_UseHighDpiPixmaps application attribute enables this + function to return pixmaps that are larger than the requested size. Such + images will have a devicePixelRatio larger than 1. */ /*! Returns the actual size of the icon for the requested \a size, \a mode, and \a state. The result might be smaller than requested, but - never larger. + never larger. The returned size is in device-independent pixels (This + is relevant for high-dpi pixmaps.) \sa pixmap(), paint() */ @@ -695,9 +747,63 @@ QSize QIcon::actualSize(const QSize &size, Mode mode, State state) const { if (!d) return QSize(); - return d->engine->actualSize(size, mode, state); + return actualSize(0, size, mode, state); } +/*! + \since 5.1 + + Returns a pixmap with the requested \a window \a size, \a mode, and \a + state, generating one if necessary. + + The pixmap can be smaller than the requested size. If \a window is on + a high-dpi display the pixmap can be larger. In that case it will have + a devicePixelRatio larger than 1. + + \sa actualSize(), paint() +*/ +QPixmap QIcon::pixmap(QWindow *window, const QSize &size, Mode mode, State state) const +{ + if (!d) + return QPixmap(); + + qreal devicePixelRatio = qt_effective_device_pixel_ratio(window); + + // Handle the simple normal-dpi case: + if (!(devicePixelRatio > 1.0)) + return d->engine->pixmap(size, mode, state); + + // Try get a pixmap that is big enough to be displayed at device pixel resolution. + QPixmap pixmap = d->engine->pixmap(size * devicePixelRatio, mode, state); + pixmap.setDevicePixelRatio(d->pixmapDevicePixelRatio(devicePixelRatio, size, pixmap.size())); + return pixmap; +} + +/*! + \since 5.1 + + Returns the actual size of the icon for the requested \a window \a size, \a + mode, and \a state. + + The pixmap can be smaller than the requested size. The returned size + is in device-independent pixels (This is relevant for high-dpi pixmaps.) + + \sa actualSize(), pixmap(), paint() +*/ +QSize QIcon::actualSize(QWindow *window, const QSize &size, Mode mode, State state) const +{ + if (!d) + return QSize(); + + qreal devicePixelRatio = qt_effective_device_pixel_ratio(window); + + // Handle the simple normal-dpi case: + if (!(devicePixelRatio > 1.0)) + return d->engine->actualSize(size, mode, state); + + QSize actualSize = d->engine->actualSize(size * devicePixelRatio, mode, state); + return actualSize / d->pixmapDevicePixelRatio(devicePixelRatio, size, actualSize); +} /*! Uses the \a painter to paint the icon with specified \a alignment, @@ -946,6 +1052,7 @@ void QIcon::setThemeName(const QString &name) */ QString QIcon::themeName() { + QIconLoader::instance()->ensureInitialized(); return QIconLoader::instance()->themeName(); } diff --git a/src/gui/image/qicon.h b/src/gui/image/qicon.h index cda2360bed..e81bea69d6 100644 --- a/src/gui/image/qicon.h +++ b/src/gui/image/qicon.h @@ -79,8 +79,10 @@ public: { return pixmap(QSize(w, h), mode, state); } inline QPixmap pixmap(int extent, Mode mode = Normal, State state = Off) const { return pixmap(QSize(extent, extent), mode, state); } + QPixmap pixmap(QWindow *window, const QSize &size, Mode mode = Normal, State state = Off) const; QSize actualSize(const QSize &size, Mode mode = Normal, State state = Off) const; + QSize actualSize(QWindow *window, const QSize &size, Mode mode = Normal, State state = Off) const; QString name() const; diff --git a/src/gui/image/qicon_p.h b/src/gui/image/qicon_p.h index 2ddb5872e1..a46cc310ad 100644 --- a/src/gui/image/qicon_p.h +++ b/src/gui/image/qicon_p.h @@ -72,6 +72,8 @@ public: delete engine; } + qreal pixmapDevicePixelRatio(qreal displayDevicePixelRatio, const QSize &requestedSize, const QSize &actualSize); + QIconEngine *engine; QAtomicInt ref; diff --git a/src/gui/image/qpixmap_raster.cpp b/src/gui/image/qpixmap_raster.cpp index 554b31debf..8d5891aae2 100644 --- a/src/gui/image/qpixmap_raster.cpp +++ b/src/gui/image/qpixmap_raster.cpp @@ -239,8 +239,9 @@ QImage QRasterPlatformPixmap::toImage(const QRect &rect) const return image; QRect clipped = rect.intersected(QRect(0, 0, w, h)); - if (d % 8 == 0) - return QImage(image.scanLine(clipped.y()) + clipped.x() * (d / 8), + const uint du = uint(d); + if ((du % 8 == 0) && (((uint(clipped.x()) * du)) % 32 == 0)) + return QImage(image.scanLine(clipped.y()) + clipped.x() * (du / 8), clipped.width(), clipped.height(), image.bytesPerLine(), image.format()); else diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index e9527bdc48..f7b7410278 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -3071,6 +3071,35 @@ QShortcutEvent::~QShortcutEvent() #endif // QT_NO_SHORTCUT #ifndef QT_NO_DEBUG_STREAM + +static inline void formatTouchEvent(QDebug d, const char *name, const QTouchEvent &t) +{ + d << "QTouchEvent(" << name << " states: " << t.touchPointStates(); + const QList<QTouchEvent::TouchPoint> points = t.touchPoints(); + const int size = points.size(); + d << ", " << size << " points: "; + for (int i = 0; i < size; ++i) { + if (i) + d << ", "; + d << points.at(i).pos() << ' ' << points.at(i).rect(); + switch (points.at(i).state()) { + case Qt::TouchPointPressed: + d << " pressed"; + break; + case Qt::TouchPointReleased: + d << " released"; + break; + case Qt::TouchPointMoved: + d << " moved"; + break; + case Qt::TouchPointStationary: + d << " stationary"; + break; + } + } + d << ')'; +} + QDebug operator<<(QDebug dbg, const QEvent *e) { // More useful event output could be added here if (!e) @@ -3337,6 +3366,14 @@ QDebug operator<<(QDebug dbg, const QEvent *e) { case QEvent::UngrabKeyboard: n = "UngrabKeyboard"; break; + case QEvent::TouchBegin: + n = "TouchBegin"; + case QEvent::TouchUpdate: + n = n ? n : "TouchUpdate"; + case QEvent::TouchEnd: + n = n ? n : "TouchEnd"; + formatTouchEvent(dbg.nospace(), n, *static_cast<const QTouchEvent*>(e)); + return dbg.nospace(); case QEvent::ChildAdded: n = n ? n : "ChildAdded"; case QEvent::ChildPolished: n = n ? n : "ChildPolished"; case QEvent::ChildRemoved: n = n ? n : "ChildRemoved"; diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 51d1d76302..a1c9af45b8 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -928,6 +928,8 @@ static bool runningUnderDebugger() void QGuiApplicationPrivate::init() { + QCoreApplicationPrivate::is_app_running = false; // Starting up. + bool doGrabUnderDebugger = false; QList<QByteArray> pluginList; // Get command line params diff --git a/src/gui/kernel/qguiapplication_p.h b/src/gui/kernel/qguiapplication_p.h index 13b5952e73..22d95b2121 100644 --- a/src/gui/kernel/qguiapplication_p.h +++ b/src/gui/kernel/qguiapplication_p.h @@ -107,7 +107,7 @@ public: static QAbstractEventDispatcher *qt_qpa_core_dispatcher() { if (QCoreApplication::instance()) - return QCoreApplication::instance()->d_func()->threadData->eventDispatcher; + return QCoreApplication::instance()->d_func()->threadData->eventDispatcher.load(); else return 0; } diff --git a/src/gui/kernel/qplatforminputcontextfactory.cpp b/src/gui/kernel/qplatforminputcontextfactory.cpp index 81368a0f25..ee80a70939 100644 --- a/src/gui/kernel/qplatforminputcontextfactory.cpp +++ b/src/gui/kernel/qplatforminputcontextfactory.cpp @@ -82,8 +82,8 @@ QPlatformInputContext *QPlatformInputContextFactory::create() QString icString = QString::fromLatin1(qgetenv("QT_IM_MODULE")); - if (icString == QStringLiteral("none")) - return 0; + if (icString == QLatin1String("none")) + icString = QStringLiteral("compose"); ic = create(icString); if (ic && ic->isValid()) diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp index 6aff1cac9e..f09edfe88e 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -1435,7 +1435,12 @@ void QWindow::resize(const QSize &newSize) if (d->platformWindow) { d->platformWindow->setGeometry(QRect(position(), newSize)); } else { + const QSize oldSize = d->geometry.size(); d->geometry.setSize(newSize); + if (newSize.width() != oldSize.width()) + emit widthChanged(newSize.width()); + if (newSize.height() != oldSize.height()) + emit heightChanged(newSize.height()); } } diff --git a/src/gui/math3d/qvector2d.cpp b/src/gui/math3d/qvector2d.cpp index 5710ee273a..784297ca70 100644 --- a/src/gui/math3d/qvector2d.cpp +++ b/src/gui/math3d/qvector2d.cpp @@ -68,7 +68,7 @@ QT_BEGIN_NAMESPACE /*! \fn QVector2D::QVector2D() - Constructs a null vector, i.e. with coordinates (0, 0, 0). + Constructs a null vector, i.e. with coordinates (0, 0). */ /*! diff --git a/src/gui/painting/qbackingstore.cpp b/src/gui/painting/qbackingstore.cpp index fb47e62d11..cd3f935c5b 100644 --- a/src/gui/painting/qbackingstore.cpp +++ b/src/gui/painting/qbackingstore.cpp @@ -98,7 +98,7 @@ void QBackingStore::flush(const QRegion ®ion, QWindow *win, const QPoint &off if (!win) win = window(); - if (win && !qt_window_private(win)->receivedExpose) { + if (win && win->isTopLevel() && !qt_window_private(win)->receivedExpose) { qWarning().nospace() << "QBackingStore::flush() called with non-exposed window " << win << ", behavior is undefined"; } diff --git a/src/gui/painting/qcosmeticstroker.cpp b/src/gui/painting/qcosmeticstroker.cpp index 1ba55aa7f1..0f3cde3efd 100644 --- a/src/gui/painting/qcosmeticstroker.cpp +++ b/src/gui/painting/qcosmeticstroker.cpp @@ -290,11 +290,14 @@ void QCosmeticStroker::setup() ppl = buffer->bytesPerLine()>>2; } + // line drawing produces different results with different clips, so + // we need to clip consistently when painting to the same device + // setup FP clip bounds - xmin = clip.left() - 1; - xmax = clip.right() + 2; - ymin = clip.top() - 1; - ymax = clip.bottom() + 2; + xmin = deviceRect.left() - 1; + xmax = deviceRect.right() + 2; + ymin = deviceRect.top() - 1; + ymax = deviceRect.bottom() + 2; lastPixel.x = -1; } @@ -580,6 +583,7 @@ void QCosmeticStroker::drawPath(const QVectorPath &path) patternOffset = state->lastPen.dashOffset()*64; lastPixel.x = -1; + const qreal *begin = points; const qreal *end = points + 2*path.elementCount(); // handle closed path case bool closed = path.hasImplicitClose() || (points[0] == end[-2] && points[1] == end[-1]); @@ -589,6 +593,7 @@ void QCosmeticStroker::drawPath(const QVectorPath &path) calculateLastPoint(p2.x(), p2.y(), p.x(), p.y()); } + bool fastPenAliased = (state->flags.fast_pen && !state->flags.antialiased); points += 2; while (points < end) { QPointF p2 = QPointF(points[0], points[1]) * state->matrix; @@ -596,9 +601,22 @@ void QCosmeticStroker::drawPath(const QVectorPath &path) if (!closed && drawCaps && points == end - 2) caps |= CapEnd; + QCosmeticStroker::Point last = this->lastPixel; stroke(this, p.x(), p.y(), p2.x(), p2.y(), caps); - p = p2; + /* fix for gaps in polylines with fastpen and aliased in a sequence + of points with small distances: if current point p2 has been dropped + out, keep last non dropped point p. */ + if (fastPenAliased) { + if (last.x != lastPixel.x || last.y != lastPixel.y || + points == begin + 2 || points == end - 2 ) { + { + p = p2; + } + } + } else { + p = p2; + } points += 2; caps = NoCaps; } diff --git a/src/gui/painting/qcosmeticstroker_p.h b/src/gui/painting/qcosmeticstroker_p.h index fb37b70ba5..05c8a2b0cf 100644 --- a/src/gui/painting/qcosmeticstroker_p.h +++ b/src/gui/painting/qcosmeticstroker_p.h @@ -83,8 +83,9 @@ public: HorizontalMask = 0xc }; - QCosmeticStroker(QRasterPaintEngineState *s, const QRect &dr) + QCosmeticStroker(QRasterPaintEngineState *s, const QRect &dr, const QRect &dr_unclipped) : state(s), + deviceRect(dr_unclipped), clip(dr), pattern(0), reversePattern(0), @@ -108,6 +109,7 @@ public: QRasterPaintEngineState *state; + QRect deviceRect; QRect clip; // clip bounds in real qreal xmin, xmax; diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index 801a5689c1..a123c147a2 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -1054,20 +1054,20 @@ void QRasterPaintEnginePrivate::drawImage(const QPointF &pt, void QRasterPaintEnginePrivate::systemStateChanged() { - QRect clipRect(0, 0, + deviceRectUnclipped = QRect(0, 0, qMin(QT_RASTER_COORD_LIMIT, device->width()), qMin(QT_RASTER_COORD_LIMIT, device->height())); if (!systemClip.isEmpty()) { - QRegion clippedDeviceRgn = systemClip & clipRect; + QRegion clippedDeviceRgn = systemClip & deviceRectUnclipped; deviceRect = clippedDeviceRgn.boundingRect(); baseClip->setClipRegion(clippedDeviceRgn); } else { - deviceRect = clipRect; + deviceRect = deviceRectUnclipped; baseClip->setClipRect(deviceRect); } #ifdef QT_DEBUG_DRAW - qDebug() << "systemStateChanged" << this << "deviceRect" << deviceRect << clipRect << systemClip; + qDebug() << "systemStateChanged" << this << "deviceRect" << deviceRect << deviceRectUnclipped << systemClip; #endif exDeviceRect = deviceRect; @@ -1529,7 +1529,7 @@ void QRasterPaintEngine::drawRects(const QRect *rects, int rectCount) if (s->penData.blend) { QRectVectorPath path; if (s->flags.fast_pen) { - QCosmeticStroker stroker(s, d->deviceRect); + QCosmeticStroker stroker(s, d->deviceRect, d->deviceRectUnclipped); stroker.setLegacyRoundingEnabled(s->flags.legacy_rounding); for (int i = 0; i < rectCount; ++i) { path.set(rects[i]); @@ -1576,7 +1576,7 @@ void QRasterPaintEngine::drawRects(const QRectF *rects, int rectCount) if (s->penData.blend) { QRectVectorPath path; if (s->flags.fast_pen) { - QCosmeticStroker stroker(s, d->deviceRect); + QCosmeticStroker stroker(s, d->deviceRect, d->deviceRectUnclipped); stroker.setLegacyRoundingEnabled(s->flags.legacy_rounding); for (int i = 0; i < rectCount; ++i) { path.set(rects[i]); @@ -1610,7 +1610,7 @@ void QRasterPaintEngine::stroke(const QVectorPath &path, const QPen &pen) return; if (s->flags.fast_pen) { - QCosmeticStroker stroker(s, d->deviceRect); + QCosmeticStroker stroker(s, d->deviceRect, d->deviceRectUnclipped); stroker.setLegacyRoundingEnabled(s->flags.legacy_rounding); stroker.drawPath(path); } else if (s->flags.non_complex_pen && path.shape() == QVectorPath::LinesHint) { @@ -1953,7 +1953,7 @@ void QRasterPaintEngine::drawPolygon(const QPointF *points, int pointCount, Poly if (s->penData.blend) { QVectorPath vp((qreal *) points, pointCount, 0, QVectorPath::polygonFlags(mode)); if (s->flags.fast_pen) { - QCosmeticStroker stroker(s, d->deviceRect); + QCosmeticStroker stroker(s, d->deviceRect, d->deviceRectUnclipped); stroker.setLegacyRoundingEnabled(s->flags.legacy_rounding); stroker.drawPath(vp); } else { @@ -2018,7 +2018,7 @@ void QRasterPaintEngine::drawPolygon(const QPoint *points, int pointCount, Polyg QVectorPath vp((qreal *) fpoints.data(), pointCount, 0, QVectorPath::polygonFlags(mode)); if (s->flags.fast_pen) { - QCosmeticStroker stroker(s, d->deviceRect); + QCosmeticStroker stroker(s, d->deviceRect, d->deviceRectUnclipped); stroker.setLegacyRoundingEnabled(s->flags.legacy_rounding); stroker.drawPath(vp); } else { @@ -3126,7 +3126,7 @@ void QRasterPaintEngine::drawPoints(const QPointF *points, int pointCount) return; } - QCosmeticStroker stroker(s, d->deviceRect); + QCosmeticStroker stroker(s, d->deviceRect, d->deviceRectUnclipped); stroker.setLegacyRoundingEnabled(s->flags.legacy_rounding); stroker.drawPoints(points, pointCount); } @@ -3146,7 +3146,7 @@ void QRasterPaintEngine::drawPoints(const QPoint *points, int pointCount) return; } - QCosmeticStroker stroker(s, d->deviceRect); + QCosmeticStroker stroker(s, d->deviceRect, d->deviceRectUnclipped); stroker.setLegacyRoundingEnabled(s->flags.legacy_rounding); stroker.drawPoints(points, pointCount); } @@ -3167,7 +3167,7 @@ void QRasterPaintEngine::drawLines(const QLine *lines, int lineCount) return; if (s->flags.fast_pen) { - QCosmeticStroker stroker(s, d->deviceRect); + QCosmeticStroker stroker(s, d->deviceRect, d->deviceRectUnclipped); stroker.setLegacyRoundingEnabled(s->flags.legacy_rounding); for (int i=0; i<lineCount; ++i) { const QLine &l = lines[i]; @@ -3239,7 +3239,7 @@ void QRasterPaintEngine::drawLines(const QLineF *lines, int lineCount) if (!s->penData.blend) return; if (s->flags.fast_pen) { - QCosmeticStroker stroker(s, d->deviceRect); + QCosmeticStroker stroker(s, d->deviceRect, d->deviceRectUnclipped); stroker.setLegacyRoundingEnabled(s->flags.legacy_rounding); for (int i=0; i<lineCount; ++i) { QLineF line = lines[i]; diff --git a/src/gui/painting/qpaintengine_raster_p.h b/src/gui/painting/qpaintengine_raster_p.h index e5bb0406ae..00a9ae750c 100644 --- a/src/gui/painting/qpaintengine_raster_p.h +++ b/src/gui/painting/qpaintengine_raster_p.h @@ -323,6 +323,7 @@ public: #endif QRect deviceRect; + QRect deviceRectUnclipped; QStroker basicStroker; QScopedPointer<QDashStroker> dashStroker; diff --git a/src/gui/painting/qpathclipper.cpp b/src/gui/painting/qpathclipper.cpp index 6ad9a7f436..2702b56e73 100644 --- a/src/gui/painting/qpathclipper.cpp +++ b/src/gui/painting/qpathclipper.cpp @@ -713,8 +713,7 @@ class QKdPointFinder { public: QKdPointFinder(int point, const QPathSegments &segments, QKdPointTree &tree) - : m_point(point) - , m_result(-1) + : m_result(-1) , m_segments(&segments) , m_tree(&tree) { @@ -759,7 +758,6 @@ public: } private: - int m_point; qreal pointComponents[2]; int m_result; const QPathSegments *m_segments; diff --git a/src/gui/painting/qrasterizer.cpp b/src/gui/painting/qrasterizer.cpp index 8483a05d60..a6be7c6c78 100644 --- a/src/gui/painting/qrasterizer.cpp +++ b/src/gui/painting/qrasterizer.cpp @@ -891,6 +891,8 @@ void QRasterizer::rasterizeLine(const QPointF &a, const QPointF &b, qreal width, const Q16Dot16 rowHeight = qMin(yFP + Q16Dot16Factor, yPb) - qMax(yFP, yPa); const int y = Q16Dot16ToInt(yFP); + if (y > d->clipRect.bottom()) + break; for (int i = 0; i < n; ++i) { buffer.addSpan(x[i], len[i], y, Q16Dot16ToInt(Q16Dot16Multiply(rowHeight, coverage[i]))); diff --git a/src/gui/painting/qtextureglyphcache.cpp b/src/gui/painting/qtextureglyphcache.cpp index 81c9c676ba..6676d3daa6 100644 --- a/src/gui/painting/qtextureglyphcache.cpp +++ b/src/gui/painting/qtextureglyphcache.cpp @@ -109,7 +109,8 @@ bool QTextureGlyphCache::populate(QFontEngine *fontEngine, int numGlyphs, const m_current_fontengine = fontEngine; const int margin = m_current_fontengine->glyphMargin(m_type); - const int paddingDoubled = glyphPadding() * 2; + const int padding = glyphPadding(); + const int paddingDoubled = padding * 2; bool supportsSubPixelPositions = fontEngine->supportsSubPixelPositions(); if (fontEngine->m_subPixelPositionCount == 0) { @@ -122,6 +123,11 @@ bool QTextureGlyphCache::populate(QFontEngine *fontEngine, int numGlyphs, const } } + if (m_cx == 0 && m_cy == 0) { + m_cx = padding; + m_cy = padding; + } + QHash<GlyphAndSubPixelPosition, Coord> listItemCoordinates; int rowHeight = 0; @@ -203,21 +209,21 @@ bool QTextureGlyphCache::populate(QFontEngine *fontEngine, int numGlyphs, const m_currentRowHeight = qMax(m_currentRowHeight, c.h + margin * 2); - if (m_cx + c.w > requiredWidth) { + if (m_cx + c.w + padding > requiredWidth) { int new_width = requiredWidth*2; - while (new_width < m_cx + c.w) + while (new_width < m_cx + c.w + padding) new_width *= 2; if (new_width <= maxTextureWidth()) { requiredWidth = new_width; } else { // no room on the current line, start new glyph strip - m_cx = 0; + m_cx = padding; m_cy += m_currentRowHeight + paddingDoubled; m_currentRowHeight = c.h + margin * 2; // New row } } - if (maxTextureHeight() > 0 && m_cy + c.h > maxTextureHeight()) { + if (maxTextureHeight() > 0 && m_cy + c.h + padding > maxTextureHeight()) { // We can't make a cache of the required size, so we bail out return false; } diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp index f052d8fd89..e3270b430f 100644 --- a/src/gui/text/qfontdatabase.cpp +++ b/src/gui/text/qfontdatabase.cpp @@ -503,14 +503,6 @@ static const int scriptForWritingSystem[] = { QChar::Script_Han, // Japanese QChar::Script_Hangul, // Korean QChar::Script_Latin, // Vietnamese - QChar::Script_Yi, // Yi - QChar::Script_Tagalog, // Tagalog - QChar::Script_Hanunoo, // Hanunoo - QChar::Script_Buhid, // Buhid - QChar::Script_Tagbanwa, // Tagbanwa - QChar::Script_Limbu, // Limbu - QChar::Script_TaiLe, // TaiLe - QChar::Script_Braille, // Braille QChar::Script_Common, // Symbol QChar::Script_Ogham, // Ogham QChar::Script_Runic, // Runic diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp index dbe56889da..47c59fb826 100644 --- a/src/gui/text/qfontengine.cpp +++ b/src/gui/text/qfontengine.cpp @@ -264,8 +264,8 @@ void *QFontEngine::harfbuzzFont() const HB_FontRec *hbFont = (HB_FontRec *)font_; if (!hbFont->x_ppem) { QFixed emSquare = emSquareSize(); - hbFont->x_ppem = fontDef.pixelSize; - hbFont->y_ppem = fontDef.pixelSize * fontDef.stretch / 100; + hbFont->y_ppem = fontDef.pixelSize; + hbFont->x_ppem = fontDef.pixelSize * fontDef.stretch / 100; hbFont->x_scale = (QFixed(hbFont->x_ppem * (1 << 16)) / emSquare).value(); hbFont->y_scale = (QFixed(hbFont->y_ppem * (1 << 16)) / emSquare).value(); } @@ -279,6 +279,7 @@ void *QFontEngine::harfbuzzFace() const Q_CHECK_PTR(hbFace); if (hbFace->font_for_init != 0) hbFace = qHBLoadFace(hbFace); + hbFace->isSymbolFont = symbol; face_ = (void *)hbFace; face_destroy_func = hb_freeFace; diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp index 8486810299..19b4411b47 100644 --- a/src/gui/text/qfontengine_ft.cpp +++ b/src/gui/text/qfontengine_ft.cpp @@ -899,18 +899,28 @@ QFontEngineFT::Glyph *QFontEngineFT::loadGlyph(QGlyphSet *set, uint glyph, info.yOff = 0; if ((set && set->outline_drawing) || fetchMetricsOnly) { - // If the advance doesn't fit in signed char, don't cache it - if (qAbs(info.xOff) >= 128) - return 0; - g = new Glyph; - g->data = 0; - g->linearAdvance = slot->linearHoriAdvance >> 10; int left = FLOOR(slot->metrics.horiBearingX); int right = CEIL(slot->metrics.horiBearingX + slot->metrics.width); int top = CEIL(slot->metrics.horiBearingY); int bottom = FLOOR(slot->metrics.horiBearingY - slot->metrics.height); - g->width = TRUNC(right-left); - g->height = TRUNC(top-bottom); + int width = right-left; + int height = top-bottom; + + // If any of the metrics are too large to fit, don't cache them + if (qAbs(info.xOff) >= 128 + || qAbs(TRUNC(top)) >= 128 + || TRUNC(width) >= 256 + || TRUNC(height) >= 256 + || qAbs(TRUNC(left)) >= 128 + || qAbs(TRUNC(ROUND(slot->advance.x))) >= 128) { + return 0; + } + + g = new Glyph; + g->data = 0; + g->linearAdvance = slot->linearHoriAdvance >> 10; + g->width = TRUNC(width); + g->height = TRUNC(height); g->x = TRUNC(left); g->y = TRUNC(top); g->advance = TRUNC(ROUND(slot->advance.x)); diff --git a/src/network/access/qhttpmultipart.cpp b/src/network/access/qhttpmultipart.cpp index ade121925b..4397ef8205 100644 --- a/src/network/access/qhttpmultipart.cpp +++ b/src/network/access/qhttpmultipart.cpp @@ -488,6 +488,7 @@ bool QHttpMultiPartIODevice::reset() for (int a = 0; a < multiPart->parts.count(); a++) if (!multiPart->parts[a].d->reset()) return false; + readPointer = 0; return true; } qint64 QHttpMultiPartIODevice::readData(char *data, qint64 maxSize) diff --git a/src/network/kernel/qnetworkproxy.cpp b/src/network/kernel/qnetworkproxy.cpp index 931c52eab0..a38655d244 100644 --- a/src/network/kernel/qnetworkproxy.cpp +++ b/src/network/kernel/qnetworkproxy.cpp @@ -706,7 +706,7 @@ quint16 QNetworkProxy::port() const If a QAbstractSocket or QTcpSocket has the QNetworkProxy::DefaultProxy type, then the QNetworkProxy set with this function is used. If you want more flexibility in determining - which the proxy, use the QNetworkProxyFactory class. + which proxy is used, use the QNetworkProxyFactory class. Setting a default proxy value with this function will override the application proxy factory set with diff --git a/src/network/socket/qabstractsocket.cpp b/src/network/socket/qabstractsocket.cpp index c19238d768..71d6166840 100644 --- a/src/network/socket/qabstractsocket.cpp +++ b/src/network/socket/qabstractsocket.cpp @@ -643,7 +643,7 @@ bool QAbstractSocketPrivate::initSocketLayer(QAbstractSocket::NetworkLayerProtoc return false; } - if (threadData->eventDispatcher) + if (threadData->hasEventDispatcher()) socketEngine->setReceiver(this); #if defined (QABSTRACTSOCKET_DEBUG) @@ -1134,7 +1134,7 @@ void QAbstractSocketPrivate::_q_connectToNextAddress() } // Start the connect timer. - if (threadData->eventDispatcher) { + if (threadData->hasEventDispatcher()) { if (!connectTimer) { connectTimer = new QTimer(q); QObject::connect(connectTimer, SIGNAL(timeout()), @@ -1159,7 +1159,7 @@ void QAbstractSocketPrivate::_q_connectToNextAddress() void QAbstractSocketPrivate::_q_testConnection() { if (socketEngine) { - if (threadData->eventDispatcher) { + if (threadData->hasEventDispatcher()) { if (connectTimer) connectTimer->stop(); } @@ -1180,7 +1180,7 @@ void QAbstractSocketPrivate::_q_testConnection() addresses.clear(); } - if (threadData->eventDispatcher) { + if (threadData->hasEventDispatcher()) { if (connectTimer) connectTimer->stop(); } @@ -1640,7 +1640,7 @@ void QAbstractSocket::connectToHost(const QString &hostName, quint16 port, return; #endif } else { - if (d->threadData->eventDispatcher) { + if (d->threadData->hasEventDispatcher()) { // this internal API for QHostInfo either immediately gives us the desired // QHostInfo from cache or later calls the _q_startConnecting slot. bool immediateResultValid = false; @@ -1846,7 +1846,7 @@ bool QAbstractSocket::setSocketDescriptor(qintptr socketDescriptor, SocketState return false; } - if (d->threadData->eventDispatcher) + if (d->threadData->hasEventDispatcher()) d->socketEngine->setReceiver(d); QIODevice::open(openMode); diff --git a/src/network/socket/qnativesocketengine.cpp b/src/network/socket/qnativesocketengine.cpp index 02f78aeaed..536bc63ed0 100644 --- a/src/network/socket/qnativesocketengine.cpp +++ b/src/network/socket/qnativesocketengine.cpp @@ -1214,7 +1214,7 @@ void QNativeSocketEngine::setReadNotificationEnabled(bool enable) Q_D(QNativeSocketEngine); if (d->readNotifier) { d->readNotifier->setEnabled(enable); - } else if (enable && d->threadData->eventDispatcher) { + } else if (enable && d->threadData->hasEventDispatcher()) { d->readNotifier = new QReadNotifier(d->socketDescriptor, this); d->readNotifier->setEnabled(true); } @@ -1231,7 +1231,7 @@ void QNativeSocketEngine::setWriteNotificationEnabled(bool enable) Q_D(QNativeSocketEngine); if (d->writeNotifier) { d->writeNotifier->setEnabled(enable); - } else if (enable && d->threadData->eventDispatcher) { + } else if (enable && d->threadData->hasEventDispatcher()) { d->writeNotifier = new QWriteNotifier(d->socketDescriptor, this); d->writeNotifier->setEnabled(true); } @@ -1248,7 +1248,7 @@ void QNativeSocketEngine::setExceptionNotificationEnabled(bool enable) Q_D(QNativeSocketEngine); if (d->exceptNotifier) { d->exceptNotifier->setEnabled(enable); - } else if (enable && d->threadData->eventDispatcher) { + } else if (enable && d->threadData->hasEventDispatcher()) { d->exceptNotifier = new QExceptionNotifier(d->socketDescriptor, this); d->exceptNotifier->setEnabled(true); } diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp index e8f8b294c9..2b9c4b5bd2 100644 --- a/src/network/ssl/qsslsocket_openssl.cpp +++ b/src/network/ssl/qsslsocket_openssl.cpp @@ -55,6 +55,7 @@ ****************************************************************************/ //#define QSSLSOCKET_DEBUG +//#define QT_DECRYPT_SSL_TRAFFIC #include "qsslsocket_openssl_p.h" #include "qsslsocket_openssl_symbols_p.h" @@ -1403,6 +1404,40 @@ void QSslSocketBackendPrivate::continueHandshake() if (q_SSL_ctrl((ssl), SSL_CTRL_GET_SESSION_REUSED, 0, NULL)) configuration.peerSessionShared = true; +#ifdef QT_DECRYPT_SSL_TRAFFIC + if (ssl->session && ssl->s3) { + const char *mk = reinterpret_cast<const char *>(ssl->session->master_key); + QByteArray masterKey(mk, ssl->session->master_key_length); + const char *random = reinterpret_cast<const char *>(ssl->s3->client_random); + QByteArray clientRandom(random, SSL3_RANDOM_SIZE); + + // different format, needed for e.g. older Wireshark versions: +// const char *sid = reinterpret_cast<const char *>(ssl->session->session_id); +// QByteArray sessionID(sid, ssl->session->session_id_length); +// QByteArray debugLineRSA("RSA Session-ID:"); +// debugLineRSA.append(sessionID.toHex().toUpper()); +// debugLineRSA.append(" Master-Key:"); +// debugLineRSA.append(masterKey.toHex().toUpper()); +// debugLineRSA.append("\n"); + + QByteArray debugLineClientRandom("CLIENT_RANDOM "); + debugLineClientRandom.append(clientRandom.toHex().toUpper()); + debugLineClientRandom.append(" "); + debugLineClientRandom.append(masterKey.toHex().toUpper()); + debugLineClientRandom.append("\n"); + + QString sslKeyFile = QDir::tempPath() + QLatin1String("/qt-ssl-keys"); + QFile file(sslKeyFile); + if (!file.open(QIODevice::Append)) + qWarning() << "could not open file" << sslKeyFile << "for appending"; + if (!file.write(debugLineClientRandom)) + qWarning() << "could not write to file" << sslKeyFile; + file.close(); + } else { + qWarning("could not decrypt SSL traffic"); + } +#endif + // Cache this SSL session inside the QSslContext if (!(configuration.sslOptions & QSsl::SslOptionDisableSessionTickets)) { if (!sslContextPointer->cacheSession(ssl)) diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 4345804da8..def0470622 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -3810,7 +3810,7 @@ void QGLWidget::setFormat(const QGLFormat &format) attributes that were requested. */ -/* +/*! \fn void QGLWidget::setContext(QGLContext *context, const QGLContext* shareContext, bool deleteOldContext) @@ -3836,6 +3836,12 @@ void QGLWidget::setFormat(const QGLFormat &format) to the old context (as returned by context()), and want to restore that context later. + \note This function is obsolete and should no longer be used. If you were + using it to recreate the context for a QGLWidget, you should instead create a + new QGLWidget or use the QOpenGLContext API in conjunction with QWindow. + There is currently no officially supported way to substitute QGLWidget's + context with your own implementation of QGLContext. + \sa context(), isSharing() */ diff --git a/src/opengl/qglframebufferobject_p.h b/src/opengl/qglframebufferobject_p.h index 64b1df5bf5..0f1128e8f6 100644 --- a/src/opengl/qglframebufferobject_p.h +++ b/src/opengl/qglframebufferobject_p.h @@ -120,7 +120,6 @@ public: private: QGLFramebufferObject* fbo; QGLFormat fboFormat; - bool wasBound; bool reqAlpha; }; diff --git a/src/platformsupport/dnd/qsimpledrag.cpp b/src/platformsupport/dnd/qsimpledrag.cpp index fe0146afc3..587e70b0f3 100644 --- a/src/platformsupport/dnd/qsimpledrag.cpp +++ b/src/platformsupport/dnd/qsimpledrag.cpp @@ -95,7 +95,7 @@ static QWindow* topLevelAt(const QPoint &pos) QBasicDrag::QBasicDrag() : m_restoreCursor(false), m_eventLoop(0), m_executed_drop_action(Qt::IgnoreAction), m_can_drop(false), - m_drag(0), m_drag_icon_window(0), m_cursor_drop_action(Qt::IgnoreAction) + m_drag(0), m_drag_icon_window(0) { } diff --git a/src/platformsupport/dnd/qsimpledrag_p.h b/src/platformsupport/dnd/qsimpledrag_p.h index bb9d215083..b2d4191b89 100644 --- a/src/platformsupport/dnd/qsimpledrag_p.h +++ b/src/platformsupport/dnd/qsimpledrag_p.h @@ -97,7 +97,6 @@ private: bool m_can_drop; QDrag *m_drag; QShapedPixmapWindow *m_drag_icon_window; - Qt::DropAction m_cursor_drop_action; }; class QSimpleDrag : public QBasicDrag diff --git a/src/platformsupport/eglconvenience/eglconvenience.pri b/src/platformsupport/eglconvenience/eglconvenience.pri index 22ade42816..506f4ab4ea 100644 --- a/src/platformsupport/eglconvenience/eglconvenience.pri +++ b/src/platformsupport/eglconvenience/eglconvenience.pri @@ -14,5 +14,6 @@ contains(QT_CONFIG,egl) { SOURCES += \ $$PWD/qxlibeglintegration.cpp } + CONFIG += egl } diff --git a/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp b/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp index 329268395e..288f6ca0e3 100644 --- a/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp +++ b/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp @@ -350,6 +350,26 @@ static const char *getFcFamilyForStyleHint(const QFont::StyleHint style) return stylehint; } +static bool isSymbolFont(FontFile *fontFile) +{ + if (fontFile == 0 || fontFile->fileName.isEmpty()) + return false; + + QFontEngine::FaceId id; + id.filename = fontFile->fileName.toLocal8Bit(); + id.index = fontFile->indexValue; + + QFreetypeFace *f = QFreetypeFace::getFace(id); + if (f == 0) { + qWarning("isSymbolFont: Couldn't open face %s/%d", id.filename.data(), id.index); + return false; + } + + bool hasSymbolMap = f->symbol_map; + f->release(id); + return hasSymbolMap; +} + void QFontconfigDatabase::populateFontDatabase() { FcFontSet *fonts; @@ -469,6 +489,9 @@ void QFontconfigDatabase::populateFontDatabase() fontFile->fileName = QLatin1String((const char *)file_value); fontFile->indexValue = indexValue; + if (isSymbolFont(fontFile)) + writingSystems.setSupported(QFontDatabase::Other); + QFont::Style style = (slant_value == FC_SLANT_ITALIC) ? QFont::StyleItalic : ((slant_value == FC_SLANT_OBLIQUE) diff --git a/src/platformsupport/input/evdevkeyboard/qevdevkeyboardmanager.cpp b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardmanager.cpp index 81acc161fe..4932087c5f 100644 --- a/src/platformsupport/input/evdevkeyboard/qevdevkeyboardmanager.cpp +++ b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardmanager.cpp @@ -57,7 +57,13 @@ QEvdevKeyboardManager::QEvdevKeyboardManager(const QString &key, const QString & { Q_UNUSED(key); - QStringList args = specification.split(QLatin1Char(':')); + + QString spec = QString::fromLocal8Bit(qgetenv("QT_QPA_EVDEV_KEYBOARD_PARAMETERS")); + + if (spec.isEmpty()) + spec = specification; + + QStringList args = spec.split(QLatin1Char(':')); QStringList devices; foreach (const QString &arg, args) { diff --git a/src/platformsupport/input/evdevmouse/qevdevmousemanager.cpp b/src/platformsupport/input/evdevmouse/qevdevmousemanager.cpp index 415cffa4ae..6c430091c1 100644 --- a/src/platformsupport/input/evdevmouse/qevdevmousemanager.cpp +++ b/src/platformsupport/input/evdevmouse/qevdevmousemanager.cpp @@ -59,7 +59,12 @@ QEvdevMouseManager::QEvdevMouseManager(const QString &key, const QString &specif { Q_UNUSED(key); - QStringList args = specification.split(QLatin1Char(':')); + QString spec = QString::fromLocal8Bit(qgetenv("QT_QPA_EVDEV_MOUSE_PARAMETERS")); + + if (spec.isEmpty()) + spec = specification; + + QStringList args = spec.split(QLatin1Char(':')); QStringList devices; foreach (const QString &arg, args) { diff --git a/src/platformsupport/input/evdevtouch/qevdevtouch.cpp b/src/platformsupport/input/evdevtouch/qevdevtouch.cpp index 8c86eee469..2c93da147e 100644 --- a/src/platformsupport/input/evdevtouch/qevdevtouch.cpp +++ b/src/platformsupport/input/evdevtouch/qevdevtouch.cpp @@ -159,7 +159,7 @@ static inline bool testBit(long bit, const long *array) return (array[bit / LONG_BITS] >> bit % LONG_BITS) & 1; } -QEvdevTouchScreenHandler::QEvdevTouchScreenHandler(const QString &spec, QObject *parent) +QEvdevTouchScreenHandler::QEvdevTouchScreenHandler(const QString &specification, QObject *parent) : QObject(parent), m_notify(0), m_fd(-1), d(0) #ifdef USE_MTDEV , m_mtdev(0) @@ -170,7 +170,13 @@ QEvdevTouchScreenHandler::QEvdevTouchScreenHandler(const QString &spec, QObject QString dev; // only the first device argument is used for now + QString spec = QString::fromLocal8Bit(qgetenv("QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS")); + + if (spec.isEmpty()) + spec = specification; + QStringList args = spec.split(QLatin1Char(':')); + for (int i = 0; i < args.count(); ++i) { if (args.at(i).startsWith(QLatin1String("/dev/"))) { dev = args.at(i); diff --git a/src/platformsupport/input/evdevtouch/qevdevtouch_p.h b/src/platformsupport/input/evdevtouch/qevdevtouch_p.h index ceb57bdf05..be7dbfba14 100644 --- a/src/platformsupport/input/evdevtouch/qevdevtouch_p.h +++ b/src/platformsupport/input/evdevtouch/qevdevtouch_p.h @@ -61,7 +61,7 @@ class QEvdevTouchScreenHandler : public QObject Q_OBJECT public: - explicit QEvdevTouchScreenHandler(const QString &spec = QString(), QObject *parent = 0); + explicit QEvdevTouchScreenHandler(const QString &specification = QString(), QObject *parent = 0); ~QEvdevTouchScreenHandler(); private slots: diff --git a/src/platformsupport/linuxaccessibility/atspiadaptor.cpp b/src/platformsupport/linuxaccessibility/atspiadaptor.cpp index 001976e9fe..050cb6a0bc 100644 --- a/src/platformsupport/linuxaccessibility/atspiadaptor.cpp +++ b/src/platformsupport/linuxaccessibility/atspiadaptor.cpp @@ -809,9 +809,13 @@ void AtSpiAdaptor::windowActivated(QObject* window, bool active) return; QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(window); - Q_ASSERT(iface && iface->isValid()); + Q_ASSERT(iface); + Q_ASSERT(!active || iface->isValid()); - QString windowTitle = iface->text(QAccessible::Name); + QString windowTitle; + // in dtor it may be invalid + if (iface->isValid()) + windowTitle = iface->text(QAccessible::Name); delete iface; QDBusVariant data; diff --git a/src/plugins/accessible/widgets/itemviews.cpp b/src/plugins/accessible/widgets/itemviews.cpp index cb34116f32..822d9d8c77 100644 --- a/src/plugins/accessible/widgets/itemviews.cpp +++ b/src/plugins/accessible/widgets/itemviews.cpp @@ -47,7 +47,7 @@ #include <qtreeview.h> #include <private/qtreewidget_p.h> #include <QtGui/private/qaccessible2_p.h> -#include <QDebug> +#include <QtWidgets/private/qwidget_p.h> #ifndef QT_NO_ACCESSIBILITY @@ -136,6 +136,11 @@ QAccessibleTable::QAccessibleTable(QWidget *w) } } +bool QAccessibleTable::isValid() const +{ + return (view() && !qobject_cast<QWidget*>(view())->d_func()->data.in_destructor); +} + QAccessibleTable::~QAccessibleTable() { } diff --git a/src/plugins/accessible/widgets/itemviews.h b/src/plugins/accessible/widgets/itemviews.h index bba698bda2..af885fe6c1 100644 --- a/src/plugins/accessible/widgets/itemviews.h +++ b/src/plugins/accessible/widgets/itemviews.h @@ -63,6 +63,7 @@ class QAccessibleTable :public QAccessibleTableInterface, public QAccessibleObje { public: explicit QAccessibleTable(QWidget *w); + bool isValid() const; virtual ~QAccessibleTable(); diff --git a/src/plugins/accessible/widgets/main.cpp b/src/plugins/accessible/widgets/main.cpp index 92cda9f3ca..ade4979256 100644 --- a/src/plugins/accessible/widgets/main.cpp +++ b/src/plugins/accessible/widgets/main.cpp @@ -172,12 +172,11 @@ QAccessibleInterface *AccessibleFactory::create(const QString &classname, QObjec iface = new QAccessibleMenu(widget); #endif #ifndef QT_NO_ITEMVIEWS - } else if (classname == QLatin1String("QAbstractItemView")) { - if (qobject_cast<const QTreeView*>(widget)) { - iface = new QAccessibleTree(widget); - } else { - iface = new QAccessibleTable(widget); - } + } else if (classname == QLatin1String("QTreeView")) { + iface = new QAccessibleTree(widget); + } else if (classname == QLatin1String("QTableView") || classname == QLatin1String("QListView")) { + iface = new QAccessibleTable(widget); + // ### This should be cleaned up. We return the parent for the scrollarea to hide it. } else if (classname == QLatin1String("QWidget") && widget->objectName() == QLatin1String("qt_scrollarea_viewport") && qobject_cast<QAbstractItemView*>(widget->parentWidget())) { @@ -254,7 +253,7 @@ QAccessibleInterface *AccessibleFactory::create(const QString &classname, QObjec } else if (classname == QLatin1String("QDesktopScreenWidget")) { iface = 0; - } else { + } else if (classname == QLatin1String("QWidget")) { iface = new QAccessibleWidget(widget); } diff --git a/src/plugins/accessible/widgets/widgets.json b/src/plugins/accessible/widgets/widgets.json index 094987daf5..3969fcd527 100644 --- a/src/plugins/accessible/widgets/widgets.json +++ b/src/plugins/accessible/widgets/widgets.json @@ -24,11 +24,12 @@ "QPlainTextEdit", "QMenuBar", "QMenu", - "QHeaderView", "QTabBar", "QToolBar", "QSizeGrip", - "QAbstractItemView", + "QListView", + "QTreeView", + "QTableView", "QWidget", "QSplitter", "QSplitterHandle", @@ -47,7 +48,6 @@ "QScrollArea", "QCalendarWidget", "QDockWidget", - "QAccessibleWidget", "QDesktopScreenWidget" ] } diff --git a/src/plugins/generic/generic.pro b/src/plugins/generic/generic.pro index 078db2f477..18a8295d3c 100644 --- a/src/plugins/generic/generic.pro +++ b/src/plugins/generic/generic.pro @@ -5,3 +5,7 @@ TEMPLATE = subdirs contains(QT_CONFIG, evdev) { SUBDIRS += evdevmouse evdevtouch evdevkeyboard evdevtablet } + +contains(QT_CONFIG, tslib) { + SUBDIRS += tslib +} diff --git a/src/plugins/platforminputcontexts/compose/compose.json b/src/plugins/platforminputcontexts/compose/compose.json new file mode 100644 index 0000000000..2daf89ed30 --- /dev/null +++ b/src/plugins/platforminputcontexts/compose/compose.json @@ -0,0 +1,3 @@ +{ + "Keys": [ "compose" ] +} diff --git a/src/plugins/platforminputcontexts/compose/compose.pro b/src/plugins/platforminputcontexts/compose/compose.pro new file mode 100644 index 0000000000..6387a47a4c --- /dev/null +++ b/src/plugins/platforminputcontexts/compose/compose.pro @@ -0,0 +1,20 @@ +TARGET = composeplatforminputcontextplugin + +PLUGIN_TYPE = platforminputcontexts +PLUGIN_CLASS_NAME = QComposePlatformInputContextPlugin +load(qt_plugin) + +QT += gui-private + +LIBS += $$QMAKE_LIBS_XKBCOMMON +QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_XKBCOMMON + +SOURCES += $$PWD/main.cpp \ + $$PWD/qcomposeplatforminputcontext.cpp \ + $$PWD/generator/qtablegenerator.cpp \ + +HEADERS += $$PWD/qcomposeplatforminputcontext.h \ + $$PWD/generator/qtablegenerator.h \ + $$PWD/xkbcommon_workaround.h \ + +OTHER_FILES += $$PWD/compose.json diff --git a/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp b/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp new file mode 100644 index 0000000000..5941936aec --- /dev/null +++ b/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp @@ -0,0 +1,402 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, 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, Digia gives you certain additional +** rights. These rights are described in the Digia 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. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qtablegenerator.h" + +#include <QtCore/QRegularExpression> +#include <QtCore/QByteArray> +#include <QtCore/QTextCodec> +#include <QtCore/QDebug> +#include <QtCore/QStringList> +#include <QtCore/QString> + +#include <xkbcommon/xkbcommon.h> +#include <xkbcommon_workaround.h> + +#include <X11/keysym.h> + +//#define DEBUG_GENERATOR + +TableGenerator::TableGenerator() : m_state(NoErrors), + m_systemComposeDir(QString()) +{ + initPossibleLocations(); + findComposeFile(); + orderComposeTable(); +#ifdef DEBUG_GENERATOR + printComposeTable(); +#endif +} + +void TableGenerator::initPossibleLocations() +{ + // AFAICT there is no way to know the exact location + // of the compose files. It depends on how Xlib was configured + // on a specific platform. During the "./configure" process + // xlib generates a config.h file which contains a bunch of defines, + // including XLOCALEDIR which points to the location of the compose file dir. + // To add an extra system path use the QTCOMPOSE environment variable + if (qEnvironmentVariableIsSet("QTCOMPOSE")) { + m_possibleLocations.append(QString(qgetenv("QTCOMPOSE"))); + } + m_possibleLocations.append(QStringLiteral("/usr/share/X11/locale")); + m_possibleLocations.append(QStringLiteral("/usr/lib/X11/locale")); +} + +void TableGenerator::findComposeFile() +{ + bool found = false; + // check if XCOMPOSEFILE points to a Compose file + if (qEnvironmentVariableIsSet("XCOMPOSEFILE")) { + QString composeFile(qgetenv("XCOMPOSEFILE")); + if (composeFile.endsWith(QLatin1String("Compose"))) + found = processFile(composeFile); + else + qWarning("Qt Warning: XCOMPOSEFILE doesn't point to a valid Compose file"); +#ifdef DEBUG_GENERATOR + if (found) + qDebug() << "Using Compose file from: " << composeFile; +#endif + } + + // check if user’s home directory has a file named .XCompose + if (!found && cleanState()) { + QString composeFile = qgetenv("HOME") + QStringLiteral("/.XCompose"); + if (QFile(composeFile).exists()) + found = processFile(composeFile); +#ifdef DEBUG_GENERATOR + if (found) + qDebug() << "Using Compose file from: " << composeFile; +#endif + } + + // check for the system provided compose files + if (!found && cleanState()) { + readLocaleMappings(); + + if (cleanState()) { + + QString table = m_localeToTable.value(locale().toUpper()); + if (table.isEmpty()) + // no table mappings for the system's locale in the compose.dir + m_state = UnsupportedLocale; + else + found = processFile(systemComposeDir() + QLatin1String("/") + table); +#ifdef DEBUG_GENERATOR + if (found) + qDebug() << "Using Compose file from: " << + systemComposeDir() + QLatin1String("/") + table; +#endif + } + } + + if (found && m_composeTable.isEmpty()) + m_state = EmptyTable; + + if (!found) + m_state = MissingComposeFile; +} + +bool TableGenerator::findSystemComposeDir() +{ + bool found = false; + for (int i = 0; i < m_possibleLocations.size(); ++i) { + QString path = m_possibleLocations.at(i); + if (QFile(path + QLatin1String("/compose.dir")).exists()) { + m_systemComposeDir = path; + found = true; + break; + } + } + + if (!found) { + // should we ask to report this in the qt bug tracker? + m_state = UnknownSystemComposeDir; + qWarning("Qt Warning: Could not find a location of the system's Compose files. " + "Consider setting the QTCOMPOSE environment variable."); + } + + return found; +} + +QString TableGenerator::systemComposeDir() +{ + if (m_systemComposeDir.isNull() + && !findSystemComposeDir()) { + return QLatin1String("$QTCOMPOSE"); + } + + return m_systemComposeDir; +} + +QString TableGenerator::locale() const +{ + char *name = setlocale(LC_CTYPE, (char *)0); + return QLatin1String(name); +} + +void TableGenerator::readLocaleMappings() +{ + QFile mappings(systemComposeDir() + QLatin1String("/compose.dir")); + if (mappings.exists()) { + mappings.open(QIODevice::ReadOnly); + QTextStream in(&mappings); + // formating of compose.dir has some inconsistencies + while (!in.atEnd()) { + QString line = in.readLine(); + if (!line.startsWith("#") && line.size() != 0 && + line.at(0).isLower()) { + + QStringList pair = line.split(QRegExp(QLatin1String("\\s+"))); + QString table = pair.at(0); + if (table.endsWith(QLatin1String(":"))) + table.remove(table.size() - 1, 1); + + m_localeToTable.insert(pair.at(1).toUpper(), table); + } + } + mappings.close(); + } +} + +bool TableGenerator::processFile(QString composeFileName) +{ + QFile composeFile(composeFileName); + if (composeFile.exists()) { + composeFile.open(QIODevice::ReadOnly); + parseComposeFile(&composeFile); + return true; + } + qWarning() << QString(QLatin1String("Qt Warning: Compose file: \"%1\" can't be found")) + .arg(composeFile.fileName()); + return false; +} + +TableGenerator::~TableGenerator() +{ +} + +QList<QComposeTableElement> TableGenerator::composeTable() const +{ + return m_composeTable; +} + +void TableGenerator::parseComposeFile(QFile *composeFile) +{ +#ifdef DEBUG_GENERATOR + qDebug() << "TableGenerator::parseComposeFile: " << composeFile->fileName(); +#endif + QTextStream in(composeFile); + + while (!in.atEnd()) { + QString line = in.readLine(); + if (line.startsWith(QLatin1String("<"))) { + parseKeySequence(line); + } else if (line.startsWith(QLatin1String("include"))) { + parseIncludeInstruction(line); + } + } + + composeFile->close(); +} + +void TableGenerator::parseIncludeInstruction(QString line) +{ + // Parse something that looks like: + // include "/usr/share/X11/locale/en_US.UTF-8/Compose" + QString quote = QStringLiteral("\""); + line.remove(0, line.indexOf(quote) + 1); + line.chop(line.length() - line.indexOf(quote)); + + // expand substitutions if present + line.replace(QLatin1String("%H"), QString(qgetenv("HOME"))); + line.replace(QLatin1String("%L"), locale()); + line.replace(QLatin1String("%S"), systemComposeDir()); + + processFile(line); +} + +ushort TableGenerator::keysymToUtf8(uint32_t sym) +{ + QByteArray chars; + int bytes; + chars.resize(8); + + if (needWorkaround(sym)) { + uint32_t codepoint; + if (sym == XKB_KEY_KP_Space) + codepoint = XKB_KEY_space & 0x7f; + else + codepoint = sym & 0x7f; + + bytes = utf32_to_utf8(codepoint, chars.data()); + } else { + bytes = xkb_keysym_to_utf8(sym, chars.data(), chars.size()); + } + + if (bytes == -1) + qWarning("TableGenerator::keysymToUtf8 - buffer too small"); + + chars.resize(bytes-1); + +#ifdef DEBUG_GENERATOR + QTextCodec *codec = QTextCodec::codecForLocale(); + qDebug() << QString("keysym - 0x%1 : utf8 - %2").arg(QString::number(sym, 16)) + .arg(codec->toUnicode(chars)); +#endif + const QChar *ch = QString(chars.data()).unicode(); + return ch->unicode(); +} + +uint32_t TableGenerator::stringToKeysym(QString keysymName) +{ + uint32_t keysym; + const char *name = keysymName.toLatin1().constData(); + + if ((keysym = xkb_keysym_from_name(name, (xkb_keysym_flags)0)) == XKB_KEY_NoSymbol) + qWarning() << QString("Qt Warrning - invalid keysym: %1").arg(keysymName); + + return keysym; +} + +void TableGenerator::parseKeySequence(QString line) +{ + // we are interested in the lines with the following format: + // <Multi_key> <numbersign> <S> : "♬" U266c # BEAMED SIXTEENTH NOTE + int keysEnd = line.indexOf(QLatin1String(":")); + QString keys = line.left(keysEnd).trimmed(); + + // find the key sequence + QString regexp = QStringLiteral("<[^>]+>"); + QRegularExpression reg(regexp); + QRegularExpressionMatchIterator i = reg.globalMatch(keys); + QStringList keyList; + while (i.hasNext()) { + QRegularExpressionMatch match = i.next(); + QString word = match.captured(0); + keyList << word; + } + + QComposeTableElement elem; + QString quote = QStringLiteral("\""); + // find the composed value - strings may be direct text encoded in the locale + // for which the compose file is to be used, or an escaped octal or hexadecimal + // character code. Octal codes are specified as "\123" and hexadecimal codes as "\0x123a". + int composeValueIndex = line.indexOf(quote, keysEnd) + 1; + const QChar valueType(line.at(composeValueIndex)); + + if (valueType == '\\' && line.at(composeValueIndex + 1).isDigit()) { + // handle octal and hex code values + QChar detectBase(line.at(composeValueIndex + 2)); + QString codeValue = line.mid(composeValueIndex + 1, line.lastIndexOf(quote) - composeValueIndex - 1); + if (detectBase == 'x') { + // hexadecimal character code + elem.value = keysymToUtf8(codeValue.toUInt(0, 16)); + } else { + // octal character code + QString hexStr = QString::number(codeValue.toUInt(0, 8), 16); + elem.value = keysymToUtf8(hexStr.toUInt(0, 16)); + } + } else { + // handle direct text encoded in the locale + elem.value = valueType.unicode(); + } + + // find the comment + int commnetIndex = line.lastIndexOf(quote) + 1; + elem.comment = line.mid(commnetIndex).trimmed(); + + // Convert to X11 keysym + int count = keyList.length(); + for (int i = 0; i < QT_KEYSEQUENCE_MAX_LEN; i++) { + if (i < count) { + QString keysym = keyList.at(i); + keysym.remove(keysym.length() - 1, 1); + keysym.remove(0, 1); + + if (keysym == QLatin1String("dead_inverted_breve")) + keysym = QStringLiteral("dead_invertedbreve"); + else if (keysym == QLatin1String("dead_double_grave")) + keysym = QStringLiteral("dead_doublegrave"); + + elem.keys[i] = stringToKeysym(keysym); + } else { + elem.keys[i] = 0; + } + } + m_composeTable.append(elem); +} + +void TableGenerator::printComposeTable() const +{ + if (composeTable().isEmpty()) + return; + + QString output; + QComposeTableElement elem; + QString comma = QStringLiteral(","); + int tableSize = m_composeTable.size(); + for (int i = 0; i < tableSize; ++i) { + elem = m_composeTable.at(i); + output.append(QLatin1String("{ {")); + for (int j = 0; j < QT_KEYSEQUENCE_MAX_LEN; j++) { + output.append(QString(QLatin1String("0x%1, ")).arg(QString::number(elem.keys[j],16))); + } + // take care of the trailing comma + if (i == tableSize - 1) + comma = QStringLiteral(""); + output.append(QString(QLatin1String("}, 0x%1, \"\" }%2 // %3 \n")) + .arg(QString::number(elem.value,16)) + .arg(comma) + .arg(elem.comment)); + } + + qDebug() << "output: \n" << output; +} + +void TableGenerator::orderComposeTable() +{ + // Stable-sorting to ensure that the item that appeared before the other in the + // original container will still appear first after the sort. This property is + // needed to handle the cases when user re-defines already defined key sequence + qStableSort(m_composeTable.begin(), m_composeTable.end(), Compare()); +} + diff --git a/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.h b/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.h new file mode 100644 index 0000000000..11e7b2b422 --- /dev/null +++ b/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.h @@ -0,0 +1,128 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, 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, Digia gives you certain additional +** rights. These rights are described in the Digia 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. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QTABLEGENERATOR_H +#define QTABLEGENERATOR_H + +#include <QtCore/QList> +#include <QtCore/QFile> +#include <QtCore/QMap> +#include <QtCore/QString> + +#define QT_KEYSEQUENCE_MAX_LEN 6 + +struct QComposeTableElement { + uint keys[QT_KEYSEQUENCE_MAX_LEN]; + uint value; + QString comment; +}; + +class Compare +{ +public: + bool operator () (const QComposeTableElement &lhs, const uint rhs[QT_KEYSEQUENCE_MAX_LEN]) + { + for (size_t i = 0; i < QT_KEYSEQUENCE_MAX_LEN; i++) { + if (lhs.keys[i] != rhs[i]) + return (lhs.keys[i] < rhs[i]); + } + return false; + } + + bool operator () (const QComposeTableElement &lhs, const QComposeTableElement &rhs) + { + for (size_t i = 0; i < QT_KEYSEQUENCE_MAX_LEN; i++) { + if (lhs.keys[i] != rhs.keys[i]) + return (lhs.keys[i] < rhs.keys[i]); + } + return false; + } +}; + +class TableGenerator +{ + +public: + enum TableState + { + UnsupportedLocale, + EmptyTable, + UnknownSystemComposeDir, + MissingComposeFile, + NoErrors + }; + + TableGenerator(); + ~TableGenerator(); + + void parseComposeFile(QFile *composeFile); + void printComposeTable() const; + void orderComposeTable(); + + QList<QComposeTableElement> composeTable() const; + TableState tableState() const { return m_state; } + +protected: + bool processFile(QString composeFileName); + void parseKeySequence(QString line); + void parseIncludeInstruction(QString line); + + void findComposeFile(); + bool findSystemComposeDir(); + QString systemComposeDir(); + + ushort keysymToUtf8(uint32_t sym); + uint32_t stringToKeysym(QString keysymName); + + void readLocaleMappings(); + void initPossibleLocations(); + bool cleanState() const { return ((m_state & NoErrors) == NoErrors); } + QString locale() const; + +private: + QList<QComposeTableElement> m_composeTable; + QMap<QString, QString> m_localeToTable; + TableState m_state; + QString m_systemComposeDir; + QList<QString> m_possibleLocations; +}; + +#endif // QTABLEGENERATOR_H diff --git a/src/plugins/platforminputcontexts/compose/main.cpp b/src/plugins/platforminputcontexts/compose/main.cpp new file mode 100644 index 0000000000..728c60caf5 --- /dev/null +++ b/src/plugins/platforminputcontexts/compose/main.cpp @@ -0,0 +1,70 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, 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, Digia gives you certain additional +** rights. These rights are described in the Digia 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. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <qpa/qplatforminputcontextplugin_p.h> + +#include <QtCore/QStringList> + +#include "qcomposeplatforminputcontext.h" + +QT_BEGIN_NAMESPACE + +class QComposePlatformInputContextPlugin : public QPlatformInputContextPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPlatformInputContextFactoryInterface" FILE "compose.json") + +public: + QComposeInputContext *create(const QString &, const QStringList &); +}; + +QComposeInputContext *QComposePlatformInputContextPlugin::create(const QString &system, const QStringList ¶mList) +{ + Q_UNUSED(paramList); + + if (system.compare(system, QStringLiteral("compose"), Qt::CaseInsensitive) == 0) + return new QComposeInputContext; + return 0; +} + +QT_END_NAMESPACE + +#include "main.moc" diff --git a/src/plugins/platforminputcontexts/compose/qcomposeplatforminputcontext.cpp b/src/plugins/platforminputcontexts/compose/qcomposeplatforminputcontext.cpp new file mode 100644 index 0000000000..433c9eec37 --- /dev/null +++ b/src/plugins/platforminputcontexts/compose/qcomposeplatforminputcontext.cpp @@ -0,0 +1,268 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, 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, Digia gives you certain additional +** rights. These rights are described in the Digia 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. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qcomposeplatforminputcontext.h" + +#include <QtCore/QCoreApplication> +#include <QtGui/QKeyEvent> +#include <QtCore/QDebug> + +QT_BEGIN_NAMESPACE + +//#define DEBUG_COMPOSING + +static const int ignoreKeys[] = { + Qt::Key_Shift, + Qt::Key_Control, + Qt::Key_Meta, + Qt::Key_Alt, + Qt::Key_CapsLock, + Qt::Key_Super_L, + Qt::Key_Super_R, + Qt::Key_Hyper_L, + Qt::Key_Hyper_R, + Qt::Key_Mode_switch +}; + +static const int composingKeys[] = { + Qt::Key_Multi_key, + Qt::Key_Dead_Grave, + Qt::Key_Dead_Acute, + Qt::Key_Dead_Circumflex, + Qt::Key_Dead_Tilde, + Qt::Key_Dead_Macron, + Qt::Key_Dead_Breve, + Qt::Key_Dead_Abovedot, + Qt::Key_Dead_Diaeresis, + Qt::Key_Dead_Abovering, + Qt::Key_Dead_Doubleacute, + Qt::Key_Dead_Caron, + Qt::Key_Dead_Cedilla, + Qt::Key_Dead_Ogonek, + Qt::Key_Dead_Iota, + Qt::Key_Dead_Voiced_Sound, + Qt::Key_Dead_Semivoiced_Sound, + Qt::Key_Dead_Belowdot, + Qt::Key_Dead_Hook, + Qt::Key_Dead_Horn +}; + +QComposeInputContext::QComposeInputContext() +{ + TableGenerator reader; + m_tableState = reader.tableState(); + + if ((m_tableState & TableGenerator::NoErrors) == TableGenerator::NoErrors) { + m_composeTable = reader.composeTable(); + clearComposeBuffer(); + } +} + +bool QComposeInputContext::filterEvent(const QEvent *event) +{ + // if there were errors when generating the compose table input + // context should not try to filter anything, simply return false + if ((m_tableState & TableGenerator::NoErrors) != TableGenerator::NoErrors) + return false; + + QKeyEvent *keyEvent = (QKeyEvent *)event; + // should pass only the key presses + if (keyEvent->type() != QEvent::KeyPress) { + return false; + } + + int keyval = keyEvent->key(); + int keysym = 0; + + if (ignoreKey(keyval)) + return false; + + QString text = keyEvent->text(); + if (!composeKey(keyval) && text.isEmpty()) + return false; + + keysym = keyEvent->nativeVirtualKey(); + + int nCompose = 0; + while (m_composeBuffer[nCompose] != 0 && nCompose < QT_KEYSEQUENCE_MAX_LEN) + nCompose++; + + if (nCompose == QT_KEYSEQUENCE_MAX_LEN) { + reset(); + nCompose = 0; + } + + m_composeBuffer[nCompose] = keysym; + // check sequence + if (checkComposeTable()) + return true; + + return false; +} + +bool QComposeInputContext::isValid() const +{ + return true; +} + +void QComposeInputContext::setFocusObject(QObject *object) +{ + m_focusObject = object; +} + +void QComposeInputContext::reset() +{ + clearComposeBuffer(); +} + +void QComposeInputContext::update(Qt::InputMethodQueries q) +{ + QPlatformInputContext::update(q); +} + +static bool isDuplicate(const QComposeTableElement &lhs, const QComposeTableElement &rhs) +{ + for (size_t i = 0; i < QT_KEYSEQUENCE_MAX_LEN; i++) { + if (lhs.keys[i] != rhs.keys[i]) + return false; + } + return true; +} + +bool QComposeInputContext::checkComposeTable() +{ + QList<QComposeTableElement>::iterator it = + qLowerBound(m_composeTable.begin(), m_composeTable.end(), m_composeBuffer, Compare()); + + // prevent dereferencing an 'end' iterator, which would result in a crash + if (it == m_composeTable.end()) + it -= 1; + + QComposeTableElement elem = *it; + // would be nicer if qLowerBound had API that tells if the item was actually found + if (m_composeBuffer[0] != elem.keys[0]) { +#ifdef DEBUG_COMPOSING + qDebug( "### no match ###" ); +#endif + reset(); + return false; + } + // check if compose buffer is matched + for (int i=0; i < QT_KEYSEQUENCE_MAX_LEN; i++) { + + // check if partial match + if (m_composeBuffer[i] == 0 && elem.keys[i]) { +#ifdef DEBUG_COMPOSING + qDebug("### partial match ###"); +#endif + return true; + } + + if (m_composeBuffer[i] != elem.keys[i]) { +#ifdef DEBUG_COMPOSING + qDebug("### different entry ###"); +#endif + reset(); + return i != 0; + } + } +#ifdef DEBUG_COMPOSING + qDebug("### match exactly ###"); +#endif + + // check if the key sequence is overwriten - see the comment in + // TableGenerator::orderComposeTable() + int next = 1; + do { + // if we are at the end of the table, then we have nothing to do here + if (it + next != m_composeTable.end()) { + QComposeTableElement nextElem = *(it + next); + if (isDuplicate(elem, nextElem)) { + elem = nextElem; + next++; + continue; + } else { + break; + } + } + break; + } while (true); + + commitText(elem.value); + reset(); + + return true; +} + +void QComposeInputContext::commitText(uint character) const +{ + QInputMethodEvent event; + event.setCommitString(QChar(character)); + QCoreApplication::sendEvent(m_focusObject, &event); +} + +bool QComposeInputContext::ignoreKey(int keyval) const +{ + for (uint i = 0; i < (sizeof(ignoreKeys) / sizeof(ignoreKeys[0])); i++) + if (keyval == ignoreKeys[i]) + return true; + + return false; +} + +bool QComposeInputContext::composeKey(int keyval) const +{ + for (uint i = 0; i < (sizeof(composingKeys) / sizeof(composingKeys[0])); i++) + if (keyval == composingKeys[i]) + return true; + + return false; +} + +void QComposeInputContext::clearComposeBuffer() +{ + for (uint i=0; i < (sizeof(m_composeBuffer) / sizeof(int)); i++) + m_composeBuffer[i] = 0; +} + +QComposeInputContext::~QComposeInputContext() {} + +QT_END_NAMESPACE diff --git a/src/plugins/platforminputcontexts/compose/qcomposeplatforminputcontext.h b/src/plugins/platforminputcontexts/compose/qcomposeplatforminputcontext.h new file mode 100644 index 0000000000..1ced2f8ded --- /dev/null +++ b/src/plugins/platforminputcontexts/compose/qcomposeplatforminputcontext.h @@ -0,0 +1,85 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, 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, Digia gives you certain additional +** rights. These rights are described in the Digia 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. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QCOMPOSEPLATFORMINPUTCONTEXT_H +#define QCOMPOSEPLATFORMINPUTCONTEXT_H + +#include <qpa/qplatforminputcontext.h> + +#include <QtCore/QList> + +#include "generator/qtablegenerator.h" + +QT_BEGIN_NAMESPACE + +class QEvent; + +class QComposeInputContext : public QPlatformInputContext +{ + Q_OBJECT + +public: + QComposeInputContext(); + ~QComposeInputContext(); + + bool isValid() const; + void setFocusObject(QObject *object); + void reset(); + void update(Qt::InputMethodQueries); + bool filterEvent(const QEvent *event); + +protected: + void clearComposeBuffer(); + bool ignoreKey(int keyval) const; + bool composeKey(int keyval) const; + bool checkComposeTable(); + void commitText(uint character) const; + +private: + QObject *m_focusObject; + QList<QComposeTableElement> m_composeTable; + uint m_composeBuffer[QT_KEYSEQUENCE_MAX_LEN + 1]; + TableGenerator::TableState m_tableState; +}; + +QT_END_NAMESPACE + +#endif // QCOMPOSEPLATFORMINPUTCONTEXT_H diff --git a/src/plugins/platforminputcontexts/compose/xkbcommon_workaround.h b/src/plugins/platforminputcontexts/compose/xkbcommon_workaround.h new file mode 100644 index 0000000000..58ce143978 --- /dev/null +++ b/src/plugins/platforminputcontexts/compose/xkbcommon_workaround.h @@ -0,0 +1,105 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, 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, Digia gives you certain additional +** rights. These rights are described in the Digia 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. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef XKBCOMMON_WORKAROUND_H +#define XKBCOMMON_WORKAROUND_H + +// Function utf32_to_utf8() is borrowed from the libxkbcommon library, +// file keysym-utf.c. The workaround should be removed once the fix from +// https://bugs.freedesktop.org/show_bug.cgi?id=56780 gets released. +static int utf32_to_utf8(uint32_t unichar, char *buffer) +{ + int count, shift, length; + uint8_t head; + + if (unichar <= 0x007f) { + buffer[0] = unichar; + buffer[1] = '\0'; + return 2; + } + else if (unichar <= 0x07FF) { + length = 2; + head = 0xc0; + } + else if (unichar <= 0xffff) { + length = 3; + head = 0xe0; + } + else if (unichar <= 0x1fffff) { + length = 4; + head = 0xf0; + } + else if (unichar <= 0x3ffffff) { + length = 5; + head = 0xf8; + } + else { + length = 6; + head = 0xfc; + } + + for (count = length - 1, shift = 0; count > 0; count--, shift += 6) + buffer[count] = 0x80 | ((unichar >> shift) & 0x3f); + + buffer[0] = head | ((unichar >> shift) & 0x3f); + buffer[length] = '\0'; + + return length + 1; +} + +static bool needWorkaround(uint32_t sym) +{ + /* patch encoding botch */ + if (sym == XKB_KEY_KP_Space) + return true; + + /* special keysyms */ + if ((sym >= XKB_KEY_BackSpace && sym <= XKB_KEY_Clear) || + (sym >= XKB_KEY_KP_Multiply && sym <= XKB_KEY_KP_9) || + sym == XKB_KEY_Return || sym == XKB_KEY_Escape || + sym == XKB_KEY_Delete || sym == XKB_KEY_KP_Tab || + sym == XKB_KEY_KP_Enter || sym == XKB_KEY_KP_Equal) + return true; + + return false; +} + +#endif // XKBCOMMON_WORKAROUND_H diff --git a/src/plugins/platforminputcontexts/platforminputcontexts.pro b/src/plugins/platforminputcontexts/platforminputcontexts.pro index 7b3c6e9c36..fb58de5edc 100644 --- a/src/plugins/platforminputcontexts/platforminputcontexts.pro +++ b/src/plugins/platforminputcontexts/platforminputcontexts.pro @@ -1,4 +1,10 @@ TEMPLATE = subdirs + qtHaveModule(dbus) { !mac:!win32:SUBDIRS += ibus maliit } + +unix:!macx:contains(QT_CONFIG, xkbcommon): { + SUBDIRS += compose +} + diff --git a/src/plugins/platforms/android/src/androidjnimain.cpp b/src/plugins/platforms/android/src/androidjnimain.cpp index f8f077908c..ae94e75e34 100644 --- a/src/plugins/platforms/android/src/androidjnimain.cpp +++ b/src/plugins/platforms/android/src/androidjnimain.cpp @@ -126,8 +126,6 @@ static int m_desktopHeightPixels = 0; static volatile bool m_pauseApplication; -static jmethodID m_setFullScreenMethodID = 0; - static AndroidAssetsFileEngineHandler *m_androidAssetsFileEngineHandler = 0; @@ -272,24 +270,6 @@ namespace QtAndroid return m_androidPlatformIntegration; } - void setFullScreen(QWidget *widget) - { - AttachedJNIEnv env; - if (!env.jniEnv) - return; - - bool fullScreen = widget->isFullScreen(); - if (!fullScreen) { - foreach (QWidget *w, qApp->topLevelWidgets()) { - fullScreen |= w->isFullScreen(); - if (fullScreen) - break; - } - } - - env.jniEnv->CallStaticVoidMethod(m_applicationClass, m_setFullScreenMethodID, fullScreen); - } - QWindow *topLevelWindowAt(const QPoint &globalPos) { return m_androidPlatformIntegration @@ -674,9 +654,9 @@ static void updateWindow(JNIEnv */*env*/, jobject /*thiz*/) if (!m_androidPlatformIntegration) return; - if (qApp != 0) { - foreach (QWidget *w, qApp->topLevelWidgets()) - w->update(); + if (QGuiApplication::instance() != 0) { + foreach (QWindow *w, QGuiApplication::topLevelWindows()) + QWindowSystemInterface::handleExposeEvent(w, QRegion(w->geometry())); } #ifndef ANDROID_PLUGIN_OPENGL @@ -763,7 +743,6 @@ static int registerNatives(JNIEnv *env) } GET_AND_CHECK_STATIC_METHOD(m_redrawSurfaceMethodID, m_applicationClass, "redrawSurface", "(IIII)V"); - GET_AND_CHECK_STATIC_METHOD(m_setFullScreenMethodID, m_applicationClass, "setFullScreen", "(Z)V"); #ifdef ANDROID_PLUGIN_OPENGL FIND_AND_CHECK_CLASS("android/view/Surface"); diff --git a/src/plugins/platforms/android/src/qandroidinputcontext.cpp b/src/plugins/platforms/android/src/qandroidinputcontext.cpp index 37fb605ea8..2180560b04 100644 --- a/src/plugins/platforms/android/src/qandroidinputcontext.cpp +++ b/src/plugins/platforms/android/src/qandroidinputcontext.cpp @@ -337,7 +337,10 @@ void QAndroidInputContext::reset() void QAndroidInputContext::commit() { finishComposingText(); +} +void QAndroidInputContext::updateCursorPosition() +{ QSharedPointer<QInputMethodQueryEvent> query = focusObjectInputMethodQuery(); if (!query.isNull()) { const int cursorPos = query->value(Qt::ImCursorPosition).toInt(); @@ -378,6 +381,12 @@ void QAndroidInputContext::showInputPanel() QSharedPointer<QInputMethodQueryEvent> query = focusObjectInputMethodQuery(); if (query.isNull()) return; + + disconnect(m_updateCursorPosConnection); + if (qGuiApp->focusObject()->metaObject()->indexOfSignal("cursorPositionChanged(int,int)") >= 0) // QLineEdit breaks the pattern + m_updateCursorPosConnection = connect(qGuiApp->focusObject(), SIGNAL(cursorPositionChanged(int,int)), this, SLOT(updateCursorPosition())); + else + m_updateCursorPosConnection = connect(qGuiApp->focusObject(), SIGNAL(cursorPositionChanged()), this, SLOT(updateCursorPosition())); QRectF itemRect = qGuiApp->inputMethod()->inputItemRectangle(); QRect rect = qGuiApp->inputMethod()->inputItemTransform().mapRect(itemRect).toRect(); QWindow *window = qGuiApp->focusWindow(); diff --git a/src/plugins/platforms/android/src/qandroidinputcontext.h b/src/plugins/platforms/android/src/qandroidinputcontext.h index e2b8107044..482aeffa50 100644 --- a/src/plugins/platforms/android/src/qandroidinputcontext.h +++ b/src/plugins/platforms/android/src/qandroidinputcontext.h @@ -119,10 +119,12 @@ private: private slots: virtual void sendEvent(QObject *receiver, QInputMethodEvent *event); virtual void sendEvent(QObject *receiver, QInputMethodQueryEvent *event); + void updateCursorPosition(); private: ExtractedText m_extractedText; QString m_composingText; + QMetaObject::Connection m_updateCursorPosConnection; }; QT_END_NAMESPACE diff --git a/src/plugins/platforms/android/src/src.pri b/src/plugins/platforms/android/src/src.pri index 9bf36b2337..76539b50ab 100644 --- a/src/plugins/platforms/android/src/src.pri +++ b/src/plugins/platforms/android/src/src.pri @@ -1,6 +1,6 @@ load(qt_plugin) -QT += core-private gui-private widgets-private platformsupport-private +QT += core-private gui-private platformsupport-private CONFIG += qpa/genericunixfontdatabase diff --git a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm index 55f94df45a..e1569d4f44 100644 --- a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm +++ b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm @@ -202,6 +202,13 @@ static void cleanupCocoaApplicationDelegate() if ([self canQuit]) { if (!startedQuit) { startedQuit = true; + // Close open windows. This is done in order to deliver de-expose + // events while the event loop is still running. + const QWindowList topLevels = QGuiApplication::topLevelWindows(); + for (int i = 0; i < topLevels.size(); ++i) { + topLevels.at(i)->close(); + } + QGuiApplication::exit(0); startedQuit = false; } diff --git a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm index 9cc0353dc6..297d81abab 100644 --- a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm +++ b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm @@ -586,7 +586,7 @@ QString QCocoaFileDialogHelper::directory() const { QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *delegate = static_cast<QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *>(mDelegate); if (delegate) - return QCFString::toQString([delegate->mSavePanel directory]); + return QCFString::toQString([[delegate->mSavePanel directoryURL] path]); return QString(); } diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.mm b/src/plugins/platforms/cocoa/qcocoaintegration.mm index d0fcf93b8c..3312de6e3f 100644 --- a/src/plugins/platforms/cocoa/qcocoaintegration.mm +++ b/src/plugins/platforms/cocoa/qcocoaintegration.mm @@ -90,11 +90,28 @@ void QCocoaScreen::updateGeometry() { NSScreen *nsScreen = osScreen(); NSRect frameRect = [nsScreen frame]; - m_geometry = QRect(frameRect.origin.x, frameRect.origin.y, frameRect.size.width, frameRect.size.height); - NSRect visibleRect = [nsScreen visibleFrame]; - m_availableGeometry = QRect(visibleRect.origin.x, - frameRect.size.height - (visibleRect.origin.y + visibleRect.size.height), // invert y - visibleRect.size.width, visibleRect.size.height); + + if (m_screenIndex == 0) { + m_geometry = QRect(frameRect.origin.x, frameRect.origin.y, frameRect.size.width, frameRect.size.height); + // This is the primary screen, the one that contains the menubar. Its origin should be + // (0, 0), and it's the only one whose available geometry differs from its full geometry. + NSRect visibleRect = [nsScreen visibleFrame]; + m_availableGeometry = QRect(visibleRect.origin.x, + frameRect.size.height - (visibleRect.origin.y + visibleRect.size.height), // invert y + visibleRect.size.width, visibleRect.size.height); + } else { + // NSScreen origin is at the bottom-left corner, QScreen is at the top-left corner. + // When we get the NSScreen frame rect, we need to re-align its origin y coordinate + // w.r.t. the primary screen, whose origin is (0, 0). + NSRect r = [[[NSScreen screens] objectAtIndex:0] frame]; + QRect referenceScreenGeometry = QRect(r.origin.x, r.origin.y, r.size.width, r.size.height); + m_geometry = QRect(frameRect.origin.x, + referenceScreenGeometry.height() - (frameRect.origin.y + frameRect.size.height), + frameRect.size.width, frameRect.size.height); + + // Not primary screen. See above. + m_availableGeometry = m_geometry; + } m_format = QImage::Format_RGB32; m_depth = NSBitsPerPixelFromDepth([nsScreen depth]); diff --git a/src/plugins/platforms/cocoa/qcocoakeymapper.h b/src/plugins/platforms/cocoa/qcocoakeymapper.h index 324b753131..0629de9317 100644 --- a/src/plugins/platforms/cocoa/qcocoakeymapper.h +++ b/src/plugins/platforms/cocoa/qcocoakeymapper.h @@ -99,7 +99,6 @@ private: const UCKeyboardLayout *unicode; void *other; } keyboard_layout_format; - KeyboardLayoutRef currentKeyboardLayout; KeyboardLayoutKind keyboard_kind; UInt32 keyboard_dead; KeyboardLayoutItem *keyLayout[256]; diff --git a/src/plugins/platforms/cocoa/qcocoamenuitem.mm b/src/plugins/platforms/cocoa/qcocoamenuitem.mm index bdcad6f490..40cffab3c9 100644 --- a/src/plugins/platforms/cocoa/qcocoamenuitem.mm +++ b/src/plugins/platforms/cocoa/qcocoamenuitem.mm @@ -195,7 +195,7 @@ NSMenuItem *QCocoaMenuItem::sync() QT_MANGLE_NAMESPACE(QCocoaMenuLoader) *loader = getMenuLoader(); switch (m_role) { case ApplicationSpecificRole: - mergeItem = [loader appSpecificMenuItem]; + mergeItem = [loader appSpecificMenuItem:reinterpret_cast<NSInteger>(this)]; break; case AboutRole: mergeItem = [loader aboutMenuItem]; diff --git a/src/plugins/platforms/cocoa/qcocoamenuloader.h b/src/plugins/platforms/cocoa/qcocoamenuloader.h index f95f684e8c..a45ec0fa89 100644 --- a/src/plugins/platforms/cocoa/qcocoamenuloader.h +++ b/src/plugins/platforms/cocoa/qcocoamenuloader.h @@ -79,7 +79,7 @@ - (NSMenuItem *)aboutMenuItem; - (NSMenuItem *)aboutQtMenuItem; - (NSMenuItem *)hideMenuItem; -- (NSMenuItem *)appSpecificMenuItem; +- (NSMenuItem *)appSpecificMenuItem:(NSInteger)tag; - (IBAction)terminate:(id)sender; - (IBAction)orderFrontStandardAboutPanel:(id)sender; - (IBAction)hideOtherApplications:(id)sender; diff --git a/src/plugins/platforms/cocoa/qcocoamenuloader.mm b/src/plugins/platforms/cocoa/qcocoamenuloader.mm index 2a9dcec64b..726fe5c6d2 100644 --- a/src/plugins/platforms/cocoa/qcocoamenuloader.mm +++ b/src/plugins/platforms/cocoa/qcocoamenuloader.mm @@ -246,11 +246,17 @@ QT_END_NAMESPACE return [[hideItem retain] autorelease]; } -- (NSMenuItem *)appSpecificMenuItem +- (NSMenuItem *)appSpecificMenuItem:(NSInteger)tag { + NSMenuItem *item = [appMenu itemWithTag:tag]; + + // No reason to create the item if it already exists. See QTBUG-27202. + if (item) + return [[item retain] autorelease]; + // Create an App-Specific menu item, insert it into the menu and return // it as an autorelease item. - NSMenuItem *item = [[NSMenuItem alloc] init]; + item = [[NSMenuItem alloc] init]; NSInteger location; if (lastAppSpecificItem == nil) { diff --git a/src/plugins/platforms/cocoa/qcocoanativeinterface.h b/src/plugins/platforms/cocoa/qcocoanativeinterface.h index 2f79b49534..ca84312059 100644 --- a/src/plugins/platforms/cocoa/qcocoanativeinterface.h +++ b/src/plugins/platforms/cocoa/qcocoanativeinterface.h @@ -52,6 +52,7 @@ class QWidget; class QPlatformPrinterSupport; class QPrintEngine; class QPlatformMenu; +class QPlatformMenuBar; class QCocoaNativeInterface : public QPlatformNativeInterface { @@ -99,12 +100,27 @@ private: // Dock menu support static void setDockMenu(QPlatformMenu *platformMenu); + // Function to return NSMenu * from QPlatformMenu + static void *qMenuToNSMenu(QPlatformMenu *platformMenu); + + // Function to return NSMenu * from QPlatformMenuBar + static void *qMenuBarToNSMenu(QPlatformMenuBar *platformMenuBar); + // QImage <-> CGImage conversion functions static CGImageRef qImageToCGImage(const QImage &image); static QImage cgImageToQImage(CGImageRef image); // Embedding NSViews as child QWindows static void setWindowContentView(QPlatformWindow *window, void *nsViewContentView); + + // Register if a window should deliver touch events. Enabling + // touch events has implications for delivery of other events, + // for example by causing scrolling event lag. + // + // The registration is ref-counted: multiple widgets can enable + // touch events, which then will be delivered until the widget + // deregisters. + static void registerTouchWindow(QWindow *window, bool enable); }; #endif // QCOCOANATIVEINTERFACE_H diff --git a/src/plugins/platforms/cocoa/qcocoanativeinterface.mm b/src/plugins/platforms/cocoa/qcocoanativeinterface.mm index 9990537c1f..ededb63487 100644 --- a/src/plugins/platforms/cocoa/qcocoanativeinterface.mm +++ b/src/plugins/platforms/cocoa/qcocoanativeinterface.mm @@ -109,12 +109,18 @@ QPlatformNativeInterface::NativeResourceForIntegrationFunction QCocoaNativeInter return NativeResourceForIntegrationFunction(QCocoaNativeInterface::registerDraggedTypes); if (resource.toLower() == "setdockmenu") return NativeResourceForIntegrationFunction(QCocoaNativeInterface::setDockMenu); + if (resource.toLower() == "qmenutonsmenu") + return NativeResourceForIntegrationFunction(QCocoaNativeInterface::qMenuToNSMenu); + if (resource.toLower() == "qmenubartonsmenu") + return NativeResourceForIntegrationFunction(QCocoaNativeInterface::qMenuBarToNSMenu); if (resource.toLower() == "qimagetocgimage") return NativeResourceForIntegrationFunction(QCocoaNativeInterface::qImageToCGImage); if (resource.toLower() == "cgimagetoqimage") return NativeResourceForIntegrationFunction(QCocoaNativeInterface::cgImageToQImage); if (resource.toLower() == "setwindowcontentview") return NativeResourceForIntegrationFunction(QCocoaNativeInterface::setWindowContentView); + if (resource.toLower() == "registertouchwindow") + return NativeResourceForIntegrationFunction(QCocoaNativeInterface::registerTouchWindow); return 0; } @@ -187,7 +193,24 @@ void QCocoaNativeInterface::setDockMenu(QPlatformMenu *platformMenu) QCocoaMenu *cocoaPlatformMenu = static_cast<QCocoaMenu *>(platformMenu); NSMenu *menu = cocoaPlatformMenu->nsMenu(); // setDockMenu seems to be undocumented, but this is what Qt 4 did. - [NSApp setDockMenu: menu]; + if ([NSApp respondsToSelector:@selector(setDockMenu:)]) + [NSApp setDockMenu: menu]; + else + qWarning("Could not set dock menu: [NSApp setDockMenu] is not available."); +} + +void *QCocoaNativeInterface::qMenuToNSMenu(QPlatformMenu *platformMenu) +{ + QCocoaMenu *cocoaPlatformMenu = static_cast<QCocoaMenu *>(platformMenu); + NSMenu *menu = cocoaPlatformMenu->nsMenu(); + return reinterpret_cast<void *>(menu); +} + +void *QCocoaNativeInterface::qMenuBarToNSMenu(QPlatformMenuBar *platformMenuBar) +{ + QCocoaMenuBar *cocoaPlatformMenuBar = static_cast<QCocoaMenuBar *>(platformMenuBar); + NSMenu *menu = cocoaPlatformMenuBar->nsMenu(); + return reinterpret_cast<void *>(menu); } CGImageRef QCocoaNativeInterface::qImageToCGImage(const QImage &image) @@ -206,4 +229,11 @@ void QCocoaNativeInterface::setWindowContentView(QPlatformWindow *window, void * cocoaPlatformWindow->setContentView(reinterpret_cast<NSView *>(contentView)); } +void QCocoaNativeInterface::registerTouchWindow(QWindow *window, bool enable) +{ + QCocoaWindow *cocoaWindow = static_cast<QCocoaWindow *>(window->handle()); + if (cocoaWindow) + cocoaWindow->registerTouch(enable); +} + QT_END_NAMESPACE diff --git a/src/plugins/platforms/cocoa/qcocoasystemsettings.mm b/src/plugins/platforms/cocoa/qcocoasystemsettings.mm index 6f8d0fa22a..8b0c14a984 100644 --- a/src/plugins/platforms/cocoa/qcocoasystemsettings.mm +++ b/src/plugins/platforms/cocoa/qcocoasystemsettings.mm @@ -179,14 +179,14 @@ QHash<QPlatformTheme::Palette, QPalette*> qt_mac_createRolePalettes() if (mac_widget_colors[i].active != 0) { qc = qt_mac_colorForThemeTextColor(mac_widget_colors[i].active); pal.setColor(QPalette::Active, QPalette::Text, qc); + pal.setColor(QPalette::Inactive, QPalette::Text, qc); pal.setColor(QPalette::Active, QPalette::WindowText, qc); + pal.setColor(QPalette::Inactive, QPalette::WindowText, qc); pal.setColor(QPalette::Active, QPalette::HighlightedText, qc); + pal.setColor(QPalette::Inactive, QPalette::HighlightedText, qc); qc = qt_mac_colorForThemeTextColor(mac_widget_colors[i].inactive); - pal.setColor(QPalette::Inactive, QPalette::Text, qc); pal.setColor(QPalette::Disabled, QPalette::Text, qc); - pal.setColor(QPalette::Inactive, QPalette::WindowText, qc); pal.setColor(QPalette::Disabled, QPalette::WindowText, qc); - pal.setColor(QPalette::Inactive, QPalette::HighlightedText, qc); pal.setColor(QPalette::Disabled, QPalette::HighlightedText, qc); } if (mac_widget_colors[i].paletteRole == QPlatformTheme::MenuPalette) { diff --git a/src/plugins/platforms/cocoa/qcocoawindow.h b/src/plugins/platforms/cocoa/qcocoawindow.h index 84dcaad206..e1de5f0add 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.h +++ b/src/plugins/platforms/cocoa/qcocoawindow.h @@ -108,6 +108,8 @@ public: void setWindowIcon(const QIcon &icon); void raise(); void lower(); + bool isExposed() const; + bool isOpaque() const; void propagateSizeHints(); void setOpacity(qreal level); void setMask(const QRegion ®ion); @@ -145,7 +147,12 @@ public: void setMenubar(QCocoaMenuBar *mb); QCocoaMenuBar *menubar() const; + void registerTouch(bool enable); + qreal devicePixelRatio() const; + void exposeWindow(); + void obscureWindow(); + QWindow *childWindowAt(QPoint windowPoint); protected: // NSWindow handling. The QCocoaWindow/QNSView can either be displayed // in an existing NSWindow or in one created by Qt. @@ -158,8 +165,6 @@ protected: QCocoaWindow *parentCocoaWindow() const; void syncWindowState(Qt::WindowState newState); - void updateOpaque(); - // private: public: // for QNSView friend class QCocoaBackingStore; @@ -175,6 +180,7 @@ public: // for QNSView Qt::WindowState m_synchedWindowState; Qt::WindowModality m_windowModality; QPointer<QWindow> m_activePopupWindow; + QPointer<QWindow> m_underMouseWindow; bool m_inConstructor; QCocoaGLContext *m_glContext; @@ -182,6 +188,8 @@ public: // for QNSView bool m_hasModalSession; bool m_frameStrutEventsEnabled; + bool m_isExposed; + int m_registerTouchCount; }; QT_END_NAMESPACE diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index 5eab036661..e74f9dcfe0 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -200,6 +200,8 @@ QCocoaWindow::QCocoaWindow(QWindow *tlw) , m_menubar(0) , m_hasModalSession(false) , m_frameStrutEventsEnabled(false) + , m_isExposed(false) + , m_registerTouchCount(0) { #ifdef QT_COCOA_ENABLE_WINDOW_DEBUG qDebug() << "QCocoaWindow::QCocoaWindow" << this; @@ -260,6 +262,9 @@ void QCocoaWindow::setCocoaGeometry(const QRect &rect) void QCocoaWindow::setVisible(bool visible) { QCocoaAutoReleasePool pool; + QCocoaWindow *parentCocoaWindow = 0; + if (window()->transientParent()) + parentCocoaWindow = static_cast<QCocoaWindow *>(window()->transientParent()->handle()); #ifdef QT_COCOA_ENABLE_WINDOW_DEBUG qDebug() << "QCocoaWindow::setVisible" << window() << visible; #endif @@ -267,10 +272,7 @@ void QCocoaWindow::setVisible(bool visible) // We need to recreate if the modality has changed as the style mask will need updating if (m_windowModality != window()->modality()) recreateWindow(parent()); - QCocoaWindow *parentCocoaWindow = 0; - if (window()->transientParent()) { - parentCocoaWindow = static_cast<QCocoaWindow *>(window()->transientParent()->handle()); - + if (parentCocoaWindow) { // The parent window might have moved while this window was hidden, // update the window geometry if there is a parent. setGeometry(window()->geometry()); @@ -280,13 +282,20 @@ void QCocoaWindow::setVisible(bool visible) if (window()->type() == Qt::Popup) { // qDebug() << "transientParent and popup" << window()->type() << Qt::Popup << (window()->type() & Qt::Popup); parentCocoaWindow->m_activePopupWindow = window(); + // QTBUG-30266: a window should not be resizable while a transient popup is open + // Since this isn't a native popup, the window manager doesn't close the popup when you click outside + [parentCocoaWindow->m_nsWindow setStyleMask: + (parentCocoaWindow->windowStyleMask(parentCocoaWindow->m_windowFlags) & ~NSResizableWindowMask)]; } } - // Make sure the QWindow has a frame ready before we show the NSWindow. - QWindowSystemInterface::handleExposeEvent(window(), QRect(QPoint(), geometry().size())); - QWindowSystemInterface::flushWindowSystemEvents(); + // This call is here to handle initial window show correctly: + // - top-level windows need to have backing store content ready when the + // window is shown, sendin the expose event here makes that more likely. + // - QNSViews for child windows are initialy not hidden and won't get the + // viewDidUnhide message. + exposeWindow(); if (m_nsWindow) { // setWindowState might have been called while the window was hidden and @@ -338,8 +347,9 @@ void QCocoaWindow::setVisible(bool visible) } else { [m_contentView setHidden:YES]; } - if (!QCoreApplication::closingDown()) - QWindowSystemInterface::handleExposeEvent(window(), QRegion()); + if (parentCocoaWindow && window()->type() == Qt::Popup) + // QTBUG-30266: a window should not be resizable while a transient popup is open + [parentCocoaWindow->m_nsWindow setStyleMask:parentCocoaWindow->windowStyleMask(parentCocoaWindow->m_windowFlags)]; } } @@ -376,7 +386,7 @@ NSUInteger QCocoaWindow::windowStyleMask(Qt::WindowFlags flags) NSInteger styleMask = NSBorderlessWindowMask; if ((type & Qt::Popup) == Qt::Popup) { - if (!windowIsPopupType(type)) + if (!windowIsPopupType(type) && !(flags & Qt::FramelessWindowHint)) styleMask = (NSUtilityWindowMask | NSResizableWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask | NSTitledWindowMask); } else { @@ -491,6 +501,19 @@ void QCocoaWindow::lower() [m_nsWindow orderBack: m_nsWindow]; } +bool QCocoaWindow::isExposed() const +{ + return m_isExposed; +} + +bool QCocoaWindow::isOpaque() const +{ + bool translucent = (window()->format().alphaBufferSize() > 0 + || window()->opacity() < 1 + || (m_qtView && [m_qtView hasMask])); + return !translucent; +} + void QCocoaWindow::propagateSizeHints() { QCocoaAutoReleasePool pool; @@ -529,20 +552,11 @@ void QCocoaWindow::propagateSizeHints() } } -void QCocoaWindow::updateOpaque() -{ - bool translucent = window()->format().alphaBufferSize() > 0 - || window()->opacity() < 1 - || (m_contentView && [m_contentView hasMask]); - [m_nsWindow setOpaque:!translucent]; -} - - void QCocoaWindow::setOpacity(qreal level) { if (m_nsWindow) { [m_nsWindow setAlphaValue:level]; - updateOpaque(); + [m_nsWindow setOpaque: isOpaque()]; } } @@ -552,7 +566,7 @@ void QCocoaWindow::setMask(const QRegion ®ion) [m_nsWindow setBackgroundColor:[NSColor clearColor]]; [m_qtView setMaskRegion:®ion]; - updateOpaque(); + [m_nsWindow setOpaque: isOpaque()]; } bool QCocoaWindow::setKeyboardGrabEnabled(bool grab) @@ -886,6 +900,15 @@ QCocoaMenuBar *QCocoaWindow::menubar() const return m_menubar; } +void QCocoaWindow::registerTouch(bool enable) +{ + m_registerTouchCount += enable ? 1 : -1; + if (m_registerTouchCount == 1) + [m_contentView setAcceptsTouchEvents:YES]; + else if (m_registerTouchCount == 0) + [m_contentView setAcceptsTouchEvents:NO]; +} + qreal QCocoaWindow::devicePixelRatio() const { #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7 @@ -898,6 +921,37 @@ qreal QCocoaWindow::devicePixelRatio() const } } +void QCocoaWindow::exposeWindow() +{ + if (!m_isExposed) { + m_isExposed = true; + QWindowSystemInterface::handleExposeEvent(window(), QRegion(geometry())); + } +} + +void QCocoaWindow::obscureWindow() +{ + if (m_isExposed) { + m_isExposed = false; + QWindowSystemInterface::handleExposeEvent(window(), QRegion()); + } +} + +QWindow *QCocoaWindow::childWindowAt(QPoint windowPoint) +{ + QWindow *targetWindow = window(); + foreach (QObject *child, targetWindow->children()) { + if (QWindow *childWindow = qobject_cast<QWindow *>(child)) { + if (childWindow->geometry().contains(windowPoint)) { + QCocoaWindow* platformWindow = static_cast<QCocoaWindow*>(childWindow->handle()); + targetWindow = platformWindow->childWindowAt(windowPoint - childWindow->position()); + } + } + } + + return targetWindow; +} + QMargins QCocoaWindow::frameMargins() const { NSRect frameW = [m_nsWindow frame]; diff --git a/src/plugins/platforms/cocoa/qnsview.h b/src/plugins/platforms/cocoa/qnsview.h index 5fe0861e0a..e7ea3d8f8d 100644 --- a/src/plugins/platforms/cocoa/qnsview.h +++ b/src/plugins/platforms/cocoa/qnsview.h @@ -59,6 +59,7 @@ QT_END_NAMESPACE QPoint m_backingStoreOffset; CGImageRef m_maskImage; uchar *m_maskData; + bool m_shouldInvalidateWindowShadow; QWindow *m_window; QCocoaWindow *m_platformWindow; Qt::MouseButtons m_buttons; @@ -76,14 +77,18 @@ QT_END_NAMESPACE - (void)setQCocoaGLContext:(QCocoaGLContext *)context; - (void)flushBackingStore:(QCocoaBackingStore *)backingStore region:(const QRegion &)region offset:(QPoint)offset; - (void)setMaskRegion:(const QRegion *)region; +- (void)invalidateWindowShadowIfNeeded; - (void)drawRect:(NSRect)dirtyRect; - (void)updateGeometry; - (void)windowNotification : (NSNotification *) windowNotification; +- (void)viewDidHide; +- (void)viewDidUnhide; - (BOOL)isFlipped; - (BOOL)acceptsFirstResponder; - (BOOL)becomeFirstResponder; - (BOOL)hasMask; +- (BOOL)isOpaque; - (void)resetMouseButtons; diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm index 18714ddbae..3046b898df 100644 --- a/src/plugins/platforms/cocoa/qnsview.mm +++ b/src/plugins/platforms/cocoa/qnsview.mm @@ -80,6 +80,7 @@ static QTouchDevice *touchDevice = 0; m_backingStore = 0; m_maskImage = 0; m_maskData = 0; + m_shouldInvalidateWindowShadow = false; m_window = 0; m_buttons = Qt::NoButton; m_sendKeyEvent = false; @@ -240,6 +241,7 @@ static QTouchDevice *touchDevice = 0; // Send a geometry change event to Qt, if it's ready to handle events if (!m_platformWindow->m_inConstructor) { QWindowSystemInterface::handleGeometryChange(m_window, geometry); + QWindowSystemInterface::handleExposeEvent(m_window, geometry); QWindowSystemInterface::flushWindowSystemEvents(); } } @@ -266,10 +268,10 @@ static QTouchDevice *touchDevice = 0; QWindowSystemInterface::handleWindowStateChanged(m_window, Qt::WindowMinimized); } else if (notificationName == NSWindowDidDeminiaturizeNotification) { QWindowSystemInterface::handleWindowStateChanged(m_window, Qt::WindowNoState); - // Qt expects an expose event after restore/deminiaturize. This also needs - // to be a non-synchronous event to make sure it gets processed after - // the state change event sent above. - QWindowSystemInterface::handleExposeEvent(m_window, QRegion(m_window->geometry())); + } else if ([notificationName isEqualToString: @"NSWindowDidOrderOffScreenNotification"]) { + m_platformWindow->obscureWindow(); + } else if ([notificationName isEqualToString: @"NSWindowDidOrderOnScreenAndFinishAnimatingNotification"]) { + m_platformWindow->exposeWindow(); } else { #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7 @@ -285,6 +287,16 @@ static QTouchDevice *touchDevice = 0; } } +- (void)viewDidHide +{ + m_platformWindow->obscureWindow(); +} + +- (void)viewDidUnhide +{ + m_platformWindow->exposeWindow(); +} + - (void) flushBackingStore:(QCocoaBackingStore *)backingStore region:(const QRegion &)region offset:(QPoint)offset { m_backingStore = backingStore; @@ -298,15 +310,21 @@ static QTouchDevice *touchDevice = 0; return m_maskData != 0; } +- (BOOL) isOpaque +{ + return m_platformWindow->isOpaque(); +} + - (void) setMaskRegion:(const QRegion *)region { + m_shouldInvalidateWindowShadow = true; if (m_maskImage) CGImageRelease(m_maskImage); if (region->isEmpty()) { m_maskImage = 0; } - const QRect &rect = qt_mac_toQRect([self frame]); + const QRect &rect = region->boundingRect(); QImage maskImage(rect.size(), QImage::Format_RGB888); maskImage.fill(Qt::white); QPainter p(&maskImage); @@ -319,6 +337,14 @@ static QTouchDevice *touchDevice = 0; m_maskImage = qt_mac_toCGImage(maskImage, true, &m_maskData); } +- (void)invalidateWindowShadowIfNeeded +{ + if (m_shouldInvalidateWindowShadow && m_platformWindow->m_nsWindow) { + [m_platformWindow->m_nsWindow invalidateShadow]; + m_shouldInvalidateWindowShadow = false; + } +} + - (void) drawRect:(NSRect)dirtyRect { if (!m_backingStore) @@ -373,6 +399,8 @@ static QTouchDevice *touchDevice = 0; CGContextRestoreGState(cgContext); CGImageRelease(cleanImg); CGImageRelease(subMask); + + [self invalidateWindowShadowIfNeeded]; } - (BOOL) isFlipped @@ -382,6 +410,8 @@ static QTouchDevice *touchDevice = 0; - (BOOL)becomeFirstResponder { + if (m_window->flags() & Qt::WindowTransparentForInput) + return NO; QWindow *focusWindow = m_window; // For widgets we need to do a bit of trickery as the window @@ -399,6 +429,8 @@ static QTouchDevice *touchDevice = 0; { if (m_window->flags() & Qt::WindowDoesNotAcceptFocus) return NO; + if (m_window->flags() & Qt::WindowTransparentForInput) + return NO; if ((m_window->flags() & Qt::ToolTip) == Qt::ToolTip) return NO; return YES; @@ -406,7 +438,9 @@ static QTouchDevice *touchDevice = 0; - (BOOL)acceptsFirstMouse:(NSEvent *)theEvent { - Q_UNUSED(theEvent); + Q_UNUSED(theEvent) + if (m_window->flags() & Qt::WindowTransparentForInput) + return NO; return YES; } @@ -511,6 +545,8 @@ static QTouchDevice *touchDevice = 0; - (void)mouseDown:(NSEvent *)theEvent { + if (m_window->flags() & Qt::WindowTransparentForInput) + return [super mouseDown:theEvent]; m_sendUpAsRightButton = false; if (m_platformWindow->m_activePopupWindow) { QWindowSystemInterface::handleCloseEvent(m_platformWindow->m_activePopupWindow); @@ -535,6 +571,8 @@ static QTouchDevice *touchDevice = 0; - (void)mouseDragged:(NSEvent *)theEvent { + if (m_window->flags() & Qt::WindowTransparentForInput) + return [super mouseDragged:theEvent]; if (!(m_buttons & Qt::LeftButton)) qWarning("QNSView mouseDragged: Internal mouse button tracking invalid (missing Qt::LeftButton)"); [self handleMouseEvent:theEvent]; @@ -542,6 +580,8 @@ static QTouchDevice *touchDevice = 0; - (void)mouseUp:(NSEvent *)theEvent { + if (m_window->flags() & Qt::WindowTransparentForInput) + return [super mouseUp:theEvent]; if (m_sendUpAsRightButton) { m_buttons &= ~Qt::RightButton; m_sendUpAsRightButton = false; @@ -559,6 +599,7 @@ static QTouchDevice *touchDevice = 0; if (NSIsEmptyRect([self visibleRect])) return; + // Remove current trakcing areas: QCocoaAutoReleasePool pool; if (NSArray *trackingArray = [self trackingAreas]) { NSUInteger size = [trackingArray count]; @@ -571,7 +612,7 @@ static QTouchDevice *touchDevice = 0; // Ideally, we shouldn't have NSTrackingMouseMoved events included below, it should // only be turned on if mouseTracking, hover is on or a tool tip is set. // Unfortunately, Qt will send "tooltip" events on mouse moves, so we need to - // turn it on in ALL case. That means EVERY QCocoaView gets to pay the cost of + // turn it on in ALL case. That means EVERY QWindow gets to pay the cost of // mouse moves delivered to it (Apple recommends keeping it OFF because there // is a performance hit). So it goes. NSUInteger trackingOptions = NSTrackingMouseEnteredAndExited | NSTrackingActiveInActiveApp @@ -586,30 +627,74 @@ static QTouchDevice *touchDevice = 0; - (void)mouseMoved:(NSEvent *)theEvent { - [self handleMouseEvent:theEvent]; + if (m_window->flags() & Qt::WindowTransparentForInput) + return [super mouseMoved:theEvent]; + + QPoint windowPoint, screenPoint; + [self convertFromEvent:theEvent toWindowPoint:&windowPoint andScreenPoint:&screenPoint]; + QWindow *childWindow = m_platformWindow->childWindowAt(windowPoint); + + // Top-level windows generate enter-leave events for sub-windows. + // Qt wants to know which window (if any) will be entered at the + // the time of the leave. This is dificult to accomplish by + // handling mouseEnter and mouseLeave envents, since they are sent + // individually to different views. + if (m_platformWindow->m_nsWindow && childWindow) { + if (childWindow != m_platformWindow->m_underMouseWindow) { + QWindowSystemInterface::handleEnterLeaveEvent(childWindow, m_platformWindow->m_underMouseWindow, windowPoint, screenPoint); + m_platformWindow->m_underMouseWindow = childWindow; + } + } + + // Cocoa keeps firing mouse move events for obscured parent views. Qt should not + // send those events so filter them out here. + if (childWindow != m_window) + return; + + [self handleMouseEvent: theEvent]; } - (void)mouseEntered:(NSEvent *)theEvent { + if (m_window->flags() & Qt::WindowTransparentForInput) + return [super mouseEntered:theEvent]; + + // Top-level windows generate enter events for sub-windows. + if (!m_platformWindow->m_nsWindow) + return; + QPoint windowPoint, screenPoint; [self convertFromEvent:theEvent toWindowPoint:&windowPoint andScreenPoint:&screenPoint]; - QWindowSystemInterface::handleEnterEvent(m_window, windowPoint, screenPoint); + m_platformWindow->m_underMouseWindow = m_platformWindow->childWindowAt(windowPoint); + QWindowSystemInterface::handleEnterEvent(m_platformWindow->m_underMouseWindow, windowPoint, screenPoint); } - (void)mouseExited:(NSEvent *)theEvent { + if (m_window->flags() & Qt::WindowTransparentForInput) + return [super mouseExited:theEvent]; Q_UNUSED(theEvent); - QWindowSystemInterface::handleLeaveEvent(m_window); + + // Top-level windows generate leave events for sub-windows. + if (!m_platformWindow->m_nsWindow) + return; + + QWindowSystemInterface::handleLeaveEvent(m_platformWindow->m_underMouseWindow); + m_platformWindow->m_underMouseWindow = 0; } - (void)rightMouseDown:(NSEvent *)theEvent { + if (m_window->flags() & Qt::WindowTransparentForInput) + return [super rightMouseDown:theEvent]; m_buttons |= Qt::RightButton; [self handleMouseEvent:theEvent]; } - (void)rightMouseDragged:(NSEvent *)theEvent { + if (m_window->flags() & Qt::WindowTransparentForInput) + return [super rightMouseDragged:theEvent]; if (!(m_buttons & Qt::RightButton)) qWarning("QNSView rightMouseDragged: Internal mouse button tracking invalid (missing Qt::RightButton)"); [self handleMouseEvent:theEvent]; @@ -617,18 +702,24 @@ static QTouchDevice *touchDevice = 0; - (void)rightMouseUp:(NSEvent *)theEvent { + if (m_window->flags() & Qt::WindowTransparentForInput) + return [super rightMouseUp:theEvent]; m_buttons &= ~Qt::RightButton; [self handleMouseEvent:theEvent]; } - (void)otherMouseDown:(NSEvent *)theEvent { + if (m_window->flags() & Qt::WindowTransparentForInput) + return [super otherMouseDown:theEvent]; m_buttons |= cocoaButton2QtButton([theEvent buttonNumber]); [self handleMouseEvent:theEvent]; } - (void)otherMouseDragged:(NSEvent *)theEvent { + if (m_window->flags() & Qt::WindowTransparentForInput) + return [super otherMouseDragged:theEvent]; if (!(m_buttons & ~(Qt::LeftButton | Qt::RightButton))) qWarning("QNSView otherMouseDragged: Internal mouse button tracking invalid (missing Qt::MiddleButton or Qt::ExtraButton*)"); [self handleMouseEvent:theEvent]; @@ -636,6 +727,8 @@ static QTouchDevice *touchDevice = 0; - (void)otherMouseUp:(NSEvent *)theEvent { + if (m_window->flags() & Qt::WindowTransparentForInput) + return [super otherMouseUp:theEvent]; m_buttons &= ~cocoaButton2QtButton([theEvent buttonNumber]); [self handleMouseEvent:theEvent]; } @@ -671,6 +764,8 @@ static QTouchDevice *touchDevice = 0; #ifndef QT_NO_WHEELEVENT - (void)scrollWheel:(NSEvent *)theEvent { + if (m_window->flags() & Qt::WindowTransparentForInput) + return [super scrollWheel:theEvent]; const EventRef carbonEvent = (EventRef)[theEvent eventRef]; const UInt32 carbonEventKind = carbonEvent ? ::GetEventKind(carbonEvent) : 0; const bool scrollEvent = carbonEventKind == kEventMouseScroll; @@ -778,6 +873,7 @@ static QTouchDevice *touchDevice = 0; ulong nativeModifiers = [nsevent modifierFlags]; Qt::KeyboardModifiers modifiers = [self convertKeyModifiers: nativeModifiers]; NSString *charactersIgnoringModifiers = [nsevent charactersIgnoringModifiers]; + NSString *characters = [nsevent characters]; // [from Qt 4 impl] There is no way to get the scan code from carbon. But we cannot // use the value 0, since it indicates that the event originates from somewhere @@ -790,9 +886,12 @@ static QTouchDevice *touchDevice = 0; QChar ch; int keyCode; - if ([charactersIgnoringModifiers length] > 0) { - // convert the first character into a key code - ch = QChar([charactersIgnoringModifiers characterAtIndex:0]); + if ([charactersIgnoringModifiers length] > 0) { // convert the first character into a key code + if ((modifiers & Qt::ControlModifier) && ([characters length] != 0)) { + ch = QChar([characters characterAtIndex:0]); + } else { + ch = QChar([charactersIgnoringModifiers characterAtIndex:0]); + } keyCode = [self convertKeyCode:ch]; } else { // might be a dead key @@ -808,7 +907,7 @@ static QTouchDevice *touchDevice = 0; // ignore text for the U+F700-U+F8FF range. This is used by Cocoa when // delivering function keys (e.g. arrow keys, backspace, F1-F35, etc.) if ([charactersIgnoringModifiers length] == 1 && (ch.unicode() < 0xf700 || ch.unicode() > 0xf8ff)) - text = QCFString::toQString([nsevent characters]); + text = QCFString::toQString(characters); if (m_composingText.isEmpty()) m_sendKeyEvent = !QWindowSystemInterface::tryHandleShortcutEvent(m_window, timestamp, keyCode, modifiers, text); @@ -836,11 +935,15 @@ static QTouchDevice *touchDevice = 0; - (void)keyDown:(NSEvent *)nsevent { + if (m_window->flags() & Qt::WindowTransparentForInput) + return [super keyDown:nsevent]; [self handleKeyEvent:nsevent eventType:int(QEvent::KeyPress)]; } - (void)keyUp:(NSEvent *)nsevent { + if (m_window->flags() & Qt::WindowTransparentForInput) + return [super keyUp:nsevent]; [self handleKeyEvent:nsevent eventType:int(QEvent::KeyRelease)]; } diff --git a/src/plugins/platforms/qnx/qqnxabstractnavigator.cpp b/src/plugins/platforms/qnx/qqnxabstractnavigator.cpp index 08da98d690..5a94bff14e 100644 --- a/src/plugins/platforms/qnx/qqnxabstractnavigator.cpp +++ b/src/plugins/platforms/qnx/qqnxabstractnavigator.cpp @@ -44,7 +44,7 @@ #include <QDebug> #include <QUrl> -#ifdef QQNXNAVIGATOR_DEBUG +#if defined(QQNXNAVIGATOR_DEBUG) #define qNavigatorDebug qDebug #else #define qNavigatorDebug QT_NO_QDEBUG_MACRO diff --git a/src/plugins/platforms/qnx/qqnxbpseventfilter.cpp b/src/plugins/platforms/qnx/qqnxbpseventfilter.cpp index 2ef548f59f..26543a8d56 100644 --- a/src/plugins/platforms/qnx/qqnxbpseventfilter.cpp +++ b/src/plugins/platforms/qnx/qqnxbpseventfilter.cpp @@ -53,7 +53,7 @@ #include <bps/navigator.h> #include <bps/screen.h> -#ifdef QQNXBPSEVENTFILTER_DEBUG +#if defined(QQNXBPSEVENTFILTER_DEBUG) #define qBpsEventFilterDebug qDebug #else #define qBpsEventFilterDebug QT_NO_QDEBUG_MACRO diff --git a/src/plugins/platforms/qnx/qqnxbuffer.cpp b/src/plugins/platforms/qnx/qqnxbuffer.cpp index 9007af7f70..c5e99a2001 100644 --- a/src/plugins/platforms/qnx/qqnxbuffer.cpp +++ b/src/plugins/platforms/qnx/qqnxbuffer.cpp @@ -46,7 +46,7 @@ #include <errno.h> #include <sys/mman.h> -#ifdef QQNXBUFFER_DEBUG +#if defined(QQNXBUFFER_DEBUG) #define qBufferDebug qDebug #else #define qBufferDebug QT_NO_QDEBUG_MACRO diff --git a/src/plugins/platforms/qnx/qqnxbuttoneventnotifier.cpp b/src/plugins/platforms/qnx/qqnxbuttoneventnotifier.cpp index 152b732556..2f531efd8b 100644 --- a/src/plugins/platforms/qnx/qqnxbuttoneventnotifier.cpp +++ b/src/plugins/platforms/qnx/qqnxbuttoneventnotifier.cpp @@ -49,7 +49,7 @@ #include <QtCore/QSocketNotifier> #include <QtCore/private/qcore_unix_p.h> -#ifdef QQNXBUTTON_DEBUG +#if defined(QQNXBUTTON_DEBUG) #define qButtonDebug qDebug #else #define qButtonDebug QT_NO_QDEBUG_MACRO diff --git a/src/plugins/platforms/qnx/qqnxclipboard.cpp b/src/plugins/platforms/qnx/qqnxclipboard.cpp index 8286febd35..dfd1345eed 100644 --- a/src/plugins/platforms/qnx/qqnxclipboard.cpp +++ b/src/plugins/platforms/qnx/qqnxclipboard.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#ifndef QT_NO_CLIPBOARD +#if !defined(QT_NO_CLIPBOARD) #include "qqnxclipboard.h" @@ -53,7 +53,7 @@ #include <clipboard/clipboard.h> #include <errno.h> -#ifdef QQNXCLIPBOARD_DEBUG +#if defined(QQNXCLIPBOARD_DEBUG) #define qClipboardDebug qDebug #else #define qClipboardDebug QT_NO_QDEBUG_MACRO diff --git a/src/plugins/platforms/qnx/qqnxclipboard.h b/src/plugins/platforms/qnx/qqnxclipboard.h index e069355adc..561b57299e 100644 --- a/src/plugins/platforms/qnx/qqnxclipboard.h +++ b/src/plugins/platforms/qnx/qqnxclipboard.h @@ -44,7 +44,7 @@ #include <QtCore/qglobal.h> -#ifndef QT_NO_CLIPBOARD +#if !defined(QT_NO_CLIPBOARD) #include <qpa/qplatformclipboard.h> QT_BEGIN_NAMESPACE diff --git a/src/plugins/platforms/qnx/qqnxcursor.cpp b/src/plugins/platforms/qnx/qqnxcursor.cpp index 4fdff666d7..3cf857bb27 100644 --- a/src/plugins/platforms/qnx/qqnxcursor.cpp +++ b/src/plugins/platforms/qnx/qqnxcursor.cpp @@ -43,7 +43,7 @@ #include <QtCore/QDebug> -#ifdef QQNXCURSOR_DEBUG +#if defined(QQNXCURSOR_DEBUG) #define qCursorDebug qDebug #else #define qCursorDebug QT_NO_QDEBUG_MACRO @@ -55,7 +55,7 @@ QQnxCursor::QQnxCursor() { } -#ifndef QT_NO_CURSOR +#if !defined(QT_NO_CURSOR) void QQnxCursor::changeCursor(QCursor *windowCursor, QWindow *window) { Q_UNUSED(windowCursor); diff --git a/src/plugins/platforms/qnx/qqnxcursor.h b/src/plugins/platforms/qnx/qqnxcursor.h index 5d6a8b2c30..b62c299040 100644 --- a/src/plugins/platforms/qnx/qqnxcursor.h +++ b/src/plugins/platforms/qnx/qqnxcursor.h @@ -51,7 +51,7 @@ class QQnxCursor : public QPlatformCursor public: QQnxCursor(); -#ifndef QT_NO_CURSOR +#if !defined(QT_NO_CURSOR) void changeCursor(QCursor *windowCursor, QWindow *window); #endif void setPos(const QPoint &pos); diff --git a/src/plugins/platforms/qnx/qqnxfiledialoghelper_playbook.cpp b/src/plugins/platforms/qnx/qqnxfiledialoghelper_playbook.cpp index 4f61e0c587..12e8d8afbf 100644 --- a/src/plugins/platforms/qnx/qqnxfiledialoghelper_playbook.cpp +++ b/src/plugins/platforms/qnx/qqnxfiledialoghelper_playbook.cpp @@ -51,7 +51,7 @@ #include <QTimer> #include <QWindow> -#ifdef QQNXFILEDIALOGHELPER_DEBUG +#if defined(QQNXFILEDIALOGHELPER_DEBUG) #define qFileDialogHelperDebug qDebug #else #define qFileDialogHelperDebug QT_NO_QDEBUG_MACRO diff --git a/src/plugins/platforms/qnx/qqnxglcontext.cpp b/src/plugins/platforms/qnx/qqnxglcontext.cpp index 1c2ec23fa9..f77bb73614 100644 --- a/src/plugins/platforms/qnx/qqnxglcontext.cpp +++ b/src/plugins/platforms/qnx/qqnxglcontext.cpp @@ -50,7 +50,7 @@ #include <QtGui/QOpenGLContext> #include <QtGui/QScreen> -#ifdef QQNXGLCONTEXT_DEBUG +#if defined(QQNXGLCONTEXT_DEBUG) #define qGLContextDebug qDebug #else #define qGLContextDebug QT_NO_QDEBUG_MACRO diff --git a/src/plugins/platforms/qnx/qqnxinputcontext_imf.cpp b/src/plugins/platforms/qnx/qqnxinputcontext_imf.cpp index 0d8f430c73..97a361158e 100644 --- a/src/plugins/platforms/qnx/qqnxinputcontext_imf.cpp +++ b/src/plugins/platforms/qnx/qqnxinputcontext_imf.cpp @@ -61,13 +61,13 @@ #include <process.h> #include <sys/keycodes.h> -#ifdef QQNXINPUTCONTEXT_IMF_EVENT_DEBUG +#if defined(QQNXINPUTCONTEXT_IMF_EVENT_DEBUG) #define qInputContextIMFEventDebug qDebug #else #define qInputContextIMFEventDebug QT_NO_QDEBUG_MACRO #endif -#ifdef QQNXINPUTCONTEXT_DEBUG +#if defined(QQNXINPUTCONTEXT_DEBUG) #define qInputContextDebug qDebug #else #define qInputContextDebug QT_NO_QDEBUG_MACRO diff --git a/src/plugins/platforms/qnx/qqnxinputcontext_noimf.cpp b/src/plugins/platforms/qnx/qqnxinputcontext_noimf.cpp index 71b925357a..f444d34b5e 100644 --- a/src/plugins/platforms/qnx/qqnxinputcontext_noimf.cpp +++ b/src/plugins/platforms/qnx/qqnxinputcontext_noimf.cpp @@ -47,7 +47,7 @@ #include <QtCore/QDebug> #include <QtGui/QGuiApplication> -#ifdef QQNXINPUTCONTEXT_DEBUG +#if defined(QQNXINPUTCONTEXT_DEBUG) #define qInputContextDebug qDebug #else #define qInputContextDebug QT_NO_QDEBUG_MACRO diff --git a/src/plugins/platforms/qnx/qqnxintegration.cpp b/src/plugins/platforms/qnx/qqnxintegration.cpp index 2d5c2e54e7..5ea4fef698 100644 --- a/src/plugins/platforms/qnx/qqnxintegration.cpp +++ b/src/plugins/platforms/qnx/qqnxintegration.cpp @@ -96,7 +96,7 @@ #include <errno.h> -#ifdef QQNXINTEGRATION_DEBUG +#if defined(QQNXINTEGRATION_DEBUG) #define qIntegrationDebug qDebug #else #define qIntegrationDebug QT_NO_QDEBUG_MACRO diff --git a/src/plugins/platforms/qnx/qqnxnavigatoreventhandler.cpp b/src/plugins/platforms/qnx/qqnxnavigatoreventhandler.cpp index d561482b47..30dbb330d7 100644 --- a/src/plugins/platforms/qnx/qqnxnavigatoreventhandler.cpp +++ b/src/plugins/platforms/qnx/qqnxnavigatoreventhandler.cpp @@ -45,7 +45,7 @@ #include <QGuiApplication> #include <qpa/qwindowsysteminterface.h> -#ifdef QQNXNAVIGATOREVENTHANDLER_DEBUG +#if defined(QQNXNAVIGATOREVENTHANDLER_DEBUG) #define qNavigatorEventHandlerDebug qDebug #else #define qNavigatorEventHandlerDebug QT_NO_QDEBUG_MACRO diff --git a/src/plugins/platforms/qnx/qqnxnavigatoreventnotifier.cpp b/src/plugins/platforms/qnx/qqnxnavigatoreventnotifier.cpp index 9fa8294815..640944fb45 100644 --- a/src/plugins/platforms/qnx/qqnxnavigatoreventnotifier.cpp +++ b/src/plugins/platforms/qnx/qqnxnavigatoreventnotifier.cpp @@ -55,7 +55,7 @@ #include <sys/types.h> #include <sys/stat.h> -#ifdef QQNXNAVIGATOREVENTNOTIFIER_DEBUG +#if defined(QQNXNAVIGATOREVENTNOTIFIER_DEBUG) #define qNavigatorEventNotifierDebug qDebug #else #define qNavigatorEventNotifierDebug QT_NO_QDEBUG_MACRO diff --git a/src/plugins/platforms/qnx/qqnxnavigatorpps.cpp b/src/plugins/platforms/qnx/qqnxnavigatorpps.cpp index 92a94e0a39..1656ab029b 100644 --- a/src/plugins/platforms/qnx/qqnxnavigatorpps.cpp +++ b/src/plugins/platforms/qnx/qqnxnavigatorpps.cpp @@ -44,7 +44,7 @@ #include <QDebug> #include <private/qcore_unix_p.h> -#ifdef QQNXNAVIGATOR_DEBUG +#if defined(QQNXNAVIGATOR_DEBUG) #define qNavigatorDebug qDebug #else #define qNavigatorDebug QT_NO_QDEBUG_MACRO diff --git a/src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp b/src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp index 47a72f173b..7204e5bce9 100644 --- a/src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp +++ b/src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp @@ -46,7 +46,7 @@ #include <errno.h> -#ifdef QQNXRASTERBACKINGSTORE_DEBUG +#if defined(QQNXRASTERBACKINGSTORE_DEBUG) #define qRasterBackingStoreDebug qDebug #else #define qRasterBackingStoreDebug QT_NO_QDEBUG_MACRO diff --git a/src/plugins/platforms/qnx/qqnxrootwindow.cpp b/src/plugins/platforms/qnx/qqnxrootwindow.cpp index b01d468647..198801a832 100644 --- a/src/plugins/platforms/qnx/qqnxrootwindow.cpp +++ b/src/plugins/platforms/qnx/qqnxrootwindow.cpp @@ -46,7 +46,7 @@ #include <QtCore/QUuid> #include <QtCore/QDebug> -#ifdef QQNXROOTWINDOW_DEBUG +#if defined(QQNXROOTWINDOW_DEBUG) #define qRootWindowDebug qDebug #else #define qRootWindowDebug QT_NO_QDEBUG_MACRO diff --git a/src/plugins/platforms/qnx/qqnxscreen.cpp b/src/plugins/platforms/qnx/qqnxscreen.cpp index f9efbde40c..7614abdc6a 100644 --- a/src/plugins/platforms/qnx/qqnxscreen.cpp +++ b/src/plugins/platforms/qnx/qqnxscreen.cpp @@ -49,7 +49,7 @@ #include <errno.h> -#ifdef QQNXSCREEN_DEBUG +#if defined(QQNXSCREEN_DEBUG) #define qScreenDebug qDebug #else #define qScreenDebug QT_NO_QDEBUG_MACRO diff --git a/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp b/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp index 2d3c7608bf..57cfdc5eb6 100644 --- a/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp +++ b/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp @@ -50,7 +50,7 @@ #include <errno.h> #include <sys/keycodes.h> -#ifdef QQNXSCREENEVENT_DEBUG +#if defined(QQNXSCREENEVENT_DEBUG) #define qScreenEventDebug qDebug #else #define qScreenEventDebug QT_NO_QDEBUG_MACRO diff --git a/src/plugins/platforms/qnx/qqnxscreeneventthread.cpp b/src/plugins/platforms/qnx/qqnxscreeneventthread.cpp index 8f262a7083..f3f660bc03 100644 --- a/src/plugins/platforms/qnx/qqnxscreeneventthread.cpp +++ b/src/plugins/platforms/qnx/qqnxscreeneventthread.cpp @@ -49,7 +49,7 @@ #include <cctype> -#ifdef QQNXSCREENEVENTTHREAD_DEBUG +#if defined(QQNXSCREENEVENTTHREAD_DEBUG) #define qScreenEventThreadDebug qDebug #else #define qScreenEventThreadDebug QT_NO_QDEBUG_MACRO diff --git a/src/plugins/platforms/qnx/qqnxtheme.cpp b/src/plugins/platforms/qnx/qqnxtheme.cpp index ae9acd845e..c0aef07bd9 100644 --- a/src/plugins/platforms/qnx/qqnxtheme.cpp +++ b/src/plugins/platforms/qnx/qqnxtheme.cpp @@ -76,10 +76,11 @@ QPlatformDialogHelper *QQnxTheme::createPlatformDialogHelper(DialogType type) co switch (type) { case QPlatformTheme::FileDialog: return new QQnxFileDialogHelper(m_integration); -#ifndef QT_NO_COLORDIALOG +#endif +#if !defined(QT_NO_COLORDIALOG) case QPlatformTheme::ColorDialog: #endif -#ifndef QT_NO_FONTDIALOG +#if !defined(QT_NO_FONTDIALOG) case QPlatformTheme::FontDialog: #endif default: diff --git a/src/plugins/platforms/qnx/qqnxvirtualkeyboardbps.cpp b/src/plugins/platforms/qnx/qqnxvirtualkeyboardbps.cpp index 3d2f49aa6c..11eb4a5082 100644 --- a/src/plugins/platforms/qnx/qqnxvirtualkeyboardbps.cpp +++ b/src/plugins/platforms/qnx/qqnxvirtualkeyboardbps.cpp @@ -47,7 +47,7 @@ #include <bps/locale.h> #include <bps/virtualkeyboard.h> -#ifdef QQNXVIRTUALKEYBOARD_DEBUG +#if defined(QQNXVIRTUALKEYBOARD_DEBUG) #define qVirtualKeyboardDebug qDebug #else #define qVirtualKeyboardDebug QT_NO_QDEBUG_MACRO diff --git a/src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.cpp b/src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.cpp index ab912927bb..e810b47c22 100644 --- a/src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.cpp +++ b/src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.cpp @@ -56,7 +56,7 @@ #include <sys/types.h> #include <unistd.h> -#ifdef QQNXVIRTUALKEYBOARD_DEBUG +#if defined(QQNXVIRTUALKEYBOARD_DEBUG) #define qVirtualKeyboardDebug qDebug #else #define qVirtualKeyboardDebug QT_NO_QDEBUG_MACRO diff --git a/src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.h b/src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.h index eb41b2efd0..6048868b08 100644 --- a/src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.h +++ b/src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.h @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef VIRTUALKEYBOARDPPS_H_ -#define VIRTUALKEYBOARDPPS_H_ +#ifndef VIRTUALKEYBOARDPPS_H +#define VIRTUALKEYBOARDPPS_H #include "qqnxabstractvirtualkeyboard.h" @@ -97,4 +97,4 @@ private: static const size_t ms_bufferSize; }; -#endif /* VIRTUALKEYBOARDPPS_H_ */ +#endif // VIRTUALKEYBOARDPPS_H diff --git a/src/plugins/platforms/qnx/qqnxwindow.cpp b/src/plugins/platforms/qnx/qqnxwindow.cpp index 51435a1e55..f1bebee9b2 100644 --- a/src/plugins/platforms/qnx/qqnxwindow.cpp +++ b/src/plugins/platforms/qnx/qqnxwindow.cpp @@ -40,7 +40,7 @@ ****************************************************************************/ #include "qqnxwindow.h" -#ifndef QT_NO_OPENGL +#if !defined(QT_NO_OPENGL) #include "qqnxglcontext.h" #endif #include "qqnxintegration.h" @@ -53,12 +53,12 @@ #include <errno.h> -#ifdef Q_OS_BLACKBERRY +#if defined(Q_OS_BLACKBERRY) #include <sys/pps.h> #include <bps/navigator.h> #endif -#ifdef QQNXWINDOW_DEBUG +#if defined(QQNXWINDOW_DEBUG) #define qWindowDebug qDebug #else #define qWindowDebug QT_NO_QDEBUG_MACRO @@ -72,7 +72,7 @@ QQnxWindow::QQnxWindow(QWindow *window, screen_context_t context) m_window(0), m_currentBufferIndex(-1), m_previousBufferIndex(-1), -#ifndef QT_NO_OPENGL +#if !defined(QT_NO_OPENGL) m_platformOpenGLContext(0), #endif m_screen(0), @@ -353,7 +353,7 @@ void QQnxWindow::setBufferSize(const QSize &size) // Create window buffers if they do not exist if (m_bufferSize.isEmpty()) { -#ifndef QT_NO_OPENGL +#if !defined(QT_NO_OPENGL) // Get pixel format from EGL config if using OpenGL; // otherwise inherit pixel format of window's screen if (m_platformOpenGLContext != 0) { @@ -666,7 +666,7 @@ void QQnxWindow::gainedFocus() QWindowSystemInterface::handleWindowActivated(window()); } -#ifndef QT_NO_OPENGL +#if !defined(QT_NO_OPENGL) void QQnxWindow::setPlatformOpenGLContext(QQnxGLContext *platformOpenGLContext) { // This function does not take ownership of the platform gl context. diff --git a/src/plugins/platforms/qnx/qqnxwindow.h b/src/plugins/platforms/qnx/qqnxwindow.h index ad136227e3..4a327fd54b 100644 --- a/src/plugins/platforms/qnx/qqnxwindow.h +++ b/src/plugins/platforms/qnx/qqnxwindow.h @@ -49,7 +49,7 @@ #include <QtGui/QImage> #include <QtCore/QMutex> -#ifndef QT_NO_OPENGL +#if !defined(QT_NO_OPENGL) #include <EGL/egl.h> #endif @@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE // all surfaces double buffered #define MAX_BUFFER_COUNT 2 -#ifndef QT_NO_OPENGL +#if !defined(QT_NO_OPENGL) class QQnxGLContext; #endif class QQnxScreen; @@ -108,7 +108,7 @@ public: QQnxScreen *screen() const { return m_screen; } const QList<QQnxWindow*>& children() const { return m_childWindows; } -#ifndef QT_NO_OPENGL +#if !defined(QT_NO_OPENGL) void setPlatformOpenGLContext(QQnxGLContext *platformOpenGLContext); QQnxGLContext *platformOpenGLContext() const { return m_platformOpenGLContext; } #endif @@ -144,7 +144,7 @@ private: QRegion m_previousDirty; QRegion m_scrolled; -#ifndef QT_NO_OPENGL +#if !defined(QT_NO_OPENGL) QQnxGLContext *m_platformOpenGLContext; #endif QQnxScreen *m_screen; diff --git a/src/plugins/platforms/windows/accessible/iaccessible2.cpp b/src/plugins/platforms/windows/accessible/iaccessible2.cpp index fb08daa38e..44e715d0ce 100644 --- a/src/plugins/platforms/windows/accessible/iaccessible2.cpp +++ b/src/plugins/platforms/windows/accessible/iaccessible2.cpp @@ -645,7 +645,8 @@ HRESULT STDMETHODCALLTYPE QWindowsIA2Accessible::get_locationInParent(long *x, l QPoint topLeft = accessible->rect().topLeft(); - if (QAccessibleInterface *parentIface = accessible->parent()) + QAccessibleInterface *parentIface = accessible->parent(); + if (parentIface && parentIface->isValid()) topLeft -= parentIface->rect().topLeft(); *x = topLeft.x(); @@ -1596,7 +1597,7 @@ uint QWindowsIA2Accessible::uniqueID() const if (!uid) { QAccessibleInterface *acc = accessible; QVector<int> indexOfNodes; - while (acc && !acc->object()) { + while (acc && acc->isValid() && !acc->object()) { QAccessibleInterface *par = acc->parent(); indexOfNodes.append(par->indexOfChild(acc)); if (acc != accessible) diff --git a/src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp b/src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp index 752b9e7c20..79d0934ebb 100644 --- a/src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp +++ b/src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp @@ -169,7 +169,9 @@ void QWindowsAccessibility::notifyAccessibilityUpdate(QAccessibleEvent *event) // An event has to be associated with a window, // so find the first parent that is a widget and that has a WId QAccessibleInterface *iface = event->accessibleInterface(); - QWindow *window = iface ? QWindowsAccessibility::windowHelper(iface) : 0; + if (!iface) // ### This should not happen, maybe make it an assert. + return; + QWindow *window = QWindowsAccessibility::windowHelper(iface); delete iface; if (!window) { @@ -213,7 +215,7 @@ QWindow *QWindowsAccessibility::windowHelper(const QAccessibleInterface *iface) QWindow *window = iface->window(); if (!window) { QAccessibleInterface *acc = iface->parent(); - while (acc && !window) { + while (acc && acc->isValid() && !window) { window = acc->window(); QAccessibleInterface *par = acc->parent(); delete acc; diff --git a/src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp b/src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp index bb5d5d13a7..9958615d45 100644 --- a/src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp +++ b/src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp @@ -612,7 +612,7 @@ HRESULT STDMETHODCALLTYPE QWindowsMsaaAccessible::accNavigate(long navDir, VARIA case NAVDIR_PREVIOUS: if (!varStart.lVal){ QAccessibleInterface *parent = accessible->parent(); - if (parent) { + if (parent && parent->isValid()) { int index = parent->indexOfChild(accessible); index += (navDir == NAVDIR_NEXT) ? 1 : -1; if (index >= 0 && index < parent->childCount()) @@ -631,8 +631,9 @@ HRESULT STDMETHODCALLTYPE QWindowsMsaaAccessible::accNavigate(long navDir, VARIA case NAVDIR_UP: case NAVDIR_DOWN: case NAVDIR_LEFT: - case NAVDIR_RIGHT: - if (QAccessibleInterface *pIface = accessible->parent()) { + case NAVDIR_RIGHT: { + QAccessibleInterface *pIface = accessible->parent(); + if (pIface && pIface->isValid()) { const int indexOfOurself = pIface->indexOfChild(accessible); QRect startg = accessible->rect(); QPoint startc = startg.center(); @@ -709,6 +710,7 @@ HRESULT STDMETHODCALLTYPE QWindowsMsaaAccessible::accNavigate(long navDir, VARIA delete pIface; acc = candidate; } + } break; default: break; diff --git a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp index 5cc5230832..8565bf0204 100644 --- a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp +++ b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp @@ -1340,7 +1340,9 @@ static inline QString appendSuffix(const QString &fileName, const QString &filte if (suffixPos < 0) return fileName; suffixPos += 3; - int endPos = filter.indexOf(QLatin1Char(';'), suffixPos + 1); + int endPos = filter.indexOf(QLatin1Char(' '), suffixPos + 1); + if (endPos < 0) + endPos = filter.indexOf(QLatin1Char(';'), suffixPos + 1); if (endPos < 0) endPos = filter.indexOf(QLatin1Char(')'), suffixPos + 1); if (endPos < 0) diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp index 6cbe3e8cf7..9b2b67619d 100644 --- a/src/plugins/platforms/windows/qwindowswindow.cpp +++ b/src/plugins/platforms/windows/qwindowswindow.cpp @@ -791,13 +791,16 @@ QWindowsWindow::QWindowsWindow(QWindow *aWindow, const WindowData &data) : m_iconSmall(0), m_iconBig(0) { - if (aWindow->surfaceType() == QWindow::OpenGLSurface) - setFlag(OpenGLSurface); // Clear the creation context as the window can be found in QWindowsContext's map. QWindowsContext::instance()->setWindowCreationContext(QSharedPointer<QWindowCreationContext>()); QWindowsContext::instance()->addWindow(m_data.hwnd, this); + const Qt::WindowType type = aWindow->type(); + if (type == Qt::Desktop) + return; // No further handling for Qt::Desktop + if (aWindow->surfaceType() == QWindow::OpenGLSurface) + setFlag(OpenGLSurface); if (aWindow->isTopLevel()) { - switch (aWindow->type()) { + switch (type) { case Qt::Window: case Qt::Dialog: case Qt::Sheet: @@ -811,8 +814,13 @@ QWindowsWindow::QWindowsWindow(QWindow *aWindow, const WindowData &data) : } } #ifndef Q_OS_WINCE - if (QWindowsContext::instance()->systemInfo() & QWindowsContext::SI_SupportsTouch) - QWindowsContext::user32dll.registerTouchWindow(m_data.hwnd, 0); + if (QWindowsContext::instance()->systemInfo() & QWindowsContext::SI_SupportsTouch) { + if (QWindowsContext::user32dll.registerTouchWindow(m_data.hwnd, 0)) { + setFlag(TouchRegistered); + } else { + qErrnoWarning("RegisterTouchWindow() failed for window '%s'.", qPrintable(aWindow->objectName())); + } + } #endif // !Q_OS_WINCE setWindowState(aWindow->windowState()); const qreal opacity = qt_window_private(aWindow)->opacity; @@ -824,7 +832,7 @@ QWindowsWindow::~QWindowsWindow() { #ifndef Q_OS_WINCE QWindowSystemInterface::flushWindowSystemEvents(); - if (QWindowsContext::instance()->systemInfo() & QWindowsContext::SI_SupportsTouch) + if (testFlag(TouchRegistered)) QWindowsContext::user32dll.unregisterTouchWindow(m_data.hwnd); #endif // !Q_OS_WINCE destroyWindow(); diff --git a/src/plugins/platforms/windows/qwindowswindow.h b/src/plugins/platforms/windows/qwindowswindow.h index 87397f1c1d..1148440f05 100644 --- a/src/plugins/platforms/windows/qwindowswindow.h +++ b/src/plugins/platforms/windows/qwindowswindow.h @@ -131,7 +131,8 @@ public: FrameStrutEventsEnabled = 0x200, SynchronousGeometryChangeEvent = 0x400, WithinSetStyle = 0x800, - WithinDestroy = 0x1000 + WithinDestroy = 0x1000, + TouchRegistered = 0x2000 }; struct WindowData diff --git a/src/plugins/platforms/xcb/qxcbcursor.cpp b/src/plugins/platforms/xcb/qxcbcursor.cpp index ff40c6a9ab..3fd2ca70e3 100644 --- a/src/plugins/platforms/xcb/qxcbcursor.cpp +++ b/src/plugins/platforms/xcb/qxcbcursor.cpp @@ -490,7 +490,7 @@ xcb_cursor_t QXcbCursor::createFontCursor(int cshape) 0xFFFF, 0xFFFF, 0xFFFF, 0, 0, 0); } - if (cursor && cshape >= 0 && cshape < Qt::LastCursor) { + if (cursor && cshape >= 0 && cshape < Qt::LastCursor && connection()->hasXFixes()) { const char *name = cursorNames[cshape]; xcb_xfixes_set_cursor_name(conn, cursor, strlen(name), name); } diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp index 20d312216a..5af6a9ec9d 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.cpp +++ b/src/plugins/platforms/xcb/qxcbwindow.cpp @@ -186,6 +186,7 @@ QXcbWindow::QXcbWindow(QWindow *window) , m_gravity(XCB_GRAVITY_STATIC) , m_mapped(false) , m_transparent(false) + , m_usingSyncProtocol(false) , m_deferredActivation(false) , m_embedded(false) , m_netWmUserTimeWindow(XCB_NONE) @@ -354,7 +355,9 @@ void QXcbWindow::create() properties[propertyCount++] = atom(QXcbAtom::WM_TAKE_FOCUS); properties[propertyCount++] = atom(QXcbAtom::_NET_WM_PING); - if (m_screen->syncRequestSupported()) + m_usingSyncProtocol = m_screen->syncRequestSupported() && window()->surfaceType() != QSurface::OpenGLSurface; + + if (m_usingSyncProtocol) properties[propertyCount++] = atom(QXcbAtom::_NET_WM_SYNC_REQUEST); if (window()->flags() & Qt::WindowContextHelpButtonHint) @@ -371,7 +374,7 @@ void QXcbWindow::create() m_syncValue.hi = 0; m_syncValue.lo = 0; - if (m_screen->syncRequestSupported()) { + if (m_usingSyncProtocol) { m_syncCounter = xcb_generate_id(xcb_connection()); Q_XCB_CALL(xcb_sync_create_counter(xcb_connection(), m_syncCounter, m_syncValue)); @@ -463,7 +466,7 @@ void QXcbWindow::destroy() if (connection()->focusWindow() == this) connection()->setFocusWindow(0); - if (m_syncCounter && m_screen->syncRequestSupported()) + if (m_syncCounter && m_usingSyncProtocol) Q_XCB_CALL(xcb_sync_destroy_counter(xcb_connection(), m_syncCounter)); if (m_window) { if (m_netWmUserTimeWindow) { @@ -1824,7 +1827,7 @@ void QXcbWindow::handleFocusOutEvent(const xcb_focus_out_event_t *) void QXcbWindow::updateSyncRequestCounter() { - if (m_screen->syncRequestSupported() && (m_syncValue.lo != 0 || m_syncValue.hi != 0)) { + if (m_usingSyncProtocol && (m_syncValue.lo != 0 || m_syncValue.hi != 0)) { Q_XCB_CALL(xcb_sync_set_counter(xcb_connection(), m_syncCounter, m_syncValue)); xcb_flush(xcb_connection()); connection()->sync(); diff --git a/src/plugins/platforms/xcb/qxcbwindow.h b/src/plugins/platforms/xcb/qxcbwindow.h index 1810a58c7b..f4bd2d96ff 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.h +++ b/src/plugins/platforms/xcb/qxcbwindow.h @@ -189,6 +189,7 @@ private: bool m_mapped; bool m_transparent; + bool m_usingSyncProtocol; bool m_deferredActivation; bool m_deferredExpose; bool m_configureNotifyPending; diff --git a/src/sql/drivers/odbc/qsql_odbc.cpp b/src/sql/drivers/odbc/qsql_odbc.cpp index a7f583c3b8..55c97644b8 100644 --- a/src/sql/drivers/odbc/qsql_odbc.cpp +++ b/src/sql/drivers/odbc/qsql_odbc.cpp @@ -960,11 +960,6 @@ bool QODBCResult::reset (const QString& query) return false; } - if(r == SQL_NO_DATA) { - setSelect(false); - return true; - } - SQLINTEGER bufferLength; SQLULEN isScrollable; r = SQLGetStmtAttr(d->hStmt, SQL_ATTR_CURSOR_SCROLLABLE, &isScrollable, SQL_IS_INTEGER, &bufferLength); @@ -1407,7 +1402,7 @@ bool QODBCResult::exec() // (How many leading digits do we want to keep? With SQL Server 2005, this should be 3: 123000000) int keep = (int)qPow(10.0, 9 - qMin(9, precision)); - dt->fraction /= keep * keep; + dt->fraction = (dt->fraction / keep) * keep; } r = SQLBindParameter(d->hStmt, @@ -1592,7 +1587,7 @@ bool QODBCResult::exec() } } r = SQLExecute(d->hStmt); - if (r != SQL_SUCCESS && r != SQL_SUCCESS_WITH_INFO) { + if (r != SQL_SUCCESS && r != SQL_SUCCESS_WITH_INFO && r != SQL_NO_DATA) { qWarning() << "QODBCResult::exec: Unable to execute statement:" << qODBCWarn(d); setLastError(qMakeError(QCoreApplication::translate("QODBCResult", "Unable to execute statement"), QSqlError::StatementError, d)); diff --git a/src/sql/drivers/psql/qsql_psql.cpp b/src/sql/drivers/psql/qsql_psql.cpp index 7d844fa1bd..4749b8b97b 100644 --- a/src/sql/drivers/psql/qsql_psql.cpp +++ b/src/sql/drivers/psql/qsql_psql.cpp @@ -124,7 +124,16 @@ inline void qPQfreemem(void *buffer) class QPSQLDriverPrivate { public: - QPSQLDriverPrivate(QPSQLDriver *qq) : q(qq), connection(0), isUtf8(false), pro(QPSQLDriver::Version6), sn(0), pendingNotifyCheck(false) {} + QPSQLDriverPrivate(QPSQLDriver *qq) + : q(qq), + connection(0), + isUtf8(false), + pro(QPSQLDriver::Version6), + sn(0), + pendingNotifyCheck(false), + hasBackslashEscape(false) + { } + QPSQLDriver *q; PGconn *connection; bool isUtf8; @@ -132,6 +141,7 @@ public: QSocketNotifier *sn; QStringList seid; mutable bool pendingNotifyCheck; + bool hasBackslashEscape; void appendTables(QStringList &tl, QSqlQuery &t, QChar type); PGresult * exec(const char * stmt) const; @@ -139,6 +149,7 @@ public: QPSQLDriver::Protocol getPSQLVersion(); bool setEncodingUtf8(); void setDatestyle(); + void detectBackslashEscape(); }; void QPSQLDriverPrivate::appendTables(QStringList &tl, QSqlQuery &t, QChar type) @@ -621,6 +632,23 @@ void QPSQLDriverPrivate::setDatestyle() PQclear(result); } +void QPSQLDriverPrivate::detectBackslashEscape() +{ + // standard_conforming_strings option introduced in 8.2 + // http://www.postgresql.org/docs/8.2/static/runtime-config-compatible.html + if (pro < QPSQLDriver::Version82) { + hasBackslashEscape = true; + } else { + hasBackslashEscape = false; + PGresult* result = exec(QLatin1Literal("SELECT '\\\\' x")); + int status = PQresultStatus(result); + if (status == PGRES_COMMAND_OK || status == PGRES_TUPLES_OK) + if (QString::fromLatin1(PQgetvalue(result, 0, 0)) == QLatin1Literal("\\")) + hasBackslashEscape = true; + PQclear(result); + } +} + static QPSQLDriver::Protocol qMakePSQLVersion(int vMaj, int vMin) { switch (vMaj) { @@ -732,6 +760,7 @@ QPSQLDriver::QPSQLDriver(PGconn *conn, QObject *parent) d->connection = conn; if (conn) { d->pro = d->getPSQLVersion(); + d->detectBackslashEscape(); setOpen(true); setOpenError(false); } @@ -833,6 +862,7 @@ bool QPSQLDriver::open(const QString & db, } d->pro = d->getPSQLVersion(); + d->detectBackslashEscape(); d->isUtf8 = d->setEncodingUtf8(); d->setDatestyle(); @@ -1218,12 +1248,10 @@ QString QPSQLDriver::formatValue(const QSqlField &field, bool trimStrings) const } break; case QVariant::String: - { - // Escape '\' characters r = QSqlDriver::formatValue(field, trimStrings); - r.replace(QLatin1String("\\"), QLatin1String("\\\\")); + if (d->hasBackslashEscape) + r.replace(QLatin1String("\\"), QLatin1String("\\\\")); break; - } case QVariant::Bool: if (field.value().toBool()) r = QLatin1String("TRUE"); diff --git a/src/sql/drivers/sqlite/qsql_sqlite.cpp b/src/sql/drivers/sqlite/qsql_sqlite.cpp index 1af5d6274e..854705b3f6 100644 --- a/src/sql/drivers/sqlite/qsql_sqlite.cpp +++ b/src/sql/drivers/sqlite/qsql_sqlite.cpp @@ -234,8 +234,7 @@ void QSQLiteResultPrivate::initColumns(bool emptyResultset) } } - int dotIdx = colName.lastIndexOf(QLatin1Char('.')); - QSqlField fld(colName.mid(dotIdx == -1 ? 0 : dotIdx + 1), fieldType); + QSqlField fld(colName, fieldType); fld.setSqlType(stp); rInf.append(fld); } diff --git a/src/testlib/qtestsystem.h b/src/testlib/qtestsystem.h index 0625af0213..2a719e96f1 100644 --- a/src/testlib/qtestsystem.h +++ b/src/testlib/qtestsystem.h @@ -70,7 +70,7 @@ namespace QTest } #ifdef QT_GUI_LIB - inline static bool qWaitForWindowActive(QWindow *window, int timeout = 1000) + inline static bool qWaitForWindowActive(QWindow *window, int timeout = 5000) { QElapsedTimer timer; timer.start(); @@ -99,7 +99,7 @@ namespace QTest return window->isActive(); } - inline static bool qWaitForWindowExposed(QWindow *window, int timeout = 1000) + inline static bool qWaitForWindowExposed(QWindow *window, int timeout = 5000) { QElapsedTimer timer; timer.start(); diff --git a/src/testlib/qxmltestlogger.cpp b/src/testlib/qxmltestlogger.cpp index 9bc5255bf6..3f77f152b5 100644 --- a/src/testlib/qxmltestlogger.cpp +++ b/src/testlib/qxmltestlogger.cpp @@ -246,12 +246,13 @@ void QXmlTestLogger::addBenchmarkResult(const QBenchmarkResult &result) benchmarkMetricName(result.metric)); xmlQuote("edTag, result.context.tag.toUtf8().constData()); + const qreal valuePerIteration = qreal(result.value) / qreal(result.iterations); QTest::qt_asprintf( &buf, QTest::benchmarkResultFormatString(), quotedMetric.constData(), quotedTag.constData(), - QByteArray::number(result.value).constData(), //no 64-bit qsnprintf support + QByteArray::number(valuePerIteration).constData(), //no 64-bit qsnprintf support result.iterations); outputString(buf.constData()); } diff --git a/src/testlib/qxunittestlogger.cpp b/src/testlib/qxunittestlogger.cpp index bfe9de2158..0a1a5fb6f9 100644 --- a/src/testlib/qxunittestlogger.cpp +++ b/src/testlib/qxunittestlogger.cpp @@ -232,7 +232,9 @@ void QXunitTestLogger::addBenchmarkResult(const QBenchmarkResult &result) QTest::AI_Metric, QTest::benchmarkMetricName(QBenchmarkTestMethodData::current->result.metric)); benchmarkElement->addAttribute(QTest::AI_Tag, result.context.tag.toUtf8().data()); - benchmarkElement->addAttribute(QTest::AI_Value, QByteArray::number(result.value).constData()); + + const qreal valuePerIteration = qreal(result.value) / qreal(result.iterations); + benchmarkElement->addAttribute(QTest::AI_Value, QByteArray::number(valuePerIteration).constData()); char buf[100]; qsnprintf(buf, sizeof(buf), "%i", result.iterations); diff --git a/src/tools/bootstrap/bootstrap.pro b/src/tools/bootstrap/bootstrap.pro index 8b69c715d2..8b28b09e00 100644 --- a/src/tools/bootstrap/bootstrap.pro +++ b/src/tools/bootstrap/bootstrap.pro @@ -42,6 +42,7 @@ CONFIG += minimal_syncqt QMAKE_SYNCQT_OPTIONS = -module QtCore -module QtDBus -module QtXml contains(QT_CONFIG, zlib): \ QMAKE_SYNCQT_OPTIONS += -module QtZlib +QMAKE_SYNCQT_OPTIONS += -version $$QT_VERSION load(qt_module) diff --git a/src/tools/qdoc/codemarker.cpp b/src/tools/qdoc/codemarker.cpp index ff36064941..4e144d2f7d 100644 --- a/src/tools/qdoc/codemarker.cpp +++ b/src/tools/qdoc/codemarker.cpp @@ -381,8 +381,9 @@ QString CodeMarker::sortName(const Node *node, const QString* name) if ((node->type() == Node::QmlMethod) || (node->type() == Node::QmlSignal) || (node->type() == Node::QmlSignalHandler)) { - const FunctionNode* func = static_cast<const FunctionNode *>(node); - return QLatin1Char('E') + func->signature(); + //const FunctionNode* func = static_cast<const FunctionNode *>(node); + //return QLatin1Char('E') + func->name(); + return QLatin1Char('E') + nodeName; } return QLatin1Char('B') + nodeName; @@ -397,7 +398,8 @@ void CodeMarker::insert(FastSection &fastSection, bool inheritedMember = false; if (!node->relates()) { if (node->parent() != fastSection.parent_) { // && !node->parent()->isAbstract()) { - if (node->type() != Node::QmlProperty) { + if ((node->parent()->subType() != Node::QmlClass) || !node->parent()->isAbstract()) { + //if (node->type() != Node::QmlProperty) { inheritedMember = true; } } @@ -438,8 +440,7 @@ void CodeMarker::insert(FastSection &fastSection, if (!irrelevant) { if (!inheritedMember || style == Subpage) { QString key = sortName(node); - if (!fastSection.memberMap.contains(key)) - fastSection.memberMap.insert(key, node); + fastSection.memberMap.insertMulti(key, node); } else { if (node->parent()->type() == Node::Class) { @@ -519,14 +520,59 @@ bool CodeMarker::insertReimpFunc(FastSection& fs, Node* node, Status status) void CodeMarker::append(QList<Section>& sectionList, const FastSection& fs, bool includeKeys) { if (!fs.isEmpty()) { - Section section(fs.name,fs.divClass,fs.singularMember,fs.pluralMember); - if (includeKeys) { - section.keys = fs.memberMap.keys(); + if (fs.classMapList_.isEmpty()) { + Section section(fs.name,fs.divClass,fs.singularMember,fs.pluralMember); + if (includeKeys) { + section.keys = fs.memberMap.keys(); + } + section.members = fs.memberMap.values(); + section.reimpMembers = fs.reimpMemberMap.values(); + section.inherited = fs.inherited; + sectionList.append(section); + } + else { + Section section(fs.name,fs.divClass,fs.singularMember,fs.pluralMember); + sectionList.append(section); + Section* s = §ionList[sectionList.size()-1]; + for (int i=0; i<fs.classMapList_.size(); i++) { + ClassMap* classMap = fs.classMapList_[i]; + ClassKeysNodes* ckn = new ClassKeysNodes; + ckn->first = classMap->first; + ckn->second.second = classMap->second.values(); + ckn->second.first = classMap->second.keys(); + s->classKeysNodesList_.append(ckn); + } + } + } +} + +/*! + The destructor must delete each member of the + list of QML class lists, if it is not empty; + */ +Section::~Section() +{ + if (!classKeysNodesList_.isEmpty()) { + for (int i=0; i<classKeysNodesList_.size(); i++) { + ClassKeysNodes* classKeysNodes = classKeysNodesList_[i]; + classKeysNodesList_[i] = 0; + delete classKeysNodes; + } + } +} + +/*! + The destructor must delete the QML class maps in the class + map list, if the class map list is not empty. + */ +FastSection::~FastSection() +{ + if (!classMapList_.isEmpty()) { + for (int i=0; i<classMapList_.size(); i++) { + ClassMap* classMap = classMapList_[i]; + classMapList_[i] = 0; + delete classMap; } - section.members = fs.memberMap.values(); - section.reimpMembers = fs.reimpMemberMap.values(); - section.inherited = fs.inherited; - sectionList.append(section); } } diff --git a/src/tools/qdoc/codemarker.h b/src/tools/qdoc/codemarker.h index becd4b07c4..c31b43e875 100644 --- a/src/tools/qdoc/codemarker.h +++ b/src/tools/qdoc/codemarker.h @@ -56,6 +56,14 @@ QT_BEGIN_NAMESPACE class Config; class Tree; +typedef QMultiMap<QString, Node*> MemberMap; // the string is the member signature +typedef QPair<const QmlClassNode*, MemberMap> ClassMap; // the node is the QML type +typedef QList<ClassMap*> ClassMapList; + +typedef QPair<QStringList, NodeList> KeysAndNodes; +typedef QPair<const QmlClassNode*, KeysAndNodes> ClassKeysNodes; +typedef QList<ClassKeysNodes*> ClassKeysNodesList; + struct Section { QString name; @@ -66,6 +74,7 @@ struct Section NodeList members; NodeList reimpMembers; QList<QPair<InnerNode *, int> > inherited; + ClassKeysNodesList classKeysNodesList_; Section() { } Section(const QString& name0, @@ -76,6 +85,7 @@ struct Section divClass(divClass0), singularMember(singularMember0), pluralMember(pluralMember0) { } + ~Section(); void appendMember(Node* node) { members.append(node); } void appendReimpMember(Node* node) { reimpMembers.append(node); } }; @@ -87,8 +97,9 @@ struct FastSection QString divClass; QString singularMember; QString pluralMember; - QMap<QString, Node *> memberMap; - QMap<QString, Node *> reimpMemberMap; + QMultiMap<QString, Node *> memberMap; + QMultiMap<QString, Node *> reimpMemberMap; + ClassMapList classMapList_; QList<QPair<InnerNode *, int> > inherited; FastSection(const InnerNode *parent, @@ -101,10 +112,12 @@ struct FastSection divClass(divClass0), singularMember(singularMember0), pluralMember(pluralMember0) { } + ~FastSection(); bool isEmpty() const { return (memberMap.isEmpty() && inherited.isEmpty() && - reimpMemberMap.isEmpty()); + reimpMemberMap.isEmpty() && + classMapList_.isEmpty()); } }; diff --git a/src/tools/qdoc/cppcodemarker.cpp b/src/tools/qdoc/cppcodemarker.cpp index f0cfc18515..75e49f288a 100644 --- a/src/tools/qdoc/cppcodemarker.cpp +++ b/src/tools/qdoc/cppcodemarker.cpp @@ -142,8 +142,8 @@ QString CppCodeMarker::markedUpSynopsis(const Node *node, name = linkTag(node, name); name = "<@name>" + name + "</@name>"; - if (style == Detailed && !node->parent()->name().isEmpty() && - node->type() != Node::Property) + if ((style == Detailed) && !node->parent()->name().isEmpty() && + (node->type() != Node::Property) && !node->isQmlNode()) name.prepend(taggedNode(node->parent()) + "::"); switch (node->type()) { @@ -1258,9 +1258,24 @@ QList<Section> CppCodeMarker::qmlSections(const QmlClassNode* qmlClassNode, Syno append(sections,qmlattachedmethods); } else { + /* + This is where the list of all members including inherited + members is prepared. + */ + ClassMap* classMap = 0; FastSection all(qmlClassNode,QString(),QString(),"member","members"); const QmlClassNode* current = qmlClassNode; while (current != 0) { + /* + If the QML type is abstract, do not create + a new entry in the list for it. Instead, + add its members to the current entry. + */ + if (!current->isAbstract()) { + classMap = new ClassMap; + classMap->first = current; + all.classMapList_.append(classMap); + } NodeList::ConstIterator c = current->childNodes().constBegin(); while (c != current->childNodes().constEnd()) { if ((*c)->subType() == Node::QmlPropertyGroup) { @@ -1268,21 +1283,19 @@ QList<Section> CppCodeMarker::qmlSections(const QmlClassNode* qmlClassNode, Syno NodeList::ConstIterator p = qpgn->childNodes().constBegin(); while (p != qpgn->childNodes().constEnd()) { if ((*p)->type() == Node::QmlProperty) { - QString key = current->name() + "::" + (*p)->name(); + QString key = (*p)->name(); key = sortName(*p, &key); - if (!all.memberMap.contains(key)) { - all.memberMap.insert(key,*p); - } + all.memberMap.insert(key,*p); + classMap->second.insert(key,*p); } ++p; } } else { - QString key = current->name() + "::" + (*c)->name(); + QString key = (*c)->name(); key = sortName(*c, &key); - if (!all.memberMap.contains(key)) { - all.memberMap.insert(key,*c); - } + all.memberMap.insert(key,*c); + classMap->second.insert(key,*c); } ++c; } diff --git a/src/tools/qdoc/doc.cpp b/src/tools/qdoc/doc.cpp index e20e85028f..12056502d5 100644 --- a/src/tools/qdoc/doc.cpp +++ b/src/tools/qdoc/doc.cpp @@ -2678,7 +2678,7 @@ QString DocParser::untabifyEtc(const QString& str) if (c == QLatin1Char('\r')) continue; if (c == QLatin1Char('\t')) { - result += " " + (column % tabSize); + result += &" "[column % tabSize]; column = ((column / tabSize) + 1) * tabSize; continue; } diff --git a/src/tools/qdoc/htmlgenerator.cpp b/src/tools/qdoc/htmlgenerator.cpp index 69d1a69d31..7d7f9e811a 100644 --- a/src/tools/qdoc/htmlgenerator.cpp +++ b/src/tools/qdoc/htmlgenerator.cpp @@ -2067,8 +2067,38 @@ QString HtmlGenerator::generateAllQmlMembersFile(const QmlClassNode* qml_cn, generateFullName(qml_cn, 0); out() << ", including inherited members.</p>\n"; - Section section = sections.first(); - generateSectionList(section, 0, marker, CodeMarker::Subpage); + ClassKeysNodesList& cknl = sections.first().classKeysNodesList_; + if (!cknl.isEmpty()) { + for (int i=0; i<cknl.size(); i++) { + ClassKeysNodes* ckn = cknl[i]; + const QmlClassNode* qcn = ckn->first; + KeysAndNodes& kn = ckn->second; + QStringList& keys = kn.first; + NodeList& nodes = kn.second; + if (nodes.isEmpty()) + continue; + if (i != 0) { + out() << "<p>The following members are inherited from "; + generateFullName(qcn,0); + out() << ".</p>\n"; + } + out() << "<ul>\n"; + for (int j=0; j<keys.size(); j++) { + if (nodes[j]->access() == Node::Private) { + continue; + } + out() << "<li class=\"fn\">"; + QString prefix; + if (!keys.isEmpty()) { + prefix = keys.at(j).mid(1); + prefix = prefix.left(keys.at(j).indexOf("::")+1); + } + generateSynopsis(nodes[j], qcn, marker, CodeMarker::Summary, false, &prefix); + out() << "</li>\n"; + } + out() << "</ul>\n"; + } + } generateFooter(); endSubPage(); diff --git a/src/tools/qdoc/main.cpp b/src/tools/qdoc/main.cpp index 50632f1da4..6c8b947c46 100644 --- a/src/tools/qdoc/main.cpp +++ b/src/tools/qdoc/main.cpp @@ -371,7 +371,9 @@ static void processQdocconfFile(const QString &fileName) excludedDirsList = config.getCanonicalRelativePathList(CONFIG_EXCLUDEDIRS); foreach (const QString &excludeDir, excludedDirsList) { QString p = QDir::fromNativeSeparators(excludeDir); - excludedDirs.insert(p); + QDir tmp(p); + if (tmp.exists()) + excludedDirs.insert(p); } Generator::debugSegfault("Reading excludefiles"); diff --git a/src/tools/qdoc/qdocindexfiles.cpp b/src/tools/qdoc/qdocindexfiles.cpp index 466742ee3a..d7a51da952 100644 --- a/src/tools/qdoc/qdocindexfiles.cpp +++ b/src/tools/qdoc/qdocindexfiles.cpp @@ -64,6 +64,7 @@ QDocIndexFiles* QDocIndexFiles::qdocIndexFiles_ = NULL; Constructs the singleton QDocIndexFiles. */ QDocIndexFiles::QDocIndexFiles() + : gen_( 0 ) { qdb_ = QDocDatabase::qdocDB(); } diff --git a/src/tools/qdoc/qmlvisitor.cpp b/src/tools/qdoc/qmlvisitor.cpp index 058ab9a725..ffe1afe28b 100644 --- a/src/tools/qdoc/qmlvisitor.cpp +++ b/src/tools/qdoc/qmlvisitor.cpp @@ -88,6 +88,7 @@ QmlDocVisitor::QmlDocVisitor(const QString &filePath, QSet<QString> &topics) : nestingLevel(0) { + lastEndOffset = 0; this->filePath = filePath; this->name = QFileInfo(filePath).baseName(); document = code; @@ -117,21 +118,21 @@ QQmlJS::AST::SourceLocation QmlDocVisitor::precedingComment(quint32 offset) cons QQmlJS::AST::SourceLocation loc = it.previous(); - if (loc.begin() <= lastEndOffset) + if (loc.begin() <= lastEndOffset) { // Return if we reach the end of the preceding structure. break; - - else if (usedComments.contains(loc.begin())) + } + else if (usedComments.contains(loc.begin())) { // Return if we encounter a previously used comment. break; - + } else if (loc.begin() > lastEndOffset && loc.end() < offset) { - // Only examine multiline comments in order to avoid snippet markers. if (document.at(loc.offset - 1) == QLatin1Char('*')) { QString comment = document.mid(loc.offset, loc.length); - if (comment.startsWith(QLatin1Char('!')) || comment.startsWith(QLatin1Char('*'))) + if (comment.startsWith(QLatin1Char('!')) || comment.startsWith(QLatin1Char('*'))) { return loc; + } } } } @@ -165,8 +166,9 @@ bool QmlDocVisitor::applyDocumentation(QQmlJS::AST::SourceLocation location, Nod node->setDoc(doc); applyMetacommands(loc, node, doc); usedComments.insert(loc.offset); - if (doc.isEmpty()) + if (doc.isEmpty()) { return false; + } return true; } Location codeLoc(filePath); @@ -601,9 +603,15 @@ void QmlDocVisitor::endVisit(QQmlJS::AST::FunctionDeclaration* fd) /*! Begin the visit of the signal handler declaration \a sb, but only if the nesting level is 1. + + This visit is now deprecated. It has been decided to document + public signals. If a signal handler must be discussed in the + documentation, that discussion must take place in the comment + for the signal. */ -bool QmlDocVisitor::visit(QQmlJS::AST::UiScriptBinding* sb) +bool QmlDocVisitor::visit(QQmlJS::AST::UiScriptBinding* ) { +#if 0 if (nestingLevel > 1) { return true; } @@ -617,6 +625,7 @@ bool QmlDocVisitor::visit(QQmlJS::AST::UiScriptBinding* sb) } } } +#endif return true; } diff --git a/src/widgets/QtGui.dynlist b/src/widgets/QtGui.dynlist deleted file mode 100644 index ea47f598a7..0000000000 --- a/src/widgets/QtGui.dynlist +++ /dev/null @@ -1,8 +0,0 @@ -{ - extern "C++" { - "qt_x11ft_convert_pattern(_FcPattern*, QByteArray*, int*, bool*)"; - "QApplication::x11ClientMessage(QWidget*, _XEvent*, bool)"; - "QApplication::notify(QObject*, QEvent*)"; - "QApplication::qwsEventFilter(QWSEvent*)"; - }; -}; diff --git a/src/widgets/QtWidgets.dynlist b/src/widgets/QtWidgets.dynlist new file mode 100644 index 0000000000..94fd207dde --- /dev/null +++ b/src/widgets/QtWidgets.dynlist @@ -0,0 +1,5 @@ +{ + extern "C++" { + "QApplication::notify(QObject*, QEvent*)"; + }; +}; diff --git a/src/widgets/accessible/qaccessiblewidget.cpp b/src/widgets/accessible/qaccessiblewidget.cpp index 5c8d3e3a57..dcbf276356 100644 --- a/src/widgets/accessible/qaccessiblewidget.cpp +++ b/src/widgets/accessible/qaccessiblewidget.cpp @@ -55,6 +55,7 @@ #include <QRubberBand> #include <QFocusFrame> #include <QMenu> +#include <QtWidgets/private/qwidget_p.h> QT_BEGIN_NAMESPACE @@ -152,6 +153,7 @@ QString Q_WIDGETS_EXPORT qt_accHotKey(const QString &text) return QString(); } +// ### inherit QAccessibleObjectPrivate class QAccessibleWidgetPrivate { public: @@ -202,9 +204,17 @@ QAccessibleWidget::QAccessibleWidget(QWidget *w, QAccessible::Role role, const Q d->name = name; } +bool QAccessibleWidget::isValid() const +{ + if (!object() || static_cast<QWidget *>(object())->d_func()->data.in_destructor) + return false; + return QAccessibleObject::isValid(); +} + /*! \reimp */ QWindow *QAccessibleWidget::window() const { + Q_ASSERT(widget()); return widget()->windowHandle(); } @@ -343,6 +353,7 @@ QAccessibleWidget::relations(QAccessible::Relation match /*= QAccessible::AllRel /*! \reimp */ QAccessibleInterface *QAccessibleWidget::parent() const { + Q_ASSERT(widget()); QObject *parentWidget= widget()->parentWidget(); if (!parentWidget) parentWidget = qApp; @@ -352,6 +363,7 @@ QAccessibleInterface *QAccessibleWidget::parent() const /*! \reimp */ QAccessibleInterface *QAccessibleWidget::child(int index) const { + Q_ASSERT(widget()); QWidgetList childList = childWidgets(widget()); if (index >= 0 && index < childList.size()) return QAccessible::queryAccessibleInterface(childList.at(index)); diff --git a/src/widgets/accessible/qaccessiblewidget_p.h b/src/widgets/accessible/qaccessiblewidget_p.h index 803dc71409..cb1ce37734 100644 --- a/src/widgets/accessible/qaccessiblewidget_p.h +++ b/src/widgets/accessible/qaccessiblewidget_p.h @@ -56,6 +56,7 @@ class Q_WIDGETS_EXPORT QAccessibleWidget : public QAccessibleObject, public QAcc { public: explicit QAccessibleWidget(QWidget *o, QAccessible::Role r = QAccessible::Client, const QString& name = QString()); + bool isValid() const; QWindow *window() const; int childCount() const; diff --git a/src/widgets/dialogs/qfiledialog.ui b/src/widgets/dialogs/qfiledialog.ui index 29f476e378..89adaf530e 100644 --- a/src/widgets/dialogs/qfiledialog.ui +++ b/src/widgets/dialogs/qfiledialog.ui @@ -90,6 +90,9 @@ <property name="accessibleDescription"> <string>Go back</string> </property> + <property name="shortcut"> + <string>Alt+Left</string> + </property> </widget> </item> <item> @@ -103,6 +106,9 @@ <property name="accessibleDescription"> <string>Go forward</string> </property> + <property name="shortcut"> + <string>Alt+Right</string> + </property> </widget> </item> <item> @@ -116,6 +122,9 @@ <property name="accessibleDescription"> <string>Go to the parent directory</string> </property> + <property name="shortcut"> + <string>Alt+Up</string> + </property> </widget> </item> <item> diff --git a/src/widgets/dialogs/qfilesystemmodel.cpp b/src/widgets/dialogs/qfilesystemmodel.cpp index a4009de68d..ee1c8ad0fd 100644 --- a/src/widgets/dialogs/qfilesystemmodel.cpp +++ b/src/widgets/dialogs/qfilesystemmodel.cpp @@ -800,7 +800,7 @@ QString QFileSystemModelPrivate::name(const QModelIndex &index) const if (!index.isValid()) return QString(); QFileSystemNode *dirNode = node(index); - if (fileInfoGatherer.resolveSymlinks() && dirNode->isSymLink(/* ignoreNtfsSymLinks = */ true)) { + if (fileInfoGatherer.resolveSymlinks() && !resolvedSymLinks.isEmpty() && dirNode->isSymLink(/* ignoreNtfsSymLinks = */ true)) { QString fullPath = QDir::fromNativeSeparators(filePath(index)); if (resolvedSymLinks.contains(fullPath)) return resolvedSymLinks[fullPath]; @@ -1522,9 +1522,9 @@ QDir::Filters QFileSystemModel::filter() const \property QFileSystemModel::resolveSymlinks \brief Whether the directory model should resolve symbolic links - This is only relevant on operating systems that support symbolic links. + This is only relevant on Windows. - By default, this property is false. + By default, this property is true. */ void QFileSystemModel::setResolveSymlinks(bool enable) { diff --git a/src/widgets/dialogs/qwizard.cpp b/src/widgets/dialogs/qwizard.cpp index f58a10b166..72283451d7 100644 --- a/src/widgets/dialogs/qwizard.cpp +++ b/src/widgets/dialogs/qwizard.cpp @@ -507,16 +507,18 @@ void QWizardPagePrivate::_q_updateCachedCompleteState() class QWizardAntiFlickerWidget : public QWidget { - QWizard *wizard; - QWizardPrivate *wizardPrivate; public: +#if !defined(QT_NO_STYLE_WINDOWSVISTA) + QWizardPrivate *wizardPrivate; QWizardAntiFlickerWidget(QWizard *wizard, QWizardPrivate *wizardPrivate) : QWidget(wizard) - , wizard(wizard) , wizardPrivate(wizardPrivate) {} -#if !defined(QT_NO_STYLE_WINDOWSVISTA) protected: void paintEvent(QPaintEvent *); +#else + QWizardAntiFlickerWidget(QWizard *wizard, QWizardPrivate *) + : QWidget(wizard) + {} #endif }; diff --git a/src/widgets/graphicsview/qgraphicsitem.cpp b/src/widgets/graphicsview/qgraphicsitem.cpp index 9aeee7c37a..62eab6a7a2 100644 --- a/src/widgets/graphicsview/qgraphicsitem.cpp +++ b/src/widgets/graphicsview/qgraphicsitem.cpp @@ -745,9 +745,6 @@ #include <QtGui/qevent.h> #include <QtGui/qinputmethod.h> #include <QtWidgets/qgraphicseffect.h> -#ifndef QT_NO_ACCESSIBILITY -# include "qaccessible.h" -#endif #include <private/qgraphicsitem_p.h> #include <private/qgraphicswidget_p.h> @@ -7357,12 +7354,6 @@ void QGraphicsItem::updateMicroFocus() if (scene()->views().at(i) == fw) { if (qApp) qApp->inputMethod()->update(Qt::ImQueryAll); - -#ifndef QT_NO_ACCESSIBILITY - // ##### is this correct - if (toGraphicsObject()) - QAccessible::updateAccessibility(toGraphicsObject(), 0, QAccessible::StateChanged); -#endif break; } } diff --git a/src/widgets/graphicsview/qgraphicsscene.cpp b/src/widgets/graphicsview/qgraphicsscene.cpp index ba59b15a54..8a0b983c73 100644 --- a/src/widgets/graphicsview/qgraphicsscene.cpp +++ b/src/widgets/graphicsview/qgraphicsscene.cpp @@ -245,9 +245,6 @@ #include <QtGui/qtransform.h> #include <QtGui/qinputmethod.h> #include <QtWidgets/qgraphicseffect.h> -#ifndef QT_NO_ACCESSIBILITY -# include <QtGui/qaccessible.h> -#endif #include <private/qapplication_p.h> #include <private/qobject_p.h> #include <private/qgraphicseffect_p.h> @@ -866,14 +863,6 @@ void QGraphicsScenePrivate::setFocusItemHelper(QGraphicsItem *item, focusItem = item; updateInputMethodSensitivityInViews(); -#ifndef QT_NO_ACCESSIBILITY - if (focusItem) { - if (QGraphicsObject *focusObj = focusItem->toGraphicsObject()) { - QAccessibleEvent event(focusObj, QAccessible::Focus); - QAccessible::updateAccessibility(&event); - } - } -#endif if (item) { QFocusEvent event(QEvent::FocusIn, focusReason); sendEvent(item, &event); @@ -5832,7 +5821,7 @@ void QGraphicsScenePrivate::touchEventHandler(QTouchEvent *sceneTouchEvent) } if (itemsNeedingEvents.isEmpty()) { - sceneTouchEvent->accept(); + sceneTouchEvent->ignore(); return; } diff --git a/src/widgets/itemviews/qitemdelegate.cpp b/src/widgets/itemviews/qitemdelegate.cpp index ea474f14ab..f2c3c4702f 100644 --- a/src/widgets/itemviews/qitemdelegate.cpp +++ b/src/widgets/itemviews/qitemdelegate.cpp @@ -1299,6 +1299,9 @@ QStyleOptionViewItem QItemDelegate::setOptions(const QModelIndex &index, if (value.canConvert<QBrush>()) opt.palette.setBrush(QPalette::Text, qvariant_cast<QBrush>(value)); + // disable style animations for checkboxes etc. within itemviews (QTBUG-30146) + opt.styleObject = 0; + return opt; } diff --git a/src/widgets/itemviews/qstyleditemdelegate.cpp b/src/widgets/itemviews/qstyleditemdelegate.cpp index 2b3ea35cb0..b121800c31 100644 --- a/src/widgets/itemviews/qstyleditemdelegate.cpp +++ b/src/widgets/itemviews/qstyleditemdelegate.cpp @@ -355,7 +355,10 @@ void QStyledItemDelegate::initStyleOption(QStyleOptionViewItem *option, else mode = QIcon::Normal; QIcon::State state = option->state & QStyle::State_Open ? QIcon::On : QIcon::Off; - option->decorationSize = option->icon.actualSize(option->decorationSize, mode, state); + QSize actualSize = option->icon.actualSize(option->decorationSize, mode, state); + // For highdpi icons actualSize might be larger than decorationSize, which we don't want. Clamp it to decorationSize. + option->decorationSize = QSize(qMin(option->decorationSize.width(), actualSize.width()), + qMin(option->decorationSize.height(), actualSize.height())); break; } case QVariant::Color: { @@ -367,13 +370,13 @@ void QStyledItemDelegate::initStyleOption(QStyleOptionViewItem *option, case QVariant::Image: { QImage image = qvariant_cast<QImage>(value); option->icon = QIcon(QPixmap::fromImage(image)); - option->decorationSize = image.size(); + option->decorationSize = image.size() / image.devicePixelRatio(); break; } case QVariant::Pixmap: { QPixmap pixmap = qvariant_cast<QPixmap>(value); option->icon = QIcon(pixmap); - option->decorationSize = pixmap.size(); + option->decorationSize = pixmap.size() / pixmap.devicePixelRatio(); break; } default: @@ -388,6 +391,9 @@ void QStyledItemDelegate::initStyleOption(QStyleOptionViewItem *option, } option->backgroundBrush = qvariant_cast<QBrush>(index.data(Qt::BackgroundRole)); + + // disable style animations for checkboxes etc. within itemviews (QTBUG-30146) + option->styleObject = 0; } /*! diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp index 6dc8c0b6ba..ac25d3ed7f 100644 --- a/src/widgets/kernel/qapplication.cpp +++ b/src/widgets/kernel/qapplication.cpp @@ -588,6 +588,8 @@ extern void qRegisterWidgetsVariant(); */ void QApplicationPrivate::initialize() { + is_app_running = false; // Starting up. + QWidgetPrivate::mapper = new QWidgetMapper; QWidgetPrivate::allWidgets = new QWidgetSet; @@ -601,8 +603,6 @@ void QApplicationPrivate::initialize() qRegisterGuiStateMachine(); #endif - is_app_running = true; // no longer starting up - if (qgetenv("QT_USE_NATIVE_WINDOWS").toInt() > 0) QCoreApplication::setAttribute(Qt::AA_NativeWindows); @@ -627,6 +627,8 @@ void QApplicationPrivate::initialize() if (QApplication::desktopSettingsAware()) if (const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme()) QApplicationPrivate::enabledAnimations = theme->themeHint(QPlatformTheme::UiEffects).toInt(); + + is_app_running = true; // no longer starting up } /***************************************************************************** @@ -3365,6 +3367,34 @@ bool QApplication::notify(QObject *receiver, QEvent *e) break; } #endif // QT_NO_GESTURES +#ifdef Q_OS_MAC + // Enable touch events on enter, disable on leave. + typedef void (*RegisterTouchWindowFn)(QWindow *, bool); + case QEvent::Enter: + if (receiver->isWidgetType()) { + QWidget *w = static_cast<QWidget *>(receiver); + if (w->testAttribute(Qt::WA_AcceptTouchEvents)) { + RegisterTouchWindowFn registerTouchWindow = reinterpret_cast<RegisterTouchWindowFn> + (platformNativeInterface()->nativeResourceFunctionForIntegration("registertouchwindow")); + if (registerTouchWindow) + registerTouchWindow(w->window()->windowHandle(), true); + } + } + res = d->notify_helper(receiver, e); + break; + case QEvent::Leave: + if (receiver->isWidgetType()) { + QWidget *w = static_cast<QWidget *>(receiver); + if (w->testAttribute(Qt::WA_AcceptTouchEvents)) { + RegisterTouchWindowFn registerTouchWindow = reinterpret_cast<RegisterTouchWindowFn> + (platformNativeInterface()->nativeResourceFunctionForIntegration("registertouchwindow")); + if (registerTouchWindow) + registerTouchWindow(w->window()->windowHandle(), false); + } + } + res = d->notify_helper(receiver, e); + break; +#endif default: res = d->notify_helper(receiver, e); break; @@ -3786,7 +3816,7 @@ bool QApplicationPrivate::translateTouchToMouse(QWidget *widget, QTouchEvent *ev const QPoint pos = widget->mapFromGlobal(p.screenPos().toPoint()); - QMouseEvent mouseEvent(eventType, pos, + QMouseEvent mouseEvent(eventType, pos, p.screenPos().toPoint(), Qt::LeftButton, Qt::LeftButton, event->modifiers()); mouseEvent.setAccepted(true); diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index 3e1e0f592c..0ef6b1735b 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -1083,7 +1083,8 @@ void QWidgetPrivate::adjustFlags(Qt::WindowFlags &flags, QWidget *w) else flags |= Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowMinimizeButtonHint | Qt::WindowMaximizeButtonHint | Qt::WindowCloseButtonHint | Qt::WindowFullscreenButtonHint; - + if (w->testAttribute(Qt::WA_TransparentForMouseEvents)) + flags |= Qt::WindowTransparentForInput; } void QWidgetPrivate::init(QWidget *parentWidget, Qt::WindowFlags f) diff --git a/src/widgets/kernel/qwidget.h b/src/widgets/kernel/qwidget.h index 5c844d1566..f90f2ee5f5 100644 --- a/src/widgets/kernel/qwidget.h +++ b/src/widgets/kernel/qwidget.h @@ -704,6 +704,8 @@ private: friend class QStyleSheetStyle; friend struct QWidgetExceptionCleaner; friend class QWidgetWindow; + friend class QAccessibleWidget; + friend class QAccessibleTable; #ifndef QT_NO_GESTURES friend class QGestureManager; friend class QWinNativePanGestureRecognizer; diff --git a/src/widgets/styles/qfusionstyle.cpp b/src/widgets/styles/qfusionstyle.cpp index 0ba9ec38c0..652d092652 100644 --- a/src/widgets/styles/qfusionstyle.cpp +++ b/src/widgets/styles/qfusionstyle.cpp @@ -1086,7 +1086,7 @@ void QFusionStyle::drawControl(ControlElement element, const QStyleOption *optio case CE_ToolBar: if (const QStyleOptionToolBar *toolBar = qstyleoption_cast<const QStyleOptionToolBar *>(option)) { // Reserve the beveled appearance only for mainwindow toolbars - if (!(widget && qobject_cast<const QMainWindow*> (widget->parentWidget()))) + if (widget && !(qobject_cast<const QMainWindow*> (widget->parentWidget()))) break; // Draws the light line above and the dark line below menu bars and diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm index eefacc4864..1ea0e27418 100644 --- a/src/widgets/styles/qmacstyle_mac.mm +++ b/src/widgets/styles/qmacstyle_mac.mm @@ -1205,7 +1205,6 @@ void QMacStylePrivate::initHIThemePushButton(const QStyleOptionButton *btn, const ThemeDrawState tds, HIThemeButtonDrawInfo *bdi) const { - bool drawColorless = btn->palette.currentColorGroup() == QPalette::Active; ThemeDrawState tdsModified = tds; if (btn->state & QStyle::State_On) tdsModified = kThemeStatePressed; @@ -1213,7 +1212,7 @@ void QMacStylePrivate::initHIThemePushButton(const QStyleOptionButton *btn, bdi->state = tdsModified; bdi->value = kThemeButtonOff; - if (drawColorless && tdsModified == kThemeStateInactive) + if (tds == kThemeStateInactive) bdi->state = kThemeStateActive; if (btn->state & QStyle::State_HasFocus) bdi->adornment = kThemeAdornmentFocus; @@ -1284,10 +1283,9 @@ void QMacStylePrivate::initComboboxBdi(const QStyleOptionComboBox *combo, HIThem bdi->value = kThemeButtonOff; if (combo->state & QStyle::State_HasFocus) bdi->adornment = kThemeAdornmentFocus; - bool drawColorless = combo->palette.currentColorGroup() == QPalette::Active && tds == kThemeStateInactive; if (combo->activeSubControls & QStyle::SC_ComboBoxArrow) bdi->state = kThemeStatePressed; - else if (drawColorless) + else if (tds == kThemeStateInactive) bdi->state = kThemeStateActive; else bdi->state = tds; @@ -1608,8 +1606,6 @@ void QMacStylePrivate::getSliderInfo(QStyle::ComplexControl cc, const QStyleOpti tdi->enableState = (slider->state & QStyle::State_Enabled) ? kThemeTrackActive : kThemeTrackDisabled; - if (!(slider->state & QStyle::State_Active)) - tdi->enableState = kThemeTrackInactive; if (!isScrollbar) { if (slider->state & QStyle::QStyle::State_HasFocus) tdi->attributes |= kThemeTrackHasFocus; @@ -3027,12 +3023,11 @@ void QMacStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPai case PE_IndicatorViewItemCheck: case PE_IndicatorRadioButton: case PE_IndicatorCheckBox: { - bool drawColorless = (!(opt->state & State_Active)) - && opt->palette.currentColorGroup() == QPalette::Active; + bool drawColorless = tds == kThemeStateInactive; HIThemeButtonDrawInfo bdi; bdi.version = qt_mac_hitheme_version; bdi.state = tds; - if (drawColorless && tds == kThemeStateInactive) + if (drawColorless) bdi.state = kThemeStateActive; bdi.adornment = kThemeDrawIndicatorOnly; if (opt->state & State_HasFocus) @@ -3554,13 +3549,10 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter int arrowYOffset = bdi.kind == kThemePushButton ? 4 : 2; HIRect arrowRect = CGRectMake(ir.right() - mbi - QMacStylePrivate::PushButtonRightOffset, ir.height() / 2 - arrowYOffset, mbi, ir.height() / 2); - bool drawColorless = btn->palette.currentColorGroup() == QPalette::Active; - if (drawColorless && tds == kThemeStateInactive) - tds = kThemeStateActive; HIThemePopupArrowDrawInfo pdi; pdi.version = qt_mac_hitheme_version; - pdi.state = tds; + pdi.state = tds == kThemeStateInactive ? kThemeStateActive : tds; pdi.orientation = kThemeArrowDown; if (arrowRect.size.width < 8.) pdi.size = kThemeArrow5pt; @@ -3991,7 +3983,6 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter HIRect cr; bool needAlpha = mi->palette.color(QPalette::Button) == Qt::transparent; if (needAlpha) { - needAlpha = true; CGContextSaveGState(cg); CGContextSetAlpha(cg, 0.0); } @@ -5118,7 +5109,7 @@ void QMacStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex HIThemeFrameDrawInfo fdi; fdi.version = qt_mac_hitheme_version; - fdi.state = tds; + fdi.state = tds == kThemeStateInactive ? kThemeStateActive : tds; fdi.kind = kHIThemeFrameTextFieldSquare; fdi.isFocused = false; HIRect hirect = qt_hirectForQRect(lineeditRect); @@ -5149,11 +5140,10 @@ void QMacStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex else if (sb->activeSubControls == SC_SpinBoxUp && (sb->state & State_Sunken)) tds = kThemeStatePressedUp; - bdi.state = tds; - if (!(sb->state & State_Active) - && sb->palette.currentColorGroup() == QPalette::Active - && tds == kThemeStateInactive) + if (tds == kThemeStateInactive) bdi.state = kThemeStateActive; + else + bdi.state = tds; bdi.value = kThemeButtonOff; bdi.adornment = kThemeAdornmentNone; @@ -5170,7 +5160,10 @@ void QMacStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex int(outRect.size.height - newRect.size.height)); newRect = qt_hirectForQRect(updown, off_rct); - HIThemeDrawButton(&newRect, &bdi, cg, kHIThemeOrientationNormal, 0); + if (tds == kThemeStateInactive) + d->drawColorlessButton(newRect, &bdi, p, sb); + else + HIThemeDrawButton(&newRect, &bdi, cg, kHIThemeOrientationNormal, 0); } } break; @@ -5178,8 +5171,7 @@ void QMacStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex if (const QStyleOptionComboBox *combo = qstyleoption_cast<const QStyleOptionComboBox *>(opt)){ HIThemeButtonDrawInfo bdi; d->initComboboxBdi(combo, &bdi, widget, d->getDrawState(opt->state)); - bool drawColorless = combo->palette.currentColorGroup() == QPalette::Active && tds == kThemeStateInactive; - if (!drawColorless) + if (!tds == kThemeStateInactive) QMacStylePrivate::drawCombobox(qt_hirectForQRect(combo->rect), bdi, p); else d->drawColorlessButton(qt_hirectForQRect(combo->rect), &bdi, p, opt); @@ -6539,15 +6531,16 @@ QMacCGContext::QMacCGContext(QPainter *p) context = CGBitmapContextCreate((void *) image->bits(), image->width(), image->height(), 8, image->bytesPerLine(), colorspace, flags); + // Invert y axis. CGContextTranslateCTM(context, 0, image->height()); CGContextScaleCTM(context, 1, -1); + const qreal devicePixelRatio = image->devicePixelRatio(); + if (devType == QInternal::Widget) { // Set the clip rect which is an intersection of the system clip // and the painter clip. To make matters more interesting these // are in device pixels and device-independent pixels, respectively. - const qreal devicePixelRatio = image->devicePixelRatio(); - QRegion clip = p->paintEngine()->systemClip(); // get system clip in device pixels QTransform native = p->deviceTransform(); // get device transform. dx/dy is in device pixels @@ -6565,6 +6558,9 @@ QMacCGContext::QMacCGContext(QPainter *p) // Scale the context so that painting happens in device-independet pixels. CGContextScaleCTM(context, devicePixelRatio, devicePixelRatio); CGContextTranslateCTM(context, native.dx() / devicePixelRatio, native.dy() / devicePixelRatio); + } else { + // Scale to paint in device-independent pixels. + CGContextScaleCTM(context, devicePixelRatio, devicePixelRatio); } } else { qDebug() << "QMacCGContext:: Unsupported painter devtype type" << devType; diff --git a/src/widgets/styles/qwindowsvistastyle.cpp b/src/widgets/styles/qwindowsvistastyle.cpp index df5a02d17f..f65e52305c 100644 --- a/src/widgets/styles/qwindowsvistastyle.cpp +++ b/src/widgets/styles/qwindowsvistastyle.cpp @@ -377,8 +377,9 @@ void QWindowsVistaStyle::drawPrimitive(PrimitiveElement element, const QStyleOpt // The end state of the transition is simply the result we would have painted // if the style was not animated. + styleOption->styleObject = 0; styleOption->state = option->state; - drawPrimitive(element, styleOption, &endPainter, widget); + proxy()->drawPrimitive(element, styleOption, &endPainter, widget); t->setEndImage(endImage); @@ -521,7 +522,8 @@ void QWindowsVistaStyle::drawPrimitive(PrimitiveElement element, const QStyleOpt break; case PE_Frame: { #ifndef QT_NO_ACCESSIBILITY - if (QStyleHelper::isInstanceOf(option->styleObject, QAccessible::EditableText)) { + if (QStyleHelper::isInstanceOf(option->styleObject, QAccessible::EditableText) + || QStyleHelper::isInstanceOf(option->styleObject, QAccessible::StaticText)) { #else if (false) { #endif @@ -536,16 +538,13 @@ void QWindowsVistaStyle::drawPrimitive(PrimitiveElement element, const QStyleOpt XPThemeData theme(widget, painter, QWindowsXPStylePrivate::EditTheme, EP_EDITBORDER_HVSCROLL, stateId, option->rect); - uint resolve_mask = option->palette.resolve(); - if (resolve_mask & (1 << QPalette::Base)) { - // Since EP_EDITBORDER_HVSCROLL does not us borderfill, theme.noContent cannot be used for clipping - int borderSize = 1; - pGetThemeInt(theme.handle(), theme.partId, theme.stateId, TMT_BORDERSIZE, &borderSize); - QRegion clipRegion = option->rect; - QRegion content = option->rect.adjusted(borderSize, borderSize, -borderSize, -borderSize); - clipRegion ^= content; - painter->setClipRegion(clipRegion); - } + // Since EP_EDITBORDER_HVSCROLL does not us borderfill, theme.noContent cannot be used for clipping + int borderSize = 1; + pGetThemeInt(theme.handle(), theme.partId, theme.stateId, TMT_BORDERSIZE, &borderSize); + QRegion clipRegion = option->rect; + QRegion content = option->rect.adjusted(borderSize, borderSize, -borderSize, -borderSize); + clipRegion ^= content; + painter->setClipRegion(clipRegion); d->drawBackground(theme); painter->restore(); } else { diff --git a/src/widgets/widgets.pro b/src/widgets/widgets.pro index 6b9aa92fd9..18a4d57900 100644 --- a/src/widgets/widgets.pro +++ b/src/widgets/widgets.pro @@ -32,7 +32,7 @@ QMAKE_LIBS += $$QMAKE_LIBS_GUI contains(DEFINES,QT_EVAL):include($$QT_SOURCE_TREE/src/corelib/eval.pri) -QMAKE_DYNAMIC_LIST_FILE = $$PWD/QtGui.dynlist +QMAKE_DYNAMIC_LIST_FILE = $$PWD/QtWidgets.dynlist # Code coverage with TestCocoon # The following is required as extra compilers use $$QMAKE_CXX instead of $(CXX). diff --git a/src/widgets/widgets/qmdisubwindow.cpp b/src/widgets/widgets/qmdisubwindow.cpp index 4259f75097..b38dea074f 100644 --- a/src/widgets/widgets/qmdisubwindow.cpp +++ b/src/widgets/widgets/qmdisubwindow.cpp @@ -164,6 +164,7 @@ #include <private/qmacstyle_mac_p.h> #endif #include <QMdiArea> +#include <QScopedValueRollback> QT_BEGIN_NAMESPACE @@ -2789,6 +2790,10 @@ bool QMdiSubWindow::event(QEvent *event) bool wasShaded = isShaded(); bool wasMinimized = isMinimized(); bool wasMaximized = isMaximized(); + // Don't emit subWindowActivated, the app doesn't have to know about our hacks + const QScopedValueRollback<bool> activationEnabledSaver(d->activationEnabled); + d->activationEnabled = false; + ensurePolished(); setContentsMargins(0, 0, 0, 0); if (wasMinimized || wasMaximized || wasShaded) @@ -3008,7 +3013,8 @@ void QMdiSubWindow::changeEvent(QEvent *changeEvent) if (d->isActive) d->ensureWindowState(Qt::WindowActive); - emit windowStateChanged(oldState, windowState()); + if (d->activationEnabled) + emit windowStateChanged(oldState, windowState()); } /*! diff --git a/tests/auto/cmake/CMakeLists.txt b/tests/auto/cmake/CMakeLists.txt index f9291a7eb3..ad31956f62 100644 --- a/tests/auto/cmake/CMakeLists.txt +++ b/tests/auto/cmake/CMakeLists.txt @@ -57,16 +57,16 @@ else() endif() expect_pass(test_wrap_cpp_and_resources) -expect_pass(test_dependent_modules) +if (NOT NO_WIDGETS) + expect_pass(test_dependent_modules) + expect_pass("test(needsquoting)dirname") +endif() expect_fail(test_add_resource_options) expect_fail(test_wrap_cpp_options) -expect_pass("test(needsquoting)dirname") expect_pass(test_platform_defs_include) expect_pass(test_qtmainwin_library) -# If Qt D-Bus has been installed then run the tests for its macros. -find_package(Qt5DBus QUIET) -if (Qt5DBus_FOUND AND NOT APPLE) +if (NOT NO_DBUS) expect_pass(test_dbus_module) endif() expect_pass(test_multiple_find_package) @@ -80,30 +80,37 @@ expect_pass(test_testlib_definitions) expect_pass(test_json_plugin_includes) expect_fail(test_testlib_no_link_gui) -expect_fail(test_testlib_no_link_widgets) - execute_process(COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/test_testlib_definitions/main.cpp" "${CMAKE_CURRENT_BINARY_DIR}/failbuild/test_testlib_no_link_gui/test_testlib_no_link_gui/" ) -execute_process(COMMAND ${CMAKE_COMMAND} -E copy - "${CMAKE_CURRENT_SOURCE_DIR}/test_testlib_definitions/main.cpp" - "${CMAKE_CURRENT_BINARY_DIR}/failbuild/test_testlib_no_link_widgets/test_testlib_no_link_widgets/" -) + +if (NOT NO_WIDGETS) + expect_fail(test_testlib_no_link_widgets) + execute_process(COMMAND ${CMAKE_COMMAND} -E copy + "${CMAKE_CURRENT_SOURCE_DIR}/test_testlib_definitions/main.cpp" + "${CMAKE_CURRENT_BINARY_DIR}/failbuild/test_testlib_no_link_widgets/test_testlib_no_link_widgets/" + ) +endif() set(qt_module_includes Core QObject Gui QImage - Widgets QWidget Network QHostInfo - OpenGL QGLBuffer Sql QSqlError Test QTestEventList Xml QDomDocument - PrintSupport QPrintDialog ) -if (UNIX AND NOT APPLE AND NOT QNXNTO) +if (NOT NO_WIDGETS) + list(APPEND qt_module_includes + Widgets QWidget + OpenGL QGLBuffer + PrintSupport QPrintDialog + ) +endif() + +if (NOT NO_DBUS) list(APPEND qt_module_includes DBus QDBusMessage ) @@ -114,3 +121,7 @@ test_module_includes( ) expect_pass(test_concurrent_module) expect_pass(test_openglextensions_module) + +if (NOT CMAKE_VERSION VERSION_LESS 2.8.11) + expect_pass(test_interface) +endif() diff --git a/tests/auto/cmake/test(needsquoting)dirname/CMakeLists.txt b/tests/auto/cmake/test(needsquoting)dirname/CMakeLists.txt index 12ce93ca26..e4c7f07256 100644 --- a/tests/auto/cmake/test(needsquoting)dirname/CMakeLists.txt +++ b/tests/auto/cmake/test(needsquoting)dirname/CMakeLists.txt @@ -3,13 +3,11 @@ cmake_minimum_required(VERSION 2.8) project("test(needsquoting)dirname") -find_package(Qt5Core REQUIRED) -find_package(Qt5Gui REQUIRED) find_package(Qt5Widgets REQUIRED) -include_directories(${Qt5Core_INCLUDE_DIRS} ${Qt5Gui_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS}) +include_directories(${Qt5Widgets_INCLUDE_DIRS}) -add_definitions(${Qt5Core_DEFINITIONS}) +add_definitions(${Qt5Widgets_DEFINITIONS}) set(CMAKE_INCLUDE_CURRENT_DIR ON) diff --git a/tests/auto/cmake/test_concurrent_module/CMakeLists.txt b/tests/auto/cmake/test_concurrent_module/CMakeLists.txt index efd7b725ea..7014fe51cd 100644 --- a/tests/auto/cmake/test_concurrent_module/CMakeLists.txt +++ b/tests/auto/cmake/test_concurrent_module/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8) project(test_concurrent_module) -find_package(Qt5Concurrent REQUIRED) +find_package(Qt5Concurrent 5.0.0 REQUIRED) include_directories( ${Qt5Concurrent_INCLUDE_DIRS} diff --git a/tests/auto/cmake/test_dbus_module/CMakeLists.txt b/tests/auto/cmake/test_dbus_module/CMakeLists.txt index 6bbb52697c..36480e85e8 100644 --- a/tests/auto/cmake/test_dbus_module/CMakeLists.txt +++ b/tests/auto/cmake/test_dbus_module/CMakeLists.txt @@ -3,17 +3,15 @@ cmake_minimum_required(VERSION 2.8) project(test_dbus_module) -find_package(Qt5Core REQUIRED) -find_package(Qt5DBus REQUIRED) +find_package(Qt5DBus 5.0.0 REQUIRED) include_directories( - ${Qt5Core_INCLUDE_DIRS} ${Qt5DBus_INCLUDE_DIRS} ) -add_definitions(${Qt5Core_DEFINITIONS} ${Qt5DBus_DEFINITIONS}) +add_definitions(${Qt5DBus_DEFINITIONS}) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Core_EXECUTABLE_COMPILE_FLAGS}") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5DBus_EXECUTABLE_COMPILE_FLAGS}") set(CMAKE_INCLUDE_CURRENT_DIR ON) @@ -33,4 +31,4 @@ qt5_add_dbus_adaptor(my_srcs ) add_executable(myobject ${my_srcs} ${moc_files}) -target_link_libraries(myobject ${Qt5DBus_LIBRARIES} ${Qt5Core_LIBRARIES}) +target_link_libraries(myobject ${Qt5DBus_LIBRARIES}) diff --git a/tests/auto/cmake/test_interface/CMakeLists.txt b/tests/auto/cmake/test_interface/CMakeLists.txt new file mode 100644 index 0000000000..a8af92da63 --- /dev/null +++ b/tests/auto/cmake/test_interface/CMakeLists.txt @@ -0,0 +1,36 @@ + +cmake_minimum_required(VERSION 2.8.11) + +project(test_interface) + +find_package(Qt5Widgets) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +add_executable(test_interface_exe WIN32 main.cpp mainwindow.cpp) + +# No need to specify include directories, compile definitions, the PIC flag, or to +# link explicitly to Qt5::WinMain. +target_link_libraries(test_interface_exe Qt5::Widgets) + +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/try_compile-test.cpp" + " +#include <QString> +#include <QWidget> + +int main(int,char**) { QWidget w; w.show(); return 0; } +" +) + +# The try_compile works because Qt5::Widgets is listed in the LINK_LIBRARIES, +# which causes the includes, defines and appropriate PIC flag to be used. +try_compile(_TRY_COMPILE_RES "${CMAKE_CURRENT_BINARY_DIR}/try_compile-test" + "${CMAKE_CURRENT_BINARY_DIR}/try_compile-test.cpp" + LINK_LIBRARIES Qt5::Widgets + OUTPUT_VARIABLE TC_OV +) + +if (NOT _TRY_COMPILE_RES) + message(SEND_ERROR "The use of try_compile with Qt5::Widgets failed. The output was :\n${TC_OV}") +endif() diff --git a/tests/auto/cmake/test_interface/main.cpp b/tests/auto/cmake/test_interface/main.cpp new file mode 100644 index 0000000000..c1d699219b --- /dev/null +++ b/tests/auto/cmake/test_interface/main.cpp @@ -0,0 +1,58 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com> +** Contact: http://www.qt-project.org/legal +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, 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, Digia gives you certain additional +** rights. These rights are described in the Digia 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. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QApplication> + +#include "mainwindow.h" + +#if !defined(QT_CORE_LIB) || !defined(QT_GUI_LIB) || !defined(QT_WIDGETS_LIB) +#error Missing module definitions +#endif + +int main(int argc, char **argv) +{ + QApplication app(argc, argv); + + MainWindow mw; + mw.show(); + + return app.exec(); +} diff --git a/tests/auto/cmake/test_interface/mainwindow.cpp b/tests/auto/cmake/test_interface/mainwindow.cpp new file mode 100644 index 0000000000..1f79bd4a1d --- /dev/null +++ b/tests/auto/cmake/test_interface/mainwindow.cpp @@ -0,0 +1,48 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com> +** Contact: http://www.qt-project.org/legal +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, 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, Digia gives you certain additional +** rights. These rights are described in the Digia 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. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "mainwindow.h" + +MainWindow::MainWindow(QWidget *parent) + : QWidget(parent) +{ + +} diff --git a/tests/auto/cmake/test_interface/mainwindow.h b/tests/auto/cmake/test_interface/mainwindow.h new file mode 100644 index 0000000000..2037c59eab --- /dev/null +++ b/tests/auto/cmake/test_interface/mainwindow.h @@ -0,0 +1,57 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com> +** Contact: http://www.qt-project.org/legal +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, 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, Digia gives you certain additional +** rights. These rights are described in the Digia 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. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include <QWidget> + +class MainWindow : public QWidget +{ + Q_OBJECT +public: + MainWindow(QWidget *parent = 0); + +signals: + void somethingHappened(); +}; + +#endif diff --git a/tests/auto/cmake/test_testlib_definitions/CMakeLists.txt b/tests/auto/cmake/test_testlib_definitions/CMakeLists.txt index c370e8effa..cc54bf5bc3 100644 --- a/tests/auto/cmake/test_testlib_definitions/CMakeLists.txt +++ b/tests/auto/cmake/test_testlib_definitions/CMakeLists.txt @@ -35,4 +35,6 @@ endmacro() add_subdirectory(core_only) add_subdirectory(gui) -add_subdirectory(widgets) +if(NOT NO_WIDGETS) + add_subdirectory(widgets) +endif() diff --git a/tests/auto/cmake/test_use_modules_function/CMakeLists.txt b/tests/auto/cmake/test_use_modules_function/CMakeLists.txt index 4ce01938cb..bfcdd9d1d7 100644 --- a/tests/auto/cmake/test_use_modules_function/CMakeLists.txt +++ b/tests/auto/cmake/test_use_modules_function/CMakeLists.txt @@ -13,4 +13,4 @@ add_executable(three three.cpp) find_package(Qt5Core) qt5_use_modules(two Test) -qt5_use_modules(three Widgets Test) +qt5_use_modules(three Gui Test) diff --git a/tests/auto/cmake/test_use_modules_function/three.cpp b/tests/auto/cmake/test_use_modules_function/three.cpp index c3aff71b03..42ae910981 100644 --- a/tests/auto/cmake/test_use_modules_function/three.cpp +++ b/tests/auto/cmake/test_use_modules_function/three.cpp @@ -40,7 +40,7 @@ ****************************************************************************/ #include <QtTest> -#include <QWidget> +#include <QWindow> class Three : public QObject { @@ -48,7 +48,7 @@ class Three : public QObject public: Three(QObject *parent = 0) { - QWidget *w = new QWidget; + QWindow *w = new QWindow; w->show(); } }; diff --git a/tests/auto/concurrent/qtconcurrentfilter/qtconcurrentfilter.pro b/tests/auto/concurrent/qtconcurrentfilter/qtconcurrentfilter.pro index 6a1e7a5180..e82d101de0 100644 --- a/tests/auto/concurrent/qtconcurrentfilter/qtconcurrentfilter.pro +++ b/tests/auto/concurrent/qtconcurrentfilter/qtconcurrentfilter.pro @@ -3,4 +3,3 @@ TARGET = tst_qtconcurrentfilter QT = core testlib concurrent SOURCES = tst_qtconcurrentfilter.cpp DEFINES += QT_STRICT_ITERATORS -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/concurrent/qtconcurrentiteratekernel/qtconcurrentiteratekernel.pro b/tests/auto/concurrent/qtconcurrentiteratekernel/qtconcurrentiteratekernel.pro index 82446e55a2..4cfebc0e3d 100644 --- a/tests/auto/concurrent/qtconcurrentiteratekernel/qtconcurrentiteratekernel.pro +++ b/tests/auto/concurrent/qtconcurrentiteratekernel/qtconcurrentiteratekernel.pro @@ -2,4 +2,3 @@ CONFIG += testcase parallel_test TARGET = tst_qtconcurrentiteratekernel QT = core testlib concurrent SOURCES = tst_qtconcurrentiteratekernel.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/concurrent/qtconcurrentmap/qtconcurrentmap.pro b/tests/auto/concurrent/qtconcurrentmap/qtconcurrentmap.pro index eeb534a0e1..199e5ad4d6 100644 --- a/tests/auto/concurrent/qtconcurrentmap/qtconcurrentmap.pro +++ b/tests/auto/concurrent/qtconcurrentmap/qtconcurrentmap.pro @@ -3,4 +3,3 @@ TARGET = tst_qtconcurrentmap QT = core testlib concurrent SOURCES = tst_qtconcurrentmap.cpp DEFINES += QT_STRICT_ITERATORS -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/concurrent/qtconcurrentrun/qtconcurrentrun.pro b/tests/auto/concurrent/qtconcurrentrun/qtconcurrentrun.pro index 23c8049952..03d77b33a2 100644 --- a/tests/auto/concurrent/qtconcurrentrun/qtconcurrentrun.pro +++ b/tests/auto/concurrent/qtconcurrentrun/qtconcurrentrun.pro @@ -2,4 +2,3 @@ CONFIG += testcase parallel_test TARGET = tst_qtconcurrentrun QT = core testlib concurrent SOURCES = tst_qtconcurrentrun.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/concurrent/qtconcurrentthreadengine/qtconcurrentthreadengine.pro b/tests/auto/concurrent/qtconcurrentthreadengine/qtconcurrentthreadengine.pro index fd2222ade8..f6ddd33504 100644 --- a/tests/auto/concurrent/qtconcurrentthreadengine/qtconcurrentthreadengine.pro +++ b/tests/auto/concurrent/qtconcurrentthreadengine/qtconcurrentthreadengine.pro @@ -2,4 +2,3 @@ CONFIG += testcase parallel_test TARGET = tst_qtconcurrentthreadengine QT = core testlib concurrent SOURCES = tst_qtconcurrentthreadengine.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp b/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp index 28cf7a904a..6eb6f83d2a 100644 --- a/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp +++ b/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp @@ -92,6 +92,7 @@ private slots: void createNativeFile(); void QTBUG_4796_data(); void QTBUG_4796(); + void guaranteeUnique(); }; void tst_QTemporaryFile::initTestCase() @@ -782,5 +783,39 @@ void tst_QTemporaryFile::QTBUG_4796() cleaner.reset(); } +void tst_QTemporaryFile::guaranteeUnique() +{ + QDir dir(QDir::tempPath()); + QString takenFileName; + + // First pass. See which filename QTemporaryFile will try first. + { + // Fix the random seed. + qsrand(1135); + QTemporaryFile tmpFile("testFile1.XXXXXX"); + tmpFile.open(); + takenFileName = tmpFile.fileName(); + QVERIFY(QFile::exists(takenFileName)); + } + + QVERIFY(!QFile::exists(takenFileName)); + + // Create a directory with same name. + QVERIFY(dir.mkdir(takenFileName)); + + // Second pass, now we have blocked its first attempt with a directory. + { + // Fix the random seed. + qsrand(1135); + QTemporaryFile tmpFile("testFile1.XXXXXX"); + QVERIFY(tmpFile.open()); + QString uniqueFileName = tmpFile.fileName(); + QVERIFY(QFileInfo(uniqueFileName).isFile()); + QVERIFY(uniqueFileName != takenFileName); + } + + QVERIFY(dir.rmdir(takenFileName)); +} + QTEST_MAIN(tst_QTemporaryFile) #include "tst_qtemporaryfile.moc" diff --git a/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp b/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp index 4e5b0a3555..b84039f557 100644 --- a/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp +++ b/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp @@ -1481,16 +1481,10 @@ void tst_QDateTime::toString_strformat_data() QTest::newRow( "datetime13" ) << QDateTime(QDate(1974, 12, 1), QTime(14, 14, 20)) << QString("hh''mm''ss dd''MM''yyyy") << QString("14'14'20 01'12'1974"); - QTest::newRow( "missing p and P" ) << QDateTime(QDate(1999, 12, 31), QTime(3, 59, 59, 999)) - << QString("hhhhhaA") << QString("03033aA"); - QTest::newRow( "OK A, bad P" ) << QDateTime(QDate(1999, 12, 31), QTime(0, 59, 59, 999)) - << QString("hhAX") << QString("00AX"); QTest::newRow( "single, 0 => 12 AM" ) << QDateTime(QDate(1999, 12, 31), QTime(0, 59, 59, 999)) << QString("hAP") << QString("12AM"); QTest::newRow( "double, 0 => 12 AM" ) << QDateTime(QDate(1999, 12, 31), QTime(0, 59, 59, 999)) << QString("hhAP") << QString("12AM"); - QTest::newRow( "double, garbage" ) << QDateTime(QDate(1999, 12, 31), QTime(0, 59, 59, 999)) - << QString("hhAX") << QString("00AX"); QTest::newRow( "dddd" ) << QDateTime(QDate(1999, 12, 31), QTime(0, 59, 59, 999)) << QString("dddd") << QString("Friday"); QTest::newRow( "ddd" ) << QDateTime(QDate(1999, 12, 31), QTime(0, 59, 59, 999)) diff --git a/tests/auto/corelib/tools/qstring/tst_qstring.cpp b/tests/auto/corelib/tools/qstring/tst_qstring.cpp index aa61885a47..91293ffc21 100644 --- a/tests/auto/corelib/tools/qstring/tst_qstring.cpp +++ b/tests/auto/corelib/tools/qstring/tst_qstring.cpp @@ -156,6 +156,7 @@ private slots: void count(); void lastIndexOf_data(); void lastIndexOf(); + void lastIndexOfInvalidRegex(); void indexOf_data(); void indexOf(); void indexOf2_data(); @@ -635,6 +636,7 @@ void tst_QString::replace_regexp_data() << QString("a9a8a7a6a5nmlkjii0hh0gg0ff0ee0dd0cc0bb0a"); QTest::newRow("backref10") << QString("abc") << QString("((((((((((((((abc))))))))))))))") << QString("\\0\\01\\011") << QString("\\0\\01\\011"); + QTest::newRow("invalid") << QString("") << QString("invalid regex\\") << QString("") << QString(""); } void tst_QString::utf8_data() @@ -1383,6 +1385,12 @@ void tst_QString::lastIndexOf() } } +void tst_QString::lastIndexOfInvalidRegex() +{ + QTest::ignoreMessage(QtWarningMsg, "QString::lastIndexOf: invalid QRegularExpression object"); + QCOMPARE(QString("").lastIndexOf(QRegularExpression("invalid regex\\"), 0), -1); +} + void tst_QString::count() { QString a; @@ -1400,7 +1408,8 @@ void tst_QString::count() QCOMPARE(a.count(QRegExp("[G][HE]")),2); QCOMPARE(a.count(QRegularExpression("[FG][HI]")), 1); QCOMPARE(a.count(QRegularExpression("[G][HE]")), 2); - + QTest::ignoreMessage(QtWarningMsg, "QString::count: invalid QRegularExpression object"); + QCOMPARE(a.count(QRegularExpression("invalid regex\\")), 0); CREATE_REF(QLatin1String("FG")); QCOMPARE(a.count(ref),2); @@ -1485,6 +1494,8 @@ void tst_QString::contains() QStringRef emptyRef(&a, 0, 0); QVERIFY(a.contains(emptyRef, Qt::CaseInsensitive)); + QTest::ignoreMessage(QtWarningMsg, "QString::contains: invalid QRegularExpression object"); + QVERIFY(!a.contains(QRegularExpression("invalid regex\\"))); } @@ -2395,7 +2406,10 @@ void tst_QString::replace_regexp() s2.replace( QRegExp(regexp), after ); QTEST( s2, "result" ); s2 = string; - s2.replace( QRegularExpression(regexp), after ); + QRegularExpression regularExpression(regexp); + if (!regularExpression.isValid()) + QTest::ignoreMessage(QtWarningMsg, "QString::replace: invalid QRegularExpression object"); + s2.replace( regularExpression, after ); QTEST( s2, "result" ); } diff --git a/tests/auto/gui/image/qicoimageformat/qicoimageformat.pro b/tests/auto/gui/image/qicoimageformat/qicoimageformat.pro index 41f7fb626e..83af3960a6 100644 --- a/tests/auto/gui/image/qicoimageformat/qicoimageformat.pro +++ b/tests/auto/gui/image/qicoimageformat/qicoimageformat.pro @@ -14,4 +14,3 @@ wince*: { DEPLOYMENT += addPlugins } TESTDATA += icons/* -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/image/qicon/qicon.pro b/tests/auto/gui/image/qicon/qicon.pro index 337b938915..f48fe90dd8 100644 --- a/tests/auto/gui/image/qicon/qicon.pro +++ b/tests/auto/gui/image/qicon/qicon.pro @@ -8,4 +8,3 @@ SOURCES += tst_qicon.cpp RESOURCES = tst_qicon.qrc TESTDATA += icons/* *.png *.svg *.svgz -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/image/qimage/qimage.pro b/tests/auto/gui/image/qimage/qimage.pro index f7b1e4001a..467a59ec9f 100644 --- a/tests/auto/gui/image/qimage/qimage.pro +++ b/tests/auto/gui/image/qimage/qimage.pro @@ -6,4 +6,3 @@ SOURCES += tst_qimage.cpp QT += core-private gui-private testlib TESTDATA += images/* -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/image/qimageiohandler/qimageiohandler.pro b/tests/auto/gui/image/qimageiohandler/qimageiohandler.pro index 43507d9336..bbcf8d23c9 100644 --- a/tests/auto/gui/image/qimageiohandler/qimageiohandler.pro +++ b/tests/auto/gui/image/qimageiohandler/qimageiohandler.pro @@ -6,4 +6,3 @@ QT += testlib SOURCES += tst_qimageiohandler.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/image/qimagereader/qimagereader.pro b/tests/auto/gui/image/qimagereader/qimagereader.pro index 432d3db19a..7686643b3a 100644 --- a/tests/auto/gui/image/qimagereader/qimagereader.pro +++ b/tests/auto/gui/image/qimagereader/qimagereader.pro @@ -11,4 +11,3 @@ win32-msvc.net:QMAKE_CXXFLAGS -= -Zm300 win32-msvc.net:QMAKE_CXXFLAGS += -Zm1100 TESTDATA += images/* baseline/* -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/image/qimagewriter/qimagewriter.pro b/tests/auto/gui/image/qimagewriter/qimagewriter.pro index 3006bfe09e..f77ff0659b 100644 --- a/tests/auto/gui/image/qimagewriter/qimagewriter.pro +++ b/tests/auto/gui/image/qimagewriter/qimagewriter.pro @@ -7,4 +7,3 @@ win32-msvc:QMAKE_CXXFLAGS -= -Zm200 win32-msvc:QMAKE_CXXFLAGS += -Zm800 TESTDATA += images/* -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/image/qmovie/qmovie.pro b/tests/auto/gui/image/qmovie/qmovie.pro index 9290588625..4e7030b1f7 100644 --- a/tests/auto/gui/image/qmovie/qmovie.pro +++ b/tests/auto/gui/image/qmovie/qmovie.pro @@ -11,4 +11,3 @@ MOC_DIR=tmp RESOURCES += resources.qrc TESTDATA += animations/* -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/image/qpicture/qpicture.pro b/tests/auto/gui/image/qpicture/qpicture.pro index b4927b4536..a24b8ec481 100644 --- a/tests/auto/gui/image/qpicture/qpicture.pro +++ b/tests/auto/gui/image/qpicture/qpicture.pro @@ -7,4 +7,3 @@ SOURCES += tst_qpicture.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/image/qpixmap/qpixmap.pro b/tests/auto/gui/image/qpixmap/qpixmap.pro index 6188bf2c6e..bdd0c15788 100644 --- a/tests/auto/gui/image/qpixmap/qpixmap.pro +++ b/tests/auto/gui/image/qpixmap/qpixmap.pro @@ -11,4 +11,3 @@ SOURCES += tst_qpixmap.cpp RESOURCES += qpixmap.qrc TESTDATA += convertFromImage/* convertFromToHICON/* loadFromData/* images/* -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp index b9b61425da..531ec68fdc 100644 --- a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp +++ b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp @@ -168,6 +168,8 @@ private slots: void scaled_QTBUG19157(); void detachOnLoad_QTBUG29639(); + + void copyOnNonAlignedBoundary(); }; static bool lenientCompare(const QPixmap &actual, const QPixmap &expected) @@ -1526,5 +1528,13 @@ void tst_QPixmap::detachOnLoad_QTBUG29639() QVERIFY(a.toImage() != b.toImage()); } +void tst_QPixmap::copyOnNonAlignedBoundary() +{ + QImage img(8, 2, QImage::Format_RGB16); + + QPixmap pm1 = QPixmap::fromImage(img, Qt::NoFormatConversion); + QPixmap pm2 = pm1.copy(QRect(5, 0, 3, 2)); // When copying second line: 2 bytes too many are read which might cause an access violation. +} + QTEST_MAIN(tst_QPixmap) #include "tst_qpixmap.moc" diff --git a/tests/auto/gui/image/qpixmapcache/qpixmapcache.pro b/tests/auto/gui/image/qpixmapcache/qpixmapcache.pro index c332497783..a81712ba23 100644 --- a/tests/auto/gui/image/qpixmapcache/qpixmapcache.pro +++ b/tests/auto/gui/image/qpixmapcache/qpixmapcache.pro @@ -6,4 +6,3 @@ SOURCES += tst_qpixmapcache.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/itemmodels/qstandarditem/qstandarditem.pro b/tests/auto/gui/itemmodels/qstandarditem/qstandarditem.pro index 4fa7bbe253..282737ed7d 100644 --- a/tests/auto/gui/itemmodels/qstandarditem/qstandarditem.pro +++ b/tests/auto/gui/itemmodels/qstandarditem/qstandarditem.pro @@ -5,4 +5,3 @@ QT += gui testlib SOURCES += tst_qstandarditem.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/itemmodels/qstandarditemmodel/qstandarditemmodel.pro b/tests/auto/gui/itemmodels/qstandarditemmodel/qstandarditemmodel.pro index 5743bf4074..71ef4acb88 100644 --- a/tests/auto/gui/itemmodels/qstandarditemmodel/qstandarditemmodel.pro +++ b/tests/auto/gui/itemmodels/qstandarditemmodel/qstandarditemmodel.pro @@ -8,4 +8,3 @@ QT += core-private gui-private SOURCES += tst_qstandarditemmodel.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/kernel/qbackingstore/qbackingstore.pro b/tests/auto/gui/kernel/qbackingstore/qbackingstore.pro index e1b7246fe2..c3113ed4b1 100644 --- a/tests/auto/gui/kernel/qbackingstore/qbackingstore.pro +++ b/tests/auto/gui/kernel/qbackingstore/qbackingstore.pro @@ -5,4 +5,3 @@ TARGET = tst_qbackingstore QT += core-private gui-private testlib SOURCES += tst_qbackingstore.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/kernel/qclipboard/copier/copier.pro b/tests/auto/gui/kernel/qclipboard/copier/copier.pro index 25f08fbef7..def50b6476 100644 --- a/tests/auto/gui/kernel/qclipboard/copier/copier.pro +++ b/tests/auto/gui/kernel/qclipboard/copier/copier.pro @@ -2,4 +2,3 @@ CONFIG -= app_bundle win32: DESTDIR = ../copier SOURCES += main.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/kernel/qclipboard/paster/paster.pro b/tests/auto/gui/kernel/qclipboard/paster/paster.pro index 1ab295111c..ef91e77b6e 100644 --- a/tests/auto/gui/kernel/qclipboard/paster/paster.pro +++ b/tests/auto/gui/kernel/qclipboard/paster/paster.pro @@ -2,4 +2,3 @@ win32: DESTDIR = ../paster CONFIG -= app_bundle SOURCES += main.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/kernel/qclipboard/test/test.pro b/tests/auto/gui/kernel/qclipboard/test/test.pro index 494b155d45..586404871f 100644 --- a/tests/auto/gui/kernel/qclipboard/test/test.pro +++ b/tests/auto/gui/kernel/qclipboard/test/test.pro @@ -18,4 +18,3 @@ wince* { TEST_HELPER_INSTALLS = \ ../copier/copier \ ../paster/paster -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp b/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp index 4470961f7b..89807f3747 100644 --- a/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp +++ b/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp @@ -208,11 +208,12 @@ static bool runHelper(const QString &program, const QStringList &arguments, QByt // Windows: Due to implementation changes, the event loop needs // to be spun since we ourselves also need to answer the // WM_DRAWCLIPBOARD message as we are in the chain of clipboard - // viewers. + // viewers. Check for running before waitForFinished() in case + // the process terminated while processEvents() was executed. bool running = true; for (int i = 0; i < 60 && running; ++i) { QGuiApplication::processEvents(QEventLoop::ExcludeUserInputEvents); - if (process.waitForFinished(500)) + if (process.state() != QProcess::Running || process.waitForFinished(500)) running = false; } if (running) { diff --git a/tests/auto/gui/kernel/qdrag/qdrag.pro b/tests/auto/gui/kernel/qdrag/qdrag.pro index 21df5c798a..d4a7bc2705 100644 --- a/tests/auto/gui/kernel/qdrag/qdrag.pro +++ b/tests/auto/gui/kernel/qdrag/qdrag.pro @@ -9,4 +9,3 @@ QT += testlib SOURCES += tst_qdrag.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/kernel/qevent/qevent.pro b/tests/auto/gui/kernel/qevent/qevent.pro index 502c9ccc97..09d4395f4d 100644 --- a/tests/auto/gui/kernel/qevent/qevent.pro +++ b/tests/auto/gui/kernel/qevent/qevent.pro @@ -3,4 +3,3 @@ TARGET = tst_qevent SOURCES += tst_qevent.cpp QT = core testlib CONFIG += parallel_test -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/qfileopeneventexternal.pro b/tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/qfileopeneventexternal.pro index dc6d38f866..b84ff760ca 100644 --- a/tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/qfileopeneventexternal.pro +++ b/tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/qfileopeneventexternal.pro @@ -2,4 +2,3 @@ TEMPLATE = app TARGET = qfileopeneventexternal QT += core gui SOURCES += qfileopeneventexternal.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/kernel/qfileopenevent/test/test.pro b/tests/auto/gui/kernel/qfileopenevent/test/test.pro index 78fcc4ce38..a6d3f322ef 100644 --- a/tests/auto/gui/kernel/qfileopenevent/test/test.pro +++ b/tests/auto/gui/kernel/qfileopenevent/test/test.pro @@ -2,4 +2,3 @@ CONFIG += testcase TARGET = tst_qfileopenevent QT += testlib SOURCES += tst_qfileopenevent.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/kernel/qguiapplication/qguiapplication.pro b/tests/auto/gui/kernel/qguiapplication/qguiapplication.pro index 8c26529170..a9baf29996 100644 --- a/tests/auto/gui/kernel/qguiapplication/qguiapplication.pro +++ b/tests/auto/gui/kernel/qguiapplication/qguiapplication.pro @@ -2,4 +2,3 @@ CONFIG += testcase TARGET = tst_qguiapplication QT += core gui gui-private testlib SOURCES = tst_qguiapplication.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/kernel/qguieventdispatcher/qguieventdispatcher.pro b/tests/auto/gui/kernel/qguieventdispatcher/qguieventdispatcher.pro index 3b1f14756d..3057037e74 100644 --- a/tests/auto/gui/kernel/qguieventdispatcher/qguieventdispatcher.pro +++ b/tests/auto/gui/kernel/qguieventdispatcher/qguieventdispatcher.pro @@ -2,4 +2,3 @@ CONFIG += testcase TARGET = tst_qguieventdispatcher QT = core gui testlib SOURCES += ../../../corelib/kernel/qeventdispatcher/tst_qeventdispatcher.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/kernel/qguimetatype/qguimetatype.pro b/tests/auto/gui/kernel/qguimetatype/qguimetatype.pro index a0b433a6e9..914142404b 100644 --- a/tests/auto/gui/kernel/qguimetatype/qguimetatype.pro +++ b/tests/auto/gui/kernel/qguimetatype/qguimetatype.pro @@ -3,4 +3,3 @@ TARGET = tst_qguimetatype SOURCES += tst_qguimetatype.cpp QT = core gui testlib CONFIG += parallel_test -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/kernel/qguitimer/qguitimer.pro b/tests/auto/gui/kernel/qguitimer/qguitimer.pro index 8023b56b34..15793d6e70 100644 --- a/tests/auto/gui/kernel/qguitimer/qguitimer.pro +++ b/tests/auto/gui/kernel/qguitimer/qguitimer.pro @@ -3,4 +3,3 @@ CONFIG += parallel_test TARGET = tst_qguitimer QT = core gui testlib SOURCES += ../../../corelib/kernel/qtimer/tst_qtimer.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/kernel/qguivariant/no_application/no_application.pro b/tests/auto/gui/kernel/qguivariant/no_application/no_application.pro index 8f6160cfe5..cc72c225a3 100644 --- a/tests/auto/gui/kernel/qguivariant/no_application/no_application.pro +++ b/tests/auto/gui/kernel/qguivariant/no_application/no_application.pro @@ -3,4 +3,3 @@ CONFIG += parallel_test TARGET = no_application SOURCES += main.cpp QT += testlib -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/kernel/qguivariant/test/test.pro b/tests/auto/gui/kernel/qguivariant/test/test.pro index a2f18956d7..d47cf7bf6f 100644 --- a/tests/auto/gui/kernel/qguivariant/test/test.pro +++ b/tests/auto/gui/kernel/qguivariant/test/test.pro @@ -4,4 +4,3 @@ TARGET = tst_qguivariant SOURCES += tst_qguivariant.cpp INCLUDEPATH += $$PWD/../../../../other/qvariant_common QT += testlib -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/kernel/qinputmethod/qinputmethod.pro b/tests/auto/gui/kernel/qinputmethod/qinputmethod.pro index afbc595467..ff491c1e25 100644 --- a/tests/auto/gui/kernel/qinputmethod/qinputmethod.pro +++ b/tests/auto/gui/kernel/qinputmethod/qinputmethod.pro @@ -3,4 +3,3 @@ CONFIG += parallel_test TARGET = tst_qinputmethod SOURCES += tst_qinputmethod.cpp QT += core-private gui-private testlib -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/kernel/qmouseevent/qmouseevent.pro b/tests/auto/gui/kernel/qmouseevent/qmouseevent.pro index 029a559417..5fa886334a 100644 --- a/tests/auto/gui/kernel/qmouseevent/qmouseevent.pro +++ b/tests/auto/gui/kernel/qmouseevent/qmouseevent.pro @@ -2,4 +2,3 @@ CONFIG += testcase TARGET = tst_qmouseevent QT += testlib SOURCES += tst_qmouseevent.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/kernel/qmouseevent_modal/qmouseevent_modal.pro b/tests/auto/gui/kernel/qmouseevent_modal/qmouseevent_modal.pro index 3eefe49c00..7fd3a59edc 100644 --- a/tests/auto/gui/kernel/qmouseevent_modal/qmouseevent_modal.pro +++ b/tests/auto/gui/kernel/qmouseevent_modal/qmouseevent_modal.pro @@ -5,4 +5,3 @@ SOURCES += tst_qmouseevent_modal.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/kernel/qpalette/qpalette.pro b/tests/auto/gui/kernel/qpalette/qpalette.pro index 079332ee9f..de87e8fafe 100644 --- a/tests/auto/gui/kernel/qpalette/qpalette.pro +++ b/tests/auto/gui/kernel/qpalette/qpalette.pro @@ -6,4 +6,3 @@ SOURCES += tst_qpalette.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/kernel/qscreen/qscreen.pro b/tests/auto/gui/kernel/qscreen/qscreen.pro index bb549da2ec..b2c98a9dfd 100644 --- a/tests/auto/gui/kernel/qscreen/qscreen.pro +++ b/tests/auto/gui/kernel/qscreen/qscreen.pro @@ -5,4 +5,3 @@ TARGET = tst_qscreen QT += core-private gui-private testlib SOURCES += tst_qscreen.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/kernel/qsurfaceformat/qsurfaceformat.pro b/tests/auto/gui/kernel/qsurfaceformat/qsurfaceformat.pro index dabffde77b..9a705f443e 100644 --- a/tests/auto/gui/kernel/qsurfaceformat/qsurfaceformat.pro +++ b/tests/auto/gui/kernel/qsurfaceformat/qsurfaceformat.pro @@ -5,4 +5,3 @@ TARGET = tst_qsurfaceformat QT += core-private gui-private testlib SOURCES += tst_qsurfaceformat.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/kernel/qtouchevent/qtouchevent.pro b/tests/auto/gui/kernel/qtouchevent/qtouchevent.pro index c6e9aa8a2e..7136611165 100644 --- a/tests/auto/gui/kernel/qtouchevent/qtouchevent.pro +++ b/tests/auto/gui/kernel/qtouchevent/qtouchevent.pro @@ -1,4 +1,3 @@ SOURCES=tst_qtouchevent.cpp TARGET=tst_qtouchevent QT += testlib widgets gui-private -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/kernel/qwindow/qwindow.pro b/tests/auto/gui/kernel/qwindow/qwindow.pro index 8e9be27139..e419a10440 100644 --- a/tests/auto/gui/kernel/qwindow/qwindow.pro +++ b/tests/auto/gui/kernel/qwindow/qwindow.pro @@ -4,4 +4,3 @@ TARGET = tst_qwindow QT += core-private gui-private testlib SOURCES += tst_qwindow.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/math3d/qquaternion/qquaternion.pro b/tests/auto/gui/math3d/qquaternion/qquaternion.pro index cc2039cc73..d20719fd11 100644 --- a/tests/auto/gui/math3d/qquaternion/qquaternion.pro +++ b/tests/auto/gui/math3d/qquaternion/qquaternion.pro @@ -3,4 +3,3 @@ CONFIG += parallel_test TARGET = tst_qquaternion SOURCES += tst_qquaternion.cpp QT += testlib -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/math3d/qvectornd/qvectornd.pro b/tests/auto/gui/math3d/qvectornd/qvectornd.pro index 7c4d4a04b2..9504b4a02b 100644 --- a/tests/auto/gui/math3d/qvectornd/qvectornd.pro +++ b/tests/auto/gui/math3d/qvectornd/qvectornd.pro @@ -3,4 +3,3 @@ CONFIG += parallel_test TARGET = tst_qvectornd SOURCES += tst_qvectornd.cpp QT += testlib -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/painting/qbrush/qbrush.pro b/tests/auto/gui/painting/qbrush/qbrush.pro index 3710c4593f..526de12815 100644 --- a/tests/auto/gui/painting/qbrush/qbrush.pro +++ b/tests/auto/gui/painting/qbrush/qbrush.pro @@ -3,4 +3,3 @@ CONFIG += parallel_test TARGET = tst_qbrush QT += testlib SOURCES += tst_qbrush.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/painting/qcolor/qcolor.pro b/tests/auto/gui/painting/qcolor/qcolor.pro index 77e89d5cf5..f7439c243c 100644 --- a/tests/auto/gui/painting/qcolor/qcolor.pro +++ b/tests/auto/gui/painting/qcolor/qcolor.pro @@ -3,4 +3,3 @@ CONFIG += parallel_test TARGET = tst_qcolor SOURCES += tst_qcolor.cpp QT += testlib -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/painting/qpaintengine/qpaintengine.pro b/tests/auto/gui/painting/qpaintengine/qpaintengine.pro index 7691b5b625..1cf79af0a7 100644 --- a/tests/auto/gui/painting/qpaintengine/qpaintengine.pro +++ b/tests/auto/gui/painting/qpaintengine/qpaintengine.pro @@ -3,4 +3,3 @@ CONFIG += parallel_test TARGET = tst_qpaintengine SOURCES += tst_qpaintengine.cpp QT += testlib -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp index 2e5f43807a..4f1213dff9 100644 --- a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp +++ b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp @@ -278,6 +278,9 @@ private slots: void QTBUG26013_squareCapStroke(); void QTBUG25153_drawLine(); + void cosmeticStrokerClipping_data(); + void cosmeticStrokerClipping(); + private: void fillData(); void setPenColor(QPainter& p); @@ -4458,6 +4461,77 @@ void tst_QPainter::QTBUG25153_drawLine() } } +enum CosmeticStrokerPaint +{ + Antialiasing, + Dashing +}; + +static void paint_func(QPainter *p, CosmeticStrokerPaint type) +{ + p->save(); + switch (type) { + case Antialiasing: + p->setPen(Qt::black); + p->setRenderHint(QPainter::Antialiasing); + p->drawLine(4, 8, 42, 42); + break; + case Dashing: + p->setPen(QPen(Qt::black, 1, Qt::DashLine, Qt::RoundCap, Qt::MiterJoin)); + p->drawLine(8, 8, 42, 8); + p->drawLine(42, 8, 42, 42); + p->drawLine(42, 42, 8, 42); + p->drawLine(8, 42, 8, 8); + break; + default: + Q_ASSERT(false); + break; + } + p->restore(); +} + +Q_DECLARE_METATYPE(CosmeticStrokerPaint) + +void tst_QPainter::cosmeticStrokerClipping_data() +{ + QTest::addColumn<CosmeticStrokerPaint>("paint"); + + QTest::newRow("antialiasing_paint") << Antialiasing; + QTest::newRow("dashing_paint") << Dashing; +} + +void tst_QPainter::cosmeticStrokerClipping() +{ + QFETCH(CosmeticStrokerPaint, paint); + + QImage image(50, 50, QImage::Format_RGB32); + image.fill(Qt::white); + + QPainter p(&image); + paint_func(&p, paint); + p.end(); + + QImage old = image.copy(); + + image.paintEngine()->setSystemClip(QRect(10, 0, image.width() - 10, image.height())); + + p.begin(&image); + p.fillRect(image.rect(), Qt::white); + paint_func(&p, paint); + + // doing same paint operation again with different system clip should not change the image + QCOMPARE(old, image); + + old = image; + + p.setClipRect(QRect(20, 20, 30, 30)); + p.fillRect(image.rect(), Qt::white); + paint_func(&p, paint); + + // ditto for regular clips + QCOMPARE(old, image); +} + QTEST_MAIN(tst_QPainter) #include "tst_qpainter.moc" diff --git a/tests/auto/gui/painting/qpainterpath/qpainterpath.pro b/tests/auto/gui/painting/qpainterpath/qpainterpath.pro index ab41241779..0c0fe8951a 100644 --- a/tests/auto/gui/painting/qpainterpath/qpainterpath.pro +++ b/tests/auto/gui/painting/qpainterpath/qpainterpath.pro @@ -2,4 +2,3 @@ CONFIG += testcase TARGET = tst_qpainterpath SOURCES += tst_qpainterpath.cpp QT += testlib -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/painting/qpainterpathstroker/qpainterpathstroker.pro b/tests/auto/gui/painting/qpainterpathstroker/qpainterpathstroker.pro index bd9500ad05..8ad476b498 100644 --- a/tests/auto/gui/painting/qpainterpathstroker/qpainterpathstroker.pro +++ b/tests/auto/gui/painting/qpainterpathstroker/qpainterpathstroker.pro @@ -3,4 +3,3 @@ CONFIG += parallel_test TARGET = tst_qpainterpathstroker SOURCES += tst_qpainterpathstroker.cpp QT += testlib -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/painting/qpathclipper/qpathclipper.pro b/tests/auto/gui/painting/qpathclipper/qpathclipper.pro index 5be81a1cce..18f7ccef2f 100644 --- a/tests/auto/gui/painting/qpathclipper/qpathclipper.pro +++ b/tests/auto/gui/painting/qpathclipper/qpathclipper.pro @@ -9,4 +9,3 @@ QT += gui-private testlib requires(contains(QT_CONFIG,private_tests)) unix:!mac:LIBS+=-lm -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/painting/qpen/qpen.pro b/tests/auto/gui/painting/qpen/qpen.pro index 122aeaf843..cafec29947 100644 --- a/tests/auto/gui/painting/qpen/qpen.pro +++ b/tests/auto/gui/painting/qpen/qpen.pro @@ -3,4 +3,3 @@ CONFIG += parallel_test TARGET = tst_qpen SOURCES += tst_qpen.cpp QT += testlib -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/painting/qpolygon/qpolygon.pro b/tests/auto/gui/painting/qpolygon/qpolygon.pro index 874704887b..f3e75d7e9e 100644 --- a/tests/auto/gui/painting/qpolygon/qpolygon.pro +++ b/tests/auto/gui/painting/qpolygon/qpolygon.pro @@ -7,4 +7,3 @@ SOURCES += tst_qpolygon.cpp unix:!mac:LIBS+=-lm -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/painting/qregion/qregion.pro b/tests/auto/gui/painting/qregion/qregion.pro index 66ed81053f..01eb9dd937 100644 --- a/tests/auto/gui/painting/qregion/qregion.pro +++ b/tests/auto/gui/painting/qregion/qregion.pro @@ -8,4 +8,3 @@ SOURCES += tst_qregion.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/painting/qtransform/qtransform.pro b/tests/auto/gui/painting/qtransform/qtransform.pro index b3767cdd04..1b5c2a4f25 100644 --- a/tests/auto/gui/painting/qtransform/qtransform.pro +++ b/tests/auto/gui/painting/qtransform/qtransform.pro @@ -5,4 +5,3 @@ SOURCES += tst_qtransform.cpp QT += testlib unix:!mac:LIBS+=-lm -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/painting/qwmatrix/qwmatrix.pro b/tests/auto/gui/painting/qwmatrix/qwmatrix.pro index 39f14b10b6..e0e260555a 100644 --- a/tests/auto/gui/painting/qwmatrix/qwmatrix.pro +++ b/tests/auto/gui/painting/qwmatrix/qwmatrix.pro @@ -5,4 +5,3 @@ SOURCES += tst_qwmatrix.cpp QT += testlib unix:!mac:LIBS+=-lm -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/qopengl/qopengl.pro b/tests/auto/gui/qopengl/qopengl.pro index a7e9bef108..91eeda34c3 100644 --- a/tests/auto/gui/qopengl/qopengl.pro +++ b/tests/auto/gui/qopengl/qopengl.pro @@ -8,4 +8,3 @@ TARGET = tst_qopengl QT += gui gui-private core-private testlib SOURCES += tst_qopengl.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/text/qabstracttextdocumentlayout/qabstracttextdocumentlayout.pro b/tests/auto/gui/text/qabstracttextdocumentlayout/qabstracttextdocumentlayout.pro index bb6457853e..866638f154 100644 --- a/tests/auto/gui/text/qabstracttextdocumentlayout/qabstracttextdocumentlayout.pro +++ b/tests/auto/gui/text/qabstracttextdocumentlayout/qabstracttextdocumentlayout.pro @@ -9,4 +9,3 @@ QT += testlib SOURCES += tst_qabstracttextdocumentlayout.cpp linux: CONFIG += insignificant_test -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/text/qcssparser/qcssparser.pro b/tests/auto/gui/text/qcssparser/qcssparser.pro index 43d363dc7b..346a38d5f6 100644 --- a/tests/auto/gui/text/qcssparser/qcssparser.pro +++ b/tests/auto/gui/text/qcssparser/qcssparser.pro @@ -15,4 +15,3 @@ wince* { DEPLOYMENT += addFiles timesFont } -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/text/qfontcache/qfontcache.pro b/tests/auto/gui/text/qfontcache/qfontcache.pro index 313cd78714..5068c12cd6 100644 --- a/tests/auto/gui/text/qfontcache/qfontcache.pro +++ b/tests/auto/gui/text/qfontcache/qfontcache.pro @@ -5,4 +5,3 @@ QT += testlib QT += core-private gui-private SOURCES += tst_qfontcache.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/text/qfontdatabase/qfontdatabase.pro b/tests/auto/gui/text/qfontdatabase/qfontdatabase.pro index 3111f515ec..43e04a006f 100644 --- a/tests/auto/gui/text/qfontdatabase/qfontdatabase.pro +++ b/tests/auto/gui/text/qfontdatabase/qfontdatabase.pro @@ -4,11 +4,10 @@ TARGET = tst_qfontdatabase SOURCES += tst_qfontdatabase.cpp DEFINES += SRCDIR=\\\"$$PWD\\\" QT += testlib -!mac: QT += core-private gui-private platformsupport-private +!mac: QT += core-private gui-private wince* { additionalFiles.files = FreeMono.ttf additionalFiles.path = . DEPLOYMENT += additionalFiles } -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp b/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp index 7afc049023..a9ad299ad8 100644 --- a/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp +++ b/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp @@ -44,9 +44,6 @@ #include <qfontdatabase.h> #include <qfontinfo.h> #include <qfontmetrics.h> -#ifndef Q_OS_MAC -#include <QtPlatformSupport/private/qbasicfontdatabase_p.h> -#endif class tst_QFontDatabase : public QObject { @@ -76,10 +73,6 @@ private slots: void addAppFont_data(); void addAppFont(); - -#ifndef Q_OS_MAC - void fontName(); -#endif }; tst_QFontDatabase::tst_QFontDatabase() @@ -275,13 +268,5 @@ void tst_QFontDatabase::addAppFont() QCOMPARE(db.families(), oldFamilies); } -#ifndef Q_OS_MAC -void tst_QFontDatabase::fontName() -{ - QString fontName = QBasicFontDatabase::fontNameFromTTFile(QStringLiteral("FreeMono.ttf")); - QCOMPARE(fontName, QStringLiteral("FreeMono")); -} -#endif - QTEST_MAIN(tst_QFontDatabase) #include "tst_qfontdatabase.moc" diff --git a/tests/auto/gui/text/qfontmetrics/qfontmetrics.pro b/tests/auto/gui/text/qfontmetrics/qfontmetrics.pro index 88436f6a0e..7286c53d74 100644 --- a/tests/auto/gui/text/qfontmetrics/qfontmetrics.pro +++ b/tests/auto/gui/text/qfontmetrics/qfontmetrics.pro @@ -4,4 +4,3 @@ TARGET = tst_qfontmetrics QT += testlib core-private gui-private SOURCES += tst_qfontmetrics.cpp RESOURCES += testfont.qrc -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/text/qglyphrun/qglyphrun.pro b/tests/auto/gui/text/qglyphrun/qglyphrun.pro index 45680febf3..db28a690a7 100644 --- a/tests/auto/gui/text/qglyphrun/qglyphrun.pro +++ b/tests/auto/gui/text/qglyphrun/qglyphrun.pro @@ -13,4 +13,3 @@ wince* { } else { DEFINES += SRCDIR=\\\"$$PWD/\\\" } -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/text/qrawfont/qrawfont.pro b/tests/auto/gui/text/qrawfont/qrawfont.pro index ce4d0aec40..540ffb94d7 100644 --- a/tests/auto/gui/text/qrawfont/qrawfont.pro +++ b/tests/auto/gui/text/qrawfont/qrawfont.pro @@ -8,4 +8,3 @@ SOURCES += \ tst_qrawfont.cpp TESTDATA += testfont_bold_italic.ttf testfont.ttf -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/text/qstatictext/qstatictext.pro b/tests/auto/gui/text/qstatictext/qstatictext.pro index 772b68cfff..55b218deb7 100644 --- a/tests/auto/gui/text/qstatictext/qstatictext.pro +++ b/tests/auto/gui/text/qstatictext/qstatictext.pro @@ -5,4 +5,3 @@ TARGET = tst_qstatictext QT += testlib QT += core core-private gui gui-private SOURCES += tst_qstatictext.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/text/qsyntaxhighlighter/qsyntaxhighlighter.pro b/tests/auto/gui/text/qsyntaxhighlighter/qsyntaxhighlighter.pro index 24b58c7d3e..a8dd6437ba 100644 --- a/tests/auto/gui/text/qsyntaxhighlighter/qsyntaxhighlighter.pro +++ b/tests/auto/gui/text/qsyntaxhighlighter/qsyntaxhighlighter.pro @@ -4,4 +4,3 @@ TARGET = tst_qsyntaxhighlighter SOURCES += tst_qsyntaxhighlighter.cpp QT += testlib qtHaveModule(widgets) QT += widgets -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/text/qtextblock/qtextblock.pro b/tests/auto/gui/text/qtextblock/qtextblock.pro index ebf992469e..6048361f7a 100644 --- a/tests/auto/gui/text/qtextblock/qtextblock.pro +++ b/tests/auto/gui/text/qtextblock/qtextblock.pro @@ -9,4 +9,3 @@ SOURCES += tst_qtextblock.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/text/qtextcursor/qtextcursor.pro b/tests/auto/gui/text/qtextcursor/qtextcursor.pro index 278cf91cc8..5e045404f1 100644 --- a/tests/auto/gui/text/qtextcursor/qtextcursor.pro +++ b/tests/auto/gui/text/qtextcursor/qtextcursor.pro @@ -3,4 +3,3 @@ CONFIG += parallel_test TARGET = tst_qtextcursor SOURCES += tst_qtextcursor.cpp QT += testlib -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/text/qtextdocument/qtextdocument.pro b/tests/auto/gui/text/qtextdocument/qtextdocument.pro index c995fee678..1f06e297f2 100644 --- a/tests/auto/gui/text/qtextdocument/qtextdocument.pro +++ b/tests/auto/gui/text/qtextdocument/qtextdocument.pro @@ -5,4 +5,3 @@ HEADERS += common.h SOURCES += tst_qtextdocument.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/text/qtextdocumentfragment/qtextdocumentfragment.pro b/tests/auto/gui/text/qtextdocumentfragment/qtextdocumentfragment.pro index 5aee639da6..da8d120c69 100644 --- a/tests/auto/gui/text/qtextdocumentfragment/qtextdocumentfragment.pro +++ b/tests/auto/gui/text/qtextdocumentfragment/qtextdocumentfragment.pro @@ -7,4 +7,3 @@ SOURCES += tst_qtextdocumentfragment.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/text/qtextdocumentlayout/qtextdocumentlayout.pro b/tests/auto/gui/text/qtextdocumentlayout/qtextdocumentlayout.pro index 76dd370a8d..42c6406fdb 100644 --- a/tests/auto/gui/text/qtextdocumentlayout/qtextdocumentlayout.pro +++ b/tests/auto/gui/text/qtextdocumentlayout/qtextdocumentlayout.pro @@ -6,4 +6,3 @@ qtHaveModule(widgets) QT += widgets SOURCES += tst_qtextdocumentlayout.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/text/qtextformat/qtextformat.pro b/tests/auto/gui/text/qtextformat/qtextformat.pro index 4689ecb982..b137dac9eb 100644 --- a/tests/auto/gui/text/qtextformat/qtextformat.pro +++ b/tests/auto/gui/text/qtextformat/qtextformat.pro @@ -3,4 +3,3 @@ CONFIG += parallel_test TARGET = tst_qtextformat QT += testlib SOURCES += tst_qtextformat.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/text/qtextlayout/qtextlayout.pro b/tests/auto/gui/text/qtextlayout/qtextlayout.pro index 9a2388d878..1e67626d23 100644 --- a/tests/auto/gui/text/qtextlayout/qtextlayout.pro +++ b/tests/auto/gui/text/qtextlayout/qtextlayout.pro @@ -3,4 +3,3 @@ TARGET = tst_qtextlayout QT += core-private gui-private testlib HEADERS += SOURCES += tst_qtextlayout.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/text/qtextlist/qtextlist.pro b/tests/auto/gui/text/qtextlist/qtextlist.pro index ef33e182c0..b837f1f81b 100644 --- a/tests/auto/gui/text/qtextlist/qtextlist.pro +++ b/tests/auto/gui/text/qtextlist/qtextlist.pro @@ -9,4 +9,3 @@ HEADERS += ../qtextdocument/common.h -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/text/qtextobject/qtextobject.pro b/tests/auto/gui/text/qtextobject/qtextobject.pro index ebeba2a64a..b2bf793e8e 100644 --- a/tests/auto/gui/text/qtextobject/qtextobject.pro +++ b/tests/auto/gui/text/qtextobject/qtextobject.pro @@ -10,4 +10,3 @@ qtHaveModule(widgets): QT += widgets SOURCES += tst_qtextobject.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/text/qtextodfwriter/qtextodfwriter.pro b/tests/auto/gui/text/qtextodfwriter/qtextodfwriter.pro index afbf86cbfe..2c8bb39f6d 100644 --- a/tests/auto/gui/text/qtextodfwriter/qtextodfwriter.pro +++ b/tests/auto/gui/text/qtextodfwriter/qtextodfwriter.pro @@ -4,4 +4,3 @@ QT += core-private gui-private testlib SOURCES += tst_qtextodfwriter.cpp DEFINES += SRCDIR=\\\"$$PWD\\\" -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/text/qtextpiecetable/qtextpiecetable.pro b/tests/auto/gui/text/qtextpiecetable/qtextpiecetable.pro index 344d643201..1419e32012 100644 --- a/tests/auto/gui/text/qtextpiecetable/qtextpiecetable.pro +++ b/tests/auto/gui/text/qtextpiecetable/qtextpiecetable.pro @@ -8,4 +8,3 @@ HEADERS += ../qtextdocument/common.h requires(!win32) requires(contains(QT_CONFIG,private_tests)) -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/text/qtextscriptengine/generate/generate.pro b/tests/auto/gui/text/qtextscriptengine/generate/generate.pro index 908c309447..6de4910107 100644 --- a/tests/auto/gui/text/qtextscriptengine/generate/generate.pro +++ b/tests/auto/gui/text/qtextscriptengine/generate/generate.pro @@ -3,4 +3,3 @@ QT += core-private INCLUDEPATH += . /usr/include/freetype2 SOURCES += main.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/text/qtextscriptengine/qtextscriptengine.pro b/tests/auto/gui/text/qtextscriptengine/qtextscriptengine.pro index e355a90e5c..2179fcbdf8 100644 --- a/tests/auto/gui/text/qtextscriptengine/qtextscriptengine.pro +++ b/tests/auto/gui/text/qtextscriptengine/qtextscriptengine.pro @@ -6,4 +6,3 @@ QT += core-private gui-private testlib HEADERS += SOURCES += tst_qtextscriptengine.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/text/qtexttable/qtexttable.pro b/tests/auto/gui/text/qtexttable/qtexttable.pro index 1c59bf1471..1e7249090a 100644 --- a/tests/auto/gui/text/qtexttable/qtexttable.pro +++ b/tests/auto/gui/text/qtexttable/qtexttable.pro @@ -7,4 +7,3 @@ SOURCES += tst_qtexttable.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/text/qzip/qzip.pro b/tests/auto/gui/text/qzip/qzip.pro index 479f48ff1d..309f2167d1 100644 --- a/tests/auto/gui/text/qzip/qzip.pro +++ b/tests/auto/gui/text/qzip/qzip.pro @@ -11,4 +11,3 @@ wince* { } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/util/qdoublevalidator/qdoublevalidator.pro b/tests/auto/gui/util/qdoublevalidator/qdoublevalidator.pro index 1941bea02c..9f04bdbb60 100644 --- a/tests/auto/gui/util/qdoublevalidator/qdoublevalidator.pro +++ b/tests/auto/gui/util/qdoublevalidator/qdoublevalidator.pro @@ -5,4 +5,3 @@ QT += testlib SOURCES += tst_qdoublevalidator.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/util/qintvalidator/qintvalidator.pro b/tests/auto/gui/util/qintvalidator/qintvalidator.pro index 1afc806ee1..4bc35416b5 100644 --- a/tests/auto/gui/util/qintvalidator/qintvalidator.pro +++ b/tests/auto/gui/util/qintvalidator/qintvalidator.pro @@ -3,4 +3,3 @@ CONFIG += parallel_test TARGET = tst_qintvalidator SOURCES += tst_qintvalidator.cpp QT += testlib -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/util/qregexpvalidator/qregexpvalidator.pro b/tests/auto/gui/util/qregexpvalidator/qregexpvalidator.pro index f2797466e3..5b70d7b11d 100644 --- a/tests/auto/gui/util/qregexpvalidator/qregexpvalidator.pro +++ b/tests/auto/gui/util/qregexpvalidator/qregexpvalidator.pro @@ -3,4 +3,3 @@ CONFIG += parallel_test TARGET = tst_qregexpvalidator SOURCES += tst_qregexpvalidator.cpp QT += testlib -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/network/kernel/qnetworkinterface/tst_qnetworkinterface.cpp b/tests/auto/network/kernel/qnetworkinterface/tst_qnetworkinterface.cpp index 1b64f1dd73..7780b80179 100644 --- a/tests/auto/network/kernel/qnetworkinterface/tst_qnetworkinterface.cpp +++ b/tests/auto/network/kernel/qnetworkinterface/tst_qnetworkinterface.cpp @@ -91,11 +91,14 @@ void tst_QNetworkInterface::initTestCase() QSKIP("No network test server available"); #ifndef QT_NO_BEARERMANAGEMENT netConfMan = new QNetworkConfigurationManager(this); - networkConfiguration = netConfMan->defaultConfiguration(); - networkSession.reset(new QNetworkSession(networkConfiguration)); - if (!networkSession->isOpen()) { - networkSession->open(); - QVERIFY(networkSession->waitForOpened(30000)); + if (netConfMan->capabilities() + & QNetworkConfigurationManager::NetworkSessionRequired) { + networkConfiguration = netConfMan->defaultConfiguration(); + networkSession.reset(new QNetworkSession(networkConfiguration)); + if (!networkSession->isOpen()) { + networkSession->open(); + QVERIFY(networkSession->waitForOpened(30000)); + } } #endif } diff --git a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp index d1ff60ea70..feb6978690 100644 --- a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp +++ b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp @@ -708,6 +708,8 @@ void tst_QSslSocket::peerCertificateChain() if (!QSslSocket::supportsSsl()) return; + QSKIP("QTBUG-29941 - Unstable auto-test due to intermittently unreachable host"); + QSslSocketPtr socket = newSocket(); this->socket = socket.data(); @@ -1641,7 +1643,14 @@ void tst_QSslSocket::setReadBufferSize_task_250027() setReadBufferSize_task_250027_handler.waitSomeMore(socket.data()); QByteArray secondRead = socket->readAll(); // second read should be some more data - QVERIFY(secondRead.size() > 0); + + int secondReadSize = secondRead.size(); + + if (secondReadSize <= 0) { + QEXPECT_FAIL("", "QTBUG-29730", Continue); + } + + QVERIFY(secondReadSize > 0); socket->close(); } diff --git a/tests/auto/opengl/qgl/tst_qgl.cpp b/tests/auto/opengl/qgl/tst_qgl.cpp index 3bae5d5103..00973cf533 100644 --- a/tests/auto/opengl/qgl/tst_qgl.cpp +++ b/tests/auto/opengl/qgl/tst_qgl.cpp @@ -832,10 +832,19 @@ static void fuzzyCompareImages(const QImage &testImage, const QImage &referenceI class UnclippedWidget : public QWidget { public: + bool painted; + + UnclippedWidget() + : painted(false) + { + } + void paintEvent(QPaintEvent *) { QPainter p(this); p.fillRect(rect().adjusted(-1000, -1000, 1000, 1000), Qt::black); + + painted = true; } }; @@ -866,10 +875,8 @@ void tst_QGL::graphicsViewClipping() scene.setSceneRect(view.viewport()->rect()); QVERIFY(QTest::qWaitForWindowExposed(&view)); - #ifdef Q_OS_MAC - // The black rectangle jumps from the center to the upper left for some reason. - QTest::qWait(100); - #endif + + QTRY_VERIFY(widget->painted); QImage image = viewport->grabFrameBuffer(); QImage expected = image; diff --git a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp index ab5b36cf69..e168c13d42 100644 --- a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp +++ b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp @@ -236,6 +236,7 @@ private slots: void eventTest(); void customWidget(); void deletedWidget(); + void subclassedWidget(); void statesStructTest(); void navigateHierarchy(); @@ -294,38 +295,6 @@ QAccessible::State state(QWidget * const widget) return iface->state(); } -class QtTestAccessibleWidget: public QWidget -{ - Q_OBJECT -public: - QtTestAccessibleWidget(QWidget *parent, const char *name): QWidget(parent) - { - setObjectName(name); - QPalette pal; - pal.setColor(backgroundRole(), Qt::black);//black is beautiful - setPalette(pal); - setFixedSize(5, 5); - } -}; - -class QtTestAccessibleWidgetIface: public QAccessibleWidget -{ -public: - QtTestAccessibleWidgetIface(QtTestAccessibleWidget *w): QAccessibleWidget(w) {} - QString text(QAccessible::Text t) const - { - if (t == QAccessible::Help) - return QString::fromLatin1("Help yourself"); - return QAccessibleWidget::text(t); - } - static QAccessibleInterface *ifaceFactory(const QString &key, QObject *o) - { - if (key == "QtTestAccessibleWidget") - return new QtTestAccessibleWidgetIface(static_cast<QtTestAccessibleWidget*>(o)); - return 0; - } -}; - tst_QAccessibility::tst_QAccessibility() { click_count = 0; @@ -343,7 +312,6 @@ void tst_QAccessibility::onClicked() void tst_QAccessibility::initTestCase() { QTestAccessibility::initialize(); - QAccessible::installFactory(QtTestAccessibleWidgetIface::ifaceFactory); } void tst_QAccessibility::cleanupTestCase() @@ -396,26 +364,115 @@ void tst_QAccessibility::eventTest() QVERIFY(QTestAccessibility::containsEvent(&hideEvent)); delete button; + + // Make sure that invalid events don't bring down the system + // these events can be in user code. + QWidget *widget = new QWidget(); + QAccessibleEvent ev1(widget, QAccessible::Focus); + QAccessible::updateAccessibility(&ev1); + + QAccessibleEvent ev2(widget, QAccessible::Focus); + ev2.setChild(7); + QAccessible::updateAccessibility(&ev2); + delete widget; + + QObject *object = new QObject(); + QAccessibleEvent ev3(object, QAccessible::Focus); + QAccessible::updateAccessibility(&ev3); + delete object; + + QTestAccessibility::clearEvents(); } + +class QtTestAccessibleWidget: public QWidget +{ + Q_OBJECT +public: + QtTestAccessibleWidget(QWidget *parent, const char *name): QWidget(parent) + { + setObjectName(name); + } +}; + +class QtTestAccessibleWidgetIface: public QAccessibleWidget +{ +public: + QtTestAccessibleWidgetIface(QtTestAccessibleWidget *w): QAccessibleWidget(w) {} + QString text(QAccessible::Text t) const + { + if (t == QAccessible::Help) + return QString::fromLatin1("Help yourself"); + return QAccessibleWidget::text(t); + } + static QAccessibleInterface *ifaceFactory(const QString &key, QObject *o) + { + if (key == "QtTestAccessibleWidget") + return new QtTestAccessibleWidgetIface(static_cast<QtTestAccessibleWidget*>(o)); + return 0; + } +}; + +class QtTestAccessibleWidgetSubclass: public QtTestAccessibleWidget +{ + Q_OBJECT +public: + QtTestAccessibleWidgetSubclass(QWidget *parent, const char *name): QtTestAccessibleWidget(parent, name) + {} +}; + void tst_QAccessibility::customWidget() { + { QtTestAccessibleWidget* widget = new QtTestAccessibleWidget(0, "Heinz"); - + widget->show(); + QTest::qWaitForWindowExposed(widget); + // By default we create QAccessibleWidget QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(widget); QVERIFY(iface != 0); QVERIFY(iface->isValid()); QCOMPARE(iface->object(), (QObject*)widget); QCOMPARE(iface->object()->objectName(), QString("Heinz")); + QCOMPARE(iface->rect().height(), widget->height()); + QCOMPARE(iface->text(QAccessible::Help), QString()); + QCOMPARE(iface->rect().height(), widget->height()); + delete iface; + delete widget; + } + { + QAccessible::installFactory(QtTestAccessibleWidgetIface::ifaceFactory); + QtTestAccessibleWidget* widget = new QtTestAccessibleWidget(0, "Heinz"); + widget->show(); + QTest::qWaitForWindowExposed(widget); + QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(widget); + QVERIFY(iface != 0); + QVERIFY(iface->isValid()); + QCOMPARE(iface->object(), (QObject*)widget); + QCOMPARE(iface->object()->objectName(), QString("Heinz")); + QCOMPARE(iface->rect().height(), widget->height()); + // The help text is only set if our factory works QCOMPARE(iface->text(QAccessible::Help), QString("Help yourself")); - delete iface; delete widget; + } + { + // A subclass of any class should still get the right QAccessibleInterface + QtTestAccessibleWidgetSubclass* subclassedWidget = new QtTestAccessibleWidgetSubclass(0, "Hans"); + QAccessibleInterface *subIface = QAccessible::queryAccessibleInterface(subclassedWidget); + QVERIFY(subIface != 0); + QVERIFY(subIface->isValid()); + QCOMPARE(subIface->object(), (QObject*)subclassedWidget); + QCOMPARE(subIface->text(QAccessible::Help), QString("Help yourself")); + delete subIface; + delete subclassedWidget; + } + QTestAccessibility::clearEvents(); } void tst_QAccessibility::deletedWidget() { QtTestAccessibleWidget *widget = new QtTestAccessibleWidget(0, "Ralf"); + QAccessible::installFactory(QtTestAccessibleWidgetIface::ifaceFactory); QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(widget); QVERIFY(iface != 0); QVERIFY(iface->isValid()); @@ -427,6 +484,25 @@ void tst_QAccessibility::deletedWidget() delete iface; } +class KFooButton: public QPushButton +{ + Q_OBJECT +public: + KFooButton(const QString &text, QWidget* parent = 0) : QPushButton(text, parent) + {} +}; + +void tst_QAccessibility::subclassedWidget() +{ + KFooButton button("Ploink", 0); + QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(&button); + QVERIFY(iface); + QCOMPARE(iface->object(), (QObject*)&button); + QCOMPARE(iface->text(QAccessible::Name), button.text()); + delete iface; + QTestAccessibility::clearEvents(); +} + void tst_QAccessibility::statesStructTest() { QAccessible::State s1; @@ -598,10 +674,8 @@ void tst_QAccessibility::accessibleName() { QWidget *toplevel = createWidgets(); toplevel->show(); -#if defined(Q_OS_UNIX) - QCoreApplication::processEvents(); - QTest::qWait(100); -#endif + QVERIFY(QTest::qWaitForWindowExposed(toplevel)); + QLayout *lout = toplevel->layout(); for (int i = 0; i < lout->count(); i++) { QLayoutItem *item = lout->itemAt(i); @@ -610,12 +684,12 @@ void tst_QAccessibility::accessibleName() QString name = tr("Widget Name %1").arg(i); child->setAccessibleName(name); QAccessibleInterface *acc = QAccessible::queryAccessibleInterface(child); + QVERIFY(acc); QCOMPARE(acc->text(QAccessible::Name), name); QString desc = tr("Widget Description %1").arg(i); child->setAccessibleDescription(desc); QCOMPARE(acc->text(QAccessible::Description), desc); - } delete toplevel; diff --git a/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp b/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp index 1d2a60506f..1fbdd31a8f 100644 --- a/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp +++ b/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp @@ -221,6 +221,9 @@ private slots: void QTBUG_16967(); //clean close void QTBUG_23895_data() { generic_data("QSQLITE"); } void QTBUG_23895(); //sqlite boolean type + void QTBUG_14904_data() { generic_data("QSQLITE"); } + void QTBUG_14904(); + void QTBUG_2192_data() { generic_data(); } void QTBUG_2192(); @@ -1027,6 +1030,10 @@ void tst_QSqlQuery::isActive() QVERIFY_SQL( q, exec( "delete from " + qtest + " where id = 42" ) ); QVERIFY( q.isActive() ); + + QVERIFY_SQL( q, exec( "delete from " + qtest + " where id = 42" ) ); + + QVERIFY( q.isActive() ); } void tst_QSqlQuery::numRowsAffected() @@ -3407,6 +3414,42 @@ void tst_QSqlQuery::QTBUG_23895() QVERIFY(!q.next()); } +/** + * Test for aliases with dots + */ +void tst_QSqlQuery::QTBUG_14904() +{ + QFETCH(QString, dbName); + QSqlDatabase db = QSqlDatabase::database(dbName); + CHECK_DATABASE(db); + + QSqlQuery q(db); + + QString tableName(qTableName("bug14904", __FILE__ )); + tst_Databases::safeDropTable( db, tableName ); + + q.prepare("create table " + tableName + "(val1 bool)"); + QVERIFY_SQL(q, exec()); + q.prepare("insert into " + tableName + "(val1) values(?);"); + q.addBindValue(true); + QVERIFY_SQL(q, exec()); + + QString sql="select val1 AS value1 from " + tableName; + QVERIFY_SQL(q, exec(sql)); + QVERIFY_SQL(q, next()); + + QCOMPARE(q.record().indexOf("value1"), 0); + QCOMPARE(q.record().field(0).type(), QVariant::Bool); + QCOMPARE(q.value(0).toBool(), true); + + sql="select val1 AS 'value.one' from " + tableName; + QVERIFY_SQL(q, exec(sql)); + QVERIFY_SQL(q, next()); + QCOMPARE(q.record().indexOf("value.one"), 0); // was -1 before bug fix + QCOMPARE(q.record().field(0).type(), QVariant::Bool); + QCOMPARE(q.value(0).toBool(), true); +} + void tst_QSqlQuery::QTBUG_2192() { QFETCH( QString, dbName ); @@ -3419,14 +3462,19 @@ void tst_QSqlQuery::QTBUG_2192() QSqlQuery q(db); QVERIFY_SQL(q, exec(QString("CREATE TABLE " + tableName + " (dt %1)").arg(tst_Databases::dateTimeTypeName(db)))); + QDateTime dt = QDateTime(QDate(2012, 7, 4), QTime(23, 59, 59, 999)); QVERIFY_SQL(q, prepare("INSERT INTO " + tableName + " (dt) VALUES (?)")); - q.bindValue(0, QVariant(QDateTime(QDate(2012, 7, 4), QTime(23, 59, 59, 999)))); + q.bindValue(0, dt); QVERIFY_SQL(q, exec()); - // Check if value was stored with at least second precision. QVERIFY_SQL(q, exec("SELECT dt FROM " + tableName)); QVERIFY_SQL(q, next()); - QVERIFY(q.value(0).toDateTime().msecsTo(QDateTime(QDate(2012, 7, 4), QTime(23, 59, 59, 999))) < 1000 ); + + // Check if retrieved value preserves reported precision + int precision = qMax(0, q.record().field("dt").precision()); + int diff = qAbs(q.value(0).toDateTime().msecsTo(dt)); + int keep = qMin(1000, (int)qPow(10.0, precision)); + QVERIFY(diff <= 1000 - keep); } } diff --git a/tests/auto/testlib/qsignalspy/qsignalspy.pro b/tests/auto/testlib/qsignalspy/qsignalspy.pro index cdeac8c41c..72ae3a5009 100644 --- a/tests/auto/testlib/qsignalspy/qsignalspy.pro +++ b/tests/auto/testlib/qsignalspy/qsignalspy.pro @@ -3,4 +3,3 @@ TARGET = tst_qsignalspy SOURCES += tst_qsignalspy.cpp QT = core testlib CONFIG += parallel_test -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/testlib/selftests/alive/alive.pro b/tests/auto/testlib/selftests/alive/alive.pro index f4c18d54fa..d3df09b10d 100644 --- a/tests/auto/testlib/selftests/alive/alive.pro +++ b/tests/auto/testlib/selftests/alive/alive.pro @@ -6,4 +6,3 @@ CONFIG -= debug_and_release_target TARGET = alive -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/testlib/selftests/assert/assert.pro b/tests/auto/testlib/selftests/assert/assert.pro index 0930724059..cfc6a0c6b3 100644 --- a/tests/auto/testlib/selftests/assert/assert.pro +++ b/tests/auto/testlib/selftests/assert/assert.pro @@ -5,4 +5,3 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = assert -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/testlib/selftests/badxml/badxml.pro b/tests/auto/testlib/selftests/badxml/badxml.pro index 6c5e6320f8..7b3b0f701c 100644 --- a/tests/auto/testlib/selftests/badxml/badxml.pro +++ b/tests/auto/testlib/selftests/badxml/badxml.pro @@ -5,4 +5,3 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = badxml -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/testlib/selftests/benchlibcallgrind/benchlibcallgrind.pro b/tests/auto/testlib/selftests/benchlibcallgrind/benchlibcallgrind.pro index f0cfecd4ff..6cbefe518c 100644 --- a/tests/auto/testlib/selftests/benchlibcallgrind/benchlibcallgrind.pro +++ b/tests/auto/testlib/selftests/benchlibcallgrind/benchlibcallgrind.pro @@ -5,4 +5,3 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = benchlibcallgrind -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/testlib/selftests/benchlibcounting/benchlibcounting.pro b/tests/auto/testlib/selftests/benchlibcounting/benchlibcounting.pro index d3c841f0d5..b495995eac 100644 --- a/tests/auto/testlib/selftests/benchlibcounting/benchlibcounting.pro +++ b/tests/auto/testlib/selftests/benchlibcounting/benchlibcounting.pro @@ -5,4 +5,3 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = benchlibcounting -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/testlib/selftests/benchlibeventcounter/benchlibeventcounter.pro b/tests/auto/testlib/selftests/benchlibeventcounter/benchlibeventcounter.pro index 5c38140bc4..5e2b963491 100644 --- a/tests/auto/testlib/selftests/benchlibeventcounter/benchlibeventcounter.pro +++ b/tests/auto/testlib/selftests/benchlibeventcounter/benchlibeventcounter.pro @@ -5,4 +5,3 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = benchlibeventcounter -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/testlib/selftests/benchliboptions/benchliboptions.pro b/tests/auto/testlib/selftests/benchliboptions/benchliboptions.pro index 77dcf853e9..f4bcc92129 100644 --- a/tests/auto/testlib/selftests/benchliboptions/benchliboptions.pro +++ b/tests/auto/testlib/selftests/benchliboptions/benchliboptions.pro @@ -5,4 +5,3 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = benchliboptions -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/testlib/selftests/benchlibtickcounter/benchlibtickcounter.pro b/tests/auto/testlib/selftests/benchlibtickcounter/benchlibtickcounter.pro index 5763b8dc32..ce0ec7012c 100644 --- a/tests/auto/testlib/selftests/benchlibtickcounter/benchlibtickcounter.pro +++ b/tests/auto/testlib/selftests/benchlibtickcounter/benchlibtickcounter.pro @@ -6,4 +6,3 @@ CONFIG -= debug_and_release_target TARGET = benchlibtickcounter -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/testlib/selftests/benchlibwalltime/benchlibwalltime.pro b/tests/auto/testlib/selftests/benchlibwalltime/benchlibwalltime.pro index 2faa7585ac..0e689871ab 100644 --- a/tests/auto/testlib/selftests/benchlibwalltime/benchlibwalltime.pro +++ b/tests/auto/testlib/selftests/benchlibwalltime/benchlibwalltime.pro @@ -6,4 +6,3 @@ CONFIG -= debug_and_release_target TARGET = benchlibwalltime -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/testlib/selftests/cmptest/cmptest.pro b/tests/auto/testlib/selftests/cmptest/cmptest.pro index e8e467dc8a..a793c203dd 100644 --- a/tests/auto/testlib/selftests/cmptest/cmptest.pro +++ b/tests/auto/testlib/selftests/cmptest/cmptest.pro @@ -5,4 +5,3 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = cmptest -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/testlib/selftests/commandlinedata/commandlinedata.pro b/tests/auto/testlib/selftests/commandlinedata/commandlinedata.pro index d1ed7143a6..056388333a 100644 --- a/tests/auto/testlib/selftests/commandlinedata/commandlinedata.pro +++ b/tests/auto/testlib/selftests/commandlinedata/commandlinedata.pro @@ -5,4 +5,3 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = commandlinedata -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/testlib/selftests/counting/counting.pro b/tests/auto/testlib/selftests/counting/counting.pro index e9c53ed3b4..8aa2fe5753 100644 --- a/tests/auto/testlib/selftests/counting/counting.pro +++ b/tests/auto/testlib/selftests/counting/counting.pro @@ -5,4 +5,3 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = counting -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/testlib/selftests/crashes/crashes.pro b/tests/auto/testlib/selftests/crashes/crashes.pro index 80b438fb5e..25e24243d1 100644 --- a/tests/auto/testlib/selftests/crashes/crashes.pro +++ b/tests/auto/testlib/selftests/crashes/crashes.pro @@ -5,4 +5,3 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = crashes -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/testlib/selftests/datatable/datatable.pro b/tests/auto/testlib/selftests/datatable/datatable.pro index 2b8e368497..72fa851ae6 100644 --- a/tests/auto/testlib/selftests/datatable/datatable.pro +++ b/tests/auto/testlib/selftests/datatable/datatable.pro @@ -5,4 +5,3 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = datatable -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/testlib/selftests/datetime/datetime.pro b/tests/auto/testlib/selftests/datetime/datetime.pro index 94d34bfcad..d65c59354f 100644 --- a/tests/auto/testlib/selftests/datetime/datetime.pro +++ b/tests/auto/testlib/selftests/datetime/datetime.pro @@ -5,4 +5,3 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = datetime -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/testlib/selftests/differentexec/differentexec.pro b/tests/auto/testlib/selftests/differentexec/differentexec.pro index ba7fc5bedd..7f148ba996 100644 --- a/tests/auto/testlib/selftests/differentexec/differentexec.pro +++ b/tests/auto/testlib/selftests/differentexec/differentexec.pro @@ -5,4 +5,3 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = differentexec -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/testlib/selftests/exceptionthrow/exceptionthrow.pro b/tests/auto/testlib/selftests/exceptionthrow/exceptionthrow.pro index 76000ce7db..fe89f6f3cd 100644 --- a/tests/auto/testlib/selftests/exceptionthrow/exceptionthrow.pro +++ b/tests/auto/testlib/selftests/exceptionthrow/exceptionthrow.pro @@ -6,4 +6,3 @@ CONFIG -= debug_and_release_target CONFIG += exceptions TARGET = exceptionthrow -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/testlib/selftests/expectfail/expectfail.pro b/tests/auto/testlib/selftests/expectfail/expectfail.pro index fdaf888263..c1849990f2 100644 --- a/tests/auto/testlib/selftests/expectfail/expectfail.pro +++ b/tests/auto/testlib/selftests/expectfail/expectfail.pro @@ -5,4 +5,3 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = expectfail -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/testlib/selftests/failcleanup/failcleanup.pro b/tests/auto/testlib/selftests/failcleanup/failcleanup.pro index b4781fd062..426d7cc45b 100644 --- a/tests/auto/testlib/selftests/failcleanup/failcleanup.pro +++ b/tests/auto/testlib/selftests/failcleanup/failcleanup.pro @@ -5,4 +5,3 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = failcleanup -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/testlib/selftests/failinit/failinit.pro b/tests/auto/testlib/selftests/failinit/failinit.pro index 7e926f379f..6a30a5af68 100644 --- a/tests/auto/testlib/selftests/failinit/failinit.pro +++ b/tests/auto/testlib/selftests/failinit/failinit.pro @@ -5,4 +5,3 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = failinit -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/testlib/selftests/failinitdata/failinitdata.pro b/tests/auto/testlib/selftests/failinitdata/failinitdata.pro index 312d32605a..b608c67dbb 100644 --- a/tests/auto/testlib/selftests/failinitdata/failinitdata.pro +++ b/tests/auto/testlib/selftests/failinitdata/failinitdata.pro @@ -5,4 +5,3 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = failinitdata -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/testlib/selftests/fetchbogus/fetchbogus.pro b/tests/auto/testlib/selftests/fetchbogus/fetchbogus.pro index 63b9d223b5..33b306ca75 100644 --- a/tests/auto/testlib/selftests/fetchbogus/fetchbogus.pro +++ b/tests/auto/testlib/selftests/fetchbogus/fetchbogus.pro @@ -5,4 +5,3 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = fetchbogus -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/testlib/selftests/findtestdata/findtestdata.pro b/tests/auto/testlib/selftests/findtestdata/findtestdata.pro index 25d48376d3..f04a640c59 100644 --- a/tests/auto/testlib/selftests/findtestdata/findtestdata.pro +++ b/tests/auto/testlib/selftests/findtestdata/findtestdata.pro @@ -7,4 +7,3 @@ CONFIG -= debug_and_release_target RESOURCES = findtestdata.qrc TARGET = findtestdata -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/testlib/selftests/float/float.pro b/tests/auto/testlib/selftests/float/float.pro index d739abcc06..95980eeac8 100644 --- a/tests/auto/testlib/selftests/float/float.pro +++ b/tests/auto/testlib/selftests/float/float.pro @@ -5,4 +5,3 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = float -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/testlib/selftests/globaldata/globaldata.pro b/tests/auto/testlib/selftests/globaldata/globaldata.pro index f98ddac02d..c0b1554c0f 100644 --- a/tests/auto/testlib/selftests/globaldata/globaldata.pro +++ b/tests/auto/testlib/selftests/globaldata/globaldata.pro @@ -5,4 +5,3 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = globaldata -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/testlib/selftests/longstring/longstring.pro b/tests/auto/testlib/selftests/longstring/longstring.pro index d531fe6984..d16ba85095 100644 --- a/tests/auto/testlib/selftests/longstring/longstring.pro +++ b/tests/auto/testlib/selftests/longstring/longstring.pro @@ -5,4 +5,3 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = longstring -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/testlib/selftests/maxwarnings/maxwarnings.pro b/tests/auto/testlib/selftests/maxwarnings/maxwarnings.pro index ef810bd022..79451af1ec 100644 --- a/tests/auto/testlib/selftests/maxwarnings/maxwarnings.pro +++ b/tests/auto/testlib/selftests/maxwarnings/maxwarnings.pro @@ -5,4 +5,3 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = maxwarnings -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/testlib/selftests/multiexec/multiexec.pro b/tests/auto/testlib/selftests/multiexec/multiexec.pro index 4638c3c653..2038acbd31 100644 --- a/tests/auto/testlib/selftests/multiexec/multiexec.pro +++ b/tests/auto/testlib/selftests/multiexec/multiexec.pro @@ -5,4 +5,3 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = multiexec -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/testlib/selftests/printdatatags/printdatatags.pro b/tests/auto/testlib/selftests/printdatatags/printdatatags.pro index 646e55bf8f..cd06384835 100644 --- a/tests/auto/testlib/selftests/printdatatags/printdatatags.pro +++ b/tests/auto/testlib/selftests/printdatatags/printdatatags.pro @@ -5,4 +5,3 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = printdatatags -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/testlib/selftests/printdatatagswithglobaltags/printdatatagswithglobaltags.pro b/tests/auto/testlib/selftests/printdatatagswithglobaltags/printdatatagswithglobaltags.pro index bf07434e80..f1cf25d104 100644 --- a/tests/auto/testlib/selftests/printdatatagswithglobaltags/printdatatagswithglobaltags.pro +++ b/tests/auto/testlib/selftests/printdatatagswithglobaltags/printdatatagswithglobaltags.pro @@ -5,4 +5,3 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = printdatatagswithglobaltags -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/testlib/selftests/qexecstringlist/qexecstringlist.pro b/tests/auto/testlib/selftests/qexecstringlist/qexecstringlist.pro index 80fb419ac9..bd967f32e6 100644 --- a/tests/auto/testlib/selftests/qexecstringlist/qexecstringlist.pro +++ b/tests/auto/testlib/selftests/qexecstringlist/qexecstringlist.pro @@ -5,4 +5,3 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = qexecstringlist -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/testlib/selftests/silent/silent.pro b/tests/auto/testlib/selftests/silent/silent.pro index c4c2e41d6f..3150f65a5e 100644 --- a/tests/auto/testlib/selftests/silent/silent.pro +++ b/tests/auto/testlib/selftests/silent/silent.pro @@ -5,4 +5,3 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = silent -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/testlib/selftests/singleskip/singleskip.pro b/tests/auto/testlib/selftests/singleskip/singleskip.pro index fed6755dc6..9f63e62747 100644 --- a/tests/auto/testlib/selftests/singleskip/singleskip.pro +++ b/tests/auto/testlib/selftests/singleskip/singleskip.pro @@ -5,4 +5,3 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = singleskip -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/testlib/selftests/skip/skip.pro b/tests/auto/testlib/selftests/skip/skip.pro index 1bc72da113..8780d295cf 100644 --- a/tests/auto/testlib/selftests/skip/skip.pro +++ b/tests/auto/testlib/selftests/skip/skip.pro @@ -5,4 +5,3 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = skip -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/testlib/selftests/skipcleanup/skipcleanup.pro b/tests/auto/testlib/selftests/skipcleanup/skipcleanup.pro index 596166b0b6..f98cda7596 100644 --- a/tests/auto/testlib/selftests/skipcleanup/skipcleanup.pro +++ b/tests/auto/testlib/selftests/skipcleanup/skipcleanup.pro @@ -5,4 +5,3 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = skipcleanup -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/testlib/selftests/skipinit/skipinit.pro b/tests/auto/testlib/selftests/skipinit/skipinit.pro index 791782a5c2..7defce9a52 100644 --- a/tests/auto/testlib/selftests/skipinit/skipinit.pro +++ b/tests/auto/testlib/selftests/skipinit/skipinit.pro @@ -5,4 +5,3 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = skipinit -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/testlib/selftests/skipinitdata/skipinitdata.pro b/tests/auto/testlib/selftests/skipinitdata/skipinitdata.pro index f3f8043b78..cd806c2a43 100644 --- a/tests/auto/testlib/selftests/skipinitdata/skipinitdata.pro +++ b/tests/auto/testlib/selftests/skipinitdata/skipinitdata.pro @@ -5,4 +5,3 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = skipinitdata -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/testlib/selftests/sleep/sleep.pro b/tests/auto/testlib/selftests/sleep/sleep.pro index c3a8dae37d..affcba22ee 100644 --- a/tests/auto/testlib/selftests/sleep/sleep.pro +++ b/tests/auto/testlib/selftests/sleep/sleep.pro @@ -5,4 +5,3 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = sleep -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/testlib/selftests/strcmp/strcmp.pro b/tests/auto/testlib/selftests/strcmp/strcmp.pro index 498a1ba4f1..f5f6eecc88 100644 --- a/tests/auto/testlib/selftests/strcmp/strcmp.pro +++ b/tests/auto/testlib/selftests/strcmp/strcmp.pro @@ -5,4 +5,3 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = strcmp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/testlib/selftests/subtest/subtest.pro b/tests/auto/testlib/selftests/subtest/subtest.pro index 6b18f1960a..09dee1b1b9 100644 --- a/tests/auto/testlib/selftests/subtest/subtest.pro +++ b/tests/auto/testlib/selftests/subtest/subtest.pro @@ -5,4 +5,3 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = subtest -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/testlib/selftests/test/test.pro b/tests/auto/testlib/selftests/test/test.pro index 83538edab1..0a31810105 100644 --- a/tests/auto/testlib/selftests/test/test.pro +++ b/tests/auto/testlib/selftests/test/test.pro @@ -18,4 +18,3 @@ RESOURCES += ../selftests.qrc include(../selftests.pri) for(file, SUBPROGRAMS): TEST_HELPER_INSTALLS += "../$${file}/$${file}" -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/testlib/selftests/verbose1/verbose1.pro b/tests/auto/testlib/selftests/verbose1/verbose1.pro index eae793fc0f..f00ae69d17 100644 --- a/tests/auto/testlib/selftests/verbose1/verbose1.pro +++ b/tests/auto/testlib/selftests/verbose1/verbose1.pro @@ -8,4 +8,3 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = verbose1 -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/testlib/selftests/verbose2/verbose2.pro b/tests/auto/testlib/selftests/verbose2/verbose2.pro index 744d51b563..796cdeb975 100644 --- a/tests/auto/testlib/selftests/verbose2/verbose2.pro +++ b/tests/auto/testlib/selftests/verbose2/verbose2.pro @@ -8,4 +8,3 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = verbose2 -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/testlib/selftests/warnings/warnings.pro b/tests/auto/testlib/selftests/warnings/warnings.pro index 9ea291606d..0c6cddcefb 100644 --- a/tests/auto/testlib/selftests/warnings/warnings.pro +++ b/tests/auto/testlib/selftests/warnings/warnings.pro @@ -5,4 +5,3 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = warnings -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/testlib/selftests/xunit/xunit.pro b/tests/auto/testlib/selftests/xunit/xunit.pro index e3a3955735..b8c606e828 100644 --- a/tests/auto/testlib/selftests/xunit/xunit.pro +++ b/tests/auto/testlib/selftests/xunit/xunit.pro @@ -6,4 +6,3 @@ mac:CONFIG -= app_bundle CONFIG -= debug_and_release_target TARGET = xunit -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/tools/moc/parse-defines.h b/tests/auto/tools/moc/parse-defines.h index f12899e368..aaadcef601 100644 --- a/tests/auto/tools/moc/parse-defines.h +++ b/tests/auto/tools/moc/parse-defines.h @@ -64,7 +64,7 @@ #define PD_CLASSINFO Q_CLASSINFO -#if defined(Q_COMPILER_VARIADIC_MACROS) +#if defined(Q_COMPILER_VARIADIC_MACROS) || defined (Q_MOC_RUN) #define PD_VARARG(x, ...) x(__VA_ARGS__) #if defined(Q_CC_GNU) || defined(Q_MOC_RUN) @@ -104,7 +104,7 @@ public slots: PD_TEST_IDENTIFIER_ARG(void, combined6()) {} -#if defined(Q_COMPILER_VARIADIC_MACROS) +#if defined(Q_COMPILER_VARIADIC_MACROS) || defined (Q_MOC_RUN) PD_VARARG(void vararg1) {} PD_VARARG(void vararg2, int) {} PD_VARARG(void vararg3, int, int) {} @@ -112,6 +112,13 @@ public slots: PD_VARARGEXT(void vararg4) {} PD_VARARGEXT(void vararg5, int) {} PD_VARARGEXT(void vararg6, int, int) {} +#else + void vararg1() {} + void vararg2(int) {} + void vararg3(int,int) {} + void vararg4() {} + void vararg5(int) {} + void vararg6(int,int) {} #endif #define OUTERFUNCTION(x) x diff --git a/tests/auto/tools/moc/tst_moc.cpp b/tests/auto/tools/moc/tst_moc.cpp index 5fc46d195b..3cd2f1f936 100644 --- a/tests/auto/tools/moc/tst_moc.cpp +++ b/tests/auto/tools/moc/tst_moc.cpp @@ -2902,7 +2902,6 @@ void tst_Moc::parseDefines() index = mo->indexOfSlot("combined6()"); QVERIFY(index != -1); -#if defined(Q_COMPILER_VARIADIC_MACROS) index = mo->indexOfSlot("vararg1()"); QVERIFY(index != -1); index = mo->indexOfSlot("vararg2(int)"); @@ -2915,7 +2914,6 @@ void tst_Moc::parseDefines() QVERIFY(index != -1); index = mo->indexOfSlot("vararg6(int,int)"); QVERIFY(index != -1); -#endif index = mo->indexOfSlot("INNERFUNCTION(int)"); QVERIFY(index != -1); diff --git a/tests/auto/widgets/dialogs/qabstractprintdialog/qabstractprintdialog.pro b/tests/auto/widgets/dialogs/qabstractprintdialog/qabstractprintdialog.pro index b4bdb91726..2e9ae33592 100644 --- a/tests/auto/widgets/dialogs/qabstractprintdialog/qabstractprintdialog.pro +++ b/tests/auto/widgets/dialogs/qabstractprintdialog/qabstractprintdialog.pro @@ -7,4 +7,3 @@ CONFIG += parallel_test TARGET = tst_qabstractprintdialog QT += widgets printsupport testlib SOURCES += tst_qabstractprintdialog.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/dialogs/qcolordialog/qcolordialog.pro b/tests/auto/widgets/dialogs/qcolordialog/qcolordialog.pro index 0f02de8840..22f6bab497 100644 --- a/tests/auto/widgets/dialogs/qcolordialog/qcolordialog.pro +++ b/tests/auto/widgets/dialogs/qcolordialog/qcolordialog.pro @@ -6,4 +6,3 @@ SOURCES += tst_qcolordialog.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/dialogs/qdialog/qdialog.pro b/tests/auto/widgets/dialogs/qdialog/qdialog.pro index 6039ec350d..72a2dc52b3 100644 --- a/tests/auto/widgets/dialogs/qdialog/qdialog.pro +++ b/tests/auto/widgets/dialogs/qdialog/qdialog.pro @@ -3,4 +3,3 @@ CONFIG += parallel_test TARGET = tst_qdialog QT += widgets testlib SOURCES += tst_qdialog.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp b/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp index 749687aef5..6d847086d9 100644 --- a/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp +++ b/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp @@ -247,7 +247,7 @@ void tst_QDialog::showMaximized() QDialog dialog(0); dialog.setSizeGripEnabled(true); #ifndef QT_NO_SIZEGRIP - QSizeGrip *sizeGrip = qFindChild<QSizeGrip *>(&dialog); + QSizeGrip *sizeGrip = dialog.findChild<QSizeGrip *>(); QVERIFY(sizeGrip); #endif @@ -324,11 +324,10 @@ void tst_QDialog::showFullScreen() QDialog dialog(0, Qt::X11BypassWindowManagerHint); dialog.setSizeGripEnabled(true); #ifndef QT_NO_SIZEGRIP - QSizeGrip *sizeGrip = qFindChild<QSizeGrip *>(&dialog); + QSizeGrip *sizeGrip = dialog.findChild<QSizeGrip *>(); QVERIFY(sizeGrip); #endif - qApp->syncX(); dialog.showFullScreen(); QVERIFY(dialog.isFullScreen()); QVERIFY(dialog.isVisible()); @@ -336,7 +335,6 @@ void tst_QDialog::showFullScreen() QVERIFY(!sizeGrip->isVisible()); #endif - qApp->syncX(); dialog.showNormal(); QVERIFY(!dialog.isFullScreen()); QVERIFY(dialog.isVisible()); @@ -344,32 +342,26 @@ void tst_QDialog::showFullScreen() QVERIFY(sizeGrip->isVisible()); #endif - qApp->syncX(); dialog.showFullScreen(); QVERIFY(dialog.isFullScreen()); QVERIFY(dialog.isVisible()); - qApp->syncX(); dialog.hide(); QVERIFY(dialog.isFullScreen()); QVERIFY(!dialog.isVisible()); - qApp->syncX(); dialog.show(); QVERIFY(dialog.isFullScreen()); QVERIFY(dialog.isVisible()); - qApp->syncX(); dialog.hide(); QVERIFY(dialog.isFullScreen()); QVERIFY(!dialog.isVisible()); - qApp->syncX(); dialog.showFullScreen(); QVERIFY(dialog.isFullScreen()); QVERIFY(dialog.isVisible()); - qApp->syncX(); dialog.hide(); QVERIFY(dialog.isFullScreen()); QVERIFY(!dialog.isVisible()); @@ -446,7 +438,7 @@ void tst_QDialog::showSizeGrip() QVERIFY(!dialog.isSizeGripEnabled()); dialog.setSizeGripEnabled(true); - QPointer<QSizeGrip> sizeGrip = qFindChild<QSizeGrip *>(&dialog); + QPointer<QSizeGrip> sizeGrip = dialog.findChild<QSizeGrip *>(); QVERIFY(sizeGrip); QVERIFY(sizeGrip->isVisible()); QVERIFY(dialog.isSizeGripEnabled()); @@ -464,7 +456,7 @@ void tst_QDialog::showSizeGrip() dialog.showExtension(false); QVERIFY(dialog.extension() && !dialog.extension()->isVisible()); QVERIFY(dialog.isSizeGripEnabled()); - sizeGrip = qFindChild<QSizeGrip *>(&dialog); + sizeGrip = dialog.findChild<QSizeGrip *>(); QVERIFY(sizeGrip); QVERIFY(sizeGrip->isVisible()); @@ -482,7 +474,7 @@ void tst_QDialog::showSizeGrip() QVERIFY(!dialog.isSizeGripEnabled()); dialog.setSizeGripEnabled(true); - sizeGrip = qFindChild<QSizeGrip *>(&dialog); + sizeGrip = dialog.findChild<QSizeGrip *>(); QVERIFY(sizeGrip); QVERIFY(sizeGrip->isVisible()); sizeGrip->hide(); diff --git a/tests/auto/widgets/dialogs/qerrormessage/qerrormessage.pro b/tests/auto/widgets/dialogs/qerrormessage/qerrormessage.pro index 509bf17bdc..a88f449494 100644 --- a/tests/auto/widgets/dialogs/qerrormessage/qerrormessage.pro +++ b/tests/auto/widgets/dialogs/qerrormessage/qerrormessage.pro @@ -6,4 +6,3 @@ TARGET = tst_qerrormessage QT += widgets testlib SOURCES += tst_qerrormessage.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/dialogs/qerrormessage/tst_qerrormessage.cpp b/tests/auto/widgets/dialogs/qerrormessage/tst_qerrormessage.cpp index e091267889..cb2aaeea46 100644 --- a/tests/auto/widgets/dialogs/qerrormessage/tst_qerrormessage.cpp +++ b/tests/auto/widgets/dialogs/qerrormessage/tst_qerrormessage.cpp @@ -64,14 +64,14 @@ void tst_QErrorMessage::dontShowAgain() // show an error with plain string errorMessageDialog.showMessage(plainString); QVERIFY(errorMessageDialog.isVisible()); - checkBox = qFindChild<QCheckBox*>(&errorMessageDialog); + checkBox = errorMessageDialog.findChild<QCheckBox*>(); QVERIFY(checkBox); QVERIFY(checkBox->isChecked()); errorMessageDialog.close(); errorMessageDialog.showMessage(plainString); QVERIFY(errorMessageDialog.isVisible()); - checkBox = qFindChild<QCheckBox*>(&errorMessageDialog); + checkBox = errorMessageDialog.findChild<QCheckBox*>(); QVERIFY(checkBox); QVERIFY(checkBox->isChecked()); checkBox->setChecked(false); @@ -83,7 +83,7 @@ void tst_QErrorMessage::dontShowAgain() // show an error with an html string errorMessageDialog.showMessage(htmlString); QVERIFY(errorMessageDialog.isVisible()); - checkBox = qFindChild<QCheckBox*>(&errorMessageDialog); + checkBox = errorMessageDialog.findChild<QCheckBox*>(); QVERIFY(checkBox); QVERIFY(!checkBox->isChecked()); checkBox->setChecked(true); @@ -91,7 +91,7 @@ void tst_QErrorMessage::dontShowAgain() errorMessageDialog.showMessage(htmlString); QVERIFY(errorMessageDialog.isVisible()); - checkBox = qFindChild<QCheckBox*>(&errorMessageDialog); + checkBox = errorMessageDialog.findChild<QCheckBox*>(); QVERIFY(checkBox); QVERIFY(checkBox->isChecked()); checkBox->setChecked(false); @@ -111,7 +111,7 @@ void tst_QErrorMessage::dontShowCategoryAgain() errorMessageDialog.showMessage(htmlString,"Cat 1"); QVERIFY(errorMessageDialog.isVisible()); - checkBox = qFindChild<QCheckBox*>(&errorMessageDialog); + checkBox = errorMessageDialog.findChild<QCheckBox*>(); QVERIFY(checkBox); QVERIFY(checkBox->isChecked()); checkBox->setChecked(true); @@ -119,7 +119,7 @@ void tst_QErrorMessage::dontShowCategoryAgain() errorMessageDialog.showMessage(htmlString,"Cat 1"); QVERIFY(errorMessageDialog.isVisible()); - checkBox = qFindChild<QCheckBox*>(&errorMessageDialog); + checkBox = errorMessageDialog.findChild<QCheckBox*>(); QVERIFY(checkBox); QVERIFY(checkBox->isChecked()); checkBox->setChecked(true); @@ -127,7 +127,7 @@ void tst_QErrorMessage::dontShowCategoryAgain() errorMessageDialog.showMessage(htmlString2,"Cat 1"); QVERIFY(errorMessageDialog.isVisible()); - checkBox = qFindChild<QCheckBox*>(&errorMessageDialog); + checkBox = errorMessageDialog.findChild<QCheckBox*>(); QVERIFY(checkBox); QVERIFY(checkBox->isChecked()); checkBox->setChecked(true); @@ -135,7 +135,7 @@ void tst_QErrorMessage::dontShowCategoryAgain() errorMessageDialog.showMessage(htmlString,"Cat 1"); QVERIFY(errorMessageDialog.isVisible()); - checkBox = qFindChild<QCheckBox*>(&errorMessageDialog); + checkBox = errorMessageDialog.findChild<QCheckBox*>(); QVERIFY(checkBox); QVERIFY(checkBox->isChecked()); checkBox->setChecked(false); diff --git a/tests/auto/widgets/dialogs/qfiledialog/qfiledialog.pro b/tests/auto/widgets/dialogs/qfiledialog/qfiledialog.pro index 043e37f92e..3a96827352 100644 --- a/tests/auto/widgets/dialogs/qfiledialog/qfiledialog.pro +++ b/tests/auto/widgets/dialogs/qfiledialog/qfiledialog.pro @@ -21,5 +21,3 @@ wince* { } else { DEFINES += SRCDIR=\\\"$$PWD/\\\" } - -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp b/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp index 0a7a06f445..d797c553db 100644 --- a/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp +++ b/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp @@ -200,7 +200,7 @@ void tst_QFiledialog::currentChangedSignal() fd.setViewMode(QFileDialog::List); QSignalSpy spyCurrentChanged(&fd, SIGNAL(currentChanged(QString))); - QListView* listView = qFindChild<QListView*>(&fd, "listView"); + QListView* listView = fd.findChild<QListView*>("listView"); QVERIFY(listView); fd.setDirectory(QDir::root()); QModelIndex root = listView->rootIndex(); @@ -229,14 +229,14 @@ void tst_QFiledialog::directoryEnteredSignal() QSignalSpy spyDirectoryEntered(&fd, SIGNAL(directoryEntered(QString))); // sidebar - QSidebar *sidebar = qFindChild<QSidebar*>(&fd, "sidebar"); + QSidebar *sidebar = fd.findChild<QSidebar*>("sidebar"); sidebar->setCurrentIndex(sidebar->model()->index(1, 0)); QTest::keyPress(sidebar->viewport(), Qt::Key_Return); QCOMPARE(spyDirectoryEntered.count(), 1); spyDirectoryEntered.clear(); // lookInCombo - QComboBox *comboBox = qFindChild<QComboBox*>(&fd, "lookInCombo"); + QComboBox *comboBox = fd.findChild<QComboBox*>("lookInCombo"); comboBox->showPopup(); QVERIFY(comboBox->view()->model()->index(1, 0).isValid()); comboBox->view()->setCurrentIndex(comboBox->view()->model()->index(1, 0)); @@ -248,7 +248,7 @@ void tst_QFiledialog::directoryEnteredSignal() /* // platform specific fd.setViewMode(QFileDialog::ViewMode(QFileDialog::List)); - QListView* listView = qFindChild<QListView*>(&fd, "listView"); + QListView* listView = fd.findChild<QListView*>("listView"); QVERIFY(listView); QModelIndex root = listView->rootIndex(); QTRY_COMPARE(listView->model()->rowCount(root) > 0, true); @@ -293,7 +293,7 @@ void tst_QFiledialog::filesSelectedSignal() fd.show(); QVERIFY(QTest::qWaitForWindowExposed(&fd)); - QListView *listView = qFindChild<QListView*>(&fd, "listView"); + QListView *listView = fd.findChild<QListView*>("listView"); QVERIFY(listView); QModelIndex root = listView->rootIndex(); @@ -314,7 +314,7 @@ void tst_QFiledialog::filesSelectedSignal() listView->selectionModel()->select(file, QItemSelectionModel::Select | QItemSelectionModel::Rows); listView->setCurrentIndex(file); - QDialogButtonBox *buttonBox = qFindChild<QDialogButtonBox*>(&fd, "buttonBox"); + QDialogButtonBox *buttonBox = fd.findChild<QDialogButtonBox*>("buttonBox"); QPushButton *button = buttonBox->button(QDialogButtonBox::Open); QVERIFY(button); QVERIFY(button->isEnabled()); @@ -338,7 +338,7 @@ void tst_QFiledialog::filterSelectedSignal() fd.setNameFilters(filterChoices); QCOMPARE(fd.nameFilters(), filterChoices); - QComboBox *filters = qFindChild<QComboBox*>(&fd, "fileTypeCombo"); + QComboBox *filters = fd.findChild<QComboBox*>("fileTypeCombo"); QVERIFY(filters); QVERIFY(filters->view()); QCOMPARE(filters->isVisible(), true); @@ -367,7 +367,7 @@ void tst_QFiledialog::directory() { QNonNativeFileDialog fd; fd.setViewMode(QFileDialog::List); - QFileSystemModel *model = qFindChild<QFileSystemModel*>(&fd, "qt_filesystem_model"); + QFileSystemModel *model = fd.findChild<QFileSystemModel*>("qt_filesystem_model"); QVERIFY(model); fd.setDirectory(QDir::currentPath()); QSignalSpy spyCurrentChanged(&fd, SIGNAL(currentChanged(QString))); @@ -392,7 +392,7 @@ void tst_QFiledialog::directory() QCOMPARE(spyFilterSelected.count(), 0); // Check my way - QList<QListView*> list = qFindChildren<QListView*>(&fd, "listView"); + QList<QListView*> list = fd.findChildren<QListView*>("listView"); QVERIFY(list.count() > 0); #ifdef Q_OS_WIN QCOMPARE(list.at(0)->rootIndex().data().toString().toLower(), temp.dirName().toLower()); @@ -476,9 +476,9 @@ void tst_QFiledialog::completer() fd.show(); QVERIFY(QTest::qWaitForWindowExposed(&fd)); QVERIFY(fd.isVisible()); - QFileSystemModel *model = qFindChild<QFileSystemModel*>(&fd, "qt_filesystem_model"); + QFileSystemModel *model = fd.findChild<QFileSystemModel*>("qt_filesystem_model"); QVERIFY(model); - QLineEdit *lineEdit = qFindChild<QLineEdit*>(&fd, "fileNameEdit"); + QLineEdit *lineEdit = fd.findChild<QLineEdit*>("fileNameEdit"); QVERIFY(lineEdit); QCompleter *completer = lineEdit->completer(); QVERIFY(completer); @@ -567,7 +567,7 @@ void tst_QFiledialog::completer_up() QSignalSpy spyFilterSelected(&fd, SIGNAL(filterSelected(QString))); fd.show(); - QLineEdit *lineEdit = qFindChild<QLineEdit*>(&fd, "fileNameEdit"); + QLineEdit *lineEdit = fd.findChild<QLineEdit*>("fileNameEdit"); QVERIFY(lineEdit); QCOMPARE(spyFilesSelected.count(), 0); int depth = QDir::currentPath().split('/').count(); @@ -586,7 +586,7 @@ void tst_QFiledialog::acceptMode() QNonNativeFileDialog fd; fd.show(); - QToolButton* newButton = qFindChild<QToolButton*>(&fd, "newFolderButton"); + QToolButton* newButton = fd.findChild<QToolButton*>("newFolderButton"); QVERIFY(newButton); // default @@ -658,7 +658,7 @@ void tst_QFiledialog::filters() QCOMPARE(fd.nameFilters(), QStringList("All Files (*)")); // effects - QList<QComboBox*> views = qFindChildren<QComboBox*>(&fd, "fileTypeCombo"); + QList<QComboBox*> views = fd.findChildren<QComboBox*>("fileTypeCombo"); QVERIFY(views.count() == 1); QCOMPARE(views.at(0)->isVisible(), false); @@ -728,7 +728,7 @@ void tst_QFiledialog::history() { QNonNativeFileDialog fd; fd.setViewMode(QFileDialog::List); - QFileSystemModel *model = qFindChild<QFileSystemModel*>(&fd, "qt_filesystem_model"); + QFileSystemModel *model = fd.findChild<QFileSystemModel*>("qt_filesystem_model"); QVERIFY(model); QSignalSpy spyCurrentChanged(&fd, SIGNAL(currentChanged(QString))); QSignalSpy spyDirectoryEntered(&fd, SIGNAL(directoryEntered(QString))); @@ -744,7 +744,7 @@ void tst_QFiledialog::history() if (fd.history() != history) { qDebug() << fd.history() << history; // quick and dirty output for windows failure. - QListView* list = qFindChild<QListView*>(&fd, "listView"); + QListView* list = fd.findChild<QListView*>("listView"); QVERIFY(list); QModelIndex root = list->rootIndex(); while (root.isValid()) { @@ -781,9 +781,9 @@ void tst_QFiledialog::isReadOnly() { QNonNativeFileDialog fd; - QPushButton* newButton = qFindChild<QPushButton*>(&fd, "newFolderButton"); - QAction* renameAction = qFindChild<QAction*>(&fd, "qt_rename_action"); - QAction* deleteAction = qFindChild<QAction*>(&fd, "qt_delete_action"); + QPushButton* newButton = fd.findChild<QPushButton*>("newFolderButton"); + QAction* renameAction = fd.findChild<QAction*>("qt_rename_action"); + QAction* deleteAction = fd.findChild<QAction*>("qt_delete_action"); QCOMPARE(fd.isReadOnly(), false); @@ -862,7 +862,7 @@ void tst_QFiledialog::selectFile() QFETCH(QString, file); QFETCH(int, count); QNonNativeFileDialog fd; - QFileSystemModel *model = qFindChild<QFileSystemModel*>(&fd, "qt_filesystem_model"); + QFileSystemModel *model = fd.findChild<QFileSystemModel*>("qt_filesystem_model"); QVERIFY(model); fd.setDirectory(QDir::currentPath()); // default value @@ -912,7 +912,7 @@ void tst_QFiledialog::selectFiles() QStringList list = fd.directory().entryList(QDir::Files); QModelIndexList toSelect; QVERIFY(list.count() > 1); - QListView* listView = qFindChild<QListView*>(&fd, "listView"); + QListView* listView = fd.findChild<QListView*>("listView"); QVERIFY(listView); for (int i = 0; i < list.count(); ++i) { fd.selectFile(fd.directory().path() + "/" + list.at(i)); @@ -945,7 +945,7 @@ void tst_QFiledialog::selectFiles() dialog->selectFile(temporary); dialog->show(); QVERIFY(QTest::qWaitForWindowExposed(dialog)); - QLineEdit *lineEdit = qFindChild<QLineEdit*>(dialog, "fileNameEdit"); + QLineEdit *lineEdit = dialog->findChild<QLineEdit*>("fileNameEdit"); QVERIFY(lineEdit); QCOMPARE(lineEdit->text(),QLatin1String("blah")); delete dialog; @@ -958,13 +958,13 @@ void tst_QFiledialog::viewMode() fd.show(); // find widgets - QList<QTreeView*> treeView = qFindChildren<QTreeView*>(&fd, "treeView"); + QList<QTreeView*> treeView = fd.findChildren<QTreeView*>("treeView"); QCOMPARE(treeView.count(), 1); - QList<QListView*> listView = qFindChildren<QListView*>(&fd, "listView"); + QList<QListView*> listView = fd.findChildren<QListView*>("listView"); QCOMPARE(listView.count(), 1); - QList<QToolButton*> listButton = qFindChildren<QToolButton*>(&fd, "listModeButton"); + QList<QToolButton*> listButton = fd.findChildren<QToolButton*>("listModeButton"); QCOMPARE(listButton.count(), 1); - QList<QToolButton*> treeButton = qFindChildren<QToolButton*>(&fd, "detailModeButton"); + QList<QToolButton*> treeButton = fd.findChildren<QToolButton*>("detailModeButton"); QCOMPARE(treeButton.count(), 1); // default value @@ -1068,9 +1068,8 @@ void tst_QFiledialog::focus() // make sure the tests work with focus follows mouse QCursor::setPos(fd.geometry().center()); - QApplication::syncX(); - QList<QWidget*> treeView = qFindChildren<QWidget*>(&fd, "fileNameEdit"); + QList<QWidget*> treeView = fd.findChildren<QWidget*>("fileNameEdit"); QCOMPARE(treeView.count(), 1); QVERIFY(treeView.at(0)); QTRY_COMPARE(treeView.at(0)->hasFocus(), true); @@ -1081,11 +1080,11 @@ void tst_QFiledialog::focus() void tst_QFiledialog::historyBack() { QNonNativeFileDialog fd; - QFileSystemModel *model = qFindChild<QFileSystemModel*>(&fd, "qt_filesystem_model"); + QFileSystemModel *model = fd.findChild<QFileSystemModel*>("qt_filesystem_model"); QVERIFY(model); - QToolButton *backButton = qFindChild<QToolButton*>(&fd, "backButton"); + QToolButton *backButton = fd.findChild<QToolButton*>("backButton"); QVERIFY(backButton); - QToolButton *forwardButton = qFindChild<QToolButton*>(&fd, "forwardButton"); + QToolButton *forwardButton = fd.findChild<QToolButton*>("forwardButton"); QVERIFY(forwardButton); QSignalSpy spy(model, SIGNAL(rootPathChanged(QString))); @@ -1129,12 +1128,12 @@ void tst_QFiledialog::historyForward() { QNonNativeFileDialog fd; fd.setDirectory(QDir::currentPath()); - QToolButton *backButton = qFindChild<QToolButton*>(&fd, "backButton"); + QToolButton *backButton = fd.findChild<QToolButton*>("backButton"); QVERIFY(backButton); - QToolButton *forwardButton = qFindChild<QToolButton*>(&fd, "forwardButton"); + QToolButton *forwardButton = fd.findChild<QToolButton*>("forwardButton"); QVERIFY(forwardButton); - QFileSystemModel *model = qFindChild<QFileSystemModel*>(&fd, "qt_filesystem_model"); + QFileSystemModel *model = fd.findChild<QFileSystemModel*>("qt_filesystem_model"); QVERIFY(model); QSignalSpy spy(model, SIGNAL(rootPathChanged(QString))); @@ -1205,7 +1204,7 @@ void tst_QFiledialog::disableSaveButton() QNonNativeFileDialog fd(0, "caption", path); fd.setAcceptMode(QFileDialog::AcceptSave); - QDialogButtonBox *buttonBox = qFindChild<QDialogButtonBox*>(&fd, "buttonBox"); + QDialogButtonBox *buttonBox = fd.findChild<QDialogButtonBox*>("buttonBox"); QPushButton *button = buttonBox->button(QDialogButtonBox::Save); QVERIFY(button); QCOMPARE(button->isEnabled(), isEnabled); @@ -1236,7 +1235,7 @@ void tst_QFiledialog::saveButtonText() fd.setLabelText(QFileDialog::Accept, label); fd.setDirectory(QDir::temp()); fd.selectFile(path); - QDialogButtonBox *buttonBox = qFindChild<QDialogButtonBox*>(&fd, "buttonBox"); + QDialogButtonBox *buttonBox = fd.findChild<QDialogButtonBox*>("buttonBox"); QVERIFY(buttonBox); QPushButton *button = buttonBox->button(QDialogButtonBox::Save); QVERIFY(button); @@ -1254,12 +1253,12 @@ void tst_QFiledialog::clearLineEdit() //play it really safe by creating a directory QDir::home().mkdir("_____aaaaaaaaaaaaaaaaaaaaaa"); - QLineEdit *lineEdit = qFindChild<QLineEdit*>(&fd, "fileNameEdit"); + QLineEdit *lineEdit = fd.findChild<QLineEdit*>("fileNameEdit"); QVERIFY(lineEdit); QVERIFY(lineEdit->text() == "foo"); fd.setDirectory(QDir::home()); - QListView* list = qFindChild<QListView*>(&fd, "listView"); + QListView* list = fd.findChild<QListView*>("listView"); QVERIFY(list); // saving a file the text shouldn't be cleared @@ -1309,7 +1308,7 @@ void tst_QFiledialog::enableChooseButton() QNonNativeFileDialog fd; fd.setFileMode(QFileDialog::Directory); fd.show(); - QDialogButtonBox *buttonBox = qFindChild<QDialogButtonBox*>(&fd, "buttonBox"); + QDialogButtonBox *buttonBox = fd.findChild<QDialogButtonBox*>("buttonBox"); QPushButton *button = buttonBox->button(QDialogButtonBox::Open); QVERIFY(button); QCOMPARE(button->isEnabled(), true); diff --git a/tests/auto/widgets/dialogs/qfiledialog2/qfiledialog2.pro b/tests/auto/widgets/dialogs/qfiledialog2/qfiledialog2.pro index efa123cdd7..db36eea11d 100644 --- a/tests/auto/widgets/dialogs/qfiledialog2/qfiledialog2.pro +++ b/tests/auto/widgets/dialogs/qfiledialog2/qfiledialog2.pro @@ -19,4 +19,3 @@ wince* { } else { DEFINES += SRCDIR=\\\"$$PWD/\\\" } -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp b/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp index 018021ddac..98b096031e 100644 --- a/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp +++ b/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp @@ -257,7 +257,7 @@ void tst_QFileDialog2::deleteDirAndFiles() void tst_QFileDialog2::filter() { QNonNativeFileDialog fd; - QAction *hiddenAction = qFindChild<QAction*>(&fd, "qt_show_hidden_action"); + QAction *hiddenAction = fd.findChild<QAction*>("qt_show_hidden_action"); QVERIFY(hiddenAction); QVERIFY(hiddenAction->isEnabled()); QVERIFY(!hiddenAction->isChecked()); @@ -270,7 +270,7 @@ void tst_QFileDialog2::filter() void tst_QFileDialog2::showNameFilterDetails() { QNonNativeFileDialog fd; - QComboBox *filters = qFindChild<QComboBox*>(&fd, "fileTypeCombo"); + QComboBox *filters = fd.findChild<QComboBox*>("fileTypeCombo"); QVERIFY(filters); QVERIFY(fd.isNameFilterDetailsVisible()); @@ -302,7 +302,7 @@ void tst_QFileDialog2::unc() #endif QVERIFY(QFile::exists(dir)); QNonNativeFileDialog fd(0, QString(), dir); - QFileSystemModel *model = qFindChild<QFileSystemModel*>(&fd, "qt_filesystem_model"); + QFileSystemModel *model = fd.findChild<QFileSystemModel*>("qt_filesystem_model"); QVERIFY(model); QCOMPARE(model->index(fd.directory().absolutePath()), model->index(dir)); } @@ -311,12 +311,12 @@ void tst_QFileDialog2::emptyUncPath() { QNonNativeFileDialog fd; fd.show(); - QLineEdit *lineEdit = qFindChild<QLineEdit*>(&fd, "fileNameEdit"); + QLineEdit *lineEdit = fd.findChild<QLineEdit*>("fileNameEdit"); QVERIFY(lineEdit); // press 'keys' for the input for (int i = 0; i < 3 ; ++i) QTest::keyPress(lineEdit, Qt::Key_Backslash); - QFileSystemModel *model = qFindChild<QFileSystemModel*>(&fd, "qt_filesystem_model"); + QFileSystemModel *model = fd.findChild<QFileSystemModel*>("qt_filesystem_model"); QVERIFY(model); } @@ -327,7 +327,7 @@ struct MenuCloser : public QObject { void close() { - QMenu *menu = qFindChild<QMenu*>(w); + QMenu *menu = w->findChild<QMenu*>(); if (!menu) { qDebug("%s: cannot find file dialog child of type QMenu", Q_FUNC_INFO); w->close(); @@ -337,7 +337,7 @@ struct MenuCloser : public QObject { }; static bool openContextMenu(QFileDialog &fd) { - QListView *list = qFindChild<QListView*>(&fd, "listView"); + QListView *list = fd.findChild<QListView*>("listView"); if (!list) { qDebug("%s: didn't find file dialog child \"listView\"", Q_FUNC_INFO); return false; @@ -386,9 +386,9 @@ void tst_QFileDialog2::task143519_deleteAndRenameActionBehavior() QTest::qWaitForWindowActive(&fd); // grab some internals: - QAction *rm = qFindChild<QAction*>(&fd, "qt_delete_action"); + QAction *rm = fd.findChild<QAction*>("qt_delete_action"); QVERIFY(rm); - QAction *mv = qFindChild<QAction*>(&fd, "qt_rename_action"); + QAction *mv = fd.findChild<QAction*>("qt_rename_action"); QVERIFY(mv); // these are the real test cases: @@ -458,7 +458,7 @@ void tst_QFileDialog2::task180459_lastDirectory() { //first visit the temp directory and close the dialog QNonNativeFileDialog *dlg = new QNonNativeFileDialog(0, "", tempDir.path()); - QFileSystemModel *model = qFindChild<QFileSystemModel*>(dlg, "qt_filesystem_model"); + QFileSystemModel *model = dlg->findChild<QFileSystemModel*>("qt_filesystem_model"); QVERIFY(model); QCOMPARE(model->index(tempDir.path()), model->index(dlg->directory().absolutePath())); delete dlg; @@ -469,12 +469,12 @@ void tst_QFileDialog2::task180459_lastDirectory() QFETCH(QString, result); dlg = new QNonNativeFileDialog(0, "", path); - model = qFindChild<QFileSystemModel*>(dlg, "qt_filesystem_model"); + model = dlg->findChild<QFileSystemModel*>("qt_filesystem_model"); QVERIFY(model); dlg->setAcceptMode(QFileDialog::AcceptSave); QCOMPARE(model->index(dlg->directory().absolutePath()), model->index(directory)); - QDialogButtonBox *buttonBox = qFindChild<QDialogButtonBox*>(dlg, "buttonBox"); + QDialogButtonBox *buttonBox = dlg->findChild<QDialogButtonBox*>("buttonBox"); QPushButton *button = buttonBox->button(QDialogButtonBox::Save); QVERIFY(button); QCOMPARE(button->isEnabled(), isEnabled); @@ -564,7 +564,7 @@ void tst_QFileDialog2::task227304_proxyOnFileDialog() QNonNativeFileDialog fd(0, "", QDir::currentPath(), 0); fd.setProxyModel(new FilterDirModel(QDir::currentPath())); fd.show(); - QLineEdit *edit = qFindChild<QLineEdit*>(&fd, "fileNameEdit"); + QLineEdit *edit = fd.findChild<QLineEdit*>("fileNameEdit"); QTest::qWait(200); QTest::keyClick(edit, Qt::Key_T); QTest::keyClick(edit, Qt::Key_S); @@ -575,7 +575,7 @@ void tst_QFileDialog2::task227304_proxyOnFileDialog() dialog->setFileMode(QFileDialog::ExistingFile); dialog->show(); - QListView *list = qFindChild<QListView*>(dialog, "listView"); + QListView *list = dialog->findChild<QListView*>("listView"); QTest::qWait(200); QTest::keyClick(list, Qt::Key_Down); QTest::keyClick(list, Qt::Key_Return); @@ -588,7 +588,7 @@ void tst_QFileDialog2::task227304_proxyOnFileDialog() QSortFilterProxyModel *pm = new QSortFilterProxyModel; fd2.setProxyModel(pm); fd2.show(); - QSidebar *sidebar = qFindChild<QSidebar*>(&fd2, "sidebar"); + QSidebar *sidebar = fd2.findChild<QSidebar*>("sidebar"); sidebar->setFocus(); sidebar->selectUrl(QUrl::fromLocalFile(QDir::homePath())); QTest::mouseClick(sidebar->viewport(), Qt::LeftButton, 0, sidebar->visualRect(sidebar->model()->index(1, 0)).center()); @@ -616,7 +616,7 @@ void tst_QFileDialog2::task227930_correctNavigationKeyboardBehavior() fd.setViewMode(QFileDialog::List); fd.setDirectory(current.absolutePath()); fd.show(); - QListView *list = qFindChild<QListView*>(&fd, "listView"); + QListView *list = fd.findChild<QListView*>("listView"); QTest::qWait(200); QTest::keyClick(list, Qt::Key_Down); QTest::keyClick(list, Qt::Key_Return); @@ -646,8 +646,8 @@ void tst_QFileDialog2::task226366_lowerCaseHardDriveWindows() QNonNativeFileDialog fd; fd.setDirectory(QDir::root().path()); fd.show(); - QLineEdit *edit = qFindChild<QLineEdit*>(&fd, "fileNameEdit"); - QToolButton *buttonParent = qFindChild<QToolButton*>(&fd, "toParentButton"); + QLineEdit *edit = fd.findChild<QLineEdit*>("fileNameEdit"); + QToolButton *buttonParent = fd.findChild<QToolButton*>("toParentButton"); QTest::qWait(200); QTest::mouseClick(buttonParent, Qt::LeftButton,0,QPoint(0,0)); QTest::qWait(2000); @@ -712,7 +712,7 @@ void tst_QFileDialog2::completionOnLevelAfterRoot() QSKIP("This test requires to have an etc directory under /"); #endif fd.show(); - QLineEdit *edit = qFindChild<QLineEdit*>(&fd, "fileNameEdit"); + QLineEdit *edit = fd.findChild<QLineEdit*>("fileNameEdit"); QTest::qWait(2000); #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) //I love testlib :D @@ -741,14 +741,14 @@ void tst_QFileDialog2::task233037_selectingDirectory() fd.setDirectory(current.absolutePath()); fd.setAcceptMode( QFileDialog::AcceptSave); fd.show(); - QListView *list = qFindChild<QListView*>(&fd, "listView"); + QListView *list = fd.findChild<QListView*>("listView"); QTest::qWait(3000); // Wait for sort to settle (I need a signal). #ifdef QT_KEYPAD_NAVIGATION list->setEditFocus(true); #endif QTest::keyClick(list, Qt::Key_Down); QTest::qWait(100); - QDialogButtonBox *buttonBox = qFindChild<QDialogButtonBox*>(&fd, "buttonBox"); + QDialogButtonBox *buttonBox = fd.findChild<QDialogButtonBox*>("buttonBox"); QPushButton *button = buttonBox->button(QDialogButtonBox::Save); QVERIFY(button); QCOMPARE(button->isEnabled(), true); @@ -763,7 +763,7 @@ void tst_QFileDialog2::task235069_hideOnEscape() fd.setDirectory(current.absolutePath()); fd.setAcceptMode( QFileDialog::AcceptSave); fd.show(); - QListView *list = qFindChild<QListView*>(&fd, "listView"); + QListView *list = fd.findChild<QListView*>("listView"); list->setFocus(); QTest::qWait(200); QTest::keyClick(list, Qt::Key_Escape); @@ -772,7 +772,7 @@ void tst_QFileDialog2::task235069_hideOnEscape() fd2.setDirectory(current.absolutePath()); fd2.setAcceptMode( QFileDialog::AcceptSave); fd2.show(); - QLineEdit *edit = qFindChild<QLineEdit*>(&fd2, "fileNameEdit"); + QLineEdit *edit = fd2.findChild<QLineEdit*>("fileNameEdit"); QTest::keyClick(edit, Qt::Key_Escape); QCOMPARE(fd2.isVisible(), false); } @@ -789,7 +789,7 @@ void tst_QFileDialog2::task236402_dontWatchDeletedDir() fd.setDirectory(current.absolutePath()); fd.setAcceptMode( QFileDialog::AcceptSave); fd.show(); - QListView *list = qFindChild<QListView*>(&fd, "listView"); + QListView *list = fd.findChild<QListView*>("listView"); list->setFocus(); QTest::qWait(200); QTest::keyClick(list, Qt::Key_Return); @@ -812,12 +812,12 @@ void tst_QFileDialog2::task203703_returnProperSeparator() fd.setFileMode(QFileDialog::Directory); fd.show(); QTest::qWait(500); - QListView *list = qFindChild<QListView*>(&fd, "listView"); + QListView *list = fd.findChild<QListView*>("listView"); list->setFocus(); QTest::qWait(200); QTest::keyClick(list, Qt::Key_Return); QTest::qWait(1000); - QDialogButtonBox *buttonBox = qFindChild<QDialogButtonBox*>(&fd, "buttonBox"); + QDialogButtonBox *buttonBox = fd.findChild<QDialogButtonBox*>("buttonBox"); QPushButton *button = buttonBox->button(QDialogButtonBox::Cancel); QTest::keyClick(button, Qt::Key_Return); QTest::qWait(500); @@ -852,10 +852,10 @@ void tst_QFileDialog2::task228844_ensurePreviousSorting() #else QTest::qWait(500); #endif - QTreeView *tree = qFindChild<QTreeView*>(&fd, "treeView"); + QTreeView *tree = fd.findChild<QTreeView*>("treeView"); tree->header()->setSortIndicator(3,Qt::DescendingOrder); QTest::qWait(200); - QDialogButtonBox *buttonBox = qFindChild<QDialogButtonBox*>(&fd, "buttonBox"); + QDialogButtonBox *buttonBox = fd.findChild<QDialogButtonBox*>("buttonBox"); QPushButton *button = buttonBox->button(QDialogButtonBox::Open); QTest::mouseClick(button, Qt::LeftButton); #if defined(Q_OS_WINCE) @@ -874,12 +874,12 @@ void tst_QFileDialog2::task228844_ensurePreviousSorting() #else QTest::qWait(500); #endif - QTreeView *tree2 = qFindChild<QTreeView*>(&fd2, "treeView"); + QTreeView *tree2 = fd2.findChild<QTreeView*>("treeView"); tree2->setFocus(); QCOMPARE(tree2->rootIndex().data(QFileSystemModel::FilePathRole).toString(),current.absolutePath()); - QDialogButtonBox *buttonBox2 = qFindChild<QDialogButtonBox*>(&fd2, "buttonBox"); + QDialogButtonBox *buttonBox2 = fd2.findChild<QDialogButtonBox*>("buttonBox"); QPushButton *button2 = buttonBox2->button(QDialogButtonBox::Open); fd2.selectFile("g"); QTest::mouseClick(button2, Qt::LeftButton); @@ -899,12 +899,12 @@ void tst_QFileDialog2::task228844_ensurePreviousSorting() #else QTest::qWait(500); #endif - QTreeView *tree3 = qFindChild<QTreeView*>(&fd3, "treeView"); + QTreeView *tree3 = fd3.findChild<QTreeView*>("treeView"); tree3->setFocus(); QCOMPARE(tree3->rootIndex().data(QFileSystemModel::FilePathRole).toString(), current.absolutePath()); - QDialogButtonBox *buttonBox3 = qFindChild<QDialogButtonBox*>(&fd3, "buttonBox"); + QDialogButtonBox *buttonBox3 = fd3.findChild<QDialogButtonBox*>("buttonBox"); QPushButton *button3 = buttonBox3->button(QDialogButtonBox::Open); QTest::mouseClick(button3, Qt::LeftButton); #if defined(Q_OS_WINCE) @@ -988,7 +988,7 @@ void tst_QFileDialog2::task251321_sideBarHiddenEntries() fd.show(); QTest::qWait(250); - QSidebar *sidebar = qFindChild<QSidebar*>(&fd, "sidebar"); + QSidebar *sidebar = fd.findChild<QSidebar*>("sidebar"); sidebar->setFocus(); sidebar->selectUrl(QUrl::fromLocalFile(hiddenSubDir.absolutePath())); QTest::mouseClick(sidebar->viewport(), Qt::LeftButton, 0, sidebar->visualRect(sidebar->model()->index(0, 0)).center()); @@ -999,7 +999,7 @@ void tst_QFileDialog2::task251321_sideBarHiddenEntries() QTest::qWait(250); #endif - QFileSystemModel *model = qFindChild<QFileSystemModel*>(&fd, "qt_filesystem_model"); + QFileSystemModel *model = fd.findChild<QFileSystemModel*>("qt_filesystem_model"); QCOMPARE(model->rowCount(model->index(hiddenSubDir.absolutePath())), 2); hiddenSubDir.rmdir("happy2"); @@ -1045,14 +1045,14 @@ void tst_QFileDialog2::task251341_sideBarRemoveEntries() fd.show(); QTest::qWait(250); - QSidebar *sidebar = qFindChild<QSidebar*>(&fd, "sidebar"); + QSidebar *sidebar = fd.findChild<QSidebar*>("sidebar"); sidebar->setFocus(); //We enter in the first bookmark sidebar->selectUrl(QUrl::fromLocalFile(testSubDir.absolutePath())); QTest::mouseClick(sidebar->viewport(), Qt::LeftButton, 0, sidebar->visualRect(sidebar->model()->index(0, 0)).center()); QTest::qWait(250); - QFileSystemModel *model = qFindChild<QFileSystemModel*>(&fd, "qt_filesystem_model"); + QFileSystemModel *model = fd.findChild<QFileSystemModel*>("qt_filesystem_model"); //There is no file QCOMPARE(model->rowCount(model->index(testSubDir.absolutePath())), 0); //Icon is not enabled QUrlModel::EnabledRole @@ -1116,10 +1116,10 @@ void tst_QFileDialog2::task254490_selectFileMultipleTimes() fd.show(); QTest::qWait(250); - QLineEdit *lineEdit = qFindChild<QLineEdit*>(&fd, "fileNameEdit"); + QLineEdit *lineEdit = fd.findChild<QLineEdit*>("fileNameEdit"); QVERIFY(lineEdit); QCOMPARE(lineEdit->text(),QLatin1String("new_file.txt")); - QListView *list = qFindChild<QListView*>(&fd, "listView"); + QListView *list = fd.findChild<QListView*>("listView"); QVERIFY(list); QCOMPARE(list->selectionModel()->selectedRows(0).count(), 0); @@ -1136,7 +1136,7 @@ void tst_QFileDialog2::task257579_sideBarWithNonCleanUrls() QString url = QString::fromLatin1("%1/%2/..").arg(dir.absolutePath()).arg(dirname); QNonNativeFileDialog fd; fd.setSidebarUrls(QList<QUrl>() << QUrl::fromLocalFile(url)); - QSidebar *sidebar = qFindChild<QSidebar*>(&fd, "sidebar"); + QSidebar *sidebar = fd.findChild<QSidebar*>("sidebar"); QCOMPARE(sidebar->urls().count(), 1); QVERIFY(sidebar->urls().first().toLocalFile() != url); QCOMPARE(sidebar->urls().first().toLocalFile(), QDir::cleanPath(url)); @@ -1161,7 +1161,7 @@ void tst_QFileDialog2::task259105_filtersCornerCases() QTest::qWait(250); //Extensions are hidden - QComboBox *filters = qFindChild<QComboBox*>(&fd, "fileTypeCombo"); + QComboBox *filters = fd.findChild<QComboBox*>("fileTypeCombo"); QVERIFY(filters); QCOMPARE(filters->currentText(), QLatin1String("All Files!")); filters->setCurrentIndex(1); @@ -1215,7 +1215,7 @@ void tst_QFileDialog2::QTBUG4419_lineEditSelectAll() QCOMPARE(fd.isVisible(), true); QCOMPARE(QApplication::activeWindow(), static_cast<QWidget*>(&fd)); - QLineEdit *lineEdit = qFindChild<QLineEdit*>(&fd, "fileNameEdit"); + QLineEdit *lineEdit = fd.findChild<QLineEdit*>("fileNameEdit"); QVERIFY(lineEdit); QTRY_COMPARE(tempPath + QChar('/') + lineEdit->text(), t->fileName()); @@ -1258,7 +1258,7 @@ void tst_QFileDialog2::QTBUG6558_showDirsOnly() QCOMPARE(fd.isVisible(), true); QCOMPARE(QApplication::activeWindow(), static_cast<QWidget*>(&fd)); - QFileSystemModel *model = qFindChild<QFileSystemModel*>(&fd, "qt_filesystem_model"); + QFileSystemModel *model = fd.findChild<QFileSystemModel*>("qt_filesystem_model"); QTRY_COMPARE(model->rowCount(model->index(dir.absolutePath())), 2); fd.setOption(QFileDialog::ShowDirsOnly, false); @@ -1306,7 +1306,7 @@ void tst_QFileDialog2::QTBUG4842_selectFilterWithHideNameFilterDetails() QCOMPARE(fd.isVisible(), true); QCOMPARE(QApplication::activeWindow(), static_cast<QWidget*>(&fd)); - QComboBox *filters = qFindChild<QComboBox*>(&fd, "fileTypeCombo"); + QComboBox *filters = fd.findChild<QComboBox*>("fileTypeCombo"); //We compare the current combobox text with the stripped version QCOMPARE(filters->currentText(), QString("Text files")); @@ -1322,7 +1322,7 @@ void tst_QFileDialog2::QTBUG4842_selectFilterWithHideNameFilterDetails() QCOMPARE(fd2.isVisible(), true); QCOMPARE(QApplication::activeWindow(), static_cast<QWidget*>(&fd2)); - QComboBox *filters2 = qFindChild<QComboBox*>(&fd2, "fileTypeCombo"); + QComboBox *filters2 = fd2.findChild<QComboBox*>("fileTypeCombo"); //We compare the current combobox text with the non stripped version QCOMPARE(filters2->currentText(), chosenFilterString); @@ -1340,7 +1340,7 @@ void tst_QFileDialog2::dontShowCompleterOnRoot() QCOMPARE(QApplication::activeWindow(), static_cast<QWidget*>(&fd)); fd.setDirectory(""); - QLineEdit *lineEdit = qFindChild<QLineEdit*>(&fd, "fileNameEdit"); + QLineEdit *lineEdit = fd.findChild<QLineEdit*>("fileNameEdit"); QTRY_VERIFY(lineEdit->text().isEmpty()); //The gatherer thread will then return the result diff --git a/tests/auto/widgets/dialogs/qfilesystemmodel/qfilesystemmodel.pro b/tests/auto/widgets/dialogs/qfilesystemmodel/qfilesystemmodel.pro index 78639e87a5..e77364c3f0 100644 --- a/tests/auto/widgets/dialogs/qfilesystemmodel/qfilesystemmodel.pro +++ b/tests/auto/widgets/dialogs/qfilesystemmodel/qfilesystemmodel.pro @@ -7,6 +7,5 @@ QT += core-private gui testlib SOURCES += tst_qfilesystemmodel.cpp TARGET = tst_qfilesystemmodel -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 mac:CONFIG+=insignificant_test # QTBUG-27890 diff --git a/tests/auto/widgets/dialogs/qfontdialog/qfontdialog.pro b/tests/auto/widgets/dialogs/qfontdialog/qfontdialog.pro index 6645937329..8116fe379a 100644 --- a/tests/auto/widgets/dialogs/qfontdialog/qfontdialog.pro +++ b/tests/auto/widgets/dialogs/qfontdialog/qfontdialog.pro @@ -13,4 +13,3 @@ mac { # LIBS += -framework Cocoa } -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/dialogs/qinputdialog/qinputdialog.pro b/tests/auto/widgets/dialogs/qinputdialog/qinputdialog.pro index 1ccfa5ec6d..cc479812a8 100644 --- a/tests/auto/widgets/dialogs/qinputdialog/qinputdialog.pro +++ b/tests/auto/widgets/dialogs/qinputdialog/qinputdialog.pro @@ -2,6 +2,3 @@ CONFIG += testcase TARGET = tst_qinputdialog QT += widgets testlib SOURCES += tst_qinputdialog.cpp - - -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/dialogs/qinputdialog/tst_qinputdialog.cpp b/tests/auto/widgets/dialogs/qinputdialog/tst_qinputdialog.cpp index 581696c509..7d8077d77d 100644 --- a/tests/auto/widgets/dialogs/qinputdialog/tst_qinputdialog.cpp +++ b/tests/auto/widgets/dialogs/qinputdialog/tst_qinputdialog.cpp @@ -153,13 +153,13 @@ void testInvalidateAndRestore( template <typename SpinBoxType, typename ValueType> void testGetNumeric(QInputDialog *dialog, SpinBoxType * = 0, ValueType * = 0) { - SpinBoxType *sbox = qFindChild<SpinBoxType *>(dialog); + SpinBoxType *sbox = dialog->findChild<SpinBoxType *>(); QVERIFY(sbox != 0); - QLineEdit *ledit = qFindChild<QLineEdit *>(static_cast<QObject *>(sbox)); + QLineEdit *ledit = static_cast<QObject *>(sbox)->findChild<QLineEdit *>(); QVERIFY(ledit != 0); - QDialogButtonBox *bbox = qFindChild<QDialogButtonBox *>(dialog); + QDialogButtonBox *bbox = dialog->findChild<QDialogButtonBox *>(); QVERIFY(bbox != 0); QPushButton *okButton = bbox->button(QDialogButtonBox::Ok); QVERIFY(okButton != 0); @@ -189,10 +189,10 @@ void testGetNumeric(QInputDialog *dialog, SpinBoxType * = 0, ValueType * = 0) void testGetText(QInputDialog *dialog) { - QLineEdit *ledit = qFindChild<QLineEdit *>(dialog); + QLineEdit *ledit = dialog->findChild<QLineEdit *>(); QVERIFY(ledit); - QDialogButtonBox *bbox = qFindChild<QDialogButtonBox *>(dialog); + QDialogButtonBox *bbox = dialog->findChild<QDialogButtonBox *>(); QVERIFY(bbox); QPushButton *okButton = bbox->button(QDialogButtonBox::Ok); QVERIFY(okButton); @@ -207,10 +207,10 @@ void testGetText(QInputDialog *dialog) void testGetItem(QInputDialog *dialog) { - QComboBox *cbox = qFindChild<QComboBox *>(dialog); + QComboBox *cbox = dialog->findChild<QComboBox *>(); QVERIFY(cbox); - QDialogButtonBox *bbox = qFindChild<QDialogButtonBox *>(dialog); + QDialogButtonBox *bbox = dialog->findChild<QDialogButtonBox *>(); QVERIFY(bbox); QPushButton *okButton = bbox->button(QDialogButtonBox::Ok); QVERIFY(okButton); @@ -245,7 +245,7 @@ void tst_QInputDialog::testFuncGetItem(QInputDialog *dialog) void tst_QInputDialog::timerEvent(QTimerEvent *event) { killTimer(event->timerId()); - QInputDialog *dialog = qFindChild<QInputDialog *>(parent); + QInputDialog *dialog = parent->findChild<QInputDialog *>(); QVERIFY(dialog); if (testFunc) testFunc(dialog); diff --git a/tests/auto/widgets/dialogs/qmessagebox/qmessagebox.pro b/tests/auto/widgets/dialogs/qmessagebox/qmessagebox.pro index 60040282bb..e9f220101b 100644 --- a/tests/auto/widgets/dialogs/qmessagebox/qmessagebox.pro +++ b/tests/auto/widgets/dialogs/qmessagebox/qmessagebox.pro @@ -5,4 +5,3 @@ CONFIG += testcase CONFIG += parallel_test SOURCES += tst_qmessagebox.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/dialogs/qprogressdialog/qprogressdialog.pro b/tests/auto/widgets/dialogs/qprogressdialog/qprogressdialog.pro index 0cc956679a..290374f825 100644 --- a/tests/auto/widgets/dialogs/qprogressdialog/qprogressdialog.pro +++ b/tests/auto/widgets/dialogs/qprogressdialog/qprogressdialog.pro @@ -7,6 +7,3 @@ CONFIG += parallel_test TARGET = tst_qprogressdialog QT += widgets testlib SOURCES += tst_qprogressdialog.cpp - - -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/dialogs/qprogressdialog/tst_qprogressdialog.cpp b/tests/auto/widgets/dialogs/qprogressdialog/tst_qprogressdialog.cpp index 09f115a489..d49f356d8c 100644 --- a/tests/auto/widgets/dialogs/qprogressdialog/tst_qprogressdialog.cpp +++ b/tests/auto/widgets/dialogs/qprogressdialog/tst_qprogressdialog.cpp @@ -141,7 +141,7 @@ void tst_QProgressDialog::task198202() QProgressDialog dlg(QLatin1String("test"),QLatin1String("test"),1,10); dlg.show(); QVERIFY(QTest::qWaitForWindowExposed(&dlg)); - int futureHeight = dlg.sizeHint().height() - qFindChild<QLabel*>(&dlg)->sizeHint().height(); + int futureHeight = dlg.sizeHint().height() - dlg.findChild<QLabel*>()->sizeHint().height(); dlg.setLabel(0); QTest::ignoreMessage(QtWarningMsg, "QProgressDialog::setBar: Cannot set a null progress bar"); dlg.setBar(0); diff --git a/tests/auto/widgets/dialogs/qwizard/qwizard.pro b/tests/auto/widgets/dialogs/qwizard/qwizard.pro index 193c6585a0..a1d72e854a 100644 --- a/tests/auto/widgets/dialogs/qwizard/qwizard.pro +++ b/tests/auto/widgets/dialogs/qwizard/qwizard.pro @@ -4,4 +4,3 @@ TARGET = tst_qwizard QT += widgets testlib SOURCES += tst_qwizard.cpp tst_qwizard_2.cpp RESOURCES = qwizard.qrc -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp b/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp index ae5853f3c8..c3fc050275 100644 --- a/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp +++ b/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp @@ -2518,7 +2518,7 @@ void tst_QWizard::task161658_alignments() wizard.show(); QVERIFY(QTest::qWaitForWindowExposed(&wizard)); - foreach (QLabel *subtitleLabel, qFindChildren<QLabel *>(&wizard)) { + foreach (QLabel *subtitleLabel, wizard.findChildren<QLabel *>()) { if (subtitleLabel->text().startsWith("SUBTITLE#")) { QCOMPARE(lineEdit1.mapToGlobal(lineEdit1.contentsRect().bottomRight()).x(), subtitleLabel->mapToGlobal(subtitleLabel->contentsRect().bottomRight()).x()); diff --git a/tests/auto/widgets/effects/qpixmapfilter/qpixmapfilter.pro b/tests/auto/widgets/effects/qpixmapfilter/qpixmapfilter.pro index 542c6959d1..879d31604b 100644 --- a/tests/auto/widgets/effects/qpixmapfilter/qpixmapfilter.pro +++ b/tests/auto/widgets/effects/qpixmapfilter/qpixmapfilter.pro @@ -13,4 +13,3 @@ wince*: { DEPLOYMENT += addFiles } -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/graphicsview/qgraphicsanchorlayout/qgraphicsanchorlayout.pro b/tests/auto/widgets/graphicsview/qgraphicsanchorlayout/qgraphicsanchorlayout.pro index df4aaf6e3b..3eb18e61eb 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsanchorlayout/qgraphicsanchorlayout.pro +++ b/tests/auto/widgets/graphicsview/qgraphicsanchorlayout/qgraphicsanchorlayout.pro @@ -4,4 +4,3 @@ QT += widgets widgets-private testlib QT += core-private gui-private SOURCES += tst_qgraphicsanchorlayout.cpp CONFIG += parallel_test -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/graphicsview/qgraphicsanchorlayout1/qgraphicsanchorlayout1.pro b/tests/auto/widgets/graphicsview/qgraphicsanchorlayout1/qgraphicsanchorlayout1.pro index 12a7b8e4e3..6e8717c86d 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsanchorlayout1/qgraphicsanchorlayout1.pro +++ b/tests/auto/widgets/graphicsview/qgraphicsanchorlayout1/qgraphicsanchorlayout1.pro @@ -4,4 +4,3 @@ QT += widgets widgets-private testlib QT += core-private gui-private SOURCES += tst_qgraphicsanchorlayout1.cpp CONFIG += parallel_test -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/graphicsview/qgraphicseffectsource/qgraphicseffectsource.pro b/tests/auto/widgets/graphicsview/qgraphicseffectsource/qgraphicseffectsource.pro index 3aeaef318e..4fe3405d11 100644 --- a/tests/auto/widgets/graphicsview/qgraphicseffectsource/qgraphicseffectsource.pro +++ b/tests/auto/widgets/graphicsview/qgraphicseffectsource/qgraphicseffectsource.pro @@ -6,4 +6,3 @@ QT += core-private gui-private SOURCES += tst_qgraphicseffectsource.cpp CONFIG += parallel_test -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/graphicsview/qgraphicseffectsource/tst_qgraphicseffectsource.cpp b/tests/auto/widgets/graphicsview/qgraphicseffectsource/tst_qgraphicseffectsource.cpp index c5863c9dc3..20d58b5f6b 100644 --- a/tests/auto/widgets/graphicsview/qgraphicseffectsource/tst_qgraphicseffectsource.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicseffectsource/tst_qgraphicseffectsource.cpp @@ -260,7 +260,7 @@ void tst_QGraphicsEffectSource::boundingRect() QCOMPARE(effect->source()->boundingRect(Qt::DeviceCoordinates), QRectF()); QRectF itemBoundingRect = item->boundingRect(); - if (!item->children().isEmpty()) + if (!item->childItems().isEmpty()) itemBoundingRect |= item->childrenBoundingRect(); // We can at least check that the device bounding rect was correct in QGraphicsEffect::draw. diff --git a/tests/auto/widgets/graphicsview/qgraphicsgridlayout/qgraphicsgridlayout.pro b/tests/auto/widgets/graphicsview/qgraphicsgridlayout/qgraphicsgridlayout.pro index 9b1fa1b0c2..5796cbfd73 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsgridlayout/qgraphicsgridlayout.pro +++ b/tests/auto/widgets/graphicsview/qgraphicsgridlayout/qgraphicsgridlayout.pro @@ -4,4 +4,3 @@ TARGET = tst_qgraphicsgridlayout QT += widgets testlib SOURCES += tst_qgraphicsgridlayout.cpp CONFIG += parallel_test -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp index 56cf27155d..37190c3cf2 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp @@ -549,7 +549,7 @@ void tst_QGraphicsItem::construction() QCOMPARE(item->scene(), (QGraphicsScene *)0); QCOMPARE(item->parentItem(), (QGraphicsItem *)0); - QVERIFY(item->children().isEmpty()); + QVERIFY(item->childItems().isEmpty()); QVERIFY(item->isVisible()); QVERIFY(item->isEnabled()); QVERIFY(!item->isSelected()); @@ -589,7 +589,7 @@ public: QRectF boundingRect() const { QRectF tmp = QGraphicsRectItem::boundingRect(); - foreach (QGraphicsItem *child, children()) + foreach (QGraphicsItem *child, childItems()) tmp |= child->boundingRect(); // <- might be pure virtual return tmp; } @@ -605,11 +605,11 @@ void tst_QGraphicsItem::constructionWithParent() scene.addItem(item0); scene.addItem(item1); QGraphicsItem *item2 = new BoundingRectItem(item1); - QCOMPARE(item1->children(), QList<QGraphicsItem *>() << item2); + QCOMPARE(item1->childItems(), QList<QGraphicsItem *>() << item2); QCOMPARE(item1->boundingRect(), QRectF(0, 0, 200, 200)); item2->setParentItem(item0); - QCOMPARE(item0->children(), QList<QGraphicsItem *>() << item2); + QCOMPARE(item0->childItems(), QList<QGraphicsItem *>() << item2); QCOMPARE(item0->boundingRect(), QRectF(0, 0, 200, 200)); } @@ -636,9 +636,9 @@ void tst_QGraphicsItem::destruction() QGraphicsItem *parent = new QGraphicsRectItem; Item *child = new Item; child->setParentItem(parent); - QCOMPARE(parent->children().size(), 1); + QCOMPARE(parent->childItems().size(), 1); delete child; - QCOMPARE(parent->children().size(), 0); + QCOMPARE(parent->childItems().size(), 0); delete parent; QCOMPARE(itemDeleted, 2); } @@ -661,9 +661,9 @@ void tst_QGraphicsItem::destruction() child->setParentItem(parent); scene.addItem(parent); QCOMPARE(child->scene(), &scene); - QCOMPARE(parent->children().size(), 1); + QCOMPARE(parent->childItems().size(), 1); delete child; - QCOMPARE(parent->children().size(), 0); + QCOMPARE(parent->childItems().size(), 0); delete parent; QCOMPARE(itemDeleted, 4); } @@ -692,7 +692,7 @@ void tst_QGraphicsItem::destruction() QCOMPARE(child->scene(), (QGraphicsScene *)0); QCOMPARE(parent->scene(), &scene); QCOMPARE(child->parentItem(), (QGraphicsItem *)0); - QVERIFY(parent->children().isEmpty()); + QVERIFY(parent->childItems().isEmpty()); delete parent; QCOMPARE(itemDeleted, 5); delete child; @@ -862,15 +862,15 @@ void tst_QGraphicsItem::setParentItem() void tst_QGraphicsItem::children() { QGraphicsRectItem item; - QVERIFY(item.children().isEmpty()); + QVERIFY(item.childItems().isEmpty()); QGraphicsRectItem *item2 = new QGraphicsRectItem(QRectF(), &item); - QCOMPARE(item.children().size(), 1); - QCOMPARE(item.children().first(), (QGraphicsItem *)item2); - QVERIFY(item2->children().isEmpty()); + QCOMPARE(item.childItems().size(), 1); + QCOMPARE(item.childItems().first(), (QGraphicsItem *)item2); + QVERIFY(item2->childItems().isEmpty()); delete item2; - QVERIFY(item.children().isEmpty()); + QVERIFY(item.childItems().isEmpty()); } void tst_QGraphicsItem::flags() @@ -3573,7 +3573,7 @@ void tst_QGraphicsItem::group() QCOMPARE(parent->sceneBoundingRect(), parentSceneBoundingRect); QCOMPARE(parent->parentItem(), (QGraphicsItem *)group); - QCOMPARE(group->children().size(), 1); + QCOMPARE(group->childItems().size(), 1); QCOMPARE(scene.items().size(), 4); QCOMPARE(scene.items(group->sceneBoundingRect()).size(), 3); @@ -3585,7 +3585,7 @@ void tst_QGraphicsItem::group() QCOMPARE(parent2->sceneBoundingRect(), parent2SceneBoundingRect); QCOMPARE(parent2->parentItem(), (QGraphicsItem *)group); - QCOMPARE(group->children().size(), 2); + QCOMPARE(group->childItems().size(), 2); QCOMPARE(scene.items().size(), 4); QCOMPARE(scene.items(group->sceneBoundingRect()).size(), 4); @@ -3686,7 +3686,7 @@ void tst_QGraphicsItem::nestedGroups() QCOMPARE(rect->group(), group1); QCOMPARE(rect2->group(), group1); QCOMPARE(group1->group(), (QGraphicsItemGroup *)0); - QVERIFY(group2->children().isEmpty()); + QVERIFY(group2->childItems().isEmpty()); delete group2; } @@ -3737,7 +3737,7 @@ void tst_QGraphicsItem::removeFromGroup() QGraphicsItemGroup *group = scene.createItemGroup(scene.selectedItems()); QVERIFY(group); - QCOMPARE(group->children().size(), 2); + QCOMPARE(group->childItems().size(), 2); qApp->processEvents(); // index items qApp->processEvents(); // emit changed @@ -4505,10 +4505,10 @@ protected: case QGraphicsItem::ItemParentHasChanged: break; case QGraphicsItem::ItemChildAddedChange: - oldValues << children().size(); + oldValues << childItems().size(); break; case QGraphicsItem::ItemChildRemovedChange: - oldValues << children().size(); + oldValues << childItems().size(); break; case QGraphicsItem::ItemSceneChange: oldValues << QVariant::fromValue<QGraphicsScene *>(scene()); diff --git a/tests/auto/widgets/graphicsview/qgraphicsitemanimation/qgraphicsitemanimation.pro b/tests/auto/widgets/graphicsview/qgraphicsitemanimation/qgraphicsitemanimation.pro index 98517311d5..484f4ba5f8 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsitemanimation/qgraphicsitemanimation.pro +++ b/tests/auto/widgets/graphicsview/qgraphicsitemanimation/qgraphicsitemanimation.pro @@ -5,4 +5,3 @@ SOURCES += tst_qgraphicsitemanimation.cpp DEFINES += QT_NO_CAST_TO_ASCII CONFIG += parallel_test -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/graphicsview/qgraphicslayout/qgraphicslayout.pro b/tests/auto/widgets/graphicsview/qgraphicslayout/qgraphicslayout.pro index ceab1a05c8..254a91ef6a 100644 --- a/tests/auto/widgets/graphicsview/qgraphicslayout/qgraphicslayout.pro +++ b/tests/auto/widgets/graphicsview/qgraphicslayout/qgraphicslayout.pro @@ -8,4 +8,3 @@ QT += widgets testlib SOURCES += tst_qgraphicslayout.cpp DEFINES += QT_USE_USING_NAMESPACE CONFIG += parallel_test -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/graphicsview/qgraphicslayoutitem/qgraphicslayoutitem.pro b/tests/auto/widgets/graphicsview/qgraphicslayoutitem/qgraphicslayoutitem.pro index a9e5004c88..ef5cc36d05 100644 --- a/tests/auto/widgets/graphicsview/qgraphicslayoutitem/qgraphicslayoutitem.pro +++ b/tests/auto/widgets/graphicsview/qgraphicslayoutitem/qgraphicslayoutitem.pro @@ -4,4 +4,3 @@ QT += widgets testlib SOURCES += tst_qgraphicslayoutitem.cpp CONFIG += parallel_test -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/graphicsview/qgraphicslinearlayout/qgraphicslinearlayout.pro b/tests/auto/widgets/graphicsview/qgraphicslinearlayout/qgraphicslinearlayout.pro index 42c91f24ae..50a886cece 100644 --- a/tests/auto/widgets/graphicsview/qgraphicslinearlayout/qgraphicslinearlayout.pro +++ b/tests/auto/widgets/graphicsview/qgraphicslinearlayout/qgraphicslinearlayout.pro @@ -4,4 +4,3 @@ QT += widgets testlib SOURCES += tst_qgraphicslinearlayout.cpp CONFIG += parallel_test -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/graphicsview/qgraphicsobject/qgraphicsobject.pro b/tests/auto/widgets/graphicsview/qgraphicsobject/qgraphicsobject.pro index d17dc54fd0..60f09c2228 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsobject/qgraphicsobject.pro +++ b/tests/auto/widgets/graphicsview/qgraphicsobject/qgraphicsobject.pro @@ -6,4 +6,3 @@ QT += core-private SOURCES += tst_qgraphicsobject.cpp CONFIG += parallel_test -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/graphicsview/qgraphicspixmapitem/qgraphicspixmapitem.pro b/tests/auto/widgets/graphicsview/qgraphicspixmapitem/qgraphicspixmapitem.pro index 0f91888684..6452e39c56 100644 --- a/tests/auto/widgets/graphicsview/qgraphicspixmapitem/qgraphicspixmapitem.pro +++ b/tests/auto/widgets/graphicsview/qgraphicspixmapitem/qgraphicspixmapitem.pro @@ -4,4 +4,3 @@ QT += widgets testlib SOURCES += tst_qgraphicspixmapitem.cpp CONFIG += parallel_test -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/graphicsview/qgraphicspolygonitem/qgraphicspolygonitem.pro b/tests/auto/widgets/graphicsview/qgraphicspolygonitem/qgraphicspolygonitem.pro index 08033c2fa0..bca0ecc20c 100644 --- a/tests/auto/widgets/graphicsview/qgraphicspolygonitem/qgraphicspolygonitem.pro +++ b/tests/auto/widgets/graphicsview/qgraphicspolygonitem/qgraphicspolygonitem.pro @@ -4,4 +4,3 @@ QT += widgets testlib SOURCES += tst_qgraphicspolygonitem.cpp CONFIG += parallel_test -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp index a859fb922a..beea46c979 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp @@ -3081,7 +3081,7 @@ protected: private slots: void checkMenu() { - if (qFindChild<QMenu *>(this)) + if (this->findChild<QMenu *>()) embeddedPopup = true; hide(); } diff --git a/tests/auto/widgets/graphicsview/qgraphicstransform/qgraphicstransform.pro b/tests/auto/widgets/graphicsview/qgraphicstransform/qgraphicstransform.pro index c11ca1a9bb..a46c803e41 100644 --- a/tests/auto/widgets/graphicsview/qgraphicstransform/qgraphicstransform.pro +++ b/tests/auto/widgets/graphicsview/qgraphicstransform/qgraphicstransform.pro @@ -4,4 +4,3 @@ QT += widgets testlib SOURCES += tst_qgraphicstransform.cpp CONFIG += parallel_test -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp index 095c1e87d3..9e06435ca7 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp @@ -845,7 +845,7 @@ void tst_QGraphicsView::dragMode_rubberBand() QCOMPARE(view.verticalScrollBar()->value(), verticalScrollBarValue); // We don't use QRubberBand as of 4.3; the band is drawn internally. - QVERIFY(!qFindChild<QRubberBand *>(&view)); + QVERIFY(!view.findChild<QRubberBand *>()); QTest::qWait(25); @@ -3025,7 +3025,7 @@ void tst_QGraphicsView::task187791_setSceneCausesUpdate() QGraphicsView view(&scene); view.show(); qApp->setActiveWindow(&view); - QVERIFY(QTest::qWaitForWindowShown(&view)); + QVERIFY(QTest::qWaitForWindowExposed(&view)); EventSpy updateSpy(view.viewport(), QEvent::Paint); QCOMPARE(updateSpy.count(), 0); diff --git a/tests/auto/widgets/itemviews/qabstractitemview/qabstractitemview.pro b/tests/auto/widgets/itemviews/qabstractitemview/qabstractitemview.pro index bb7a7b2b6d..8fbc3c15a8 100644 --- a/tests/auto/widgets/itemviews/qabstractitemview/qabstractitemview.pro +++ b/tests/auto/widgets/itemviews/qabstractitemview/qabstractitemview.pro @@ -3,4 +3,3 @@ CONFIG += parallel_test TARGET = tst_qabstractitemview QT += widgets testlib SOURCES += tst_qabstractitemview.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp b/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp index f0731eb3a6..0c6d369254 100644 --- a/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp +++ b/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp @@ -742,7 +742,7 @@ void tst_QAbstractItemView::persistentEditorFocus() view.openPersistentEditor(model.index(0, 2)); //these are spinboxes because we put numbers inside - QList<QSpinBox*> list = qFindChildren<QSpinBox*>(view.viewport()); + QList<QSpinBox*> list = view.viewport()->findChildren<QSpinBox*>(); QCOMPARE(list.count(), 2); //these should be the 2 editors view.setCurrentIndex(model.index(0, 0)); @@ -1048,7 +1048,6 @@ void tst_QAbstractItemView::setItemDelegate() v.show(); #ifdef Q_WS_X11 QCursor::setPos(v.geometry().center()); - QApplication::syncX(); #endif QApplication::setActiveWindow(&v); QVERIFY(QTest::qWaitForWindowActive(&v)); @@ -1271,21 +1270,21 @@ void tst_QAbstractItemView::task257481_emptyEditor() treeView.show(); treeView.edit(model.index(0,0)); - QList<QLineEdit *> lineEditors = qFindChildren<QLineEdit *>(treeView.viewport()); + QList<QLineEdit *> lineEditors = treeView.viewport()->findChildren<QLineEdit *>(); QCOMPARE(lineEditors.count(), 1); QVERIFY(!lineEditors.first()->size().isEmpty()); QTest::qWait(30); treeView.edit(model.index(1,0)); - lineEditors = qFindChildren<QLineEdit *>(treeView.viewport()); + lineEditors = treeView.viewport()->findChildren<QLineEdit *>(); QCOMPARE(lineEditors.count(), 1); QVERIFY(!lineEditors.first()->size().isEmpty()); QTest::qWait(30); treeView.edit(model.index(2,0)); - lineEditors = qFindChildren<QLineEdit *>(treeView.viewport()); + lineEditors = treeView.viewport()->findChildren<QLineEdit *>(); QCOMPARE(lineEditors.count(), 1); QVERIFY(!lineEditors.first()->size().isEmpty()); } diff --git a/tests/auto/widgets/itemviews/qcolumnview/qcolumnview.pro b/tests/auto/widgets/itemviews/qcolumnview/qcolumnview.pro index 4980b45389..8bc1bf2412 100644 --- a/tests/auto/widgets/itemviews/qcolumnview/qcolumnview.pro +++ b/tests/auto/widgets/itemviews/qcolumnview/qcolumnview.pro @@ -5,4 +5,3 @@ QT += gui-private core-private testlib SOURCES += tst_qcolumnview.cpp TARGET = tst_qcolumnview -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/itemviews/qdatawidgetmapper/qdatawidgetmapper.pro b/tests/auto/widgets/itemviews/qdatawidgetmapper/qdatawidgetmapper.pro index e7618cd833..3f4cb491f4 100644 --- a/tests/auto/widgets/itemviews/qdatawidgetmapper/qdatawidgetmapper.pro +++ b/tests/auto/widgets/itemviews/qdatawidgetmapper/qdatawidgetmapper.pro @@ -5,4 +5,3 @@ QT += widgets testlib SOURCES += tst_qdatawidgetmapper.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/itemviews/qdirmodel/qdirmodel.pro b/tests/auto/widgets/itemviews/qdirmodel/qdirmodel.pro index 31e3cf498c..680286d1e4 100644 --- a/tests/auto/widgets/itemviews/qdirmodel/qdirmodel.pro +++ b/tests/auto/widgets/itemviews/qdirmodel/qdirmodel.pro @@ -19,4 +19,3 @@ wince*: { DEFINES += SRCDIR=\\\"$$PWD/\\\" } -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/itemviews/qfileiconprovider/qfileiconprovider.pro b/tests/auto/widgets/itemviews/qfileiconprovider/qfileiconprovider.pro index d7be6452ec..0c3a780405 100644 --- a/tests/auto/widgets/itemviews/qfileiconprovider/qfileiconprovider.pro +++ b/tests/auto/widgets/itemviews/qfileiconprovider/qfileiconprovider.pro @@ -5,4 +5,3 @@ QT += widgets testlib SOURCES += tst_qfileiconprovider.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/itemviews/qitemdelegate/qitemdelegate.pro b/tests/auto/widgets/itemviews/qitemdelegate/qitemdelegate.pro index 628db489a2..cb935fd2fd 100644 --- a/tests/auto/widgets/itemviews/qitemdelegate/qitemdelegate.pro +++ b/tests/auto/widgets/itemviews/qitemdelegate/qitemdelegate.pro @@ -4,4 +4,3 @@ QT += widgets testlib SOURCES += tst_qitemdelegate.cpp win32:!wince*: LIBS += -luser32 -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp b/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp index 22a1743ff1..d47eebe03a 100644 --- a/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp +++ b/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp @@ -365,7 +365,7 @@ void tst_QItemDelegate::editorKeyPress() view.setCurrentIndex(index); // the editor will only selectAll on the current index view.edit(index); - QList<QLineEdit*> lineEditors = qFindChildren<QLineEdit *>(view.viewport()); + QList<QLineEdit*> lineEditors = view.viewport()->findChildren<QLineEdit *>(); QCOMPARE(lineEditors.count(), 1); QLineEdit *editor = lineEditors.at(0); @@ -394,7 +394,7 @@ void tst_QItemDelegate::doubleEditorNegativeInput() view.setCurrentIndex(index); // the editor will only selectAll on the current index view.edit(index); - QList<QDoubleSpinBox*> editors = qFindChildren<QDoubleSpinBox *>(view.viewport()); + QList<QDoubleSpinBox*> editors = view.viewport()->findChildren<QDoubleSpinBox *>(); QCOMPARE(editors.count(), 1); QDoubleSpinBox *editor = editors.at(0); @@ -776,7 +776,7 @@ void tst_QItemDelegate::dateTimeEditor() QTestEventLoop::instance().enterLoop(1); - QTimeEdit *timeEditor = qFindChild<QTimeEdit *>(widget.viewport()); + QTimeEdit *timeEditor = widget.viewport()->findChild<QTimeEdit *>(); QVERIFY(timeEditor); QCOMPARE(timeEditor->time(), time); // The data must actually be different in order for the model @@ -790,7 +790,7 @@ void tst_QItemDelegate::dateTimeEditor() QTestEventLoop::instance().enterLoop(1); - QDateEdit *dateEditor = qFindChild<QDateEdit *>(widget.viewport()); + QDateEdit *dateEditor = widget.viewport()->findChild<QDateEdit *>(); QVERIFY(dateEditor); QCOMPARE(dateEditor->date(), date); dateEditor->setDate(date.addDays(60)); @@ -1312,7 +1312,7 @@ void tst_QItemDelegate::enterKey() view.edit(index); QTest::qWait(30); - QList<QWidget*> lineEditors = qFindChildren<QWidget *>(view.viewport(), QString::fromLatin1("TheEditor")); + QList<QWidget*> lineEditors = view.viewport()->findChildren<QWidget *>(QString::fromLatin1("TheEditor")); QCOMPARE(lineEditors.count(), 1); QPointer<QWidget> editor = lineEditors.at(0); @@ -1344,7 +1344,7 @@ void tst_QItemDelegate::task257859_finalizeEdit() view.edit(index); QTest::qWait(30); - QList<QLineEdit *> lineEditors = qFindChildren<QLineEdit *>(view.viewport()); + QList<QLineEdit *> lineEditors = view.viewport()->findChildren<QLineEdit *>(); QCOMPARE(lineEditors.count(), 1); QPointer<QWidget> editor = lineEditors.at(0); @@ -1397,7 +1397,7 @@ void tst_QItemDelegate::comboBox() QTestEventLoop::instance().enterLoop(1); - QComboBox *boolEditor = qFindChild<QComboBox*>(widget.viewport()); + QComboBox *boolEditor = widget.viewport()->findChild<QComboBox*>(); QVERIFY(boolEditor); QCOMPARE(boolEditor->currentIndex(), 1); // True is selected initially. // The data must actually be different in order for the model diff --git a/tests/auto/widgets/itemviews/qitemeditorfactory/qitemeditorfactory.pro b/tests/auto/widgets/itemviews/qitemeditorfactory/qitemeditorfactory.pro index 3c1b9ba29b..55df1d83f1 100644 --- a/tests/auto/widgets/itemviews/qitemeditorfactory/qitemeditorfactory.pro +++ b/tests/auto/widgets/itemviews/qitemeditorfactory/qitemeditorfactory.pro @@ -5,4 +5,3 @@ QT += widgets testlib SOURCES += tst_qitemeditorfactory.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/itemviews/qitemview/qitemview.pro b/tests/auto/widgets/itemviews/qitemview/qitemview.pro index 0d36edc870..6e1697f790 100644 --- a/tests/auto/widgets/itemviews/qitemview/qitemview.pro +++ b/tests/auto/widgets/itemviews/qitemview/qitemview.pro @@ -5,4 +5,3 @@ QT += widgets testlib SOURCES += tst_qitemview.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/itemviews/qlistview/qlistview.pro b/tests/auto/widgets/itemviews/qlistview/qlistview.pro index 1fb5b7f767..413304bdcf 100644 --- a/tests/auto/widgets/itemviews/qlistview/qlistview.pro +++ b/tests/auto/widgets/itemviews/qlistview/qlistview.pro @@ -3,4 +3,3 @@ TARGET = tst_qlistview QT += widgets gui-private widgets-private core-private testlib SOURCES += tst_qlistview.cpp win32:!wince*: LIBS += -luser32 -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp b/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp index 113ec1fd30..5d7925aeec 100644 --- a/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp +++ b/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp @@ -2207,7 +2207,7 @@ void tst_QListView::taskQTBUG_21804_hiddenItemsAndScrollingWithKeys() lv.setSpacing(spacing); lv.setModel(&model); lv.show(); - QTest::qWaitForWindowShown(&lv); + QTest::qWaitForWindowExposed(&lv); // hide every odd number row for (int i = 1; i < model.rowCount(); i+=2) @@ -2283,7 +2283,7 @@ void tst_QListView::spacing() lv.setModel(&model); lv.setSpacing(spacing); lv.show(); - QTest::qWaitForWindowShown(&lv); + QTest::qWaitForWindowExposed(&lv); // check size and position of first two items QRect item1 = lv.visualRect(lv.model()->index(0, 0)); diff --git a/tests/auto/widgets/itemviews/qlistwidget/qlistwidget.pro b/tests/auto/widgets/itemviews/qlistwidget/qlistwidget.pro index f1e2bbf402..b4aedf1bcf 100644 --- a/tests/auto/widgets/itemviews/qlistwidget/qlistwidget.pro +++ b/tests/auto/widgets/itemviews/qlistwidget/qlistwidget.pro @@ -4,4 +4,3 @@ QT += widgets widgets-private testlib QT += core-private gui-private SOURCES += tst_qlistwidget.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp b/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp index d1107a687c..13476a7ffa 100644 --- a/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp +++ b/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp @@ -3727,7 +3727,7 @@ void tst_QTableView::addColumnWhileEditing() //let's see if the editor is moved to the right location //after adding a column model.setColumnCount(model.columnCount() + 1); - QPointer<QLineEdit> editor = qFindChild<QLineEdit*>(&view); + QPointer<QLineEdit> editor = view.findChild<QLineEdit*>(); QVERIFY(editor); QCOMPARE(editor->geometry(), view.visualRect(last)); diff --git a/tests/auto/widgets/itemviews/qtablewidget/qtablewidget.pro b/tests/auto/widgets/itemviews/qtablewidget/qtablewidget.pro index ddc66c34df..d2c962b4de 100644 --- a/tests/auto/widgets/itemviews/qtablewidget/qtablewidget.pro +++ b/tests/auto/widgets/itemviews/qtablewidget/qtablewidget.pro @@ -3,4 +3,3 @@ CONFIG += parallel_test TARGET = tst_qtablewidget QT += widgets testlib SOURCES += tst_qtablewidget.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/itemviews/qtreeview/qtreeview.pro b/tests/auto/widgets/itemviews/qtreeview/qtreeview.pro index 8640e152d3..001331c0cf 100644 --- a/tests/auto/widgets/itemviews/qtreeview/qtreeview.pro +++ b/tests/auto/widgets/itemviews/qtreeview/qtreeview.pro @@ -4,4 +4,3 @@ QT += widgets testlib QT += widgets-private gui-private core-private SOURCES += tst_qtreeview.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp b/tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp index ea1f846258..9a7b7956d8 100644 --- a/tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp +++ b/tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp @@ -819,7 +819,7 @@ void tst_QTreeView::editTriggers() view.setCurrentIndex(view.model()->index(0, 0)); // Verify that we don't have any editor initially - QVERIFY(!qFindChild<QLineEdit *>(&view, QString())); + QVERIFY(!view.findChild<QLineEdit *>(QString())); // Set the triggers view.setEditTriggers(editTriggers); @@ -865,7 +865,7 @@ void tst_QTreeView::editTriggers() #ifdef Q_OS_MAC QEXPECT_FAIL("EditKeyPressed 4", "QTBUG-23696", Continue); #endif - QTRY_COMPARE(qFindChild<QLineEdit *>(&view, QString()) != 0, editorOpened); + QTRY_COMPARE(view.findChild<QLineEdit *>(QString()) != 0, editorOpened); } void tst_QTreeView::hasAutoScroll() @@ -1032,7 +1032,7 @@ void tst_QTreeView::indexWidget() QCOMPARE(view.indexWidget(index), static_cast<QWidget *>(widget)); QCOMPARE(widget->parentWidget(), view.viewport()); - QCOMPARE(widget->geometry(), view.visualRect(index).intersect(widget->geometry())); + QCOMPARE(widget->geometry(), view.visualRect(index).intersected(widget->geometry())); QCOMPARE(widget->toPlainText(), text); } @@ -1228,15 +1228,15 @@ void tst_QTreeView::openPersistentEditor() view.setModel(&treeModel); view.show(); - QVERIFY(!qFindChild<QLineEdit *>(view.viewport())); + QVERIFY(!view.viewport()->findChild<QLineEdit *>()); view.openPersistentEditor(view.model()->index(0, 0)); - QVERIFY(qFindChild<QLineEdit *>(view.viewport())); + QVERIFY(view.viewport()->findChild<QLineEdit *>()); view.closePersistentEditor(view.model()->index(0, 0)); - QVERIFY(!qFindChild<QLineEdit *>(view.viewport())->isVisible()); + QVERIFY(!view.viewport()->findChild<QLineEdit *>()->isVisible()); qApp->sendPostedEvents(0, QEvent::DeferredDelete); - QVERIFY(!qFindChild<QLineEdit *>(view.viewport())); + QVERIFY(!view.viewport()->findChild<QLineEdit *>()); } void tst_QTreeView::rootIndex() @@ -4255,7 +4255,7 @@ void tst_QTreeView::quickExpandCollapse() QVERIFY(rootIndex.isValid()); tree.show(); - QTest::qWaitForWindowShown(&tree); + QTest::qWaitForWindowExposed(&tree); int initialState = tree.state(); diff --git a/tests/auto/widgets/itemviews/qtreewidget/qtreewidget.pro b/tests/auto/widgets/itemviews/qtreewidget/qtreewidget.pro index 8e17d1b83f..3fa0681691 100644 --- a/tests/auto/widgets/itemviews/qtreewidget/qtreewidget.pro +++ b/tests/auto/widgets/itemviews/qtreewidget/qtreewidget.pro @@ -2,4 +2,3 @@ CONFIG += testcase TARGET = tst_qtreewidget QT += widgets testlib SOURCES += tst_qtreewidget.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/itemviews/qtreewidget/tst_qtreewidget.cpp b/tests/auto/widgets/itemviews/qtreewidget/tst_qtreewidget.cpp index f119c3fbec..83ba1ddcda 100644 --- a/tests/auto/widgets/itemviews/qtreewidget/tst_qtreewidget.cpp +++ b/tests/auto/widgets/itemviews/qtreewidget/tst_qtreewidget.cpp @@ -467,7 +467,7 @@ void tst_QTreeWidget::editItem() tree.editItem(item, col); QApplication::instance()->processEvents(); QApplication::instance()->processEvents(); - QLineEdit *editor = qFindChild<QLineEdit*>(&tree); + QLineEdit *editor = tree.findChild<QLineEdit*>(); if (editor) { QVERIFY(item->flags() & Qt::ItemIsEditable); QCOMPARE(editor->selectedText(), editor->text()); @@ -2079,7 +2079,7 @@ void tst_QTreeWidget::itemWidget() // ### should you really be able to open a persistent // editor for an item that isn't editable?? tree.openPersistentEditor(item, col); - QWidget *editor = qFindChild<QLineEdit*>(&tree); + QWidget *editor = tree.findChild<QLineEdit*>(); QVERIFY(editor != 0); tree.closePersistentEditor(item, col); } diff --git a/tests/auto/widgets/itemviews/qtreewidgetitemiterator/qtreewidgetitemiterator.pro b/tests/auto/widgets/itemviews/qtreewidgetitemiterator/qtreewidgetitemiterator.pro index f2025b6929..5fa6762617 100644 --- a/tests/auto/widgets/itemviews/qtreewidgetitemiterator/qtreewidgetitemiterator.pro +++ b/tests/auto/widgets/itemviews/qtreewidgetitemiterator/qtreewidgetitemiterator.pro @@ -5,4 +5,3 @@ QT += widgets testlib SOURCES += tst_qtreewidgetitemiterator.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/kernel/qaction/qaction.pro b/tests/auto/widgets/kernel/qaction/qaction.pro index 2cd1351dd7..c57107b1b0 100644 --- a/tests/auto/widgets/kernel/qaction/qaction.pro +++ b/tests/auto/widgets/kernel/qaction/qaction.pro @@ -4,4 +4,3 @@ QT += gui-private core-private widgets testlib SOURCES += tst_qaction.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/kernel/qactiongroup/qactiongroup.pro b/tests/auto/widgets/kernel/qactiongroup/qactiongroup.pro index 6acbc24d86..82c0204aa8 100644 --- a/tests/auto/widgets/kernel/qactiongroup/qactiongroup.pro +++ b/tests/auto/widgets/kernel/qactiongroup/qactiongroup.pro @@ -5,4 +5,3 @@ QT += widgets testlib SOURCES += tst_qactiongroup.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/kernel/qapplication/desktopsettingsaware/desktopsettingsaware.pro b/tests/auto/widgets/kernel/qapplication/desktopsettingsaware/desktopsettingsaware.pro index 8084dd0f83..a10ff71b05 100644 --- a/tests/auto/widgets/kernel/qapplication/desktopsettingsaware/desktopsettingsaware.pro +++ b/tests/auto/widgets/kernel/qapplication/desktopsettingsaware/desktopsettingsaware.pro @@ -4,4 +4,3 @@ CONFIG -= app_bundle debug_and_release_target DESTDIR = ./ SOURCES += main.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/kernel/qapplication/modal/modal.pro b/tests/auto/widgets/kernel/qapplication/modal/modal.pro index 1eac401b47..a34871d2aa 100644 --- a/tests/auto/widgets/kernel/qapplication/modal/modal.pro +++ b/tests/auto/widgets/kernel/qapplication/modal/modal.pro @@ -5,4 +5,3 @@ DESTDIR = ./ CONFIG -= app_bundle debug_and_release_target HEADERS += base.h -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/kernel/qapplication/test/test.pro b/tests/auto/widgets/kernel/qapplication/test/test.pro index 53d18fa2df..7b00ba5293 100644 --- a/tests/auto/widgets/kernel/qapplication/test/test.pro +++ b/tests/auto/widgets/kernel/qapplication/test/test.pro @@ -13,6 +13,3 @@ SUBPROGRAMS = desktopsettingsaware modal win32: !wince*: SUBPROGRAMS += wincmdline for(file, SUBPROGRAMS): TEST_HELPER_INSTALLS += "../$${file}/$${file}" - - -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp index 52cd1051ba..c6835f6076 100644 --- a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp +++ b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp @@ -316,7 +316,6 @@ void tst_QApplication::alert() widget.activateWindow(); QApplication::setActiveWindow(&widget); app.alert(&widget, 200); - app.syncX(); } void tst_QApplication::multiple_data() @@ -1242,7 +1241,7 @@ public slots: void DeleteLaterWidget::runTest() { - QObject *stillAlive = qFindChild<QObject*>(this, "deleteLater"); + QObject *stillAlive = this->findChild<QObject*>("deleteLater"); QWidget *w = new QWidget(this); connect(w, SIGNAL(destroyed()), this, SLOT(childDeleted())); @@ -1288,7 +1287,7 @@ void tst_QApplication::testDeleteLater() object->setObjectName("deleteLater"); object->deleteLater(); - QObject *stillAlive = qFindChild<QObject*>(wgt, "deleteLater"); + QObject *stillAlive = wgt->findChild<QObject*>("deleteLater"); QVERIFY(stillAlive); app.exec(); diff --git a/tests/auto/widgets/kernel/qapplication/wincmdline/wincmdline.pro b/tests/auto/widgets/kernel/qapplication/wincmdline/wincmdline.pro index d4759da7a8..3e32a6798d 100644 --- a/tests/auto/widgets/kernel/qapplication/wincmdline/wincmdline.pro +++ b/tests/auto/widgets/kernel/qapplication/wincmdline/wincmdline.pro @@ -3,4 +3,3 @@ CONFIG -= app_bundle debug_and_release_target SOURCES += main.cpp DESTDIR = ./ -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/kernel/qboxlayout/qboxlayout.pro b/tests/auto/widgets/kernel/qboxlayout/qboxlayout.pro index b683a34e51..e30a4b57b1 100644 --- a/tests/auto/widgets/kernel/qboxlayout/qboxlayout.pro +++ b/tests/auto/widgets/kernel/qboxlayout/qboxlayout.pro @@ -5,4 +5,3 @@ QT += widgets testlib SOURCES += tst_qboxlayout.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/kernel/qdesktopwidget/qdesktopwidget.pro b/tests/auto/widgets/kernel/qdesktopwidget/qdesktopwidget.pro index c0057661d2..77709df5da 100644 --- a/tests/auto/widgets/kernel/qdesktopwidget/qdesktopwidget.pro +++ b/tests/auto/widgets/kernel/qdesktopwidget/qdesktopwidget.pro @@ -3,4 +3,3 @@ CONFIG += parallel_test TARGET = tst_qdesktopwidget QT += widgets testlib SOURCES += tst_qdesktopwidget.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/kernel/qformlayout/qformlayout.pro b/tests/auto/widgets/kernel/qformlayout/qformlayout.pro index 4a522bbf72..668b890c97 100644 --- a/tests/auto/widgets/kernel/qformlayout/qformlayout.pro +++ b/tests/auto/widgets/kernel/qformlayout/qformlayout.pro @@ -3,4 +3,3 @@ CONFIG += parallel_test TARGET = tst_qformlayout QT += widgets testlib SOURCES += tst_qformlayout.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/kernel/qgridlayout/qgridlayout.pro b/tests/auto/widgets/kernel/qgridlayout/qgridlayout.pro index a952756080..febcee6c55 100644 --- a/tests/auto/widgets/kernel/qgridlayout/qgridlayout.pro +++ b/tests/auto/widgets/kernel/qgridlayout/qgridlayout.pro @@ -10,4 +10,3 @@ FORMS += sortdialog.ui -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/kernel/qlayout/qlayout.pro b/tests/auto/widgets/kernel/qlayout/qlayout.pro index c7751aa698..4a5db512c8 100644 --- a/tests/auto/widgets/kernel/qlayout/qlayout.pro +++ b/tests/auto/widgets/kernel/qlayout/qlayout.pro @@ -11,4 +11,3 @@ wince* { } else { TESTDATA += baseline/* } -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/kernel/qshortcut/qshortcut.pro b/tests/auto/widgets/kernel/qshortcut/qshortcut.pro index 4d2e8d8acc..043d062d60 100644 --- a/tests/auto/widgets/kernel/qshortcut/qshortcut.pro +++ b/tests/auto/widgets/kernel/qshortcut/qshortcut.pro @@ -8,6 +8,3 @@ INCLUDEPATH += ../ QT += widgets testlib HEADERS += SOURCES += tst_qshortcut.cpp - - -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/kernel/qshortcut/tst_qshortcut.cpp b/tests/auto/widgets/kernel/qshortcut/tst_qshortcut.cpp index 1958ebfab1..962fd3a8ab 100644 --- a/tests/auto/widgets/kernel/qshortcut/tst_qshortcut.cpp +++ b/tests/auto/widgets/kernel/qshortcut/tst_qshortcut.cpp @@ -610,7 +610,6 @@ void tst_QShortcut::disabledItems() { clearAllShortcuts(); mainW->activateWindow(); - qApp->syncX(); QTest::qWait(100); /* Testing Disabled Shortcuts @@ -1072,7 +1071,6 @@ void tst_QShortcut::context() // Changing focus to 'other2' should make the Focus context there work other2->activateWindow(); other2->setFocus(); // ### - qApp->syncX(); QTRY_COMPARE(qApp->activeWindow(), other2->window()); QCOMPARE(qApp->focusWidget(), (QWidget *)other2); diff --git a/tests/auto/widgets/kernel/qsizepolicy/qsizepolicy.pro b/tests/auto/widgets/kernel/qsizepolicy/qsizepolicy.pro index 301d097b4f..84629c7c0a 100644 --- a/tests/auto/widgets/kernel/qsizepolicy/qsizepolicy.pro +++ b/tests/auto/widgets/kernel/qsizepolicy/qsizepolicy.pro @@ -4,4 +4,3 @@ TARGET = tst_qsizepolicy QT += widgets widgets-private testlib SOURCES += tst_qsizepolicy.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/kernel/qstackedlayout/qstackedlayout.pro b/tests/auto/widgets/kernel/qstackedlayout/qstackedlayout.pro index ad780e77fa..cd80253e12 100644 --- a/tests/auto/widgets/kernel/qstackedlayout/qstackedlayout.pro +++ b/tests/auto/widgets/kernel/qstackedlayout/qstackedlayout.pro @@ -6,4 +6,3 @@ SOURCES += tst_qstackedlayout.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/kernel/qstackedlayout/tst_qstackedlayout.cpp b/tests/auto/widgets/kernel/qstackedlayout/tst_qstackedlayout.cpp index c4c8022237..9ab7bb5305 100644 --- a/tests/auto/widgets/kernel/qstackedlayout/tst_qstackedlayout.cpp +++ b/tests/auto/widgets/kernel/qstackedlayout/tst_qstackedlayout.cpp @@ -132,7 +132,6 @@ void tst_QStackedLayout::init() // make sure the tests work with focus follows mouse QCursor::setPos(testWidget->geometry().center()); testWidget->activateWindow(); - QApplication::syncX(); QTest::qWait(250); } diff --git a/tests/auto/widgets/kernel/qtooltip/qtooltip.pro b/tests/auto/widgets/kernel/qtooltip/qtooltip.pro index 8a875d3c6a..6e5dd738cb 100644 --- a/tests/auto/widgets/kernel/qtooltip/qtooltip.pro +++ b/tests/auto/widgets/kernel/qtooltip/qtooltip.pro @@ -2,4 +2,3 @@ CONFIG += testcase TARGET = tst_qtooltip QT += widgets testlib SOURCES += tst_qtooltip.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/kernel/qtooltip/tst_qtooltip.cpp b/tests/auto/widgets/kernel/qtooltip/tst_qtooltip.cpp index cb403bac20..441277ef53 100644 --- a/tests/auto/widgets/kernel/qtooltip/tst_qtooltip.cpp +++ b/tests/auto/widgets/kernel/qtooltip/tst_qtooltip.cpp @@ -103,6 +103,10 @@ void tst_QToolTip::task183679() QFETCH(Qt::Key, key); QFETCH(bool, visible); +#ifdef Q_OS_MAC + QSKIP("This test fails in the CI system, QTBUG-30040"); +#endif + Widget_task183679 widget; widget.show(); QApplication::setActiveWindow(&widget); diff --git a/tests/auto/widgets/kernel/qwidget/qwidget.pro b/tests/auto/widgets/kernel/qwidget/qwidget.pro index 997311179a..6916ee85e6 100644 --- a/tests/auto/widgets/kernel/qwidget/qwidget.pro +++ b/tests/auto/widgets/kernel/qwidget/qwidget.pro @@ -23,4 +23,3 @@ x11 { !wince*:win32: LIBS += -luser32 -lgdi32 mac:CONFIG+=insignificant_test # QTBUG-25300, QTBUG-23695 -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp index 3d7cc14a5d..69d890fb7a 100644 --- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp +++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp @@ -4240,9 +4240,13 @@ void tst_QWidget::isOpaque() */ void tst_QWidget::scroll() { + const int w = qMin(500, qApp->desktop()->availableGeometry().width() / 2); + const int h = qMin(500, qApp->desktop()->availableGeometry().height() / 2); + UpdateWidget updateWidget; - updateWidget.resize(500, 500); + updateWidget.resize(w, h); updateWidget.reset(); + updateWidget.move(QGuiApplication::primaryScreen()->geometry().center() - QPoint(250, 250)); updateWidget.show(); qApp->setActiveWindow(&updateWidget); QVERIFY(QTest::qWaitForWindowActive(&updateWidget)); @@ -4252,9 +4256,9 @@ void tst_QWidget::scroll() updateWidget.reset(); updateWidget.scroll(10, 10); qApp->processEvents(); - QRegion dirty(QRect(0, 0, 500, 10)); - dirty += QRegion(QRect(0, 10, 10, 490)); - QCOMPARE(updateWidget.paintedRegion, dirty); + QRegion dirty(QRect(0, 0, w, 10)); + dirty += QRegion(QRect(0, 10, 10, h - 10)); + QTRY_COMPARE(updateWidget.paintedRegion, dirty); } { @@ -4262,11 +4266,14 @@ void tst_QWidget::scroll() updateWidget.update(0, 0, 10, 10); updateWidget.scroll(0, 10); qApp->processEvents(); - QRegion dirty(QRect(0, 0, 500, 10)); + QRegion dirty(QRect(0, 0, w, 10)); dirty += QRegion(QRect(0, 10, 10, 10)); - QCOMPARE(updateWidget.paintedRegion, dirty); + QTRY_COMPARE(updateWidget.paintedRegion, dirty); } + if (updateWidget.width() < 200 || updateWidget.height() < 200) + QSKIP("Skip this test due to too small screen geometry."); + { updateWidget.reset(); updateWidget.update(0, 0, 100, 100); @@ -4277,7 +4284,7 @@ void tst_QWidget::scroll() dirty += QRegion(QRect(0, 60, 110, 40)); dirty += QRegion(QRect(50, 100, 60, 10)); dirty += QRegion(QRect(50, 110, 10, 40)); - QCOMPARE(updateWidget.paintedRegion, dirty); + QTRY_COMPARE(updateWidget.paintedRegion, dirty); } { @@ -4288,7 +4295,7 @@ void tst_QWidget::scroll() QRegion dirty(QRect(0, 0, 100, 100)); dirty += QRegion(QRect(100, 100, 100, 10)); dirty += QRegion(QRect(100, 110, 10, 90)); - QCOMPARE(updateWidget.paintedRegion, dirty); + QTRY_COMPARE(updateWidget.paintedRegion, dirty); } } #endif @@ -6123,7 +6130,7 @@ static void workaroundPaletteIssue(QWidget *widget) if (!widget) return; - QWidget *navigationBar = qFindChild<QWidget *>(widget, QLatin1String("qt_calendar_navigationbar")); + QWidget *navigationBar = widget->findChild<QWidget *>(QLatin1String("qt_calendar_navigationbar")); QVERIFY(navigationBar); QPalette palette = navigationBar->palette(); @@ -6222,7 +6229,7 @@ void tst_QWidget::renderInvisible() } // Get navigation bar and explicitly hide it. - QWidget *navigationBar = qFindChild<QWidget *>(calendar.data(), QLatin1String("qt_calendar_navigationbar")); + QWidget *navigationBar = calendar.data()->findChild<QWidget *>(QLatin1String("qt_calendar_navigationbar")); QVERIFY(navigationBar); navigationBar->hide(); @@ -6245,7 +6252,7 @@ void tst_QWidget::renderInvisible() } // Get next month button. - QWidget *nextMonthButton = qFindChild<QWidget *>(navigationBar, QLatin1String("qt_calendar_nextmonth")); + QWidget *nextMonthButton = navigationBar->findChild<QWidget *>(QLatin1String("qt_calendar_nextmonth")); QVERIFY(nextMonthButton); { // Render next month button. @@ -7012,7 +7019,7 @@ void tst_QWidget::moveWindowInShowEvent() // show it widget.show(); - QVERIFY(QTest::qWaitForWindowShown(&widget)); + QVERIFY(QTest::qWaitForWindowExposed(&widget)); QTest::qWait(100); // it should have moved QCOMPARE(widget.pos(), position); diff --git a/tests/auto/widgets/kernel/qwidget_window/qwidget_window.pro b/tests/auto/widgets/kernel/qwidget_window/qwidget_window.pro index 9798f1559a..baa2823f9a 100644 --- a/tests/auto/widgets/kernel/qwidget_window/qwidget_window.pro +++ b/tests/auto/widgets/kernel/qwidget_window/qwidget_window.pro @@ -8,4 +8,3 @@ x11 { LIBS += $$QMAKE_LIBS_X11 } -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/kernel/qwidgetaction/qwidgetaction.pro b/tests/auto/widgets/kernel/qwidgetaction/qwidgetaction.pro index 3f8b26791b..0029ebd51e 100644 --- a/tests/auto/widgets/kernel/qwidgetaction/qwidgetaction.pro +++ b/tests/auto/widgets/kernel/qwidgetaction/qwidgetaction.pro @@ -5,4 +5,3 @@ QT += widgets testlib SOURCES += tst_qwidgetaction.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/kernel/qwidgetmetatype/qwidgetmetatype.pro b/tests/auto/widgets/kernel/qwidgetmetatype/qwidgetmetatype.pro index 3fb0db9426..55228e6a1e 100644 --- a/tests/auto/widgets/kernel/qwidgetmetatype/qwidgetmetatype.pro +++ b/tests/auto/widgets/kernel/qwidgetmetatype/qwidgetmetatype.pro @@ -2,4 +2,3 @@ CONFIG += testcase TARGET = tst_qwidgetmetatype QT += widgets testlib SOURCES += tst_qwidgetmetatype.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/kernel/qwidgetsvariant/qwidgetsvariant.pro b/tests/auto/widgets/kernel/qwidgetsvariant/qwidgetsvariant.pro index 9ad0e9a8c8..e3f2da96bd 100644 --- a/tests/auto/widgets/kernel/qwidgetsvariant/qwidgetsvariant.pro +++ b/tests/auto/widgets/kernel/qwidgetsvariant/qwidgetsvariant.pro @@ -5,4 +5,3 @@ INCLUDEPATH += $$PWD/../../../other/qvariant_common SOURCES += tst_qwidgetsvariant.cpp QT += testlib widgets -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/styles/qmacstyle/qmacstyle.pro b/tests/auto/widgets/styles/qmacstyle/qmacstyle.pro index 91b48f858d..4cd85ab7f2 100644 --- a/tests/auto/widgets/styles/qmacstyle/qmacstyle.pro +++ b/tests/auto/widgets/styles/qmacstyle/qmacstyle.pro @@ -2,4 +2,3 @@ CONFIG += testcase TARGET = tst_qmacstyle QT += widgets testlib SOURCES += tst_qmacstyle.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/styles/qstyle/qstyle.pro b/tests/auto/widgets/styles/qstyle/qstyle.pro index 99fba3ca39..2b9268f35d 100644 --- a/tests/auto/widgets/styles/qstyle/qstyle.pro +++ b/tests/auto/widgets/styles/qstyle/qstyle.pro @@ -13,4 +13,3 @@ wince* { } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp b/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp index c733fadbf5..ef91d6d3d2 100644 --- a/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp +++ b/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp @@ -689,7 +689,7 @@ void tst_QStyle::lineUpLayoutTest(QStyle *style) widget.setLayout(&layout); widget.setStyle(style); // propagate the style. - foreach (QWidget *w, qFindChildren<QWidget *>(&widget)) + foreach (QWidget *w, widget.findChildren<QWidget *>()) w->setStyle(style); widget.show(); QVERIFY(QTest::qWaitForWindowExposed(&widget)); diff --git a/tests/auto/widgets/styles/qstyleoption/qstyleoption.pro b/tests/auto/widgets/styles/qstyleoption/qstyleoption.pro index 270515453c..2ca24c4f43 100644 --- a/tests/auto/widgets/styles/qstyleoption/qstyleoption.pro +++ b/tests/auto/widgets/styles/qstyleoption/qstyleoption.pro @@ -6,4 +6,3 @@ CONFIG += parallel_test QT += widgets testlib SOURCES += tst_qstyleoption.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/styles/qstylesheetstyle/qstylesheetstyle.pro b/tests/auto/widgets/styles/qstylesheetstyle/qstylesheetstyle.pro index dca6a8c28d..c96004bd5d 100644 --- a/tests/auto/widgets/styles/qstylesheetstyle/qstylesheetstyle.pro +++ b/tests/auto/widgets/styles/qstylesheetstyle/qstylesheetstyle.pro @@ -6,4 +6,3 @@ SOURCES += tst_qstylesheetstyle.cpp RESOURCES += resources.qrc requires(contains(QT_CONFIG,private_tests)) -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp b/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp index 305bee4e49..24e3ac2c99 100644 --- a/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp +++ b/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp @@ -656,7 +656,7 @@ void tst_QStyleSheetStyle::fontPropagation() QTabWidget tw; tw.setStyleSheet("QTabWidget { font-size: 20pt; }"); QVERIFY(FONTSIZE(tw) == 20); - QWidget *child = qFindChild<QWidget *>(&tw, "qt_tabwidget_tabbar"); + QWidget *child = tw.findChild<QWidget *>("qt_tabwidget_tabbar"); QVERIFY2(child, "QTabWidget did not contain a widget named \"qt_tabwidget_tabbar\""); QVERIFY(FONTSIZE(*child) == 20); } @@ -957,7 +957,7 @@ void tst_QStyleSheetStyle::tabAlignement() tabWidget.resize(QSize(400,400)); topLevel.show(); QVERIFY(QTest::qWaitForWindowExposed(&topLevel)); - QTabBar *bar = qFindChild<QTabBar*>(&tabWidget); + QTabBar *bar = tabWidget.findChild<QTabBar*>(); QVERIFY(bar); //check the tab is on the right tabWidget.setStyleSheet("QTabWidget::tab-bar { alignment: right ; }"); @@ -1030,7 +1030,7 @@ void tst_QStyleSheetStyle::minmaxSizes() QVERIFY(qAbs(page3->maximumSize().height() - 500 - 2) <= 2); QVERIFY(qAbs(page3->minimumSize().height() - 250 - 2) <= 2); QVERIFY(qAbs(page3->minimumSize().height() - 250 - 2) <= 2); - QTabBar *bar = qFindChild<QTabBar*>(&tabWidget); + QTabBar *bar = tabWidget.findChild<QTabBar*>(); QVERIFY(bar); #ifdef Q_OS_MAC QEXPECT_FAIL("", "QTBUG-23686", Continue); diff --git a/tests/auto/widgets/util/qcompleter/qcompleter.pro b/tests/auto/widgets/util/qcompleter/qcompleter.pro index d28e44232c..19d8d500b8 100644 --- a/tests/auto/widgets/util/qcompleter/qcompleter.pro +++ b/tests/auto/widgets/util/qcompleter/qcompleter.pro @@ -4,4 +4,3 @@ TARGET = tst_qcompleter QT += widgets testlib SOURCES += tst_qcompleter.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/util/qscroller/qscroller.pro b/tests/auto/widgets/util/qscroller/qscroller.pro index 6f999f62c6..55f57f5ed1 100644 --- a/tests/auto/widgets/util/qscroller/qscroller.pro +++ b/tests/auto/widgets/util/qscroller/qscroller.pro @@ -4,4 +4,3 @@ TARGET = tst_qscroller QT += widgets testlib gui-private SOURCES += tst_qscroller.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/util/qscroller/tst_qscroller.cpp b/tests/auto/widgets/util/qscroller/tst_qscroller.cpp index beb1d27620..bbd71a9284 100644 --- a/tests/auto/widgets/util/qscroller/tst_qscroller.cpp +++ b/tests/auto/widgets/util/qscroller/tst_qscroller.cpp @@ -153,7 +153,6 @@ void tst_QScroller::kineticScroll( tst_QScrollerWidget *sw, QPointF from, QPoint QCOMPARE( s1->state(), QScroller::Inactive ); QScrollerProperties sp1 = QScroller::scroller(sw)->scrollerProperties(); - int fps = 60; QTouchEvent::TouchPoint rawTouchPoint; rawTouchPoint.setId(0); @@ -192,8 +191,7 @@ void tst_QScroller::kineticScroll( tst_QScrollerWidget *sw, QPointF from, QPoint QCOMPARE( sw->receivedPrepare, true ); - QTest::qWait(1000 / fps * 2); // wait until the first scroll move - QCOMPARE( sw->receivedFirst, true ); + QTRY_COMPARE( sw->receivedFirst, true ); QCOMPARE( sw->receivedScroll, true ); QCOMPARE( sw->receivedOvershoot, false ); @@ -407,7 +405,7 @@ void tst_QScroller::scroll() QScroller *s1 = QScroller::scroller(sw); kineticScroll(sw, QPointF(500, 500), QPoint(0, 0), QPoint(100, 100), QPoint(200, 200)); // now we should be scrolling - QCOMPARE( s1->state(), QScroller::Scrolling ); + QTRY_COMPARE( s1->state(), QScroller::Scrolling ); // wait until finished, check that no further first scroll is send sw->receivedFirst = false; diff --git a/tests/auto/widgets/util/qsystemtrayicon/qsystemtrayicon.pro b/tests/auto/widgets/util/qsystemtrayicon/qsystemtrayicon.pro index 68b2d85a64..d409d23650 100644 --- a/tests/auto/widgets/util/qsystemtrayicon/qsystemtrayicon.pro +++ b/tests/auto/widgets/util/qsystemtrayicon/qsystemtrayicon.pro @@ -9,4 +9,3 @@ QT += widgets testlib SOURCES += tst_qsystemtrayicon.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/util/qundogroup/qundogroup.pro b/tests/auto/widgets/util/qundogroup/qundogroup.pro index a74ef2b511..bd8dac197b 100644 --- a/tests/auto/widgets/util/qundogroup/qundogroup.pro +++ b/tests/auto/widgets/util/qundogroup/qundogroup.pro @@ -2,4 +2,3 @@ CONFIG += testcase QT += widgets testlib SOURCES += tst_qundogroup.cpp TARGET = tst_qundogroup -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/util/qundostack/qundostack.pro b/tests/auto/widgets/util/qundostack/qundostack.pro index e473e1a275..294debb51c 100644 --- a/tests/auto/widgets/util/qundostack/qundostack.pro +++ b/tests/auto/widgets/util/qundostack/qundostack.pro @@ -2,4 +2,3 @@ CONFIG += testcase QT += widgets testlib SOURCES += tst_qundostack.cpp TARGET = tst_qundostack -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/widgets/qabstractbutton/qabstractbutton.pro b/tests/auto/widgets/widgets/qabstractbutton/qabstractbutton.pro index 1873d4f42f..2f0111f483 100644 --- a/tests/auto/widgets/widgets/qabstractbutton/qabstractbutton.pro +++ b/tests/auto/widgets/widgets/qabstractbutton/qabstractbutton.pro @@ -4,4 +4,3 @@ QT += widgets testlib SOURCES += tst_qabstractbutton.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/widgets/qabstractscrollarea/qabstractscrollarea.pro b/tests/auto/widgets/widgets/qabstractscrollarea/qabstractscrollarea.pro index 3bb8403333..911898407b 100644 --- a/tests/auto/widgets/widgets/qabstractscrollarea/qabstractscrollarea.pro +++ b/tests/auto/widgets/widgets/qabstractscrollarea/qabstractscrollarea.pro @@ -9,4 +9,3 @@ QT += widgets testlib SOURCES += tst_qabstractscrollarea.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/widgets/qabstractslider/qabstractslider.pro b/tests/auto/widgets/widgets/qabstractslider/qabstractslider.pro index 4bf42fd055..020be08867 100644 --- a/tests/auto/widgets/widgets/qabstractslider/qabstractslider.pro +++ b/tests/auto/widgets/widgets/qabstractslider/qabstractslider.pro @@ -5,4 +5,3 @@ QT += widgets testlib SOURCES += tst_qabstractslider.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/widgets/qabstractspinbox/qabstractspinbox.pro b/tests/auto/widgets/widgets/qabstractspinbox/qabstractspinbox.pro index 8efd364c5b..8fa1c0fcac 100644 --- a/tests/auto/widgets/widgets/qabstractspinbox/qabstractspinbox.pro +++ b/tests/auto/widgets/widgets/qabstractspinbox/qabstractspinbox.pro @@ -9,4 +9,3 @@ QT += widgets testlib SOURCES += tst_qabstractspinbox.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/widgets/qbuttongroup/qbuttongroup.pro b/tests/auto/widgets/widgets/qbuttongroup/qbuttongroup.pro index 41c0e1d916..36049cdf0d 100644 --- a/tests/auto/widgets/widgets/qbuttongroup/qbuttongroup.pro +++ b/tests/auto/widgets/widgets/qbuttongroup/qbuttongroup.pro @@ -5,4 +5,3 @@ SOURCES += tst_qbuttongroup.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/widgets/qcalendarwidget/qcalendarwidget.pro b/tests/auto/widgets/widgets/qcalendarwidget/qcalendarwidget.pro index 0232a0b026..f16110cbd1 100644 --- a/tests/auto/widgets/widgets/qcalendarwidget/qcalendarwidget.pro +++ b/tests/auto/widgets/widgets/qcalendarwidget/qcalendarwidget.pro @@ -2,4 +2,3 @@ CONFIG += testcase TARGET = tst_qcalendarwidget QT += widgets testlib SOURCES += tst_qcalendarwidget.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/widgets/qcalendarwidget/tst_qcalendarwidget.cpp b/tests/auto/widgets/widgets/qcalendarwidget/tst_qcalendarwidget.cpp index 1d4a022aaf..14a8496b42 100644 --- a/tests/auto/widgets/widgets/qcalendarwidget/tst_qcalendarwidget.cpp +++ b/tests/auto/widgets/widgets/qcalendarwidget/tst_qcalendarwidget.cpp @@ -183,24 +183,24 @@ void tst_QCalendarWidget::buttonClickCheck() QDate selectedDate(2005, 1, 1); //click on the month buttons int month = object.monthShown(); - QToolButton *button = qFindChild<QToolButton *>(&object, "qt_calendar_prevmonth"); + QToolButton *button = object.findChild<QToolButton *>("qt_calendar_prevmonth"); QTest::mouseClick(button, Qt::LeftButton); QCOMPARE(month > 1 ? month-1 : 12, object.monthShown()); - button = qFindChild<QToolButton *>(&object, "qt_calendar_nextmonth"); + button = object.findChild<QToolButton *>("qt_calendar_nextmonth"); QTest::mouseClick(button, Qt::LeftButton); QCOMPARE(month, object.monthShown()); - button = qFindChild<QToolButton *>(&object, "qt_calendar_yearbutton"); + button = object.findChild<QToolButton *>("qt_calendar_yearbutton"); QTest::mouseClick(button, Qt::LeftButton, Qt::NoModifier, button->rect().center(), 2); QVERIFY(!button->isVisible()); - QSpinBox *spinbox = qFindChild<QSpinBox *>(&object, "qt_calendar_yearedit"); + QSpinBox *spinbox = object.findChild<QSpinBox *>("qt_calendar_yearedit"); QTest::qWait(500); QTest::keyClick(spinbox, '2'); QTest::keyClick(spinbox, '0'); QTest::keyClick(spinbox, '0'); QTest::keyClick(spinbox, '6'); QTest::qWait(500); - QWidget *widget = qFindChild<QWidget *>(&object, "qt_calendar_calendarview"); + QWidget *widget = object.findChild<QWidget *>("qt_calendar_calendarview"); QTest::mouseMove(widget); QTest::mouseClick(widget, Qt::LeftButton); QCOMPARE(2006, object.yearShown()); @@ -212,11 +212,11 @@ void tst_QCalendarWidget::buttonClickCheck() object.setDateRange(QDate(2006,1,1), QDate(2006,2,28)); object.setSelectedDate(QDate(2006,1,1)); object.showSelectedDate(); - button = qFindChild<QToolButton *>(&object, "qt_calendar_prevmonth"); + button = object.findChild<QToolButton *>("qt_calendar_prevmonth"); QTest::mouseClick(button, Qt::LeftButton); QCOMPARE(1, object.monthShown()); - button = qFindChild<QToolButton *>(&object, "qt_calendar_nextmonth"); + button = object.findChild<QToolButton *>("qt_calendar_nextmonth"); QTest::mouseClick(button, Qt::LeftButton); QCOMPARE(2, object.monthShown()); QTest::mouseClick(button, Qt::LeftButton); @@ -351,7 +351,7 @@ void tst_QCalendarWidget::showPrevNext() // QTBUG-4058 QTest::qWait(20); - QToolButton *button = qFindChild<QToolButton *>(&calWidget, "qt_calendar_prevmonth"); + QToolButton *button = calWidget.findChild<QToolButton *>("qt_calendar_prevmonth"); QTest::mouseClick(button, Qt::LeftButton); expectedDate = expectedDate.addMonths(-1); QCOMPARE(calWidget.yearShown(), expectedDate.year()); diff --git a/tests/auto/widgets/widgets/qcheckbox/qcheckbox.pro b/tests/auto/widgets/widgets/qcheckbox/qcheckbox.pro index 78cd61e4cd..4282b25c9f 100644 --- a/tests/auto/widgets/widgets/qcheckbox/qcheckbox.pro +++ b/tests/auto/widgets/widgets/qcheckbox/qcheckbox.pro @@ -5,4 +5,3 @@ SOURCES += tst_qcheckbox.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp index ef6a4571d9..7c468fcaed 100644 --- a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp +++ b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp @@ -2059,15 +2059,15 @@ void tst_QComboBox::task190351_layout() listCombo.setCurrentIndex(70); listCombo.showPopup(); QTRY_VERIFY(listCombo.view()); - QTest::qWaitForWindowShown(listCombo.view()); + QTest::qWaitForWindowExposed(listCombo.view()); QTRY_VERIFY(listCombo.view()->isVisible()); QApplication::processEvents(); #ifdef QT_BUILD_INTERNAL - QFrame *container = qFindChild<QComboBoxPrivateContainer *>(&listCombo); + QFrame *container = listCombo.findChild<QComboBoxPrivateContainer *>(); QVERIFY(container); - QCOMPARE(static_cast<QAbstractItemView *>(list), qFindChild<QAbstractItemView *>(container)); - QWidget *top = qFindChild<QComboBoxPrivateScroller *>(container); + QCOMPARE(static_cast<QAbstractItemView *>(list), container->findChild<QAbstractItemView *>()); + QWidget *top = container->findChild<QComboBoxPrivateScroller *>(); QVERIFY(top); QVERIFY(top->isVisible()); QCOMPARE(top->mapToGlobal(QPoint(0, top->height())).y(), list->mapToGlobal(QPoint()).y()); @@ -2138,10 +2138,10 @@ void tst_QComboBox::task191329_size() QTRY_VERIFY(tableCombo.view()->isVisible()); #ifdef QT_BUILD_INTERNAL - QFrame *container = qFindChild<QComboBoxPrivateContainer *>(&tableCombo); + QFrame *container = tableCombo.findChild<QComboBoxPrivateContainer *>(); QVERIFY(container); - QCOMPARE(static_cast<QAbstractItemView *>(table), qFindChild<QAbstractItemView *>(container)); - foreach (QWidget *button, qFindChildren<QComboBoxPrivateScroller *>(container)) { + QCOMPARE(static_cast<QAbstractItemView *>(table), container->findChild<QAbstractItemView *>()); + foreach (QWidget *button, container->findChildren<QComboBoxPrivateScroller *>()) { //the popup should be large enough to contains everithing so the top and left button are hidden QVERIFY(!button->isVisible()); } @@ -2197,11 +2197,11 @@ void tst_QComboBox::task248169_popupWithMinimalSize() QTRY_VERIFY(comboBox.isVisible()); comboBox.showPopup(); QTRY_VERIFY(comboBox.view()); - QTest::qWaitForWindowShown(comboBox.view()); + QTest::qWaitForWindowExposed(comboBox.view()); QTRY_VERIFY(comboBox.view()->isVisible()); #ifdef QT_BUILD_INTERNAL - QFrame *container = qFindChild<QComboBoxPrivateContainer *>(&comboBox); + QFrame *container = comboBox.findChild<QComboBoxPrivateContainer *>(); QVERIFY(container); QTRY_VERIFY(desktop.screenGeometry(container).contains(container->geometry())); #endif diff --git a/tests/auto/widgets/widgets/qcommandlinkbutton/qcommandlinkbutton.pro b/tests/auto/widgets/widgets/qcommandlinkbutton/qcommandlinkbutton.pro index 4219ab3d7b..be3cfcd104 100644 --- a/tests/auto/widgets/widgets/qcommandlinkbutton/qcommandlinkbutton.pro +++ b/tests/auto/widgets/widgets/qcommandlinkbutton/qcommandlinkbutton.pro @@ -5,4 +5,3 @@ SOURCES += tst_qcommandlinkbutton.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/widgets/qdatetimeedit/qdatetimeedit.pro b/tests/auto/widgets/widgets/qdatetimeedit/qdatetimeedit.pro index 44df6ef883..690edd5c9e 100644 --- a/tests/auto/widgets/widgets/qdatetimeedit/qdatetimeedit.pro +++ b/tests/auto/widgets/widgets/qdatetimeedit/qdatetimeedit.pro @@ -5,4 +5,3 @@ QT += widgets testlib core-private widgets-private SOURCES += tst_qdatetimeedit.cpp wincewm50smart-msvc2005: DEFINES += WINCE_NO_MODIFIER_KEYS -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp b/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp index 53c3eb1ed0..bfffa357a8 100644 --- a/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp +++ b/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp @@ -2818,7 +2818,7 @@ void tst_QDateTimeEdit::calendarPopup() opt.subControls = QStyle::SC_ComboBoxArrow; QRect rect = style->subControlRect(QStyle::CC_ComboBox, &opt, QStyle::SC_ComboBoxArrow, testWidget); QTest::mouseClick(testWidget, Qt::LeftButton, 0, QPoint(rect.left()+rect.width()/2, rect.top()+rect.height()/2)); - QWidget *wid = qFindChild<QWidget *>(testWidget, "qt_datetimedit_calendar"); + QWidget *wid = testWidget->findChild<QWidget *>("qt_datetimedit_calendar"); QVERIFY(wid != 0); testWidget->hide(); @@ -2830,7 +2830,7 @@ void tst_QDateTimeEdit::calendarPopup() opt.subControls = QStyle::SC_ComboBoxArrow; rect = style->subControlRect(QStyle::CC_ComboBox, &opt, QStyle::SC_ComboBoxArrow, &timeEdit); QTest::mouseClick(&timeEdit, Qt::LeftButton, 0, QPoint(rect.left()+rect.width()/2, rect.top()+rect.height()/2)); - QWidget *wid2 = qFindChild<QWidget *>(&timeEdit, "qt_datetimedit_calendar"); + QWidget *wid2 = timeEdit.findChild<QWidget *>("qt_datetimedit_calendar"); QVERIFY(wid2 == 0); timeEdit.hide(); @@ -2844,7 +2844,7 @@ void tst_QDateTimeEdit::calendarPopup() opt.subControls = QStyle::SC_ComboBoxArrow; rect = style->subControlRect(QStyle::CC_ComboBox, &opt, QStyle::SC_ComboBoxArrow, &dateEdit); QTest::mouseClick(&dateEdit, Qt::LeftButton, 0, QPoint(rect.left()+rect.width()/2, rect.top()+rect.height()/2)); - QWidget *wid3 = qFindChild<QWidget *>(&dateEdit, "qt_datetimedit_calendar"); + QWidget *wid3 = dateEdit.findChild<QWidget *>("qt_datetimedit_calendar"); QVERIFY(wid3 == 0); dateEdit.hide(); } diff --git a/tests/auto/widgets/widgets/qdial/qdial.pro b/tests/auto/widgets/widgets/qdial/qdial.pro index 5c33916d15..0af9633236 100644 --- a/tests/auto/widgets/widgets/qdial/qdial.pro +++ b/tests/auto/widgets/widgets/qdial/qdial.pro @@ -5,4 +5,3 @@ QT += widgets testlib SOURCES += tst_qdial.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/widgets/qdialogbuttonbox/qdialogbuttonbox.pro b/tests/auto/widgets/widgets/qdialogbuttonbox/qdialogbuttonbox.pro index fb7e799838..9892c48e0c 100644 --- a/tests/auto/widgets/widgets/qdialogbuttonbox/qdialogbuttonbox.pro +++ b/tests/auto/widgets/widgets/qdialogbuttonbox/qdialogbuttonbox.pro @@ -6,4 +6,3 @@ SOURCES += tst_qdialogbuttonbox.cpp TARGET = tst_qdialogbuttonbox -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/widgets/qdialogbuttonbox/tst_qdialogbuttonbox.cpp b/tests/auto/widgets/widgets/qdialogbuttonbox/tst_qdialogbuttonbox.cpp index 59be9bd659..b0e454b643 100644 --- a/tests/auto/widgets/widgets/qdialogbuttonbox/tst_qdialogbuttonbox.cpp +++ b/tests/auto/widgets/widgets/qdialogbuttonbox/tst_qdialogbuttonbox.cpp @@ -265,7 +265,7 @@ void tst_QDialogButtonBox::addButton1() QPushButton *button = new QPushButton(); buttonBox.addButton(button, role); QTEST(buttonBox.buttons().count(), "totalCount"); - QList<QAbstractButton *> children = qFindChildren<QAbstractButton *>(&buttonBox); + QList<QAbstractButton *> children = buttonBox.findChildren<QAbstractButton *>(); QTEST(children.count(), "totalCount"); delete button; } @@ -292,7 +292,7 @@ void tst_QDialogButtonBox::addButton2() QCOMPARE(buttonBox.buttons().count(), 0); buttonBox.addButton(text, role); QTEST(buttonBox.buttons().count(), "totalCount"); - QList<QAbstractButton *> children = qFindChildren<QAbstractButton *>(&buttonBox); + QList<QAbstractButton *> children = buttonBox.findChildren<QAbstractButton *>(); QTEST(children.count(), "totalCount"); } @@ -319,7 +319,7 @@ void tst_QDialogButtonBox::addButton3() QCOMPARE(buttonBox.buttons().count(), 0); buttonBox.addButton(button); QTEST(buttonBox.buttons().count(), "totalCount"); - QList<QAbstractButton *> children = qFindChildren<QAbstractButton *>(&buttonBox); + QList<QAbstractButton *> children = buttonBox.findChildren<QAbstractButton *>(); QTEST(children.count(), "totalCount"); } @@ -341,7 +341,7 @@ void tst_QDialogButtonBox::clear() buttonBox.addButton("Happy", QDialogButtonBox::ButtonRole(i)); buttonBox.clear(); QCOMPARE(buttonBox.buttons().count(), 0); - QList<QAbstractButton *> children = qFindChildren<QAbstractButton *>(&buttonBox); + QList<QAbstractButton *> children = buttonBox.findChildren<QAbstractButton *>(); QCOMPARE(children.count(), 0); } @@ -376,11 +376,11 @@ void tst_QDialogButtonBox::testDelete() QPushButton *deleteMe = new QPushButton("Happy"); buttonBox.addButton(deleteMe, QDialogButtonBox::HelpRole); QCOMPARE(buttonBox.buttons().count(), 1); - QList<QAbstractButton *> children = qFindChildren<QAbstractButton *>(&buttonBox); + QList<QAbstractButton *> children = buttonBox.findChildren<QAbstractButton *>(); QCOMPARE(children.count(), 1); delete deleteMe; - children = qFindChildren<QAbstractButton *>(&buttonBox); + children = buttonBox.findChildren<QAbstractButton *>(); QCOMPARE(children.count(), 0); QCOMPARE(buttonBox.buttons().count(), 0); } diff --git a/tests/auto/widgets/widgets/qdockwidget/qdockwidget.pro b/tests/auto/widgets/widgets/qdockwidget/qdockwidget.pro index e6b203fdd2..eca396f1a8 100644 --- a/tests/auto/widgets/widgets/qdockwidget/qdockwidget.pro +++ b/tests/auto/widgets/widgets/qdockwidget/qdockwidget.pro @@ -5,4 +5,3 @@ QT += widgets widgets-private testlib QT += core-private gui-private SOURCES += tst_qdockwidget.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp b/tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp index 92b16ac155..6ab7cb4491 100644 --- a/tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp +++ b/tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp @@ -735,7 +735,7 @@ void tst_QDockWidget::task169808_setFloating() QSize sizeHint() const { const QRect& deskRect = qApp->desktop()->availableGeometry(); - return QSize(qMin(300, deskRect.width()), 300); + return QSize(qMin(300, deskRect.width() / 2), qMin(300, deskRect.height() / 2)); } QSize minimumSizeHint() const diff --git a/tests/auto/widgets/widgets/qdoublespinbox/qdoublespinbox.pro b/tests/auto/widgets/widgets/qdoublespinbox/qdoublespinbox.pro index e882ff3eae..cc66eaae26 100644 --- a/tests/auto/widgets/widgets/qdoublespinbox/qdoublespinbox.pro +++ b/tests/auto/widgets/widgets/qdoublespinbox/qdoublespinbox.pro @@ -2,4 +2,3 @@ CONFIG += testcase TARGET = tst_qdoublespinbox QT += widgets testlib SOURCES += tst_qdoublespinbox.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/widgets/qfocusframe/qfocusframe.pro b/tests/auto/widgets/widgets/qfocusframe/qfocusframe.pro index 00cf56f1d9..6fa0589f95 100644 --- a/tests/auto/widgets/widgets/qfocusframe/qfocusframe.pro +++ b/tests/auto/widgets/widgets/qfocusframe/qfocusframe.pro @@ -9,4 +9,3 @@ QT += widgets testlib SOURCES += tst_qfocusframe.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/widgets/qfontcombobox/qfontcombobox.pro b/tests/auto/widgets/widgets/qfontcombobox/qfontcombobox.pro index e3d19bb301..b21729bb9b 100644 --- a/tests/auto/widgets/widgets/qfontcombobox/qfontcombobox.pro +++ b/tests/auto/widgets/widgets/qfontcombobox/qfontcombobox.pro @@ -3,4 +3,3 @@ CONFIG += parallel_test TARGET = tst_qfontcombobox QT += widgets testlib SOURCES += tst_qfontcombobox.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/widgets/qgroupbox/qgroupbox.pro b/tests/auto/widgets/widgets/qgroupbox/qgroupbox.pro index 7c5a4d30e5..4a5e76ff65 100644 --- a/tests/auto/widgets/widgets/qgroupbox/qgroupbox.pro +++ b/tests/auto/widgets/widgets/qgroupbox/qgroupbox.pro @@ -5,4 +5,3 @@ SOURCES += tst_qgroupbox.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/widgets/qlabel/qlabel.pro b/tests/auto/widgets/widgets/qlabel/qlabel.pro index 8e9e7f04a5..6c259bc5a3 100644 --- a/tests/auto/widgets/widgets/qlabel/qlabel.pro +++ b/tests/auto/widgets/widgets/qlabel/qlabel.pro @@ -8,4 +8,3 @@ QT += core-private gui-private SOURCES += tst_qlabel.cpp TESTDATA += testdata/* *.png -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/widgets/qlcdnumber/qlcdnumber.pro b/tests/auto/widgets/widgets/qlcdnumber/qlcdnumber.pro index d70185b910..220380b1d5 100644 --- a/tests/auto/widgets/widgets/qlcdnumber/qlcdnumber.pro +++ b/tests/auto/widgets/widgets/qlcdnumber/qlcdnumber.pro @@ -9,4 +9,3 @@ QT += widgets testlib SOURCES += tst_qlcdnumber.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/widgets/qlineedit/qlineedit.pro b/tests/auto/widgets/widgets/qlineedit/qlineedit.pro index 40eff1f968..715dcb9550 100644 --- a/tests/auto/widgets/widgets/qlineedit/qlineedit.pro +++ b/tests/auto/widgets/widgets/qlineedit/qlineedit.pro @@ -3,4 +3,3 @@ TARGET = tst_qlineedit QT += gui-private core-private widgets widgets-private testlib SOURCES += tst_qlineedit.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/widgets/qmainwindow/qmainwindow.pro b/tests/auto/widgets/widgets/qmainwindow/qmainwindow.pro index 28f1e417f0..bd4fc6ba97 100644 --- a/tests/auto/widgets/widgets/qmainwindow/qmainwindow.pro +++ b/tests/auto/widgets/widgets/qmainwindow/qmainwindow.pro @@ -3,4 +3,3 @@ CONFIG += parallel_test TARGET = tst_qmainwindow QT += widgets widgets-private testlib SOURCES += tst_qmainwindow.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp b/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp index 896d4e8e6f..b42bfcac81 100644 --- a/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp +++ b/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp @@ -731,7 +731,7 @@ void tst_QMainWindow::statusBar() // deleting the status bar should remove it from the main window QMainWindow mw; QStatusBar *sb = mw.statusBar(); - QMainWindowLayout *l = qFindChild<QMainWindowLayout *>(&mw); + QMainWindowLayout *l = mw.findChild<QMainWindowLayout *>(); QVERIFY(l); int indexOfSb = l->indexOf(sb); QVERIFY(indexOfSb != -1); @@ -1425,7 +1425,7 @@ void AddDockWidget::apply(QMainWindow *mw) const QDockWidget *other = 0; if (mode == SplitMode || mode == TabMode) { - other = qFindChild<QDockWidget*>(mw, this->other); + other = mw->findChild<QDockWidget*>(this->other); QVERIFY(other != 0); } @@ -1463,14 +1463,14 @@ Q_DECLARE_METATYPE(MoveList) void MoveSeparator::apply(QMainWindow *mw) const { - QMainWindowLayout *l = qFindChild<QMainWindowLayout *>(mw); + QMainWindowLayout *l = mw->findChild<QMainWindowLayout *>(); QVERIFY(l); QList<int> path; if (name.isEmpty()) { path << area; } else { - QDockWidget *dw = qFindChild<QDockWidget*>(mw, name); + QDockWidget *dw = mw->findChild<QDockWidget*>(name); QVERIFY(dw != 0); path = l->layoutState.dockAreaLayout.indexOf(dw); } @@ -1488,7 +1488,7 @@ void MoveSeparator::apply(QMainWindow *mw) const QMap<QString, QRect> dockWidgetGeometries(QMainWindow *mw) { QMap<QString, QRect> result; - QList<QDockWidget*> dockWidgets = qFindChildren<QDockWidget*>(mw); + QList<QDockWidget*> dockWidgets = mw->findChildren<QDockWidget*>(); foreach (QDockWidget *dw, dockWidgets) result.insert(dw->objectName(), dw->geometry()); return result; diff --git a/tests/auto/widgets/widgets/qmdiarea/qmdiarea.pro b/tests/auto/widgets/widgets/qmdiarea/qmdiarea.pro index cc2bcb3c30..cfd0dd5463 100644 --- a/tests/auto/widgets/widgets/qmdiarea/qmdiarea.pro +++ b/tests/auto/widgets/widgets/qmdiarea/qmdiarea.pro @@ -13,4 +13,3 @@ mac { } !mac:!win32:CONFIG+=insignificant_test # QTBUG-25298 -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp b/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp index 72945a9fd2..6364a736cd 100644 --- a/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp +++ b/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp @@ -111,7 +111,7 @@ static bool tabBetweenSubWindowsIn(QMdiArea *mdiArea, int tabCount = -1, bool re if (tabCount > 1) QTest::qWait(500); if (walkThrough) { - QRubberBand *rubberBand = qFindChild<QRubberBand *>(mdiArea->viewport()); + QRubberBand *rubberBand = mdiArea->viewport()->findChild<QRubberBand *>(); if (!rubberBand) { qWarning("No rubber band"); return false; @@ -2334,14 +2334,14 @@ void tst_QMdiArea::setViewMode() // Default. QVERIFY(!activeSubWindow->isMaximized()); - QTabBar *tabBar = qFindChild<QTabBar *>(&mdiArea); + QTabBar *tabBar = mdiArea.findChild<QTabBar *>(); QVERIFY(!tabBar); QCOMPARE(mdiArea.viewMode(), QMdiArea::SubWindowView); // Tabbed view. mdiArea.setViewMode(QMdiArea::TabbedView); QCOMPARE(mdiArea.viewMode(), QMdiArea::TabbedView); - tabBar = qFindChild<QTabBar *>(&mdiArea); + tabBar = mdiArea.findChild<QTabBar *>(); QVERIFY(tabBar); QVERIFY(tabBar->isVisible()); @@ -2408,7 +2408,7 @@ void tst_QMdiArea::setViewMode() // Go back to default (QMdiArea::SubWindowView). mdiArea.setViewMode(QMdiArea::SubWindowView); QVERIFY(!activeSubWindow->isMaximized()); - tabBar = qFindChild<QTabBar *>(&mdiArea); + tabBar = mdiArea.findChild<QTabBar *>(); QVERIFY(!tabBar); QCOMPARE(mdiArea.viewMode(), QMdiArea::SubWindowView); } @@ -2422,14 +2422,14 @@ void tst_QMdiArea::setTabsClosable() QCOMPARE(mdiArea.tabsClosable(), false); // change value before tab bar exists - QTabBar *tabBar = qFindChild<QTabBar *>(&mdiArea); + QTabBar *tabBar = mdiArea.findChild<QTabBar *>(); QVERIFY(!tabBar); mdiArea.setTabsClosable(true); QCOMPARE(mdiArea.tabsClosable(), true); // force tab bar creation mdiArea.setViewMode(QMdiArea::TabbedView); - tabBar = qFindChild<QTabBar *>(&mdiArea); + tabBar = mdiArea.findChild<QTabBar *>(); QVERIFY(tabBar); // value must've been propagated @@ -2452,14 +2452,14 @@ void tst_QMdiArea::setTabsMovable() QCOMPARE(mdiArea.tabsMovable(), false); // change value before tab bar exists - QTabBar *tabBar = qFindChild<QTabBar *>(&mdiArea); + QTabBar *tabBar = mdiArea.findChild<QTabBar *>(); QVERIFY(!tabBar); mdiArea.setTabsMovable(true); QCOMPARE(mdiArea.tabsMovable(), true); // force tab bar creation mdiArea.setViewMode(QMdiArea::TabbedView); - tabBar = qFindChild<QTabBar *>(&mdiArea); + tabBar = mdiArea.findChild<QTabBar *>(); QVERIFY(tabBar); // value must've been propagated @@ -2500,7 +2500,7 @@ void tst_QMdiArea::setTabShape() mdiArea.setViewMode(QMdiArea::TabbedView); - QTabBar *tabBar = qFindChild<QTabBar *>(&mdiArea); + QTabBar *tabBar = mdiArea.findChild<QTabBar *>(); QVERIFY(tabBar); QCOMPARE(tabBar->shape(), QTabBar::TriangularNorth); @@ -2543,7 +2543,7 @@ void tst_QMdiArea::setTabPosition() // Default. QCOMPARE(mdiArea.tabPosition(), QTabWidget::North); mdiArea.setViewMode(QMdiArea::TabbedView); - QTabBar *tabBar = qFindChild<QTabBar *>(&mdiArea); + QTabBar *tabBar = mdiArea.findChild<QTabBar *>(); QVERIFY(tabBar); QCOMPARE(tabBar->shape(), QTabBar::RoundedNorth); diff --git a/tests/auto/widgets/widgets/qmdisubwindow/qmdisubwindow.pro b/tests/auto/widgets/widgets/qmdisubwindow/qmdisubwindow.pro index 34b3954701..4299f7711e 100644 --- a/tests/auto/widgets/widgets/qmdisubwindow/qmdisubwindow.pro +++ b/tests/auto/widgets/widgets/qmdisubwindow/qmdisubwindow.pro @@ -4,4 +4,3 @@ QT += widgets testlib INCLUDEPATH += . SOURCES += tst_qmdisubwindow.cpp DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp b/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp index 2163426cac..5b146cf443 100644 --- a/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp +++ b/tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp @@ -154,6 +154,7 @@ Q_DECLARE_METATYPE(Qt::WindowState); Q_DECLARE_METATYPE(Qt::WindowStates); Q_DECLARE_METATYPE(Qt::WindowType); Q_DECLARE_METATYPE(Qt::WindowFlags); +Q_DECLARE_METATYPE(QMdiSubWindow*); class tst_QMdiSubWindow : public QObject { @@ -204,6 +205,7 @@ private slots: void task_182852(); void task_233197(); void task_226929(); + void styleChange(); }; void tst_QMdiSubWindow::initTestCase() @@ -596,7 +598,7 @@ void tst_QMdiSubWindow::showShaded() QWidget *mouseReceiver = 0; #ifdef Q_OS_MAC if (window->style()->inherits("QMacStyle")) - mouseReceiver = qFindChild<QSizeGrip *>(window); + mouseReceiver = window->findChild<QSizeGrip *>(); else #endif mouseReceiver = window; @@ -705,7 +707,7 @@ void tst_QMdiSubWindow::setOpaqueResizeAndMove() QWidget *mouseReceiver = 0; if (window->style()->inherits("QMacStyle")) - mouseReceiver = qFindChild<QSizeGrip *>(window); + mouseReceiver = window->findChild<QSizeGrip *>(); else mouseReceiver = window; QVERIFY(mouseReceiver); @@ -1445,12 +1447,12 @@ void tst_QMdiSubWindow::defaultSizeGrip() // QSizeGrip on windows with decoration. QMdiSubWindow *windowWithDecoration = mdiArea.addSubWindow(new QWidget); windowWithDecoration->show(); - QVERIFY(qFindChild<QSizeGrip *>(windowWithDecoration)); + QVERIFY(windowWithDecoration->findChild<QSizeGrip *>()); // ...but not on windows without decoration (Qt::FramelessWindowHint). QMdiSubWindow *windowWithoutDecoration = mdiArea.addSubWindow(new QWidget, Qt::FramelessWindowHint); windowWithoutDecoration->show(); - QVERIFY(!qFindChild<QSizeGrip *>(windowWithoutDecoration)); + QVERIFY(!windowWithoutDecoration->findChild<QSizeGrip *>()); } #endif @@ -2018,6 +2020,35 @@ void tst_QMdiSubWindow::task_226929() QVERIFY(sub1->isMaximized()); } +void tst_QMdiSubWindow::styleChange() +{ + QMdiArea mdiArea; + mdiArea.show(); + QVERIFY(QTest::qWaitForWindowExposed(&mdiArea)); + + QMdiSubWindow *sub1 = mdiArea.addSubWindow(new QTextEdit); + sub1->showMaximized(); + + QMdiSubWindow *sub2 = mdiArea.addSubWindow(new QTextEdit); + sub2->showMinimized(); + + mdiArea.setActiveSubWindow(sub1); + + QTest::qWait(100); + + qRegisterMetaType<QMdiSubWindow *>(); + QSignalSpy spy(&mdiArea, SIGNAL(subWindowActivated(QMdiSubWindow*))); + QVERIFY(spy.isValid()); + + QEvent event(QEvent::StyleChange); + QApplication::sendEvent(sub1, &event); + QApplication::sendEvent(sub2, &event); + + // subWindowActivated should NOT be activated by a style change, + // even if internally QMdiSubWindow un-minimizes subwindows temporarily. + QCOMPARE(spy.count(), 0); +} + QTEST_MAIN(tst_QMdiSubWindow) #include "tst_qmdisubwindow.moc" diff --git a/tests/auto/widgets/widgets/qmenu/qmenu.pro b/tests/auto/widgets/widgets/qmenu/qmenu.pro index c474ef9f86..9efd0302bf 100644 --- a/tests/auto/widgets/widgets/qmenu/qmenu.pro +++ b/tests/auto/widgets/widgets/qmenu/qmenu.pro @@ -3,4 +3,3 @@ TARGET = tst_qmenu QT += widgets testlib SOURCES += tst_qmenu.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/widgets/qmenubar/qmenubar.pro b/tests/auto/widgets/widgets/qmenubar/qmenubar.pro index 903d5be387..3fb6ae61a8 100644 --- a/tests/auto/widgets/widgets/qmenubar/qmenubar.pro +++ b/tests/auto/widgets/widgets/qmenubar/qmenubar.pro @@ -2,4 +2,3 @@ CONFIG += testcase TARGET = tst_qmenubar QT += widgets testlib SOURCES += tst_qmenubar.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp b/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp index 519aa61061..d1e6693608 100644 --- a/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp +++ b/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp @@ -294,7 +294,6 @@ void tst_QMenuBar::initSimpleMenubar() connect(pm2, SIGNAL(triggered(QAction*)), this, SLOT(onActivated(QAction*))); mb->show(); - qApp->syncX(); qApp->processEvents(); } diff --git a/tests/auto/widgets/widgets/qplaintextedit/qplaintextedit.pro b/tests/auto/widgets/widgets/qplaintextedit/qplaintextedit.pro index 7bb4094709..e98bae2089 100644 --- a/tests/auto/widgets/widgets/qplaintextedit/qplaintextedit.pro +++ b/tests/auto/widgets/widgets/qplaintextedit/qplaintextedit.pro @@ -9,4 +9,3 @@ INCLUDEPATH += ../ HEADERS += SOURCES += tst_qplaintextedit.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp b/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp index fdb17d1eaf..11c4e238ec 100644 --- a/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp +++ b/tests/auto/widgets/widgets/qplaintextedit/tst_qplaintextedit.cpp @@ -1119,7 +1119,7 @@ void tst_QPlainTextEdit::mimeDataReimplementations() QCOMPARE(ed.insertCallCount, 0); #ifdef QT_BUILD_INTERNAL - QWidgetTextControl *control = qFindChild<QWidgetTextControl *>(&ed); + QWidgetTextControl *control = ed.findChild<QWidgetTextControl *>(); QVERIFY(control); control->canInsertFromMimeData(QApplication::clipboard()->mimeData()); diff --git a/tests/auto/widgets/widgets/qprogressbar/qprogressbar.pro b/tests/auto/widgets/widgets/qprogressbar/qprogressbar.pro index e7f60a0144..1de3e6309f 100644 --- a/tests/auto/widgets/widgets/qprogressbar/qprogressbar.pro +++ b/tests/auto/widgets/widgets/qprogressbar/qprogressbar.pro @@ -5,4 +5,3 @@ SOURCES += tst_qprogressbar.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/widgets/qpushbutton/qpushbutton.pro b/tests/auto/widgets/widgets/qpushbutton/qpushbutton.pro index 4f7bacce70..353ad06ca2 100644 --- a/tests/auto/widgets/widgets/qpushbutton/qpushbutton.pro +++ b/tests/auto/widgets/widgets/qpushbutton/qpushbutton.pro @@ -5,4 +5,3 @@ SOURCES += tst_qpushbutton.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp b/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp index 09a6565ca6..75c826c4cc 100644 --- a/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp +++ b/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp @@ -659,7 +659,7 @@ void tst_QPushButton::taskQTBUG_20191_shortcutWithKeypadModifer() QDialog dialog; dialog.setLayout(layout); dialog.show(); - QTest::qWaitForWindowShown(&dialog); + QTest::qWaitForWindowExposed(&dialog); QApplication::setActiveWindow(&dialog); // add shortcut '5' to button1 and test with keyboard and keypad '5' keys diff --git a/tests/auto/widgets/widgets/qradiobutton/qradiobutton.pro b/tests/auto/widgets/widgets/qradiobutton/qradiobutton.pro index 961400d07b..a89733e9e1 100644 --- a/tests/auto/widgets/widgets/qradiobutton/qradiobutton.pro +++ b/tests/auto/widgets/widgets/qradiobutton/qradiobutton.pro @@ -5,4 +5,3 @@ SOURCES += tst_qradiobutton.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/widgets/qscrollarea/qscrollarea.pro b/tests/auto/widgets/widgets/qscrollarea/qscrollarea.pro index 87649fa366..0cd706420e 100644 --- a/tests/auto/widgets/widgets/qscrollarea/qscrollarea.pro +++ b/tests/auto/widgets/widgets/qscrollarea/qscrollarea.pro @@ -9,4 +9,3 @@ QT += widgets testlib SOURCES += tst_qscrollarea.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/widgets/qscrollbar/qscrollbar.pro b/tests/auto/widgets/widgets/qscrollbar/qscrollbar.pro index 3a9778b46d..8c6ea6e1d4 100644 --- a/tests/auto/widgets/widgets/qscrollbar/qscrollbar.pro +++ b/tests/auto/widgets/widgets/qscrollbar/qscrollbar.pro @@ -3,4 +3,3 @@ CONFIG += parallel_test TARGET = tst_qscrollbar QT += widgets testlib SOURCES += tst_qscrollbar.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/widgets/qsizegrip/qsizegrip.pro b/tests/auto/widgets/widgets/qsizegrip/qsizegrip.pro index 3c63c5b0f5..ceb897c612 100644 --- a/tests/auto/widgets/widgets/qsizegrip/qsizegrip.pro +++ b/tests/auto/widgets/widgets/qsizegrip/qsizegrip.pro @@ -4,4 +4,3 @@ TARGET = tst_qsizegrip INCLUDEPATH += . QT += widgets testlib SOURCES += tst_qsizegrip.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/widgets/qslider/qslider.pro b/tests/auto/widgets/widgets/qslider/qslider.pro index e704042d4a..d0a61e5a95 100644 --- a/tests/auto/widgets/widgets/qslider/qslider.pro +++ b/tests/auto/widgets/widgets/qslider/qslider.pro @@ -9,4 +9,3 @@ QT += widgets testlib SOURCES += tst_qslider.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/widgets/qspinbox/qspinbox.pro b/tests/auto/widgets/widgets/qspinbox/qspinbox.pro index 59eb7141eb..0541eaadeb 100644 --- a/tests/auto/widgets/widgets/qspinbox/qspinbox.pro +++ b/tests/auto/widgets/widgets/qspinbox/qspinbox.pro @@ -2,4 +2,3 @@ CONFIG += testcase TARGET = tst_qspinbox QT += widgets testlib SOURCES += tst_qspinbox.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/widgets/qsplitter/qsplitter.pro b/tests/auto/widgets/widgets/qsplitter/qsplitter.pro index 801b6b69c5..c43847b11f 100644 --- a/tests/auto/widgets/widgets/qsplitter/qsplitter.pro +++ b/tests/auto/widgets/widgets/qsplitter/qsplitter.pro @@ -5,4 +5,3 @@ QT += widgets testlib SOURCES += tst_qsplitter.cpp TESTDATA += extradata.txt setSizes3.dat -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/widgets/qstackedwidget/qstackedwidget.pro b/tests/auto/widgets/widgets/qstackedwidget/qstackedwidget.pro index f334da7ef2..d016caf393 100644 --- a/tests/auto/widgets/widgets/qstackedwidget/qstackedwidget.pro +++ b/tests/auto/widgets/widgets/qstackedwidget/qstackedwidget.pro @@ -9,4 +9,3 @@ QT += widgets testlib SOURCES += tst_qstackedwidget.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/widgets/qstatusbar/qstatusbar.pro b/tests/auto/widgets/widgets/qstatusbar/qstatusbar.pro index 980a1e8cb1..5cf40f7b36 100644 --- a/tests/auto/widgets/widgets/qstatusbar/qstatusbar.pro +++ b/tests/auto/widgets/widgets/qstatusbar/qstatusbar.pro @@ -5,4 +5,3 @@ SOURCES += tst_qstatusbar.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/widgets/qstatusbar/tst_qstatusbar.cpp b/tests/auto/widgets/widgets/qstatusbar/tst_qstatusbar.cpp index 62dfd07f3e..3bdf583153 100644 --- a/tests/auto/widgets/widgets/qstatusbar/tst_qstatusbar.cpp +++ b/tests/auto/widgets/widgets/qstatusbar/tst_qstatusbar.cpp @@ -175,7 +175,7 @@ void tst_QStatusBar::setSizeGripEnabled() QVERIFY(QTest::qWaitForWindowExposed(&mainWindow)); QTRY_VERIFY(statusBar->isVisible()); - QPointer<QSizeGrip> sizeGrip = qFindChild<QSizeGrip *>(statusBar); + QPointer<QSizeGrip> sizeGrip = statusBar->findChild<QSizeGrip *>(); QVERIFY(sizeGrip); QVERIFY(sizeGrip->isVisible()); @@ -211,7 +211,7 @@ void tst_QStatusBar::setSizeGripEnabled() statusBar = mainWindow.statusBar(); QVERIFY(statusBar); - sizeGrip = qFindChild<QSizeGrip *>(statusBar); + sizeGrip = statusBar->findChild<QSizeGrip *>(); QVERIFY(sizeGrip); QVERIFY(!sizeGrip->isVisible()); diff --git a/tests/auto/widgets/widgets/qtabbar/qtabbar.pro b/tests/auto/widgets/widgets/qtabbar/qtabbar.pro index 32c1a6b0d4..8772005bef 100644 --- a/tests/auto/widgets/widgets/qtabbar/qtabbar.pro +++ b/tests/auto/widgets/widgets/qtabbar/qtabbar.pro @@ -6,4 +6,3 @@ SOURCES += tst_qtabbar.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/widgets/qtabwidget/qtabwidget.pro b/tests/auto/widgets/widgets/qtabwidget/qtabwidget.pro index 560aa86946..72956a6867 100644 --- a/tests/auto/widgets/widgets/qtabwidget/qtabwidget.pro +++ b/tests/auto/widgets/widgets/qtabwidget/qtabwidget.pro @@ -9,4 +9,3 @@ HEADERS += SOURCES += tst_qtabwidget.cpp win32:!wince*:LIBS += -luser32 -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/widgets/qtextbrowser/qtextbrowser.pro b/tests/auto/widgets/widgets/qtextbrowser/qtextbrowser.pro index 334b3cd9b3..5416c1c71f 100644 --- a/tests/auto/widgets/widgets/qtextbrowser/qtextbrowser.pro +++ b/tests/auto/widgets/widgets/qtextbrowser/qtextbrowser.pro @@ -5,4 +5,3 @@ SOURCES += tst_qtextbrowser.cpp QT += widgets testlib TESTDATA += *.html subdir/* -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/widgets/qtextedit/qtextedit.pro b/tests/auto/widgets/widgets/qtextedit/qtextedit.pro index dad0f6ad7e..6e0fff17d5 100644 --- a/tests/auto/widgets/widgets/qtextedit/qtextedit.pro +++ b/tests/auto/widgets/widgets/qtextedit/qtextedit.pro @@ -4,4 +4,3 @@ TARGET = tst_qtextedit QT += widgets widgets-private gui-private core-private testlib SOURCES += tst_qtextedit.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp b/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp index b8ff6f1c33..11bb5c88a1 100644 --- a/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp +++ b/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp @@ -1483,7 +1483,7 @@ void tst_QTextEdit::mimeDataReimplementations() QCOMPARE(ed.insertCallCount, 0); #ifdef QT_BUILD_INTERNAL - QWidgetTextControl *control = qFindChild<QWidgetTextControl *>(&ed); + QWidgetTextControl *control = ed.findChild<QWidgetTextControl *>(); QVERIFY(control); control->canInsertFromMimeData(QApplication::clipboard()->mimeData()); @@ -2104,7 +2104,7 @@ void tst_QTextEdit::cursorRect() #ifdef QT_BUILD_INTERNAL void tst_QTextEdit::setDocumentPreservesPalette() { - QWidgetTextControl *control = qFindChild<QWidgetTextControl *>(ed); + QWidgetTextControl *control = ed->findChild<QWidgetTextControl *>(); QVERIFY(control); QPalette defaultPal = ed->palette(); diff --git a/tests/auto/widgets/widgets/qtoolbar/qtoolbar.pro b/tests/auto/widgets/widgets/qtoolbar/qtoolbar.pro index db8ea04967..ef1a0e0ba0 100644 --- a/tests/auto/widgets/widgets/qtoolbar/qtoolbar.pro +++ b/tests/auto/widgets/widgets/qtoolbar/qtoolbar.pro @@ -6,4 +6,3 @@ SOURCES += tst_qtoolbar.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/widgets/qtoolbox/qtoolbox.pro b/tests/auto/widgets/widgets/qtoolbox/qtoolbox.pro index ccf9996ea4..a8c62ec54a 100644 --- a/tests/auto/widgets/widgets/qtoolbox/qtoolbox.pro +++ b/tests/auto/widgets/widgets/qtoolbox/qtoolbox.pro @@ -6,4 +6,3 @@ SOURCES += tst_qtoolbox.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/widgets/widgets/qtoolbutton/qtoolbutton.pro b/tests/auto/widgets/widgets/qtoolbutton/qtoolbutton.pro index a685100eca..441477e956 100644 --- a/tests/auto/widgets/widgets/qtoolbutton/qtoolbutton.pro +++ b/tests/auto/widgets/widgets/qtoolbutton/qtoolbutton.pro @@ -2,4 +2,3 @@ CONFIG += testcase TARGET = tst_qtoolbutton QT += widgets testlib SOURCES += tst_qtoolbutton.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/xml/dom/qdom/qdom.pro b/tests/auto/xml/dom/qdom/qdom.pro index 69e99aa0da..db19a8ba89 100644 --- a/tests/auto/xml/dom/qdom/qdom.pro +++ b/tests/auto/xml/dom/qdom/qdom.pro @@ -11,4 +11,3 @@ wince* { } } TESTDATA += testdata/* doubleNamespaces.xml umlaut.xml -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/xml/sax/qxml/qxml.pro b/tests/auto/xml/sax/qxml/qxml.pro index 1c29f92677..e5fd4eafe3 100644 --- a/tests/auto/xml/sax/qxml/qxml.pro +++ b/tests/auto/xml/sax/qxml/qxml.pro @@ -6,4 +6,3 @@ SOURCES += tst_qxml.cpp QT = core xml testlib TESTDATA += 0x010D.xml -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/xml/sax/qxmlinputsource/qxmlinputsource.pro b/tests/auto/xml/sax/qxmlinputsource/qxmlinputsource.pro index 1fbcd7d2c8..a8bf834074 100644 --- a/tests/auto/xml/sax/qxmlinputsource/qxmlinputsource.pro +++ b/tests/auto/xml/sax/qxmlinputsource/qxmlinputsource.pro @@ -5,4 +5,3 @@ QT += core xml network testlib QT -= gui -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/xml/sax/qxmlsimplereader/parser/parser.pro b/tests/auto/xml/sax/qxmlsimplereader/parser/parser.pro index 053f0d9285..f801200942 100644 --- a/tests/auto/xml/sax/qxmlsimplereader/parser/parser.pro +++ b/tests/auto/xml/sax/qxmlsimplereader/parser/parser.pro @@ -2,4 +2,3 @@ QT += xml HEADERS += parser.h SOURCES += main.cpp parser.cpp -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/xml/sax/qxmlsimplereader/qxmlsimplereader.pro b/tests/auto/xml/sax/qxmlsimplereader/qxmlsimplereader.pro index 298e41fc89..981f506c6d 100644 --- a/tests/auto/xml/sax/qxmlsimplereader/qxmlsimplereader.pro +++ b/tests/auto/xml/sax/qxmlsimplereader/qxmlsimplereader.pro @@ -10,4 +10,3 @@ QT += network xml testlib QT -= gui TESTDATA += encodings/* xmldocs/* -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/manual/cocoa/nativewidgets/main.cpp b/tests/manual/cocoa/nativewidgets/main.cpp new file mode 100644 index 0000000000..2ff919b125 --- /dev/null +++ b/tests/manual/cocoa/nativewidgets/main.cpp @@ -0,0 +1,147 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, 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, Digia gives you certain additional +** rights. These rights are described in the Digia 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. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QtCore> +#include <QtWidgets> + +class ColorWidget : public QWidget +{ + QColor color; + int s; + int v; + + void changeColor() + { + color.setHsv((qreal(qrand()) / RAND_MAX) * 50 + 200, s, s); + } + +public: + ColorWidget() + { + s = 150; + v = 150; + changeColor(); + setMouseTracking(true); + } + + void mousePressEvent(QMouseEvent *) + { + changeColor(); + update(); + } + + void mouseMoveEvent(QMouseEvent *) + { + changeColor(); + update(); + } + + void enterEvent(QEvent *) + { + s = 200; + v = 200; + changeColor(); + update(); + } + + void leaveEvent(QEvent *) + { + s = 75; + v = 75; + changeColor(); + update(); + } + + void paintEvent(QPaintEvent *){ + QPainter p(this); + p.fillRect(QRect(QPoint(0, 0), size()), QBrush(color)); + } +}; + + +int main(int argc, char *argv[]) +{ + QApplication app(argc, argv); + + ColorWidget window; + + QWidget *w1 = new ColorWidget; + QWidget *w2 = new ColorWidget; + QWidget *w3 = new ColorWidget; + + QHBoxLayout *layout = new QHBoxLayout; + layout->addWidget(w1); + layout->addWidget(w2); + layout->addWidget(w3); + + QWidget *w3_1 = new ColorWidget; + QWidget *w3_2 = new ColorWidget; + QWidget *w3_3 = new ColorWidget; + + QVBoxLayout *layout3 = new QVBoxLayout; + layout3->setMargin(0); + layout3->addWidget(w3_1); + layout3->addWidget(w3_2); + layout3->addWidget(w3_3); + w3->setLayout(layout3); + + window.setLayout(layout); + + bool native = 1; + + if (native) { + w1->winId(); + w2->winId(); + w3->winId(); + + w3_1->winId(); + w3_2->winId(); + w3_3->winId(); + } + + window.resize(640, 480); + window.show(); + + return app.exec(); +} + + + diff --git a/tests/manual/cocoa/nativewidgets/nativewigets.pro b/tests/manual/cocoa/nativewidgets/nativewigets.pro new file mode 100644 index 0000000000..f1b1260688 --- /dev/null +++ b/tests/manual/cocoa/nativewidgets/nativewigets.pro @@ -0,0 +1,7 @@ +TEMPLATE = app + +HEADERS += +SOURCES += main.cpp + +QT += core widgets +DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/manual/gestures/graphicsview/main.cpp b/tests/manual/gestures/graphicsview/main.cpp index d6551e53bf..cc06cb1986 100644 --- a/tests/manual/gestures/graphicsview/main.cpp +++ b/tests/manual/gestures/graphicsview/main.cpp @@ -39,7 +39,16 @@ ** ****************************************************************************/ -#include <QtWidgets> +#include <QApplication> +#include <QMainWindow> +#include <QGraphicsScene> +#include <QGraphicsView> +#include <QScrollBar> +#include <QImageReader> +#include <QVBoxLayout> +#include <QGestureEvent> +#include <QDir> +#include <QFileDialog> #include "imageitem.h" #include "gestures.h" diff --git a/tests/manual/gestures/scrollarea/main.cpp b/tests/manual/gestures/scrollarea/main.cpp index 7917b76418..3acce40d50 100644 --- a/tests/manual/gestures/scrollarea/main.cpp +++ b/tests/manual/gestures/scrollarea/main.cpp @@ -39,7 +39,17 @@ ** ****************************************************************************/ -#include <QtWidgets> +#include <QApplication> +#include <QSlider> +#include <QScrollArea> +#include <QScrollBar> +#include <QMainWindow> +#include <QLabel> +#include <QPushButton> +#include <QVBoxLayout> +#include <QGestureEvent> +#include <QPanGesture> +#include <QDebug> #include "mousepangesturerecognizer.h" diff --git a/tests/manual/inputmethodhints/inputmethodhints.h b/tests/manual/inputmethodhints/inputmethodhints.h index ce1724280f..da1262da39 100644 --- a/tests/manual/inputmethodhints/inputmethodhints.h +++ b/tests/manual/inputmethodhints/inputmethodhints.h @@ -42,7 +42,7 @@ #ifndef INPUTMETHODHINTS_H #define INPUTMETHODHINTS_H -#include <QtWidgets/QMainWindow> +#include <QMainWindow> #include "ui_inputmethodhints.h" class inputmethodhints : public QMainWindow diff --git a/tests/manual/inputmethodhints/main.cpp b/tests/manual/inputmethodhints/main.cpp index c96dc65633..fc294dfc43 100644 --- a/tests/manual/inputmethodhints/main.cpp +++ b/tests/manual/inputmethodhints/main.cpp @@ -41,7 +41,6 @@ #include "inputmethodhints.h" -#include <QtWidgets> #include <QApplication> int main(int argc, char *argv[]) diff --git a/tests/manual/keypadnavigation/main.cpp b/tests/manual/keypadnavigation/main.cpp index c631288d60..71a0072fba 100644 --- a/tests/manual/keypadnavigation/main.cpp +++ b/tests/manual/keypadnavigation/main.cpp @@ -39,7 +39,14 @@ ** ****************************************************************************/ -#include <QtWidgets> +#include <QMainWindow> +#include <QApplication> +#include <QColorDialog> +#include <QFileDialog> +#include <QFontDialog> +#include <QInputDialog> +#include <QMessageBox> +#include <QSignalMapper> #include "ui_keypadnavigation.h" class KeypadNavigation : public QMainWindow diff --git a/tests/manual/manual.pro b/tests/manual/manual.pro index 1169ea6a27..5a974842a4 100644 --- a/tests/manual/manual.pro +++ b/tests/manual/manual.pro @@ -46,3 +46,6 @@ win32 { # disable some tests on wince because of missing dependencies wince*:SUBDIRS -= lance windowmodality } + +lessThan(QT_MAJOR_VERSION, 5): SUBDIRS -= bearerex lance qnetworkaccessmanager/qget qnetworkreply \ +qpainfo qscreen socketengine xembed-raster xembed-widgets diff --git a/tests/manual/qcursor/allcursors/main.cpp b/tests/manual/qcursor/allcursors/main.cpp index 5a9a172a2d..247841de31 100644 --- a/tests/manual/qcursor/allcursors/main.cpp +++ b/tests/manual/qcursor/allcursors/main.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include <QtWidgets/QApplication> +#include <QApplication> #include "mainwindow.h" int main(int argc, char *argv[]) diff --git a/tests/manual/qcursor/allcursors/mainwindow.h b/tests/manual/qcursor/allcursors/mainwindow.h index 4b7dc91a18..9c6adcaddd 100644 --- a/tests/manual/qcursor/allcursors/mainwindow.h +++ b/tests/manual/qcursor/allcursors/mainwindow.h @@ -42,7 +42,7 @@ #ifndef MAINWINDOW_H #define MAINWINDOW_H -#include <QtWidgets/QMainWindow> +#include <QMainWindow> class QTimer; diff --git a/tests/manual/qcursor/grab_override/main.cpp b/tests/manual/qcursor/grab_override/main.cpp index 5a9a172a2d..247841de31 100644 --- a/tests/manual/qcursor/grab_override/main.cpp +++ b/tests/manual/qcursor/grab_override/main.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include <QtWidgets/QApplication> +#include <QApplication> #include "mainwindow.h" int main(int argc, char *argv[]) diff --git a/tests/manual/qcursor/grab_override/mainwindow.h b/tests/manual/qcursor/grab_override/mainwindow.h index eaf4b95615..31ecaee43f 100644 --- a/tests/manual/qcursor/grab_override/mainwindow.h +++ b/tests/manual/qcursor/grab_override/mainwindow.h @@ -42,7 +42,7 @@ #ifndef MAINWINDOW_H #define MAINWINDOW_H -#include <QtWidgets/QMainWindow> +#include <QMainWindow> class QTimer; diff --git a/tests/manual/qdesktopwidget/main.cpp b/tests/manual/qdesktopwidget/main.cpp index 3873a6a1e1..1a10cbfbd2 100644 --- a/tests/manual/qdesktopwidget/main.cpp +++ b/tests/manual/qdesktopwidget/main.cpp @@ -39,7 +39,11 @@ ** ****************************************************************************/ -#include <QtWidgets> +#include <QGraphicsView> +#include <QGraphicsRectItem> +#include <QDesktopWidget> +#include <QApplication> +#include <QDebug> class DesktopView : public QGraphicsView { diff --git a/tests/manual/qgraphicsitem/main.cpp b/tests/manual/qgraphicsitem/main.cpp index 84364e6bc0..e21baa3d18 100644 --- a/tests/manual/qgraphicsitem/main.cpp +++ b/tests/manual/qgraphicsitem/main.cpp @@ -39,11 +39,11 @@ ** ****************************************************************************/ -#include <QtWidgets/QApplication> -#include <QtWidgets/QGraphicsView> -#include <QtWidgets/QGraphicsScene> -#include <QtWidgets/QGraphicsItem> -#include <QtWidgets/QMessageBox> +#include <QApplication> +#include <QGraphicsView> +#include <QGraphicsScene> +#include <QGraphicsItem> +#include <QMessageBox> class MyObject : public QObject { diff --git a/tests/manual/qgraphicsitemgroup/main.cpp b/tests/manual/qgraphicsitemgroup/main.cpp index 97dbafd059..75f36e54af 100644 --- a/tests/manual/qgraphicsitemgroup/main.cpp +++ b/tests/manual/qgraphicsitemgroup/main.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include <QtWidgets/QApplication> +#include <QApplication> #include "widget.h" int main(int argc, char *argv[]) diff --git a/tests/manual/qgraphicslayout/flicker/main.cpp b/tests/manual/qgraphicslayout/flicker/main.cpp index 4b6589f9f8..2f4140e39a 100644 --- a/tests/manual/qgraphicslayout/flicker/main.cpp +++ b/tests/manual/qgraphicslayout/flicker/main.cpp @@ -39,7 +39,8 @@ ** ****************************************************************************/ -#include <QtWidgets> +#include <QMainWindow> +#include <QApplication> #include "window.h" int main(int argc, char **argv) diff --git a/tests/manual/qgraphicslayout/flicker/window.h b/tests/manual/qgraphicslayout/flicker/window.h index 3a0eb77fcc..190e9c4890 100644 --- a/tests/manual/qgraphicslayout/flicker/window.h +++ b/tests/manual/qgraphicslayout/flicker/window.h @@ -43,7 +43,21 @@ #define WINDOW_H -#include <QtWidgets> +#include <QGraphicsScene> +#include <QGraphicsWidget> +#include <QGraphicsLinearLayout> +#include <QGraphicsView> +#include <QSpinBox> +#include <QCheckBox> +#include <QPushButton> +#include <QLabel> +#include <QHBoxLayout> +#include <QPainter> +#include <QApplication> +#include <QThread> +#include <QMap> +#include <QTime> +#include <QDebug> struct Statistics { Statistics() : setGeometryCount(0), sleepMsecs(0), output(0), @@ -57,7 +71,11 @@ struct Statistics { QLabel *output; void sleep() { +#if QT_VERSION >= 0x050000 QThread::msleep(sleepMsecs); +#else + qWarning("%s unimplemented", Q_FUNC_INFO); +#endif } int currentBenchmarkIteration; bool relayoutClicked; diff --git a/tests/manual/qimagereader/main.cpp b/tests/manual/qimagereader/main.cpp index ea33ef1e01..4dc41ac542 100644 --- a/tests/manual/qimagereader/main.cpp +++ b/tests/manual/qimagereader/main.cpp @@ -39,7 +39,12 @@ ** ****************************************************************************/ -#include <QtWidgets> +#include <QWidget> +#include <QHBoxLayout> +#include <QApplication> +#include <QPainter> +#include <QImage> +#include <QImageReader> class MyWidget : public QWidget { diff --git a/tests/manual/qlocale/calendar.cpp b/tests/manual/qlocale/calendar.cpp index d7ac33e6a4..6b3d3c213d 100644 --- a/tests/manual/qlocale/calendar.cpp +++ b/tests/manual/qlocale/calendar.cpp @@ -38,10 +38,17 @@ ** ****************************************************************************/ -#include <QtWidgets> - #include "calendar.h" +#include <QComboBox> +#include <QGridLayout> +#include <QGroupBox> +#include <QCalendarWidget> +#include <QLabel> +#include <QDateEdit> +#include <QCheckBox> +#include <QTextCharFormat> + CalendarWidget::CalendarWidget() { createPreviewGroupBox(); diff --git a/tests/manual/qlocale/calendar.h b/tests/manual/qlocale/calendar.h index fd5f2c3931..ec152a7f4e 100644 --- a/tests/manual/qlocale/calendar.h +++ b/tests/manual/qlocale/calendar.h @@ -41,7 +41,17 @@ #ifndef CALENDAR_H #define CALENDAR_H -#include <QtWidgets> +#include <QWidget> +#include <QDate> +#include <QLocale> + +class QComboBox; +class QGridLayout; +class QGroupBox; +class QCalendarWidget; +class QLabel; +class QDateEdit; +class QCheckBox; class CalendarWidget : public QWidget { diff --git a/tests/manual/qlocale/currency.cpp b/tests/manual/qlocale/currency.cpp index 46d1cd9b29..5be527ae91 100644 --- a/tests/manual/qlocale/currency.cpp +++ b/tests/manual/qlocale/currency.cpp @@ -39,6 +39,10 @@ ****************************************************************************/ #include "currency.h" +#include <QLineEdit> +#include <QLabel> +#include <QHBoxLayout> +#include <QLocale> CurrencyWidget::CurrencyWidget() { diff --git a/tests/manual/qlocale/currency.h b/tests/manual/qlocale/currency.h index 5185a35983..b81a67e51e 100644 --- a/tests/manual/qlocale/currency.h +++ b/tests/manual/qlocale/currency.h @@ -41,7 +41,11 @@ #ifndef CURRENCY_H #define CURRENCY_H -#include <QtWidgets> +#include <QWidget> +#include <QLocale> + +class QLabel; +class QLineEdit; class CurrencyWidget : public QWidget { diff --git a/tests/manual/qlocale/dateformats.cpp b/tests/manual/qlocale/dateformats.cpp index ffdef0993f..3b523ca863 100644 --- a/tests/manual/qlocale/dateformats.cpp +++ b/tests/manual/qlocale/dateformats.cpp @@ -40,6 +40,13 @@ #include "dateformats.h" +#include <QLineEdit> +#include <QScrollArea> +#include <QGridLayout> +#include <QComboBox> +#include <QLabel> +#include <QDateTime> + DateFormatsWidget::DateFormatsWidget() { scrollArea = new QScrollArea; diff --git a/tests/manual/qlocale/dateformats.h b/tests/manual/qlocale/dateformats.h index cd50e14cbc..ae3621403e 100644 --- a/tests/manual/qlocale/dateformats.h +++ b/tests/manual/qlocale/dateformats.h @@ -41,7 +41,13 @@ #ifndef DATEFORMATS_H #define DATEFORMATS_H -#include <QtWidgets> +#include <QWidget> +#include <QLocale> + +class QLineEdit; +class QScrollArea; +class QGridLayout; +class QComboBox; class DateFormatsWidget : public QWidget { diff --git a/tests/manual/qlocale/info.cpp b/tests/manual/qlocale/info.cpp index 229d167209..e3d392fd46 100644 --- a/tests/manual/qlocale/info.cpp +++ b/tests/manual/qlocale/info.cpp @@ -40,6 +40,12 @@ #include "info.h" +#include <QLineEdit> +#include <QScrollArea> +#include <QGridLayout> +#include <QLabel> +#include <QLocale> + InfoWidget::InfoWidget() { scrollArea = new QScrollArea; diff --git a/tests/manual/qlocale/info.h b/tests/manual/qlocale/info.h index 877151d53d..9657f3264c 100644 --- a/tests/manual/qlocale/info.h +++ b/tests/manual/qlocale/info.h @@ -41,7 +41,12 @@ #ifndef INFO_H #define INFO_H -#include <QtWidgets> +#include <QWidget> +#include <QLocale> + +class QLineEdit; +class QScrollArea; +class QGridLayout; class InfoWidget : public QWidget { diff --git a/tests/manual/qlocale/languages.cpp b/tests/manual/qlocale/languages.cpp index 9f285530b7..828b43ae62 100644 --- a/tests/manual/qlocale/languages.cpp +++ b/tests/manual/qlocale/languages.cpp @@ -40,6 +40,10 @@ #include "languages.h" +#include <QLabel> +#include <QListWidget> +#include <QHBoxLayout> + LanguagesWidget::LanguagesWidget() { QVBoxLayout *l = new QVBoxLayout(this); diff --git a/tests/manual/qlocale/languages.h b/tests/manual/qlocale/languages.h index b685bd04c3..57fbf456f3 100644 --- a/tests/manual/qlocale/languages.h +++ b/tests/manual/qlocale/languages.h @@ -41,7 +41,11 @@ #ifndef LANGUAGES_H #define LANGUAGES_H -#include <QtWidgets> +#include <QWidget> +#include <QLocale> + +class QLabel; +class QListWidget; class LanguagesWidget : public QWidget { diff --git a/tests/manual/qlocale/main.cpp b/tests/manual/qlocale/main.cpp index 0ca64d3d7c..cacc0c0181 100644 --- a/tests/manual/qlocale/main.cpp +++ b/tests/manual/qlocale/main.cpp @@ -38,7 +38,7 @@ ** ****************************************************************************/ -#include <QtWidgets> +#include <QApplication> #include "window.h" diff --git a/tests/manual/qlocale/miscellaneous.cpp b/tests/manual/qlocale/miscellaneous.cpp index 374ee588a4..62ebac09e4 100644 --- a/tests/manual/qlocale/miscellaneous.cpp +++ b/tests/manual/qlocale/miscellaneous.cpp @@ -40,6 +40,10 @@ #include "miscellaneous.h" +#include <QLineEdit> +#include <QVBoxLayout> +#include <QLabel> + MiscWidget::MiscWidget() { QGridLayout *l = new QGridLayout; diff --git a/tests/manual/qlocale/miscellaneous.h b/tests/manual/qlocale/miscellaneous.h index fe11ecd89b..29543a81e6 100644 --- a/tests/manual/qlocale/miscellaneous.h +++ b/tests/manual/qlocale/miscellaneous.h @@ -41,7 +41,11 @@ #ifndef MISCELLANEOUS_H #define MISCELLANEOUS_H -#include <QtWidgets> +#include <QWidget> +#include <QLocale> + +class QLineEdit; +class QLabel; class MiscWidget : public QWidget { diff --git a/tests/manual/qlocale/numberformats.cpp b/tests/manual/qlocale/numberformats.cpp index 3882009f81..edab69b48c 100644 --- a/tests/manual/qlocale/numberformats.cpp +++ b/tests/manual/qlocale/numberformats.cpp @@ -40,6 +40,12 @@ #include "numberformats.h" +#include <QGridLayout> +#include <QLabel> +#include <QLineEdit> +#include <QLocale> +#include <QVBoxLayout> + NumberFormatsWidget::NumberFormatsWidget() { QGridLayout *l = new QGridLayout; diff --git a/tests/manual/qlocale/numberformats.h b/tests/manual/qlocale/numberformats.h index dde5f1fa2c..2a91dd3f81 100644 --- a/tests/manual/qlocale/numberformats.h +++ b/tests/manual/qlocale/numberformats.h @@ -41,7 +41,11 @@ #ifndef NUMBERFORMATS_H #define NUMBERFORMATS_H -#include <QtWidgets> +#include <QWidget> +#include <QLocale> + +class QLineEdit; +class QLabel; class NumberFormatsWidget : public QWidget { diff --git a/tests/manual/qlocale/window.cpp b/tests/manual/qlocale/window.cpp index 9a2e3e3188..40d1316050 100644 --- a/tests/manual/qlocale/window.cpp +++ b/tests/manual/qlocale/window.cpp @@ -40,6 +40,13 @@ #include "window.h" +#include <QComboBox> +#include <QLocale> +#include <QLabel> +#include <QTabWidget> +#include <QHBoxLayout> +#include <QEvent> + Window::Window() { localeCombo = new QComboBox; diff --git a/tests/manual/qlocale/window.h b/tests/manual/qlocale/window.h index b7d3369e57..25b8de0ce5 100644 --- a/tests/manual/qlocale/window.h +++ b/tests/manual/qlocale/window.h @@ -41,7 +41,7 @@ #ifndef WINDOW_H #define WINDOW_H -#include <QtWidgets> +#include <QMainWindow> #include "calendar.h" #include "currency.h" @@ -51,6 +51,9 @@ #include "miscellaneous.h" #include "info.h" +class QLabel; +class QComboBox; + class Window : public QMainWindow { Q_OBJECT diff --git a/tests/manual/qtbug-8933/main.cpp b/tests/manual/qtbug-8933/main.cpp index 97dbafd059..75f36e54af 100644 --- a/tests/manual/qtbug-8933/main.cpp +++ b/tests/manual/qtbug-8933/main.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include <QtWidgets/QApplication> +#include <QApplication> #include "widget.h" int main(int argc, char *argv[]) diff --git a/tests/manual/qtouchevent/main.cpp b/tests/manual/qtouchevent/main.cpp index e0bd9ad063..7c1ed81c37 100644 --- a/tests/manual/qtouchevent/main.cpp +++ b/tests/manual/qtouchevent/main.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include <QtWidgets> +#include <QApplication> #include <QtTest> #include "ui_form.h" @@ -55,6 +55,7 @@ public: { setAttribute(Qt::WA_QuitOnClose, false); setupUi(this); + setWindowTitle(QT_VERSION_STR); } void closeEvent(QCloseEvent *event) diff --git a/tests/manual/qtouchevent/qtouchevent.pro b/tests/manual/qtouchevent/qtouchevent.pro index aa4339f693..6a1ca85335 100644 --- a/tests/manual/qtouchevent/qtouchevent.pro +++ b/tests/manual/qtouchevent/qtouchevent.pro @@ -1,4 +1,5 @@ -QT += widgets testlib +QT += testlib +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets SOURCES = main.cpp \ touchwidget.cpp FORMS += form.ui diff --git a/tests/manual/qwidget_zorder/main.cpp b/tests/manual/qwidget_zorder/main.cpp index 7697cc1794..7773ecef9c 100644 --- a/tests/manual/qwidget_zorder/main.cpp +++ b/tests/manual/qwidget_zorder/main.cpp @@ -39,7 +39,11 @@ ** ****************************************************************************/ -#include <QtWidgets> +#include <QApplication> +#include <QPushButton> +#include <QPlainTextEdit> +#include <QCalendarWidget> +#include <QVBoxLayout> class Widget : public QWidget { diff --git a/tests/manual/repaint/mainwindow/main.cpp b/tests/manual/repaint/mainwindow/main.cpp index eb3096a59c..abf5857afc 100644 --- a/tests/manual/repaint/mainwindow/main.cpp +++ b/tests/manual/repaint/mainwindow/main.cpp @@ -39,7 +39,14 @@ ** ****************************************************************************/ -#include <QtWidgets> +#include <QApplication> +#include <QMainWindow> +#include <QToolBar> +#include <QDockWidget> +#include <QStatusBar> +#include <QSpinBox> +#include <QAction> + #include "../shared/shared.h" int main(int argc, char **argv) diff --git a/tests/manual/repaint/scrollarea/main.cpp b/tests/manual/repaint/scrollarea/main.cpp index 6102ab8ee8..dbe5cab893 100644 --- a/tests/manual/repaint/scrollarea/main.cpp +++ b/tests/manual/repaint/scrollarea/main.cpp @@ -39,7 +39,10 @@ ** ****************************************************************************/ -#include <QtWidgets> +#include <QApplication> +#include <QMainWindow> +#include <QScrollArea> + #include "../shared/shared.h" int main(int argc, char **argv) diff --git a/tests/manual/repaint/shared/shared.h b/tests/manual/repaint/shared/shared.h index 8cc5a61aca..8550e6e907 100644 --- a/tests/manual/repaint/shared/shared.h +++ b/tests/manual/repaint/shared/shared.h @@ -39,7 +39,11 @@ ** ****************************************************************************/ -#include <QtWidgets> +#include <QWidget> +#include <QPainter> +#include <QMouseEvent> +#include <QDebug> + class StaticWidget : public QWidget { Q_OBJECT diff --git a/tests/manual/repaint/splitter/main.cpp b/tests/manual/repaint/splitter/main.cpp index 2c01053ae1..44f76eae2c 100644 --- a/tests/manual/repaint/splitter/main.cpp +++ b/tests/manual/repaint/splitter/main.cpp @@ -39,9 +39,12 @@ ** ****************************************************************************/ -#include <QtWidgets> #include "../shared/shared.h" +#include <QApplication> +#include <QMainWindow> +#include <QSplitter> + int main(int argc, char **argv) { QApplication app(argc, argv); diff --git a/tests/manual/repaint/tableview/main.cpp b/tests/manual/repaint/tableview/main.cpp index 71f8209d6d..c26c1264d7 100644 --- a/tests/manual/repaint/tableview/main.cpp +++ b/tests/manual/repaint/tableview/main.cpp @@ -39,9 +39,13 @@ ** ****************************************************************************/ -#include <QtWidgets> #include "../shared/shared.h" +#include <QApplication> +#include <QMainWindow> +#include <QTableWidget> +#include <QPaintEvent> + class CellWidget : public QWidget { public: diff --git a/tests/manual/repaint/task141091/main.cpp b/tests/manual/repaint/task141091/main.cpp index b5b6ae92d7..d8a37299be 100644 --- a/tests/manual/repaint/task141091/main.cpp +++ b/tests/manual/repaint/task141091/main.cpp @@ -39,7 +39,9 @@ ** ****************************************************************************/ -#include <QtWidgets> +#include <QApplication> +#include <QMainWindow> +#include <QPaintEvent> #include <QDebug> class MyWidget : public QWidget diff --git a/tests/manual/repaint/toplevel/main.cpp b/tests/manual/repaint/toplevel/main.cpp index 006da2635f..fd2902f21b 100644 --- a/tests/manual/repaint/toplevel/main.cpp +++ b/tests/manual/repaint/toplevel/main.cpp @@ -39,9 +39,10 @@ ** ****************************************************************************/ -#include <QtWidgets> #include "../shared/shared.h" +#include <QApplication> + int main(int argc, char **argv) { QApplication app(argc, argv); diff --git a/tests/manual/repaint/widget/main.cpp b/tests/manual/repaint/widget/main.cpp index 22011a160c..e2370abf3e 100644 --- a/tests/manual/repaint/widget/main.cpp +++ b/tests/manual/repaint/widget/main.cpp @@ -39,9 +39,11 @@ ** ****************************************************************************/ -#include <QtWidgets> #include "../shared/shared.h" +#include <QApplication> +#include <QPushButton> + class Child : public StaticWidget { Q_OBJECT diff --git a/tests/manual/textrendering/glyphshaping/main.cpp b/tests/manual/textrendering/glyphshaping/main.cpp index 21e57152dd..e7720522fb 100644 --- a/tests/manual/textrendering/glyphshaping/main.cpp +++ b/tests/manual/textrendering/glyphshaping/main.cpp @@ -39,7 +39,15 @@ ** ****************************************************************************/ -#include <QtWidgets> +#include <QApplication> +#include <QStringList> +#include <QVector> +#include <QFile> +#include <QDir> +#include <QPainter> +#include <QFontMetrics> +#include <QImage> +#include <QXmlStreamReader> static const int fontPixelSize = 25; static const QLatin1String fontFamily("Series 60 Sans"); diff --git a/tests/manual/textrendering/textperformance/main.cpp b/tests/manual/textrendering/textperformance/main.cpp index 7d02c8c03b..373102436c 100644 --- a/tests/manual/textrendering/textperformance/main.cpp +++ b/tests/manual/textrendering/textperformance/main.cpp @@ -39,7 +39,12 @@ ** ****************************************************************************/ -#include <QtWidgets> +#include <QApplication> +#include <QDialog> +#include <QFontDatabase> +#include <QPainter> +#include <QTime> +#include <QTimer> static const int lastMeasurementsCount = 50; diff --git a/tests/manual/widgets/itemviews/delegate/example.cpp b/tests/manual/widgets/itemviews/delegate/example.cpp index ae45561f03..c65f49f266 100644 --- a/tests/manual/widgets/itemviews/delegate/example.cpp +++ b/tests/manual/widgets/itemviews/delegate/example.cpp @@ -39,7 +39,12 @@ ** ****************************************************************************/ -#include <QtWidgets/QtWidgets> +#include <QLineEdit> +#include <QApplication> +#include <QTableView> +#include <QStandardItemModel> +#include <QItemDelegate> +#include <QDebug> class ExampleEditor : public QLineEdit { diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 55ac3d997a..b9d50d62c4 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -172,7 +172,7 @@ Configure::Configure(int& argc, char** argv) QTextStream stream(&syncqt_bat); stream << "@echo off" << endl << "call " << QDir::toNativeSeparators(sourcePath + "/bin/syncqt.bat") - << " -mkspecsdir \"" << QDir::toNativeSeparators(buildPath) << "/mkspecs\" %*" << endl; + << " %*" << endl; syncqt_bat.close(); } } @@ -2032,7 +2032,8 @@ bool Configure::checkAvailability(const QString &part) else if (part == "ICU") available = findFile("unicode/utypes.h") && findFile("unicode/ucol.h") && findFile("unicode/ustring.h") - && (findFile("icuin.lib") || findFile("libicuin.lib")); // libicun.lib if compiled with mingw + && (findFile("icuin.lib") || findFile("sicuin.lib") + || findFile("libicuin.lib") || findFile("libsicuin.lib")); // "lib" prefix for mingw, 's' prefix for static else if (part == "ANGLE") { available = checkAngleAvailability(); @@ -2141,6 +2142,8 @@ bool Configure::checkAvailability(const QString &part) */ void Configure::autoDetection() { + cout << "Running configuration tests..." << endl; + if (dictionary["C++11"] == "auto") { if (!dictionary["QMAKESPEC"].contains("msvc")) dictionary["C++11"] = tryCompileProject("common/c++11") ? "yes" : "no"; |