summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.qmake.conf2
-rw-r--r--configure.json1
-rw-r--r--mkspecs/common/ios/clang.conf29
-rw-r--r--mkspecs/common/uikit.conf2
-rw-r--r--mkspecs/common/uikit/clang.conf7
-rw-r--r--mkspecs/common/uikit/qmake.conf (renamed from mkspecs/common/ios/qmake.conf)2
-rw-r--r--mkspecs/features/qt.prf4
-rw-r--r--mkspecs/features/qt_functions.prf6
-rw-r--r--mkspecs/features/resolve_target.prf12
-rw-r--r--mkspecs/macx-clang-32/qmake.conf10
-rw-r--r--mkspecs/macx-clang/qmake.conf4
-rw-r--r--mkspecs/macx-g++-32/qmake.conf8
-rw-r--r--mkspecs/macx-g++/qmake.conf4
-rw-r--r--mkspecs/macx-g++40/Info.plist.app22
-rw-r--r--mkspecs/macx-g++40/Info.plist.dSYM.in18
-rw-r--r--mkspecs/macx-g++40/Info.plist.lib22
-rw-r--r--mkspecs/macx-g++40/qmake.conf27
-rw-r--r--mkspecs/macx-g++40/qplatformdefs.h41
-rw-r--r--mkspecs/macx-g++42/Info.plist.app22
-rw-r--r--mkspecs/macx-g++42/Info.plist.dSYM.in18
-rw-r--r--mkspecs/macx-g++42/Info.plist.lib22
-rw-r--r--mkspecs/macx-g++42/qmake.conf27
-rw-r--r--mkspecs/macx-g++42/qplatformdefs.h41
-rw-r--r--mkspecs/macx-ios-clang/qmake.conf4
-rw-r--r--mkspecs/macx-llvm/Info.plist.app22
-rw-r--r--mkspecs/macx-llvm/Info.plist.dSYM.in18
-rw-r--r--mkspecs/macx-llvm/Info.plist.lib22
-rw-r--r--mkspecs/macx-llvm/qmake.conf26
-rw-r--r--mkspecs/macx-llvm/qplatformdefs.h41
-rw-r--r--mkspecs/macx-tvos-clang/qmake.conf6
-rw-r--r--mkspecs/macx-watchos-clang/qmake.conf6
-rw-r--r--qmake/generators/mac/pbuilder_pbx.cpp16
-rw-r--r--qmake/generators/unix/unixmake.cpp9
-rw-r--r--qmake/generators/unix/unixmake2.cpp102
-rw-r--r--src/3rdparty/harfbuzz-ng/harfbuzz-ng.pro12
-rw-r--r--src/corelib/io/qdatastream.h5
-rw-r--r--src/network/access/qnetworkaccessbackend_p.h1
-rw-r--r--src/network/kernel/kernel.pri3
-rw-r--r--src/platformsupport/fontdatabases/fontdatabases.pri2
-rw-r--r--src/platformsupport/fontdatabases/mac/coretext.pri10
-rw-r--r--src/widgets/accessible/simplewidgets.cpp12
-rw-r--r--src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp10
-rw-r--r--tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp252
-rw-r--r--tests/auto/other/atwrapper/.gitignore1
-rw-r--r--tests/auto/other/atwrapper/TODO17
-rw-r--r--tests/auto/other/atwrapper/atWrapper.cpp636
-rw-r--r--tests/auto/other/atwrapper/atWrapper.h80
-rw-r--r--tests/auto/other/atwrapper/atWrapper.pro21
-rw-r--r--tests/auto/other/atwrapper/atWrapperAutotest.cpp65
-rw-r--r--tests/auto/other/atwrapper/desert.ini14
-rw-r--r--tests/auto/other/atwrapper/ephron.ini14
-rw-r--r--tests/auto/other/atwrapper/gullgubben.ini12
-rw-r--r--tests/auto/other/atwrapper/honshu.ini16
-rw-r--r--tests/auto/other/atwrapper/kramer.ini12
-rw-r--r--tests/auto/other/atwrapper/scruffy.ini15
-rw-r--r--tests/auto/other/atwrapper/spareribs.ini14
-rw-r--r--tests/auto/other/atwrapper/titan.ini13
-rw-r--r--tests/auto/other/other.pro1
58 files changed, 299 insertions, 1562 deletions
diff --git a/.qmake.conf b/.qmake.conf
index 8c302d7039..6d42bbdd34 100644
--- a/.qmake.conf
+++ b/.qmake.conf
@@ -4,4 +4,4 @@ CONFIG += warning_clean
QT_SOURCE_TREE = $$PWD
QT_BUILD_TREE = $$shadowed($$PWD)
-MODULE_VERSION = 5.8.0
+MODULE_VERSION = 5.9.0
diff --git a/configure.json b/configure.json
index 294299d82f..531b6e1f67 100644
--- a/configure.json
+++ b/configure.json
@@ -2115,6 +2115,7 @@
},
"widgets": {
"description": "Qt Widgets",
+ "autoDetect": "!config.tvos && !config.watchos",
"condition": "features.gui",
"output": [
"privateFeature",
diff --git a/mkspecs/common/ios/clang.conf b/mkspecs/common/ios/clang.conf
deleted file mode 100644
index f45b89665f..0000000000
--- a/mkspecs/common/ios/clang.conf
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# compiler settings for iOS clang compilers
-#
-
-# iOS build flags
-QMAKE_IOS_CFLAGS += -fvisibility=hidden -fpascal-strings -fmessage-length=0
-QMAKE_IOS_CFLAGS += -Wno-trigraphs -Wreturn-type -Wparentheses -Wswitch -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-shorten-64-to-32 -Wno-sign-conversion
-QMAKE_IOS_CXXFLAGS += -fvisibility-inlines-hidden
-
-# 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
-
-# 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
-
-# Set build flags
-QMAKE_CFLAGS += $$QMAKE_IOS_CFLAGS
-QMAKE_CXXFLAGS += $$QMAKE_IOS_CFLAGS $$QMAKE_IOS_CXXFLAGS
-QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_IOS_OBJ_CFLAGS
-
-QMAKE_IOS_CFLAGS =
-QMAKE_IOS_CXXFLAGS =
-QMAKE_IOS_OBJ_CFLAGS =
diff --git a/mkspecs/common/uikit.conf b/mkspecs/common/uikit.conf
index edc0eddf00..6ffbe51fce 100644
--- a/mkspecs/common/uikit.conf
+++ b/mkspecs/common/uikit.conf
@@ -3,7 +3,7 @@
#
QMAKE_PLATFORM += uikit
-CONFIG += bitcode reduce_exports
+CONFIG += bitcode reduce_exports shallow_bundle
INCLUDEPATH += $$PWD/uikit
DEFINES += DARWIN_NO_CARBON QT_NO_PRINTER QT_NO_PRINTDIALOG
diff --git a/mkspecs/common/uikit/clang.conf b/mkspecs/common/uikit/clang.conf
new file mode 100644
index 0000000000..6b9b7eea8e
--- /dev/null
+++ b/mkspecs/common/uikit/clang.conf
@@ -0,0 +1,7 @@
+#
+# compiler settings for iOS/tvOS/watchOS clang compilers
+#
+
+# 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_OBJECTIVE_CFLAGS += -fobjc-nonfragile-abi -fobjc-legacy-dispatch
diff --git a/mkspecs/common/ios/qmake.conf b/mkspecs/common/uikit/qmake.conf
index daf66ac5ea..e2e166cdad 100644
--- a/mkspecs/common/ios/qmake.conf
+++ b/mkspecs/common/uikit/qmake.conf
@@ -1,5 +1,5 @@
#
-# Common build settings for all iOS configurations
+# Common build settings for all iOS/tvOS/watchOS configurations
#
QT_QPA_DEFAULT_PLATFORM = ios
diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf
index 0c5f080ec1..7b669b902f 100644
--- a/mkspecs/features/qt.prf
+++ b/mkspecs/features/qt.prf
@@ -244,13 +244,13 @@ contains(qt_module_deps, qml): \
# copy qml files. this part is platform spesific.
mac {
- osx {
+ !shallow_bundle {
# Note: user can override QMAKE_BUNDLE_QML from pro file to change target bundle path
isEmpty(QMAKE_QML_BUNDLE_PATH):QMAKE_QML_BUNDLE_PATH = "Resources/qt_qml"
qmlTargetPath = $$OUT_PWD/$${TARGET}.app/Contents/$$QMAKE_QML_BUNDLE_PATH
qtconfTargetPath = $$OUT_PWD/$${TARGET}.app/Contents/Resources/qt.conf
} else {
- # iOS: flat bundle layout (no Contents/Resources)
+ # shallow bundle layout (no Contents/Resources)
isEmpty(QMAKE_QML_BUNDLE_PATH):QMAKE_QML_BUNDLE_PATH = "qt_qml"
qmlTargetPath = $CODESIGNING_FOLDER_PATH/$$QMAKE_QML_BUNDLE_PATH
qtconfTargetPath = $CODESIGNING_FOLDER_PATH/qt.conf
diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
index 08c7c9f899..e7d73adefb 100644
--- a/mkspecs/features/qt_functions.prf
+++ b/mkspecs/features/qt_functions.prf
@@ -37,11 +37,13 @@ defineReplace(qtRelativeRPathBase) {
darwin {
if(equals(TEMPLATE, app):app_bundle)|\
if(equals(TEMPLATE, lib):plugin:plugin_bundle) {
- ios: return($$target.path/$${TARGET}.app)
+ shallow_bundle: return($$target.path/$${TARGET}.app)
return($$target.path/$${TARGET}.app/Contents/MacOS)
}
- equals(TEMPLATE, lib):!plugin:lib_bundle: \
+ equals(TEMPLATE, lib):!plugin:lib_bundle {
+ shallow_bundle: return($$target.path/$${TARGET}.framework)
return($$target.path/$${TARGET}.framework/Versions/Current)
+ }
}
return($$target.path)
}
diff --git a/mkspecs/features/resolve_target.prf b/mkspecs/features/resolve_target.prf
index 629a02a4f3..8678c33ecd 100644
--- a/mkspecs/features/resolve_target.prf
+++ b/mkspecs/features/resolve_target.prf
@@ -32,7 +32,17 @@ win32 {
mac {
equals(TEMPLATE, lib) {
- lib_bundle {
+ plugin:plugin_bundle {
+ !isEmpty(QMAKE_PLUGIN_BUNDLE_NAME): \
+ plugin_target = $$QMAKE_PLUGIN_BUNDLE_NAME
+ else: \
+ plugin_target = $$TARGET
+ QMAKE_RESOLVED_BUNDLE = $${QMAKE_RESOLVED_TARGET}$${plugin_target}.plugin
+ !shallow_bundle: \
+ QMAKE_RESOLVED_TARGET = $${QMAKE_RESOLVED_BUNDLE}/Contents/MacOS/$${TARGET}
+ else: \
+ QMAKE_RESOLVED_TARGET = $${QMAKE_RESOLVED_BUNDLE}$${TARGET}
+ } else: !plugin:lib_bundle {
!isEmpty(QMAKE_FRAMEWORK_BUNDLE_NAME): \
framework_target = $$QMAKE_FRAMEWORK_BUNDLE_NAME
else: \
diff --git a/mkspecs/macx-clang-32/qmake.conf b/mkspecs/macx-clang-32/qmake.conf
index ba3c7cab6c..9e3f28b477 100644
--- a/mkspecs/macx-clang-32/qmake.conf
+++ b/mkspecs/macx-clang-32/qmake.conf
@@ -2,15 +2,15 @@
# qmake configuration for 32-bit Clang on OS X
#
-include(../common/macx.conf)
-include(../common/gcc-base-mac.conf)
-include(../common/clang.conf)
-include(../common/clang-mac.conf)
-
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.9
QMAKE_CFLAGS += -arch i386
QMAKE_CXXFLAGS += -arch i386
QMAKE_LFLAGS += -arch i386
+include(../common/macx.conf)
+include(../common/gcc-base-mac.conf)
+include(../common/clang.conf)
+include(../common/clang-mac.conf)
+
load(qt_config)
diff --git a/mkspecs/macx-clang/qmake.conf b/mkspecs/macx-clang/qmake.conf
index 4d56d771a1..b78f249f65 100644
--- a/mkspecs/macx-clang/qmake.conf
+++ b/mkspecs/macx-clang/qmake.conf
@@ -2,11 +2,11 @@
# qmake configuration for Clang on OS X
#
+QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.9
+
include(../common/macx.conf)
include(../common/gcc-base-mac.conf)
include(../common/clang.conf)
include(../common/clang-mac.conf)
-QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.9
-
load(qt_config)
diff --git a/mkspecs/macx-g++-32/qmake.conf b/mkspecs/macx-g++-32/qmake.conf
index 3cd707d537..ac3b99c24e 100644
--- a/mkspecs/macx-g++-32/qmake.conf
+++ b/mkspecs/macx-g++-32/qmake.conf
@@ -10,14 +10,14 @@ MAKEFILE_GENERATOR = UNIX
CONFIG += app_bundle incremental global_init_link_order lib_version_first
QMAKE_INCREMENTAL_STYLE = sublib
-include(../common/macx.conf)
-include(../common/gcc-base-mac.conf)
-include(../common/g++-macx.conf)
-
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.9
QMAKE_CFLAGS += -arch i386
QMAKE_CXXFLAGS += -arch i386
QMAKE_LFLAGS += -arch i386
+include(../common/macx.conf)
+include(../common/gcc-base-mac.conf)
+include(../common/g++-macx.conf)
+
load(qt_config)
diff --git a/mkspecs/macx-g++/qmake.conf b/mkspecs/macx-g++/qmake.conf
index 5b3105c668..880cc7d930 100644
--- a/mkspecs/macx-g++/qmake.conf
+++ b/mkspecs/macx-g++/qmake.conf
@@ -10,10 +10,10 @@ MAKEFILE_GENERATOR = UNIX
CONFIG += app_bundle incremental global_init_link_order lib_version_first
QMAKE_INCREMENTAL_STYLE = sublib
+QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.9
+
include(../common/macx.conf)
include(../common/gcc-base-mac.conf)
include(../common/g++-macx.conf)
-QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.9
-
load(qt_config)
diff --git a/mkspecs/macx-g++40/Info.plist.app b/mkspecs/macx-g++40/Info.plist.app
deleted file mode 100644
index 8e44bd7f60..0000000000
--- a/mkspecs/macx-g++40/Info.plist.app
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>NSPrincipalClass</key>
- <string>NSApplication</string>
- <key>CFBundleIconFile</key>
- <string>@ICON@</string>
- <key>CFBundlePackageType</key>
- <string>APPL</string>
- <key>CFBundleGetInfoString</key>
- <string>Created by Qt/QMake</string>
- <key>CFBundleSignature</key>
- <string>@TYPEINFO@</string>
- <key>CFBundleExecutable</key>
- <string>@EXECUTABLE@</string>
- <key>CFBundleIdentifier</key>
- <string>@BUNDLEIDENTIFIER@</string>
- <key>NOTE</key>
- <string>This file was generated by Qt/QMake.</string>
-</dict>
-</plist>
diff --git a/mkspecs/macx-g++40/Info.plist.dSYM.in b/mkspecs/macx-g++40/Info.plist.dSYM.in
deleted file mode 100644
index a8c8d0d4fb..0000000000
--- a/mkspecs/macx-g++40/Info.plist.dSYM.in
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version=\"1.0\" encoding=\"UTF-8\"?>
-<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
-<plist version=\"1.0\">
- <dict>
- <key>CFBundleIdentifier</key>
- <string>com.apple.xcode.dsym.$${BUNDLEIDENTIFIER}</string>
- <key>CFBundlePackageType</key>
- <string>dSYM</string>
- <key>CFBundleSignature</key>
- <string>????</string>
-!!IF !isEmpty(VERSION)
- <key>CFBundleShortVersionString</key>
- <string>$${VER_MAJ}.$${VER_MIN}</string>
- <key>CFBundleVersion</key>
- <string>$${VER_MAJ}.$${VER_MIN}.$${VER_PAT}</string>
-!!ENDIF
- </dict>
-</plist>
diff --git a/mkspecs/macx-g++40/Info.plist.lib b/mkspecs/macx-g++40/Info.plist.lib
deleted file mode 100644
index 7cbdb9af12..0000000000
--- a/mkspecs/macx-g++40/Info.plist.lib
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundlePackageType</key>
- <string>FMWK</string>
- <key>CFBundleShortVersionString</key>
- <string>@SHORT_VERSION@</string>
- <key>CFBundleVersion</key>
- <string>@FULL_VERSION@</string>
- <key>CFBundleGetInfoString</key>
- <string>Created by Qt/QMake</string>
- <key>CFBundleSignature</key>
- <string>@TYPEINFO@</string>
- <key>CFBundleExecutable</key>
- <string>@LIBRARY@</string>
- <key>CFBundleIdentifier</key>
- <string>@BUNDLEIDENTIFIER@</string>
- <key>NOTE</key>
- <string>Please, do NOT change this file -- It was generated by Qt/QMake.</string>
-</dict>
-</plist>
diff --git a/mkspecs/macx-g++40/qmake.conf b/mkspecs/macx-g++40/qmake.conf
deleted file mode 100644
index 308cc2007c..0000000000
--- a/mkspecs/macx-g++40/qmake.conf
+++ /dev/null
@@ -1,27 +0,0 @@
-#macx-g++ (different from g++.conf)
-
-#
-# qmake configuration for macx-g++
-#
-# OS X + command-line compiler
-#
-
-MAKEFILE_GENERATOR = UNIX
-CONFIG += app_bundle incremental global_init_link_order lib_version_first
-QMAKE_INCREMENTAL_STYLE = sublib
-
-include(../common/macx.conf)
-include(../common/gcc-base-mac.conf)
-include(../common/g++-macx.conf)
-
-QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.9
-
-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
-
-load(qt_config)
diff --git a/mkspecs/macx-g++40/qplatformdefs.h b/mkspecs/macx-g++40/qplatformdefs.h
deleted file mode 100644
index 063491dd90..0000000000
--- a/mkspecs/macx-g++40/qplatformdefs.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec 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 The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "../common/mac/qplatformdefs.h"
-
diff --git a/mkspecs/macx-g++42/Info.plist.app b/mkspecs/macx-g++42/Info.plist.app
deleted file mode 100644
index 8e44bd7f60..0000000000
--- a/mkspecs/macx-g++42/Info.plist.app
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>NSPrincipalClass</key>
- <string>NSApplication</string>
- <key>CFBundleIconFile</key>
- <string>@ICON@</string>
- <key>CFBundlePackageType</key>
- <string>APPL</string>
- <key>CFBundleGetInfoString</key>
- <string>Created by Qt/QMake</string>
- <key>CFBundleSignature</key>
- <string>@TYPEINFO@</string>
- <key>CFBundleExecutable</key>
- <string>@EXECUTABLE@</string>
- <key>CFBundleIdentifier</key>
- <string>@BUNDLEIDENTIFIER@</string>
- <key>NOTE</key>
- <string>This file was generated by Qt/QMake.</string>
-</dict>
-</plist>
diff --git a/mkspecs/macx-g++42/Info.plist.dSYM.in b/mkspecs/macx-g++42/Info.plist.dSYM.in
deleted file mode 100644
index a8c8d0d4fb..0000000000
--- a/mkspecs/macx-g++42/Info.plist.dSYM.in
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version=\"1.0\" encoding=\"UTF-8\"?>
-<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
-<plist version=\"1.0\">
- <dict>
- <key>CFBundleIdentifier</key>
- <string>com.apple.xcode.dsym.$${BUNDLEIDENTIFIER}</string>
- <key>CFBundlePackageType</key>
- <string>dSYM</string>
- <key>CFBundleSignature</key>
- <string>????</string>
-!!IF !isEmpty(VERSION)
- <key>CFBundleShortVersionString</key>
- <string>$${VER_MAJ}.$${VER_MIN}</string>
- <key>CFBundleVersion</key>
- <string>$${VER_MAJ}.$${VER_MIN}.$${VER_PAT}</string>
-!!ENDIF
- </dict>
-</plist>
diff --git a/mkspecs/macx-g++42/Info.plist.lib b/mkspecs/macx-g++42/Info.plist.lib
deleted file mode 100644
index 7cbdb9af12..0000000000
--- a/mkspecs/macx-g++42/Info.plist.lib
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundlePackageType</key>
- <string>FMWK</string>
- <key>CFBundleShortVersionString</key>
- <string>@SHORT_VERSION@</string>
- <key>CFBundleVersion</key>
- <string>@FULL_VERSION@</string>
- <key>CFBundleGetInfoString</key>
- <string>Created by Qt/QMake</string>
- <key>CFBundleSignature</key>
- <string>@TYPEINFO@</string>
- <key>CFBundleExecutable</key>
- <string>@LIBRARY@</string>
- <key>CFBundleIdentifier</key>
- <string>@BUNDLEIDENTIFIER@</string>
- <key>NOTE</key>
- <string>Please, do NOT change this file -- It was generated by Qt/QMake.</string>
-</dict>
-</plist>
diff --git a/mkspecs/macx-g++42/qmake.conf b/mkspecs/macx-g++42/qmake.conf
deleted file mode 100644
index b24cb7f3f3..0000000000
--- a/mkspecs/macx-g++42/qmake.conf
+++ /dev/null
@@ -1,27 +0,0 @@
-#macx-g++ (different from g++.conf)
-
-#
-# qmake configuration for macx-g++
-#
-# OS X + command-line compiler
-#
-
-MAKEFILE_GENERATOR = UNIX
-CONFIG += app_bundle incremental global_init_link_order lib_version_first
-QMAKE_INCREMENTAL_STYLE = sublib
-
-include(../common/macx.conf)
-include(../common/gcc-base-mac.conf)
-include(../common/g++-macx.conf)
-
-QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.9
-
-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
-
-load(qt_config)
diff --git a/mkspecs/macx-g++42/qplatformdefs.h b/mkspecs/macx-g++42/qplatformdefs.h
deleted file mode 100644
index 063491dd90..0000000000
--- a/mkspecs/macx-g++42/qplatformdefs.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec 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 The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "../common/mac/qplatformdefs.h"
-
diff --git a/mkspecs/macx-ios-clang/qmake.conf b/mkspecs/macx-ios-clang/qmake.conf
index 94eff0d237..a119ca6fa2 100644
--- a/mkspecs/macx-ios-clang/qmake.conf
+++ b/mkspecs/macx-ios-clang/qmake.conf
@@ -14,7 +14,7 @@ include(../common/ios.conf)
include(../common/gcc-base-mac.conf)
include(../common/clang.conf)
include(../common/clang-mac.conf)
-include(../common/ios/clang.conf)
-include(../common/ios/qmake.conf)
+include(../common/uikit/clang.conf)
+include(../common/uikit/qmake.conf)
load(qt_config)
diff --git a/mkspecs/macx-llvm/Info.plist.app b/mkspecs/macx-llvm/Info.plist.app
deleted file mode 100644
index 8e44bd7f60..0000000000
--- a/mkspecs/macx-llvm/Info.plist.app
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>NSPrincipalClass</key>
- <string>NSApplication</string>
- <key>CFBundleIconFile</key>
- <string>@ICON@</string>
- <key>CFBundlePackageType</key>
- <string>APPL</string>
- <key>CFBundleGetInfoString</key>
- <string>Created by Qt/QMake</string>
- <key>CFBundleSignature</key>
- <string>@TYPEINFO@</string>
- <key>CFBundleExecutable</key>
- <string>@EXECUTABLE@</string>
- <key>CFBundleIdentifier</key>
- <string>@BUNDLEIDENTIFIER@</string>
- <key>NOTE</key>
- <string>This file was generated by Qt/QMake.</string>
-</dict>
-</plist>
diff --git a/mkspecs/macx-llvm/Info.plist.dSYM.in b/mkspecs/macx-llvm/Info.plist.dSYM.in
deleted file mode 100644
index a8c8d0d4fb..0000000000
--- a/mkspecs/macx-llvm/Info.plist.dSYM.in
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version=\"1.0\" encoding=\"UTF-8\"?>
-<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
-<plist version=\"1.0\">
- <dict>
- <key>CFBundleIdentifier</key>
- <string>com.apple.xcode.dsym.$${BUNDLEIDENTIFIER}</string>
- <key>CFBundlePackageType</key>
- <string>dSYM</string>
- <key>CFBundleSignature</key>
- <string>????</string>
-!!IF !isEmpty(VERSION)
- <key>CFBundleShortVersionString</key>
- <string>$${VER_MAJ}.$${VER_MIN}</string>
- <key>CFBundleVersion</key>
- <string>$${VER_MAJ}.$${VER_MIN}.$${VER_PAT}</string>
-!!ENDIF
- </dict>
-</plist>
diff --git a/mkspecs/macx-llvm/Info.plist.lib b/mkspecs/macx-llvm/Info.plist.lib
deleted file mode 100644
index 7cbdb9af12..0000000000
--- a/mkspecs/macx-llvm/Info.plist.lib
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundlePackageType</key>
- <string>FMWK</string>
- <key>CFBundleShortVersionString</key>
- <string>@SHORT_VERSION@</string>
- <key>CFBundleVersion</key>
- <string>@FULL_VERSION@</string>
- <key>CFBundleGetInfoString</key>
- <string>Created by Qt/QMake</string>
- <key>CFBundleSignature</key>
- <string>@TYPEINFO@</string>
- <key>CFBundleExecutable</key>
- <string>@LIBRARY@</string>
- <key>CFBundleIdentifier</key>
- <string>@BUNDLEIDENTIFIER@</string>
- <key>NOTE</key>
- <string>Please, do NOT change this file -- It was generated by Qt/QMake.</string>
-</dict>
-</plist>
diff --git a/mkspecs/macx-llvm/qmake.conf b/mkspecs/macx-llvm/qmake.conf
deleted file mode 100644
index 0434d29b50..0000000000
--- a/mkspecs/macx-llvm/qmake.conf
+++ /dev/null
@@ -1,26 +0,0 @@
-#macx-g++ (different from g++.conf)
-
-#
-# qmake configuration for macx-g++
-#
-# OS X + command-line compiler
-#
-
-MAKEFILE_GENERATOR = UNIX
-CONFIG += app_bundle incremental global_init_link_order lib_version_first
-QMAKE_INCREMENTAL_STYLE = sublib
-
-include(../common/macx.conf)
-include(../common/gcc-base-mac.conf)
-include(../common/llvm.conf)
-
-QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.9
-
-QMAKE_XCODE_GCC_VERSION = com.apple.compilers.llvmgcc42
-
-QMAKE_OBJCFLAGS_PRECOMPILE = -x objective-c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
-QMAKE_OBJCFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
-QMAKE_OBJCXXFLAGS_PRECOMPILE = -x objective-c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
-QMAKE_OBJCXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
-
-load(qt_config)
diff --git a/mkspecs/macx-llvm/qplatformdefs.h b/mkspecs/macx-llvm/qplatformdefs.h
deleted file mode 100644
index 063491dd90..0000000000
--- a/mkspecs/macx-llvm/qplatformdefs.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake spec 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 The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/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 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "../common/mac/qplatformdefs.h"
-
diff --git a/mkspecs/macx-tvos-clang/qmake.conf b/mkspecs/macx-tvos-clang/qmake.conf
index f389382450..f622256eca 100644
--- a/mkspecs/macx-tvos-clang/qmake.conf
+++ b/mkspecs/macx-tvos-clang/qmake.conf
@@ -4,8 +4,6 @@
QMAKE_TVOS_DEPLOYMENT_TARGET = 9.1
-INCLUDEPATH += $$PWD/tvos
-
QMAKE_TVOS_TARGETED_DEVICE_FAMILY = 3
QMAKE_TVOS_DEVICE_ARCHS = arm64
@@ -15,7 +13,7 @@ include(../common/tvos.conf)
include(../common/gcc-base-mac.conf)
include(../common/clang.conf)
include(../common/clang-mac.conf)
-include(../common/ios/clang.conf)
-include(../common/ios/qmake.conf)
+include(../common/uikit/clang.conf)
+include(../common/uikit/qmake.conf)
load(qt_config)
diff --git a/mkspecs/macx-watchos-clang/qmake.conf b/mkspecs/macx-watchos-clang/qmake.conf
index bb9ab703b7..f01ef21cad 100644
--- a/mkspecs/macx-watchos-clang/qmake.conf
+++ b/mkspecs/macx-watchos-clang/qmake.conf
@@ -4,8 +4,6 @@
QMAKE_WATCHOS_DEPLOYMENT_TARGET = 2.2
-INCLUDEPATH += $$PWD/watchos
-
QMAKE_WATCHOS_TARGETED_DEVICE_FAMILY = 4
QMAKE_WATCHOS_DEVICE_ARCHS = armv7k
@@ -15,7 +13,7 @@ include(../common/watchos.conf)
include(../common/gcc-base-mac.conf)
include(../common/clang.conf)
include(../common/clang-mac.conf)
-include(../common/ios/clang.conf)
-include(../common/ios/qmake.conf)
+include(../common/uikit/clang.conf)
+include(../common/uikit/qmake.conf)
load(qt_config)
diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp
index bf2e774678..09581879ef 100644
--- a/qmake/generators/mac/pbuilder_pbx.cpp
+++ b/qmake/generators/mac/pbuilder_pbx.cpp
@@ -1123,9 +1123,9 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
bundle_resources_files << s;
} else {
QString phase_key = keyFor("QMAKE_PBX_BUNDLE_COPY." + bundle_data[i]);
- if (!project->isEmpty(ProKey(bundle_data[i] + ".version"))) {
- //###
- }
+ //if (!project->isActiveConfig("shallow_bundle")
+ // && !project->isEmpty(ProKey(bundle_data[i] + ".version"))) {
+ //}
project->values("QMAKE_PBX_BUILDPHASES").append(phase_key);
t << "\t\t" << phase_key << " = {\n"
@@ -1480,9 +1480,15 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
plist_in_text.replace(QLatin1String("@ICON@"),
(project->isEmpty("ICON") ? QString("") : project->first("ICON").toQString().section(Option::dir_sep, -1)));
if (project->first("TEMPLATE") == "app") {
- plist_in_text.replace(QLatin1String("@EXECUTABLE@"), project->first("QMAKE_ORIG_TARGET").toQString());
+ ProString app_bundle_name = project->first("QMAKE_APPLICATION_BUNDLE_NAME");
+ if (app_bundle_name.isEmpty())
+ app_bundle_name = project->first("QMAKE_ORIG_TARGET");
+ plist_in_text.replace(QLatin1String("@EXECUTABLE@"), app_bundle_name.toQString());
} else {
- plist_in_text.replace(QLatin1String("@LIBRARY@"), project->first("QMAKE_ORIG_TARGET").toQString());
+ ProString lib_bundle_name = project->first("QMAKE_FRAMEWORK_BUNDLE_NAME");
+ if (lib_bundle_name.isEmpty())
+ lib_bundle_name = project->first("QMAKE_ORIG_TARGET");
+ plist_in_text.replace(QLatin1String("@LIBRARY@"), lib_bundle_name.toQString());
}
QString bundlePrefix = project->first("QMAKE_TARGET_BUNDLE_PREFIX").toQString();
if (bundlePrefix.isEmpty())
diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp
index b0f7593fbe..0e29f469ef 100644
--- a/qmake/generators/unix/unixmake.cpp
+++ b/qmake/generators/unix/unixmake.cpp
@@ -579,10 +579,13 @@ UnixMakefileGenerator::defaultInstall(const QString &t)
plain_targ = escapeFilePath(plain_targ);
if (bundle != NoBundle) {
QString suffix;
- if (project->first("TEMPLATE") == "lib")
- suffix = "/Versions/" + project->first("QMAKE_FRAMEWORK_VERSION") + "/$(TARGET)";
- else
+ if (project->first("TEMPLATE") == "lib") {
+ if (!project->isActiveConfig("shallow_bundle"))
+ suffix += "/Versions/" + project->first("QMAKE_FRAMEWORK_VERSION");
+ suffix += "/$(TARGET)";
+ } else {
suffix = "/" + project->first("QMAKE_BUNDLE_LOCATION") + "/$(QMAKE_TARGET)";
+ }
dst_targ += suffix;
if (bundle == SolidBundle) {
if (!ret.isEmpty())
diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp
index d437a0782b..433731cc4b 100644
--- a/qmake/generators/unix/unixmake2.cpp
+++ b/qmake/generators/unix/unixmake2.cpp
@@ -596,9 +596,10 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
<< var("QMAKE_LINK_SHLIB_CMD") << "\n\t"
<< mkdir_p_asstring("\"`dirname $(DESTDIR)$(TARGETD)`\"", false) << "\n\t"
<< "-$(MOVE) $(TARGET) $(DESTDIR)$(TARGETD)\n\t"
- << mkdir_p_asstring("\"`dirname $(DESTDIR)$(TARGET0)`\"", false) << "\n\t"
- << varGlue("QMAKE_LN_SHLIB", "-", " ",
- " Versions/Current/$(TARGET) $(DESTDIR)$(TARGET0)") << "\n\t";
+ << mkdir_p_asstring("\"`dirname $(DESTDIR)$(TARGET0)`\"", false) << "\n\t";
+ if (!project->isActiveConfig("shallow_bundle"))
+ t << varGlue("QMAKE_LN_SHLIB", "-", " ",
+ " Versions/Current/$(TARGET) $(DESTDIR)$(TARGET0)") << "\n\t";
if(!project->isEmpty("QMAKE_POST_LINK"))
t << "\n\t" << var("QMAKE_POST_LINK");
t << endl << endl;
@@ -777,10 +778,17 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
} else {
info_plist = escapeFilePath(fileFixify(info_plist));
}
- bool isFramework = project->first("TEMPLATE") == "lib" && project->isActiveConfig("lib_bundle");
+ bool isFramework = project->first("TEMPLATE") == "lib"
+ && !project->isActiveConfig("plugin")
+ && project->isActiveConfig("lib_bundle");
+ bool isShallowBundle = project->isActiveConfig("shallow_bundle");
QString info_plist_out = bundle_dir +
- (isFramework ? ("Versions/" + project->first("QMAKE_FRAMEWORK_VERSION") + "/Resources/Info.plist")
- : "Contents/Info.plist");
+ (!isShallowBundle
+ ? (isFramework
+ ? ("Versions/" + project->first("QMAKE_FRAMEWORK_VERSION") + "/Resources/")
+ : "Contents/")
+ : QString())
+ + "Info.plist";
bundledFiles << info_plist_out;
alldeps << info_plist_out;
QString destdir = info_plist_out.section(Option::dir_sep, 0, -2);
@@ -814,14 +822,22 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
commonSedArgs << "-e \"s,@BUNDLEIDENTIFIER@," << bundleIdentifier << ",g\" ";
if (!isFramework) {
+ ProString app_bundle_name = var("QMAKE_APPLICATION_BUNDLE_NAME");
+ if (app_bundle_name.isEmpty())
+ app_bundle_name = var("QMAKE_ORIG_TARGET");
+
+ ProString plugin_bundle_name = var("QMAKE_PLUGIN_BUNDLE_NAME");
+ if (plugin_bundle_name.isEmpty())
+ plugin_bundle_name = var("QMAKE_ORIG_TARGET");
+
QString icon = fileFixify(var("ICON"));
t << "@$(DEL_FILE) " << info_plist_out << "\n\t"
<< "@sed ";
for (const ProString &arg : qAsConst(commonSedArgs))
t << arg;
t << "-e \"s,@ICON@," << icon.section(Option::dir_sep, -1) << ",g\" "
- << "-e \"s,@EXECUTABLE@," << var("QMAKE_ORIG_TARGET") << ",g\" "
- << "-e \"s,@LIBRARY@," << var("QMAKE_ORIG_TARGET") << ",g\" "
+ << "-e \"s,@EXECUTABLE@," << app_bundle_name << ",g\" "
+ << "-e \"s,@LIBRARY@," << plugin_bundle_name << ",g\" "
<< "-e \"s,@TYPEINFO@,"<< (project->isEmpty("QMAKE_PKGINFO_TYPEINFO") ?
QString::fromLatin1("????") : project->first("QMAKE_PKGINFO_TYPEINFO").left(4)) << ",g\" "
<< "" << info_plist << " >" << info_plist_out << endl;
@@ -838,12 +854,17 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
<< "@$(COPY_FILE) " << escapeFilePath(icon) << ' ' << icon_path_f << endl;
}
} else {
- symlinks[bundle_dir + "Resources"] = "Versions/Current/Resources";
+ ProString lib_bundle_name = var("QMAKE_FRAMEWORK_BUNDLE_NAME");
+ if (lib_bundle_name.isEmpty())
+ lib_bundle_name = var("QMAKE_ORIG_TARGET");
+
+ if (!isShallowBundle)
+ symlinks[bundle_dir + "Resources"] = "Versions/Current/Resources";
t << "@$(DEL_FILE) " << info_plist_out << "\n\t"
<< "@sed ";
for (const ProString &arg : qAsConst(commonSedArgs))
t << arg;
- t << "-e \"s,@LIBRARY@," << var("QMAKE_ORIG_TARGET") << ",g\" "
+ t << "-e \"s,@LIBRARY@," << lib_bundle_name << ",g\" "
<< "-e \"s,@TYPEINFO@,"
<< (project->isEmpty("QMAKE_PKGINFO_TYPEINFO") ?
QString::fromLatin1("????") : project->first("QMAKE_PKGINFO_TYPEINFO").left(4)) << ",g\" "
@@ -857,18 +878,20 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
for(int i = 0; i < bundle_data.count(); i++) {
const ProStringList &files = project->values(ProKey(bundle_data[i] + ".files"));
QString path = bundle_dir;
- const ProKey vkey(bundle_data[i] + ".version");
const ProKey pkey(bundle_data[i] + ".path");
- if (!project->isEmpty(vkey)) {
- QString version = project->first(vkey) + "/" +
- project->first("QMAKE_FRAMEWORK_VERSION") + "/";
- ProString name = project->first(pkey);
- int pos = name.indexOf('/');
- if (pos > 0)
- name = name.mid(0, pos);
- symlinks[Option::fixPathToTargetOS(path + name)] =
- project->first(vkey) + "/Current/" + name;
- path += version;
+ if (!project->isActiveConfig("shallow_bundle")) {
+ const ProKey vkey(bundle_data[i] + ".version");
+ if (!project->isEmpty(vkey)) {
+ QString version = project->first(vkey) + "/" +
+ project->first("QMAKE_FRAMEWORK_VERSION") + "/";
+ ProString name = project->first(pkey);
+ int pos = name.indexOf('/');
+ if (pos > 0)
+ name = name.mid(0, pos);
+ symlinks[Option::fixPathToTargetOS(path + name)] =
+ project->first(vkey) + "/Current/" + name;
+ path += version;
+ }
}
path += project->first(pkey).toQString();
path = Option::fixPathToTargetOS(path);
@@ -906,15 +929,17 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
<< "@$(SYMLINK) " << escapeFilePath(symIt.value()) << ' ' << bundle_dir_f << endl;
}
- QString currentLink = bundle_dir + "Versions/Current";
- QString currentLink_f = escapeDependencyPath(currentLink);
- bundledFiles << currentLink;
- alldeps << currentLink;
- t << currentLink_f << ": $(MAKEFILE)\n\t"
- << mkdir_p_asstring(bundle_dir + "Versions") << "\n\t"
- << "@-$(DEL_FILE) " << currentLink_f << "\n\t"
- << "@$(SYMLINK) " << project->first("QMAKE_FRAMEWORK_VERSION")
- << ' ' << currentLink_f << endl;
+ if (!project->isActiveConfig("shallow_bundle")) {
+ QString currentLink = bundle_dir + "Versions/Current";
+ QString currentLink_f = escapeDependencyPath(currentLink);
+ bundledFiles << currentLink;
+ alldeps << currentLink;
+ t << currentLink_f << ": $(MAKEFILE)\n\t"
+ << mkdir_p_asstring(bundle_dir + "Versions") << "\n\t"
+ << "@-$(DEL_FILE) " << currentLink_f << "\n\t"
+ << "@$(SYMLINK) " << project->first("QMAKE_FRAMEWORK_VERSION")
+ << ' ' << currentLink_f << endl;
+ }
}
}
@@ -1157,12 +1182,17 @@ void UnixMakefileGenerator::init2()
bundle_loc.prepend("/");
if(!bundle_loc.endsWith("/"))
bundle_loc += "/";
- project->values("TARGET_").append(project->first("QMAKE_BUNDLE") +
- bundle_loc + project->first("TARGET"));
- project->values("TARGET_x.y").append(project->first("QMAKE_BUNDLE") +
- "/Versions/" +
- project->first("QMAKE_FRAMEWORK_VERSION") +
- bundle_loc + project->first("TARGET"));
+ const QString target = project->first("QMAKE_BUNDLE") +
+ bundle_loc + project->first("TARGET");
+ project->values("TARGET_").append(target);
+ if (!project->isActiveConfig("shallow_bundle")) {
+ project->values("TARGET_x.y").append(project->first("QMAKE_BUNDLE") +
+ "/Versions/" +
+ project->first("QMAKE_FRAMEWORK_VERSION") +
+ bundle_loc + project->first("TARGET"));
+ } else {
+ project->values("TARGET_x.y").append(target);
+ }
} else if(project->isActiveConfig("plugin")) {
QString prefix;
if(!project->isActiveConfig("no_plugin_name_prefix"))
diff --git a/src/3rdparty/harfbuzz-ng/harfbuzz-ng.pro b/src/3rdparty/harfbuzz-ng/harfbuzz-ng.pro
index 1bfeabb8c4..5ec86bf78f 100644
--- a/src/3rdparty/harfbuzz-ng/harfbuzz-ng.pro
+++ b/src/3rdparty/harfbuzz-ng/harfbuzz-ng.pro
@@ -11,7 +11,7 @@ load(qt_helper_lib)
SHAPERS += opentype # HB's main shaper; enabling it should be enough most of the time
# native shaper on Apple platforms; could be used alone to handle both OT and AAT fonts
-darwin:!if(watchos:CONFIG(simulator, simulator|device)): SHAPERS += coretext
+darwin: SHAPERS += coretext
DEFINES += HAVE_CONFIG_H
DEFINES += HB_NO_UNICODE_FUNCS HB_DISABLE_DEPRECATED
@@ -155,4 +155,14 @@ contains(SHAPERS, coretext) {
# On Mac OS they are part of the ApplicationServices umbrella framework,
# even in 10.8 where they were also made available stand-alone.
LIBS_PRIVATE += -framework ApplicationServices
+
+ # CoreText is documented to be available on watchOS, but the headers aren't present
+ # in the watchOS Simulator SDK like they are supposed to be. Work around the problem
+ # by adding the device SDK's headers to the search path as a fallback.
+ # rdar://25314492, rdar://27844864
+ watchos:CONFIG(simulator, simulator|device) {
+ QMAKE_CXXFLAGS += \
+ -F$$xcodeSDKInfo(Path, $${simulator.sdk})/System/Library/Frameworks \
+ -F$$xcodeSDKInfo(Path, $${device.sdk})/System/Library/Frameworks
+ }
}
diff --git a/src/corelib/io/qdatastream.h b/src/corelib/io/qdatastream.h
index ac58677b77..7ce4f0a92f 100644
--- a/src/corelib/io/qdatastream.h
+++ b/src/corelib/io/qdatastream.h
@@ -95,10 +95,11 @@ public:
Qt_5_6 = 17,
Qt_5_7 = Qt_5_6,
Qt_5_8 = Qt_5_7,
-#if QT_VERSION >= 0x050900
+ Qt_5_9 = Qt_5_8,
+#if QT_VERSION >= 0x050a00
#error Add the datastream version for this Qt version and update Qt_DefaultCompiledVersion
#endif
- Qt_DefaultCompiledVersion = Qt_5_8
+ Qt_DefaultCompiledVersion = Qt_5_9
};
enum ByteOrder {
diff --git a/src/network/access/qnetworkaccessbackend_p.h b/src/network/access/qnetworkaccessbackend_p.h
index 7f39c942a3..4b5422ce29 100644
--- a/src/network/access/qnetworkaccessbackend_p.h
+++ b/src/network/access/qnetworkaccessbackend_p.h
@@ -63,7 +63,6 @@ class QNetworkProxyQuery;
class QNetworkRequest;
class QStringList;
class QUrl;
-class QUrlInfo;
class QSslConfiguration;
class QNetworkAccessManagerPrivate;
diff --git a/src/network/kernel/kernel.pri b/src/network/kernel/kernel.pri
index 8f37e28669..7ef387beb4 100644
--- a/src/network/kernel/kernel.pri
+++ b/src/network/kernel/kernel.pri
@@ -57,8 +57,7 @@ win32: {
mac {
LIBS_PRIVATE += -framework CoreFoundation
- !uikit: LIBS_PRIVATE += -framework CoreServices
- !if(watchos:CONFIG(device, simulator|device)): LIBS_PRIVATE += -framework SystemConfiguration
+ !uikit: LIBS_PRIVATE += -framework CoreServices -framework SystemConfiguration
}
osx:SOURCES += kernel/qnetworkproxy_mac.cpp
diff --git a/src/platformsupport/fontdatabases/fontdatabases.pri b/src/platformsupport/fontdatabases/fontdatabases.pri
index f8e51f2a6d..1ea7f42204 100644
--- a/src/platformsupport/fontdatabases/fontdatabases.pri
+++ b/src/platformsupport/fontdatabases/fontdatabases.pri
@@ -1,4 +1,4 @@
-darwin:!if(watchos:CONFIG(simulator, simulator|device)) {
+darwin {
include($$PWD/mac/coretext.pri)
} else {
!win32|qtConfig(freetype) {
diff --git a/src/platformsupport/fontdatabases/mac/coretext.pri b/src/platformsupport/fontdatabases/mac/coretext.pri
index 4d19a59226..e1132cfcbe 100644
--- a/src/platformsupport/fontdatabases/mac/coretext.pri
+++ b/src/platformsupport/fontdatabases/mac/coretext.pri
@@ -14,3 +14,13 @@ else: \
# On Mac OS they are part of the ApplicationServices umbrella framework,
# even in 10.8 where they were also made available stand-alone.
LIBS_PRIVATE += -framework ApplicationServices
+
+# CoreText is documented to be available on watchOS, but the headers aren't present
+# in the watchOS Simulator SDK like they are supposed to be. Work around the problem
+# by adding the device SDK's headers to the search path as a fallback.
+# rdar://25314492, rdar://27844864
+watchos:CONFIG(simulator, simulator|device) {
+ QMAKE_CXXFLAGS += \
+ -F$$xcodeSDKInfo(Path, $${simulator.sdk})/System/Library/Frameworks \
+ -F$$xcodeSDKInfo(Path, $${device.sdk})/System/Library/Frameworks
+}
diff --git a/src/widgets/accessible/simplewidgets.cpp b/src/widgets/accessible/simplewidgets.cpp
index e6fda103fb..bd9f0c6e01 100644
--- a/src/widgets/accessible/simplewidgets.cpp
+++ b/src/widgets/accessible/simplewidgets.cpp
@@ -468,21 +468,15 @@ QVector<QPair<QAccessibleInterface*, QAccessible::Relation> >
QAccessibleDisplay::relations(QAccessible::Relation match /* = QAccessible::AllRelations */) const
{
QVector<QPair<QAccessibleInterface*, QAccessible::Relation> > rels = QAccessibleWidget::relations(match);
- if (match & QAccessible::Labelled) {
- QVarLengthArray<QObject *, 4> relatedObjects;
-
#ifndef QT_NO_SHORTCUT
+ if (match & QAccessible::Labelled) {
if (QLabel *label = qobject_cast<QLabel*>(object())) {
- relatedObjects.append(label->buddy());
- }
-#endif
- for (int i = 0; i < relatedObjects.count(); ++i) {
const QAccessible::Relation rel = QAccessible::Labelled;
- QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(relatedObjects.at(i));
- if (iface)
+ if (QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(label->buddy()))
rels.append(qMakePair(iface, rel));
}
}
+#endif
return rels;
}
diff --git a/src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp b/src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp
index 4c01219d87..02956b76f9 100644
--- a/src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp
+++ b/src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp
@@ -2575,10 +2575,12 @@ void QGraphicsAnchorLayoutPrivate::identifyFloatItems(const QSet<AnchorData *> &
for (const AnchorData *ad : visited)
identifyNonFloatItems_helper(ad, &nonFloating);
- QSet<QGraphicsLayoutItem *> allItems;
- foreach (QGraphicsLayoutItem *item, items)
- allItems.insert(item);
- m_floatItems[orientation] = allItems - nonFloating;
+ QSet<QGraphicsLayoutItem *> floatItems;
+ for (QGraphicsLayoutItem *item : qAsConst(items)) {
+ if (!nonFloating.contains(item))
+ floatItems.insert(item);
+ }
+ m_floatItems[orientation] = std::move(floatItems);
}
diff --git a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
index 43e05c95f9..61927862f7 100644
--- a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
@@ -104,10 +104,10 @@ class tst_QNetworkReply: public QObject
Q_OBJECT
#ifndef QT_NO_NETWORKPROXY
- struct ProxyData {
+ struct ProxyData
+ {
ProxyData(const QNetworkProxy &p, const QByteArray &t, bool auth)
- : tag(t), proxy(p), requiresAuthentication(auth)
- { }
+ : tag(t), proxy(p), requiresAuthentication(auth) {}
QByteArray tag;
QNetworkProxy proxy;
bool requiresAuthentication;
@@ -115,7 +115,8 @@ class tst_QNetworkReply: public QObject
#endif // !QT_NO_NETWORKPROXY
static bool seedCreated;
- static QString createUniqueExtension() {
+ static QString createUniqueExtension()
+ {
if (!seedCreated) {
qsrand(QTime(0,0,0).msecsTo(QTime::currentTime()) + QCoreApplication::applicationPid());
seedCreated = true; // not thread-safe, but who cares
@@ -534,7 +535,7 @@ QT_END_NAMESPACE
QString errorMsg = call; \
if (!errorMsg.isEmpty()) \
QFAIL(qPrintable(errorMsg)); \
- } while (0);
+ } while (0)
#ifndef QT_NO_SSL
static void setupSslServer(QSslSocket* serverSocket)
@@ -546,6 +547,7 @@ static void setupSslServer(QSslSocket* serverSocket)
serverSocket->setProtocol(QSsl::AnyProtocol);
serverSocket->setLocalCertificate(testDataDir + "/certs/server.pem");
serverSocket->setPrivateKey(testDataDir + "/certs/server.key");
+ serverSocket->startServerEncryption();
}
#endif
@@ -592,31 +594,30 @@ protected:
void incomingConnection(qintptr socketDescriptor)
{
//qDebug() << "incomingConnection" << socketDescriptor << "doSsl:" << doSsl << "ipv6:" << ipv6;
- if (!doSsl) {
- client = new QTcpSocket;
- client->setSocketDescriptor(socketDescriptor);
- connectSocketSignals();
- } else {
#ifndef QT_NO_SSL
- QSslSocket *serverSocket = new QSslSocket;
- serverSocket->setParent(this);
- if (serverSocket->setSocketDescriptor(socketDescriptor)) {
- connect(serverSocket, SIGNAL(sslErrors(QList<QSslError>)), this, SLOT(slotSslErrors(QList<QSslError>)));
- setupSslServer(serverSocket);
- serverSocket->startServerEncryption();
- client = serverSocket;
- connectSocketSignals();
- } else {
+ if (doSsl) {
+ QSslSocket *serverSocket = new QSslSocket(this);
+ if (!serverSocket->setSocketDescriptor(socketDescriptor)) {
delete serverSocket;
return;
}
+ connect(serverSocket, SIGNAL(sslErrors(QList<QSslError>)), this, SLOT(slotSslErrors(QList<QSslError>)));
+ // connect(serverSocket, &QSslSocket::encrypted, this, &SslServer::ready); ?
+ setupSslServer(serverSocket);
+ client = serverSocket;
+ } else
#endif
+ {
+ client = new QTcpSocket;
+ client->setSocketDescriptor(socketDescriptor);
}
+ connectSocketSignals();
client->setParent(this);
++totalConnections;
}
- virtual void reply() {
+ virtual void reply()
+ {
Q_ASSERT(!client.isNull());
// we need to emulate the bytesWrittenSlot call if the data is empty.
if (dataToTransmit.size() == 0) {
@@ -673,7 +674,8 @@ public slots:
}
}
- void bytesWrittenSlot() {
+ void bytesWrittenSlot()
+ {
Q_ASSERT(!client.isNull());
// Disconnect and delete in next cycle (else Windows clients will fail with RemoteHostClosedError).
if (doClose && client->bytesToWrite() == 0) {
@@ -918,7 +920,8 @@ class BlockingTcpServer : public QTcpServer
public:
BlockingTcpServer(bool ssl) : doSsl(ssl), sslSocket(0) {}
- QTcpSocket* waitForNextConnectionSocket() {
+ QTcpSocket* waitForNextConnectionSocket()
+ {
waitForNewConnection(-1);
if (doSsl) {
if (!sslSocket)
@@ -939,7 +942,6 @@ public:
serverSocket->setSocketDescriptor(socketDescriptor);
connect(serverSocket, SIGNAL(sslErrors(QList<QSslError>)), this, SLOT(slotSslErrors(QList<QSslError>)));
setupSslServer(serverSocket);
- serverSocket->startServerEncryption();
sslSocket = serverSocket;
} else
#endif
@@ -1420,14 +1422,12 @@ static QByteArray msgWaitForFinished(QNetworkReplyPtr &reply)
QString result;
QDebug debug(&result);
debug << reply->url();
- if (reply->isFinished()) {
- if (reply->error() == QNetworkReply::NoError)
- debug << "finished.";
- else
- debug << "failed: #" << reply->error() << reply->errorString();
- } else {
+ if (!reply->isFinished())
debug << "timed out.";
- }
+ else if (reply->error() == QNetworkReply::NoError)
+ debug << "finished.";
+ else
+ debug << "failed: #" << reply->error() << reply->errorString();
return result.toLocal8Bit();
}
@@ -1442,7 +1442,7 @@ int tst_QNetworkReply::waitForFinish(QNetworkReplyPtr &reply)
QSignalSpy spy(reply.data(), SIGNAL(downloadProgress(qint64,qint64)));
while (!reply->isFinished()) {
QTimer::singleShot(5000, loop, SLOT(quit()));
- if ( loop->exec() == Timeout && count == spy.count() && !reply->isFinished()) {
+ if (loop->exec() == Timeout && count == spy.count() && !reply->isFinished()) {
returnCode = Timeout;
break;
}
@@ -1456,12 +1456,14 @@ int tst_QNetworkReply::waitForFinish(QNetworkReplyPtr &reply)
void tst_QNetworkReply::finished()
{
- loop->exit(returnCode = Success);
+ if (loop)
+ loop->exit(returnCode = Success);
}
void tst_QNetworkReply::gotError()
{
- loop->exit(returnCode = Failure);
+ if (loop)
+ loop->exit(returnCode = Failure);
disconnect(QObject::sender(), SIGNAL(finished()), this, 0);
}
@@ -4764,11 +4766,13 @@ void tst_QNetworkReply::ioPostToHttpNoBufferFlag()
}
#ifndef QT_NO_SSL
-class SslServer : public QTcpServer {
+class SslServer : public QTcpServer
+{
Q_OBJECT
public:
SslServer() : socket(0), m_ssl(true) {}
- void incomingConnection(qintptr socketDescriptor) {
+ void incomingConnection(qintptr socketDescriptor)
+ {
QSslSocket *serverSocket = new QSslSocket;
serverSocket->setParent(this);
@@ -4778,16 +4782,9 @@ public:
emit newPlainConnection(serverSocket);
return;
}
- QString testDataDir = QFileInfo(QFINDTESTDATA("rfc3252.txt")).absolutePath();
- if (testDataDir.isEmpty())
- testDataDir = QCoreApplication::applicationDirPath();
-
connect(serverSocket, SIGNAL(encrypted()), this, SLOT(encryptedSlot()));
- serverSocket->setProtocol(QSsl::AnyProtocol);
connect(serverSocket, SIGNAL(sslErrors(QList<QSslError>)), serverSocket, SLOT(ignoreSslErrors()));
- serverSocket->setLocalCertificate(testDataDir + "/certs/server.pem");
- serverSocket->setPrivateKey(testDataDir + "/certs/server.key");
- serverSocket->startServerEncryption();
+ setupSslServer(serverSocket);
} else {
delete serverSocket;
}
@@ -4796,11 +4793,13 @@ signals:
void newEncryptedConnection(QSslSocket *s);
void newPlainConnection(QSslSocket *s);
public slots:
- void encryptedSlot() {
+ void encryptedSlot()
+ {
socket = (QSslSocket*) sender();
emit newEncryptedConnection(socket);
}
- void readyReadSlot() {
+ void readyReadSlot()
+ {
// for the incoming sockets, not the server socket
//qDebug() << static_cast<QSslSocket*>(sender())->bytesAvailable() << static_cast<QSslSocket*>(sender())->encryptedBytesAvailable();
}
@@ -4846,7 +4845,7 @@ void tst_QNetworkReply::ioPostToHttpsUploadProgress()
disconnect(&server, SIGNAL(newEncryptedConnection(QSslSocket*)), &QTestEventLoop::instance(), SLOT(exitLoop()));
- incomingSocket->setReadBufferSize(1*1024);
+ incomingSocket->setReadBufferSize(1024);
// some progress should have been made
QTRY_VERIFY(!spy.isEmpty());
QList<QVariant> args = spy.last();
@@ -4950,7 +4949,7 @@ void tst_QNetworkReply::ioGetFromBuiltinHttp()
QCOMPARE(reply->header(QNetworkRequest::ContentLengthHeader).toLongLong(), (qint64)testData.size());
if (reader.data.size() < testData.size()) { // oops?
- QCOMPARE(reader.data, testData.mid(0, reader.data.size()));
+ QCOMPARE(reader.data, testData.left(reader.data.size()));
qDebug() << "The data is incomplete, the last" << testData.size() - reader.data.size() << "bytes are missing";
}
QCOMPARE(reader.data.size(), testData.size());
@@ -4997,7 +4996,7 @@ void tst_QNetworkReply::ioPostToHttpUploadProgress()
QVERIFY(incomingSocket);
disconnect(&server, SIGNAL(newConnection()), &QTestEventLoop::instance(), SLOT(exitLoop()));
- incomingSocket->setReadBufferSize(1*1024);
+ incomingSocket->setReadBufferSize(1024);
QTestEventLoop::instance().enterLoop(5);
// some progress should have been made
QVERIFY(!spy.isEmpty());
@@ -5699,12 +5698,14 @@ void tst_QNetworkReply::httpProxyCommands()
QCOMPARE(uaheader, QByteArray("User-Agent: QNetworkReplyAutoTest/1.0"));
}
-class ProxyChangeHelper : public QObject {
+class ProxyChangeHelper : public QObject
+{
Q_OBJECT
public:
ProxyChangeHelper() : QObject(), signalCount(0) {};
public slots:
- void finishedSlot() {
+ void finishedSlot()
+ {
signalCount++;
if (signalCount == 2)
QMetaObject::invokeMethod(&QTestEventLoop::instance(), "exitLoop", Qt::QueuedConnection);
@@ -5950,7 +5951,8 @@ void tst_QNetworkReply::httpReUsingConnectionSequential()
reply2->deleteLater();
}
-class HttpReUsingConnectionFromFinishedSlot : public QObject {
+class HttpReUsingConnectionFromFinishedSlot : public QObject
+{
Q_OBJECT
public:
QNetworkReply* reply1;
@@ -5958,7 +5960,8 @@ public:
QUrl url;
QNetworkAccessManager manager;
public slots:
- void finishedSlot() {
+ void finishedSlot()
+ {
QVERIFY(!reply1->error());
QFETCH(bool, doDeleteLater);
@@ -6006,7 +6009,8 @@ void tst_QNetworkReply::httpReUsingConnectionFromFinishedSlot()
QCOMPARE(server.totalConnections, 1);
}
-class HttpRecursiveCreationHelper : public QObject {
+class HttpRecursiveCreationHelper : public QObject
+{
Q_OBJECT
public:
@@ -6022,7 +6026,8 @@ public:
int requestsStartedCount_readyRead;
int requestsFinishedCount;
public slots:
- void finishedSlot() {
+ void finishedSlot()
+ {
requestsFinishedCount++;
QNetworkReply *reply = qobject_cast<QNetworkReply*>(sender());
@@ -6041,7 +6046,8 @@ public slots:
reply->deleteLater();
}
- void readyReadSlot() {
+ void readyReadSlot()
+ {
QNetworkReply *reply = qobject_cast<QNetworkReply*>(sender());
QVERIFY(!reply->error());
@@ -6050,7 +6056,8 @@ public slots:
requestsStartedCount_readyRead++;
}
}
- void startOne() {
+ void startOne()
+ {
QUrl url = "http://" + QtNetworkSettings::serverName() + "/qtest/fluke.gif";
QNetworkRequest request(url);
QNetworkReply *reply = manager.get(request);
@@ -6419,7 +6426,8 @@ void tst_QNetworkReply::getFromHttpIntoBuffer()
}
// FIXME we really need to consolidate all those server implementations
-class GetFromHttpIntoBuffer2Server : QObject {
+class GetFromHttpIntoBuffer2Server : QObject
+{
Q_OBJECT
qint64 dataSize;
qint64 dataSent;
@@ -6429,26 +6437,28 @@ class GetFromHttpIntoBuffer2Server : QObject {
bool chunkedEncoding;
public:
- GetFromHttpIntoBuffer2Server (qint64 ds, bool sscl, bool ce) : dataSize(ds), dataSent(0),
- client(0), serverSendsContentLength(sscl), chunkedEncoding(ce) {
+ GetFromHttpIntoBuffer2Server (qint64 ds, bool sscl, bool ce)
+ : dataSize(ds), dataSent(0), client(0),
+ serverSendsContentLength(sscl), chunkedEncoding(ce)
+ {
server.listen();
connect(&server, SIGNAL(newConnection()), this, SLOT(newConnectionSlot()));
}
- int serverPort() {
- return server.serverPort();
- }
+ int serverPort() { return server.serverPort(); }
public slots:
- void newConnectionSlot() {
+ void newConnectionSlot()
+ {
client = server.nextPendingConnection();
client->setParent(this);
connect(client, SIGNAL(readyRead()), this, SLOT(readyReadSlot()));
connect(client, SIGNAL(bytesWritten(qint64)), this, SLOT(bytesWrittenSlot(qint64)));
}
- void readyReadSlot() {
+ void readyReadSlot()
+ {
client->readAll();
client->write("HTTP/1.0 200 OK\n");
if (serverSendsContentLength)
@@ -6458,7 +6468,8 @@ public slots:
client->write("Connection: close\n\n");
}
- void bytesWrittenSlot(qint64 amount) {
+ void bytesWrittenSlot(qint64 amount)
+ {
Q_UNUSED(amount);
if (dataSent == dataSize && client) {
// close eventually
@@ -6492,7 +6503,8 @@ public slots:
}
};
-class GetFromHttpIntoBuffer2Client : QObject {
+class GetFromHttpIntoBuffer2Client : QObject
+{
Q_OBJECT
private:
bool useDownloadBuffer;
@@ -6509,7 +6521,8 @@ public:
}
public slots:
- void metaDataChangedSlot() {
+ void metaDataChangedSlot()
+ {
if (useDownloadBuffer) {
QSharedPointer<char> sharedPointer = qvariant_cast<QSharedPointer<char> >(reply->attribute(QNetworkRequest::DownloadBufferAttribute));
QVERIFY(!sharedPointer.isNull()); // It will be 0 if it failed
@@ -6519,7 +6532,8 @@ public:
QVERIFY(bytesAvailableList.isEmpty());
}
- void readyReadSlot() {
+ void readyReadSlot()
+ {
QVERIFY(!reply->isFinished());
qint64 bytesAvailable = reply->bytesAvailable();
@@ -6541,7 +6555,8 @@ public:
// Add bytesAvailable to a list an parse
}
- void finishedSlot() {
+ void finishedSlot()
+ {
// We should have already received all readyRead
QVERIFY(!bytesAvailableList.isEmpty());
QCOMPARE(bytesAvailableList.last(), uploadSize);
@@ -6947,17 +6962,17 @@ void tst_QNetworkReply::authenticationWithDifferentRealm()
}
#endif // !QT_NO_NETWORKPROXY
-class QtBug13431Helper : public QObject {
+class QtBug13431Helper : public QObject
+{
Q_OBJECT
public:
QNetworkReply* m_reply;
QTimer m_dlTimer;
public slots:
- void replyFinished(QNetworkReply*) {
- QTestEventLoop::instance().exitLoop();
- }
+ void replyFinished(QNetworkReply*) { QTestEventLoop::instance().exitLoop(); }
- void onReadAndReschedule() {
+ void onReadAndReschedule()
+ {
const qint64 bytesReceived = m_reply->bytesAvailable();
if (bytesReceived && m_reply->readBufferSize()) {
QByteArray data = m_reply->read(bytesReceived);
@@ -7105,7 +7120,8 @@ void tst_QNetworkReply::qtbug22660gzipNoContentLengthEmptyContent()
QCOMPARE(reply->readAll(), QByteArray());
}
-class QtBug27161Helper : public QObject {
+class QtBug27161Helper : public QObject
+{
Q_OBJECT
public:
QtBug27161Helper(MiniHttpServer & server, const QByteArray & data):
@@ -7115,16 +7131,19 @@ public:
connect(&m_server, SIGNAL(newConnection()), this, SLOT(newConnectionSlot()));
}
public slots:
- void newConnectionSlot(){
+ void newConnectionSlot()
+ {
connect(m_server.client, SIGNAL(bytesWritten(qint64)), this, SLOT(bytesWrittenSlot()));
}
- void bytesWrittenSlot(){
+ void bytesWrittenSlot()
+ {
disconnect(m_server.client, SIGNAL(bytesWritten(qint64)), this, SLOT(bytesWrittenSlot()));
m_Timer.singleShot(100, this, SLOT(timeoutSlot()));
}
- void timeoutSlot(){
+ void timeoutSlot()
+ {
m_server.doClose = true;
// we need to emulate the bytesWrittenSlot call if the data is empty.
if (m_data.size() == 0)
@@ -7553,10 +7572,12 @@ void tst_QNetworkReply::httpUserAgent()
void tst_QNetworkReply::synchronousAuthenticationCache()
{
- class MiniAuthServer : public MiniHttpServer {
+ class MiniAuthServer : public MiniHttpServer
+ {
public:
- MiniAuthServer(QThread *thread) : MiniHttpServer(QByteArray(), false, thread) {};
- virtual void reply() {
+ MiniAuthServer(QThread *thread) : MiniHttpServer(QByteArray(), false, thread) {}
+ virtual void reply()
+ {
dataToTransmit =
"HTTP/1.0 401 Unauthorized\r\n"
@@ -7968,7 +7989,8 @@ public:
qint64 bandwidthQuota;
QTimer timer;
- RateLimitedUploadDevice(QByteArray d) : QIODevice(),data(d),read(0),bandwidthQuota(0) {
+ RateLimitedUploadDevice(QByteArray d) : QIODevice(),data(d),read(0),bandwidthQuota(0)
+ {
buffer.setData(data);
buffer.open(QIODevice::ReadOnly);
timer.setInterval(200);
@@ -7976,12 +7998,14 @@ public:
timer.start();
}
- virtual qint64 writeData(const char* , qint64 ) {
+ virtual qint64 writeData(const char* , qint64 )
+ {
Q_ASSERT(false);
return 0;
}
- virtual qint64 readData(char* data, qint64 maxlen) {
+ virtual qint64 readData(char* data, qint64 maxlen)
+ {
//qDebug() << Q_FUNC_INFO << maxlen << bandwidthQuota;
maxlen = qMin(maxlen, buffer.bytesAvailable());
maxlen = qMin(maxlen, bandwidthQuota);
@@ -7998,24 +8022,17 @@ public:
//qDebug() << Q_FUNC_INFO << maxlen << bandwidthQuota << read << ret << buffer.bytesAvailable();
return ret;
}
- virtual bool atEnd() const {
- return buffer.atEnd();
- }
- virtual qint64 size() const{
- return data.length();
- }
+ virtual bool atEnd() const { return buffer.atEnd(); }
+ virtual qint64 size() const { return data.length(); }
qint64 bytesAvailable() const
{
return buffer.bytesAvailable() + QIODevice::bytesAvailable();
}
- virtual bool isSequential() const{ // random access, we can seek
- return false;
- }
- virtual bool seek ( qint64 pos ) {
- return buffer.seek(pos);
- }
+ virtual bool isSequential() const { return false; } // random access, we can seek
+ virtual bool seek (qint64 pos) { return buffer.seek(pos); }
protected slots:
- void timeoutSlot() {
+ void timeoutSlot()
+ {
//qDebug() << Q_FUNC_INFO;
bandwidthQuota = 8*1024; // fill quota
emit readyRead();
@@ -8205,9 +8222,7 @@ signals:
void corruptFileUploadReceived();
public slots:
- void closeDelayed() {
- m_socket->close();
- }
+ void closeDelayed() { m_socket->close(); }
void readyReadSlot()
{
@@ -8232,17 +8247,18 @@ public slots:
// We had received some data but it is corrupt!
qDebug() << "CORRUPT" << m_receivedData.count();
- // Use this to track down the pattern of the corruption and conclude the source
-// QFile a("/tmp/corrupt");
-// a.open(QIODevice::WriteOnly);
-// a.write(m_receivedData);
-// a.close();
+#if 0 // Use this to track down the pattern of the corruption and conclude the source
+ QFile a("/tmp/corrupt");
+ a.open(QIODevice::WriteOnly);
+ a.write(m_receivedData);
+ a.close();
-// QFile b("/tmp/correct");
-// b.open(QIODevice::WriteOnly);
-// b.write(m_expectedData);
-// b.close();
+ QFile b("/tmp/correct");
+ b.open(QIODevice::WriteOnly);
+ b.write(m_expectedData);
+ b.close();
//exit(1);
+#endif
emit corruptFileUploadReceived();
} else {
emit correctFileUploadReceived();
@@ -8259,26 +8275,26 @@ public:
int m_repliesFinished;
int m_expectedReplies;
QByteArray m_expectedData;
- PutWithServerClosingConnectionImmediatelyServer() : SslServer(), m_correctUploads(0), m_corruptUploads(0), m_repliesFinished(0), m_expectedReplies(0)
+ PutWithServerClosingConnectionImmediatelyServer()
+ : SslServer(), m_correctUploads(0), m_corruptUploads(0),
+ m_repliesFinished(0), m_expectedReplies(0)
{
QObject::connect(this, SIGNAL(newEncryptedConnection(QSslSocket*)), this, SLOT(createHandlerForConnection(QSslSocket*)));
QObject::connect(this, SIGNAL(newPlainConnection(QSslSocket*)), this, SLOT(createHandlerForConnection(QSslSocket*)));
}
public slots:
- void createHandlerForConnection(QSslSocket* s) {
+ void createHandlerForConnection(QSslSocket* s)
+ {
PutWithServerClosingConnectionImmediatelyHandler *handler = new PutWithServerClosingConnectionImmediatelyHandler(s, m_expectedData);
handler->setParent(this);
QObject::connect(handler, SIGNAL(correctFileUploadReceived()), this, SLOT(increaseCorrect()));
QObject::connect(handler, SIGNAL(corruptFileUploadReceived()), this, SLOT(increaseCorrupt()));
}
- void increaseCorrect() {
- m_correctUploads++;
- }
- void increaseCorrupt() {
- m_corruptUploads++;
- }
- void replyFinished() {
+ void increaseCorrect() { m_correctUploads++; }
+ void increaseCorrupt() { m_corruptUploads++; }
+ void replyFinished()
+ {
m_repliesFinished++;
if (m_repliesFinished == m_expectedReplies) {
QTestEventLoop::instance().exitLoop();
diff --git a/tests/auto/other/atwrapper/.gitignore b/tests/auto/other/atwrapper/.gitignore
deleted file mode 100644
index 162ad53af6..0000000000
--- a/tests/auto/other/atwrapper/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-tst_atwrapper
diff --git a/tests/auto/other/atwrapper/TODO b/tests/auto/other/atwrapper/TODO
deleted file mode 100644
index 23a70c3c9e..0000000000
--- a/tests/auto/other/atwrapper/TODO
+++ /dev/null
@@ -1,17 +0,0 @@
-* Get rid of "Keep baseline" on test failure page (Lars) !! DONE !!
-* Make to autotest (Simon) !! DONE !!
-* Add visual diff (Everyone ;)) !! DONE !!
-* Add flicker (Simon/Jesper) !! DONE !!
-* Add third image -- base-baseline (Lars) !! DONE !!
-* Add "view baselines" gallery, including the "base base line" (Lars) !! DONE !!
-* Add PS printer driver engine test thingy (Eskil) !! DONE !!
-* Add platform by platform comparison perl script. (Morton)
-* Fix the QDateTime.fromString() weirdness on win32 in xmldata.cpp (Jesper)
-* Have one result per page view (Lars) !! DONE !!
-* Have "platform - hostname" on test overview (Lars) !! DONE !!
-* Have the links on the overview page only show failures for that host.(All)!! DONE !!
-* "onion skin" diff. (Jesper)
-* Promote all to baseline
-* Switch all to flicker/onion/whatever
-* Add javascript confirmation for "make baseline"
-* Make "single view" more stable
diff --git a/tests/auto/other/atwrapper/atWrapper.cpp b/tests/auto/other/atwrapper/atWrapper.cpp
deleted file mode 100644
index 8f623538f9..0000000000
--- a/tests/auto/other/atwrapper/atWrapper.cpp
+++ /dev/null
@@ -1,636 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** 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 The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-
-#include <atWrapper.h>
-#include <datagenerator/datagenerator.h>
-
-#include <QString>
-#include <QHash>
-#include <QFile>
-#include <QFtp>
-#include <QObject>
-#include <QHostInfo>
-#include <QWidget>
-#include <QImage>
-#include <QtTest/QSignalSpy>
-#include <QLibraryInfo>
-
-static const char *ArthurDir = "../../arthur";
-
-#include <string.h>
-
-atWrapper::atWrapper()
-{
-
- // initTests();
-
-}
-
-bool atWrapper::initTests(bool *haveBaseline)
-{
- qDebug() << "Running test on buildkey:" << QLibraryInfo::buildKey() << " qt version:" << qVersion();
-
- qDebug( "Initializing tests..." );
-
- if (!loadConfig( QHostInfo::localHostName().split( "." ).first() + ".ini" ))
- return false;
-
- //Reset the FTP environment where the results are stored
- *haveBaseline = setupFTP();
-
- // Retrieve the latest test result baseline from the FTP server.
- downloadBaseline();
- return true;
-}
-
-void atWrapper::downloadBaseline()
-{
-
- qDebug() << "Now downloading baseline...";
-
- QFtp ftp;
-
- QObject::connect( &ftp, SIGNAL(listInfo(QUrlInfo)), this, SLOT(ftpMgetAddToList(QUrlInfo)) );
-
- //Making sure that the needed local directories exist.
-
- QHashIterator<QString, QString> j(enginesToTest);
-
- while ( j.hasNext() )
- {
- j.next();
-
- QDir dir( output );
-
- if ( !dir.cd( j.key() + ".baseline" ) )
- dir.mkdir( j.key() + ".baseline" );
-
- }
-
- //FTP to the host specified in the config file, and retrieve the test result baseline.
- ftp.connectToHost( ftpHost );
- ftp.login( ftpUser, ftpPass );
-
- ftp.cd( ftpBaseDir );
-
- QHashIterator<QString, QString> i(enginesToTest);
- while ( i.hasNext() )
- {
- i.next();
- mgetDirList.clear();
- mgetDirList << i.key() + ".baseline";
- ftp.cd( i.key() + ".baseline" );
- ftp.list();
- ftp.cd( ".." );
-
- while ( ftp.hasPendingCommands() )
- QCoreApplication::instance()->processEvents();
-
- ftpMgetDone( true );
- }
-
- ftp.close();
- ftp.close();
-
- while ( ftp.hasPendingCommands() )
- QCoreApplication::instance()->processEvents();
-
-}
-
-void atWrapper::ftpMgetAddToList( const QUrlInfo &urlInfo )
-{
- //Simply adding to the list of files to download.
- mgetDirList << urlInfo.name();
-
-}
-
-void atWrapper::ftpMgetDone( bool error)
-{
- Q_UNUSED( error );
-
- //Downloading the files listed in mgetDirList...
- QFtp ftp;
- ftp.connectToHost( ftpHost );
- ftp.login( ftpUser, ftpPass );
-
- QFile* file;
-
- if ( mgetDirList.size() > 1 )
- for ( int i = 1; i < mgetDirList.size(); ++i )
- {
- file = new QFile( QString( output ) + QLatin1Char('/') + mgetDirList.at( 0 )
- + QLatin1Char('/') + mgetDirList.at( i ) );
- if (file->open(QIODevice::WriteOnly)) {
- ftp.get( ftpBaseDir + QLatin1Char('/') + mgetDirList.at( 0 ) + QLatin1Char('/') + mgetDirList.at( i ), file );
- ftp.list(); //Only there to fill up a slot in the pendingCommands queue.
- while ( ftp.hasPendingCommands() )
- QCoreApplication::instance()->processEvents();
- file->close();
- } else {
- qDebug() << "Couldn't open file for writing: " << file->fileName();
- }
- }
-
-
- while ( ftp.hasPendingCommands() )
- QCoreApplication::instance()->processEvents();
-}
-
-void atWrapper::uploadFailed( QString dir, QString filename, QByteArray filedata )
-{
- //Upload a failed test case image to the FTP server.
- QFtp ftp;
- ftp.connectToHost( ftpHost );
- ftp.login( ftpUser, ftpPass );
-
- ftp.cd( ftpBaseDir );
- ftp.cd( dir );
-
- ftp.put( filedata, filename, QFtp::Binary );
-
- ftp.close();
-
- while ( ftp.hasPendingCommands() )
- QCoreApplication::instance()->processEvents();
-}
-
-// returns false if no baseline exists
-bool atWrapper::setupFTP()
-{
- qDebug( "Setting up FTP environment" );
-
- QString dir = "";
- ftpMkDir( ftpBaseDir );
-
- ftpBaseDir += QLatin1Char('/') + QLibraryInfo::buildKey();
-
- ftpMkDir( ftpBaseDir );
-
- ftpBaseDir += QLatin1Char('/') + QString( qVersion() );
-
- ftpMkDir( ftpBaseDir );
-
- QHashIterator<QString, QString> i(enginesToTest);
- QHashIterator<QString, QString> j(enginesToTest);
-
- bool haveBaseline = true;
- //Creating the baseline directories for each engine
- while ( i.hasNext() )
- {
- i.next();
- //qDebug() << "Creating dir with key:" << i.key();
- ftpMkDir( ftpBaseDir + QLatin1Char('/') + QString( i.key() ) + ".failed" );
- ftpMkDir( ftpBaseDir + QLatin1Char('/') + QString( i.key() ) + ".diff" );
- if (!ftpMkDir( ftpBaseDir + QLatin1Char('/') + QString( i.key() ) + ".baseline" ))
- haveBaseline = false;
- }
-
-
- QFtp ftp;
- ftp.connectToHost( ftpHost );
- ftp.login( ftpUser, ftpPass );
-
- ftp.cd( ftpBaseDir );
- //Deleting previous failed directory and all the files in it, then recreating it.
- while ( j.hasNext() )
- {
- j.next();
- rmDirList.clear();
- rmDirList << ftpBaseDir + QLatin1Char('/') + j.key() + ".failed/";
- ftpRmDir( j.key() + ".failed" );
- ftp.rmdir( j.key() + ".failed" );
- ftp.mkdir( j.key() + ".failed" );
- ftp.list();
-
- while ( ftp.hasPendingCommands() )
- QCoreApplication::instance()->processEvents();
-
- rmDirList.clear();
- rmDirList << ftpBaseDir + QLatin1Char('/') + j.key() + ".diff/";
- ftpRmDir( j.key() + ".diff" );
- ftp.rmdir( j.key() + ".diff" );
- ftp.mkdir( j.key() + ".diff" );
- ftp.list();
-
- while ( ftp.hasPendingCommands() )
- QCoreApplication::instance()->processEvents();
-
- }
-
- ftp.close();
-
- while ( ftp.hasPendingCommands() )
- QCoreApplication::instance()->processEvents();
-
- return haveBaseline;
-}
-
-void atWrapper::ftpRmDir( QString dir )
-{
- //Hack to remove a populated directory. (caveat: containing only files and empty dirs, not recursive!)
- qDebug() << "Now removing directory: " << dir;
- QFtp ftp;
- QObject::connect( &ftp, SIGNAL(listInfo(QUrlInfo)), this, SLOT(ftpRmDirAddToList(QUrlInfo)) );
- QObject::connect( &ftp, SIGNAL(done(bool)), this, SLOT(ftpRmDirDone(bool)) );
-
- ftp.connectToHost( ftpHost );
- ftp.login( ftpUser, ftpPass );
-
- ftp.list( ftpBaseDir + "/" + dir );
- ftp.close();
- ftp.close();
-
- while ( ftp.hasPendingCommands() )
- QCoreApplication::instance()->processEvents();
-}
-
-void atWrapper::ftpRmDirDone( bool error )
-{
- //Deleting each file in the directory listning, rmDirList.
- Q_UNUSED( error );
-
- QFtp ftp;
- ftp.connectToHost( ftpHost );
- ftp.login( ftpUser, ftpPass );
-
- if ( rmDirList.size() > 1 )
- for (int i = 1; i < rmDirList.size(); ++i)
- ftp.remove( rmDirList.at(0) + rmDirList.at( i ) );
-
- ftp.close();
-
- while ( ftp.hasPendingCommands() )
- QCoreApplication::instance()->processEvents();
-}
-
-// returns false if the directory already exists
-bool atWrapper::ftpMkDir( QString dir )
-{
- //Simply used to avoid QFTP from bailing out and loosing a queue of commands.
- // IE: conveniance.
- QFtp ftp;
-
- QSignalSpy commandSpy(&ftp, SIGNAL(commandFinished(int,bool)));
-
- ftp.connectToHost( ftpHost );
- ftp.login( ftpUser, ftpPass );
- const int command = ftp.mkdir( dir );
- ftp.close();
-
- while ( ftp.hasPendingCommands() )
- QCoreApplication::instance()->processEvents();
-
- for (int i = 0; i < commandSpy.count(); ++i)
- if (commandSpy.at(i).at(0) == command)
- return commandSpy.at(i).at(1).toBool();
-
- return false;
-}
-
-
-void atWrapper::ftpRmDirAddToList( const QUrlInfo &urlInfo )
-{
- //Just adding the file to the list for deletion
- rmDirList << urlInfo.name();
-}
-
-
-bool atWrapper::executeTests()
-{
- qDebug("Executing the tests...");
-
- QHashIterator<QString, QString> i(enginesToTest);
-
- DataGenerator generator;
-
- //Running datagenerator against all the frameworks specified in the config file.
- while ( i.hasNext() )
- {
-
- i.next();
-
- qDebug( "Now testing: " + i.key().toLatin1() );
-
- char* params[13];
- //./bin/datagenerator -framework data/framework.ini -engine OpenGL -suite 1.1 -output outtest
-
-
- QByteArray eng = i.key().toLatin1();
- QByteArray fwk = framework.toLatin1();
- QByteArray sut = suite.toLatin1();
- QByteArray out = output.toLatin1();
- QByteArray siz = size.toLatin1();
- QByteArray fill = fillColor.toLatin1();
-
- params[1] = "-framework";
- params[2] = fwk.data();
- params[3] = "-engine";
- params[4] = eng.data();
- params[5] = "-suite";
- params[6] = sut.data();
- params[7] = "-output";
- params[8] = out.data();
- params[9] = "-size";
- params[10] = siz.data();
- params[11] = "-fill";
- params[12] = fill.data();
-
- generator.run( 13, params );
- }
-
- return true;
-}
-
-void atWrapper::createBaseline()
-{
- qDebug( "Now uploading a baseline of only the latest test values" );
-
- QHashIterator<QString, QString> i(enginesToTest);
-
- QDir dir( output );
- QFtp ftp;
- ftp.connectToHost( ftpHost );
- ftp.login( ftpUser, ftpPass );
- ftp.cd( ftpBaseDir );
- //Upload all the latest test results to the FTP server's baseline directory.
- while ( i.hasNext() )
- {
-
- i.next();
- dir.cd( i.key() );
- ftp.cd( i.key() + ".baseline" );
- dir.setFilter(QDir::Files | QDir::Hidden | QDir::NoSymLinks);
- dir.setNameFilters( QStringList() << "*.png" );
- QFileInfoList list = dir.entryInfoList();
- dir.cd( ".." );
- for (int n = 0; n < list.size(); n++)
- {
- QFileInfo fileInfo = list.at( n );
- QFile file( QString( output ) + QLatin1Char('/') + i.key() + QLatin1Char('/') + fileInfo.fileName() );
- file.open( QIODevice::ReadOnly );
- QByteArray fileData = file.readAll();
- //qDebug() << "Sending up:" << fileInfo.fileName() << "with file size" << fileData.size();
- file.close();
- ftp.put( fileData, fileInfo.fileName(), QFtp::Binary );
- }
-
- ftp.cd( ".." );
- }
-
- ftp.close();
-
- while ( ftp.hasPendingCommands() )
- QCoreApplication::instance()->processEvents();
-}
-
-bool atWrapper::compare()
-{
- qDebug( "Now comparing the results to the baseline" );
-
- QHashIterator<QString, QString> i(enginesToTest);
-
- while ( i.hasNext() )
- {
- i.next();
-
- compareDirs( output , i.key() );
-
- }
-
- return true;
-}
-
-void atWrapper::compareDirs( QString basedir, QString target )
-{
-
- QDir dir( basedir );
-
- /* The following should be redundant now.
-
- if ( !dir.cd( target + ".failed" ) )
- dir.mkdir( target + ".failed" );
- else
- dir.cdUp();
-
- */
-
- if ( !dir.cd( target + ".diff" ) )
- dir.mkdir( target + ".diff" );
- else
- dir.cdUp();
-
-
-
- //Perform comparisons between the two directories.
-
- dir.setFilter(QDir::Files | QDir::Hidden | QDir::NoSymLinks);
- dir.setNameFilters( QStringList() << "*.png" );
- dir.cd( target + ".baseline" );
- QFileInfoList list = dir.entryInfoList();
-
- for (int i = 0; i < list.size(); ++i)
- {
- QFileInfo fileInfo = list.at(i);
- diff ( basedir, target, fileInfo.fileName() );
- }
-}
-
-bool atWrapper::diff( QString basedir, QString dir, QString target )
-{
- //Comparing the two specified files, and then uploading them to
- //the ftp server if they differ
-
- basedir += QLatin1Char('/') + dir;
- QString one = basedir + ".baseline/" + target;
- QString two = basedir + QLatin1Char('/') + target;
-
- QFile file( one );
-
- file.open( QIODevice::ReadOnly );
- QByteArray contentsOfOne = file.readAll();
- file.close();
-
- file.setFileName( two );
-
- file.open( QIODevice::ReadOnly );
- QByteArray contentsOfTwo = file.readAll();
- file.close();
-
- if ( contentsOfTwo.size() == 0 )
- {
- qDebug() << "No test result found for baseline: " << one;
- file.setFileName( one );
- file.open( QIODevice::ReadOnly );
- file.copy( basedir + ".failed/" + target + "_missing" );
- uploadFailed( dir + ".failed", target + "_missing", contentsOfTwo );
- return false;
- }
-
-
- if ( ( memcmp( contentsOfOne, contentsOfTwo, contentsOfOne.size() ) ) == 0 )
- return true;
- else
- {
- qDebug() << "Sorry, the result did not match: " << one;
- file.setFileName( two );
- file.open( QIODevice::ReadOnly );
- file.copy( basedir + ".failed/" + target );
- file.close();
- uploadFailed( dir + ".failed", target, contentsOfTwo );
- uploadDiff( basedir, dir, target );
- return false;
- }
-}
-
-void atWrapper::uploadDiff( QString basedir, QString dir, QString filename )
-{
-
- qDebug() << basedir;
- QImage im1( basedir + ".baseline/" + filename );
- QImage im2( basedir + QLatin1Char('/') + filename );
-
- QImage im3(im1.size(), QImage::Format_ARGB32);
-
- im1 = im1.convertToFormat(QImage::Format_ARGB32);
- im2 = im2.convertToFormat(QImage::Format_ARGB32);
-
- for ( int y=0; y<im1.height(); ++y )
- {
- uint *s = (uint *) im1.scanLine(y);
- uint *d = (uint *) im2.scanLine(y);
- uint *w = (uint *) im3.scanLine(y);
-
- for ( int x=0; x<im1.width(); ++x )
- {
- if (*s != *d)
- *w = 0xff000000;
- else
- *w = 0xffffffff;
- w++;
- s++;
- d++;
- }
- }
-
- im3.save( basedir + ".diff/" + filename ,"PNG");
-
- QFile file( basedir + ".diff/" + filename );
- file.open( QIODevice::ReadOnly );
- QByteArray contents = file.readAll();
- file.close();
-
- uploadFailed( dir + ".diff", filename, contents );
-
-}
-
-bool atWrapper::loadConfig( QString path )
-{
- qDebug() << "Loading config file from ... " << path;
- configPath = path;
- //If there is no config file, don't proceed;
- if ( !QFile::exists( path ) )
- {
- return false;
- }
-
-
- QSettings settings( path, QSettings::IniFormat, this );
-
-
- //FIXME: Switch to QStringList or something, hash is not needed!
- int numEngines = settings.beginReadArray("engines");
-
- for ( int i = 0; i < numEngines; ++i )
- {
- settings.setArrayIndex(i);
- enginesToTest.insert( settings.value( "engine" ).toString(), "Info here please :p" );
- }
-
- settings.endArray();
-
- framework = QString(ArthurDir) + QDir::separator() + settings.value( "framework" ).toString();
- suite = settings.value( "suite" ).toString();
- output = settings.value( "output" ).toString();
- size = settings.value( "size", "480,360" ).toString();
- fillColor = settings.value( "fill", "white" ).toString();
- ftpUser = settings.value( "ftpUser" ).toString();
- ftpPass = settings.value( "ftpPass" ).toString();
- ftpHost = settings.value( "ftpHost" ).toString();
- ftpBaseDir = settings.value( "ftpBaseDir" ).toString();
-
-
- QDir::current().mkdir( output );
-
- output += QLatin1Char('/') + QLibraryInfo::buildKey();
-
- QDir::current().mkdir( output );
-
- output += QLatin1Char('/') + QString( qVersion() );
-
- QDir::current().mkdir( output );
-
-
- ftpBaseDir += QLatin1Char('/') + QHostInfo::localHostName().split( QLatin1Char('.') ).first();
-
-
-/*
- framework = "data/framework.ini";
- suite = "1.1";
- output = "testresults";
- ftpUser = "anonymous";
- ftpPass = "anonymouspass";
- ftpHost = "kramer.troll.no";
- ftpBaseDir = "/arthurtest";
-*/
- return true;
-}
-
-bool atWrapper::runAutoTests()
-{
- //SVG needs this widget...
- QWidget dummy;
-
- bool haveBaseline = false;
-
- if (!initTests(&haveBaseline))
- return false;
- executeTests();
-
- if ( !haveBaseline )
- {
- qDebug( " First run! Creating baseline..." );
- createBaseline();
- }
- else
- {
- qDebug( " Comparing results..." );
- compare();
- }
- return true;
-}
diff --git a/tests/auto/other/atwrapper/atWrapper.h b/tests/auto/other/atwrapper/atWrapper.h
deleted file mode 100644
index dab2b579e3..0000000000
--- a/tests/auto/other/atwrapper/atWrapper.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** 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 The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#ifndef ATWRAPPER_H
-#define ATWRAPPER_H
-
-#include <QHash>
-#include <QString>
-#include <QUrlInfo>
-#include <QColor>
-
-class atWrapper : public QObject
-{
- Q_OBJECT
-
- public:
- atWrapper();
- bool runAutoTests();
-
- private:
- bool executeTests();
- bool initTests(bool *haveBaseline);
- bool compare();
- void createBaseline();
- bool loadConfig( QString );
- void compareDirs( QString, QString );
- bool diff( QString, QString, QString );
- void downloadBaseline();
- void uploadFailed( QString, QString, QByteArray );
- bool ftpMkDir( QString );
- void ftpRmDir( QString );
- bool setupFTP();
- void uploadDiff( QString, QString, QString );
-
- QHash<QString, QString> enginesToTest;
- QString framework;
- QString suite;
- QString output;
- QString size;
- QString ftpUser;
- QString ftpPass;
- QString ftpHost;
- QString ftpBaseDir;
- QList<QString> rmDirList;
- QList<QString> mgetDirList;
- QString configPath;
- QString fillColor;
-
- private slots:
- void ftpRmDirAddToList( const QUrlInfo &urlInfo );
- void ftpRmDirDone( bool );
- void ftpMgetAddToList( const QUrlInfo &urlInfo );
- void ftpMgetDone( bool );
-};
-
-#endif
diff --git a/tests/auto/other/atwrapper/atWrapper.pro b/tests/auto/other/atwrapper/atWrapper.pro
deleted file mode 100644
index 1617ae89d1..0000000000
--- a/tests/auto/other/atwrapper/atWrapper.pro
+++ /dev/null
@@ -1,21 +0,0 @@
-ARTHUR=$$QT_SOURCE_TREE/tests/arthur
-COMMON_FOLDER = $$ARTHUR/common
-include($$ARTHUR/arthurtester.pri)
-INCLUDEPATH += $$ARTHUR
-DEFINES += SRCDIR=\\\"$$PWD\\\"
-
-QT += xml svg network testlib
-
-qtHaveModule(opengl): QT += opengl
-
-include($$ARTHUR/datagenerator/datagenerator.pri)
-
-CONFIG += testcase
-
-HEADERS += atWrapper.h
-SOURCES += atWrapperAutotest.cpp atWrapper.cpp
-
-TARGET = tst_atwrapper
-
-#include($$COMMON_FOLDER/common.pri)
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/other/atwrapper/atWrapperAutotest.cpp b/tests/auto/other/atwrapper/atWrapperAutotest.cpp
deleted file mode 100644
index ea40cc92b9..0000000000
--- a/tests/auto/other/atwrapper/atWrapperAutotest.cpp
+++ /dev/null
@@ -1,65 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** 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 The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-
-#include <QtTest/QtTest>
-#include "atWrapper.h"
-#include <QApplication>
-
-class atWrapperAutotest: public QObject
-{
-
-Q_OBJECT
-
-public slots:
- void init();
-
-private slots:
- void runTest();
-};
-
-void atWrapperAutotest::init()
-{
-#ifndef Q_OS_IRIX
- QDir::setCurrent(SRCDIR);
-#endif
-}
-
-void atWrapperAutotest::runTest()
-{
-
- //QApplication app(argc, argv);
-
- atWrapper wrapper;
- if (!wrapper.runAutoTests())
- QSKIP("Arthur not tested on this machine");
- QVERIFY(true);
-}
-
-QTEST_MAIN(atWrapperAutotest)
-#include "atWrapperAutotest.moc"
diff --git a/tests/auto/other/atwrapper/desert.ini b/tests/auto/other/atwrapper/desert.ini
deleted file mode 100644
index 6d8605252d..0000000000
--- a/tests/auto/other/atwrapper/desert.ini
+++ /dev/null
@@ -1,14 +0,0 @@
-[General]
-framework=data/framework.ini
-ftpBaseDir=/arthurtest
-ftpHost=kramer.troll.no
-ftpPass=anonymouspass
-ftpUser=anonymous
-output=testresults
-suite=1.1
-
-[engines]
-1\engine=NativeXRender
-2\engine=PDF
-3\engine=Raster
-size=3
diff --git a/tests/auto/other/atwrapper/ephron.ini b/tests/auto/other/atwrapper/ephron.ini
deleted file mode 100644
index eeccb3b6ef..0000000000
--- a/tests/auto/other/atwrapper/ephron.ini
+++ /dev/null
@@ -1,14 +0,0 @@
-[General]
-framework=data/framework.ini
-ftpBaseDir=/arthurtest
-ftpHost=kramer.troll.no
-ftpPass=anonymouspass
-ftpUser=anonymous
-output=testresults
-suite=oxygen
-size=256
-fill=transparent
-
-[engines]
-1\engine=Raster
-size=1
diff --git a/tests/auto/other/atwrapper/gullgubben.ini b/tests/auto/other/atwrapper/gullgubben.ini
deleted file mode 100644
index 3a664dddd5..0000000000
--- a/tests/auto/other/atwrapper/gullgubben.ini
+++ /dev/null
@@ -1,12 +0,0 @@
-[General]
-framework=data/framework.ini
-ftpBaseDir=/arthurtest
-ftpHost=kramer.troll.no
-ftpPass=anonymouspass
-ftpUser=anonymous
-output=testresults
-suite=1.1
-
-[engines]
-1\engine=OpenGL
-size=1
diff --git a/tests/auto/other/atwrapper/honshu.ini b/tests/auto/other/atwrapper/honshu.ini
deleted file mode 100644
index 3b7751a128..0000000000
--- a/tests/auto/other/atwrapper/honshu.ini
+++ /dev/null
@@ -1,16 +0,0 @@
-[General]
-framework=data/framework.ini
-ftpBaseDir=/arthurtest
-ftpHost=kramer.troll.no
-ftpPass=anonymouspass
-ftpUser=anonymous
-output=testresults
-suite=1.1
-
-[engines]
-1\engine=NativeWin32
-2\engine=PDF
-3\engine=Raster
-4\engine=OpenGL
-5\engine=WinPrint
-size=5
diff --git a/tests/auto/other/atwrapper/kramer.ini b/tests/auto/other/atwrapper/kramer.ini
deleted file mode 100644
index 289d8a8b7e..0000000000
--- a/tests/auto/other/atwrapper/kramer.ini
+++ /dev/null
@@ -1,12 +0,0 @@
-[General]
-framework=data/framework.ini
-ftpBaseDir=/arthurtest
-ftpHost=kramer.troll.no
-ftpPass=anonymouspass
-ftpUser=anonymous
-output=testresults
-suite=1.1
-
-[engines]
-1\engine=Raster
-size=1
diff --git a/tests/auto/other/atwrapper/scruffy.ini b/tests/auto/other/atwrapper/scruffy.ini
deleted file mode 100644
index 329f537e6f..0000000000
--- a/tests/auto/other/atwrapper/scruffy.ini
+++ /dev/null
@@ -1,15 +0,0 @@
-[General]
-framework=data/framework.ini
-ftpBaseDir=/arthurtest
-ftpHost=kramer.nokia.troll.no
-ftpPass=anonymouspass
-ftpUser=anonymous
-output=testresults
-suite=1.1
-
-[engines]
-1\engine=NativeMac
-2\engine=PDF
-3\engine=Raster
-4\engine=OpenGL
-size=4
diff --git a/tests/auto/other/atwrapper/spareribs.ini b/tests/auto/other/atwrapper/spareribs.ini
deleted file mode 100644
index 78ff9e985f..0000000000
--- a/tests/auto/other/atwrapper/spareribs.ini
+++ /dev/null
@@ -1,14 +0,0 @@
-[General]
-framework=data/framework.ini
-ftpBaseDir=/arthurtest
-ftpHost=kramer.troll.no
-ftpPass=anonymouspass
-ftpUser=anonymous
-output=testresults
-suite=1.1
-
-[engines]
-1\engine=NativeWin32
-2\engine=PDF
-3\engine=Raster
-size=3
diff --git a/tests/auto/other/atwrapper/titan.ini b/tests/auto/other/atwrapper/titan.ini
deleted file mode 100644
index 3a0b0dfd31..0000000000
--- a/tests/auto/other/atwrapper/titan.ini
+++ /dev/null
@@ -1,13 +0,0 @@
-[General]
-framework=data/framework.ini
-ftpBaseDir=/arthurtest
-ftpHost=kramer.troll.no
-ftpPass=anonymouspass
-ftpUser=anonymous
-output=testresults
-suite=1.1
-
-[engines]
-1\engine=NativeXRender
-2\engine=OpenGL
-size=2
diff --git a/tests/auto/other/other.pro b/tests/auto/other/other.pro
index 94b5847b2e..a7297afa2b 100644
--- a/tests/auto/other/other.pro
+++ b/tests/auto/other/other.pro
@@ -1,6 +1,5 @@
TEMPLATE=subdirs
SUBDIRS=\
- # atwrapper \ # QTBUG-19452
compiler \
gestures \
lancelot \