From 9d7ed92f6e63cd2d1a1388874e54b37b5cfd01b7 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Thu, 2 Jan 2020 13:51:19 +0100 Subject: Fix dependency resolution for extra compilers in VS projects De-duplicate the code that calls the extra compiler's depend_command by using the central function callExtraCompilerDependCommand. This one actually tries to resolve dependencies unlike the removed code that blindly resolved relative paths to the build directory. This fixes dependencies reported by uic which need to be resolved against what is in DEPENDPATH. Fixes: QTBUG-80579 Change-Id: If482e50ff3eff716fefffee82004acc076b3a547 Reviewed-by: Kai Koehne --- qmake/generators/makefile.cpp | 5 +++- qmake/generators/makefile.h | 3 ++- qmake/generators/win32/msvc_objectmodel.cpp | 36 ++++++++--------------------- qmake/generators/win32/msvc_vcproj.h | 2 ++ 4 files changed, 17 insertions(+), 29 deletions(-) diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index ed7d057a88..dcb44239a0 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -1857,10 +1857,13 @@ void MakefileGenerator::callExtraCompilerDependCommand(const ProString &extraCom const QString &tmp_out, bool dep_lines, QStringList *deps, - bool existingDepsOnly) + bool existingDepsOnly, + bool checkCommandAvailability) { char buff[256]; QString dep_cmd = replaceExtraCompilerVariables(tmp_dep_cmd, inpf, tmp_out, LocalShell); + if (checkCommandAvailability && !canExecute(dep_cmd)) + return; dep_cmd = dep_cd_cmd + fixEnvVariables(dep_cmd); if (FILE *proc = QT_POPEN(dep_cmd.toLatin1().constData(), QT_POPEN_READ)) { QByteArray depData; diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h index 47e4c7531c..ab970c966f 100644 --- a/qmake/generators/makefile.h +++ b/qmake/generators/makefile.h @@ -87,7 +87,8 @@ protected: void callExtraCompilerDependCommand(const ProString &extraCompiler, const QString &dep_cd_cmd, const QString &tmp_dep_cmd, const QString &inpf, const QString &tmp_out, bool dep_lines, QStringList *deps, - bool existingDepsOnly); + bool existingDepsOnly, + bool checkCommandAvailability = false); void writeExtraCompilerTargets(QTextStream &t); void writeExtraCompilerVariables(QTextStream &t); bool writeDummyMakefile(QTextStream &t); diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp index 5396eba72e..2b39a4baaa 100644 --- a/qmake/generators/win32/msvc_objectmodel.cpp +++ b/qmake/generators/win32/msvc_objectmodel.cpp @@ -2351,33 +2351,15 @@ bool VCFilter::addExtraCompiler(const VCFilterFile &info) if (!tmp_dep.isEmpty()) deps = tmp_dep; if (!tmp_dep_cmd.isEmpty()) { - // Execute dependency command, and add every line as a dep - char buff[256]; - QString dep_cmd = Project->replaceExtraCompilerVariables( - tmp_dep_cmd, inFile, out, MakefileGenerator::LocalShell); - if(Project->canExecute(dep_cmd)) { - dep_cmd.prepend(QLatin1String("cd ") - + IoUtils::shellQuote(Option::fixPathToLocalOS(Option::output_dir, false)) - + QLatin1String(" && ")); - if (FILE *proc = QT_POPEN(dep_cmd.toLatin1().constData(), QT_POPEN_READ)) { - QString indeps; - while(!feof(proc)) { - int read_in = (int)fread(buff, 1, 255, proc); - if(!read_in) - break; - indeps += QByteArray(buff, read_in); - } - QT_PCLOSE(proc); - if(!indeps.isEmpty()) { - QStringList extradeps = indeps.split(QLatin1Char('\n')); - for (int i = 0; i < extradeps.count(); ++i) { - QString dd = extradeps.at(i).simplified(); - if (!dd.isEmpty()) - deps += Project->fileFixify(dd, MakefileGenerator::FileFixifyFromOutdir); - } - } - } - } + const QString dep_cd_cmd = QLatin1String("cd ") + + IoUtils::shellQuote(Option::fixPathToLocalOS(Option::output_dir, false)) + + QLatin1String(" && "); + Project->callExtraCompilerDependCommand(extraCompilerName, dep_cd_cmd, tmp_dep_cmd, + inFile, out, + true, // dep_lines + &deps, + configs.contains("dep_existing_only"), + true /* checkCommandAvailability */); } for (int i = 0; i < deps.count(); ++i) deps[i] = Option::fixPathToTargetOS( diff --git a/qmake/generators/win32/msvc_vcproj.h b/qmake/generators/win32/msvc_vcproj.h index 8f38252274..c565b709d2 100644 --- a/qmake/generators/win32/msvc_vcproj.h +++ b/qmake/generators/win32/msvc_vcproj.h @@ -69,6 +69,8 @@ public: bool pchIsCFile = false; VCProjectWriter *projectWriter; + using Win32MakefileGenerator::callExtraCompilerDependCommand; + protected: virtual VCProjectWriter *createProjectWriter(); bool doDepends() const override { return false; } // Never necessary -- cgit v1.2.3 From e52239f525d59f965dbbc5dbe2c28314498690b0 Mon Sep 17 00:00:00 2001 From: BogDan Vatra Date: Mon, 6 Jan 2020 16:06:35 +0200 Subject: Use prefixed ssl libs when "-openssl-linked" configure params is used As long as we do a multi abi build in one go there is no easy way for us to know where the ssl libs are located for each ABI. The easiest way is to use libs prefixed with the ABI. For configure set we are using "_arm64-v8a" prefix as the configure script will always use arm64-v8a to run the tests. Don't show the OPENSSL_LIBS example as it won't work on Android. Here https://github.com/KDAB/android_openssl/commit/ebb0b68be4 you can find a script which builds these libs. Fixes: QTBUG-80862 Change-Id: I019c2a208ae48a7356b8f3933d0f4aad5ac156a3 Reviewed-by: Andy Shaw --- src/network/configure.json | 6 +++++- src/network/ssl/ssl.pri | 8 +++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/network/configure.json b/src/network/configure.json index f501465c91..ddf8f4c709 100644 --- a/src/network/configure.json +++ b/src/network/configure.json @@ -93,6 +93,10 @@ "libs": "-llibssl -llibcrypto -lUser32 -lWs2_32 -lAdvapi32 -lCrypt32", "condition": "config.msvc" }, + { + "libs": "-lssl_arm64-v8a -lcrypto_arm64-v8a", + "condition": "config.android" + }, { "libs": "-lssl -lcrypto", "condition": "!config.msvc" @@ -445,7 +449,7 @@ "report": [ { "type": "note", - "condition": "features.openssl-linked && libs.openssl.source != 0 + "condition": "!config.android && features.openssl-linked && libs.openssl.source != 0 && input.openssl.prefix == '' && input.openssl.libs == '' && input.openssl.libs.debug == ''", "message": "When linking against OpenSSL, you can override the default library names through OPENSSL_LIBS. diff --git a/src/network/ssl/ssl.pri b/src/network/ssl/ssl.pri index 8bb70a2aed..a9b7197aca 100644 --- a/src/network/ssl/ssl.pri +++ b/src/network/ssl/ssl.pri @@ -125,9 +125,11 @@ qtConfig(ssl) { # - libs in \lib\VC\static # - configure: -openssl -openssl-linked -I \include -L \lib\VC\static OPENSSL_LIBS="-lUser32 -lAdvapi32 -lGdi32" OPENSSL_LIBS_DEBUG="-lssleay32MDd -llibeay32MDd" OPENSSL_LIBS_RELEASE="-lssleay32MD -llibeay32MD" - qtConfig(openssl-linked): \ - QMAKE_USE_FOR_PRIVATE += openssl - else: \ + qtConfig(openssl-linked): { + android { + build_pass: LIBS_PRIVATE += -lssl_$${QT_ARCH} -lcrypto_$${QT_ARCH} + } else: QMAKE_USE_FOR_PRIVATE += openssl + } else: \ QMAKE_USE_FOR_PRIVATE += openssl/nolink win32 { LIBS_PRIVATE += -lcrypt32 -- cgit v1.2.3 From 78d2a04a01dbb989c017843f9d6d1f0c485c0e86 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 2 Dec 2019 14:05:58 +0100 Subject: QSystemTrayIcon: Fix geometry() to work with scaling enabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add missing call to QHighDpi::fromNativePixels(), retrieving the screen from the menu. Task-number: QTBUG-79248 Change-Id: I9f358c8010615c3f96ed9dc3b6666013ae9a0ed9 Reviewed-by: Morten Johan Sørvig --- src/widgets/util/qsystemtrayicon_qpa.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/widgets/util/qsystemtrayicon_qpa.cpp b/src/widgets/util/qsystemtrayicon_qpa.cpp index c0bf058681..f2b0819132 100644 --- a/src/widgets/util/qsystemtrayicon_qpa.cpp +++ b/src/widgets/util/qsystemtrayicon_qpa.cpp @@ -42,6 +42,7 @@ #include #include #include +#include #include #include @@ -75,10 +76,14 @@ void QSystemTrayIconPrivate::remove_sys() QRect QSystemTrayIconPrivate::geometry_sys() const { - if (qpa_sys) - return qpa_sys->geometry(); - else + if (!qpa_sys) return QRect(); + auto screen = QGuiApplication::primaryScreen(); +#if QT_CONFIG(menu) + if (menu) + screen = menu->screen(); +#endif + return QHighDpi::fromNativePixels(qpa_sys->geometry(), screen); } void QSystemTrayIconPrivate::updateIcon_sys() -- cgit v1.2.3 From c72322804d47a38ea254bc6c81b5a7b810f5a10d Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 6 Jan 2020 09:48:37 +0100 Subject: uic: Extend the baseline test for Python Previously, there was only a Python compile test which triggers only when PySide2 is found. Rename it to pythonCompile(). Extend the TestEntry structure by adding the base line file and flags, which represent all special cases found in the code. Check for the presence of a Python base line file in addition to the C++ one. Prototypically add one form. Further forms can be added on the go. Task-number: PYSIDE-797 Change-Id: Ic2983fa3cab2399a6809e244f93c663e0212f675 Reviewed-by: Cristian Maureira-Fredes --- tests/auto/tools/uic/baseline/config.ui.py | 678 +++++++++++++++++++++++++++++ tests/auto/tools/uic/tst_uic.cpp | 73 +++- 2 files changed, 730 insertions(+), 21 deletions(-) create mode 100644 tests/auto/tools/uic/baseline/config.ui.py diff --git a/tests/auto/tools/uic/baseline/config.ui.py b/tests/auto/tools/uic/baseline/config.ui.py new file mode 100644 index 0000000000..f7e1ffc773 --- /dev/null +++ b/tests/auto/tools/uic/baseline/config.ui.py @@ -0,0 +1,678 @@ +# -*- coding: utf-8 -*- + +##################################################################### +## +## Copyright (C) 2016 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ +## +## This file is part of the autotests 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$ +## +##################################################################### + +################################################################################ +## Form generated from reading UI file 'config.ui' +## +## Created by: Qt User Interface Compiler version 5.14.1 +## +## WARNING! All changes made in this file will be lost when recompiling UI file! +################################################################################ + +from PySide2.QtCore import (QCoreApplication, QMetaObject, QObject, QPoint, + QRect, QSize, QUrl, Qt) +from PySide2.QtGui import (QBrush, QColor, QConicalGradient, QFont, + QFontDatabase, QIcon, QLinearGradient, QPalette, QPainter, QPixmap, + QRadialGradient) +from PySide2.QtWidgets import * + +import GammaView + + +class Ui_Config(object): + def setupUi(self, Config): + if Config.objectName(): + Config.setObjectName(u"Config") + Config.resize(600, 650) + Config.setSizeGripEnabled(True) + self.vboxLayout = QVBoxLayout(Config) + self.vboxLayout.setSpacing(6) + self.vboxLayout.setContentsMargins(11, 11, 11, 11) + self.vboxLayout.setObjectName(u"vboxLayout") + self.vboxLayout.setContentsMargins(8, 8, 8, 8) + self.hboxLayout = QHBoxLayout() + self.hboxLayout.setSpacing(6) + self.hboxLayout.setObjectName(u"hboxLayout") + self.hboxLayout.setContentsMargins(0, 0, 0, 0) + self.ButtonGroup1 = QGroupBox(Config) + self.ButtonGroup1.setObjectName(u"ButtonGroup1") + sizePolicy = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.ButtonGroup1.sizePolicy().hasHeightForWidth()) + self.ButtonGroup1.setSizePolicy(sizePolicy) + self.vboxLayout1 = QVBoxLayout(self.ButtonGroup1) + self.vboxLayout1.setSpacing(6) + self.vboxLayout1.setContentsMargins(11, 11, 11, 11) + self.vboxLayout1.setObjectName(u"vboxLayout1") + self.vboxLayout1.setContentsMargins(11, 11, 11, 11) + self.size_176_220 = QRadioButton(self.ButtonGroup1) + self.size_176_220.setObjectName(u"size_176_220") + + self.vboxLayout1.addWidget(self.size_176_220) + + self.size_240_320 = QRadioButton(self.ButtonGroup1) + self.size_240_320.setObjectName(u"size_240_320") + + self.vboxLayout1.addWidget(self.size_240_320) + + self.size_320_240 = QRadioButton(self.ButtonGroup1) + self.size_320_240.setObjectName(u"size_320_240") + + self.vboxLayout1.addWidget(self.size_320_240) + + self.size_640_480 = QRadioButton(self.ButtonGroup1) + self.size_640_480.setObjectName(u"size_640_480") + + self.vboxLayout1.addWidget(self.size_640_480) + + self.size_800_600 = QRadioButton(self.ButtonGroup1) + self.size_800_600.setObjectName(u"size_800_600") + + self.vboxLayout1.addWidget(self.size_800_600) + + self.size_1024_768 = QRadioButton(self.ButtonGroup1) + self.size_1024_768.setObjectName(u"size_1024_768") + + self.vboxLayout1.addWidget(self.size_1024_768) + + self.hboxLayout1 = QHBoxLayout() + self.hboxLayout1.setSpacing(6) + self.hboxLayout1.setObjectName(u"hboxLayout1") + self.hboxLayout1.setContentsMargins(0, 0, 0, 0) + self.size_custom = QRadioButton(self.ButtonGroup1) + self.size_custom.setObjectName(u"size_custom") + sizePolicy1 = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed) + sizePolicy1.setHorizontalStretch(0) + sizePolicy1.setVerticalStretch(0) + sizePolicy1.setHeightForWidth(self.size_custom.sizePolicy().hasHeightForWidth()) + self.size_custom.setSizePolicy(sizePolicy1) + + self.hboxLayout1.addWidget(self.size_custom) + + self.size_width = QSpinBox(self.ButtonGroup1) + self.size_width.setObjectName(u"size_width") + self.size_width.setMinimum(1) + self.size_width.setMaximum(1280) + self.size_width.setSingleStep(16) + self.size_width.setValue(400) + + self.hboxLayout1.addWidget(self.size_width) + + self.size_height = QSpinBox(self.ButtonGroup1) + self.size_height.setObjectName(u"size_height") + self.size_height.setMinimum(1) + self.size_height.setMaximum(1024) + self.size_height.setSingleStep(16) + self.size_height.setValue(300) + + self.hboxLayout1.addWidget(self.size_height) + + + self.vboxLayout1.addLayout(self.hboxLayout1) + + + self.hboxLayout.addWidget(self.ButtonGroup1) + + self.ButtonGroup2 = QGroupBox(Config) + self.ButtonGroup2.setObjectName(u"ButtonGroup2") + self.vboxLayout2 = QVBoxLayout(self.ButtonGroup2) + self.vboxLayout2.setSpacing(6) + self.vboxLayout2.setContentsMargins(11, 11, 11, 11) + self.vboxLayout2.setObjectName(u"vboxLayout2") + self.vboxLayout2.setContentsMargins(11, 11, 11, 11) + self.depth_1 = QRadioButton(self.ButtonGroup2) + self.depth_1.setObjectName(u"depth_1") + + self.vboxLayout2.addWidget(self.depth_1) + + self.depth_4gray = QRadioButton(self.ButtonGroup2) + self.depth_4gray.setObjectName(u"depth_4gray") + + self.vboxLayout2.addWidget(self.depth_4gray) + + self.depth_8 = QRadioButton(self.ButtonGroup2) + self.depth_8.setObjectName(u"depth_8") + + self.vboxLayout2.addWidget(self.depth_8) + + self.depth_12 = QRadioButton(self.ButtonGroup2) + self.depth_12.setObjectName(u"depth_12") + + self.vboxLayout2.addWidget(self.depth_12) + + self.depth_15 = QRadioButton(self.ButtonGroup2) + self.depth_15.setObjectName(u"depth_15") + + self.vboxLayout2.addWidget(self.depth_15) + + self.depth_16 = QRadioButton(self.ButtonGroup2) + self.depth_16.setObjectName(u"depth_16") + + self.vboxLayout2.addWidget(self.depth_16) + + self.depth_18 = QRadioButton(self.ButtonGroup2) + self.depth_18.setObjectName(u"depth_18") + + self.vboxLayout2.addWidget(self.depth_18) + + self.depth_24 = QRadioButton(self.ButtonGroup2) + self.depth_24.setObjectName(u"depth_24") + + self.vboxLayout2.addWidget(self.depth_24) + + self.depth_32 = QRadioButton(self.ButtonGroup2) + self.depth_32.setObjectName(u"depth_32") + + self.vboxLayout2.addWidget(self.depth_32) + + self.depth_32_argb = QRadioButton(self.ButtonGroup2) + self.depth_32_argb.setObjectName(u"depth_32_argb") + + self.vboxLayout2.addWidget(self.depth_32_argb) + + + self.hboxLayout.addWidget(self.ButtonGroup2) + + + self.vboxLayout.addLayout(self.hboxLayout) + + self.hboxLayout2 = QHBoxLayout() + self.hboxLayout2.setSpacing(6) + self.hboxLayout2.setObjectName(u"hboxLayout2") + self.hboxLayout2.setContentsMargins(0, 0, 0, 0) + self.TextLabel1_3 = QLabel(Config) + self.TextLabel1_3.setObjectName(u"TextLabel1_3") + + self.hboxLayout2.addWidget(self.TextLabel1_3) + + self.skin = QComboBox(Config) + self.skin.addItem("") + self.skin.setObjectName(u"skin") + sizePolicy2 = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed) + sizePolicy2.setHorizontalStretch(0) + sizePolicy2.setVerticalStretch(0) + sizePolicy2.setHeightForWidth(self.skin.sizePolicy().hasHeightForWidth()) + self.skin.setSizePolicy(sizePolicy2) + + self.hboxLayout2.addWidget(self.skin) + + + self.vboxLayout.addLayout(self.hboxLayout2) + + self.touchScreen = QCheckBox(Config) + self.touchScreen.setObjectName(u"touchScreen") + + self.vboxLayout.addWidget(self.touchScreen) + + self.lcdScreen = QCheckBox(Config) + self.lcdScreen.setObjectName(u"lcdScreen") + + self.vboxLayout.addWidget(self.lcdScreen) + + self.spacerItem = QSpacerItem(20, 10, QSizePolicy.Minimum, QSizePolicy.Expanding) + + self.vboxLayout.addItem(self.spacerItem) + + self.TextLabel1 = QLabel(Config) + self.TextLabel1.setObjectName(u"TextLabel1") + sizePolicy.setHeightForWidth(self.TextLabel1.sizePolicy().hasHeightForWidth()) + self.TextLabel1.setSizePolicy(sizePolicy) + self.TextLabel1.setWordWrap(True) + + self.vboxLayout.addWidget(self.TextLabel1) + + self.GroupBox1 = QGroupBox(Config) + self.GroupBox1.setObjectName(u"GroupBox1") + self.gridLayout = QGridLayout(self.GroupBox1) + self.gridLayout.setSpacing(6) + self.gridLayout.setContentsMargins(11, 11, 11, 11) + self.gridLayout.setObjectName(u"gridLayout") + self.gridLayout.setHorizontalSpacing(6) + self.gridLayout.setVerticalSpacing(6) + self.gridLayout.setContentsMargins(11, 11, 11, 11) + self.TextLabel3 = QLabel(self.GroupBox1) + self.TextLabel3.setObjectName(u"TextLabel3") + + self.gridLayout.addWidget(self.TextLabel3, 6, 0, 1, 1) + + self.bslider = QSlider(self.GroupBox1) + self.bslider.setObjectName(u"bslider") + palette = QPalette() + brush = QBrush(QColor(128, 128, 128, 255)) + brush.setStyle(Qt.SolidPattern) + palette.setBrush(QPalette.Active, QPalette.WindowText, brush) + brush1 = QBrush(QColor(0, 0, 255, 255)) + brush1.setStyle(Qt.SolidPattern) + palette.setBrush(QPalette.Active, QPalette.Button, brush1) + brush2 = QBrush(QColor(127, 127, 255, 255)) + brush2.setStyle(Qt.SolidPattern) + palette.setBrush(QPalette.Active, QPalette.Light, brush2) + brush3 = QBrush(QColor(38, 38, 255, 255)) + brush3.setStyle(Qt.SolidPattern) + palette.setBrush(QPalette.Active, QPalette.Midlight, brush3) + brush4 = QBrush(QColor(0, 0, 127, 255)) + brush4.setStyle(Qt.SolidPattern) + palette.setBrush(QPalette.Active, QPalette.Dark, brush4) + brush5 = QBrush(QColor(0, 0, 170, 255)) + brush5.setStyle(Qt.SolidPattern) + palette.setBrush(QPalette.Active, QPalette.Mid, brush5) + brush6 = QBrush(QColor(0, 0, 0, 255)) + brush6.setStyle(Qt.SolidPattern) + palette.setBrush(QPalette.Active, QPalette.Text, brush6) + brush7 = QBrush(QColor(255, 255, 255, 255)) + brush7.setStyle(Qt.SolidPattern) + palette.setBrush(QPalette.Active, QPalette.BrightText, brush7) + palette.setBrush(QPalette.Active, QPalette.ButtonText, brush) + palette.setBrush(QPalette.Active, QPalette.Base, brush7) + brush8 = QBrush(QColor(220, 220, 220, 255)) + brush8.setStyle(Qt.SolidPattern) + palette.setBrush(QPalette.Active, QPalette.Window, brush8) + palette.setBrush(QPalette.Active, QPalette.Shadow, brush6) + brush9 = QBrush(QColor(10, 95, 137, 255)) + brush9.setStyle(Qt.SolidPattern) + palette.setBrush(QPalette.Active, QPalette.Highlight, brush9) + palette.setBrush(QPalette.Active, QPalette.HighlightedText, brush7) + palette.setBrush(QPalette.Active, QPalette.Link, brush6) + palette.setBrush(QPalette.Active, QPalette.LinkVisited, brush6) + brush10 = QBrush(QColor(232, 232, 232, 255)) + brush10.setStyle(Qt.SolidPattern) + palette.setBrush(QPalette.Active, QPalette.AlternateBase, brush10) + palette.setBrush(QPalette.Inactive, QPalette.WindowText, brush) + palette.setBrush(QPalette.Inactive, QPalette.Button, brush1) + palette.setBrush(QPalette.Inactive, QPalette.Light, brush2) + palette.setBrush(QPalette.Inactive, QPalette.Midlight, brush3) + palette.setBrush(QPalette.Inactive, QPalette.Dark, brush4) + palette.setBrush(QPalette.Inactive, QPalette.Mid, brush5) + palette.setBrush(QPalette.Inactive, QPalette.Text, brush6) + palette.setBrush(QPalette.Inactive, QPalette.BrightText, brush7) + palette.setBrush(QPalette.Inactive, QPalette.ButtonText, brush) + palette.setBrush(QPalette.Inactive, QPalette.Base, brush7) + palette.setBrush(QPalette.Inactive, QPalette.Window, brush8) + palette.setBrush(QPalette.Inactive, QPalette.Shadow, brush6) + palette.setBrush(QPalette.Inactive, QPalette.Highlight, brush9) + palette.setBrush(QPalette.Inactive, QPalette.HighlightedText, brush7) + palette.setBrush(QPalette.Inactive, QPalette.Link, brush6) + palette.setBrush(QPalette.Inactive, QPalette.LinkVisited, brush6) + palette.setBrush(QPalette.Inactive, QPalette.AlternateBase, brush10) + palette.setBrush(QPalette.Disabled, QPalette.WindowText, brush) + palette.setBrush(QPalette.Disabled, QPalette.Button, brush1) + palette.setBrush(QPalette.Disabled, QPalette.Light, brush2) + palette.setBrush(QPalette.Disabled, QPalette.Midlight, brush3) + palette.setBrush(QPalette.Disabled, QPalette.Dark, brush4) + palette.setBrush(QPalette.Disabled, QPalette.Mid, brush5) + palette.setBrush(QPalette.Disabled, QPalette.Text, brush6) + palette.setBrush(QPalette.Disabled, QPalette.BrightText, brush7) + palette.setBrush(QPalette.Disabled, QPalette.ButtonText, brush) + palette.setBrush(QPalette.Disabled, QPalette.Base, brush7) + palette.setBrush(QPalette.Disabled, QPalette.Window, brush8) + palette.setBrush(QPalette.Disabled, QPalette.Shadow, brush6) + palette.setBrush(QPalette.Disabled, QPalette.Highlight, brush9) + palette.setBrush(QPalette.Disabled, QPalette.HighlightedText, brush7) + palette.setBrush(QPalette.Disabled, QPalette.Link, brush6) + palette.setBrush(QPalette.Disabled, QPalette.LinkVisited, brush6) + palette.setBrush(QPalette.Disabled, QPalette.AlternateBase, brush10) + self.bslider.setPalette(palette) + self.bslider.setMaximum(400) + self.bslider.setValue(100) + self.bslider.setOrientation(Qt.Horizontal) + + self.gridLayout.addWidget(self.bslider, 6, 1, 1, 1) + + self.blabel = QLabel(self.GroupBox1) + self.blabel.setObjectName(u"blabel") + + self.gridLayout.addWidget(self.blabel, 6, 2, 1, 1) + + self.TextLabel2 = QLabel(self.GroupBox1) + self.TextLabel2.setObjectName(u"TextLabel2") + + self.gridLayout.addWidget(self.TextLabel2, 4, 0, 1, 1) + + self.gslider = QSlider(self.GroupBox1) + self.gslider.setObjectName(u"gslider") + palette1 = QPalette() + palette1.setBrush(QPalette.Active, QPalette.WindowText, brush) + brush11 = QBrush(QColor(0, 255, 0, 255)) + brush11.setStyle(Qt.SolidPattern) + palette1.setBrush(QPalette.Active, QPalette.Button, brush11) + brush12 = QBrush(QColor(127, 255, 127, 255)) + brush12.setStyle(Qt.SolidPattern) + palette1.setBrush(QPalette.Active, QPalette.Light, brush12) + brush13 = QBrush(QColor(38, 255, 38, 255)) + brush13.setStyle(Qt.SolidPattern) + palette1.setBrush(QPalette.Active, QPalette.Midlight, brush13) + brush14 = QBrush(QColor(0, 127, 0, 255)) + brush14.setStyle(Qt.SolidPattern) + palette1.setBrush(QPalette.Active, QPalette.Dark, brush14) + brush15 = QBrush(QColor(0, 170, 0, 255)) + brush15.setStyle(Qt.SolidPattern) + palette1.setBrush(QPalette.Active, QPalette.Mid, brush15) + palette1.setBrush(QPalette.Active, QPalette.Text, brush6) + palette1.setBrush(QPalette.Active, QPalette.BrightText, brush7) + palette1.setBrush(QPalette.Active, QPalette.ButtonText, brush) + palette1.setBrush(QPalette.Active, QPalette.Base, brush7) + palette1.setBrush(QPalette.Active, QPalette.Window, brush8) + palette1.setBrush(QPalette.Active, QPalette.Shadow, brush6) + palette1.setBrush(QPalette.Active, QPalette.Highlight, brush9) + palette1.setBrush(QPalette.Active, QPalette.HighlightedText, brush7) + palette1.setBrush(QPalette.Active, QPalette.Link, brush6) + palette1.setBrush(QPalette.Active, QPalette.LinkVisited, brush6) + palette1.setBrush(QPalette.Active, QPalette.AlternateBase, brush10) + palette1.setBrush(QPalette.Inactive, QPalette.WindowText, brush) + palette1.setBrush(QPalette.Inactive, QPalette.Button, brush11) + palette1.setBrush(QPalette.Inactive, QPalette.Light, brush12) + palette1.setBrush(QPalette.Inactive, QPalette.Midlight, brush13) + palette1.setBrush(QPalette.Inactive, QPalette.Dark, brush14) + palette1.setBrush(QPalette.Inactive, QPalette.Mid, brush15) + palette1.setBrush(QPalette.Inactive, QPalette.Text, brush6) + palette1.setBrush(QPalette.Inactive, QPalette.BrightText, brush7) + palette1.setBrush(QPalette.Inactive, QPalette.ButtonText, brush) + palette1.setBrush(QPalette.Inactive, QPalette.Base, brush7) + palette1.setBrush(QPalette.Inactive, QPalette.Window, brush8) + palette1.setBrush(QPalette.Inactive, QPalette.Shadow, brush6) + palette1.setBrush(QPalette.Inactive, QPalette.Highlight, brush9) + palette1.setBrush(QPalette.Inactive, QPalette.HighlightedText, brush7) + palette1.setBrush(QPalette.Inactive, QPalette.Link, brush6) + palette1.setBrush(QPalette.Inactive, QPalette.LinkVisited, brush6) + palette1.setBrush(QPalette.Inactive, QPalette.AlternateBase, brush10) + palette1.setBrush(QPalette.Disabled, QPalette.WindowText, brush) + palette1.setBrush(QPalette.Disabled, QPalette.Button, brush11) + palette1.setBrush(QPalette.Disabled, QPalette.Light, brush12) + palette1.setBrush(QPalette.Disabled, QPalette.Midlight, brush13) + palette1.setBrush(QPalette.Disabled, QPalette.Dark, brush14) + palette1.setBrush(QPalette.Disabled, QPalette.Mid, brush15) + palette1.setBrush(QPalette.Disabled, QPalette.Text, brush6) + palette1.setBrush(QPalette.Disabled, QPalette.BrightText, brush7) + palette1.setBrush(QPalette.Disabled, QPalette.ButtonText, brush) + palette1.setBrush(QPalette.Disabled, QPalette.Base, brush7) + palette1.setBrush(QPalette.Disabled, QPalette.Window, brush8) + palette1.setBrush(QPalette.Disabled, QPalette.Shadow, brush6) + palette1.setBrush(QPalette.Disabled, QPalette.Highlight, brush9) + palette1.setBrush(QPalette.Disabled, QPalette.HighlightedText, brush7) + palette1.setBrush(QPalette.Disabled, QPalette.Link, brush6) + palette1.setBrush(QPalette.Disabled, QPalette.LinkVisited, brush6) + palette1.setBrush(QPalette.Disabled, QPalette.AlternateBase, brush10) + self.gslider.setPalette(palette1) + self.gslider.setMaximum(400) + self.gslider.setValue(100) + self.gslider.setOrientation(Qt.Horizontal) + + self.gridLayout.addWidget(self.gslider, 4, 1, 1, 1) + + self.glabel = QLabel(self.GroupBox1) + self.glabel.setObjectName(u"glabel") + + self.gridLayout.addWidget(self.glabel, 4, 2, 1, 1) + + self.TextLabel7 = QLabel(self.GroupBox1) + self.TextLabel7.setObjectName(u"TextLabel7") + + self.gridLayout.addWidget(self.TextLabel7, 0, 0, 1, 1) + + self.TextLabel8 = QLabel(self.GroupBox1) + self.TextLabel8.setObjectName(u"TextLabel8") + + self.gridLayout.addWidget(self.TextLabel8, 0, 2, 1, 1) + + self.gammaslider = QSlider(self.GroupBox1) + self.gammaslider.setObjectName(u"gammaslider") + palette2 = QPalette() + palette2.setBrush(QPalette.Active, QPalette.WindowText, brush) + palette2.setBrush(QPalette.Active, QPalette.Button, brush7) + palette2.setBrush(QPalette.Active, QPalette.Light, brush7) + palette2.setBrush(QPalette.Active, QPalette.Midlight, brush7) + brush16 = QBrush(QColor(127, 127, 127, 255)) + brush16.setStyle(Qt.SolidPattern) + palette2.setBrush(QPalette.Active, QPalette.Dark, brush16) + brush17 = QBrush(QColor(170, 170, 170, 255)) + brush17.setStyle(Qt.SolidPattern) + palette2.setBrush(QPalette.Active, QPalette.Mid, brush17) + palette2.setBrush(QPalette.Active, QPalette.Text, brush6) + palette2.setBrush(QPalette.Active, QPalette.BrightText, brush7) + palette2.setBrush(QPalette.Active, QPalette.ButtonText, brush) + palette2.setBrush(QPalette.Active, QPalette.Base, brush7) + palette2.setBrush(QPalette.Active, QPalette.Window, brush8) + palette2.setBrush(QPalette.Active, QPalette.Shadow, brush6) + palette2.setBrush(QPalette.Active, QPalette.Highlight, brush9) + palette2.setBrush(QPalette.Active, QPalette.HighlightedText, brush7) + palette2.setBrush(QPalette.Active, QPalette.Link, brush6) + palette2.setBrush(QPalette.Active, QPalette.LinkVisited, brush6) + palette2.setBrush(QPalette.Active, QPalette.AlternateBase, brush10) + palette2.setBrush(QPalette.Inactive, QPalette.WindowText, brush) + palette2.setBrush(QPalette.Inactive, QPalette.Button, brush7) + palette2.setBrush(QPalette.Inactive, QPalette.Light, brush7) + palette2.setBrush(QPalette.Inactive, QPalette.Midlight, brush7) + palette2.setBrush(QPalette.Inactive, QPalette.Dark, brush16) + palette2.setBrush(QPalette.Inactive, QPalette.Mid, brush17) + palette2.setBrush(QPalette.Inactive, QPalette.Text, brush6) + palette2.setBrush(QPalette.Inactive, QPalette.BrightText, brush7) + palette2.setBrush(QPalette.Inactive, QPalette.ButtonText, brush) + palette2.setBrush(QPalette.Inactive, QPalette.Base, brush7) + palette2.setBrush(QPalette.Inactive, QPalette.Window, brush8) + palette2.setBrush(QPalette.Inactive, QPalette.Shadow, brush6) + palette2.setBrush(QPalette.Inactive, QPalette.Highlight, brush9) + palette2.setBrush(QPalette.Inactive, QPalette.HighlightedText, brush7) + palette2.setBrush(QPalette.Inactive, QPalette.Link, brush6) + palette2.setBrush(QPalette.Inactive, QPalette.LinkVisited, brush6) + palette2.setBrush(QPalette.Inactive, QPalette.AlternateBase, brush10) + palette2.setBrush(QPalette.Disabled, QPalette.WindowText, brush) + palette2.setBrush(QPalette.Disabled, QPalette.Button, brush7) + palette2.setBrush(QPalette.Disabled, QPalette.Light, brush7) + palette2.setBrush(QPalette.Disabled, QPalette.Midlight, brush7) + palette2.setBrush(QPalette.Disabled, QPalette.Dark, brush16) + palette2.setBrush(QPalette.Disabled, QPalette.Mid, brush17) + palette2.setBrush(QPalette.Disabled, QPalette.Text, brush6) + palette2.setBrush(QPalette.Disabled, QPalette.BrightText, brush7) + palette2.setBrush(QPalette.Disabled, QPalette.ButtonText, brush) + palette2.setBrush(QPalette.Disabled, QPalette.Base, brush7) + palette2.setBrush(QPalette.Disabled, QPalette.Window, brush8) + palette2.setBrush(QPalette.Disabled, QPalette.Shadow, brush6) + palette2.setBrush(QPalette.Disabled, QPalette.Highlight, brush9) + palette2.setBrush(QPalette.Disabled, QPalette.HighlightedText, brush7) + palette2.setBrush(QPalette.Disabled, QPalette.Link, brush6) + palette2.setBrush(QPalette.Disabled, QPalette.LinkVisited, brush6) + palette2.setBrush(QPalette.Disabled, QPalette.AlternateBase, brush10) + self.gammaslider.setPalette(palette2) + self.gammaslider.setMaximum(400) + self.gammaslider.setValue(100) + self.gammaslider.setOrientation(Qt.Horizontal) + + self.gridLayout.addWidget(self.gammaslider, 0, 1, 1, 1) + + self.TextLabel1_2 = QLabel(self.GroupBox1) + self.TextLabel1_2.setObjectName(u"TextLabel1_2") + + self.gridLayout.addWidget(self.TextLabel1_2, 2, 0, 1, 1) + + self.rlabel = QLabel(self.GroupBox1) + self.rlabel.setObjectName(u"rlabel") + + self.gridLayout.addWidget(self.rlabel, 2, 2, 1, 1) + + self.rslider = QSlider(self.GroupBox1) + self.rslider.setObjectName(u"rslider") + palette3 = QPalette() + palette3.setBrush(QPalette.Active, QPalette.WindowText, brush) + brush18 = QBrush(QColor(255, 0, 0, 255)) + brush18.setStyle(Qt.SolidPattern) + palette3.setBrush(QPalette.Active, QPalette.Button, brush18) + brush19 = QBrush(QColor(255, 127, 127, 255)) + brush19.setStyle(Qt.SolidPattern) + palette3.setBrush(QPalette.Active, QPalette.Light, brush19) + brush20 = QBrush(QColor(255, 38, 38, 255)) + brush20.setStyle(Qt.SolidPattern) + palette3.setBrush(QPalette.Active, QPalette.Midlight, brush20) + brush21 = QBrush(QColor(127, 0, 0, 255)) + brush21.setStyle(Qt.SolidPattern) + palette3.setBrush(QPalette.Active, QPalette.Dark, brush21) + brush22 = QBrush(QColor(170, 0, 0, 255)) + brush22.setStyle(Qt.SolidPattern) + palette3.setBrush(QPalette.Active, QPalette.Mid, brush22) + palette3.setBrush(QPalette.Active, QPalette.Text, brush6) + palette3.setBrush(QPalette.Active, QPalette.BrightText, brush7) + palette3.setBrush(QPalette.Active, QPalette.ButtonText, brush) + palette3.setBrush(QPalette.Active, QPalette.Base, brush7) + palette3.setBrush(QPalette.Active, QPalette.Window, brush8) + palette3.setBrush(QPalette.Active, QPalette.Shadow, brush6) + palette3.setBrush(QPalette.Active, QPalette.Highlight, brush9) + palette3.setBrush(QPalette.Active, QPalette.HighlightedText, brush7) + palette3.setBrush(QPalette.Active, QPalette.Link, brush6) + palette3.setBrush(QPalette.Active, QPalette.LinkVisited, brush6) + palette3.setBrush(QPalette.Active, QPalette.AlternateBase, brush10) + palette3.setBrush(QPalette.Inactive, QPalette.WindowText, brush) + palette3.setBrush(QPalette.Inactive, QPalette.Button, brush18) + palette3.setBrush(QPalette.Inactive, QPalette.Light, brush19) + palette3.setBrush(QPalette.Inactive, QPalette.Midlight, brush20) + palette3.setBrush(QPalette.Inactive, QPalette.Dark, brush21) + palette3.setBrush(QPalette.Inactive, QPalette.Mid, brush22) + palette3.setBrush(QPalette.Inactive, QPalette.Text, brush6) + palette3.setBrush(QPalette.Inactive, QPalette.BrightText, brush7) + palette3.setBrush(QPalette.Inactive, QPalette.ButtonText, brush) + palette3.setBrush(QPalette.Inactive, QPalette.Base, brush7) + palette3.setBrush(QPalette.Inactive, QPalette.Window, brush8) + palette3.setBrush(QPalette.Inactive, QPalette.Shadow, brush6) + palette3.setBrush(QPalette.Inactive, QPalette.Highlight, brush9) + palette3.setBrush(QPalette.Inactive, QPalette.HighlightedText, brush7) + palette3.setBrush(QPalette.Inactive, QPalette.Link, brush6) + palette3.setBrush(QPalette.Inactive, QPalette.LinkVisited, brush6) + palette3.setBrush(QPalette.Inactive, QPalette.AlternateBase, brush10) + palette3.setBrush(QPalette.Disabled, QPalette.WindowText, brush) + palette3.setBrush(QPalette.Disabled, QPalette.Button, brush18) + palette3.setBrush(QPalette.Disabled, QPalette.Light, brush19) + palette3.setBrush(QPalette.Disabled, QPalette.Midlight, brush20) + palette3.setBrush(QPalette.Disabled, QPalette.Dark, brush21) + palette3.setBrush(QPalette.Disabled, QPalette.Mid, brush22) + palette3.setBrush(QPalette.Disabled, QPalette.Text, brush6) + palette3.setBrush(QPalette.Disabled, QPalette.BrightText, brush7) + palette3.setBrush(QPalette.Disabled, QPalette.ButtonText, brush) + palette3.setBrush(QPalette.Disabled, QPalette.Base, brush7) + palette3.setBrush(QPalette.Disabled, QPalette.Window, brush8) + palette3.setBrush(QPalette.Disabled, QPalette.Shadow, brush6) + palette3.setBrush(QPalette.Disabled, QPalette.Highlight, brush9) + palette3.setBrush(QPalette.Disabled, QPalette.HighlightedText, brush7) + palette3.setBrush(QPalette.Disabled, QPalette.Link, brush6) + palette3.setBrush(QPalette.Disabled, QPalette.LinkVisited, brush6) + palette3.setBrush(QPalette.Disabled, QPalette.AlternateBase, brush10) + self.rslider.setPalette(palette3) + self.rslider.setMaximum(400) + self.rslider.setValue(100) + self.rslider.setOrientation(Qt.Horizontal) + + self.gridLayout.addWidget(self.rslider, 2, 1, 1, 1) + + self.PushButton3 = QPushButton(self.GroupBox1) + self.PushButton3.setObjectName(u"PushButton3") + + self.gridLayout.addWidget(self.PushButton3, 8, 0, 1, 3) + + self.MyCustomWidget1 = GammaView(self.GroupBox1) + self.MyCustomWidget1.setObjectName(u"MyCustomWidget1") + + self.gridLayout.addWidget(self.MyCustomWidget1, 0, 3, 9, 1) + + + self.vboxLayout.addWidget(self.GroupBox1) + + self.hboxLayout3 = QHBoxLayout() + self.hboxLayout3.setSpacing(6) + self.hboxLayout3.setObjectName(u"hboxLayout3") + self.hboxLayout3.setContentsMargins(0, 0, 0, 0) + self.spacerItem1 = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum) + + self.hboxLayout3.addItem(self.spacerItem1) + + self.buttonOk = QPushButton(Config) + self.buttonOk.setObjectName(u"buttonOk") + self.buttonOk.setAutoDefault(True) + + self.hboxLayout3.addWidget(self.buttonOk) + + self.buttonCancel = QPushButton(Config) + self.buttonCancel.setObjectName(u"buttonCancel") + self.buttonCancel.setAutoDefault(True) + + self.hboxLayout3.addWidget(self.buttonCancel) + + + self.vboxLayout.addLayout(self.hboxLayout3) + + + self.retranslateUi(Config) + self.size_width.valueChanged.connect(self.size_custom.click) + self.size_height.valueChanged.connect(self.size_custom.click) + + self.buttonOk.setDefault(True) + + + QMetaObject.connectSlotsByName(Config) + # setupUi + + def retranslateUi(self, Config): + Config.setWindowTitle(QCoreApplication.translate("Config", u"Configure", None)) + self.ButtonGroup1.setTitle(QCoreApplication.translate("Config", u"Size", None)) + self.size_176_220.setText(QCoreApplication.translate("Config", u"176x220 \"SmartPhone\"", None)) + self.size_240_320.setText(QCoreApplication.translate("Config", u"240x320 \"PDA\"", None)) + self.size_320_240.setText(QCoreApplication.translate("Config", u"320x240 \"TV\" / \"QVGA\"", None)) + self.size_640_480.setText(QCoreApplication.translate("Config", u"640x480 \"VGA\"", None)) + self.size_800_600.setText(QCoreApplication.translate("Config", u"800x600", None)) + self.size_1024_768.setText(QCoreApplication.translate("Config", u"1024x768", None)) + self.size_custom.setText(QCoreApplication.translate("Config", u"Custom", None)) + self.ButtonGroup2.setTitle(QCoreApplication.translate("Config", u"Depth", None)) + self.depth_1.setText(QCoreApplication.translate("Config", u"1 bit monochrome", None)) + self.depth_4gray.setText(QCoreApplication.translate("Config", u"4 bit grayscale", None)) + self.depth_8.setText(QCoreApplication.translate("Config", u"8 bit", None)) + self.depth_12.setText(QCoreApplication.translate("Config", u"12 (16) bit", None)) + self.depth_15.setText(QCoreApplication.translate("Config", u"15 bit", None)) + self.depth_16.setText(QCoreApplication.translate("Config", u"16 bit", None)) + self.depth_18.setText(QCoreApplication.translate("Config", u"18 bit", None)) + self.depth_24.setText(QCoreApplication.translate("Config", u"24 bit", None)) + self.depth_32.setText(QCoreApplication.translate("Config", u"32 bit", None)) + self.depth_32_argb.setText(QCoreApplication.translate("Config", u"32 bit ARGB", None)) + self.TextLabel1_3.setText(QCoreApplication.translate("Config", u"Skin", None)) + self.skin.setItemText(0, QCoreApplication.translate("Config", u"None", None)) + + self.touchScreen.setText(QCoreApplication.translate("Config", u"Emulate touch screen (no mouse move)", None)) + self.lcdScreen.setText(QCoreApplication.translate("Config", u"Emulate LCD screen (Only with fixed zoom of 3.0 times magnification)", None)) + self.TextLabel1.setText(QCoreApplication.translate("Config", u"

Note that any applications using the virtual framebuffer will be terminated if you change the Size or Depth above. You may freely modify the Gamma below.", None)) + self.GroupBox1.setTitle(QCoreApplication.translate("Config", u"Gamma", None)) + self.TextLabel3.setText(QCoreApplication.translate("Config", u"Blue", None)) + self.blabel.setText(QCoreApplication.translate("Config", u"1.0", None)) + self.TextLabel2.setText(QCoreApplication.translate("Config", u"Green", None)) + self.glabel.setText(QCoreApplication.translate("Config", u"1.0", None)) + self.TextLabel7.setText(QCoreApplication.translate("Config", u"All", None)) + self.TextLabel8.setText(QCoreApplication.translate("Config", u"1.0", None)) + self.TextLabel1_2.setText(QCoreApplication.translate("Config", u"Red", None)) + self.rlabel.setText(QCoreApplication.translate("Config", u"1.0", None)) + self.PushButton3.setText(QCoreApplication.translate("Config", u"Set all to 1.0", None)) + self.buttonOk.setText(QCoreApplication.translate("Config", u"&OK", None)) + self.buttonCancel.setText(QCoreApplication.translate("Config", u"&Cancel", None)) + # retranslateUi + diff --git a/tests/auto/tools/uic/tst_uic.cpp b/tests/auto/tools/uic/tst_uic.cpp index 5b2f1f008b..4c0a4bbe26 100644 --- a/tests/auto/tools/uic/tst_uic.cpp +++ b/tests/auto/tools/uic/tst_uic.cpp @@ -45,11 +45,23 @@ static const char diffToStderrEnvVar[] = "UIC_STDERR_DIFF"; struct TestEntry { + enum Flag + { + IdBasedTranslation = 0x1, + Python = 0x2, // Python baseline is present + DontTestPythonCompile = 0x4 // Do not test Python compilation + }; + Q_DECLARE_FLAGS(Flags, Flag) + QByteArray name; - QString baselineBaseName; + QString uiFileName; + QString baseLineFileName; QString generatedFileName; + Flags flags; }; +Q_DECLARE_OPERATORS_FOR_FLAGS(TestEntry::Flags) + class tst_uic : public QObject { Q_OBJECT @@ -73,8 +85,8 @@ private Q_SLOTS: void compare(); void compare_data() const; - void python(); - void python_data() const; + void pythonCompile(); + void pythonCompile_data() const; void runCompare(); @@ -89,9 +101,12 @@ private: QString m_python; }; +static const char versionRegexp[] = + R"([*#][*#] Created by: Qt User Interface Compiler version \d{1,2}\.\d{1,2}\.\d{1,2})"; + tst_uic::tst_uic() : m_command(QLibraryInfo::location(QLibraryInfo::BinariesPath) + QLatin1String("/uic")) - , m_versionRegexp(QLatin1String(R"(\*\* Created by: Qt User Interface Compiler version \d{1,2}\.\d{1,2}\.\d{1,2})")) + , m_versionRegexp(QLatin1String(versionRegexp)) { } @@ -165,10 +180,27 @@ void tst_uic::populateTestEntries() m_testEntries.reserve(baselineFiles.size()); for (const QFileInfo &baselineFile : baselineFiles) { const QString baseName = baselineFile.baseName(); - const QString baselineBaseName = baseLinePrefix + baseName; - const QString generatedFile = generatedPrefix + baselineFile.fileName() - + QLatin1String(".h"); - m_testEntries.append(TestEntry{baseName.toLocal8Bit(), baselineBaseName, generatedFile}); + TestEntry entry; + // qprintsettingsoutput: variable named 'from' clashes with Python + if (baseName == QLatin1String("qprintsettingsoutput")) + entry.flags.setFlag(TestEntry::DontTestPythonCompile); + else if (baseName == QLatin1String("qttrid")) + entry.flags.setFlag(TestEntry::IdBasedTranslation); + entry.name = baseName.toLocal8Bit(); + entry.uiFileName = baselineFile.absoluteFilePath(); + entry.baseLineFileName = entry.uiFileName + QLatin1String(".h"); + const QString generatedFilePrefix = generatedPrefix + baselineFile.fileName(); + entry.generatedFileName = generatedFilePrefix + QLatin1String(".h"); + m_testEntries.append(entry); + // Check for a Python baseline + entry.baseLineFileName = entry.uiFileName + QLatin1String(".py"); + if (QFileInfo::exists(entry.baseLineFileName)) { + entry.name.append(QByteArrayLiteral("-python")); + entry.flags.setFlag(TestEntry::DontTestPythonCompile); + entry.flags.setFlag(TestEntry::Python); + entry.generatedFileName = generatedFilePrefix + QLatin1String(".py"); + m_testEntries.append(entry); + } } } @@ -237,9 +269,11 @@ void tst_uic::run_data() const for (const TestEntry &te : m_testEntries) { QStringList options; - if (te.name == QByteArrayLiteral("qttrid")) - options << QStringList(QLatin1String("-idbased")); - QTest::newRow(te.name.constData()) << (te.baselineBaseName + QLatin1String(".ui")) + if (te.flags.testFlag(TestEntry::IdBasedTranslation)) + options.append(QLatin1String("-idbased")); + if (te.flags.testFlag(TestEntry::Python)) + options << QLatin1String("-g") << QLatin1String("python"); + QTest::newRow(te.name.constData()) << te.uiFileName << te.generatedFileName << options; } } @@ -319,7 +353,7 @@ void tst_uic::compare_data() const QTest::addColumn("generatedFile"); for (const TestEntry &te : m_testEntries) { - QTest::newRow(te.name.constData()) << (te.baselineBaseName + QLatin1String(".ui.h")) + QTest::newRow(te.name.constData()) << te.baseLineFileName << te.generatedFileName; } } @@ -396,7 +430,8 @@ static inline QByteArray msgCompilePythonFailed(const QByteArray &error) return lines.join('\n'); } -void tst_uic::python_data() const +// Test Python code generation by compiling the file +void tst_uic::pythonCompile_data() const { QTest::addColumn("originalFile"); QTest::addColumn("generatedFile"); @@ -405,19 +440,15 @@ void tst_uic::python_data() const ? qMin(1, m_testEntries.size()) : m_testEntries.size(); for (int i = 0; i < size; ++i) { const TestEntry &te = m_testEntries.at(i); - // qprintsettingsoutput: variable named 'from' clashes with Python - if (!te.baselineBaseName.endsWith(QLatin1String("/qprintsettingsoutput"))) { - QString generatedFile = te.generatedFileName; - generatedFile.chop(1); // foo.h -> foo.py - generatedFile.append(QLatin1String("py")); + if (!te.flags.testFlag(TestEntry::DontTestPythonCompile)) { QTest::newRow(te.name.constData()) - << (te.baselineBaseName + QLatin1String(".ui")) - << generatedFile; + << te.uiFileName + << te.generatedFileName; } } } -void tst_uic::python() +void tst_uic::pythonCompile() { QFETCH(QString, originalFile); QFETCH(QString, generatedFile); -- cgit v1.2.3 From 24217594581e93b7ec3849fb56e49279c5cd3be2 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 2 Jan 2020 11:33:53 +0100 Subject: Restore High DPI scale factors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change the default rounding policy to "Round" so that 2 is used for 150% (144DPI) on Windows, as it was in 5.13. Fixes: QTBUG-80934 Change-Id: I0cba986ce6afc9e2737c656000ad854c07844360 Reviewed-by: Morten Johan Sørvig --- src/gui/kernel/qguiapplication.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index d49f349e7a..888ccd8453 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -153,7 +153,7 @@ Qt::HighDpiScaleFactorRoundingPolicy QGuiApplicationPrivate::highDpiScaleFactorR // that behavior by disabling rounding by default. Qt::HighDpiScaleFactorRoundingPolicy::PassThrough; #else - Qt::HighDpiScaleFactorRoundingPolicy::RoundPreferFloor; + Qt::HighDpiScaleFactorRoundingPolicy::Round; #endif bool QGuiApplicationPrivate::highDpiScalingUpdated = false; @@ -3554,8 +3554,8 @@ Qt::ApplicationState QGuiApplication::applicationState() environment variable. The QGuiApplication::highDpiScaleFactorRoundingPolicy() accessor will reflect the environment, if set. - The default value is Qt::HighDpiScaleFactorRoundingPolicy::RoundPreferFloor. - On Qt for Android the default is Qt::HighDpiScaleFactorRoundingPolicy::PassThough, + The default value is Qt::HighDpiScaleFactorRoundingPolicy::Round. + On Qt for Android the default is Qt::HighDpiScaleFactorRoundingPolicy::PassThrough, which preserves historical behavior from earlier Qt versions. */ void QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy policy) -- cgit v1.2.3 From 5af73cd9db52da287070cede300295b90f7ced67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 7 Jan 2020 13:45:49 +0100 Subject: Skip WA_DontShowOnScreen widgets when checking whether application can quit QApplication tries to close all windows on quit using closeAllWindows, but closeAllWindows skips some windows, in particular any widget with WA_DontShowOnScreen set. QApplication then tries to verify that all windows have been closed, and that logic should skip the same kind of windows as closeAllWindows does. We include WA_DontShowOnScreen so that widgets that are proxied via QGraphicProxyWidget will not prevent the application from quitting. There's still some divergence between closeAllWindows and the logic in QApplication::event's quit handling, but aligning that requires more work than this particular fix, and should probably also be based on using the return value of tryCloseAllWindows() directly. Change-Id: I2555eeee0cb04b8e736109fed57f37150efd1964 Fixes: QTBUG-81107 Reviewed-by: Friedemann Kleint Reviewed-by: Paul Olav Tvete --- src/widgets/kernel/qapplication.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp index bf3cf090ba..f334cc58f9 100644 --- a/src/widgets/kernel/qapplication.cpp +++ b/src/widgets/kernel/qapplication.cpp @@ -1868,7 +1868,7 @@ bool QApplication::event(QEvent *e) closeAllWindows(); for (auto *w : topLevelWidgets()) { if (w->isVisible() && !(w->windowType() == Qt::Desktop) && !(w->windowType() == Qt::Popup) && - (!(w->windowType() == Qt::Dialog) || !w->parentWidget())) { + (!(w->windowType() == Qt::Dialog) || !w->parentWidget()) && !w->testAttribute(Qt::WA_DontShowOnScreen)) { e->ignore(); return true; } -- cgit v1.2.3 From f3b3c971cf4d41d8e10c1374e23917e38c537c54 Mon Sep 17 00:00:00 2001 From: Nico Vertriest Date: Fri, 3 Jan 2020 16:19:32 +0100 Subject: Doc: Correct link errors Task-number: QTBUG-79824 Change-Id: I05caaccab1efa16bc0a01ce3045a9377f9ef640e Reviewed-by: Paul Wicking --- src/testlib/doc/qttestlib.qdocconf | 2 +- src/testlib/doc/src/qttestlib-manual.qdoc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/testlib/doc/qttestlib.qdocconf b/src/testlib/doc/qttestlib.qdocconf index 73310221cf..52e1480295 100644 --- a/src/testlib/doc/qttestlib.qdocconf +++ b/src/testlib/doc/qttestlib.qdocconf @@ -28,7 +28,7 @@ qhp.QtTestLib.subprojects.classes.sortPages = true tagfile = ../../../doc/qttestlib/qttestlib.tags -depends += qtcore qtdoc qtwidgets qtgui qmake qtqmltest +depends += qtcore qtdoc qtwidgets qtgui qmake qtqmltest qtcmake headerdirs += .. diff --git a/src/testlib/doc/src/qttestlib-manual.qdoc b/src/testlib/doc/src/qttestlib-manual.qdoc index 688cc2f2f6..89edabf3f3 100644 --- a/src/testlib/doc/src/qttestlib-manual.qdoc +++ b/src/testlib/doc/src/qttestlib-manual.qdoc @@ -85,7 +85,7 @@ You can use a Qt Creator wizard to create a project that contains Qt tests and build and run them directly from Qt Creator. For more information, see - \l {Running Autotests}. + \l {Qt Creator: Running Autotests}{Running Autotests}. \section1 Creating a Test @@ -146,7 +146,7 @@ \section2 Building with CMake and CTest - You can use \l {CMake and CTest} to create a test. + You can use \l {Building with CMake and CTest} to create a test. \l{https://cmake.org/cmake/help/latest/manual/ctest.1.html}{CTest} enables you to include or exclude tests based on a regular expression that is matched against the test name. You can further apply the \c LABELS property -- cgit v1.2.3 From f2a61f2ce2fa81acb526965d55e5f22d47673b2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C5=82a=C5=BCej=20Szczygie=C5=82?= Date: Mon, 2 Dec 2019 18:17:35 +0100 Subject: xcb: Propagate size hints when window changes its scaling factor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Properly scale size hints to the new scaling factor. Fixes: QTBUG-80476 Change-Id: I1081c9b01560f7e434f0f1de0199ef3d3cae787c Reviewed-by: Tor Arne Vestbø Reviewed-by: Friedemann Kleint Reviewed-by: Morten Johan Sørvig --- src/plugins/platforms/xcb/qxcbwindow.cpp | 5 +++++ src/plugins/platforms/xcb/qxcbwindow.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp index 97da420798..cfe048d5c4 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.cpp +++ b/src/plugins/platforms/xcb/qxcbwindow.cpp @@ -1398,6 +1398,8 @@ void QXcbWindow::propagateSizeHints() } xcb_icccm_set_wm_normal_hints(xcb_connection(), m_window, &hints); + + m_sizeHintsScaleFactor = QHighDpiScaling::scaleAndOrigin(screen()).factor; } void QXcbWindow::requestActivateWindow() @@ -1789,6 +1791,9 @@ void QXcbWindow::handleConfigureNotifyEvent(const xcb_configure_notify_event_t * // will make the comparison later. QWindowSystemInterface::handleWindowScreenChanged(window(), newScreen->screen()); + if (!qFuzzyCompare(QHighDpiScaling::scaleAndOrigin(newScreen).factor, m_sizeHintsScaleFactor)) + propagateSizeHints(); + // Send the synthetic expose event on resize only when the window is shrinked, // because the "XCB_GRAVITY_NORTH_WEST" flag doesn't send it automatically. if (!m_oldWindowSize.isEmpty() diff --git a/src/plugins/platforms/xcb/qxcbwindow.h b/src/plugins/platforms/xcb/qxcbwindow.h index 5de5974ca7..a808437c5a 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.h +++ b/src/plugins/platforms/xcb/qxcbwindow.h @@ -280,6 +280,8 @@ protected: QXcbSyncWindowRequest *m_pendingSyncRequest = nullptr; int m_swapInterval = -1; + + qreal m_sizeHintsScaleFactor = 1.0; }; class QXcbForeignWindow : public QXcbWindow -- cgit v1.2.3