diff options
Diffstat (limited to 'tests/auto/tools')
375 files changed, 13465 insertions, 8910 deletions
diff --git a/tests/auto/tools/CMakeLists.txt b/tests/auto/tools/CMakeLists.txt new file mode 100644 index 0000000000..ffeb228cf3 --- /dev/null +++ b/tests/auto/tools/CMakeLists.txt @@ -0,0 +1,31 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + +# QTBUG-88538 +if(NOT ANDROID AND NOT IOS) + add_subdirectory(qmakelib) + if(QT_FEATURE_qmake) + add_subdirectory(qmake) + endif() + add_subdirectory(moc) + add_subdirectory(rcc) + add_subdirectory(qt_cmake_create) +endif() +# QTBUG-88538 +if(TARGET Qt::Widgets AND NOT ANDROID AND NOT IOS) + add_subdirectory(uic) +endif() +if(run_dbus_tests) + add_subdirectory(qdbuscpp2xml) + add_subdirectory(qdbusxml2cpp) +endif() +if(TARGET Qt::Gui AND QT_FEATURE_process AND NOT CMAKE_CROSSCOMPILING) + # testapp (windeployqt) and source_basicapp (macdeployqt) require QtGui. + if(QT_FEATURE_macdeployqt) + add_subdirectory(macdeployqt) + endif() + if(QT_FEATURE_windeployqt AND BUILD_SHARED_LIBS) + # windeployqt does not work with static Qt builds. See QTBUG-69427. + add_subdirectory(windeployqt) + endif() +endif() diff --git a/tests/auto/tools/macdeployqt/CMakeLists.txt b/tests/auto/tools/macdeployqt/CMakeLists.txt new file mode 100644 index 0000000000..5120b474ae --- /dev/null +++ b/tests/auto/tools/macdeployqt/CMakeLists.txt @@ -0,0 +1,17 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + +##################################################################### +## tst_macdeployqt Test: +##################################################################### + +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_macdeployqt LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + +qt_internal_add_test(tst_macdeployqt + SOURCES + tst_macdeployqt.cpp +) diff --git a/tests/auto/tools/macdeployqt/source_basicapp/basicapp.pro b/tests/auto/tools/macdeployqt/source_basicapp/basicapp.pro new file mode 100644 index 0000000000..bba41b9c12 --- /dev/null +++ b/tests/auto/tools/macdeployqt/source_basicapp/basicapp.pro @@ -0,0 +1 @@ +SOURCES = main.cpp diff --git a/tests/auto/tools/macdeployqt/source_basicapp/main.cpp b/tests/auto/tools/macdeployqt/source_basicapp/main.cpp new file mode 100644 index 0000000000..1e2bb1a3a6 --- /dev/null +++ b/tests/auto/tools/macdeployqt/source_basicapp/main.cpp @@ -0,0 +1,19 @@ +// Copyright (C) 2020 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#include <QGuiApplication> +#include <QRasterWindow> +#include <QScreen> +#include <QTimer> + +// Simple test application just to verify that it comes up properly + +int main(int argc, char ** argv) +{ + QGuiApplication app(argc, argv); + QRasterWindow w; + w.setTitle("macdeployqt test application"); + w.show(); + QTimer::singleShot(200, &w, &QCoreApplication::quit); + return app.exec(); +} diff --git a/tests/auto/tools/macdeployqt/source_plugin_sqlite/main.cpp b/tests/auto/tools/macdeployqt/source_plugin_sqlite/main.cpp new file mode 100644 index 0000000000..12343141f8 --- /dev/null +++ b/tests/auto/tools/macdeployqt/source_plugin_sqlite/main.cpp @@ -0,0 +1,11 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#include <QtSql> + +int main(int argc, char ** argv) +{ + QCoreApplication app(argc, argv); + QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE"); + return db.isValid() ? 0 : 1; +} diff --git a/tests/auto/tools/macdeployqt/source_plugin_sqlite/plugin_sqlite.pro b/tests/auto/tools/macdeployqt/source_plugin_sqlite/plugin_sqlite.pro new file mode 100644 index 0000000000..e8183d3cee --- /dev/null +++ b/tests/auto/tools/macdeployqt/source_plugin_sqlite/plugin_sqlite.pro @@ -0,0 +1,2 @@ +SOURCES = main.cpp +QT += sql diff --git a/tests/auto/tools/macdeployqt/source_plugin_tls/main.cpp b/tests/auto/tools/macdeployqt/source_plugin_tls/main.cpp new file mode 100644 index 0000000000..61b5edd614 --- /dev/null +++ b/tests/auto/tools/macdeployqt/source_plugin_tls/main.cpp @@ -0,0 +1,10 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#include <QtNetwork> + +int main(int argc, char ** argv) +{ + QCoreApplication app(argc, argv); + return QSslSocket::supportsSsl() ? 0 : 1; +} diff --git a/tests/auto/tools/macdeployqt/source_plugin_tls/plugin_tls.pro b/tests/auto/tools/macdeployqt/source_plugin_tls/plugin_tls.pro new file mode 100644 index 0000000000..23954f5941 --- /dev/null +++ b/tests/auto/tools/macdeployqt/source_plugin_tls/plugin_tls.pro @@ -0,0 +1,2 @@ +SOURCES = main.cpp +QT += network diff --git a/tests/auto/tools/macdeployqt/tst_macdeployqt.cpp b/tests/auto/tools/macdeployqt/tst_macdeployqt.cpp new file mode 100644 index 0000000000..3c17acda56 --- /dev/null +++ b/tests/auto/tools/macdeployqt/tst_macdeployqt.cpp @@ -0,0 +1,294 @@ +// Copyright (C) 2020 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#include <QtCore> +#include <QtTest> + +Q_LOGGING_CATEGORY(lcTests, "qt.tools.tests") + +QTemporaryDir *g_temporaryDirectory; +QString g_macdeployqtBinary; +QString g_qmakeBinary; +QString g_makeBinary; +QString g_installNameToolBinary; + +#if QT_CONFIG(process) + +static const QString msgProcessError(const QProcess &process, const QString &what) +{ + QString result; + QTextStream(&result) << what << ": \"" << process.program() << ' ' + << process.arguments().join(QLatin1Char(' ')) << "\": " << process.errorString(); + return result; +} + +static bool runProcess(const QString &binary, + const QStringList &arguments, + QString *errorMessage, + const QString &workingDir = QString(), + const QProcessEnvironment &env = QProcessEnvironment(), + int timeOut = 10000, + QByteArray *stdOut = nullptr, QByteArray *stdErr = nullptr) +{ + QProcess process; + if (!env.isEmpty()) + process.setProcessEnvironment(env); + if (!workingDir.isEmpty()) + process.setWorkingDirectory(workingDir); + + const auto outputReader = qScopeGuard([&] { + QByteArray standardOutput = process.readAllStandardOutput(); + if (!standardOutput.trimmed().isEmpty()) + qCDebug(lcTests).nospace() << "Standard output:\n" << qUtf8Printable(standardOutput.trimmed()); + if (stdOut) + *stdOut = standardOutput; + QByteArray standardError = process.readAllStandardError(); + if (!standardError.trimmed().isEmpty()) + qCDebug(lcTests).nospace() << "Standard error:\n" << qUtf8Printable(standardError.trimmed()); + if (stdErr) + *stdErr = standardError; + }); + + qCDebug(lcTests).noquote() << "Running" << binary + << "with arguments" << arguments + << "in" << workingDir; + + process.start(binary, arguments, QIODevice::ReadOnly); + if (!process.waitForStarted()) { + *errorMessage = msgProcessError(process, "Failed to start"); + return false; + } + if (!process.waitForFinished(timeOut)) { + *errorMessage = msgProcessError(process, "Timed out"); + process.terminate(); + if (!process.waitForFinished(300)) + process.kill(); + return false; + } + + if (process.exitStatus() != QProcess::NormalExit) { + *errorMessage = msgProcessError(process, "Crashed"); + return false; + } + if (process.exitCode() != QProcess::NormalExit) { + *errorMessage = msgProcessError(process, "Exit code " + QString::number(process.exitCode())); + return false; + } + return true; +} + +#else + +static bool runProcess(const QString &binary, + const QStringList &arguments, + QString *arguments, + const QString &workingDir = QString(), + const QProcessEnvironment &env = QProcessEnvironment(), + int timeOut = 5000, + QByteArray *stdOut = Q_NULLPTR, QByteArray *stdErr = Q_NULLPTR) +{ + Q_UNUSED(binary); + Q_UNUSED(arguments); + Q_UNUSED(arguments); + Q_UNUSED(workingDir); + Q_UNUSED(env); + Q_UNUSED(timeOut); + Q_UNUSED(stdOut); + Q_UNUSED(stdErr); + return false; +} + +#endif + +QString sourcePath(const QString &name) +{ + return "source_" + name; +} + +QString buildPath(const QString &name) +{ + return g_temporaryDirectory->path() + "/build_" + name; +} + +bool qmake(const QString &source, const QString &destination, QString *errorMessage) +{ + QStringList args = QStringList() << source; + return runProcess(g_qmakeBinary, args, errorMessage, destination); +} + +bool make(const QString &destination, QString *errorMessage) +{ + QStringList args; + return runProcess(g_makeBinary, args, errorMessage, destination, + {}, 60000); +} + +void build(const QString &name) +{ + // Build the app or framework according to the convention used + // by this test: + // source_name (source code) + // build_name (build artifacts) + + QString source = sourcePath(name); + QString build = buildPath(name); + QString profile = name + ".pro"; + + QString sourcePath = QFINDTESTDATA(source); + QVERIFY(!sourcePath.isEmpty()); + + // Clear/set up build dir + QString buildPath = build; + QVERIFY(QDir(buildPath).removeRecursively()); + QVERIFY(QDir().mkdir(buildPath)); + QVERIFY(QDir(buildPath).exists()); + + // Build application + QString sourceProFile = QDir(sourcePath).canonicalPath() + '/' + profile; + QString errorMessage; + QVERIFY2(qmake(sourceProFile, buildPath, &errorMessage), qPrintable(errorMessage)); + QVERIFY2(make(buildPath, &errorMessage), qPrintable(errorMessage)); +} + +bool changeInstallName(const QString &path, const QString &binary, const QString &from, const QString &to) +{ + QStringList args = QStringList() << binary << "-change" << from << to; + QString errorMessage; + return runProcess(g_installNameToolBinary, args, &errorMessage, path); +} + +bool deploy(const QString &name, const QStringList &options, QString *errorMessage) +{ + QString bundle = name + ".app"; + QString path = buildPath(name); + QStringList args = QStringList() << bundle << options; +#if defined(QT_DEBUG) + args << "-use-debug-libs"; +#endif + if (lcTests().isDebugEnabled()) + args << "-verbose=3"; + return runProcess(g_macdeployqtBinary, args, errorMessage, path); +} + +bool run(const QString &name, QString *errorMessage) +{ + QString path = buildPath(name); + QStringList args; + QString binary = name + ".app/Contents/MacOS/" + name; + return runProcess(binary, args, errorMessage, path); +} + +bool runPrintLibraries(const QString &name, QString *errorMessage, QByteArray *stdErr) +{ + QString binary = name + ".app/Contents/MacOS/" + name; + QString path = buildPath(name); + QStringList args; + QProcessEnvironment env = QProcessEnvironment(); + env.insert("DYLD_PRINT_LIBRARIES", "true"); + QByteArray stdOut; + return runProcess(binary, args, errorMessage, path, env, 5000, &stdOut, stdErr); +} + +void runVerifyDeployment(const QString &name) +{ + QString errorMessage; + // Verify that the application runs after deployment and that it loads binaries from + // the application bundle only. + QByteArray libraries; + QVERIFY2(runPrintLibraries(name, &errorMessage, &libraries), qPrintable(errorMessage)); + const QList<QString> parts = QString::fromLocal8Bit(libraries).split("dyld: loaded:"); + const QString qtPath = QLibraryInfo::path(QLibraryInfo::PrefixPath); + // Let assume Qt is not installed in system + for (const QString &part : parts) { + const auto trimmed = part.trimmed(); + if (trimmed.isEmpty()) + continue; + QVERIFY(!trimmed.startsWith(qtPath)); + } +} + +class tst_macdeployqt : public QObject +{ + Q_OBJECT +private slots: + void initTestCase(); + void cleanupTestCase(); + void basicapp(); + void plugins_data(); + void plugins(); +}; + +void tst_macdeployqt::initTestCase() +{ +#ifdef QT_NO_PROCESS + QSKIP("This test requires QProcess support"); +#endif + + // Set up test-global unique temporary directory + g_temporaryDirectory = new QTemporaryDir(); + g_temporaryDirectory->setAutoRemove(!lcTests().isDebugEnabled()); + QVERIFY(g_temporaryDirectory->isValid()); + + // Locate build and deployment tools + g_macdeployqtBinary = QLibraryInfo::path(QLibraryInfo::BinariesPath) + "/macdeployqt"; + QVERIFY(!g_macdeployqtBinary.isEmpty()); + g_qmakeBinary = QLibraryInfo::path(QLibraryInfo::BinariesPath) + "/qmake"; + QVERIFY(!g_qmakeBinary.isEmpty()); + g_makeBinary = QStandardPaths::findExecutable("make"); + QVERIFY(!g_makeBinary.isEmpty()); + g_installNameToolBinary = QStandardPaths::findExecutable("install_name_tool"); + QVERIFY(!g_installNameToolBinary.isEmpty()); +} + +void tst_macdeployqt::cleanupTestCase() +{ + delete g_temporaryDirectory; +} + +// Verify that deployment of a basic Qt Gui application works +void tst_macdeployqt::basicapp() +{ +#ifdef QT_NO_PROCESS + QSKIP("This test requires QProcess support"); +#endif + + QString errorMessage; + QString name = "basicapp"; + + // Build and verify that the application runs before deployment + build(name); + QVERIFY2(run(name, &errorMessage), qPrintable(errorMessage)); + + // Deploy application + QVERIFY2(deploy(name, QStringList(), &errorMessage), qPrintable(errorMessage)); + + // Verify deployment + runVerifyDeployment(name); +} + +void tst_macdeployqt::plugins_data() +{ + QTest::addColumn<QString>("name"); + QTest::newRow("sqlite") << "plugin_sqlite"; + QTest::newRow("tls") << "plugin_tls"; +} + +void tst_macdeployqt::plugins() +{ + QFETCH(QString, name); + + build(name); + + // Verify that the test app runs before deployment. + QString errorMessage; + if (!run(name, &errorMessage)) { + qDebug() << qPrintable(errorMessage); + QSKIP("Could not run test application before deployment"); + } + + QVERIFY2(deploy(name, QStringList(), &errorMessage), qPrintable(errorMessage)); + runVerifyDeployment(name); +} + +QTEST_MAIN(tst_macdeployqt) +#include "tst_macdeployqt.moc" diff --git a/tests/auto/tools/moc/.gitignore b/tests/auto/tools/moc/.gitignore index 86a604a776..59a275bc62 100644 --- a/tests/auto/tools/moc/.gitignore +++ b/tests/auto/tools/moc/.gitignore @@ -1 +1,2 @@ tst_moc +allmocs.json diff --git a/tests/auto/tools/moc/CMakeLists.txt b/tests/auto/tools/moc/CMakeLists.txt new file mode 100644 index 0000000000..1377c48306 --- /dev/null +++ b/tests/auto/tools/moc/CMakeLists.txt @@ -0,0 +1,159 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + +##################################################################### +## tst_moc Test: +##################################################################### + +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_moc LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + +set(JSON_HEADERS + backslash-newlines.h + c-comments.h + cstyle-enums.h + cxx11-enums.h + cxx11-explicit-override-control.h + cxx11-final-classes.h + cxx11-trailing-return.h + cxx17-namespaces.h + dir-in-include-path.h + escapes-in-string-literals.h + enum_with_include.h + forward-declared-param.h + function-with-attributes.h + gadgetwithnoenums.h + grand-parent-gadget-class.h + moc_include.h + namespace.h + namespaced-flags.h + namespaced-base-class.h + no-keywords.h + non-gadget-parent-class.h + oldstyle-casts.h + parse-defines.h + plugin_metadata.h + pointery_to_incomplete.h + pure-virtual-signals.h + qinvokable.h + qprivateslots.h + qtbug-35657-gadget.h + related-metaobjects-in-gadget.h + related-metaobjects-in-namespaces.h + related-metaobjects-name-conflict.h + signal-with-default-arg.h + single-quote-digit-separator-n3781.h + single_function_keyword.h + slots-with-void-template.h + task192552.h + task234909.h + task240368.h + task87883.h + trigraphs.h + using-namespaces.h +) + +qt_wrap_cpp(comparison_relevant_moc_list ${JSON_HEADERS} + TARGET tst_moc + OPTIONS + "-Muri=com.company.app" + "-Muri=com.company.app.private" + "-DDEFINE_CMDLINE_EMPTY=" + "-DDEFINE_CMDLINE_SIGNAL=void cmdlineSignal(const QMap<int, int> &i)" + "--output-json" +) + +list(TRANSFORM comparison_relevant_moc_list APPEND ".json" OUTPUT_VARIABLE moc_json_files) + +qt_internal_add_test(tst_moc + SOURCES + cxx-attributes.h + tst_moc.cpp + ${comparison_relevant_moc_list} + INCLUDE_DIRECTORIES + testproject + testproject/include + MOC_OPTIONS + "-Muri=com.company.app" + "-Muri=com.company.app.private" + "-DDEFINE_CMDLINE_EMPTY=" + "-DDEFINE_CMDLINE_SIGNAL=void cmdlineSignal(const QMap<int, int> &i)" + "--output-json" + EXCEPTIONS +) + +qt_internal_extend_target(tst_moc LIBRARIES Qt::CorePrivate) + +qt_internal_extend_target(tst_moc CONDITION CMAKE_CROSSCOMPILING + DEFINES + MOC_CROSS_COMPILED +) + +if (UNIX AND (CLANG OR GCC OR QCC)) + qt_wrap_cpp(os9_moc os9-newlines.h) +endif() + +qt_internal_extend_target(tst_moc CONDITION UNIX AND (CLANG OR GCC OR QCC) + SOURCES + os9-newlines.h + win-newlines.h + ${os9_moc} +) + +qt_internal_extend_target(tst_moc CONDITION CLANG OR GCC + SOURCES + dollars.h +) + +qt_internal_extend_target(tst_moc CONDITION TARGET Qt::DBus + LIBRARIES + Qt::DBus +) + +qt_internal_extend_target(tst_moc CONDITION TARGET Qt::Concurrent + LIBRARIES + Qt::Concurrent +) + +qt_internal_extend_target(tst_moc CONDITION TARGET Qt::Network + LIBRARIES + Qt::Network +) + +qt_internal_extend_target(tst_moc CONDITION TARGET Qt::Sql + LIBRARIES + Qt::Sql +) + +get_target_property(target_binary_dir tst_moc BINARY_DIR) +set(cmake_autogen_cache_file + "${target_binary_dir}/CMakeFiles/tst_moc_autogen.dir/ParseCache.txt") +set(cmake_autogen_info_file + "${target_binary_dir}/CMakeFiles/tst_moc_autogen.dir/AutogenInfo.json") +set(moc_json_out ${target_binary_dir}/moc_json_out) + +file(REMOVE ${moc_json_out}) +foreach(filename ${moc_json_files}) + file(APPEND ${moc_json_out} "${filename}\n") +endforeach() + +set(metatype_file "allmocs.json") +configure_file("allmocs_baseline_in.json" "${target_binary_dir}/allmocs_baseline.json") + +add_custom_command(TARGET tst_moc + POST_BUILD + COMMAND ${QT_CMAKE_EXPORT_NAMESPACE}::moc + -o "allmocs.json" + --collect-json "@${moc_json_out}" + COMMENT "Running moc with --collect-json" + VERBATIM +) + +# Add dependencies that are implicitly used inside the test +add_dependencies(tst_moc + Qt::qtpaths + Qt::moc +) diff --git a/tests/auto/tools/moc/Test.framework/Headers/testinterface.h b/tests/auto/tools/moc/Test.framework/Headers/testinterface.h index 491e42772b..486648e312 100644 --- a/tests/auto/tools/moc/Test.framework/Headers/testinterface.h +++ b/tests/auto/tools/moc/Test.framework/Headers/testinterface.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef TESTINTERFACE_H #define TESTINTERFACE_H diff --git a/tests/auto/tools/moc/allmocs_baseline_in.json b/tests/auto/tools/moc/allmocs_baseline_in.json new file mode 100644 index 0000000000..5cbcb99e68 --- /dev/null +++ b/tests/auto/tools/moc/allmocs_baseline_in.json @@ -0,0 +1,3038 @@ +[ + { + "classes": [ + { + "className": "BackslashNewlines", + "object": true, + "qualifiedClassName": "BackslashNewlines", + "slots": [ + { + "access": "public", + "name": "works", + "returnType": "void" + } + ], + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + } + ], + "inputFile": "backslash-newlines.h", + "outputRevision": 68 + }, + { + "classes": [ + { + "className": "IfdefedClass", + "object": true, + "qualifiedClassName": "IfdefedClass", + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + } + ], + "inputFile": "c-comments.h", + "outputRevision": 68 + }, + { + "classes": [ + { + "className": "CStyleEnums", + "enums": [ + { + "isClass": false, + "isFlag": false, + "name": "Baz", + "values": [ + "Foo", + "Bar" + ] + }, + { + "isClass": false, + "isFlag": false, + "name": "Baz2", + "values": [ + "Foo2", + "Bar2" + ] + } + ], + "gadget": true, + "qualifiedClassName": "CStyleEnums" + } + ], + "inputFile": "cstyle-enums.h", + "outputRevision": 68 + }, + { + "classes": [ + { + "className": "CXX11Enums", + "enums": [ + { + "isClass": true, + "isFlag": false, + "name": "EnumClass", + "values": [ + "A0", + "A1", + "A2", + "A3" + ] + }, + { + "isClass": false, + "isFlag": false, + "name": "TypedEnum", + "type": "char", + "values": [ + "B0", + "B1", + "B2", + "B3" + ] + }, + { + "isClass": true, + "isFlag": false, + "name": "TypedEnumClass", + "type": "char", + "values": [ + "C0", + "C1", + "C2", + "C3" + ] + }, + { + "isClass": false, + "isFlag": false, + "name": "NormalEnum", + "values": [ + "D2", + "D3", + "D0", + "D1" + ] + }, + { + "alias": "ClassFlag", + "isClass": true, + "isFlag": true, + "name": "ClassFlags", + "values": [ + "F0", + "F1", + "F2", + "F3" + ] + }, + { + "isClass": true, + "isFlag": false, + "name": "EnumStruct", + "values": [ + "G0", + "G1", + "G2", + "G3" + ] + }, + { + "isClass": true, + "isFlag": false, + "name": "TypedEnumStruct", + "type": "char", + "values": [ + "H0", + "H1", + "H2", + "H3" + ] + }, + { + "alias": "StructFlag", + "isClass": true, + "isFlag": true, + "name": "StructFlags", + "values": [ + "I0", + "I1", + "I2", + "I3" + ] + } + ], + "gadget": true, + "qualifiedClassName": "CXX11Enums" + }, + { + "className": "CXX11Enums2", + "enums": [ + { + "isClass": true, + "isFlag": false, + "name": "EnumClass", + "values": [ + "A0", + "A1", + "A2", + "A3" + ] + }, + { + "isClass": false, + "isFlag": false, + "name": "TypedEnum", + "type": "char", + "values": [ + "B0", + "B1", + "B2", + "B3" + ] + }, + { + "isClass": true, + "isFlag": false, + "name": "TypedEnumClass", + "type": "char", + "values": [ + "C0", + "C1", + "C2", + "C3" + ] + }, + { + "isClass": false, + "isFlag": false, + "name": "NormalEnum", + "values": [ + "D2", + "D3", + "D0", + "D1" + ] + }, + { + "alias": "ClassFlag", + "isClass": true, + "isFlag": true, + "name": "ClassFlags", + "values": [ + "F0", + "F1", + "F2", + "F3" + ] + } + ], + "gadget": true, + "qualifiedClassName": "CXX11Enums2" + }, + { + "className": "CXX11Enums3", + "enums": [ + { + "isClass": true, + "isFlag": false, + "name": "EnumClass", + "values": [ + "A0", + "A1", + "A2", + "A3" + ] + }, + { + "isClass": false, + "isFlag": false, + "name": "TypedEnum", + "type": "char", + "values": [ + "B0", + "B1", + "B2", + "B3" + ] + }, + { + "isClass": true, + "isFlag": false, + "name": "TypedEnumClass", + "type": "char", + "values": [ + "C0", + "C1", + "C2", + "C3" + ] + }, + { + "isClass": false, + "isFlag": false, + "name": "NormalEnum", + "values": [ + "D2", + "D3", + "D0", + "D1" + ] + } + ], + "object": true, + "qualifiedClassName": "CXX11Enums3", + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + } + ], + "inputFile": "cxx11-enums.h", + "outputRevision": 68 + }, + { + "classes": [ + { + "className": "ExplicitOverrideControlBase", + "object": true, + "qualifiedClassName": "ExplicitOverrideControlBase", + "slots": [ + { + "access": "private", + "name": "pureSlot0", + "returnType": "void" + }, + { + "access": "private", + "name": "pureSlot1", + "returnType": "void" + }, + { + "access": "private", + "name": "pureSlot2", + "returnType": "void" + }, + { + "access": "private", + "name": "pureSlot3", + "returnType": "void" + } + ], + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + }, + { + "className": "ExplicitOverrideControlFinalQt", + "object": true, + "qualifiedClassName": "ExplicitOverrideControlFinalQt", + "slots": [ + { + "access": "private", + "name": "pureSlot0", + "returnType": "void" + }, + { + "access": "private", + "name": "pureSlot1", + "returnType": "void" + }, + { + "access": "private", + "name": "pureSlot2", + "returnType": "void" + }, + { + "access": "private", + "name": "pureSlot3", + "returnType": "void" + } + ], + "superClasses": [ + { + "access": "public", + "name": "ExplicitOverrideControlBase" + } + ] + }, + { + "className": "ExplicitOverrideControlFinalCxx11", + "object": true, + "qualifiedClassName": "ExplicitOverrideControlFinalCxx11", + "slots": [ + { + "access": "private", + "name": "pureSlot0", + "returnType": "void" + }, + { + "access": "private", + "name": "pureSlot1", + "returnType": "void" + }, + { + "access": "private", + "name": "pureSlot2", + "returnType": "void" + }, + { + "access": "private", + "name": "pureSlot3", + "returnType": "void" + } + ], + "superClasses": [ + { + "access": "public", + "name": "ExplicitOverrideControlBase" + } + ] + }, + { + "className": "ExplicitOverrideControlSealed", + "object": true, + "qualifiedClassName": "ExplicitOverrideControlSealed", + "slots": [ + { + "access": "private", + "name": "pureSlot0", + "returnType": "void" + }, + { + "access": "private", + "name": "pureSlot1", + "returnType": "void" + }, + { + "access": "private", + "name": "pureSlot2", + "returnType": "void" + }, + { + "access": "private", + "name": "pureSlot3", + "returnType": "void" + } + ], + "superClasses": [ + { + "access": "public", + "name": "ExplicitOverrideControlBase" + } + ] + }, + { + "className": "ExplicitOverrideControlOverrideQt", + "object": true, + "qualifiedClassName": "ExplicitOverrideControlOverrideQt", + "slots": [ + { + "access": "private", + "name": "pureSlot0", + "returnType": "void" + }, + { + "access": "private", + "name": "pureSlot1", + "returnType": "void" + }, + { + "access": "private", + "name": "pureSlot2", + "returnType": "void" + }, + { + "access": "private", + "name": "pureSlot3", + "returnType": "void" + } + ], + "superClasses": [ + { + "access": "public", + "name": "ExplicitOverrideControlBase" + } + ] + }, + { + "className": "ExplicitOverrideControlOverrideCxx11", + "object": true, + "qualifiedClassName": "ExplicitOverrideControlOverrideCxx11", + "slots": [ + { + "access": "private", + "name": "pureSlot0", + "returnType": "void" + }, + { + "access": "private", + "name": "pureSlot1", + "returnType": "void" + }, + { + "access": "private", + "name": "pureSlot2", + "returnType": "void" + }, + { + "access": "private", + "name": "pureSlot3", + "returnType": "void" + } + ], + "superClasses": [ + { + "access": "public", + "name": "ExplicitOverrideControlBase" + } + ] + }, + { + "className": "ExplicitOverrideControlFinalQtOverrideQt", + "object": true, + "qualifiedClassName": "ExplicitOverrideControlFinalQtOverrideQt", + "slots": [ + { + "access": "private", + "name": "pureSlot0", + "returnType": "void" + }, + { + "access": "private", + "name": "pureSlot1", + "returnType": "void" + }, + { + "access": "private", + "name": "pureSlot2", + "returnType": "void" + }, + { + "access": "private", + "name": "pureSlot3", + "returnType": "void" + } + ], + "superClasses": [ + { + "access": "public", + "name": "ExplicitOverrideControlBase" + } + ] + }, + { + "className": "ExplicitOverrideControlFinalCxx11OverrideCxx11", + "object": true, + "qualifiedClassName": "ExplicitOverrideControlFinalCxx11OverrideCxx11", + "slots": [ + { + "access": "private", + "name": "pureSlot0", + "returnType": "void" + }, + { + "access": "private", + "name": "pureSlot1", + "returnType": "void" + }, + { + "access": "private", + "name": "pureSlot2", + "returnType": "void" + }, + { + "access": "private", + "name": "pureSlot3", + "returnType": "void" + } + ], + "superClasses": [ + { + "access": "public", + "name": "ExplicitOverrideControlBase" + } + ] + }, + { + "className": "ExplicitOverrideControlSealedOverride", + "object": true, + "qualifiedClassName": "ExplicitOverrideControlSealedOverride", + "slots": [ + { + "access": "private", + "name": "pureSlot0", + "returnType": "void" + }, + { + "access": "private", + "name": "pureSlot1", + "returnType": "void" + }, + { + "access": "private", + "name": "pureSlot2", + "returnType": "void" + }, + { + "access": "private", + "name": "pureSlot3", + "returnType": "void" + } + ], + "superClasses": [ + { + "access": "public", + "name": "ExplicitOverrideControlBase" + } + ] + } + ], + "inputFile": "cxx11-explicit-override-control.h", + "outputRevision": 68 + }, + { + "classes": [ + { + "className": "FinalTestClassQt", + "object": true, + "qualifiedClassName": "FinalTestClassQt", + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + }, + { + "className": "ExportedFinalTestClassQt", + "object": true, + "qualifiedClassName": "ExportedFinalTestClassQt", + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + }, + { + "className": "ExportedFinalTestClassQtX", + "object": true, + "qualifiedClassName": "ExportedFinalTestClassQtX", + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + }, + { + "className": "FinalTestClassCpp11", + "object": true, + "qualifiedClassName": "FinalTestClassCpp11", + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + }, + { + "className": "ExportedFinalTestClassCpp11", + "object": true, + "qualifiedClassName": "ExportedFinalTestClassCpp11", + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + }, + { + "className": "ExportedFinalTestClassCpp11X", + "object": true, + "qualifiedClassName": "ExportedFinalTestClassCpp11X", + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + }, + { + "className": "SealedTestClass", + "object": true, + "qualifiedClassName": "SealedTestClass", + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + }, + { + "className": "ExportedSealedTestClass", + "object": true, + "qualifiedClassName": "ExportedSealedTestClass", + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + }, + { + "className": "ExportedSealedTestClassX", + "object": true, + "qualifiedClassName": "ExportedSealedTestClassX", + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + } + ], + "inputFile": "cxx11-final-classes.h", + "outputRevision": 68 + }, + { + "classes": [ + { + "className": "CXX11TrailingReturn", + "object": true, + "qualifiedClassName": "CXX11TrailingReturn", + "signals": [ + { + "access": "public", + "arguments": [ + { + "name": "i", + "type": "int" + } + ], + "name": "trailingSignalReturn", + "returnType": "void" + } + ], + "slots": [ + { + "access": "public", + "name": "fun", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "name": "i", + "type": "int" + }, + { + "name": "b", + "type": "char" + } + ], + "name": "arguments", + "returnType": "int" + }, + { + "access": "public", + "arguments": [ + { + "name": "i", + "type": "int" + } + ], + "name": "inlineFunc", + "returnType": "int" + }, + { + "access": "public", + "name": "constRefReturn", + "returnType": "void" + }, + { + "access": "public", + "name": "constConstRefReturn", + "returnType": "void" + } + ], + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + } + ], + "inputFile": "cxx11-trailing-return.h", + "outputRevision": 68 + }, + { + "classes": [ + { + "className": "ClassInNamespace", + "enums": [ + { + "isClass": false, + "isFlag": false, + "name": "GadEn", + "values": [ + "Value" + ] + } + ], + "gadget": true, + "qualifiedClassName": "CXX17Namespace::A::B::C::D::ClassInNamespace" + }, + { + "className": "D", + "enums": [ + { + "isClass": false, + "isFlag": false, + "name": "NamEn", + "values": [ + "Value" + ] + } + ], + "namespace": true, + "qualifiedClassName": "CXX17Namespace::A::B::C::D" + } + ], + "inputFile": "cxx17-namespaces.h", + "outputRevision": 68 + }, + { + "classes": [ + { + "className": "DirInIncludePath", + "interfaces": [ + [ + { + "className": "MyInterface", + "id": "\"MyInterface\"" + } + ] + ], + "object": true, + "qualifiedClassName": "DirInIncludePath", + "superClasses": [ + { + "access": "public", + "name": "QObject" + }, + { + "access": "public", + "name": "MyInterface" + } + ] + } + ], + "inputFile": "dir-in-include-path.h", + "outputRevision": 68 + }, + { + "classes": [ + { + "className": "Foo", + "object": true, + "qualifiedClassName": "Foo", + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + } + ], + "inputFile": "enum_with_include.h", + "outputRevision": 68 + }, + { + "classes": [ + { + "classInfos": [ + { + "name": "Test", + "value": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\x53" + }, + { + "name": "Test2", + "value": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\123" + }, + { + "name": "Test3", + "value": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\nb" + } + ], + "className": "StringLiterals", + "object": true, + "qualifiedClassName": "StringLiterals", + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + } + ], + "inputFile": "escapes-in-string-literals.h", + "outputRevision": 68 + }, + { + "classes": [ + { + "className": "ForwardDeclaredParamClass", + "object": true, + "qualifiedClassName": "ForwardDeclaredParamClass", + "signals": [ + { + "access": "public", + "arguments": [ + { + "type": "ForwardDeclaredParam" + } + ], + "name": "signalNaked", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "type": "ForwardDeclaredContainer<ForwardDeclaredParam>" + } + ], + "name": "signalFDC", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "type": "ForwardDeclaredContainer<int>" + } + ], + "name": "signalFDC", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "type": "ForwardDeclaredContainer<QString>" + } + ], + "name": "signalFDC", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "type": "ForwardDeclaredContainer<FullyDefined>" + } + ], + "name": "signalFDC", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "type": "QSet<ForwardDeclaredParam>" + } + ], + "name": "signalQSet", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "type": "QSet<int>" + } + ], + "name": "signalQSet", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "type": "QSet<QString>" + } + ], + "name": "signalQSet", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "type": "QSet<FullyDefined>" + } + ], + "name": "signalQSet", + "returnType": "void" + } + ], + "slots": [ + { + "access": "public", + "arguments": [ + { + "type": "ForwardDeclaredParam" + } + ], + "name": "slotNaked", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "type": "ForwardDeclaredContainer<ForwardDeclaredParam>" + } + ], + "name": "slotFDC", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "type": "ForwardDeclaredContainer<int>" + } + ], + "name": "slotFDC", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "type": "ForwardDeclaredContainer<QString>" + } + ], + "name": "slotFDC", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "type": "ForwardDeclaredContainer<FullyDefined>" + } + ], + "name": "slotFDC", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "type": "QSet<ForwardDeclaredParam>" + } + ], + "name": "slotQSet", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "type": "QSet<int>" + } + ], + "name": "slotQSet", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "type": "QSet<QString>" + } + ], + "name": "slotQSet", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "type": "QSet<FullyDefined>" + } + ], + "name": "slotQSet", + "returnType": "void" + } + ], + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + } + ], + "inputFile": "forward-declared-param.h", + "outputRevision": 68 + }, + { + "classes": [ + { + "className": "FunctionWithAttributes", + "object": true, + "qualifiedClassName": "FunctionWithAttributes", + "slots": [ + { + "access": "public", + "name": "test1", + "returnType": "void" + }, + { + "access": "public", + "name": "test2", + "returnType": "void" + } + ], + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + } + ], + "inputFile": "function-with-attributes.h", + "outputRevision": 68 + }, + { + "classes": [ + { + "className": "GadgetWithNoEnums", + "gadget": true, + "qualifiedClassName": "GadgetWithNoEnums" + }, + { + "className": "DerivedGadgetWithEnums", + "enums": [ + { + "isClass": false, + "isFlag": false, + "name": "FooEnum", + "values": [ + "FooValue" + ] + } + ], + "gadget": true, + "qualifiedClassName": "DerivedGadgetWithEnums", + "superClasses": [ + { + "access": "public", + "name": "GadgetWithNoEnums" + } + ] + } + ], + "inputFile": "gadgetwithnoenums.h", + "outputRevision": 68 + }, + { + "classes": [ + { + "className": "BaseGadget", + "gadget": true, + "qualifiedClassName": "GrandParentGadget::BaseGadget" + }, + { + "className": "DerivedGadget", + "gadget": true, + "qualifiedClassName": "GrandParentGadget::DerivedGadget", + "superClasses": [ + { + "access": "public", + "name": "Derived" + } + ] + }, + { + "className": "CRTPDerivedGadget", + "gadget": true, + "qualifiedClassName": "GrandParentGadget::CRTPDerivedGadget", + "superClasses": [ + { + "access": "public", + "name": "CRTP<CRTPDerivedGadget>" + } + ] + } + ], + "inputFile": "grand-parent-gadget-class.h", + "outputRevision": 68 + }, + { + "classes": [ + { + "className": "TestFwdProperties", + "object": true, + "properties": [ + { + "constant": false, + "designable": true, + "final": false, + "index": 0, + "name": "prop1", + "read": "getProp1", + "required": false, + "scriptable": true, + "stored": true, + "type": "FwdClass1", + "user": false, + "write": "setProp1" + }, + { + "constant": false, + "designable": true, + "final": false, + "index": 1, + "name": "prop2", + "read": "getProp2", + "required": false, + "scriptable": true, + "stored": true, + "type": "FwdClass2", + "user": false, + "write": "setProp2" + }, + { + "constant": false, + "designable": true, + "final": false, + "index": 2, + "name": "prop3", + "read": "getProp3", + "required": false, + "scriptable": true, + "stored": true, + "type": "FwdClass3", + "user": false, + "write": "setProp3" + } + ], + "qualifiedClassName": "TestFwdProperties", + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + }, + { + "className": "SomeRandomNamespace", + "namespace": true, + "qualifiedClassName": "SomeRandomNamespace" + } + ], + "inputFile": "moc_include.h", + "outputRevision": 68 + }, + { + "classes": [ + { + "className": "FooNamespace", + "enums": [ + { + "isClass": true, + "isFlag": false, + "name": "Enum1", + "values": [ + "Key1", + "Key2" + ] + } + ], + "namespace": true, + "qualifiedClassName": "FooNamespace" + }, + { + "className": "FooNestedNamespace", + "enums": [ + { + "isClass": true, + "isFlag": false, + "name": "Enum2", + "values": [ + "Key3", + "Key4" + ] + }, + { + "isClass": true, + "isFlag": false, + "name": "Enum3", + "values": [ + "Key5", + "Key6" + ] + } + ], + "namespace": true, + "qualifiedClassName": "FooNamespace::FooNestedNamespace" + }, + { + "className": "FooMoreNestedNamespace", + "enums": [ + { + "isClass": true, + "isFlag": false, + "name": "Enum4", + "values": [ + "Key7", + "Key8" + ] + } + ], + "namespace": true, + "qualifiedClassName": "FooNamespace::FooNestedNamespace::FooMoreNestedNamespace" + } + ], + "inputFile": "namespace.h", + "outputRevision": 68 + }, + { + "classes": [ + { + "className": "Base", + "object": true, + "qualifiedClassName": "QTBUG_101141::Base", + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + }, + { + "className": "Derived", + "object": true, + "qualifiedClassName": "QTBUG_101141::Derived", + "superClasses": [ + { + "access": "public", + "fullyQualifiedName": "QTBUG_101141::Base", + "name": "Base" + } + ] + } + ], + "inputFile": "namespaced-base-class.h", + "outputRevision": 68 + }, + { + "classes": [ + { + "className": "Bar", + "enums": [ + { + "alias": "Flag", + "isClass": false, + "isFlag": true, + "name": "Flags", + "values": [ + "Read", + "Write" + ] + } + ], + "object": true, + "properties": [ + { + "constant": false, + "designable": true, + "final": false, + "index": 0, + "name": "flags", + "read": "flags", + "required": false, + "scriptable": true, + "stored": true, + "type": "Flags", + "user": false, + "write": "setFlags" + } + ], + "qualifiedClassName": "Foo::Bar", + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + }, + { + "className": "Baz", + "object": true, + "properties": [ + { + "constant": false, + "designable": true, + "final": false, + "index": 0, + "name": "flags", + "read": "flags", + "required": false, + "scriptable": true, + "stored": true, + "type": "Foo::Bar::Flags", + "user": false, + "write": "setFlags" + }, + { + "constant": false, + "designable": true, + "final": false, + "index": 1, + "name": "flagsList", + "read": "flagsList", + "required": false, + "scriptable": true, + "stored": true, + "type": "QList<Foo::Bar::Flags>", + "user": false, + "write": "setFlagsList" + } + ], + "qualifiedClassName": "Foo::Baz", + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + } + ], + "inputFile": "namespaced-flags.h", + "outputRevision": 68 + }, + { + "classes": [ + { + "className": "MyBooooooostishClass", + "object": true, + "qualifiedClassName": "MyBooooooostishClass", + "signals": [ + { + "access": "public", + "name": "mySignal", + "returnType": "void" + } + ], + "slots": [ + { + "access": "public", + "name": "mySlot", + "returnType": "void" + } + ], + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + } + ], + "inputFile": "no-keywords.h", + "outputRevision": 68 + }, + { + "classes": [ + { + "className": "Derived", + "gadget": true, + "qualifiedClassName": "NonGadgetParent::Derived", + "superClasses": [ + { + "access": "public", + "name": "Base" + } + ] + } + ], + "inputFile": "non-gadget-parent-class.h", + "outputRevision": 68 + }, + { + "classes": [ + { + "className": "OldStyleCast", + "object": true, + "qualifiedClassName": "OldStyleCast", + "slots": [ + { + "access": "public", + "name": "foo", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "type": "int" + }, + { + "type": "int*" + }, + { + "type": "const int*" + }, + { + "type": "volatile int*" + }, + { + "type": "const int*volatile*" + } + ], + "name": "bar", + "returnType": "int" + }, + { + "access": "public", + "arguments": [ + { + "type": "int" + }, + { + "type": "QObject*" + } + ], + "name": "slot", + "returnType": "void" + } + ], + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + } + ], + "inputFile": "oldstyle-casts.h", + "outputRevision": 68 + }, + { + "classes": [ + { + "classInfos": [ + { + "name": "TestString", + "value": "PD_CLASSNAME" + }, + { + "name": "TestString2", + "value": "ParseDefine" + }, + { + "name": "TestString3", + "value": "TestValue" + } + ], + "className": "ParseDefine", + "object": true, + "qualifiedClassName": "PD::ParseDefine", + "signals": [ + { + "access": "public", + "arguments": [ + { + "name": "i", + "type": "QMap<int,int>" + } + ], + "name": "cmdlineSignal", + "returnType": "void" + }, + { + "access": "public", + "name": "signalQTBUG55853", + "returnType": "void" + } + ], + "slots": [ + { + "access": "public", + "name": "voidFunction", + "returnType": "void" + }, + { + "access": "public", + "name": "stringMethod", + "returnType": "QString" + }, + { + "access": "public", + "name": "combined1", + "returnType": "void" + }, + { + "access": "public", + "name": "combined2", + "returnType": "void" + }, + { + "access": "public", + "name": "combined3", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "type": "int" + }, + { + "type": "int" + } + ], + "name": "combined4", + "returnType": "void" + }, + { + "access": "public", + "name": "combined5", + "returnType": "void" + }, + { + "access": "public", + "name": "combined6", + "returnType": "void" + }, + { + "access": "public", + "name": "vararg1", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "type": "int" + } + ], + "name": "vararg2", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "type": "int" + }, + { + "type": "int" + } + ], + "name": "vararg3", + "returnType": "void" + }, + { + "access": "public", + "name": "vararg4", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "type": "int" + } + ], + "name": "vararg5", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "type": "int" + }, + { + "type": "int" + } + ], + "name": "vararg6", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "type": "int" + } + ], + "name": "INNERFUNCTION", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "type": "int" + } + ], + "name": "inner_expanded", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "type": "int" + } + ], + "name": "expanded_method", + "returnType": "void" + }, + { + "access": "public", + "name": "conditionSlot", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "type": "int" + } + ], + "name": "PD_DEFINE_ITSELF_SUFFIX", + "returnType": "void" + } + ], + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + } + ], + "inputFile": "parse-defines.h", + "outputRevision": 68 + }, + { + "classes": [ + { + "className": "TestPluginMetaData", + "object": true, + "qualifiedClassName": "TestPluginMetaData", + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + } + ], + "inputFile": "plugin_metadata.h", + "outputRevision": 68 + }, + { + "classes": [ + { + "className": "TestPointeeCanBeIncomplete", + "object": true, + "qualifiedClassName": "TestPointeeCanBeIncomplete", + "slots": [ + { + "access": "public", + "arguments": [ + { + "type": "QPointer<FwdClass>" + } + ], + "name": "setProp1", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "type": "QSharedPointer<FwdClass>" + } + ], + "name": "setProp2", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "type": "QWeakPointer<FwdClass>" + } + ], + "name": "setProp3", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "type": "FwdClass*" + } + ], + "name": "setProp4", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "type": "const FwdClass*" + } + ], + "name": "setProp5", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "type": "void*" + } + ], + "name": "setProp6", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "type": "const void*" + } + ], + "name": "setProp7", + "returnType": "void" + } + ], + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + } + ], + "inputFile": "pointery_to_incomplete.h", + "outputRevision": 68 + }, + { + "classes": [ + { + "className": "PureVirtualSignalsTest", + "object": true, + "qualifiedClassName": "PureVirtualSignalsTest", + "signals": [ + { + "access": "public", + "name": "mySignal", + "returnType": "void" + }, + { + "access": "public", + "name": "myOtherSignal", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "name": "foo", + "type": "int" + } + ], + "name": "mySignal2", + "returnType": "void" + } + ], + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + }, + { + "className": "PureVirtualSignalsImpl", + "object": true, + "qualifiedClassName": "PureVirtualSignalsImpl", + "signals": [ + { + "access": "public", + "name": "mySignal", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "name": "foo", + "type": "int" + } + ], + "name": "mySignal2", + "returnType": "void" + } + ], + "superClasses": [ + { + "access": "public", + "name": "PureVirtualSignalsTest" + } + ] + } + ], + "inputFile": "pure-virtual-signals.h", + "outputRevision": 68 + }, + { + "classes": [ + { + "className": "InvokableBeforeReturnType", + "methods": [ + { + "access": "public", + "name": "foo", + "returnType": "const char*" + } + ], + "object": true, + "qualifiedClassName": "InvokableBeforeReturnType", + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + }, + { + "className": "InvokableBeforeInline", + "methods": [ + { + "access": "public", + "name": "foo", + "returnType": "void" + }, + { + "access": "public", + "name": "bar", + "returnType": "void" + } + ], + "object": true, + "qualifiedClassName": "InvokableBeforeInline", + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + } + ], + "inputFile": "qinvokable.h", + "outputRevision": 68 + }, + { + "classes": [ + { + "className": "TestQPrivateSlots", + "methods": [ + { + "access": "private", + "name": "method1", + "returnType": "void" + } + ], + "object": true, + "qualifiedClassName": "TestQPrivateSlots", + "slots": [ + { + "access": "private", + "name": "_q_privateslot", + "returnType": "void" + } + ], + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + } + ], + "inputFile": "qprivateslots.h", + "outputRevision": 68 + }, + { + "classes": [ + { + "className": "A", + "enums": [ + { + "isClass": false, + "isFlag": false, + "name": "SomeEnum", + "values": [ + "SomeEnumValue" + ] + } + ], + "gadget": true, + "qualifiedClassName": "QTBUG_35657::A" + } + ], + "inputFile": "qtbug-35657-gadget.h", + "outputRevision": 68 + }, + { + "classes": [ + { + "className": "B", + "object": true, + "properties": [ + { + "constant": false, + "designable": true, + "final": false, + "index": 0, + "name": "blah", + "read": "blah", + "required": false, + "scriptable": true, + "stored": true, + "type": "A::SomeEnum", + "user": false + } + ], + "qualifiedClassName": "QTBUG_35657::B", + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + } + ], + "inputFile": "related-metaobjects-in-gadget.h", + "outputRevision": 68 + }, + { + "classes": [ + { + "className": "A", + "enums": [ + { + "isClass": false, + "isFlag": false, + "name": "SomeEnum", + "values": [ + "SomeEnumValue" + ] + } + ], + "object": true, + "qualifiedClassName": "QTBUG_2151::A", + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + }, + { + "className": "B", + "object": true, + "properties": [ + { + "constant": false, + "designable": true, + "final": false, + "index": 0, + "name": "blah", + "read": "blah", + "required": false, + "scriptable": true, + "stored": true, + "type": "A::SomeEnum", + "user": false + } + ], + "qualifiedClassName": "QTBUG_2151::B", + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + } + ], + "inputFile": "related-metaobjects-in-namespaces.h", + "outputRevision": 68 + }, + { + "classes": [ + { + "className": "Gadget", + "enums": [ + { + "isClass": false, + "isFlag": false, + "name": "SomeEnum", + "values": [ + "SomeEnumValue" + ] + } + ], + "gadget": true, + "qualifiedClassName": "Unsused::Gadget" + }, + { + "className": "Object", + "enums": [ + { + "isClass": false, + "isFlag": false, + "name": "SomeEnum", + "values": [ + "SomeEnumValue" + ] + } + ], + "object": true, + "qualifiedClassName": "Unsused::Object", + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + }, + { + "className": "Gadget", + "enums": [ + { + "isClass": false, + "isFlag": false, + "name": "SomeEnum", + "values": [ + "SomeEnumValue" + ] + } + ], + "gadget": true, + "qualifiedClassName": "NS1::Nested::Gadget" + }, + { + "className": "Object", + "enums": [ + { + "isClass": false, + "isFlag": false, + "name": "SomeEnum", + "values": [ + "SomeEnumValue" + ] + } + ], + "object": true, + "qualifiedClassName": "NS1::Nested::Object", + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + }, + { + "className": "Gadget", + "enums": [ + { + "isClass": false, + "isFlag": false, + "name": "SomeEnum", + "values": [ + "SomeEnumValue" + ] + } + ], + "gadget": true, + "qualifiedClassName": "NS1::NestedUnsused::Gadget" + }, + { + "className": "Object", + "enums": [ + { + "isClass": false, + "isFlag": false, + "name": "SomeEnum", + "values": [ + "SomeEnumValue" + ] + } + ], + "object": true, + "qualifiedClassName": "NS1::NestedUnsused::Object", + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + }, + { + "className": "Gadget", + "enums": [ + { + "isClass": false, + "isFlag": false, + "name": "SomeEnum", + "values": [ + "SomeEnumValue" + ] + } + ], + "gadget": true, + "qualifiedClassName": "NS1::Gadget" + }, + { + "className": "Object", + "enums": [ + { + "isClass": false, + "isFlag": false, + "name": "SomeEnum", + "values": [ + "SomeEnumValue" + ] + } + ], + "object": true, + "qualifiedClassName": "NS1::Object", + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + }, + { + "className": "DependingObject", + "object": true, + "properties": [ + { + "constant": false, + "designable": true, + "final": false, + "index": 0, + "name": "gadgetPoperty", + "read": "gadgetPoperty", + "required": false, + "scriptable": true, + "stored": true, + "type": "Gadget::SomeEnum", + "user": false + }, + { + "constant": false, + "designable": true, + "final": false, + "index": 1, + "name": "objectPoperty", + "read": "objectPoperty", + "required": false, + "scriptable": true, + "stored": true, + "type": "Object::SomeEnum", + "user": false + } + ], + "qualifiedClassName": "NS1::DependingObject", + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + }, + { + "className": "DependingNestedGadget", + "object": true, + "properties": [ + { + "constant": false, + "designable": true, + "final": false, + "index": 0, + "name": "nestedGadgetPoperty", + "read": "nestedGadgetPoperty", + "required": false, + "scriptable": true, + "stored": true, + "type": "Nested::Gadget::SomeEnum", + "user": false + } + ], + "qualifiedClassName": "NS1::DependingNestedGadget", + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + }, + { + "className": "DependingNestedObject", + "object": true, + "properties": [ + { + "constant": false, + "designable": true, + "final": false, + "index": 0, + "name": "nestedObjectPoperty", + "read": "nestedObjectPoperty", + "required": false, + "scriptable": true, + "stored": true, + "type": "Nested::Object::SomeEnum", + "user": false + } + ], + "qualifiedClassName": "NS1::DependingNestedObject", + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + }, + { + "className": "Gadget", + "enums": [ + { + "isClass": false, + "isFlag": false, + "name": "SomeEnum", + "values": [ + "SomeEnumValue" + ] + } + ], + "gadget": true, + "qualifiedClassName": "NS2::Nested::Gadget" + }, + { + "className": "Object", + "enums": [ + { + "isClass": false, + "isFlag": false, + "name": "SomeEnum", + "values": [ + "SomeEnumValue" + ] + } + ], + "object": true, + "qualifiedClassName": "NS2::Nested::Object", + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + }, + { + "className": "Gadget", + "enums": [ + { + "isClass": false, + "isFlag": false, + "name": "SomeEnum", + "values": [ + "SomeEnumValue" + ] + } + ], + "gadget": true, + "qualifiedClassName": "NS2::NestedUnsused::Gadget" + }, + { + "className": "Object", + "enums": [ + { + "isClass": false, + "isFlag": false, + "name": "SomeEnum", + "values": [ + "SomeEnumValue" + ] + } + ], + "object": true, + "qualifiedClassName": "NS2::NestedUnsused::Object", + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + }, + { + "className": "Gadget", + "enums": [ + { + "isClass": false, + "isFlag": false, + "name": "SomeEnum", + "values": [ + "SomeEnumValue" + ] + } + ], + "gadget": true, + "qualifiedClassName": "NS2::Gadget" + }, + { + "className": "Object", + "enums": [ + { + "isClass": false, + "isFlag": false, + "name": "SomeEnum", + "values": [ + "SomeEnumValue" + ] + } + ], + "object": true, + "qualifiedClassName": "NS2::Object", + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + }, + { + "className": "DependingObject", + "object": true, + "properties": [ + { + "constant": false, + "designable": true, + "final": false, + "index": 0, + "name": "gadgetPoperty", + "read": "gadgetPoperty", + "required": false, + "scriptable": true, + "stored": true, + "type": "Gadget::SomeEnum", + "user": false + }, + { + "constant": false, + "designable": true, + "final": false, + "index": 1, + "name": "objectPoperty", + "read": "objectPoperty", + "required": false, + "scriptable": true, + "stored": true, + "type": "Object::SomeEnum", + "user": false + } + ], + "qualifiedClassName": "NS2::DependingObject", + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + }, + { + "className": "DependingNestedGadget", + "object": true, + "properties": [ + { + "constant": false, + "designable": true, + "final": false, + "index": 0, + "name": "nestedGadgetPoperty", + "read": "nestedGadgetPoperty", + "required": false, + "scriptable": true, + "stored": true, + "type": "Nested::Gadget::SomeEnum", + "user": false + } + ], + "qualifiedClassName": "NS2::DependingNestedGadget", + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + }, + { + "className": "DependingNestedObject", + "object": true, + "properties": [ + { + "constant": false, + "designable": true, + "final": false, + "index": 0, + "name": "nestedObjectPoperty", + "read": "nestedObjectPoperty", + "required": false, + "scriptable": true, + "stored": true, + "type": "Nested::Object::SomeEnum", + "user": false + } + ], + "qualifiedClassName": "NS2::DependingNestedObject", + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + } + ], + "inputFile": "related-metaobjects-name-conflict.h", + "outputRevision": 68 + }, + { + "classes": [ + { + "className": "SignalWithDefaultArg", + "object": true, + "qualifiedClassName": "SignalWithDefaultArg", + "signals": [ + { + "access": "public", + "arguments": [ + { + "name": "i", + "type": "int" + } + ], + "name": "signalWithDefaultArg", + "returnType": "void" + }, + { + "access": "public", + "isCloned": true, + "name": "signalWithDefaultArg", + "returnType": "void" + } + ], + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + } + ], + "inputFile": "signal-with-default-arg.h", + "outputRevision": 68 + }, + { + "classes": [ + { + "className": "KDAB", + "enums": [ + { + "isClass": false, + "isFlag": false, + "name": "Salaries", + "values": [ + "Steve" + ] + } + ], + "object": true, + "qualifiedClassName": "KDAB", + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + } + ], + "inputFile": "single-quote-digit-separator-n3781.h", + "outputRevision": 68 + }, + { + "classes": [ + { + "className": "SingleFunctionKeywordBeforeReturnType", + "object": true, + "qualifiedClassName": "SingleFunctionKeywordBeforeReturnType", + "signals": [ + { + "access": "public", + "name": "mySignal", + "returnType": "void" + } + ], + "slots": [ + { + "access": "public", + "name": "mySlot", + "returnType": "void" + } + ], + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + }, + { + "className": "SingleFunctionKeywordBeforeInline", + "object": true, + "qualifiedClassName": "SingleFunctionKeywordBeforeInline", + "signals": [ + { + "access": "public", + "name": "mySignal", + "returnType": "void" + } + ], + "slots": [ + { + "access": "public", + "name": "mySlot", + "returnType": "void" + } + ], + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + }, + { + "className": "SingleFunctionKeywordAfterInline", + "object": true, + "qualifiedClassName": "SingleFunctionKeywordAfterInline", + "signals": [ + { + "access": "public", + "name": "mySignal", + "returnType": "void" + } + ], + "slots": [ + { + "access": "public", + "name": "mySlot", + "returnType": "void" + } + ], + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + } + ], + "inputFile": "single_function_keyword.h", + "outputRevision": 68 + }, + { + "classes": [ + { + "className": "SlotsWithVoidTemplateTest", + "object": true, + "qualifiedClassName": "SlotsWithVoidTemplateTest", + "signals": [ + { + "access": "public", + "arguments": [ + { + "type": "TestTemplate<void>" + } + ], + "name": "mySignal", + "returnType": "void" + }, + { + "access": "public", + "name": "myVoidSignal", + "returnType": "void" + }, + { + "access": "public", + "name": "myVoidSignal2", + "returnType": "void" + } + ], + "slots": [ + { + "access": "public", + "name": "dummySlot", + "returnType": "void" + }, + { + "access": "public", + "name": "dummySlot2", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "type": "TestTemplate<void>" + } + ], + "name": "anotherSlot", + "returnType": "void" + }, + { + "access": "public", + "name": "mySlot", + "returnType": "TestTemplate<void>" + } + ], + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + } + ], + "inputFile": "slots-with-void-template.h", + "outputRevision": 68 + }, + { + "classes": [ + { + "className": "Task192552", + "object": true, + "qualifiedClassName": "Task192552", + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + } + ], + "inputFile": "task192552.h", + "outputRevision": 68 + }, + { + "classes": [ + { + "className": "TestObject", + "object": true, + "qualifiedClassName": "NS_A::NS_B::TestObject", + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + }, + { + "className": "TestMain", + "object": true, + "qualifiedClassName": "NS_A::NS_Main::TestMain", + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + } + ], + "inputFile": "task234909.h", + "outputRevision": 68 + }, + { + "classes": [ + { + "className": "TypenameWithUnsigned", + "object": true, + "qualifiedClassName": "TypenameWithUnsigned", + "slots": [ + { + "access": "public", + "arguments": [ + { + "type": "uint" + } + ], + "name": "a", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "name": "u", + "type": "uint" + } + ], + "name": "b", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "type": "uint*" + } + ], + "name": "c", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "name": "p", + "type": "uint*" + } + ], + "name": "d", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "type": "uint&" + } + ], + "name": "e", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "name": "r", + "type": "uint&" + } + ], + "name": "f", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "type": "unsigned1" + } + ], + "name": "g", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "name": "u1", + "type": "unsigned1" + } + ], + "name": "h", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "type": "uint" + }, + { + "type": "unsigned1" + } + ], + "name": "i", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "type": "unsigned1" + }, + { + "type": "uint" + } + ], + "name": "j", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "type": "unsignedQImage" + } + ], + "name": "k", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "name": "uqi", + "type": "unsignedQImage" + } + ], + "name": "l", + "returnType": "void" + } + ], + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + } + ], + "inputFile": "task240368.h", + "outputRevision": 68 + }, + { + "classes": [ + { + "className": "Task87883", + "object": true, + "qualifiedClassName": "Task87883", + "superClasses": [ + { + "access": "public", + "name": "QObject" + } + ] + } + ], + "inputFile": "task87883.h", + "outputRevision": 68 + }, + { + "classes": [ + { + "className": "Foo", + "object": true, + "qualifiedClassName": "BBB::Foo", + "signals": [ + { + "access": "public", + "arguments": [ + { + "type": "QList<QList<int>>" + } + ], + "name": "foo", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "type": "QList<QList<int>>" + } + ], + "name": "foo2", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "type": "QList<::AAA::BaseA*>" + } + ], + "name": "bar", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "type": "QList<::AAA::BaseA*>" + } + ], + "name": "bar2", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "type": "QList<const ::AAA::BaseA*>" + } + ], + "name": "bar3", + "returnType": "void" + } + ], + "superClasses": [ + { + "access": "public", + "name": "QObject" + }, + { + "access": "public", + "name": "::AAA::BaseA" + } + ] + } + ], + "inputFile": "trigraphs.h", + "outputRevision": 68 + } +] diff --git a/tests/auto/tools/moc/assign-namespace.h b/tests/auto/tools/moc/assign-namespace.h index e6de8461c8..6e375d676c 100644 --- a/tests/auto/tools/moc/assign-namespace.h +++ b/tests/auto/tools/moc/assign-namespace.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef ASSIGN_NAMESPACE_H #define ASSIGN_NAMESPACE_H diff --git a/tests/auto/tools/moc/backslash-newlines.h b/tests/auto/tools/moc/backslash-newlines.h index 081d80dc7a..d4c1492a21 100644 --- a/tests/auto/tools/moc/backslash-newlines.h +++ b/tests/auto/tools/moc/backslash-newlines.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef BACKSLASH_NEWLINES_H #define BACKSLASH_NEWLINES_H @@ -53,4 +28,10 @@ public slots: #endif // BACKSLASH_NEWLINES_H -// ends with \\\r should not make moc crash (QTBUG-53441) (no new lines on purpose!!) \
\ No newline at end of file +QT_WARNING_PUSH +QT_WARNING_DISABLE_CLANG("-Wcomment") +QT_WARNING_DISABLE_GCC("-Wcomment") + +// ends with \\\r should not make moc crash (QTBUG-53441) (no new lines on purpose!!) \ + +QT_WARNING_POP diff --git a/tests/auto/tools/moc/c-comments.h b/tests/auto/tools/moc/c-comments.h index 0c4d60bef9..b83549715d 100644 --- a/tests/auto/tools/moc/c-comments.h +++ b/tests/auto/tools/moc/c-comments.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef C_COMMENTS_H #define C_COMMENTS_H diff --git a/tests/auto/tools/moc/cstyle-enums.h b/tests/auto/tools/moc/cstyle-enums.h index ef065c636d..a173913e06 100644 --- a/tests/auto/tools/moc/cstyle-enums.h +++ b/tests/auto/tools/moc/cstyle-enums.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef CSTYLE_ENUMS_H #define CSTYLE_ENUMS_H diff --git a/tests/auto/tools/moc/cxx-attributes.h b/tests/auto/tools/moc/cxx-attributes.h new file mode 100644 index 0000000000..54649b93fa --- /dev/null +++ b/tests/auto/tools/moc/cxx-attributes.h @@ -0,0 +1,89 @@ +// Copyright (C) 2019 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#ifndef CXXATTRIBUTE_H +#define CXXATTRIBUTE_H + +#include <QtCore/QObject> + +QT_WARNING_PUSH +QT_WARNING_DISABLE_CLANG("-Wunknown-attributes") +QT_WARNING_DISABLE_GCC("-Wattributes") + +class [[deprecated]] CppAttribute : public QObject +{ + Q_OBJECT +signals: + [[deprecated]] void deprecatedSignal(); + +public slots: + [[deprecated]] void deprecatedSlot() {} + [[deprecated]] [[tst_moc::maybe_unused]] int deprecatedSlot2() { return 42; } + [[deprecated("reason")]] void deprecatedReason() {} + [[deprecated("reason[")]] void deprecatedReasonWithLBRACK() {} + [[deprecated("reason[[")]] void deprecatedReasonWith2LBRACK() {} + [[deprecated("reason]")]] void deprecatedReasonWithRBRACK() {} + [[deprecated("reason]]")]] void deprecatedReasonWith2RBRACK() {} + void slotWithArguments([[tst_moc::maybe_unused]] int) {} +#if !defined(_MSC_VER) || _MSC_VER >= 1912 + // On MSVC it causes: + // moc_cxx-attributes.cpp(133): fatal error C1001: An internal error has occurred in the compiler. + Q_INVOKABLE [[tst_moc::noreturn]] void noreturnSlot() { throw "unused"; } + [[tst_moc::noreturn]] Q_SCRIPTABLE void noreturnSlot2() { throw "unused"; } + [[deprecated]] int returnInt() { return 0; } + Q_SLOT [[tst_moc::noreturn]] [[deprecated]] void noreturnDeprecatedSlot() { throw "unused"; } + Q_INVOKABLE void noreturnSlot3() [[tst_moc::noreturn]] { throw "unused"; } +#endif +}; + +QT_WARNING_POP + +#ifdef Q_MOC_RUN +# define TEST_COMPILER_DEPRECATION [[deprecated]] +# define TEST_COMPILER_DEPRECATION_X(x) [[deprecated(x)]] +#else +# define TEST_COMPILER_DEPRECATION Q_DECL_ENUMERATOR_DEPRECATED +# define TEST_COMPILER_DEPRECATION_X(x) Q_DECL_ENUMERATOR_DEPRECATED_X(x) +#endif + +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED + +namespace TestQNamespaceDeprecated { + Q_NAMESPACE + enum class TestEnum1 { + Key1 = 11, + Key2 TEST_COMPILER_DEPRECATION, + Key3 TEST_COMPILER_DEPRECATION_X("reason"), + Key4 TEST_COMPILER_DEPRECATION_X("reason["), + Key5 TEST_COMPILER_DEPRECATION_X("reason[["), + Key6 TEST_COMPILER_DEPRECATION_X("reason]"), + Key7 TEST_COMPILER_DEPRECATION_X("reason]]"), + }; + Q_ENUM_NS(TestEnum1) + + // try to dizzy moc by adding a struct in between + struct TestGadget { + Q_GADGET + public: + enum class TestGEnum1 { + Key1 = 13, + Key2 TEST_COMPILER_DEPRECATION, + Key3 TEST_COMPILER_DEPRECATION_X("reason") + }; + Q_ENUM(TestGEnum1) + }; + + enum class TestFlag1 { + None = 0, + Flag1 = 1, + Flag2 TEST_COMPILER_DEPRECATION = 2, + Flag3 TEST_COMPILER_DEPRECATION_X("reason") = 3, + Any = Flag1 | Flag2 | Flag3 + }; + Q_FLAG_NS(TestFlag1) +} + +QT_WARNING_POP + +#endif // CXXATTRIBUTE_H diff --git a/tests/auto/tools/moc/cxx11-enums.h b/tests/auto/tools/moc/cxx11-enums.h index cc14c0acda..7547ed81c1 100644 --- a/tests/auto/tools/moc/cxx11-enums.h +++ b/tests/auto/tools/moc/cxx11-enums.h @@ -1,36 +1,10 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Olivier Goffart. -** 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$ -** -****************************************************************************/ +// Copyright (C) 2011 Olivier Goffart. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef CXX11_ENUMS_H #define CXX11_ENUMS_H #include <QtCore/QObject> -#if defined(Q_COMPILER_CLASS_ENUM) || defined(Q_MOC_RUN) class CXX11Enums { Q_GADGET @@ -73,21 +47,20 @@ public: Q_FLAGS(ClassFlags) }; -#else -//workaround to get the moc compiled code to compile -class CXX11Enums +class CXX11Enums3 : public QObject { - Q_GADGET + Q_OBJECT public: - struct EnumClass { enum { A0, A1, A2, A3 }; }; - struct TypedEnumClass { enum { C0, C1, C2, C3 }; }; + enum class EnumClass { A0, A1, A2, A3 }; + enum TypedEnum : char { B0, B1 , B2, B3 }; + enum class TypedEnumClass : char { C0, C1, C2, C3 }; enum NormalEnum { D2 = 2, D3, D0 =0 , D1 }; - enum TypedEnum { B0, B1 , B2, B3 }; -}; + enum class ClassFlag { F0 = 1, F1 = 2, F2 = 4, F3 = 8 }; -class CXX11Enums2 : public CXX11Enums -{ - Q_GADGET + Q_ENUM(EnumClass) + Q_ENUM(TypedEnum) + Q_ENUM(TypedEnumClass) + Q_ENUM(NormalEnum) }; -#endif + #endif // CXX11_ENUMS_H diff --git a/tests/auto/tools/moc/cxx11-explicit-override-control.h b/tests/auto/tools/moc/cxx11-explicit-override-control.h index 2211112717..c741558419 100644 --- a/tests/auto/tools/moc/cxx11-explicit-override-control.h +++ b/tests/auto/tools/moc/cxx11-explicit-override-control.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Marc Mutz <marc.mutz@kdab.com> -** 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$ -** -****************************************************************************/ +// Copyright (C) 2012 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Marc Mutz <marc.mutz@kdab.com> +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef TESTS_AUTO_CORELIB_TOOLS_MOC_CXX11_EXPLICIT_OVERRIDE_CONTROL_H #define TESTS_AUTO_CORELIB_TOOLS_MOC_CXX11_EXPLICIT_OVERRIDE_CONTROL_H @@ -36,11 +11,14 @@ # define sealed #endif +QT_WARNING_PUSH +QT_WARNING_DISABLE_GCC("-Wsuggest-override") + class ExplicitOverrideControlBase : public QObject { Q_OBJECT public: - explicit ExplicitOverrideControlBase(QObject *parent = 0) + explicit ExplicitOverrideControlBase(QObject *parent = nullptr) : QObject(parent) {} private Q_SLOTS: @@ -62,7 +40,7 @@ class ExplicitOverrideControlFinalQt : public ExplicitOverrideControlBase { Q_OBJECT public: - explicit ExplicitOverrideControlFinalQt(QObject *parent = 0) + explicit ExplicitOverrideControlFinalQt(QObject *parent = nullptr) : ExplicitOverrideControlBase(parent) {} private Q_SLOTS: @@ -84,7 +62,7 @@ class ExplicitOverrideControlFinalCxx11 : public ExplicitOverrideControlBase { Q_OBJECT public: - explicit ExplicitOverrideControlFinalCxx11(QObject *parent = 0) + explicit ExplicitOverrideControlFinalCxx11(QObject *parent = nullptr) : ExplicitOverrideControlBase(parent) {} private Q_SLOTS: @@ -106,7 +84,7 @@ class ExplicitOverrideControlSealed : public ExplicitOverrideControlBase { Q_OBJECT public: - explicit ExplicitOverrideControlSealed(QObject *parent = 0) + explicit ExplicitOverrideControlSealed(QObject *parent = nullptr) : ExplicitOverrideControlBase(parent) {} private Q_SLOTS: @@ -128,7 +106,7 @@ class ExplicitOverrideControlOverrideQt : public ExplicitOverrideControlBase { Q_OBJECT public: - explicit ExplicitOverrideControlOverrideQt(QObject *parent = 0) + explicit ExplicitOverrideControlOverrideQt(QObject *parent = nullptr) : ExplicitOverrideControlBase(parent) {} private Q_SLOTS: @@ -150,7 +128,7 @@ class ExplicitOverrideControlOverrideCxx11 : public ExplicitOverrideControlBase { Q_OBJECT public: - explicit ExplicitOverrideControlOverrideCxx11(QObject *parent = 0) + explicit ExplicitOverrideControlOverrideCxx11(QObject *parent = nullptr) : ExplicitOverrideControlBase(parent) {} private Q_SLOTS: @@ -172,7 +150,7 @@ class ExplicitOverrideControlFinalQtOverrideQt : public ExplicitOverrideControlB { Q_OBJECT public: - explicit ExplicitOverrideControlFinalQtOverrideQt(QObject *parent = 0) + explicit ExplicitOverrideControlFinalQtOverrideQt(QObject *parent = nullptr) : ExplicitOverrideControlBase(parent) {} private Q_SLOTS: @@ -194,7 +172,7 @@ class ExplicitOverrideControlFinalCxx11OverrideCxx11 : public ExplicitOverrideCo { Q_OBJECT public: - explicit ExplicitOverrideControlFinalCxx11OverrideCxx11(QObject *parent = 0) + explicit ExplicitOverrideControlFinalCxx11OverrideCxx11(QObject *parent = nullptr) : ExplicitOverrideControlBase(parent) {} private Q_SLOTS: @@ -216,7 +194,7 @@ class ExplicitOverrideControlSealedOverride : public ExplicitOverrideControlBase { Q_OBJECT public: - explicit ExplicitOverrideControlSealedOverride(QObject *parent = 0) + explicit ExplicitOverrideControlSealedOverride(QObject *parent = nullptr) : ExplicitOverrideControlBase(parent) {} private Q_SLOTS: @@ -234,6 +212,8 @@ private Q_SLOTS: #endif }; +QT_WARNING_POP + #ifndef Q_MOC_RUN # undef final # undef sealed diff --git a/tests/auto/tools/moc/cxx11-final-classes.h b/tests/auto/tools/moc/cxx11-final-classes.h index 0e1d8a7787..9d1a21bf96 100644 --- a/tests/auto/tools/moc/cxx11-final-classes.h +++ b/tests/auto/tools/moc/cxx11-final-classes.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Marc Mutz <marc.mutz@kdab.com> -** 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$ -** -****************************************************************************/ +// Copyright (C) 2012 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Marc Mutz <marc.mutz@kdab.com> +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef TESTS_AUTO_CORELIB_TOOLS_MOC_CXX11_FINAL_CLASSES_H #define TESTS_AUTO_CORELIB_TOOLS_MOC_CXX11_FINAL_CLASSES_H @@ -41,7 +16,7 @@ class FinalTestClassQt Q_DECL_FINAL : public QObject { Q_OBJECT public: - explicit FinalTestClassQt(QObject *parent = 0) + explicit FinalTestClassQt(QObject *parent = nullptr) : QObject(parent) {} }; @@ -50,7 +25,7 @@ class EXPORT_MACRO ExportedFinalTestClassQt Q_DECL_FINAL : public QObject { Q_OBJECT public: - explicit ExportedFinalTestClassQt(QObject *parent = 0) + explicit ExportedFinalTestClassQt(QObject *parent = nullptr) : QObject(parent) {} }; @@ -58,7 +33,7 @@ class EXPORT_MACRO2(X,Y,Z) ExportedFinalTestClassQtX Q_DECL_FINAL : public QObje { Q_OBJECT public: - explicit ExportedFinalTestClassQtX(QObject *parent = 0) + explicit ExportedFinalTestClassQtX(QObject *parent = nullptr) : QObject(parent) {} }; @@ -66,7 +41,7 @@ class FinalTestClassCpp11 final : public QObject { Q_OBJECT public: - explicit FinalTestClassCpp11(QObject *parent = 0) + explicit FinalTestClassCpp11(QObject *parent = nullptr) : QObject(parent) {} }; @@ -74,7 +49,7 @@ class EXPORT_MACRO ExportedFinalTestClassCpp11 final : public QObject { Q_OBJECT public: - explicit ExportedFinalTestClassCpp11(QObject *parent = 0) + explicit ExportedFinalTestClassCpp11(QObject *parent = nullptr) : QObject(parent) {} }; @@ -82,7 +57,7 @@ class EXPORT_MACRO2(X,Y,Z) ExportedFinalTestClassCpp11X final : public QObject { Q_OBJECT public: - explicit ExportedFinalTestClassCpp11X(QObject *parent = 0) + explicit ExportedFinalTestClassCpp11X(QObject *parent = nullptr) : QObject(parent) {} }; @@ -90,7 +65,7 @@ class SealedTestClass sealed : public QObject { Q_OBJECT public: - explicit SealedTestClass(QObject *parent = 0) + explicit SealedTestClass(QObject *parent = nullptr) : QObject(parent) {} }; @@ -98,7 +73,7 @@ class EXPORT_MACRO ExportedSealedTestClass sealed : public QObject { Q_OBJECT public: - explicit ExportedSealedTestClass(QObject *parent = 0) + explicit ExportedSealedTestClass(QObject *parent = nullptr) : QObject(parent) {} }; @@ -106,7 +81,7 @@ class EXPORT_MACRO2(X,Y,Z) ExportedSealedTestClassX sealed : public QObject { Q_OBJECT public: - explicit ExportedSealedTestClassX(QObject *parent = 0) + explicit ExportedSealedTestClassX(QObject *parent = nullptr) : QObject(parent) {} }; diff --git a/tests/auto/tools/moc/cxx11-trailing-return.h b/tests/auto/tools/moc/cxx11-trailing-return.h new file mode 100644 index 0000000000..f8ee031dae --- /dev/null +++ b/tests/auto/tools/moc/cxx11-trailing-return.h @@ -0,0 +1,43 @@ +// Copyright (C) 2020 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#ifndef CXX11_TRAILING_RETURN_H +#define CXX11_TRAILING_RETURN_H +#include <QtCore/QObject> + +class CXX11TrailingReturn : public QObject +{ + Q_OBJECT +public slots: + inline auto fun() -> void; + inline auto arguments(int i, char b) -> int; + inline auto inlineFunc(int i) -> int + { + return i + 1; + } + + inline auto constRefReturn() -> const CXX11TrailingReturn & + { + return *this; + } + + inline auto constConstRefReturn() const -> const CXX11TrailingReturn & + { + return *this; + } + +signals: + auto trailingSignalReturn(int i) -> void; +}; + +auto CXX11TrailingReturn::fun() -> void +{ + return; +} + +auto CXX11TrailingReturn::arguments(int i, char b) -> int +{ + return i + int(b); +} + +#endif // CXX11_TRAILING_RETURN_H diff --git a/tests/auto/tools/moc/cxx17-namespaces.h b/tests/auto/tools/moc/cxx17-namespaces.h index 97f534c697..9c346c7993 100644 --- a/tests/auto/tools/moc/cxx17-namespaces.h +++ b/tests/auto/tools/moc/cxx17-namespaces.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Olivier Goffart. -** 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$ -** -****************************************************************************/ +// Copyright (C) 2011 Olivier Goffart. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef CXX17_NAMESPACES_H #define CXX17_NAMESPACES_H diff --git a/tests/auto/tools/moc/dir-in-include-path.h b/tests/auto/tools/moc/dir-in-include-path.h index ae889f02a1..94f420ea6c 100644 --- a/tests/auto/tools/moc/dir-in-include-path.h +++ b/tests/auto/tools/moc/dir-in-include-path.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef DIR_IN_INCLUDE_PATH_H #define DIR_IN_INCLUDE_PATH_H diff --git a/tests/auto/tools/moc/dollars.h b/tests/auto/tools/moc/dollars.h index e7eeef3ef7..36cc864fc6 100644 --- a/tests/auto/tools/moc/dollars.h +++ b/tests/auto/tools/moc/dollars.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Olivier Goffart <ogoffart@woboq.com> -** 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$ -** -****************************************************************************/ +// Copyright (C) 2013 Olivier Goffart <ogoffart@woboq.com> +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef DOLLARS_H #define DOLLARS_H diff --git a/tests/auto/tools/moc/enum_inc.h b/tests/auto/tools/moc/enum_inc.h new file mode 100644 index 0000000000..7d7b6ae9f3 --- /dev/null +++ b/tests/auto/tools/moc/enum_inc.h @@ -0,0 +1,2 @@ +parcel = 42, +part = 12, diff --git a/tests/auto/tools/moc/enum_with_include.h b/tests/auto/tools/moc/enum_with_include.h new file mode 100644 index 0000000000..7cf6bf512c --- /dev/null +++ b/tests/auto/tools/moc/enum_with_include.h @@ -0,0 +1,19 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#ifndef ENUM_WITH_INCLUDE_H +#define ENUM_WITH_INCLUDE_H +#include <QtCore/QObject> + +class Foo : public QObject { + enum en { + #include <enum_inc.h> + }; + + enum class en2 { + #include <enum_inc.h> + reference = 42 + }; + Q_OBJECT +}; +#endif diff --git a/tests/auto/tools/moc/error-on-wrong-notify.h b/tests/auto/tools/moc/error-on-wrong-notify.h index 9e6b27bff3..90d1eded31 100644 --- a/tests/auto/tools/moc/error-on-wrong-notify.h +++ b/tests/auto/tools/moc/error-on-wrong-notify.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef ERROR_ON_WRONG_NOTIFY_H #define ERROR_ON_WRONG_NOTIFY_H diff --git a/tests/auto/tools/moc/escapes-in-string-literals.h b/tests/auto/tools/moc/escapes-in-string-literals.h index ddeccd897f..5514bc1000 100644 --- a/tests/auto/tools/moc/escapes-in-string-literals.h +++ b/tests/auto/tools/moc/escapes-in-string-literals.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef ESCAPES_IN_STRING_LITERALS_H #define ESCAPES_IN_STRING_LITERALS_H diff --git a/tests/auto/tools/moc/extraqualification.h b/tests/auto/tools/moc/extraqualification.h index 4c150415b4..33cc48158f 100644 --- a/tests/auto/tools/moc/extraqualification.h +++ b/tests/auto/tools/moc/extraqualification.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef EXTRAQUALIFICATION_H #define EXTRAQUALIFICATION_H diff --git a/tests/auto/tools/moc/forgotten-qinterface.h b/tests/auto/tools/moc/forgotten-qinterface.h index fcf7fdd4ff..663ab162f8 100644 --- a/tests/auto/tools/moc/forgotten-qinterface.h +++ b/tests/auto/tools/moc/forgotten-qinterface.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef FORGOTTEN_QINTERFACE_H #define FORGOTTEN_QINTERFACE_H diff --git a/tests/auto/tools/moc/forward-declared-param.h b/tests/auto/tools/moc/forward-declared-param.h index 3c10b7be1f..e494b18ba5 100644 --- a/tests/auto/tools/moc/forward-declared-param.h +++ b/tests/auto/tools/moc/forward-declared-param.h @@ -1,35 +1,11 @@ -/**************************************************************************** -** -** Copyright (C) 2016 Intel Corporation. -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 Intel Corporation. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef FORWARD_DECLARED_PARAM_H #define FORWARD_DECLARED_PARAM_H #include <qobject.h> #include <qmetatype.h> +Q_MOC_INCLUDE("forwarddeclaredparam.h") // test support for const refs to forward-declared structs in parameters @@ -37,6 +13,8 @@ struct ForwardDeclaredParam; template <typename T> class ForwardDeclaredContainer; struct FullyDefined {}; +inline size_t qHash(const FullyDefined &, size_t seed = 0) { return seed; } +inline bool operator==(const FullyDefined &, const FullyDefined &) { return true; } Q_DECLARE_METATYPE(FullyDefined) class ForwardDeclaredParamClass : public QObject diff --git a/tests/auto/tools/moc/forwarddeclaredparam.h b/tests/auto/tools/moc/forwarddeclaredparam.h new file mode 100644 index 0000000000..176f0c3356 --- /dev/null +++ b/tests/auto/tools/moc/forwarddeclaredparam.h @@ -0,0 +1,5 @@ +#ifndef FORWARDDECLAREDPARAM_H +#define FORWARDDECLAREDPARAM_H +struct ForwardDeclaredParam {}; +template <typename T> class ForwardDeclaredContainer {}; +#endif diff --git a/tests/auto/tools/moc/function-with-attributes.h b/tests/auto/tools/moc/function-with-attributes.h index 12c231371f..be7c8d9aaa 100644 --- a/tests/auto/tools/moc/function-with-attributes.h +++ b/tests/auto/tools/moc/function-with-attributes.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef FUNCTION_WITH_ATTRIBUTES_H #define FUNCTION_WITH_ATTRIBUTES_H diff --git a/tests/auto/tools/moc/fwdclass1.h b/tests/auto/tools/moc/fwdclass1.h new file mode 100644 index 0000000000..eaaa7c380f --- /dev/null +++ b/tests/auto/tools/moc/fwdclass1.h @@ -0,0 +1,13 @@ +// Copyright (C) 2020 Olivier Goffart <ogoffart@woboq.com> +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#ifdef FWDCLASS1_H +#error "This file can only be included once" +#endif +#define FWDCLASS1_H + +class FwdClass1 +{ +public: + int x; +}; diff --git a/tests/auto/tools/moc/fwdclass2.h b/tests/auto/tools/moc/fwdclass2.h new file mode 100644 index 0000000000..588f5b4de3 --- /dev/null +++ b/tests/auto/tools/moc/fwdclass2.h @@ -0,0 +1,13 @@ +// Copyright (C) 2020 Olivier Goffart <ogoffart@woboq.com> +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#ifdef FWDCLASS2_H +#error "This file can only be included once" +#endif +#define FWDCLASS2_H + +class FwdClass2 +{ +public: + int x; +}; diff --git a/tests/auto/tools/moc/fwdclass3.h b/tests/auto/tools/moc/fwdclass3.h new file mode 100644 index 0000000000..5ecdb2ce6e --- /dev/null +++ b/tests/auto/tools/moc/fwdclass3.h @@ -0,0 +1,13 @@ +// Copyright (C) 2020 Olivier Goffart <ogoffart@woboq.com> +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#ifdef FWDCLASS3_H +#error "This file can only be included once" +#endif +#define FWDCLASS3_H + +class FwdClass3 +{ +public: + int x; +}; diff --git a/tests/auto/tools/moc/gadgetwithnoenums.h b/tests/auto/tools/moc/gadgetwithnoenums.h index 3b182ab875..5ef8bced8c 100644 --- a/tests/auto/tools/moc/gadgetwithnoenums.h +++ b/tests/auto/tools/moc/gadgetwithnoenums.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef TASK175491 #define TASK175491 diff --git a/tests/auto/tools/moc/grand-parent-gadget-class.h b/tests/auto/tools/moc/grand-parent-gadget-class.h index 7ffd636ca1..d5adfb9974 100644 --- a/tests/auto/tools/moc/grand-parent-gadget-class.h +++ b/tests/auto/tools/moc/grand-parent-gadget-class.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef GRANDPARENTGADGETCLASS_H #define GRANDPARENTGADGETCLASS_H @@ -36,7 +11,8 @@ namespace GrandParentGadget { struct BaseGadget { Q_GADGET }; struct Derived : BaseGadget {}; struct DerivedGadget : Derived { Q_GADGET }; - +template<typename T> struct CRTP : BaseGadget {}; +struct CRTPDerivedGadget : CRTP<CRTPDerivedGadget> { Q_GADGET }; } #endif // GRANDPARENTGADGETCLASS_H diff --git a/tests/auto/tools/moc/interface-from-framework.h b/tests/auto/tools/moc/interface-from-framework.h index f0fc5df7af..f8f80cbafb 100644 --- a/tests/auto/tools/moc/interface-from-framework.h +++ b/tests/auto/tools/moc/interface-from-framework.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef INTERFACE_FROM_FRAMEWORK_H #define INTERFACE_FROM_FRAMEWORK_H diff --git a/tests/auto/tools/moc/interface-from-include.h b/tests/auto/tools/moc/interface-from-include.h index 2b3929582b..6e92d30142 100644 --- a/tests/auto/tools/moc/interface-from-include.h +++ b/tests/auto/tools/moc/interface-from-include.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef INTERFACE_FROM_INCLUDE_H #define INTERFACE_FROM_INCLUDE_H diff --git a/tests/auto/tools/moc/macro-on-cmdline.h b/tests/auto/tools/moc/macro-on-cmdline.h index 32a2b72cf4..d7530cdcb1 100644 --- a/tests/auto/tools/moc/macro-on-cmdline.h +++ b/tests/auto/tools/moc/macro-on-cmdline.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef MACRO_ON_CMDLINE_H #define MACRO_ON_CMDLINE_H diff --git a/tests/auto/tools/moc/moc.pro b/tests/auto/tools/moc/moc.pro deleted file mode 100644 index 3cbc9ebb5e..0000000000 --- a/tests/auto/tools/moc/moc.pro +++ /dev/null @@ -1,51 +0,0 @@ -CONFIG += testcase -TARGET = tst_moc - -#exists(/usr/include/boost/spirit.hpp) { -# message("including boost headers in test") -# DEFINES += PARSE_BOOST -# # need to add explicitly so that it ends up in moc's search path -# INCLUDEPATH += /usr/include -#} - -INCLUDEPATH += testproject/include testproject - -cross_compile: DEFINES += MOC_CROSS_COMPILED - -HEADERS += using-namespaces.h no-keywords.h task87883.h c-comments.h backslash-newlines.h oldstyle-casts.h \ - slots-with-void-template.h qinvokable.h namespaced-flags.h trigraphs.h \ - escapes-in-string-literals.h cstyle-enums.h qprivateslots.h gadgetwithnoenums.h \ - dir-in-include-path.h single_function_keyword.h task192552.h task189996.h \ - task234909.h task240368.h pure-virtual-signals.h cxx11-enums.h \ - cxx11-final-classes.h \ - cxx11-explicit-override-control.h \ - forward-declared-param.h \ - parse-defines.h \ - function-with-attributes.h \ - plugin_metadata.h \ - single-quote-digit-separator-n3781.h \ - related-metaobjects-in-namespaces.h \ - qtbug-35657-gadget.h \ - non-gadget-parent-class.h grand-parent-gadget-class.h \ - related-metaobjects-in-gadget.h \ - related-metaobjects-name-conflict.h \ - namespace.h cxx17-namespaces.h - - -if(*-g++*|*-icc*|*-clang*|*-llvm):!win32-*: HEADERS += os9-newlines.h win-newlines.h -if(*-g++*|*-clang*): HEADERS += dollars.h -SOURCES += tst_moc.cpp - -QT = core testlib -qtHaveModule(dbus): QT += dbus -qtHaveModule(concurrent): QT += concurrent -qtHaveModule(network): QT += network -qtHaveModule(sql): QT += sql - -# tst_Moc::specifyMetaTagsFromCmdline() -# Ensure that plugin_metadata.h are moc-ed with some extra -M arguments: -QMAKE_MOC_OPTIONS += -Muri=com.company.app -Muri=com.company.app.private - -# Define macro on the command lines used in parse-defines.h -QMAKE_MOC_OPTIONS += "-DDEFINE_CMDLINE_EMPTY=" "\"-DDEFINE_CMDLINE_SIGNAL=void cmdlineSignal(const QMap<int, int> &i)\"" - diff --git a/tests/auto/tools/moc/moc_include.h b/tests/auto/tools/moc/moc_include.h new file mode 100644 index 0000000000..398459766e --- /dev/null +++ b/tests/auto/tools/moc/moc_include.h @@ -0,0 +1,49 @@ +// Copyright (C) 2020 Olivier Goffart <ogoffart@woboq.com> +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#ifndef MOC_INCLUDE_H +#define MOC_INCLUDE_H + +#include <QObject> + +class FwdClass1; +class FwdClass2; +class FwdClass3; + +Q_MOC_INCLUDE(fwdclass3.h) + +namespace SomeRandomNamespace { +Q_MOC_INCLUDE("fwdclass1.h") +Q_NAMESPACE +} + +class TestFwdProperties : public QObject +{ + Q_OBJECT + Q_PROPERTY(FwdClass1 prop1 WRITE setProp1 READ getProp1) + Q_PROPERTY(FwdClass2 prop2 WRITE setProp2 READ getProp2) + Q_PROPERTY(FwdClass3 prop3 WRITE setProp3 READ getProp3) +public: + ~TestFwdProperties(); + + void setProp1(const FwdClass1 &val); + void setProp2(const FwdClass2 &val); + void setProp3(const FwdClass3 &val); + const FwdClass1 &getProp1() { return *prop1; } + const FwdClass2 &getProp2() { return *prop2; } + const FwdClass3 &getProp3() { return *prop3; } + + QScopedPointer<FwdClass1> prop1; + QScopedPointer<FwdClass2> prop2; + QScopedPointer<FwdClass3> prop3; + + Q_MOC_INCLUDE( + \ + "fwdclass2.h" + ) + +}; + +Q_MOC_INCLUDE(<QString>) + +#endif // MOC_INCLUDE_H diff --git a/tests/auto/tools/moc/namespace.h b/tests/auto/tools/moc/namespace.h index 7f1e46cd62..22fe0b91f5 100644 --- a/tests/auto/tools/moc/namespace.h +++ b/tests/auto/tools/moc/namespace.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef NAMESPACE_H #define NAMESPACE_H diff --git a/tests/auto/tools/moc/namespace_no_merge.h b/tests/auto/tools/moc/namespace_no_merge.h index 8d1639ad4c..e2f277fde5 100644 --- a/tests/auto/tools/moc/namespace_no_merge.h +++ b/tests/auto/tools/moc/namespace_no_merge.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef NAMESPACE_NO_MERGE_H #define NAMESPACE_NO_MERGE_H diff --git a/tests/auto/tools/moc/namespaced-base-class.h b/tests/auto/tools/moc/namespaced-base-class.h new file mode 100644 index 0000000000..46bd2bae29 --- /dev/null +++ b/tests/auto/tools/moc/namespaced-base-class.h @@ -0,0 +1,20 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#ifndef TST_MOC_NAMESPACED_BASE_CLASS_H +#define TST_MOC_NAMESPACED_BASE_CLASS_H + +#include <QObject> + +namespace QTBUG_101141 { + class Base : public QObject { + Q_OBJECT + }; + + class Derived : public Base + { + Q_OBJECT + }; +} + +#endif // TST_MOC_NAMESPACED_BASE_CLASS_H diff --git a/tests/auto/tools/moc/namespaced-flags.h b/tests/auto/tools/moc/namespaced-flags.h index d49ac9829d..39ff5c1f9a 100644 --- a/tests/auto/tools/moc/namespaced-flags.h +++ b/tests/auto/tools/moc/namespaced-flags.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef NAMESPACED_FLAGS_H #define NAMESPACED_FLAGS_H diff --git a/tests/auto/tools/moc/no-keywords.h b/tests/auto/tools/moc/no-keywords.h index ca77056503..bf9beb4663 100644 --- a/tests/auto/tools/moc/no-keywords.h +++ b/tests/auto/tools/moc/no-keywords.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef NO_KEYWORDS_H #define NO_KEYWORDS_H @@ -69,8 +44,8 @@ public Q_SLOTS: inline void mySlot() { mySignal(); } private: - int signals; - double slots; + Q_DECL_UNUSED_MEMBER int signals; + Q_DECL_UNUSED_MEMBER double slots; }; #define signals Q_SIGNALS diff --git a/tests/auto/tools/moc/non-gadget-parent-class.h b/tests/auto/tools/moc/non-gadget-parent-class.h index 517fc616f5..c64075b572 100644 --- a/tests/auto/tools/moc/non-gadget-parent-class.h +++ b/tests/auto/tools/moc/non-gadget-parent-class.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef NONGADGETPARENTCLASS_H #define NONGADGETPARENTCLASS_H diff --git a/tests/auto/tools/moc/oldstyle-casts.h b/tests/auto/tools/moc/oldstyle-casts.h index d812a1b184..017f195b7b 100644 --- a/tests/auto/tools/moc/oldstyle-casts.h +++ b/tests/auto/tools/moc/oldstyle-casts.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef OLDSTYLE_CASTS_H #define OLDSTYLE_CASTS_H diff --git a/tests/auto/tools/moc/os9-newlines.h b/tests/auto/tools/moc/os9-newlines.h index 41b3cb883d..82bddd117d 100644 --- a/tests/auto/tools/moc/os9-newlines.h +++ b/tests/auto/tools/moc/os9-newlines.h @@ -1 +1 @@ -/****************************************************************************
**
** 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 <QObject>
class Os9Newlines : public QObject
{
Q_OBJECT
public Q_SLOTS:
inline void testSlot() {}
};
\ No newline at end of file +// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include <QObject>
class Os9Newlines : public QObject
{
Q_OBJECT
public Q_SLOTS:
inline void testSlot() {}
};
\ No newline at end of file diff --git a/tests/auto/tools/moc/parse-boost.h b/tests/auto/tools/moc/parse-boost.h index c9c492ed69..8f327a131d 100644 --- a/tests/auto/tools/moc/parse-boost.h +++ b/tests/auto/tools/moc/parse-boost.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef PARSE_BOOST_H #define PARSE_BOOST_H diff --git a/tests/auto/tools/moc/parse-defines.h b/tests/auto/tools/moc/parse-defines.h index 7b0fa29d7c..238d33246f 100644 --- a/tests/auto/tools/moc/parse-defines.h +++ b/tests/auto/tools/moc/parse-defines.h @@ -1,35 +1,11 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the tools applications 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef PARSE_DEFINES_H #define PARSE_DEFINES_H #include <qobject.h> +Q_MOC_INCLUDE(<QMap>) // this is intentionally ugly to test moc's preprocessing capabilities #define PD_NAMESPACE PD @@ -51,7 +27,6 @@ #define PD_CLASSINFO Q_CLASSINFO -#if defined(Q_COMPILER_VARIADIC_MACROS) || defined (Q_MOC_RUN) #define PD_VARARG(x, ...) x(__VA_ARGS__) #if defined(Q_CC_GNU) || defined(Q_MOC_RUN) @@ -61,7 +36,6 @@ #define PD_VARARGEXT(x, ...) x(__VA_ARGS__) #endif -#endif #define PD_ADD_SUFFIX(x) PD_DEFINE1(x,_SUFFIX) #define PD_DEFINE_ITSELF PD_ADD_SUFFIX(PD_DEFINE_ITSELF) @@ -100,7 +74,6 @@ public slots: PD_TEST_IDENTIFIER_ARG(void, combined6()) {} -#if defined(Q_COMPILER_VARIADIC_MACROS) || defined (Q_MOC_RUN) PD_VARARG(void vararg1) {} PD_VARARG(void vararg2, int) {} PD_VARARG(void vararg3, int, int) {} @@ -108,14 +81,6 @@ public slots: PD_VARARGEXT(void vararg4) {} PD_VARARGEXT(void vararg5, int) {} PD_VARARGEXT(void vararg6, int, int) {} -#else - void vararg1() {} - void vararg2(int) {} - void vararg3(int,int) {} - void vararg4() {} - void vararg5(int) {} - void vararg6(int,int) {} -#endif #define OUTERFUNCTION(x) x #define INNERFUNCTION(x) OUTERFUNCTION(x) diff --git a/tests/auto/tools/moc/plugin_metadata.h b/tests/auto/tools/moc/plugin_metadata.h index 927addd9e4..5f2a1885f6 100644 --- a/tests/auto/tools/moc/plugin_metadata.h +++ b/tests/auto/tools/moc/plugin_metadata.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef TESTPLUGINMETADATA #define TESTPLUGINMETADATA diff --git a/tests/auto/tools/moc/pointery_to_incomplete.h b/tests/auto/tools/moc/pointery_to_incomplete.h new file mode 100644 index 0000000000..5d0ac859d6 --- /dev/null +++ b/tests/auto/tools/moc/pointery_to_incomplete.h @@ -0,0 +1,27 @@ +// Copyright (C) 2020 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#ifndef POINTERY_TO_INCOMPLETE_H +#define POINTERY_TO_INCOMPLETE_H + +#include <QObject> +#include <QSharedPointer> +#include <QWeakPointer> +#include <QPointer> + +class FwdClass; + +class TestPointeeCanBeIncomplete : public QObject +{ + Q_OBJECT +public slots: + void setProp1(QPointer<FwdClass>) {} + void setProp2(QSharedPointer<FwdClass>) {} + void setProp3(const QWeakPointer<FwdClass> &) {} + void setProp4(FwdClass *) {} + void setProp5(const FwdClass *) {} + void setProp6(void *) {} + void setProp7(const void *) {} +}; + +#endif // POINTERY_TO_INCOMPLETE_H diff --git a/tests/auto/tools/moc/pp-dollar-signs.h b/tests/auto/tools/moc/pp-dollar-signs.h index 4235d5fe18..6ba39cb903 100644 --- a/tests/auto/tools/moc/pp-dollar-signs.h +++ b/tests/auto/tools/moc/pp-dollar-signs.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef PP_DOLLAR_SIGNS_H #define PP_DOLLAR_SIGNS_H diff --git a/tests/auto/tools/moc/pure-virtual-signals.h b/tests/auto/tools/moc/pure-virtual-signals.h index d514ee8a04..3c996a8628 100644 --- a/tests/auto/tools/moc/pure-virtual-signals.h +++ b/tests/auto/tools/moc/pure-virtual-signals.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef PURE_VIRTUAL_SIGNALS_H #define PURE_VIRTUAL_SIGNALS_H @@ -45,7 +20,7 @@ class PureVirtualSignalsImpl : public PureVirtualSignalsTest Q_OBJECT public: signals: - void mySignal(); - void mySignal2(int foo); + void mySignal() override; + void mySignal2(int foo) override; }; #endif // PURE_VIRTUAL_SIGNALS_H diff --git a/tests/auto/tools/moc/qinvokable.h b/tests/auto/tools/moc/qinvokable.h index 856d795b45..e2181d909d 100644 --- a/tests/auto/tools/moc/qinvokable.h +++ b/tests/auto/tools/moc/qinvokable.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef QINVOKABLE_H #define QINVOKABLE_H diff --git a/tests/auto/tools/moc/qmlmacro.h b/tests/auto/tools/moc/qmlmacro.h new file mode 100644 index 0000000000..e44138a3b6 --- /dev/null +++ b/tests/auto/tools/moc/qmlmacro.h @@ -0,0 +1,19 @@ +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + + +#ifndef QMlMACRO_H +#define QMlMACRO_H + +#include <QObject> +#include <QByteArray> + +struct QmlMacro : QObject +{ + Q_OBJECT + Q_CLASSINFO("QML.Element", "auto") + + signals: + void f(QByteArray &b); +}; +#endif diff --git a/tests/auto/tools/moc/qprivateslots.h b/tests/auto/tools/moc/qprivateslots.h index fd1c726b44..d4b158bbc4 100644 --- a/tests/auto/tools/moc/qprivateslots.h +++ b/tests/auto/tools/moc/qprivateslots.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef QPRIVATESLOTS_H #define QPRIVATESLOTS_H @@ -33,7 +8,7 @@ struct TestQPrivateSlots_Private { - void _q_privateslot() {}; + void _q_privateslot() {} }; class TestQPrivateSlots: public QObject diff --git a/tests/auto/tools/moc/qtbug-35657-gadget.h b/tests/auto/tools/moc/qtbug-35657-gadget.h index 5008c26865..d97e1f7f45 100644 --- a/tests/auto/tools/moc/qtbug-35657-gadget.h +++ b/tests/auto/tools/moc/qtbug-35657-gadget.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef QTBUG_35657_GADGET_H #define QTBUG_35657_GADGET_H diff --git a/tests/auto/tools/moc/related-metaobjects-in-gadget.h b/tests/auto/tools/moc/related-metaobjects-in-gadget.h index ac00b642c3..0ea6c09a73 100644 --- a/tests/auto/tools/moc/related-metaobjects-in-gadget.h +++ b/tests/auto/tools/moc/related-metaobjects-in-gadget.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef RELATED_METAOBJECTS_IN_GADGET_H #define RELATED_METAOBJECTS_IN_GADGET_H diff --git a/tests/auto/tools/moc/related-metaobjects-in-namespaces.h b/tests/auto/tools/moc/related-metaobjects-in-namespaces.h index f6c0a64c9b..efd8210767 100644 --- a/tests/auto/tools/moc/related-metaobjects-in-namespaces.h +++ b/tests/auto/tools/moc/related-metaobjects-in-namespaces.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef RELATED_METAOBJECTS_IN_NAMESPACES_H #define RELATED_METAOBJECTS_IN_NAMESPACES_H diff --git a/tests/auto/tools/moc/related-metaobjects-name-conflict.h b/tests/auto/tools/moc/related-metaobjects-name-conflict.h index 14307a4c1b..cccd97e4e7 100644 --- a/tests/auto/tools/moc/related-metaobjects-name-conflict.h +++ b/tests/auto/tools/moc/related-metaobjects-name-conflict.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef RELATED_METAOBJECTS_NAME_CONFLICT_H #define RELATED_METAOBJECTS_NAME_CONFLICT_H diff --git a/tests/auto/tools/moc/signal-with-default-arg.h b/tests/auto/tools/moc/signal-with-default-arg.h new file mode 100644 index 0000000000..3fd98712eb --- /dev/null +++ b/tests/auto/tools/moc/signal-with-default-arg.h @@ -0,0 +1,16 @@ +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#ifndef SIGNAL_WITH_DEFAULT_ARG_H +#define SIGNAL_WITH_DEFAULT_ARG_H + +#include <QtCore/qobject.h> + +class SignalWithDefaultArg : public QObject +{ + Q_OBJECT +signals: + void signalWithDefaultArg(int i = 12); +}; + +#endif // SIGNAL_WITH_DEFAULT_ARG_H diff --git a/tests/auto/tools/moc/single-quote-digit-separator-n3781.h b/tests/auto/tools/moc/single-quote-digit-separator-n3781.h index 1b4aeab890..f272ecbddf 100644 --- a/tests/auto/tools/moc/single-quote-digit-separator-n3781.h +++ b/tests/auto/tools/moc/single-quote-digit-separator-n3781.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com> -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtGui module 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$ -** -****************************************************************************/ +// Copyright (C) 2013 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com> +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef SINGLE_QUOTE_DIGIT_SEPARATOR_N3781_H #define SINGLE_QUOTE_DIGIT_SEPARATOR_N3781_H diff --git a/tests/auto/tools/moc/single_function_keyword.h b/tests/auto/tools/moc/single_function_keyword.h index ec1a0ac628..0c907db9ef 100644 --- a/tests/auto/tools/moc/single_function_keyword.h +++ b/tests/auto/tools/moc/single_function_keyword.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef SINGLE_FUNCTION_KEYWORD_H #define SINGLE_FUNCTION_KEYWORD_H @@ -47,7 +22,10 @@ class SingleFunctionKeywordBeforeInline : public QObject public: inline SingleFunctionKeywordBeforeInline() {} +QT_WARNING_PUSH +QT_WARNING_DISABLE_CLANG("-Wundefined-inline") Q_SIGNAL inline void mySignal(); +QT_WARNING_POP Q_SLOT inline void mySlot() { emit mySignal(); } }; @@ -58,7 +36,10 @@ class SingleFunctionKeywordAfterInline : public QObject public: inline SingleFunctionKeywordAfterInline() {} +QT_WARNING_PUSH +QT_WARNING_DISABLE_CLANG("-Wundefined-inline") inline Q_SIGNAL void mySignal(); +QT_WARNING_POP inline Q_SLOT void mySlot() { emit mySignal(); } }; diff --git a/tests/auto/tools/moc/slots-with-void-template.h b/tests/auto/tools/moc/slots-with-void-template.h index 4bdb587372..5b51041155 100644 --- a/tests/auto/tools/moc/slots-with-void-template.h +++ b/tests/auto/tools/moc/slots-with-void-template.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef SLOTS_WITH_VOID_TEMPLATE_H #define SLOTS_WITH_VOID_TEMPLATE_H diff --git a/tests/auto/tools/moc/task189996.h b/tests/auto/tools/moc/task189996.h deleted file mode 100644 index f94a051b3a..0000000000 --- a/tests/auto/tools/moc/task189996.h +++ /dev/null @@ -1,47 +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$ -** -****************************************************************************/ -// inline functions can have throw declarations - -#ifndef TASK189996_H -#define TASK189996_H - -#include <QObject> - -class InlineSlotsWithThrowDeclaration : public QObject -{ - Q_OBJECT - -public slots: - void a() throw() { } - void b() const throw() { } - void c() throw(); - void d() throw(int) { } - void e() const throw(int,double) { } -}; - -#endif diff --git a/tests/auto/tools/moc/task192552.h b/tests/auto/tools/moc/task192552.h index 302ead0e20..aad545292f 100644 --- a/tests/auto/tools/moc/task192552.h +++ b/tests/auto/tools/moc/task192552.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef TASK192552_H #define TASK192552_H diff --git a/tests/auto/tools/moc/task234909.h b/tests/auto/tools/moc/task234909.h index 661df19fa9..4be1383f4a 100644 --- a/tests/auto/tools/moc/task234909.h +++ b/tests/auto/tools/moc/task234909.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef TASK234909_H #define TASK234909_H diff --git a/tests/auto/tools/moc/task240368.h b/tests/auto/tools/moc/task240368.h index 0913517c16..1e728d373f 100644 --- a/tests/auto/tools/moc/task240368.h +++ b/tests/auto/tools/moc/task240368.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only // moc parsing issue with "unsigned" subphrase #ifndef TASK240368_H diff --git a/tests/auto/tools/moc/task87883.h b/tests/auto/tools/moc/task87883.h index be0b505c95..60ca529d53 100644 --- a/tests/auto/tools/moc/task87883.h +++ b/tests/auto/tools/moc/task87883.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef TASK87883_H #define TASK87883_H diff --git a/tests/auto/tools/moc/tech-preview.h b/tests/auto/tools/moc/tech-preview.h new file mode 100644 index 0000000000..8f285048e4 --- /dev/null +++ b/tests/auto/tools/moc/tech-preview.h @@ -0,0 +1,43 @@ +// Copyright (C) 2024 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Marc Mutz <marc.mutz@kdab.com> +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#ifndef TECH_PREVIEW_H +#define TECH_PREVIEW_H + +#include <QObject> + +class QT_TECH_PREVIEW_API MyTechPreviewObject : public QObject +{ + QT_TECH_PREVIEW_API + Q_OBJECT + + QT_TECH_PREVIEW_API + Q_PROPERTY(int status MEMBER m_status) + + int m_status = 0; + +public: + void myMethod() {} + QT_TECH_PREVIEW_API void myTPMethod() {} + + Q_INVOKABLE QT_TECH_PREVIEW_API void myTPInvokable1() {} + QT_TECH_PREVIEW_API Q_INVOKABLE void myTPInvokable2() {} + + enum class QT_TECH_PREVIEW_API MyTechPreviewEnum + { + A, B, C, + TP QT_TECH_PREVIEW_API, + X, Y, Z + }; + +signals: + void mySignal(); + QT_TECH_PREVIEW_API void myTPSignal(); + +public Q_SLOTS: + void mySlot() {} + QT_TECH_PREVIEW_API void myTPSlot() {} +}; + + +#endif // TECH_PREVIEW_H diff --git a/tests/auto/tools/moc/template-gtgt.h b/tests/auto/tools/moc/template-gtgt.h index 411b8c4266..ed2da17405 100644 --- a/tests/auto/tools/moc/template-gtgt.h +++ b/tests/auto/tools/moc/template-gtgt.h @@ -1,43 +1,18 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef TEMPLATE_GTGT_H #define TEMPLATE_GTGT_H template<class TYPE, size_t COUNT> class myTemplate : QString, - QVector<TYPE, QList<COUNT>> + QList<TYPE, QList<COUNT>> {}; template<class TYPE, size_t COUNT> class myTemplate2 : QString, - QVector<TYPE, QList< (4 >> 2) >> + QList<TYPE, QList< (4 >> 2) >> {}; class Widget : public QWidget diff --git a/tests/auto/tools/moc/testproject/Plugin/Plugin.h b/tests/auto/tools/moc/testproject/Plugin/Plugin.h index 63534f6176..a947bf968a 100644 --- a/tests/auto/tools/moc/testproject/Plugin/Plugin.h +++ b/tests/auto/tools/moc/testproject/Plugin/Plugin.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QObject> struct MyInterface diff --git a/tests/auto/tools/moc/trigraphs.h b/tests/auto/tools/moc/trigraphs.h index 43b9d26d85..6d0ce2cf69 100644 --- a/tests/auto/tools/moc/trigraphs.h +++ b/tests/auto/tools/moc/trigraphs.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef TRIGRAPHS_H #define TRIGRAPHS_H diff --git a/tests/auto/tools/moc/tst_moc.cpp b/tests/auto/tools/moc/tst_moc.cpp index 41bc4bc73b..d24dfa11f7 100644 --- a/tests/auto/tools/moc/tst_moc.cpp +++ b/tests/auto/tools/moc/tst_moc.cpp @@ -1,38 +1,18 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Copyright (C) 2013 Olivier Goffart <ogoffart@woboq.com> -** 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> +// Copyright (C) 2020 The Qt Company Ltd. +// Copyright (C) 2020 Olivier Goffart <ogoffart@woboq.com> +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#include <QTest> +#include <QSignalSpy> #include <stdio.h> +#include <optional> #include <qobject.h> #include <qmetaobject.h> +#include <qjsondocument.h> +#include <qregularexpression.h> +#include <qtyperevision.h> + +#include <private/qobject_p.h> #include "using-namespaces.h" #include "assign-namespace.h" @@ -40,7 +20,6 @@ #include "single_function_keyword.h" #include "backslash-newlines.h" #include "slots-with-void-template.h" -#include "pure-virtual-signals.h" #include "qinvokable.h" // msvc and friends crap out on it #if !defined(Q_CC_GNU) || defined(Q_OS_WIN) @@ -61,6 +40,7 @@ #include "cxx11-enums.h" #include "cxx11-final-classes.h" #include "cxx11-explicit-override-control.h" +#include "cxx11-trailing-return.h" #include "parse-defines.h" #include "related-metaobjects-in-namespaces.h" @@ -71,6 +51,21 @@ #include "grand-parent-gadget-class.h" #include "namespace.h" #include "cxx17-namespaces.h" +#include "cxx-attributes.h" + +#include "moc_include.h" +#include "pointery_to_incomplete.h" +#include "fwdclass1.h" +#include "fwdclass2.h" +#include "fwdclass3.h" + +#include "signal-with-default-arg.h" + +#include "qmlmacro.h" + +#include "tech-preview.h" + +using namespace Qt::StringLiterals; #ifdef Q_MOC_RUN // check that moc can parse these constructs, they are being used in Windows winsock2.h header @@ -78,8 +73,55 @@ const char *string_hash_hash = STRING_HASH_HASH("baz"); #endif +#if defined(Q_MOC_RUN) || __cplusplus > 202002L +/* Check that nested inline namespaces are at least not causing moc to break. + Check it even outside of C++20 mode as moc gets passed the wrong __cplusplus version + and also to increase coverage, given how few C++20 configurations exist in the CI at the time + of writing this comment. +*/ +namespace A::inline B {} +namespace A { + namespace B::inline C {} +} +#endif + + +namespace TokenStartingWithNumber +{ +Q_NAMESPACE + +#define FOR_EACH_ITEM( CALL ) \ + CALL( EXAMPLE ) \ + CALL( 123_EXAMPLE ) \ + CALL( OTHER_EXAMPLE ) + +enum FooItems +{ + +#define ENUM_ITEM(NAME, ...) FOO ## NAME, + FOR_EACH_ITEM( ENUM_ITEM ) +}; + +Q_ENUM_NS(FooItems) +} + Q_DECLARE_METATYPE(const QMetaObject*); +#define TESTEXPORTMACRO Q_DECL_EXPORT + +#if !defined(Q_MOC_RUN) && !defined(Q_NOREPLY) +# define Q_NOREPLY +#endif + +struct TagTest : QObject { + Q_OBJECT + + Q_INVOKABLE Q_NOREPLY inline int test() {return 0;} +public slots: + Q_NOREPLY virtual inline void pamOpen(int){} +}; + + namespace TestNonQNamespace { struct TestGadget { @@ -97,6 +139,12 @@ public: Key2 }; Q_ENUM(TestGEnum2) + + enum TestGEnum3: quint8 { + Key1 = 23, + Key2 + }; + Q_ENUM(TestGEnum3) }; } @@ -115,6 +163,12 @@ namespace TestQNamespace { }; Q_ENUM_NS(TestEnum2) + enum TestEnum3: qint8 { + Key1 = 23, + Key2 + }; + Q_ENUM_NS(TestEnum3) + // try to dizzy moc by adding a struct in between struct TestGadget { Q_GADGET @@ -127,8 +181,35 @@ namespace TestQNamespace { Key1 = 23, Key2 }; + enum TestGEnum3: qint16 { + Key1 = 33, + Key2 + }; Q_ENUM(TestGEnum1) Q_ENUM(TestGEnum2) + Q_ENUM(TestGEnum3) + }; + + struct TestGadgetExport { + Q_GADGET_EXPORT(TESTEXPORTMACRO) + Q_CLASSINFO("key", "exported") + public: + enum class TestGeEnum1 { + Key1 = 20, + Key2 + }; + Q_ENUM(TestGeEnum1) + enum class TestGeEnum2 { + Key1 = 23, + Key2 + }; + Q_ENUM(TestGeEnum2) + enum TestGeEnum3: quint16 { + Key1 = 26, + Key2 + }; + Q_ENUM(TestGeEnum3) + }; enum class TestFlag1 { @@ -148,6 +229,36 @@ namespace TestQNamespace { Q_FLAG_NS(TestFlag2) } +namespace TestSameEnumNamespace { + Q_NAMESPACE + + enum class TestSameEnumNamespace { + Key1 = 1, + Key2 = 2, + }; + Q_ENUM_NS(TestSameEnumNamespace) +} + +namespace TestNestedSameEnumNamespace { +namespace a { + Q_NAMESPACE + // enum class with the same name as the enclosing nested namespace + enum class a { + Key11 = 11, + Key12 = 12, + }; + Q_ENUM_NS(a) +} +} + +namespace TestExportNamespace { + Q_NAMESPACE_EXPORT(TESTEXPORTMACRO) + enum class MyEnum { + Key1, Key2 + }; + Q_ENUM_NS(MyEnum) +} + QT_USE_NAMESPACE template <bool b> struct QTBUG_31218 {}; @@ -169,6 +280,24 @@ public: CreatableGadget creatableGadget; // Force the compiler to use the constructor +struct ParentWithSignalWithArgument : QObject { + Q_OBJECT + Q_PROPERTY(int i READ i WRITE setI NOTIFY iChanged) + +public: + int i() const {return 0;} + void setI(int) {} + +signals: + void iChanged(int); +}; + +struct SignalWithArgumentInParent : ParentWithSignalWithArgument +{ + Q_OBJECT + Q_PROPERTY(int otherI READ i WRITE setI NOTIFY iChanged) +}; + struct MyStruct {}; struct MyStruct2 {}; @@ -288,11 +417,20 @@ class TestClassinfoWithEscapes: public QObject Q_CLASSINFO("cpp c*/omment", "f/*oo") Q_CLASSINFO("endswith\\", "Or?\?/") Q_CLASSINFO("newline\n inside\n", "Or \r") + Q_CLASSINFO("\xffz", "\0012") public slots: void slotWithAReallyLongName(int) { } }; +#define CLASSINFO_VAARGS(...) Q_CLASSINFO("classinfo_va_args", #__VA_ARGS__) +class TestClassinfoFromVaArgs : public QObject +{ + Q_OBJECT + CLASSINFO_VAARGS(a, b, c, d) +}; +#undef CLASSINFO_VAARGS + struct ForwardDeclaredStruct; struct StructQObject : public QObject @@ -302,14 +440,23 @@ public: void foo(struct ForwardDeclaredStruct *); }; +QT_WARNING_PUSH +QT_WARNING_DISABLE_GCC("-Wunused-variable") void StructQObject::foo(struct ForwardDeclaredStruct *) { struct Inner { bool field; }; - struct Inner unusedVariable; + Q_DECL_UNUSED_MEMBER struct Inner unusedVariable; } +QT_WARNING_POP + +QT_WARNING_PUSH +QT_WARNING_DISABLE_CLANG("-Wignored-qualifiers") +QT_WARNING_DISABLE_GCC("-Wignored-qualifiers") + +using ObjectCRef = const QObject &; class TestClass : public MyNamespace::TestSuperClass, public DONT_CONFUSE_MOC(MyStruct), public DONT_CONFUSE_MOC_EVEN_MORE(MyStruct2, dummy, ignored) @@ -506,6 +653,7 @@ signals: // public slots: void const slotWithSillyConst() {} + void slotTakingCRefViaTypedef(ObjectCRef o) { this->setObjectName(o.objectName()); } public: Q_INVOKABLE void const slotWithSillyConst2() {} @@ -532,6 +680,12 @@ private slots: virtual inline void blub2() {} }; +QT_WARNING_POP + +// quick test to verify that moc handles the L suffix +// correctly in the preprocessor +#if 2000L < 1 +#else class PropertyTestClass : public QObject { Q_OBJECT @@ -541,6 +695,7 @@ public: Q_ENUM(TestEnum) }; +#endif class PropertyUseClass : public QObject { @@ -573,7 +728,7 @@ class CtorTestClass : public QObject { Q_OBJECT public: - Q_INVOKABLE CtorTestClass(QObject *parent = 0); + Q_INVOKABLE CtorTestClass(QObject *parent = nullptr); CtorTestClass(int foo); @@ -601,7 +756,6 @@ class tst_Moc : public QObject Q_PROPERTY(bool user1 READ user1 USER true ) Q_PROPERTY(bool user2 READ user2 USER false) - Q_PROPERTY(bool user3 READ user3 USER userFunction()) Q_PROPERTY(QString member1 MEMBER sMember) Q_PROPERTY(QString member2 MEMBER sMember READ member2) Q_PROPERTY(QString member3 MEMBER sMember WRITE setMember3) @@ -617,7 +771,6 @@ public: private slots: void initTestCase(); - void slotWithException() throw(MyStruct); void dontStripNamespaces(); void oldStyleCasts(); void warnOnExtraSignalSlotQualifiaction(); @@ -628,12 +781,14 @@ private slots: void task87883(); void multilineComments(); void classinfoWithEscapes(); + void classinfoFromVaArgs(); void trNoopInClassInfo(); void ppExpressionEvaluation(); void arrayArguments(); void preprocessorConditionals(); void blackslashNewlines(); void slotWithSillyConst(); + void slotTakingCRefViaTypedef(); void testExtraData(); void testExtraDataForEnum(); void namespaceTypeProperty(); @@ -659,7 +814,7 @@ private slots: void templateGtGt(); void qprivateslots(); void qprivateproperties(); - void inlineSlotsWithThrowDeclaration(); + void anonymousProperties(); void warnOnPropertyWithoutREAD(); void constructors(); void typenameWithUnsigned(); @@ -674,6 +829,7 @@ private slots: void privateClass(); void cxx11Enums_data(); void cxx11Enums(); + void cxx11TrailingReturn(); void returnRefs(); void memberProperties_data(); void memberProperties(); @@ -683,6 +839,7 @@ private slots: void finalClasses(); void explicitOverrideControl_data(); void explicitOverrideControl(); + void overloadedAddressOperator(); void autoPropertyMetaTypeRegistration(); void autoMethodArgumentMetaTypeRegistration(); void autoSignalSpyMetaTypeRegistration(); @@ -702,7 +859,20 @@ private slots: void optionsFileError_data(); void optionsFileError(); void testQNamespace(); + void testNestedQNamespace(); void cxx17Namespaces(); + void cxxAttributes(); + void mocJsonOutput(); + void mocInclude(); + void requiredProperties(); + void qpropertyMembers(); + void observerMetaCall(); + void setQPRopertyBinding(); + void privateQPropertyShim(); + void readWriteThroughBindable(); + void invokableCtors(); + void virtualInlineTaggedSlot(); + void tokenStartingWithNumber(); signals: void sigWithUnsignedArg(unsigned foo); @@ -714,12 +884,11 @@ signals: void constSignal2(int arg) const; void member4Changed(); void member5Changed(const QString &newVal); + void sigWithDefaultArg(int i = 12); private: bool user1() { return true; }; bool user2() { return false; }; - bool user3() { return false; }; - bool userFunction(){ return false; }; template <class T> void revisions_T(); QString member2() const { return sMember; } void setMember3( const QString &sVal ) { sMember = sVal; } @@ -741,23 +910,31 @@ private: }; +#define VERIFY_NO_ERRORS(proc) do { \ + auto &&p = proc; \ + const QByteArray stderr = p.readAllStandardError(); \ + QVERIFY2(stderr.isEmpty(), stderr.data()); \ + QCOMPARE(p.exitCode(), 0); \ + } while (false) + + void tst_Moc::initTestCase() { - QString binpath = QLibraryInfo::location(QLibraryInfo::BinariesPath); - QString qmake = QString("%1/qmake").arg(binpath); - m_moc = QString("%1/moc").arg(binpath); + QString binpath = QLibraryInfo::path(QLibraryInfo::BinariesPath); + QString qtpaths = QString("%1/qtpaths").arg(binpath); + QString libexecPath = QLibraryInfo::path(QLibraryInfo::LibraryExecutablesPath); + m_moc = QString("%1/moc").arg(libexecPath); const QString testHeader = QFINDTESTDATA("backslash-newlines.h"); QVERIFY(!testHeader.isEmpty()); m_sourceDirectory = QFileInfo(testHeader).absolutePath(); #if defined(Q_OS_UNIX) && QT_CONFIG(process) QProcess proc; - proc.start(qmake, QStringList() << "-query" << "QT_INSTALL_HEADERS"); + proc.start(qtpaths, QStringList() << "-query" << "QT_INSTALL_HEADERS"); QVERIFY(proc.waitForFinished()); - QCOMPARE(proc.exitCode(), 0); + VERIFY_NO_ERRORS(proc); QByteArray output = proc.readAllStandardOutput(); QVERIFY(!output.isEmpty()); - QCOMPARE(proc.readAllStandardError(), QByteArray()); qtIncludePath = QString::fromLocal8Bit(output).trimmed(); QFileInfo fi(qtIncludePath); QVERIFY(fi.exists()); @@ -765,12 +942,6 @@ void tst_Moc::initTestCase() #endif } -void tst_Moc::slotWithException() throw(MyStruct) -{ - // be happy - QVERIFY(true); -} - void tst_Moc::dontStripNamespaces() { Sender sender; @@ -798,22 +969,20 @@ void tst_Moc::oldStyleCasts() QProcess proc; proc.start(m_moc, QStringList(m_sourceDirectory + QStringLiteral("/oldstyle-casts.h"))); QVERIFY(proc.waitForFinished()); - QCOMPARE(proc.exitCode(), 0); + VERIFY_NO_ERRORS(proc); QByteArray mocOut = proc.readAllStandardOutput(); QVERIFY(!mocOut.isEmpty()); - QCOMPARE(proc.readAllStandardError(), QByteArray()); QStringList args; args << "-c" << "-x" << "c++" << "-Wold-style-cast" << "-I" << "." - << "-I" << qtIncludePath << "-o" << "/dev/null" << "-fPIC" << "-std=c++11" << "-"; + << "-I" << qtIncludePath << "-o" << "/dev/null" << "-fPIC" << "-std=c++1z" << "-"; proc.start("gcc", args); QVERIFY(proc.waitForStarted()); proc.write(mocOut); proc.closeWriteChannel(); QVERIFY(proc.waitForFinished()); - QCOMPARE(QString::fromLocal8Bit(proc.readAllStandardError()), QString()); - QCOMPARE(proc.exitCode(), 0); + VERIFY_NO_ERRORS(proc); #else QSKIP("Only tested on linux/gcc"); #endif @@ -824,7 +993,7 @@ void tst_Moc::warnOnExtraSignalSlotQualifiaction() #ifdef MOC_CROSS_COMPILED QSKIP("Not tested when cross-compiled"); #endif -#if defined(Q_OS_LINUX) && defined(Q_CC_GNU) && QT_CONFIG(process) +#if defined(Q_OS_UNIX) && defined(Q_CC_GNU) && QT_CONFIG(process) QProcess proc; const QString header = m_sourceDirectory + QStringLiteral("/extraqualification.h"); proc.start(m_moc, QStringList(header)); @@ -834,10 +1003,10 @@ void tst_Moc::warnOnExtraSignalSlotQualifiaction() QVERIFY(!mocOut.isEmpty()); QString mocWarning = QString::fromLocal8Bit(proc.readAllStandardError()); QCOMPARE(mocWarning, header + - QString(":43: Warning: Function declaration Test::badFunctionDeclaration contains extra qualification. Ignoring as signal or slot.\n") + - header + QString(":46: Warning: parsemaybe: Function declaration Test::anotherOne contains extra qualification. Ignoring as signal or slot.\n")); + QString(":18:1: warning: Function declaration Test::badFunctionDeclaration contains extra qualification. Ignoring as signal or slot.\n") + + header + QString(":21:1: warning: parsemaybe: Function declaration Test::anotherOne contains extra qualification. Ignoring as signal or slot.\n")); #else - QSKIP("Only tested on linux/gcc"); + QSKIP("Only tested on unix/gcc"); #endif } @@ -849,7 +1018,9 @@ void tst_Moc::uLongLong() QVERIFY(idx != -1); idx = mobj->indexOfSlot("slotWithULongLong(unsigned long long)"); QVERIFY(idx != -1); - idx = mobj->indexOfSlot("slotWithULongLongP(unsigned long long*)"); + idx = mobj->indexOfSlot("slotWithULongLong(qulonglong)"); + QVERIFY(idx != -1); + idx = mobj->indexOfSlot("slotWithULongLongP(qulonglong*)"); QVERIFY(idx != -1); idx = mobj->indexOfSlot("slotWithLong(long)"); @@ -868,22 +1039,20 @@ void tst_Moc::inputFileNameWithDotsButNoExtension() proc.setWorkingDirectory(m_sourceDirectory + QStringLiteral("/task71021")); proc.start(m_moc, QStringList("../Header")); QVERIFY(proc.waitForFinished()); - QCOMPARE(proc.exitCode(), 0); + VERIFY_NO_ERRORS(proc); QByteArray mocOut = proc.readAllStandardOutput(); QVERIFY(!mocOut.isEmpty()); - QCOMPARE(proc.readAllStandardError(), QByteArray()); QStringList args; args << "-c" << "-x" << "c++" << "-I" << ".." - << "-I" << qtIncludePath << "-o" << "/dev/null" << "-fPIC" << "-std=c++11" << "-"; + << "-I" << qtIncludePath << "-o" << "/dev/null" << "-fPIC" << "-std=c++1z" << "-"; proc.start("gcc", args); QVERIFY(proc.waitForStarted()); proc.write(mocOut); proc.closeWriteChannel(); QVERIFY(proc.waitForFinished()); - QCOMPARE(QString::fromLocal8Bit(proc.readAllStandardError()), QString()); - QCOMPARE(proc.exitCode(), 0); + VERIFY_NO_ERRORS(proc); #else QSKIP("Only tested on linux/gcc"); #endif @@ -899,10 +1068,6 @@ void tst_Moc::userProperties() property = mobj->property(mobj->indexOfProperty("user2")); QVERIFY(property.isValid()); QVERIFY(!property.isUser()); - - property = mobj->property(mobj->indexOfProperty("user3")); - QVERIFY(property.isValid()); - QVERIFY(!property.isUser(this)); } void tst_Moc::supportConstSignals() @@ -910,12 +1075,12 @@ void tst_Moc::supportConstSignals() QSignalSpy spy1(this, SIGNAL(constSignal1())); QVERIFY(spy1.isEmpty()); emit constSignal1(); - QCOMPARE(spy1.count(), 1); + QCOMPARE(spy1.size(), 1); QSignalSpy spy2(this, SIGNAL(constSignal2(int))); QVERIFY(spy2.isEmpty()); emit constSignal2(42); - QCOMPARE(spy2.count(), 1); + QCOMPARE(spy2.size(), 1); QCOMPARE(spy2.at(0).at(0).toInt(), 42); } @@ -938,18 +1103,29 @@ void tst_Moc::classinfoWithEscapes() const QMetaObject *mobj = &TestClassinfoWithEscapes::staticMetaObject; QCOMPARE(mobj->methodCount() - mobj->methodOffset(), 1); - QCOMPARE(mobj->classInfoCount(), 5); + QCOMPARE(mobj->classInfoCount(), 6); QCOMPARE(mobj->classInfo(2).name(), "cpp c*/omment"); QCOMPARE(mobj->classInfo(2).value(), "f/*oo"); QCOMPARE(mobj->classInfo(3).name(), "endswith\\"); QCOMPARE(mobj->classInfo(3).value(), "Or?\?/"); QCOMPARE(mobj->classInfo(4).name(), "newline\n inside\n"); QCOMPARE(mobj->classInfo(4).value(), "Or \r"); + QCOMPARE(mobj->classInfo(5).name(), "\xff" "z"); + QCOMPARE(mobj->classInfo(5).value(), "\001" "2"); QMetaMethod mm = mobj->method(mobj->methodOffset()); QCOMPARE(mm.methodSignature(), QByteArray("slotWithAReallyLongName(int)")); } +void tst_Moc::classinfoFromVaArgs() +{ + const QMetaObject *mobj = &TestClassinfoFromVaArgs::staticMetaObject; + + QCOMPARE(mobj->classInfoCount(), 1); + QCOMPARE(mobj->classInfo(0).name(), "classinfo_va_args"); + QCOMPARE(mobj->classInfo(0).value(), "a,b,c,d"); +} + void tst_Moc::trNoopInClassInfo() { TestClass t; @@ -1013,6 +1189,15 @@ void tst_Moc::slotWithSillyConst() QVERIFY(mobj->indexOfSlot("slotWithVoidStar(void*)") != -1); } +void tst_Moc::slotTakingCRefViaTypedef() +{ + TestClass tst; + QObject obj; + obj.setObjectName("works"); + QMetaObject::invokeMethod(&tst, "slotTakingCRefViaTypedef", Q_ARG(ObjectCRef, obj)); + QCOMPARE(obj.objectName(), "works"); +} + void tst_Moc::testExtraData() { const QMetaObject *mobj = &PropertyTestClass::staticMetaObject; @@ -1039,7 +1224,7 @@ void tst_Moc::testExtraDataForEnum() const QMetaObject *mobjUser = &EnumUserClass::staticMetaObject; QCOMPARE(mobjUser->enumeratorCount(), 0); - const QMetaObject * const *objects = mobjUser->d.relatedMetaObjects; + const auto *objects = mobjUser->d.relatedMetaObjects; QVERIFY(objects); QCOMPARE(objects[0], mobjSource); QVERIFY(!objects[1]); @@ -1121,7 +1306,7 @@ void tst_Moc::warnOnMultipleInheritance() QVERIFY(!mocOut.isEmpty()); QString mocWarning = QString::fromLocal8Bit(proc.readAllStandardError()); QCOMPARE(mocWarning, header + - QString(":43: Warning: Class Bar inherits from two QObject subclasses QWindow and Foo. This is not supported!\n")); + QString(":18:1: warning: Class Bar inherits from two QObject subclasses QWindow and Foo. This is not supported!\n")); #else QSKIP("Only tested on linux/gcc"); #endif @@ -1144,25 +1329,21 @@ void tst_Moc::ignoreOptionClashes() if (!finished) qWarning("waitForFinished failed. QProcess error: %d", (int)proc.error()); QVERIFY(finished); - if (proc.exitCode() != 0) { - qDebug() << proc.readAllStandardError(); - } - QCOMPARE(proc.exitCode(), 0); - QCOMPARE(proc.readAllStandardError(), QByteArray()); + VERIFY_NO_ERRORS(proc); QByteArray mocOut = proc.readAllStandardOutput(); // If -pthread wasn't ignored, it was parsed as a prefix of "thread/", which breaks compilation. QStringList gccArgs; gccArgs << "-c" << "-x" << "c++" << "-I" << ".." << "-I" << qtIncludePath << "-I" << includeDir << "-o" << "/dev/null" - << "-fPIC" << "-std=c++11" << "-"; + << "-fPIC" << "-std=c++1z" << "-"; proc.start("gcc", gccArgs); QVERIFY(proc.waitForStarted()); proc.write(mocOut); proc.closeWriteChannel(); QVERIFY(proc.waitForFinished()); - QCOMPARE(QString::fromLocal8Bit(proc.readAllStandardError()), QString()); + VERIFY_NO_ERRORS(proc); #else QSKIP("Only tested on linux/gcc"); #endif @@ -1185,7 +1366,7 @@ void tst_Moc::forgottenQInterface() QVERIFY(!mocOut.isEmpty()); QString mocWarning = QString::fromLocal8Bit(proc.readAllStandardError()); QCOMPARE(mocWarning, header + - QString(":45: Warning: Class Test implements the interface MyInterface but does not list it in Q_INTERFACES. qobject_cast to MyInterface will not work!\n")); + QString(":20:1: warning: Class Test implements the interface MyInterface but does not list it in Q_INTERFACES. qobject_cast to MyInterface will not work!\n")); #else QSKIP("Only tested on linux/gcc"); #endif @@ -1214,9 +1395,9 @@ void tst_Moc::winNewline() QVERIFY(f.open(QIODevice::ReadOnly)); // no QIODevice::Text! QByteArray data = f.readAll(); f.close(); - for (int i = 0; i < data.count(); ++i) { + for (int i = 0; i < data.size(); ++i) { if (data.at(i) == QLatin1Char('\r')) { - QVERIFY(i < data.count() - 1); + QVERIFY(i < data.size() - 1); ++i; QCOMPARE(data.at(i), '\n'); } else { @@ -1267,11 +1448,7 @@ void tst_Moc::frameworkSearchPath() if (!finished) qWarning("waitForFinished failed. QProcess error: %d", (int)proc.error()); QVERIFY(finished); - if (proc.exitCode() != 0) { - qDebug() << proc.readAllStandardError(); - } - QCOMPARE(proc.exitCode(), 0); - QCOMPARE(proc.readAllStandardError(), QByteArray()); + VERIFY_NO_ERRORS(proc); #else QSKIP("Only tested/relevant on unixy platforms"); #endif @@ -1299,23 +1476,21 @@ void tst_Moc::templateGtGt() #ifdef MOC_CROSS_COMPILED QSKIP("Not tested when cross-compiled"); #endif -#if defined(Q_OS_LINUX) && defined(Q_CC_GNU) && QT_CONFIG(process) +#if defined(Q_OS_UNIX) && defined(Q_CC_GNU) && QT_CONFIG(process) QProcess proc; proc.start(m_moc, QStringList(m_sourceDirectory + QStringLiteral("/template-gtgt.h"))); QVERIFY(proc.waitForFinished()); - QCOMPARE(proc.exitCode(), 0); + VERIFY_NO_ERRORS(proc); QByteArray mocOut = proc.readAllStandardOutput(); QVERIFY(!mocOut.isEmpty()); - QString mocWarning = QString::fromLocal8Bit(proc.readAllStandardError()); - QVERIFY(mocWarning.isEmpty()); #else - QSKIP("Only tested on linux/gcc"); + QSKIP("Only tested on unix/gcc"); #endif } void tst_Moc::defineMacroViaCmdline() { -#if defined(Q_OS_LINUX) && defined(Q_CC_GNU) && QT_CONFIG(process) +#if defined(Q_OS_UNIX) && defined(Q_CC_GNU) && QT_CONFIG(process) QProcess proc; QStringList args; @@ -1324,18 +1499,17 @@ void tst_Moc::defineMacroViaCmdline() proc.start(m_moc, args); QVERIFY(proc.waitForFinished()); - QCOMPARE(proc.exitCode(), 0); - QCOMPARE(proc.readAllStandardError(), QByteArray()); + VERIFY_NO_ERRORS(proc); QByteArray mocOut = proc.readAllStandardOutput(); QVERIFY(!mocOut.isEmpty()); #else - QSKIP("Only tested on linux/gcc"); + QSKIP("Only tested on unix/gcc"); #endif } void tst_Moc::defineMacroViaForcedInclude() { -#if defined(Q_OS_LINUX) && defined(Q_CC_GNU) && QT_CONFIG(process) +#if defined(Q_OS_UNIX) && defined(Q_CC_GNU) && QT_CONFIG(process) QProcess proc; QStringList args; @@ -1344,18 +1518,17 @@ void tst_Moc::defineMacroViaForcedInclude() proc.start(m_moc, args); QVERIFY(proc.waitForFinished()); - QCOMPARE(proc.exitCode(), 0); - QCOMPARE(proc.readAllStandardError(), QByteArray()); + VERIFY_NO_ERRORS(proc); QByteArray mocOut = proc.readAllStandardOutput(); QVERIFY(!mocOut.isEmpty()); #else - QSKIP("Only tested on linux/gcc"); + QSKIP("Only tested on unix/gcc"); #endif } void tst_Moc::defineMacroViaForcedIncludeRelative() { -#if defined(Q_OS_LINUX) && defined(Q_CC_GNU) && QT_CONFIG(process) +#if defined(Q_OS_UNIX) && defined(Q_CC_GNU) && QT_CONFIG(process) QProcess proc; QStringList args; @@ -1364,19 +1537,18 @@ void tst_Moc::defineMacroViaForcedIncludeRelative() proc.start(m_moc, args); QVERIFY(proc.waitForFinished()); - QCOMPARE(proc.exitCode(), 0); - QCOMPARE(proc.readAllStandardError(), QByteArray()); + VERIFY_NO_ERRORS(proc); QByteArray mocOut = proc.readAllStandardOutput(); QVERIFY(!mocOut.isEmpty()); #else - QSKIP("Only tested on linux/gcc"); + QSKIP("Only tested on unix/gcc"); #endif } void tst_Moc::environmentIncludePaths_data() { -#if defined(Q_OS_LINUX) && defined(Q_CC_GNU) && QT_CONFIG(process) +#if defined(Q_OS_UNIX) && defined(Q_CC_GNU) && QT_CONFIG(process) QTest::addColumn<QString>("cmdline"); QTest::addColumn<QString>("varname"); @@ -1390,7 +1562,7 @@ void tst_Moc::environmentIncludePaths_data() void tst_Moc::environmentIncludePaths() { -#if defined(Q_OS_LINUX) && defined(Q_CC_GNU) && QT_CONFIG(process) +#if defined(Q_OS_UNIX) && defined(Q_CC_GNU) && QT_CONFIG(process) QFETCH(QString, cmdline); QFETCH(QString, varname); @@ -1410,31 +1582,31 @@ void tst_Moc::environmentIncludePaths() proc.setProcessEnvironment(env); proc.start(m_moc, args); QVERIFY(proc.waitForFinished()); - QCOMPARE(proc.exitCode(), 0); - QCOMPARE(proc.readAllStandardError(), QByteArray()); + VERIFY_NO_ERRORS(proc); QByteArray mocOut = proc.readAllStandardOutput(); QVERIFY(!mocOut.isEmpty()); #else - QSKIP("Only tested on linux/gcc"); + QSKIP("Only tested on unix/gcc"); #endif } // tst_Moc::specifyMetaTagsFromCmdline() // plugin_metadata.h contains a plugin which we register here. Since we're not building this -// application as a plugin, we need top copy some of the initializer code found in qplugin.h: -extern "C" QObject *qt_plugin_instance(); -extern "C" const char *qt_plugin_query_metadata(); +// application as a plugin, we need to copy some of the initializer code found in qplugin.h: +extern "C" Q_DECL_EXPORT QObject *qt_plugin_instance(); +extern "C" Q_DECL_EXPORT QPluginMetaData qt_plugin_query_metadata_v2(); class StaticPluginInstance{ public: StaticPluginInstance() { - QStaticPlugin plugin = { &qt_plugin_instance, &qt_plugin_query_metadata }; + QStaticPlugin plugin(qt_plugin_instance, qt_plugin_query_metadata_v2); qRegisterStaticPluginFunction(plugin); } }; static StaticPluginInstance staticInstance; void tst_Moc::specifyMetaTagsFromCmdline() { - foreach (const QStaticPlugin &plugin, QPluginLoader::staticPlugins()) { + const auto staticPlugins = QPluginLoader::staticPlugins(); + for (const QStaticPlugin &plugin : staticPlugins) { const QString iid = plugin.metaData().value(QLatin1String("IID")).toString(); if (iid == QLatin1String("test.meta.tags")) { const QJsonArray metaTagsUriList = plugin.metaData().value("uri").toArray(); @@ -1452,41 +1624,43 @@ void tst_Moc::specifyMetaTagsFromCmdline() { void tst_Moc::invokable() { + const int fooIndex = 4; { const QMetaObject &mobj = InvokableBeforeReturnType::staticMetaObject; - QCOMPARE(mobj.methodCount(), 6); - QCOMPARE(mobj.method(5).methodSignature(), QByteArray("foo()")); + QCOMPARE(mobj.methodCount(), 5); + QCOMPARE(mobj.method(fooIndex).methodSignature(), QByteArray("foo()")); } { const QMetaObject &mobj = InvokableBeforeInline::staticMetaObject; - QCOMPARE(mobj.methodCount(), 7); - QCOMPARE(mobj.method(5).methodSignature(), QByteArray("foo()")); - QCOMPARE(mobj.method(6).methodSignature(), QByteArray("bar()")); + QCOMPARE(mobj.methodCount(), 6); + QCOMPARE(mobj.method(fooIndex).methodSignature(), QByteArray("foo()")); + QCOMPARE(mobj.method(fooIndex + 1).methodSignature(), QByteArray("bar()")); } } void tst_Moc::singleFunctionKeywordSignalAndSlot() { + const int mySignalIndex = 4; { const QMetaObject &mobj = SingleFunctionKeywordBeforeReturnType::staticMetaObject; - QCOMPARE(mobj.methodCount(), 7); - QCOMPARE(mobj.method(5).methodSignature(), QByteArray("mySignal()")); - QCOMPARE(mobj.method(6).methodSignature(), QByteArray("mySlot()")); + QCOMPARE(mobj.methodCount(), 6); + QCOMPARE(mobj.method(mySignalIndex).methodSignature(), QByteArray("mySignal()")); + QCOMPARE(mobj.method(mySignalIndex + 1).methodSignature(), QByteArray("mySlot()")); } { const QMetaObject &mobj = SingleFunctionKeywordBeforeInline::staticMetaObject; - QCOMPARE(mobj.methodCount(), 7); - QCOMPARE(mobj.method(5).methodSignature(), QByteArray("mySignal()")); - QCOMPARE(mobj.method(6).methodSignature(), QByteArray("mySlot()")); + QCOMPARE(mobj.methodCount(), 6); + QCOMPARE(mobj.method(mySignalIndex).methodSignature(), QByteArray("mySignal()")); + QCOMPARE(mobj.method(mySignalIndex + 1).methodSignature(), QByteArray("mySlot()")); } { const QMetaObject &mobj = SingleFunctionKeywordAfterInline::staticMetaObject; - QCOMPARE(mobj.methodCount(), 7); - QCOMPARE(mobj.method(5).methodSignature(), QByteArray("mySignal()")); - QCOMPARE(mobj.method(6).methodSignature(), QByteArray("mySlot()")); + QCOMPARE(mobj.methodCount(), 6); + QCOMPARE(mobj.method(mySignalIndex).methodSignature(), QByteArray("mySignal()")); + QCOMPARE(mobj.method(mySignalIndex + 1).methodSignature(), QByteArray("mySlot()")); } } @@ -1513,6 +1687,7 @@ class PrivatePropertyTest : public QObject Q_PRIVATE_PROPERTY(PrivatePropertyTest::d, QString blub4 MEMBER mBlub NOTIFY blub4Changed) Q_PRIVATE_PROPERTY(PrivatePropertyTest::d, QString blub5 MEMBER mBlub NOTIFY blub5Changed) Q_PRIVATE_PROPERTY(PrivatePropertyTest::d, QString blub6 MEMBER mConst CONSTANT) + Q_PRIVATE_PROPERTY(PrivatePropertyTest::d, int zap READ zap WRITE setZap BINDABLE bindableZap) class MyDPointer { public: MyDPointer() : mConst("const"), mBar(0), mPlop(0) {} @@ -1524,18 +1699,23 @@ class PrivatePropertyTest : public QObject void setBaz(int value) { mBaz = value; } QString blub() const { return mBlub; } void setBlub(const QString &value) { mBlub = value; } + int zap() { return mZap; } + void setZap(int zap) { mZap = zap; } + QBindable<int> bindableZap() { return QBindable<int>(&mZap); } QString mBlub; const QString mConst; private: int mBar; int mPlop; int mBaz; + QProperty<int> mZap; }; public: - PrivatePropertyTest(QObject *parent = 0) : QObject(parent), mFoo(0), d (new MyDPointer) {} + PrivatePropertyTest(QObject *parent = nullptr) : QObject(parent), mFoo(0), d (new MyDPointer) {} int foo() { return mFoo ; } void setFoo(int value) { mFoo = value; } MyDPointer *d_func() {return d.data();} + const MyDPointer *d_func() const {return d.data();} signals: void blub4Changed(); void blub5Changed(const QString &newBlub); @@ -1561,21 +1741,59 @@ void tst_Moc::qprivateproperties() test.setProperty("baz", 4); QCOMPARE(test.property("baz"), QVariant::fromValue(4)); + QMetaProperty zap = test.metaObject()->property(test.metaObject()->indexOfProperty("zap")); + QVERIFY(zap.isValid()); + QVERIFY(zap.isBindable()); + auto zapBindable = zap.bindable(&test); + QVERIFY(zapBindable.isBindable()); } -#include "task189996.h" -void InlineSlotsWithThrowDeclaration::c() throw() {} +class AnonymousPropertyTest1 : public QObject +{ + Q_OBJECT + QT_ANONYMOUS_PROPERTY(int READ foo WRITE setFoo) +public: + int foo() { return mFoo ; } + void setFoo(int value) { mFoo = value; } -void tst_Moc::inlineSlotsWithThrowDeclaration() +private: + int mFoo = 0; +}; + +class AnonymousPropertyTest2 : public QObject { - InlineSlotsWithThrowDeclaration tst; - const QMetaObject *mobj = tst.metaObject(); - QVERIFY(mobj->indexOfSlot("a()") != -1); - QVERIFY(mobj->indexOfSlot("b()") != -1); - QVERIFY(mobj->indexOfSlot("c()") != -1); - QVERIFY(mobj->indexOfSlot("d()") != -1); - QVERIFY(mobj->indexOfSlot("e()") != -1); + Q_OBJECT + QT_ANONYMOUS_PRIVATE_PROPERTY(d, int READ bar WRITE setBar) + + class MyDPointer { + public: + int bar() { return mBar ; } + void setBar(int value) { mBar = value; } + private: + int mBar = 0; + }; + +public: + AnonymousPropertyTest2(QObject *parent = nullptr) : QObject(parent), d (new MyDPointer) {} + MyDPointer *d_func() {return d.data();} + const MyDPointer *d_func() const {return d.data();} + +private: + QScopedPointer<MyDPointer> d; +}; + +void tst_Moc::anonymousProperties() +{ + AnonymousPropertyTest1 test1; + + test1.setProperty("", 17); + QCOMPARE(test1.property(""), QVariant::fromValue(17)); + + AnonymousPropertyTest2 test2; + + test2.setProperty("", 27); + QCOMPARE(test2.property(""), QVariant::fromValue(27)); } void tst_Moc::warnOnPropertyWithoutREAD() @@ -1583,7 +1801,7 @@ void tst_Moc::warnOnPropertyWithoutREAD() #ifdef MOC_CROSS_COMPILED QSKIP("Not tested when cross-compiled"); #endif -#if defined(Q_OS_LINUX) && defined(Q_CC_GNU) && QT_CONFIG(process) +#if defined(Q_OS_UNIX) && defined(Q_CC_GNU) && QT_CONFIG(process) QProcess proc; const QString header = m_sourceDirectory + QStringLiteral("/warn-on-property-without-read.h"); proc.start(m_moc, QStringList(header)); @@ -1593,9 +1811,9 @@ void tst_Moc::warnOnPropertyWithoutREAD() QVERIFY(!mocOut.isEmpty()); QString mocWarning = QString::fromLocal8Bit(proc.readAllStandardError()); QCOMPARE(mocWarning, header + - QString(":36: Warning: Property declaration foo has no READ accessor function or associated MEMBER variable. The property will be invalid.\n")); + QString(":11:1: warning: Property declaration foo has neither an associated QProperty<> member, nor a READ accessor function nor an associated MEMBER variable. The property will be invalid.\n")); #else - QSKIP("Only tested on linux/gcc"); + QSKIP("Only tested on unix/gcc"); #endif } @@ -1694,7 +1912,7 @@ void tst_Moc::warnOnVirtualSignal() #ifdef MOC_CROSS_COMPILED QSKIP("Not tested when cross-compiled"); #endif -#if defined(Q_OS_LINUX) && defined(Q_CC_GNU) && QT_CONFIG(process) +#if defined(Q_OS_UNIX) && defined(Q_CC_GNU) && QT_CONFIG(process) QProcess proc; const QString header = m_sourceDirectory + QStringLiteral("/pure-virtual-signals.h"); proc.start(m_moc, QStringList(header)); @@ -1703,10 +1921,10 @@ void tst_Moc::warnOnVirtualSignal() QByteArray mocOut = proc.readAllStandardOutput(); QVERIFY(!mocOut.isEmpty()); QString mocWarning = QString::fromLocal8Bit(proc.readAllStandardError()); - QCOMPARE(mocWarning, header + QString(":38: Warning: Signals cannot be declared virtual\n") + - header + QString(":40: Warning: Signals cannot be declared virtual\n")); + QCOMPARE(mocWarning, header + QString(":13:1: warning: Signals cannot be declared virtual\n") + + header + QString(":15:1: warning: Signals cannot be declared virtual\n")); #else - QSKIP("Only tested on linux/gcc"); + QSKIP("Only tested on unix/gcc"); #endif } @@ -1743,6 +1961,9 @@ void tst_Moc::QTBUG5590_dummyProperty() QCOMPARE(o.value2(), 82); } +QT_WARNING_PUSH +QT_WARNING_DISABLE_CLANG("-Wignored-qualifiers") +QT_WARNING_DISABLE_GCC("-Wignored-qualifiers") class QTBUG7421_ReturnConstTemplate: public QObject { Q_OBJECT public slots: @@ -1752,15 +1973,21 @@ public slots: const QString returnConstString(const QString s) { return s; } QString const returnConstString2( QString const s) { return s; } }; +QT_WARNING_POP + +struct science_constant {}; +struct science_const {}; +struct constconst {}; +struct const_ {}; class QTBUG9354_constInName: public QObject { Q_OBJECT public slots: - void slotChooseScientificConst0(struct science_constant const &) {}; - void foo(struct science_const const &) {}; - void foo(struct constconst const &) {}; - void foo(struct constconst *) {}; - void foo(struct const_ *) {}; + void slotChooseScientificConst0(science_constant const &) {}; + void foo(science_const const &) {}; + void foo(constconst const &) {}; + void foo(constconst *) {}; + void foo(const_ *) {}; }; @@ -1784,32 +2011,14 @@ signals: class QTBUG12260_defaultTemplate_Object : public QObject { Q_OBJECT public slots: -#if !(defined(Q_CC_GNU) && __GNUC__ == 4 && __GNUC_MINOR__ <= 3) || defined(Q_MOC_RUN) - void doSomething(QHash<QString, QVariant> values = QHash<QString, QVariant>() ) { Q_UNUSED(values); } - void doSomethingElse(QSharedPointer<QVarLengthArray<QString, (16 >> 2)> > val - = QSharedPointer<QVarLengthArray<QString, (16 >> 2)> >() ) - { Q_UNUSED(val); } -#else - // we want to test the previous function, but gcc < 4.4 seemed to have a bug similar to the one moc has. - typedef QHash<QString, QVariant> WorkaroundGCCBug; - void doSomething(QHash<QString, QVariant> values = WorkaroundGCCBug() ) { Q_UNUSED(values); } - void doSomethingElse(QSharedPointer<QVarLengthArray<QString, (16 >> 2)> > val - = (QSharedPointer<QVarLengthArray<QString, (16 >> 2)> >()) ) - { Q_UNUSED(val); } -#endif + void doSomething(QHash<QString, QVariant> = QHash<QString, QVariant>() ) {} + void doSomethingElse(QSharedPointer<QVarLengthArray<QString, (16 >> 2)> > + = QSharedPointer<QVarLengthArray<QString, (16 >> 2)> >() ) {} - void doAnotherThing(bool a = (1 < 3), bool b = (1 > 4)) { Q_UNUSED(a); Q_UNUSED(b); } + void doAnotherThing(bool = (1 < 3), bool = (1 > 4)) {} -#if defined(Q_MOC_RUN) || (defined(Q_COMPILER_AUTO_TYPE) && !(defined(Q_CC_CLANG) && Q_CC_CLANG < 304)) - // There is no Q_COMPILER_>> but if compiler support auto, it should also support >> - void performSomething(QVector<QList<QString>> e = QVector<QList<QString>>(8 < 1), - QHash<int, QVector<QString>> h = QHash<int, QVector<QString>>()) - { Q_UNUSED(e); Q_UNUSED(h); } -#else - void performSomething(QVector<QList<QString> > e = QVector<QList<QString> >(), - QHash<int, QVector<QString> > h = (QHash<int, QVector<QString> >())) - { Q_UNUSED(e); Q_UNUSED(h); } -#endif + void performSomething(QList<QList<QString>> = QList<QList<QString>>(8 < 1), + QHash<int, QList<QString>> = QHash<int, QList<QString>>()) {} }; @@ -1817,8 +2026,8 @@ void tst_Moc::QTBUG12260_defaultTemplate() { QVERIFY(QTBUG12260_defaultTemplate_Object::staticMetaObject.indexOfSlot("doSomething(QHash<QString,QVariant>)") != -1); QVERIFY(QTBUG12260_defaultTemplate_Object::staticMetaObject.indexOfSlot("doAnotherThing(bool,bool)") != -1); - QVERIFY(QTBUG12260_defaultTemplate_Object::staticMetaObject.indexOfSlot("doSomethingElse(QSharedPointer<QVarLengthArray<QString,(16>>2)> >)") != -1); - QVERIFY(QTBUG12260_defaultTemplate_Object::staticMetaObject.indexOfSlot("performSomething(QVector<QList<QString> >,QHash<int,QVector<QString> >)") != -1); + QVERIFY(QTBUG12260_defaultTemplate_Object::staticMetaObject.indexOfSlot("doSomethingElse(QSharedPointer<QVarLengthArray<QString,(16>>2)>>)") != -1); + QVERIFY(QTBUG12260_defaultTemplate_Object::staticMetaObject.indexOfSlot("performSomething(QList<QList<QString>>,QHash<int,QList<QString>>)") != -1); } void tst_Moc::notifyError() @@ -1831,15 +2040,14 @@ void tst_Moc::notifyError() const QString header = m_sourceDirectory + QStringLiteral("/error-on-wrong-notify.h"); proc.start(m_moc, QStringList(header)); QVERIFY(proc.waitForFinished()); - QCOMPARE(proc.exitCode(), 0); + VERIFY_NO_ERRORS(proc); QCOMPARE(proc.exitStatus(), QProcess::NormalExit); QByteArray mocOut = proc.readAllStandardOutput(); QVERIFY(!mocOut.isEmpty()); - QCOMPARE(proc.readAllStandardError(), QByteArray()); QStringList args; args << "-c" << "-x" << "c++" << "-I" << "." - << "-I" << qtIncludePath << "-o" << "/dev/null" << "-fPIC" << "-std=c++11" << "-"; + << "-I" << qtIncludePath << "-o" << "/dev/null" << "-fPIC" << "-std=c++1z" << "-"; proc.start("gcc", args); QVERIFY(proc.waitForStarted()); proc.write(mocOut); @@ -1886,12 +2094,14 @@ class VersionTest : public QObject Q_OBJECT Q_PROPERTY(int prop1 READ foo) Q_PROPERTY(int prop2 READ foo REVISION 2) + Q_PROPERTY(int prop514 READ foo REVISION(5, 14)) public: int foo() const { return 0; } Q_INVOKABLE void method1() {} Q_INVOKABLE Q_REVISION(4) void method2() {} + Q_INVOKABLE Q_REVISION(6, 0) void method60() {} enum TestEnum { One, Two }; Q_ENUM(TestEnum); @@ -1900,18 +2110,26 @@ public: public slots: void slot1() {} Q_REVISION(3) void slot2() {} + Q_REVISION(6, 1) void slot61() {} signals: void signal1(); Q_REVISION(5) void signal2(); + Q_REVISION(6, 2) void signal62(); public slots Q_REVISION(6): void slot3() {} void slot4() {} +public slots Q_REVISION(5, 12): + void slot512() {} + signals Q_REVISION(7): void signal3(); void signal4(); + +signals Q_REVISION(5, 15): + void signal515(); }; // If changed, update VersionTest above @@ -1920,12 +2138,14 @@ class VersionTestNotify : public QObject Q_OBJECT Q_PROPERTY(int prop1 READ foo NOTIFY fooChanged) Q_PROPERTY(int prop2 READ foo REVISION 2) + Q_PROPERTY(int prop514 READ foo REVISION(5, 14)) public: int foo() const { return 0; } Q_INVOKABLE void method1() {} Q_INVOKABLE Q_REVISION(4) void method2() {} + Q_INVOKABLE Q_REVISION(6, 0) void method60() {} enum TestEnum { One, Two }; Q_ENUM(TestEnum); @@ -1933,19 +2153,27 @@ public: public slots: void slot1() {} Q_REVISION(3) void slot2() {} + Q_REVISION(6, 1) void slot61() {} signals: void fooChanged(); void signal1(); Q_REVISION(5) void signal2(); + Q_REVISION(6, 2) void signal62(); public slots Q_REVISION(6): void slot3() {} void slot4() {} +public slots Q_REVISION(5, 12): + void slot512() {} + signals Q_REVISION(7): void signal3(); void signal4(); + +signals Q_REVISION(5, 15): + void signal515(); }; template <class T> @@ -1954,32 +2182,58 @@ void tst_Moc::revisions_T() int idx = T::staticMetaObject.indexOfProperty("prop1"); QCOMPARE(T::staticMetaObject.property(idx).revision(), 0); idx = T::staticMetaObject.indexOfProperty("prop2"); - QCOMPARE(T::staticMetaObject.property(idx).revision(), 2); + QCOMPARE(T::staticMetaObject.property(idx).revision(), + QTypeRevision::fromMinorVersion(2).toEncodedVersion<int>()); + idx = T::staticMetaObject.indexOfProperty("prop514"); + QCOMPARE(T::staticMetaObject.property(idx).revision(), + QTypeRevision::fromVersion(5, 14).toEncodedVersion<int>()); idx = T::staticMetaObject.indexOfMethod("method1()"); QCOMPARE(T::staticMetaObject.method(idx).revision(), 0); idx = T::staticMetaObject.indexOfMethod("method2()"); - QCOMPARE(T::staticMetaObject.method(idx).revision(), 4); + QCOMPARE(T::staticMetaObject.method(idx).revision(), + QTypeRevision::fromMinorVersion(4).toEncodedVersion<int>()); + idx = T::staticMetaObject.indexOfMethod("method60()"); + QCOMPARE(T::staticMetaObject.method(idx).revision(), + QTypeRevision::fromVersion(6, 0).toEncodedVersion<int>()); idx = T::staticMetaObject.indexOfSlot("slot1()"); QCOMPARE(T::staticMetaObject.method(idx).revision(), 0); idx = T::staticMetaObject.indexOfSlot("slot2()"); - QCOMPARE(T::staticMetaObject.method(idx).revision(), 3); + QCOMPARE(T::staticMetaObject.method(idx).revision(), + QTypeRevision::fromMinorVersion(3).toEncodedVersion<int>()); + idx = T::staticMetaObject.indexOfSlot("slot61()"); + QCOMPARE(T::staticMetaObject.method(idx).revision(), + QTypeRevision::fromVersion(6, 1).toEncodedVersion<int>()); idx = T::staticMetaObject.indexOfSlot("slot3()"); - QCOMPARE(T::staticMetaObject.method(idx).revision(), 6); + QCOMPARE(T::staticMetaObject.method(idx).revision(), + QTypeRevision::fromMinorVersion(6).toEncodedVersion<int>()); idx = T::staticMetaObject.indexOfSlot("slot4()"); - QCOMPARE(T::staticMetaObject.method(idx).revision(), 6); + QCOMPARE(T::staticMetaObject.method(idx).revision(), + QTypeRevision::fromMinorVersion(6).toEncodedVersion<int>()); + idx = T::staticMetaObject.indexOfSlot("slot512()"); + QCOMPARE(T::staticMetaObject.method(idx).revision(), + QTypeRevision::fromVersion(5, 12).toEncodedVersion<int>()); idx = T::staticMetaObject.indexOfSignal("signal1()"); QCOMPARE(T::staticMetaObject.method(idx).revision(), 0); idx = T::staticMetaObject.indexOfSignal("signal2()"); - QCOMPARE(T::staticMetaObject.method(idx).revision(), 5); + QCOMPARE(T::staticMetaObject.method(idx).revision(), + QTypeRevision::fromMinorVersion(5).toEncodedVersion<int>()); + idx = T::staticMetaObject.indexOfSignal("signal62()"); + QCOMPARE(T::staticMetaObject.method(idx).revision(), + QTypeRevision::fromVersion(6, 2).toEncodedVersion<int>()); idx = T::staticMetaObject.indexOfSignal("signal3()"); - QCOMPARE(T::staticMetaObject.method(idx).revision(), 7); + QCOMPARE(T::staticMetaObject.method(idx).revision(), + QTypeRevision::fromMinorVersion(7).toEncodedVersion<int>()); idx = T::staticMetaObject.indexOfSignal("signal4()"); - QCOMPARE(T::staticMetaObject.method(idx).revision(), 7); + QCOMPARE(T::staticMetaObject.method(idx).revision(), + QTypeRevision::fromMinorVersion(7).toEncodedVersion<int>()); + idx = T::staticMetaObject.indexOfSignal("signal515()"); + QCOMPARE(T::staticMetaObject.method(idx).revision(), + QTypeRevision::fromVersion(5, 15).toEncodedVersion<int>()); idx = T::staticMetaObject.indexOfEnumerator("TestEnum"); QCOMPARE(T::staticMetaObject.enumerator(idx).keyCount(), 2); @@ -2007,7 +2261,7 @@ void tst_Moc::warnings_data() << QStringList() << 0 << QString() - << QString("standard input:0: Note: No relevant classes found. No output generated."); + << QString("standard input: note: No relevant classes found. No output generated."); // passing "-nn" should suppress "no relevant classes" note QTest::newRow("-nn") @@ -2031,7 +2285,7 @@ void tst_Moc::warnings_data() << QStringList() << 0 << QString("IGNORE_ALL_STDOUT") - << QString("standard input:1: Warning: Property declaration x has no READ accessor function or associated MEMBER variable. The property will be invalid."); + << QString("standard input:1:1: warning: Property declaration x has neither an associated QProperty<> member, nor a READ accessor function nor an associated MEMBER variable. The property will be invalid."); // This should output a warning QTest::newRow("Duplicate property warning") @@ -2039,7 +2293,7 @@ void tst_Moc::warnings_data() << QStringList() << 0 << QString("IGNORE_ALL_STDOUT") - << QString("standard input:1: Warning: The property 'x' is defined multiple times in class X."); + << QString("standard input:1:1: warning: The property 'x' is defined multiple times in class X."); // Passing "-nn" should NOT suppress the warning QTest::newRow("Invalid property warning with -nn") @@ -2047,7 +2301,7 @@ void tst_Moc::warnings_data() << (QStringList() << "-nn") << 0 << QString("IGNORE_ALL_STDOUT") - << QString("standard input:1: Warning: Property declaration x has no READ accessor function or associated MEMBER variable. The property will be invalid."); + << QString("standard input:1:1: warning: Property declaration x has neither an associated QProperty<> member, nor a READ accessor function nor an associated MEMBER variable. The property will be invalid."); // Passing "-nw" should suppress the warning QTest::newRow("Invalid property warning with -nw") @@ -2063,7 +2317,7 @@ void tst_Moc::warnings_data() << QStringList() << 1 << QString() - << QString("standard input:1: Error: Class contains Q_OBJECT macro but does not inherit from QObject"); + << QString("standard input:1:1: error: Class contains Q_OBJECT macro but does not inherit from QObject"); // "-nn" should not suppress the error QTest::newRow("Does not inherit QObject with -nn") @@ -2071,7 +2325,7 @@ void tst_Moc::warnings_data() << (QStringList() << "-nn") << 1 << QString() - << QString("standard input:1: Error: Class contains Q_OBJECT macro but does not inherit from QObject"); + << QString("standard input:1:1: error: Class contains Q_OBJECT macro but does not inherit from QObject"); // "-nw" should not suppress the error QTest::newRow("Does not inherit QObject with -nw") @@ -2079,7 +2333,7 @@ void tst_Moc::warnings_data() << (QStringList() << "-nw") << 1 << QString() - << QString("standard input:1: Error: Class contains Q_OBJECT macro but does not inherit from QObject"); + << QString("standard input:1:1: error: Class contains Q_OBJECT macro but does not inherit from QObject"); QTest::newRow("Warning on invalid macro") << QByteArray("#define Foo(a, b)\n class X : public QObject { Q_OBJECT }; \n Foo(a) \n Foo(a,b,c) \n") @@ -2093,63 +2347,63 @@ void tst_Moc::warnings_data() << QStringList() << 1 << QString() - << QString("standard input:5: Error: Class declaration lacks Q_OBJECT macro."); + << QString("standard input:5:1: error: Class declaration lacks Q_OBJECT macro."); QTest::newRow("Namespace declaration lacks Q_NAMESPACE macro.") << QByteArray("namespace X {\nQ_CLASSINFO(\"key\",\"value\")\nenum class MyEnum {Key1 = 1}\nQ_ENUMS(MyEnum)\n}\n") << QStringList() << 1 << QString() - << QString("standard input:1: Error: Namespace declaration lacks Q_NAMESPACE macro."); + << QString("standard input:1:1: error: Namespace declaration lacks Q_NAMESPACE macro."); QTest::newRow("Wrong Q_ENUM context.") << QByteArray("namespace X {\nQ_NAMESPACE\n\nenum class MyEnum {Key1 = 1}\nQ_ENUM(MyEnum)\n}\n") << QStringList() << 1 << QString() - << QString("standard input:5: Error: Q_ENUM can't be used in a Q_NAMESPACE, use Q_ENUM_NS instead"); + << QString("standard input:5:1: error: Q_ENUM can't be used in a Q_NAMESPACE, use Q_ENUM_NS instead"); QTest::newRow("Wrong Q_FLAG context.") << QByteArray("namespace X {\nQ_NAMESPACE\n\nenum class MyEnum {Key1 = 1}\nQ_FLAG(MyEnum)\n}\n") << QStringList() << 1 << QString() - << QString("standard input:5: Error: Q_FLAG can't be used in a Q_NAMESPACE, use Q_FLAG_NS instead"); + << QString("standard input:5:1: error: Q_FLAG can't be used in a Q_NAMESPACE, use Q_FLAG_NS instead"); QTest::newRow("Wrong Q_ENUM_NS context.") << QByteArray("class X {\nQ_GADGET\n\nenum class MyEnum {Key1 = 1}\nQ_ENUM_NS(MyEnum)\n};\n") << QStringList() << 1 << QString() - << QString("standard input:5: Error: Q_ENUM_NS can't be used in a Q_OBJECT/Q_GADGET, use Q_ENUM instead"); + << QString("standard input:5:1: error: Q_ENUM_NS can't be used in a Q_OBJECT/Q_GADGET, use Q_ENUM instead"); QTest::newRow("Wrong Q_FLAG_NS context.") << QByteArray("class X {\nQ_GADGET\n\nenum class MyEnum {Key1 = 1}\nQ_FLAG_NS(MyEnum)\n};\n") << QStringList() << 1 << QString() - << QString("standard input:5: Error: Q_FLAG_NS can't be used in a Q_OBJECT/Q_GADGET, use Q_FLAG instead"); + << QString("standard input:5:1: error: Q_FLAG_NS can't be used in a Q_OBJECT/Q_GADGET, use Q_FLAG instead"); QTest::newRow("Invalid macro definition") << QByteArray("#define Foo(a, b, c) a b c #a #b #c a##b##c #d\n Foo(45, 42, 39);") << QStringList() << 1 << QString("IGNORE_ALL_STDOUT") - << QString(":2: Error: '#' is not followed by a macro parameter"); + << QString(":2:1: error: '#' is not followed by a macro parameter"); QTest::newRow("QTBUG-46210: crash on invalid macro invocation") << QByteArray("#define Foo(a, b, c) a b c #a #b #c a##b##c\n Foo(45);") << QStringList() << 1 << QString("IGNORE_ALL_STDOUT") - << QString(":2: Error: Macro invoked with too few parameters for a use of '#'"); + << QString(":2:1: error: Macro invoked with too few parameters for a use of '#'"); QTest::newRow("QTBUG-54609: crash on invalid input") << QByteArray::fromBase64("EAkJCQkJbGFzcyBjbGFzcyBiYWkcV2kgTUEKcGYjZGVmaW5lIE1BKFEs/4D/FoQ=") << QStringList() << 1 << QString("IGNORE_ALL_STDOUT") - << QString(":-1: Error: Unexpected character in macro argument list."); + << QString(": error: Unexpected character in macro argument list."); QTest::newRow("Missing header warning") << QByteArray("class X : public QObject { Q_OBJECT };") @@ -2163,22 +2417,53 @@ void tst_Moc::warnings_data() << QStringList() << 0 << QString() - << QString("standard input:1: Note: No relevant classes found. No output generated."); + << QString("standard input:1:1: note: No relevant classes found. No output generated."); QTest::newRow("Q_PLUGIN_METADATA: invalid file") << QByteArray("class X { \n Q_PLUGIN_METADATA(FILE \"does.not.exists\") \n };") << QStringList() << 1 << QString() - << QString("standard input:2: Error: Plugin Metadata file \"does.not.exists\" does not exist. Declaration will be ignored"); + << QString("standard input:2:1: error: Plugin Metadata file \"does.not.exists\" does not exist. Declaration will be ignored"); -#ifdef Q_OS_LINUX // Limit to Linux because the error message is platform-dependent + QTest::newRow("Auto-declared, missing trailing return") + << QByteArray("class X { \n public slots: \n auto fun() { return 1; } };") + << QStringList() + << 1 + << QString() + << QString("standard input:3:1: error: Function declared with auto as return type but missing trailing return type. Return type deduction is not supported."); + + QTest::newRow("Auto-declared, volatile auto as trailing return type") + << QByteArray("class X { \n public slots: \n auto fun() -> volatile auto { return 1; } };") + << QStringList() + << 1 + << QString() + << QString("standard input:3:1: error: Function declared with auto as return type but missing trailing return type. Return type deduction is not supported."); + + // We don't currently support the decltype keyword, so it's not the same error as above. + // The test is just here to make sure this keeps generating an error until return type deduction + // is supported. + QTest::newRow("Auto-declared, decltype in trailing return type") + << QByteArray("class X { \n public slots: \n auto fun() -> decltype(0+1) { return 1; } };") + << QStringList() + << 1 + << QString() + << QString("standard input:3:1: error: Parse error at \"decltype\""); + + QTest::newRow("QTBUG-36367: report correct error location") + << "class X { \n Q_PROPERTY(Foo* foo NONSENSE foo) \n };"_ba + << QStringList() + << 1 + << QString() + << u"standard input:2:1: error: Parse error at \"NONSENSE\""_s; + +#ifdef Q_OS_UNIX // Limit to Unix because the error message is platform-dependent QTest::newRow("Q_PLUGIN_METADATA: unreadable file") << QByteArray("class X { \n Q_PLUGIN_METADATA(FILE \".\") \n };") << QStringList() << 1 << QString() - << QString("standard input:2: Error: Plugin Metadata file \".\" could not be opened: file to open is a directory"); + << QString("standard input:2:1: error: Plugin Metadata file \".\" could not be opened: file to open is a directory"); #endif } @@ -2194,10 +2479,9 @@ void tst_Moc::warnings() QFETCH(QString, expectedStdErr); #ifdef Q_CC_MSVC - // for some reasons, moc compiled with MSVC uses a different output format - QRegExp lineNumberRe(":(-?\\d+):"); - lineNumberRe.setMinimal(true); - expectedStdErr.replace(lineNumberRe, "(\\1):"); + // moc compiled with MSVC uses a different output format to match MSVC compiler style + QRegularExpression lineNumberRe(":(-?\\d+):(\\d+)", QRegularExpression::InvertedGreedinessOption); + expectedStdErr.replace(lineNumberRe, "(\\1:\\2)"); #endif #if QT_CONFIG(process) @@ -2253,23 +2537,29 @@ void tst_Moc::cxx11Enums_data() QTest::addColumn<QByteArray>("enumName"); QTest::addColumn<char>("prefix"); QTest::addColumn<bool>("isScoped"); + QTest::addColumn<bool>("isTyped"); const QMetaObject *meta1 = &CXX11Enums::staticMetaObject; const QMetaObject *meta2 = &CXX11Enums2::staticMetaObject; - - QTest::newRow("EnumClass") << meta1 << QByteArray("EnumClass") << QByteArray("EnumClass") << 'A' << true; - QTest::newRow("EnumClass 2") << meta2 << QByteArray("EnumClass") << QByteArray("EnumClass") << 'A' << true; - QTest::newRow("TypedEnum") << meta1 << QByteArray("TypedEnum") << QByteArray("TypedEnum") << 'B' << false; - QTest::newRow("TypedEnum 2") << meta2 << QByteArray("TypedEnum") << QByteArray("TypedEnum") << 'B' << false; - QTest::newRow("TypedEnumClass") << meta1 << QByteArray("TypedEnumClass") << QByteArray("TypedEnumClass") << 'C' << true; - QTest::newRow("TypedEnumClass 2") << meta2 << QByteArray("TypedEnumClass") << QByteArray("TypedEnumClass") << 'C' << true; - QTest::newRow("NormalEnum") << meta1 << QByteArray("NormalEnum") << QByteArray("NormalEnum") << 'D' << false; - QTest::newRow("NormalEnum 2") << meta2 << QByteArray("NormalEnum") << QByteArray("NormalEnum") << 'D' << false; - QTest::newRow("ClassFlags") << meta1 << QByteArray("ClassFlags") << QByteArray("ClassFlag") << 'F' << true; - QTest::newRow("ClassFlags 2") << meta2 << QByteArray("ClassFlags") << QByteArray("ClassFlag") << 'F' << true; - QTest::newRow("EnumStruct") << meta1 << QByteArray("EnumStruct") << QByteArray("EnumStruct") << 'G' << true; - QTest::newRow("TypedEnumStruct") << meta1 << QByteArray("TypedEnumStruct") << QByteArray("TypedEnumStruct") << 'H' << true; - QTest::newRow("StructFlags") << meta1 << QByteArray("StructFlags") << QByteArray("StructFlag") << 'I' << true; + const QMetaObject *meta3 = &CXX11Enums3::staticMetaObject; + + QTest::newRow("EnumClass") << meta1 << QByteArray("EnumClass") << QByteArray("EnumClass") << 'A' << true << false; + QTest::newRow("EnumClass 2") << meta2 << QByteArray("EnumClass") << QByteArray("EnumClass") << 'A' << true << false; + QTest::newRow("EnumClass 3") << meta3 << QByteArray("EnumClass") << QByteArray("EnumClass") << 'A' << true << false; + QTest::newRow("TypedEnum") << meta1 << QByteArray("TypedEnum") << QByteArray("TypedEnum") << 'B' << false << true; + QTest::newRow("TypedEnum 2") << meta2 << QByteArray("TypedEnum") << QByteArray("TypedEnum") << 'B' << false << true; + QTest::newRow("TypedEnum 3") << meta3 << QByteArray("TypedEnum") << QByteArray("TypedEnum") << 'B' << false << true; + QTest::newRow("TypedEnumClass") << meta1 << QByteArray("TypedEnumClass") << QByteArray("TypedEnumClass") << 'C' << true << true; + QTest::newRow("TypedEnumClass 2") << meta2 << QByteArray("TypedEnumClass") << QByteArray("TypedEnumClass") << 'C' << true << true; + QTest::newRow("TypedEnumClass 3") << meta3 << QByteArray("TypedEnumClass") << QByteArray("TypedEnumClass") << 'C' << true << true; + QTest::newRow("NormalEnum") << meta1 << QByteArray("NormalEnum") << QByteArray("NormalEnum") << 'D' << false << false; + QTest::newRow("NormalEnum 2") << meta2 << QByteArray("NormalEnum") << QByteArray("NormalEnum") << 'D' << false << false; + QTest::newRow("NormalEnum 3") << meta3 << QByteArray("NormalEnum") << QByteArray("NormalEnum") << 'D' << false << false; + QTest::newRow("ClassFlags") << meta1 << QByteArray("ClassFlags") << QByteArray("ClassFlag") << 'F' << true << false; + QTest::newRow("ClassFlags 2") << meta2 << QByteArray("ClassFlags") << QByteArray("ClassFlag") << 'F' << true << false; + QTest::newRow("EnumStruct") << meta1 << QByteArray("EnumStruct") << QByteArray("EnumStruct") << 'G' << true << false; + QTest::newRow("TypedEnumStruct") << meta1 << QByteArray("TypedEnumStruct") << QByteArray("TypedEnumStruct") << 'H' << true << true; + QTest::newRow("StructFlags") << meta1 << QByteArray("StructFlags") << QByteArray("StructFlag") << 'I' << true << false; } void tst_Moc::cxx11Enums() @@ -2281,24 +2571,51 @@ void tst_Moc::cxx11Enums() QFETCH(QByteArray, enumName); QFETCH(char, prefix); QFETCH(bool, isScoped); + QFETCH(bool, isTyped); int idx = meta->indexOfEnumerator(typeName); QVERIFY(idx != -1); QCOMPARE(meta->indexOfEnumerator(enumName), idx); - QCOMPARE(meta->enumerator(idx).enclosingMetaObject(), meta); - QCOMPARE(meta->enumerator(idx).isValid(), true); - QCOMPARE(meta->enumerator(idx).keyCount(), 4); - QCOMPARE(meta->enumerator(idx).name(), typeName.constData()); - QCOMPARE(meta->enumerator(idx).enumName(), enumName.constData()); - bool isFlag = meta->enumerator(idx).isFlag(); + const QMetaEnum metaEnum = meta->enumerator(idx); + QCOMPARE(metaEnum.enclosingMetaObject(), meta); + QCOMPARE(metaEnum.isValid(), true); + QCOMPARE(metaEnum.keyCount(), 4); + QCOMPARE(metaEnum.name(), typeName.constData()); + QCOMPARE(metaEnum.enumName(), enumName.constData()); + + const QMetaType metaType = metaEnum.metaType(); + const bool isUnsigned = metaType.flags() & QMetaType::IsUnsignedEnumeration; + if (isTyped) { + QCOMPARE(size_t(metaType.sizeOf()), sizeof(char)); + QCOMPARE(isUnsigned, !std::is_signed_v<char>); + } else if (isScoped) { + QCOMPARE(size_t(metaType.sizeOf()), sizeof(int)); + QCOMPARE(isUnsigned, !std::is_signed_v<int>); + } else { + // underlying type is implementation defined + } + + bool isFlag = metaEnum.isFlag(); for (int i = 0; i < 4; i++) { QByteArray v = prefix + QByteArray::number(i); const int value = isFlag ? (1 << i) : i; - QCOMPARE(meta->enumerator(idx).keyToValue(v), value); - QCOMPARE(meta->enumerator(idx).valueToKey(value), v.constData()); + QCOMPARE(metaEnum.keyToValue(v), value); + QCOMPARE(metaEnum.valueToKey(value), v.constData()); } - QCOMPARE(meta->enumerator(idx).isScoped(), isScoped); + QCOMPARE(metaEnum.isScoped(), isScoped); +} + +void tst_Moc::cxx11TrailingReturn() +{ + CXX11TrailingReturn retClass; + const QMetaObject *mobj = retClass.metaObject(); + QVERIFY(mobj->indexOfSlot("fun()") != -1); + QVERIFY(mobj->indexOfSlot("arguments(int,char)") != -1); + QVERIFY(mobj->indexOfSlot("inlineFunc(int)") != -1); + QVERIFY(mobj->indexOfSlot("constRefReturn()") != -1); + QVERIFY(mobj->indexOfSlot("constConstRefReturn()") != -1); + QVERIFY(mobj->indexOfSignal("trailingSignalReturn(int)") != -1); } void tst_Moc::returnRefs() @@ -2381,7 +2698,7 @@ void tst_Moc::memberProperties() if (!signal.isEmpty()) { - QCOMPARE(notifySpy.count(), 1); + QCOMPARE(notifySpy.size(), 1); if (prop.notifySignal().parameterNames().size() > 0) { QList<QVariant> arguments = notifySpy.takeFirst(); QCOMPARE(arguments.size(), 1); @@ -2391,7 +2708,7 @@ void tst_Moc::memberProperties() notifySpy.clear(); // a second write with the same value should not cause the signal to be emitted again QCOMPARE(prop.write(pObj, writeValue), expectedWriteResult); - QCOMPARE(notifySpy.count(), 0); + QCOMPARE(notifySpy.size(), 0); } } @@ -2416,7 +2733,7 @@ class SignalConnectionTester : public QObject { Q_OBJECT public: - SignalConnectionTester(QObject *parent = 0) + SignalConnectionTester(QObject *parent = nullptr) : QObject(parent), testPassed(false) { @@ -2444,7 +2761,7 @@ class ClassWithPrivateSignals : public QObject { Q_OBJECT public: - ClassWithPrivateSignals(QObject *parent = 0) + ClassWithPrivateSignals(QObject *parent = nullptr) : QObject(parent) { @@ -2480,7 +2797,7 @@ class SubClassFromPrivateSignals : public ClassWithPrivateSignals { Q_OBJECT public: - SubClassFromPrivateSignals(QObject *parent = 0) + SubClassFromPrivateSignals(QObject *parent = nullptr) : ClassWithPrivateSignals(parent) { @@ -2943,6 +3260,34 @@ void tst_Moc::explicitOverrideControl() #endif } +class OverloadedAddressOperator : public QObject +{ + Q_OBJECT +public: + void* operator&() { return nullptr; } +signals: + void self(OverloadedAddressOperator&); +public slots: + void assertSelf(OverloadedAddressOperator &o) + { + QCOMPARE(std::addressof(o), this); + testResult = (std::addressof(o) == this); + } +public: + bool testResult = false; +}; + +void tst_Moc::overloadedAddressOperator() +{ + OverloadedAddressOperator o; + OverloadedAddressOperator *p = std::addressof(o); + QCOMPARE(&o, nullptr); + QVERIFY(p); + QObject::connect(p, &OverloadedAddressOperator::self, p, &OverloadedAddressOperator::assertSelf); + emit o.self(o); + QVERIFY(o.testResult); +} + class CustomQObject : public QObject { Q_OBJECT @@ -2953,7 +3298,7 @@ public: One, Two }; - explicit CustomQObject(QObject *parent = 0) + explicit CustomQObject(QObject *parent = nullptr) : QObject(parent) { } @@ -2970,7 +3315,7 @@ class NamespacedQObject : public QObject { Q_OBJECT public: - explicit NamespacedQObject(QObject *parent = 0) + explicit NamespacedQObject(QObject *parent = nullptr) : QObject(parent) { @@ -2994,7 +3339,7 @@ public: One, Two }; - explicit CustomQObject2(QObject *parent = 0) + explicit CustomQObject2(QObject *parent = nullptr) : QObject(parent) { } @@ -3011,7 +3356,7 @@ class NamespacedQObject2 : public QObject { Q_OBJECT public: - explicit NamespacedQObject2(QObject *parent = 0) + explicit NamespacedQObject2(QObject *parent = nullptr) : QObject(parent) { @@ -3054,16 +3399,16 @@ class AutoRegistrationObject : public QObject Q_PROPERTY(QWeakPointer<CustomQObject> customObjectWP READ customObjectWP CONSTANT) Q_PROPERTY(QPointer<CustomQObject> customObjectTP READ customObjectTP CONSTANT) Q_PROPERTY(QList<int> listInt READ listInt CONSTANT) - Q_PROPERTY(QVector<QVariant> vectorVariant READ vectorVariant CONSTANT) + Q_PROPERTY(QList<QVariant> listVariant READ listVariant CONSTANT) Q_PROPERTY(QList<CustomQObject*> listObject READ listObject CONSTANT) - Q_PROPERTY(QVector<QList<int>> vectorListInt READ vectorListInt CONSTANT) - Q_PROPERTY(QVector<QList<CustomQObject*>> vectorListObject READ vectorListObject CONSTANT) + Q_PROPERTY(QList<QList<int>> listListInt READ listListInt CONSTANT) + Q_PROPERTY(QList<QList<CustomQObject *>> listListObject READ listListObject CONSTANT) Q_PROPERTY(CustomQObject::Number enumValue READ enumValue CONSTANT) Q_PROPERTY(CustomQObjectStar customObjectTypedef READ customObjectTypedef CONSTANT) Q_PROPERTY(SomeNamespace::NamespacedQObject* customObjectNamespaced READ customObjectNamespaced CONSTANT) Q_PROPERTY(SomeNamespace::NamespacedNonQObject customNonQObjectNamespaced READ customNonQObjectNamespaced CONSTANT) public: - AutoRegistrationObject(QObject *parent = 0) + AutoRegistrationObject(QObject *parent = nullptr) : QObject(parent) { } @@ -3098,25 +3443,16 @@ public: return QList<int>(); } - QVector<QVariant> vectorVariant() const - { - return QVector<QVariant>(); - } + QList<QVariant> listVariant() const { return QList<QVariant>(); } QList<CustomQObject*> listObject() const { return QList<CustomQObject*>(); } - QVector<QList<int> > vectorListInt() const - { - return QVector<QList<int> >(); - } + QList<QList<int>> listListInt() const { return QList<QList<int>>(); } - QVector<QList<CustomQObject*> > vectorListObject() const - { - return QVector<QList<CustomQObject*> >(); - } + QList<QList<CustomQObject *>> listListObject() const { return QList<QList<CustomQObject *>>(); } CustomQObject::Number enumValue() const { @@ -3145,10 +3481,10 @@ public slots: void weakPointerSlot(QWeakPointer<CustomQObject2>) {} void trackingPointerSlot(QPointer<CustomQObject2>) {} void listIntSlot(QList<int>) {} - void vectorVariantSlot(QVector<QVariant>) {} + void listVariantSlot(QList<QVariant>) { } void listCustomObjectSlot(QList<CustomQObject2*>) {} - void vectorListIntSlot(QVector<QList<int> >) {} - void vectorListCustomObjectSlot(QVector<QList<CustomQObject2*> >) {} + void listListIntSlot(QList<QList<int>>) { } + void listListCustomObjectSlot(QList<QList<CustomQObject2 *>>) { } void enumSlot(CustomQObject2::Number) {} void typedefSlot(CustomQObject2Star) {} void namespacedQObjectSlot(SomeNamespace2::NamespacedQObject2*) {} @@ -3176,7 +3512,7 @@ void tst_Moc::autoPropertyMetaTypeRegistration() AutoRegistrationObject aro; static const int numPropertiesUnderTest = 15; - QVector<int> propertyMetaTypeIds; + QList<int> propertyMetaTypeIds; propertyMetaTypeIds.reserve(numPropertiesUnderTest); const QMetaObject *metaObject = aro.metaObject(); @@ -3189,23 +3525,17 @@ void tst_Moc::autoPropertyMetaTypeRegistration() } // Verify that QMetaProperty::userType gave us what we expected. - QVector<int> expectedMetaTypeIds = QVector<int>() - << QMetaType::QString // QObject::userType - << QMetaType::QObjectStar // AutoRegistrationObject::object - << qMetaTypeId<CustomQObject*>() // etc. - << qMetaTypeId<QSharedPointer<CustomQObject> >() - << qMetaTypeId<QWeakPointer<CustomQObject> >() - << qMetaTypeId<QPointer<CustomQObject> >() - << qMetaTypeId<QList<int> >() - << qMetaTypeId<QVector<QVariant> >() - << qMetaTypeId<QList<CustomQObject*> >() - << qMetaTypeId<QVector<QList<int> > >() - << qMetaTypeId<QVector<QList<CustomQObject*> > >() - << qMetaTypeId<CustomQObject::Number>() - << qMetaTypeId<CustomQObjectStar>() - << qMetaTypeId<SomeNamespace::NamespacedQObject*>() - << qMetaTypeId<SomeNamespace::NamespacedNonQObject>() - ; + QList<int> expectedMetaTypeIds = QList<int>() + << QMetaType::QString // QObject::userType + << QMetaType::QObjectStar // AutoRegistrationObject::object + << qMetaTypeId<CustomQObject *>() // etc. + << qMetaTypeId<QSharedPointer<CustomQObject>>() + << qMetaTypeId<QWeakPointer<CustomQObject>>() << qMetaTypeId<QPointer<CustomQObject>>() + << qMetaTypeId<QList<int>>() << qMetaTypeId<QList<QVariant>>() + << qMetaTypeId<QList<CustomQObject *>>() << qMetaTypeId<QList<QList<int>>>() + << qMetaTypeId<QList<QList<CustomQObject *>>>() << qMetaTypeId<CustomQObject::Number>() + << qMetaTypeId<CustomQObjectStar>() << qMetaTypeId<SomeNamespace::NamespacedQObject *>() + << qMetaTypeId<SomeNamespace::NamespacedNonQObject>(); QCOMPARE(propertyMetaTypeIds, expectedMetaTypeIds); } @@ -3226,7 +3556,7 @@ void tst_Moc::autoMethodArgumentMetaTypeRegistration() { AutoRegistrationObject aro; - QVector<int> methodArgMetaTypeIds; + QList<int> methodArgMetaTypeIds; const QMetaObject *metaObject = aro.metaObject(); @@ -3251,20 +3581,20 @@ void tst_Moc::autoMethodArgumentMetaTypeRegistration() ++i; \ } -#define FOR_EACH_SLOT_ARG_TYPE(F) \ - F(QObject*) \ - F(CustomQObject2*) \ - F(QSharedPointer<CustomQObject2>) \ - F(QWeakPointer<CustomQObject2>) \ - F(QPointer<CustomQObject2>) \ - F(QList<int>) \ - F(QVector<QVariant>) \ - F(QList<CustomQObject2*>) \ - F(QVector<QList<int> >) \ - F(QVector<QList<CustomQObject2*> >) \ - F(CustomQObject2::Number) \ - F(CustomQObject2Star) \ - F(SomeNamespace2::NamespacedQObject2*) \ +#define FOR_EACH_SLOT_ARG_TYPE(F) \ + F(QObject *) \ + F(CustomQObject2 *) \ + F(QSharedPointer<CustomQObject2>) \ + F(QWeakPointer<CustomQObject2>) \ + F(QPointer<CustomQObject2>) \ + F(QList<int>) \ + F(QList<QVariant>) \ + F(QList<CustomQObject2 *>) \ + F(QList<QList<int>>) \ + F(QList<QList<CustomQObject2 *>>) \ + F(CustomQObject2::Number) \ + F(CustomQObject2Star) \ + F(SomeNamespace2::NamespacedQObject2 *) \ F(SomeNamespace2::NamespacedNonQObject2) // Note: mulit-arg slots are tested below. @@ -3274,27 +3604,20 @@ void tst_Moc::autoMethodArgumentMetaTypeRegistration() #undef TYPE_LOOP #undef FOR_EACH_SLOT_ARG_TYPE - QVector<int> expectedMetaTypeIds = QVector<int>() - << QMetaType::QObjectStar - << qMetaTypeId<CustomQObject2*>() - << qMetaTypeId<QSharedPointer<CustomQObject2> >() - << qMetaTypeId<QWeakPointer<CustomQObject2> >() - << qMetaTypeId<QPointer<CustomQObject2> >() - << qMetaTypeId<QList<int> >() - << qMetaTypeId<QVector<QVariant> >() - << qMetaTypeId<QList<CustomQObject2*> >() - << qMetaTypeId<QVector<QList<int> > >() - << qMetaTypeId<QVector<QList<CustomQObject2*> > >() - << qMetaTypeId<CustomQObject2::Number>() - << qMetaTypeId<CustomQObject2Star>() - << qMetaTypeId<SomeNamespace2::NamespacedQObject2*>() - << qMetaTypeId<SomeNamespace2::NamespacedNonQObject2>() - ; + QList<int> expectedMetaTypeIds = QList<int>() + << QMetaType::QObjectStar << qMetaTypeId<CustomQObject2 *>() + << qMetaTypeId<QSharedPointer<CustomQObject2>>() + << qMetaTypeId<QWeakPointer<CustomQObject2>>() + << qMetaTypeId<QPointer<CustomQObject2>>() << qMetaTypeId<QList<int>>() + << qMetaTypeId<QList<QVariant>>() << qMetaTypeId<QList<CustomQObject2 *>>() + << qMetaTypeId<QList<QList<int>>>() << qMetaTypeId<QList<QList<CustomQObject2 *>>>() + << qMetaTypeId<CustomQObject2::Number>() << qMetaTypeId<CustomQObject2Star>() + << qMetaTypeId<SomeNamespace2::NamespacedQObject2 *>() + << qMetaTypeId<SomeNamespace2::NamespacedNonQObject2>(); QCOMPARE(methodArgMetaTypeIds, expectedMetaTypeIds); - - QVector<int> methodMultiArgMetaTypeIds; + QList<int> methodMultiArgMetaTypeIds; { const QMetaMethod method = metaObject->method(i); @@ -3345,23 +3668,12 @@ void tst_Moc::autoMethodArgumentMetaTypeRegistration() ++i; } - QVector<int> expectedMultiMetaTypeIds = QVector<int>() - << QMetaType::Int - << qMetaTypeId<CustomObject3>() - << qMetaTypeId<CustomObject4>() - << QMetaType::Int - << qMetaTypeId<CustomObject5>() - << qMetaTypeId<CustomObject6>() - << qMetaTypeId<CustomObject7>() - << QMetaType::Int - << qMetaTypeId<CustomObject8>() - << QMetaType::Int - << qMetaTypeId<CustomObject9>() - << qMetaTypeId<CustomObject10>() - << QMetaType::Int - << qMetaTypeId<CustomObject11>() - << QMetaType::Int - ; + QList<int> expectedMultiMetaTypeIds = QList<int>() + << QMetaType::Int << qMetaTypeId<CustomObject3>() << qMetaTypeId<CustomObject4>() + << QMetaType::Int << qMetaTypeId<CustomObject5>() << qMetaTypeId<CustomObject6>() + << qMetaTypeId<CustomObject7>() << QMetaType::Int << qMetaTypeId<CustomObject8>() + << QMetaType::Int << qMetaTypeId<CustomObject9>() << qMetaTypeId<CustomObject10>() + << QMetaType::Int << qMetaTypeId<CustomObject11>() << QMetaType::Int; QCOMPARE(methodMultiArgMetaTypeIds, expectedMultiMetaTypeIds); @@ -3372,7 +3684,7 @@ void tst_Moc::autoSignalSpyMetaTypeRegistration() { AutoRegistrationObject aro; - QVector<int> methodArgMetaTypeIds; + QList<int> methodArgMetaTypeIds; const QMetaObject *metaObject = aro.metaObject(); @@ -3380,12 +3692,12 @@ void tst_Moc::autoSignalSpyMetaTypeRegistration() QVERIFY(i > 0); - QCOMPARE(QMetaType::type("CustomObject12"), (int)QMetaType::UnknownType); + QCOMPARE(QMetaType::fromName("CustomObject12").id(), (int)QMetaType::UnknownType); QSignalSpy spy(&aro, SIGNAL(someSignal(CustomObject12))); - QVERIFY(QMetaType::type("CustomObject12") != QMetaType::UnknownType); - QCOMPARE(QMetaType::type("CustomObject12"), qMetaTypeId<CustomObject12>()); + QVERIFY(QMetaType::fromName("CustomObject12").id() != QMetaType::UnknownType); + QCOMPARE(QMetaType::fromName("CustomObject12").id(), qMetaTypeId<CustomObject12>()); } void tst_Moc::parseDefines() @@ -3472,18 +3784,17 @@ void tst_Moc::preprocessorOnly() #ifdef MOC_CROSS_COMPILED QSKIP("Not tested when cross-compiled"); #endif -#if defined(Q_OS_LINUX) && defined(Q_CC_GNU) && QT_CONFIG(process) +#if defined(Q_OS_UNIX) && defined(Q_CC_GNU) && QT_CONFIG(process) QProcess proc; proc.start(m_moc, QStringList() << "-E" << m_sourceDirectory + QStringLiteral("/pp-dollar-signs.h")); QVERIFY(proc.waitForFinished()); - QCOMPARE(proc.exitCode(), 0); + VERIFY_NO_ERRORS(proc); QByteArray mocOut = proc.readAllStandardOutput(); QVERIFY(!mocOut.isEmpty()); - QCOMPARE(proc.readAllStandardError(), QByteArray()); QVERIFY(mocOut.contains("$$ = parser->createFoo()")); #else - QSKIP("Only tested on linux/gcc"); + QSKIP("Only tested on unix/gcc"); #endif } @@ -3493,7 +3804,7 @@ void tst_Moc::unterminatedFunctionMacro() #ifdef MOC_CROSS_COMPILED QSKIP("Not tested when cross-compiled"); #endif -#if defined(Q_OS_LINUX) && defined(Q_CC_GNU) && QT_CONFIG(process) +#if defined(Q_OS_UNIX) && defined(Q_CC_GNU) && QT_CONFIG(process) QProcess proc; proc.start(m_moc, QStringList() << "-E" << m_sourceDirectory + QStringLiteral("/unterminated-function-macro.h")); QVERIFY(proc.waitForFinished()); @@ -3526,10 +3837,9 @@ namespace QTBUG32933_relatedObjectsDontIncludeItself { void tst_Moc::QTBUG32933_relatedObjectsDontIncludeItself() { const QMetaObject *mo = &QTBUG32933_relatedObjectsDontIncludeItself::NS::Obj::staticMetaObject; - const QMetaObject * const *objects = mo->d.relatedMetaObjects; + const auto *objects = mo->d.relatedMetaObjects; // the related objects should be empty because the enums is in the same object. QVERIFY(!objects); - } class UnrelatedClass : public QObject @@ -3598,7 +3908,7 @@ void tst_Moc::relatedMetaObjectsInGadget() void tst_Moc::relatedMetaObjectsNameConflict_data() { - typedef QVector<const QMetaObject*> QMetaObjects; + typedef QList<const QMetaObject *> QMetaObjects; QTest::addColumn<const QMetaObject*>("dependingObject"); QTest::addColumn<QMetaObjects>("relatedMetaObjects"); @@ -3629,20 +3939,20 @@ void tst_Moc::relatedMetaObjectsNameConflict_data() void tst_Moc::relatedMetaObjectsNameConflict() { - typedef QVector<const QMetaObject*> QMetaObjects; + typedef QList<const QMetaObject *> QMetaObjects; QFETCH(const QMetaObject*, dependingObject); - QFETCH(QMetaObjects, relatedMetaObjects); + QFETCH(const QMetaObjects, relatedMetaObjects); // load all specified metaobjects int a set QSet<const QMetaObject*> dependency; - const QMetaObject *const *i = dependingObject->d.relatedMetaObjects; + const auto *i = dependingObject->d.relatedMetaObjects; while (*i) { dependency.insert(*i); ++i; } // check if all required metaobjects are specified - foreach (const QMetaObject *mo, relatedMetaObjects) + for (const QMetaObject *mo : relatedMetaObjects) QVERIFY(dependency.contains(mo)); // check if no additional metaobjects ara specified @@ -3709,6 +4019,7 @@ class VeryLongStringData : public QObject #define repeat32768(V) repeat16384(V) repeat16384(V) #define repeat65534(V) repeat32768(V) repeat16384(V) repeat8192(V) repeat4096(V) repeat2048(V) repeat1024(V) repeat512(V) repeat256(V) repeat128(V) repeat64(V) repeat32(V) repeat16(V) repeat8(V) repeat4(V) repeat2(V) + Q_CLASSINFO("\1" "23\xff", "String with CRLF.\r\n") Q_CLASSINFO(repeat65534("n"), repeat65534("i")) Q_CLASSINFO(repeat65534("e"), repeat65534("r")) Q_CLASSINFO(repeat32768("o"), repeat32768("b")) @@ -3757,31 +4068,33 @@ void tst_Moc::unnamedNamespaceObjectsAndGadgets() void tst_Moc::veryLongStringData() { const QMetaObject *mobj = &VeryLongStringData::staticMetaObject; - QCOMPARE(mobj->classInfoCount(), 4); - - QCOMPARE(mobj->classInfo(0).name()[0], 'n'); - QCOMPARE(mobj->classInfo(0).value()[0], 'i'); - QCOMPARE(mobj->classInfo(1).name()[0], 'e'); - QCOMPARE(mobj->classInfo(1).value()[0], 'r'); - QCOMPARE(mobj->classInfo(2).name()[0], 'o'); - QCOMPARE(mobj->classInfo(2).value()[0], 'b'); - QCOMPARE(mobj->classInfo(3).name()[0], ':'); - QCOMPARE(mobj->classInfo(3).value()[0], ')'); - - QCOMPARE(strlen(mobj->classInfo(0).name()), static_cast<size_t>(65534)); - QCOMPARE(strlen(mobj->classInfo(0).value()), static_cast<size_t>(65534)); - QCOMPARE(strlen(mobj->classInfo(1).name()), static_cast<size_t>(65534)); - QCOMPARE(strlen(mobj->classInfo(1).value()), static_cast<size_t>(65534)); - QCOMPARE(strlen(mobj->classInfo(2).name()), static_cast<size_t>(32768)); - QCOMPARE(strlen(mobj->classInfo(2).value()), static_cast<size_t>(32768)); - QCOMPARE(strlen(mobj->classInfo(3).name()), static_cast<size_t>(1)); - QCOMPARE(strlen(mobj->classInfo(3).value()), static_cast<size_t>(1)); + int startAt = 1; // some other classinfo added to the beginning + QCOMPARE(mobj->classInfoCount(), startAt + 4); + + QCOMPARE(mobj->classInfo(startAt + 0).name()[0], 'n'); + QCOMPARE(mobj->classInfo(startAt + 0).value()[0], 'i'); + QCOMPARE(mobj->classInfo(startAt + 1).name()[0], 'e'); + QCOMPARE(mobj->classInfo(startAt + 1).value()[0], 'r'); + QCOMPARE(mobj->classInfo(startAt + 2).name()[0], 'o'); + QCOMPARE(mobj->classInfo(startAt + 2).value()[0], 'b'); + QCOMPARE(mobj->classInfo(startAt + 3).name()[0], ':'); + QCOMPARE(mobj->classInfo(startAt + 3).value()[0], ')'); + + QCOMPARE(strlen(mobj->classInfo(startAt + 0).name()), static_cast<size_t>(65534)); + QCOMPARE(strlen(mobj->classInfo(startAt + 0).value()), static_cast<size_t>(65534)); + QCOMPARE(strlen(mobj->classInfo(startAt + 1).name()), static_cast<size_t>(65534)); + QCOMPARE(strlen(mobj->classInfo(startAt + 1).value()), static_cast<size_t>(65534)); + QCOMPARE(strlen(mobj->classInfo(startAt + 2).name()), static_cast<size_t>(32768)); + QCOMPARE(strlen(mobj->classInfo(startAt + 2).value()), static_cast<size_t>(32768)); + QCOMPARE(strlen(mobj->classInfo(startAt + 3).name()), static_cast<size_t>(1)); + QCOMPARE(strlen(mobj->classInfo(startAt + 3).value()), static_cast<size_t>(1)); } void tst_Moc::gadgetHierarchy() { QCOMPARE(NonGadgetParent::Derived::staticMetaObject.superClass(), static_cast<const QMetaObject*>(nullptr)); QCOMPARE(GrandParentGadget::DerivedGadget::staticMetaObject.superClass(), &GrandParentGadget::BaseGadget::staticMetaObject); + QCOMPARE(GrandParentGadget::CRTPDerivedGadget::staticMetaObject.superClass(), &GrandParentGadget::BaseGadget::staticMetaObject); } void tst_Moc::optionsFileError_data() @@ -3809,33 +4122,78 @@ void tst_Moc::optionsFileError() #endif } -static void checkEnum(const QMetaEnum &enumerator, const QByteArray &name, const QVector<QPair<QByteArray, int >> &keys) +static void checkEnum(const QMetaEnum &enumerator, const QByteArray &name, + const QList<QPair<QByteArray, int>> &keys, + const QMetaType underlyingType = QMetaType::fromType<int>()) { QCOMPARE(name, QByteArray{enumerator.name()}); QCOMPARE(keys.size(), enumerator.keyCount()); + QCOMPARE(underlyingType, enumerator.metaType().underlyingType()); for (int i = 0; i < enumerator.keyCount(); ++i) { QCOMPARE(keys[i].first, QByteArray{enumerator.key(i)}); QCOMPARE(keys[i].second, enumerator.value(i)); } } +class EnumFromNamespaceClass : public QObject +{ + Q_OBJECT + Q_PROPERTY(FooNamespace::Enum1 prop READ prop CONSTANT) +public: + FooNamespace::Enum1 prop() { return FooNamespace::Enum1::Key2; } +}; + +void tst_Moc::testNestedQNamespace() +{ + QCOMPARE(TestSameEnumNamespace::staticMetaObject.enumeratorCount(), 1); + checkEnum(TestSameEnumNamespace::staticMetaObject.enumerator(0), "TestSameEnumNamespace", + {{"Key1", 1}, {"Key2", 2}}); + QMetaEnum meta1 = QMetaEnum::fromType<TestSameEnumNamespace::TestSameEnumNamespace>(); + QVERIFY(meta1.isValid()); + QCOMPARE(meta1.name(), "TestSameEnumNamespace"); + QCOMPARE(meta1.enclosingMetaObject(), &TestSameEnumNamespace::staticMetaObject); + QCOMPARE(meta1.keyCount(), 2); + + // QTBUG-112996 + QCOMPARE(TestNestedSameEnumNamespace::a::staticMetaObject.enumeratorCount(), 1); + checkEnum(TestNestedSameEnumNamespace::a::staticMetaObject.enumerator(0), "a", + {{"Key11", 11}, {"Key12", 12}}); + QMetaEnum meta2 = QMetaEnum::fromType<TestNestedSameEnumNamespace::a::a>(); + QVERIFY(meta2.isValid()); + QCOMPARE(meta2.name(), "a"); + QCOMPARE(meta2.enclosingMetaObject(), &TestNestedSameEnumNamespace::a::staticMetaObject); + QCOMPARE(meta2.keyCount(), 2); +} + void tst_Moc::testQNamespace() { - QCOMPARE(TestQNamespace::staticMetaObject.enumeratorCount(), 4); + QCOMPARE(TestQNamespace::staticMetaObject.enumeratorCount(), 5); checkEnum(TestQNamespace::staticMetaObject.enumerator(0), "TestEnum1", {{"Key1", 11}, {"Key2", 12}}); checkEnum(TestQNamespace::staticMetaObject.enumerator(1), "TestEnum2", {{"Key1", 17}, {"Key2", 18}}); - checkEnum(TestQNamespace::staticMetaObject.enumerator(2), "TestFlag1", + checkEnum(TestQNamespace::staticMetaObject.enumerator(2), "TestEnum3", + {{"Key1", 23}, {"Key2", 24}}, QMetaType::fromType<qint8>()); + checkEnum(TestQNamespace::staticMetaObject.enumerator(3), "TestFlag1", {{"None", 0}, {"Flag1", 1}, {"Flag2", 2}, {"Any", 1 | 2}}); - checkEnum(TestQNamespace::staticMetaObject.enumerator(3), "TestFlag2", + checkEnum(TestQNamespace::staticMetaObject.enumerator(4), "TestFlag2", {{"None", 0}, {"Flag1", 4}, {"Flag2", 8}, {"Any", 4 | 8}}); - QCOMPARE(TestQNamespace::TestGadget::staticMetaObject.enumeratorCount(), 2); + QCOMPARE(TestQNamespace::TestGadget::staticMetaObject.enumeratorCount(), 3); checkEnum(TestQNamespace::TestGadget::staticMetaObject.enumerator(0), "TestGEnum1", {{"Key1", 13}, {"Key2", 14}}); checkEnum(TestQNamespace::TestGadget::staticMetaObject.enumerator(1), "TestGEnum2", {{"Key1", 23}, {"Key2", 24}}); + checkEnum(TestQNamespace::TestGadget::staticMetaObject.enumerator(2), "TestGEnum3", + {{"Key1", 33}, {"Key2", 34}}, QMetaType::fromType<qint16>()); + + QCOMPARE(TestQNamespace::TestGadgetExport::staticMetaObject.enumeratorCount(), 3); + checkEnum(TestQNamespace::TestGadgetExport::staticMetaObject.enumerator(0), "TestGeEnum1", + {{"Key1", 20}, {"Key2", 21}}); + checkEnum(TestQNamespace::TestGadgetExport::staticMetaObject.enumerator(1), "TestGeEnum2", + {{"Key1", 23}, {"Key2", 24}}); + checkEnum(TestQNamespace::TestGadgetExport::staticMetaObject.enumerator(2), "TestGeEnum3", + {{"Key1", 26}, {"Key2", 27}}, QMetaType::fromType<quint16>()); QMetaEnum meta = QMetaEnum::fromType<TestQNamespace::TestEnum1>(); QVERIFY(meta.isValid()); @@ -3843,9 +4201,18 @@ void tst_Moc::testQNamespace() QCOMPARE(meta.enclosingMetaObject(), &TestQNamespace::staticMetaObject); QCOMPARE(meta.keyCount(), 2); + QCOMPARE(TestExportNamespace::staticMetaObject.enumeratorCount(), 1); + checkEnum(TestExportNamespace::staticMetaObject.enumerator(0), "MyEnum", + {{"Key1", 0}, {"Key2", 1}}); + QCOMPARE(FooNamespace::staticMetaObject.enumeratorCount(), 1); QCOMPARE(FooNamespace::FooNestedNamespace::staticMetaObject.enumeratorCount(), 2); QCOMPARE(FooNamespace::FooNestedNamespace::FooMoreNestedNamespace::staticMetaObject.enumeratorCount(), 1); + + EnumFromNamespaceClass obj; + const QVariant prop = obj.property("prop"); + QCOMPARE(prop.userType(), QMetaType::fromType<FooNamespace::Enum1>().id()); + QCOMPARE(prop.toInt(), int(FooNamespace::Enum1::Key2)); } void tst_Moc::cxx17Namespaces() @@ -3867,6 +4234,475 @@ void tst_Moc::cxx17Namespaces() QCOMPARE(QMetaEnum::fromType<CXX17Namespace::A::B::C::D::ClassInNamespace::GadEn>().value(0), 3); } +void tst_Moc::cxxAttributes() +{ +QT_WARNING_PUSH QT_WARNING_DISABLE_DEPRECATED + auto so = CppAttribute::staticMetaObject; +QT_WARNING_POP + QCOMPARE(so.className(), "CppAttribute"); + QCOMPARE(so.enumeratorCount(), 0); + QVERIFY(so.indexOfSignal("deprecatedSignal") != 1); + for (auto a: {"deprecatedSlot", "deprecatedSlot2", "deprecatedReason", "deprecatedReasonWithLBRACK", + "deprecatedReasonWith2LBRACK", "deprecatedReasonWithRBRACK", "deprecatedReasonWith2RBRACK", + "slotWithArguments" +#if !defined(_MSC_VER) || _MSC_VER >= 1912 + , "noreturnSlot", "noreturnSlot2", "returnInt", "noreturnDeprecatedSlot", + "noreturnSlot3" +#endif + }) { + QVERIFY(so.indexOfSlot(a) != 1); + } + + QCOMPARE(TestQNamespaceDeprecated::staticMetaObject.enumeratorCount(), 2); + checkEnum(TestQNamespaceDeprecated::staticMetaObject.enumerator(0), "TestEnum1", + {{"Key1", 11}, {"Key2", 12}, {"Key3", 13}, {"Key4", 14}, {"Key5", 15}, {"Key6", 16}, + {"Key7", 17}}); + checkEnum(TestQNamespaceDeprecated::staticMetaObject.enumerator(1), "TestFlag1", + {{"None", 0}, {"Flag1", 1}, {"Flag2", 2}, {"Flag3", 3}, {"Any", 1 | 2 | 3}}); + + QCOMPARE(TestQNamespaceDeprecated::TestGadget::staticMetaObject.enumeratorCount(), 1); + checkEnum(TestQNamespaceDeprecated::TestGadget::staticMetaObject.enumerator(0), "TestGEnum1", + {{"Key1", 13}, {"Key2", 14}, {"Key3", 15}}); + + QMetaEnum meta = QMetaEnum::fromType<TestQNamespaceDeprecated::TestEnum1>(); + QVERIFY(meta.isValid()); + QCOMPARE(meta.name(), "TestEnum1"); + QCOMPARE(meta.enclosingMetaObject(), &TestQNamespaceDeprecated::staticMetaObject); + QCOMPARE(meta.keyCount(), 7); +} + +void tst_Moc::mocJsonOutput() +{ + const auto readFile = [](const QString &fileName) -> std::optional<QJsonDocument> { + QFile f(fileName); + if (!f.open(QIODevice::ReadOnly)) { + qWarning() << "Could not open file" << fileName << f.errorString(); + return std::nullopt; + } + return QJsonDocument::fromJson(f.readAll()); + }; + + QString actualFile = QStringLiteral(":/allmocs.json"); + QString expectedFile = QStringLiteral(":/allmocs_baseline.json"); + if (!QFile::exists(actualFile)) { + // TODO: necessary with cmake as we cannot generate the qrc file soon enough + auto const appDir = QCoreApplication::applicationDirPath(); + actualFile = appDir + QDir::separator() + QLatin1String("./allmocs.json"); + expectedFile = appDir + QDir::separator() + QLatin1String("./allmocs_baseline.json"); + } + + QVERIFY2(QFile::exists(actualFile), qPrintable(actualFile)); + QVERIFY2(QFile::exists(expectedFile), qPrintable(expectedFile)); + + std::optional<QJsonDocument> actualOutput = readFile(actualFile); + QVERIFY(actualOutput); + std::optional<QJsonDocument> expectedOutput = readFile(expectedFile); + QVERIFY(expectedOutput); + + const auto showPotentialDiff = [](const QJsonDocument &actual, const QJsonDocument &expected) -> QByteArray { +#if defined(Q_OS_UNIX) + QByteArray actualStr = actual.toJson(); + QByteArray expectedStr = expected.toJson(); + + QTemporaryFile actualFile; + if (!actualFile.open()) + return "Error opening actual temp file"; + actualFile.write(actualStr); + actualFile.flush(); + + QTemporaryFile expectedFile; + if (!expectedFile.open()) + return "Error opening expected temp file"; + expectedFile.write(expectedStr); + expectedFile.flush(); + + QProcess diffProc; + diffProc.setProgram("diff"); + diffProc.setArguments(QStringList() << "-ub" << expectedFile.fileName() << actualFile.fileName()); + diffProc.start(); + if (!diffProc.waitForStarted()) + return "Error waiting for diff process to start."; + if (!diffProc.waitForFinished()) + return "Error waiting for diff process to finish."; + return diffProc.readAllStandardOutput(); +#else + Q_UNUSED(actual); + Q_UNUSED(expected); + return "Cannot launch diff. Please check allmocs.json and allmocs_baseline.json on disk."; +#endif + }; + + QVERIFY2(*actualOutput == *expectedOutput, showPotentialDiff(*actualOutput, *expectedOutput).constData()); +} + +void TestFwdProperties::setProp1(const FwdClass1 &v) +{ + prop1.reset(new FwdClass1(v)); +} +void TestFwdProperties::setProp2(const FwdClass2 &v) +{ + prop2.reset(new FwdClass2(v)); +} +void TestFwdProperties::setProp3(const FwdClass3 &v) +{ + prop3.reset(new FwdClass3(v)); +} +TestFwdProperties::~TestFwdProperties() {} + +Q_DECLARE_METATYPE(FwdClass1); + +void tst_Moc::mocInclude() +{ + TestFwdProperties obj; + obj.setProperty("prop1", QVariant::fromValue(FwdClass1 { 45 })); + QCOMPARE(obj.prop1->x, 45); +} + +class RequiredTest :public QObject +{ + Q_OBJECT + + Q_PROPERTY(int required MEMBER m_required REQUIRED) + Q_PROPERTY(int notRequired MEMBER m_notRequired) + +private: + int m_required; + int m_notRequired; +}; + +void tst_Moc::requiredProperties() +{ + QMetaObject mo = RequiredTest::staticMetaObject; + QMetaProperty required = mo.property(mo.indexOfProperty("required")); + QVERIFY(required.isValid()); + QVERIFY(required.isRequired()); + QMetaProperty notRequired = mo.property(mo.indexOfProperty("notRequired")); + QVERIFY(notRequired.isValid()); + QVERIFY(!notRequired.isRequired()); +} + +class ClassWithQPropertyMembers : public QObject +{ + Q_OBJECT + Q_PROPERTY(int publicProperty MEMBER publicProperty BINDABLE bindablePublicProperty + NOTIFY publicPropertyChanged) + Q_PROPERTY(int privateExposedProperty MEMBER privateExposedProperty) +public: + +signals: + void publicPropertyChanged(); + +public: + QBindable<int> bindablePublicProperty() { return QBindable<int>(&publicProperty); } + Q_OBJECT_BINDABLE_PROPERTY(ClassWithQPropertyMembers, int, publicProperty, &ClassWithQPropertyMembers::publicPropertyChanged); + QProperty<int> notExposed; + + +protected: + QProperty<int> protectedProperty; + +private: + QProperty<int> privateProperty; + QProperty<int> privateExposedProperty; +}; + +void tst_Moc::qpropertyMembers() +{ + const auto metaObject = &ClassWithQPropertyMembers::staticMetaObject; + + QCOMPARE(metaObject->propertyCount() - metaObject->superClass()->propertyCount(), 2); + + QCOMPARE(metaObject->indexOfProperty("notExposed"), -1); + + QMetaProperty prop = metaObject->property(metaObject->indexOfProperty("publicProperty")); + QVERIFY(prop.isValid()); + + QVERIFY(metaObject->property(metaObject->indexOfProperty("privateExposedProperty")).isValid()); + + ClassWithQPropertyMembers instance; + + prop.write(&instance, 42); + QCOMPARE(instance.publicProperty.value(), 42); + + QSignalSpy publicPropertySpy(&instance, SIGNAL(publicPropertyChanged())); + + instance.publicProperty.setValue(100); + QCOMPARE(prop.read(&instance).toInt(), 100); + QCOMPARE(publicPropertySpy.size(), 1); + + QCOMPARE(prop.metaType(), QMetaType(QMetaType::Int)); + + QVERIFY(prop.notifySignal().isValid()); +} + + + +void tst_Moc::observerMetaCall() +{ + const auto metaObject = &ClassWithQPropertyMembers::staticMetaObject; + QMetaProperty prop = metaObject->property(metaObject->indexOfProperty("publicProperty")); + QVERIFY(prop.isValid()); + + ClassWithQPropertyMembers instance; + + int observerCallCount = 0; + + + auto observer = [&observerCallCount]() { + ++observerCallCount; + }; + + auto bindable = prop.bindable(&instance); + QVERIFY(bindable.isBindable()); + + auto handler = bindable.onValueChanged(observer); + + QCOMPARE(observerCallCount, 0); + instance.publicProperty.setValue(100); + QCOMPARE(observerCallCount, 1); + instance.publicProperty.setValue(101); + QCOMPARE(observerCallCount, 2); +} + + + +void tst_Moc::setQPRopertyBinding() +{ + const auto metaObject = &ClassWithQPropertyMembers::staticMetaObject; + QMetaProperty prop = metaObject->property(metaObject->indexOfProperty("publicProperty")); + QVERIFY(prop.isValid()); + + ClassWithQPropertyMembers instance; + + bool bindingCalled = false; + auto binding = Qt::makePropertyBinding([&bindingCalled]() { + bindingCalled = true; + return 42; + }); + + auto bindable = prop.bindable(&instance); + QVERIFY(bindable.isBindable()); + bindable.setBinding(binding); + + QCOMPARE(instance.publicProperty.value(), 42); + QVERIFY(bindingCalled); // but now it should've been called :) +} + +class ClassWithPrivateQPropertyShim :public QObject +{ + Q_OBJECT +public: + Q_PROPERTY(int testProperty READ testProperty WRITE setTestProperty + BINDABLE bindableTestProperty NOTIFY testPropertyChanged) + Q_PROPERTY(int testProperty2 READ testProperty2 WRITE setTestProperty2 + BINDABLE bindableTestProperty2) + //Q_PROPERTY(d_func(), int, lazyTestProperty, setLazyTestProperty, NOTIFY lazyTestPropertyChanged) + +signals: + void testPropertyChanged(); + void lazyTestPropertyChanged(); +public: + + int testProperty() const { return priv.testProperty; } + void setTestProperty(int val) { priv.testProperty = val; } + int testProperty2() const { return priv.testProperty2; } + void setTestProperty2(int val) { priv.testProperty2 = val; } + + QBindable<int> bindableTestProperty() { return QBindable<int>(&priv.testProperty); } + QBindable<int> bindableTestProperty2() { return QBindable<int>(&priv.testProperty2); } + + struct Private { + Private(ClassWithPrivateQPropertyShim *pub) + : q(pub) + {} + + QBindingStorage bindingStorage; + + ClassWithPrivateQPropertyShim *q = nullptr; + + void onTestPropertyChanged() { q->testPropertyChanged(); } + Q_OBJECT_BINDABLE_PROPERTY(Private, int, testProperty, &Private::onTestPropertyChanged); + QProperty<int> testProperty2; + }; + Private priv{this}; + + Private *d_func() { return &priv; } + const Private *d_func() const { return &priv; } +}; + +inline const QBindingStorage *qGetBindingStorage(const ClassWithPrivateQPropertyShim::Private *o) +{ + return &o->bindingStorage; +} +inline QBindingStorage *qGetBindingStorage(ClassWithPrivateQPropertyShim::Private *o) +{ + return &o->bindingStorage; +} + +void tst_Moc::privateQPropertyShim() +{ + ClassWithPrivateQPropertyShim testObject; + + { + auto metaObject = &ClassWithPrivateQPropertyShim::staticMetaObject; + QMetaProperty prop = metaObject->property(metaObject->indexOfProperty("testProperty")); + QVERIFY(prop.isValid()); + QVERIFY(prop.notifySignal().isValid()); + } + + testObject.priv.testProperty.setValue(42); + QCOMPARE(testObject.property("testProperty").toInt(), 42); + + // Behave like a QProperty + QVERIFY(!testObject.bindableTestProperty().hasBinding()); + testObject.bindableTestProperty().setBinding([]() { return 100; }); + QCOMPARE(testObject.testProperty(), 100); + QVERIFY(testObject.bindableTestProperty().hasBinding()); + + // Old style setter getters + testObject.setTestProperty(400); + QVERIFY(!testObject.bindableTestProperty().hasBinding()); + QCOMPARE(testObject.testProperty(), 400); + + // moc generates correct code for plain QProperty in PIMPL + testObject.setTestProperty2(42); + QCOMPARE(testObject.priv.testProperty2.value(), 42); +} + + +class BindableOnly : public QObject +{ + Q_OBJECT + Q_PROPERTY(int score BINDABLE scoreBindable READ default WRITE default) +public: + BindableOnly(QObject *parent = nullptr) + : QObject(parent) + , m_score(4) + {} + QBindable<int> scoreBindable() { return QBindable<int>(&m_score); } +private: + QProperty<int> m_score; +}; + +class BindableAndNotifyable : public QObject +{ + Q_OBJECT + Q_PROPERTY(int score BINDABLE scoreBindable NOTIFY scoreChanged READ default WRITE default) +public: + BindableAndNotifyable(QObject *parent = nullptr) + : QObject(parent) + , m_score(4) + {} + QBindable<int> scoreBindable() { return QBindable<int>(&m_score); } +signals: + void scoreChanged(); +private: + QProperty<int> m_score; +}; + +void tst_Moc::readWriteThroughBindable() +{ + { + BindableOnly o; + QCOMPARE(o.scoreBindable().value(), 4); + QCOMPARE(o.property("score").toInt(), 4); + o.scoreBindable().setValue(5); + QCOMPARE(o.scoreBindable().value(), 5); + QCOMPARE(o.property("score").toInt(), 5); + const QMetaObject *mo = o.metaObject(); + const int i = mo->indexOfProperty("score"); + QVERIFY(i > 0); + QMetaProperty p = mo->property(i); + QCOMPARE(p.name(), "score"); + QVERIFY(p.isValid()); + QVERIFY(p.isWritable()); + QCOMPARE(p.read(&o), 5); + QVERIFY(o.setProperty("score", 6)); + QCOMPARE(o.property("score").toInt(), 6); + QVERIFY(p.write(&o, 7)); + QCOMPARE(p.read(&o), 7); + } + { + BindableAndNotifyable o; + QCOMPARE(o.scoreBindable().value(), 4); + QCOMPARE(o.property("score").toInt(), 4); + o.scoreBindable().setValue(5); + QCOMPARE(o.scoreBindable().value(), 5); + QCOMPARE(o.property("score").toInt(), 5); + const QMetaObject *mo = o.metaObject(); + const int i = mo->indexOfProperty("score"); + QVERIFY(i > 0); + QMetaProperty p = mo->property(i); + QCOMPARE(p.name(), "score"); + QVERIFY(p.isValid()); + QVERIFY(p.isWritable()); + QCOMPARE(p.read(&o), 5); + QVERIFY(o.setProperty("score", 6)); + QCOMPARE(o.property("score").toInt(), 6); + QVERIFY(p.write(&o, 7)); + QCOMPARE(p.read(&o), 7); + } +} + +struct WithInvokableCtor +{ + Q_GADGET + Q_PROPERTY(int thing MEMBER m_thing CONSTANT FINAL) +public: + WithInvokableCtor() = default; + Q_INVOKABLE WithInvokableCtor(int theThing) : m_thing(theThing) {} + + int m_thing = 10; +}; + +void tst_Moc::invokableCtors() +{ + const QMetaType metaType = QMetaType::fromType<WithInvokableCtor>(); + Q_ASSERT(metaType.sizeOf() > 0); + const QMetaObject *metaObject = metaType.metaObject(); + QVERIFY(metaObject); + + QCOMPARE(metaObject->constructorCount(), 1); + WithInvokableCtor *result = nullptr; + const auto guard = qScopeGuard([&]() { delete result; }); + int argument = 17; + void *a[] = { &result, &argument }; + metaObject->static_metacall(QMetaObject::CreateInstance, 0, a); + QVERIFY(result); + QCOMPARE(result->m_thing, 17); + + // Call dtor so that we're left with "uninitialized" memory. + WithInvokableCtor result2; + result2.~WithInvokableCtor(); + + void *b[] = { &result2, &argument }; + metaObject->static_metacall(QMetaObject::ConstructInPlace, 0, b); + QCOMPARE(result2.m_thing, 17); +} + +void tst_Moc::virtualInlineTaggedSlot() +{ + auto mo = TagTest::staticMetaObject; + auto idx = mo.indexOfMethod("pamOpen(int)"); + auto method = mo.method(idx); + QVERIFY(method.isValid()); // fails! + QCOMPARE(method.tag(), "Q_NOREPLY"); + idx = mo.indexOfMethod("test()"); + method = mo.method(idx); + QVERIFY(method.isValid()); + QCOMPARE(method.tag(), "Q_NOREPLY"); + QCOMPARE(method.returnMetaType(), QMetaType::fromType<int>()); +} + +void tst_Moc::tokenStartingWithNumber() +{ + auto *mo = &TokenStartingWithNumber::staticMetaObject; + int index = mo->indexOfEnumerator("FooItems"); + QMetaEnum metaEnum = mo->enumerator(index); + QVERIFY(metaEnum.isValid()); + QCOMPARE(metaEnum.keyCount(), 3); +} + QTEST_MAIN(tst_Moc) // the generated code must compile with QT_NO_KEYWORDS @@ -3875,4 +4711,3 @@ QTEST_MAIN(tst_Moc) #undef emit #include "tst_moc.moc" - diff --git a/tests/auto/tools/moc/unterminated-function-macro.h b/tests/auto/tools/moc/unterminated-function-macro.h index da8e4c9e93..2cb0579449 100644 --- a/tests/auto/tools/moc/unterminated-function-macro.h +++ b/tests/auto/tools/moc/unterminated-function-macro.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef UNTERMINATED_FUNCTION_MACRO_H #define UNTERMINATED_FUNCTION_MACRO_H diff --git a/tests/auto/tools/moc/using-namespaces.h b/tests/auto/tools/moc/using-namespaces.h index 5bd42012ce..eaba403dff 100644 --- a/tests/auto/tools/moc/using-namespaces.h +++ b/tests/auto/tools/moc/using-namespaces.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef USING_NAMESPACES_H #define USING_NAMESPACES_H diff --git a/tests/auto/tools/moc/warn-on-multiple-qobject-subclasses.h b/tests/auto/tools/moc/warn-on-multiple-qobject-subclasses.h index 5f9bab5e2f..0e45036768 100644 --- a/tests/auto/tools/moc/warn-on-multiple-qobject-subclasses.h +++ b/tests/auto/tools/moc/warn-on-multiple-qobject-subclasses.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef WARN_ON_MULTIPLE_QOBJECT_SUBCLASSES_H #define WARN_ON_MULTIPLE_QOBJECT_SUBCLASSES_H diff --git a/tests/auto/tools/moc/warn-on-property-without-read.h b/tests/auto/tools/moc/warn-on-property-without-read.h index 0fd12e624b..19a3a305bd 100644 --- a/tests/auto/tools/moc/warn-on-property-without-read.h +++ b/tests/auto/tools/moc/warn-on-property-without-read.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef WARN_ON_PROPERTY_WITHOUT_READ_H #define WARN_ON_PROPERTY_WITHOUT_READ_H diff --git a/tests/auto/tools/moc/win-newlines.h b/tests/auto/tools/moc/win-newlines.h index 2e41f2f83e..353c21dbbb 100644 --- a/tests/auto/tools/moc/win-newlines.h +++ b/tests/auto/tools/moc/win-newlines.h @@ -1,30 +1,5 @@ -/****************************************************************************
-**
-** 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$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <QObject>
diff --git a/tests/auto/tools/qdbuscpp2xml/CMakeLists.txt b/tests/auto/tools/qdbuscpp2xml/CMakeLists.txt new file mode 100644 index 0000000000..9dea3f3c4d --- /dev/null +++ b/tests/auto/tools/qdbuscpp2xml/CMakeLists.txt @@ -0,0 +1,35 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + +##################################################################### +## tst_qdbuscpp2xml Test: +##################################################################### + +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qdbuscpp2xml LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + +qt_internal_add_test(tst_qdbuscpp2xml + SOURCES + test1.h + test2.h + tst_qdbuscpp2xml.cpp + LIBRARIES + Qt::DBusPrivate +) + +# Resources: +set(qdbuscpp2xml_resource_files + "test1.h" + "test2.h" +) + +qt_internal_add_resource(tst_qdbuscpp2xml "qdbuscpp2xml" + PREFIX + "/tst_qdbuscpp2xml/" + FILES + ${qdbuscpp2xml_resource_files} +) + diff --git a/tests/auto/tools/qdbuscpp2xml/qdbuscpp2xml.pro b/tests/auto/tools/qdbuscpp2xml/qdbuscpp2xml.pro deleted file mode 100644 index 7389e9d44a..0000000000 --- a/tests/auto/tools/qdbuscpp2xml/qdbuscpp2xml.pro +++ /dev/null @@ -1,9 +0,0 @@ -CONFIG += testcase -QT = core testlib dbus -TARGET = tst_qdbuscpp2xml - -SOURCES += tst_qdbuscpp2xml.cpp \ - -RESOURCES += qdbuscpp2xml.qrc - -HEADERS += test1.h diff --git a/tests/auto/tools/qdbuscpp2xml/qdbuscpp2xml.qrc b/tests/auto/tools/qdbuscpp2xml/qdbuscpp2xml.qrc deleted file mode 100644 index b4cffb842e..0000000000 --- a/tests/auto/tools/qdbuscpp2xml/qdbuscpp2xml.qrc +++ /dev/null @@ -1,5 +0,0 @@ -<!DOCTYPE RCC><RCC version="1.0"> -<qresource prefix="/tst_qdbuscpp2xml/"> - <file>test1.h</file> -</qresource> -</RCC> diff --git a/tests/auto/tools/qdbuscpp2xml/test1.h b/tests/auto/tools/qdbuscpp2xml/test1.h index 0c7488cd7c..24cd939657 100644 --- a/tests/auto/tools/qdbuscpp2xml/test1.h +++ b/tests/auto/tools/qdbuscpp2xml/test1.h @@ -1,46 +1,23 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com> -** 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$ -** -****************************************************************************/ +// Copyright (C) 2012 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com> +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef QDBUSCPP2XML_TEST1_H #define QDBUSCPP2XML_TEST1_H #include <QObject> - -class QDBusObjectPath; -class QDBusUnixFileDescriptor; -class QDBusSignature; +#include <QtDBus/QDBusSignature> +#include <QtDBus/QDBusObjectPath> +#include <QtDBus/QDBusUnixFileDescriptor> class Test1 : public QObject { Q_OBJECT + Q_MOC_INCLUDE(<QtDBus/qdbusextratypes.h>) + Q_MOC_INCLUDE(<QtDBus/qdbusunixfiledescriptor.h>) Q_CLASSINFO("D-Bus Interface", "org.qtProject.qdbuscpp2xmlTests.Test1") Q_PROPERTY(int numProperty1 READ numProperty1 CONSTANT) Q_PROPERTY(int numProperty2 READ numProperty2 WRITE setNumProperty2) + Q_PROPERTY(int numProperty3 MEMBER m_numProperty3) Q_ENUMS(Salaries) public: // C++1y allows use of single quote as a digit separator, useful for large @@ -53,7 +30,7 @@ public: #endif }; - Test1(QObject *parent = 0) : QObject(parent) {} + Test1(QObject *parent = nullptr) : QObject(parent) {} int numProperty1() { return 42; } @@ -121,6 +98,9 @@ protected: private: Q_SCRIPTABLE void neverExported11() {} Q_SCRIPTABLE int neverExported12() { return 42; } + +private: + int m_numProperty3; }; #endif diff --git a/tests/auto/tools/qdbuscpp2xml/test2.h b/tests/auto/tools/qdbuscpp2xml/test2.h new file mode 100644 index 0000000000..b90820ad38 --- /dev/null +++ b/tests/auto/tools/qdbuscpp2xml/test2.h @@ -0,0 +1,24 @@ +// Copyright (C) 2023 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +#ifndef TEST2_H +#define TEST2_H + +#include <QObject> +#include <QtDBus/QtDBus> + +// Regression test for QTBUG-34550 +class Test2 : public QObject +{ + Q_OBJECT + Q_CLASSINFO("D-Bus Interface", "net.company.object") + Q_PROPERTY(QDBusObjectPath objectProperty READ objectProperty) + Q_PROPERTY(QList<QDBusObjectPath> objectPropertyList READ objectPropertyList) +public: + Test2(QObject *parent = nullptr) : QObject(parent) { } + + QDBusObjectPath objectProperty() { return {}; } + + QList<QDBusObjectPath> objectPropertyList() { return {}; } +}; + +#endif // TEST2_H diff --git a/tests/auto/tools/qdbuscpp2xml/tst_qdbuscpp2xml.cpp b/tests/auto/tools/qdbuscpp2xml/tst_qdbuscpp2xml.cpp index 19c85a050e..535aa6c5a8 100644 --- a/tests/auto/tools/qdbuscpp2xml/tst_qdbuscpp2xml.cpp +++ b/tests/auto/tools/qdbuscpp2xml/tst_qdbuscpp2xml.cpp @@ -1,36 +1,15 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com> -** 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> +// Copyright (C) 2012 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com> +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only -#include "test1.h" +#include <QTest> +#include <QLibraryInfo> +#include <QProcess> #include <QtDBus/QDBusConnection> +#include <QtDBus/private/dbus_minimal_p.h> + +#include "test1.h" +#include "test2.h" // in qdbusxmlgenerator.cpp QT_BEGIN_NAMESPACE @@ -55,6 +34,8 @@ class tst_qdbuscpp2xml : public QObject private slots: void qdbuscpp2xml_data(); void qdbuscpp2xml(); + void qtdbusTypes_data(); + void qtdbusTypes(); void initTestCase(); void cleanupTestCase(); @@ -66,6 +47,7 @@ private: void tst_qdbuscpp2xml::initTestCase() { m_tests.insert("test1", new Test1); + m_tests.insert("test2", new Test2); } void tst_qdbuscpp2xml::cleanupTestCase() @@ -78,16 +60,18 @@ void tst_qdbuscpp2xml::qdbuscpp2xml_data() QTest::addColumn<QString>("inputfile"); QTest::addColumn<int>("flags"); - QBitArray doneFlags(QDBusConnection::ExportAllContents + 1); + QBitArray doneFlags(int(QDBusConnection::ExportAllContents) + 1); for (int flag = 0x10; flag < QDBusConnection::ExportScriptableContents; flag += 0x10) { - QTest::newRow("xmlgenerator-" + QByteArray::number(flag)) << "test1" << flag; - doneFlags.setBit(flag); - for (int mask = QDBusConnection::ExportAllSlots; mask <= QDBusConnection::ExportAllContents; mask += 0x110) { - int flags = flag | mask; - if (doneFlags.testBit(flags)) - continue; - QTest::newRow("xmlgenerator-" + QByteArray::number(flags)) << "test1" << flags; - doneFlags.setBit(flags); + for (const auto &testFile : m_tests.keys()) { + QTest::newRow("xmlgenerator-" + QByteArray::number(flag) + "-" + qUtf8Printable(testFile)) << testFile << flag; + doneFlags.setBit(flag); + for (int mask = QDBusConnection::ExportAllSlots; mask <= QDBusConnection::ExportAllContents; mask += 0x110) { + int flags = flag | mask; + if (doneFlags.testBit(flags)) + continue; + QTest::newRow("xmlgenerator-" + QByteArray::number(flags) + "-" + qUtf8Printable(testFile)) << testFile << flags; + doneFlags.setBit(flags); + } } } } @@ -129,7 +113,7 @@ void tst_qdbuscpp2xml::qdbuscpp2xml() } // Launch - const QString binpath = QLibraryInfo::location(QLibraryInfo::BinariesPath); + const QString binpath = QLibraryInfo::path(QLibraryInfo::BinariesPath); const QString command = binpath + QLatin1String("/qdbuscpp2xml"); QProcess process; process.start(command, QStringList() << options << (QFINDTESTDATA(inputfile + QStringLiteral(".h")))); @@ -148,9 +132,6 @@ void tst_qdbuscpp2xml::qdbuscpp2xml() QFAIL("UNEXPECTED STDERR CONTENTS"); } - const QChar nl = QLatin1Char('\n'); - const QStringList actualLines = out.split(nl); - QObject *testObject = m_tests.value(inputfile); if (flags == 0) @@ -164,6 +145,77 @@ void tst_qdbuscpp2xml::qdbuscpp2xml() QCOMPARE(out, expected); } +void tst_qdbuscpp2xml::qtdbusTypes_data() +{ + QTest::addColumn<QByteArray>("type"); + QTest::addColumn<QByteArray>("expectedSignature"); + auto addRow = [](QByteArray type, QByteArray signature) { + QTest::addRow("%s", type.constData()) << type << signature; + + // lists and vectors + QTest::addRow("QList-%s", type.constData()) + << "QList<" + type + '>' << DBUS_TYPE_ARRAY + signature; + QTest::addRow("QVector-%s", type.constData()) + << "QVector<" + type + '>' << DBUS_TYPE_ARRAY + signature; + }; + addRow("QDBusVariant", DBUS_TYPE_VARIANT_AS_STRING); + addRow("QDBusObjectPath", DBUS_TYPE_OBJECT_PATH_AS_STRING); + addRow("QDBusSignature", DBUS_TYPE_SIGNATURE_AS_STRING); + addRow("QDBusUnixFileDescriptor", DBUS_TYPE_UNIX_FD_AS_STRING); + + // QDBusMessage is not a type, but must be recognized + QTest::newRow("QDBusMessage") << QByteArray("QDBusMessage") << QByteArray(); +} + +void tst_qdbuscpp2xml::qtdbusTypes() +{ + static const char cppSkeleton[] = R"( +class QDBusVariantBugRepro : public QDBusAbstractAdaptor +{ + Q_OBJECT + Q_CLASSINFO("D-Bus Interface", "org.qtproject.test") +public Q_SLOTS: + void method(const @TYPE@ &); +};)"; + static const char methodXml[] = R"(<method name="method")"; + static const char expectedSkeleton[] = R"(<arg type="@S@" direction="in"/>)"; + + QFETCH(QByteArray, type); + QFETCH(QByteArray, expectedSignature); + + const QString binpath = QLibraryInfo::path(QLibraryInfo::BinariesPath); + const QString command = binpath + QLatin1String("/qdbuscpp2xml"); + QProcess process; + process.start(command); + + process.write(QByteArray(cppSkeleton).replace("@TYPE@", type)); + process.closeWriteChannel(); + + if (!process.waitForStarted()) { + const QString path = QString::fromLocal8Bit(qgetenv("PATH")); + QString message = QString::fromLatin1("'%1' could not be found when run from '%2'. Path: '%3' "). + arg(command, QDir::currentPath(), path); + QFAIL(qPrintable(message)); + } + QVERIFY2(process.waitForFinished(), qPrintable(process.errorString())); + + // verify nothing was printed on stderr + QCOMPARE(process.readAllStandardError(), QString()); + + // we don't do a full XML parsing here... + QByteArray output = process.readAll().simplified(); + QVERIFY2(output.contains("<node>") && output.contains("</node>"), "Output was: " + output); + output = output.mid(output.indexOf("<node>") + strlen("<node>")); + output = output.left(output.indexOf("</node>")); + + QVERIFY2(output.contains(methodXml), "Output was: " + output); + + if (!expectedSignature.isEmpty()) { + QByteArray expected = QByteArray(expectedSkeleton).replace("@S@", expectedSignature); + QVERIFY2(output.contains(expected), "Expected: '" + expected + "'; got: '" + output + '\''); + } +} + QTEST_APPLESS_MAIN(tst_qdbuscpp2xml) #include "tst_qdbuscpp2xml.moc" diff --git a/tests/auto/tools/qdbusxml2cpp/CMakeLists.txt b/tests/auto/tools/qdbusxml2cpp/CMakeLists.txt new file mode 100644 index 0000000000..29278377b6 --- /dev/null +++ b/tests/auto/tools/qdbusxml2cpp/CMakeLists.txt @@ -0,0 +1,17 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + +##################################################################### +## tst_qdbusxml2cpp Test: +##################################################################### + +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qdbusxml2cpp LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + +qt_internal_add_test(tst_qdbusxml2cpp + SOURCES + tst_qdbusxml2cpp.cpp +) diff --git a/tests/auto/tools/qdbusxml2cpp/qdbusxml2cpp.pro b/tests/auto/tools/qdbusxml2cpp/qdbusxml2cpp.pro deleted file mode 100644 index 9fc0af98b4..0000000000 --- a/tests/auto/tools/qdbusxml2cpp/qdbusxml2cpp.pro +++ /dev/null @@ -1,4 +0,0 @@ -CONFIG += testcase -QT = core testlib -TARGET = tst_qdbusxml2cpp -SOURCES += tst_qdbusxml2cpp.cpp diff --git a/tests/auto/tools/qdbusxml2cpp/tst_qdbusxml2cpp.cpp b/tests/auto/tools/qdbusxml2cpp/tst_qdbusxml2cpp.cpp index 0c5ba21134..c51a0909f8 100644 --- a/tests/auto/tools/qdbusxml2cpp/tst_qdbusxml2cpp.cpp +++ b/tests/auto/tools/qdbusxml2cpp/tst_qdbusxml2cpp.cpp @@ -1,32 +1,8 @@ -/**************************************************************************** -** -** Copyright (C) 2016 Intel Corporation. -** 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> +// Copyright (C) 2016 Intel Corporation. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#include <QTest> +#include <QLibraryInfo> #include <QtCore/QProcess> #include <QtCore/QRegularExpression> @@ -43,6 +19,12 @@ private slots: void initTestCase_data(); void process_data(); void process(); + void includeStyle_data(); + void includeStyle(); + void missingAnnotation_data(); + void missingAnnotation(); + void includeMoc_data(); + void includeMoc(); }; struct BasicTypeList { @@ -79,6 +61,72 @@ static QString stripHeader(QString output) return output.remove(header); } +static void runTool(QProcess &process, const QByteArray &data, + const QStringList &flags) +{ + // test both interface and adaptor generation + QFETCH_GLOBAL(QString, commandLineArg); + + // Run the tool + const QString binpath = QLibraryInfo::path(QLibraryInfo::BinariesPath); + QStringList arguments = { commandLineArg }; + arguments += flags; + process.setArguments(arguments); + process.setProgram(binpath + QLatin1String("/qdbusxml2cpp")); + process.start(QIODevice::Text | QIODevice::ReadWrite); + QVERIFY2(process.waitForStarted(), qPrintable(process.errorString())); + + static const char xmlHeader[] = + "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n" + DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE // \n is included + "<node>\n" + " <interface name=\"local.name.is.not.important\">\n" + " <!-- begin data -->\n"; + static const char xmlFooter[] = "\n" + " <!-- end data -->\n" + " </interface>\n" + "</node>\n"; + + process.write(xmlHeader, sizeof(xmlHeader) - 1); + process.write(data); + process.write(xmlFooter, sizeof(xmlFooter) - 1); + + while (process.bytesToWrite()) + QVERIFY2(process.waitForBytesWritten(), qPrintable(process.errorString())); + // fprintf(stderr, "%s%s%s", xmlHeader, xmlSnippet.toLatin1().constData(), xmlFooter); + + process.closeWriteChannel(); + QVERIFY2(process.waitForFinished(), qPrintable(process.errorString())); + QCOMPARE(process.exitStatus(), QProcess::NormalExit); +} + +static void checkOneFile(const QString &fileName, const QByteArray &expected) +{ + QFile file(fileName); + QVERIFY(file.exists()); + const auto guard = QScopeGuard([&](){ QFile::remove(fileName); }); + + QVERIFY(file.open(QFile::Text | QFile::ReadOnly)); + QByteArray text = file.readAll(); + QVERIFY(text.contains(expected)); +} + +static void checkTwoFiles(const QString &headerName, const QString &sourceName, const QByteArray &expected) +{ + QFile headerFile(headerName); + QFile sourceFile(sourceName); + + QVERIFY(headerFile.exists()); + const auto headerGuard = QScopeGuard([&](){ QFile::remove(headerName); }); + + QVERIFY(sourceFile.exists()); + const auto sourceGuard = QScopeGuard([&](){ QFile::remove(sourceName); }); + + QVERIFY(sourceFile.open(QFile::Text | QFile::ReadOnly)); + QByteArray text = sourceFile.readAll(); + QVERIFY(text.contains(expected)); +} + void tst_qdbusxml2cpp::initTestCase_data() { QTest::addColumn<int>("outputMode"); @@ -186,11 +234,52 @@ void tst_qdbusxml2cpp::process_data() "<arg type=\"s\" direction=\"out\"/>" "<arg type=\"s\" direction=\"out\"/>" "</method>" - << QRegularExpression("Q_SLOTS:.*QDBusPendingReply<QString, QString> Method\\(const QString &\\w*, const QString &", + << QRegularExpression("Q_SLOTS:.*QDBusPendingReply<QString, QString> Method\\(const QString &\\w*, const QString &\\w*\\)" + ".*inline QDBusReply<QString> Method\\(const QString &\\w*, const QString &\\w*, QString &\\w*\\)", QRegularExpression::DotMatchesEverythingOption) << QRegularExpression("Q_SLOTS:.*QString Method\\(const QString &\\w*, const QString &\\w*, QString &", QRegularExpression::DotMatchesEverythingOption); + QTest::newRow("method-deprecated-0out") + << "<method name=\"Method\">" + "<annotation name=\"org.freedesktop.DBus.Deprecated\" value=\"true\"/>" + "</method>" + << QRegularExpression("Q_SLOTS:.*Q_DECL_DEPRECATED inline QDBusPendingReply<> Method\\(\\)", + QRegularExpression::DotMatchesEverythingOption) + << QRegularExpression("Q_SLOTS:.*\n\\s*void Method\\(\\)", // no Q_DECL_DEPRECATED + QRegularExpression::DotMatchesEverythingOption); + + QTest::newRow("method-deprecated-2out") + << "<method name=\"Method\">" + "<annotation name=\"org.freedesktop.DBus.Deprecated\" value=\"true\"/>" + "<arg type=\"s\" direction=\"out\"/>" + "<arg type=\"s\" direction=\"out\"/>" + "</method>" + << QRegularExpression("Q_SLOTS:.*Q_DECL_DEPRECATED inline QDBusPendingReply<QString, QString> Method\\(\\)" + ".*Q_DECL_DEPRECATED inline QDBusReply<QString> Method\\(QString &\\w*\\)", + QRegularExpression::DotMatchesEverythingOption) + << QRegularExpression("Q_SLOTS:.*\n\\s*QString Method\\(QString &", // no Q_DECL_DEPRECATED + QRegularExpression::DotMatchesEverythingOption); + + QTest::newRow("method-noreply") + << "<method name=\"Method\">" + "<annotation name=\"org.freedesktop.DBus.Method.NoReply\" value=\"true\"/>" + "</method>" + << QRegularExpression("Q_SLOTS:.*Q_NOREPLY inline void Method\\(\\).*\\bQDBus::NoBlock\\b", + QRegularExpression::DotMatchesEverythingOption) + << QRegularExpression("Q_SLOTS:.*Q_NOREPLY void Method\\(", + QRegularExpression::DotMatchesEverythingOption); + + QTest::newRow("method-deprecated-noreply") + << "<method name=\"Method\">" + "<annotation name=\"org.freedesktop.DBus.Method.NoReply\" value=\"true\"/>" + "<annotation name=\"org.freedesktop.DBus.Deprecated\" value=\"true\"/>" + "</method>" + << QRegularExpression("Q_SLOTS:.*Q_DECL_DEPRECATED Q_NOREPLY inline void Method\\(\\).*\\bQDBus::NoBlock\\b", + QRegularExpression::DotMatchesEverythingOption) + << QRegularExpression("Q_SLOTS:.*Q_NOREPLY void Method\\(", + QRegularExpression::DotMatchesEverythingOption); + // -- signals -- for (int i = 0; i < basicTypeCount; ++i) { QRegularExpression rx(QString("Q_SIGNALS:.*\\bvoid Signal\\((const )?%1\\b") @@ -203,6 +292,24 @@ void tst_qdbusxml2cpp::process_data() .arg(basicTypeList[i].dbusType) << rx << rx; } + + QRegularExpression rx(R"(Q_SIGNALS:.*\b\Qvoid Signal(const QVariantMap &map);\E)", + QRegularExpression::DotMatchesEverythingOption); + QTest::newRow("signal-complex") + << R"(<signal name="Signal"> + <arg type="a{sv}" name="map"/> + <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QVariantMap"/>" + </signal>)" + << rx << rx; + + QTest::newRow("signal-deprecated") + << R"(<signal name="Signal"> + <annotation name="org.freedesktop.DBus.Deprecated" value="true"/> + </signal>)" + << QRegularExpression(R"(Q_SIGNALS:.*\bQ_DECL_DEPRECATED void Signal\(\))", + QRegularExpression::DotMatchesEverythingOption) + << QRegularExpression(R"(Q_SIGNALS:.*\n\s*void Signal\(\))", // no Q_DECL_DEPRECATED + QRegularExpression::DotMatchesEverythingOption); } void tst_qdbusxml2cpp::process() @@ -213,38 +320,11 @@ void tst_qdbusxml2cpp::process() QVERIFY2(interfaceSearch.isValid(), qPrintable(interfaceSearch.errorString())); QVERIFY2(adaptorSearch.isValid(), qPrintable(adaptorSearch.errorString())); - // test both interface and adaptor generation QFETCH_GLOBAL(int, outputMode); - QFETCH_GLOBAL(QString, commandLineArg); - - // Run the tool - const QString binpath = QLibraryInfo::location(QLibraryInfo::BinariesPath); - const QString command = binpath + QLatin1String("/qdbusxml2cpp"); QProcess process; - process.start(command, QStringList() << commandLineArg << "-" << "-N"); - QVERIFY2(process.waitForStarted(), qPrintable(process.errorString())); - - // feed it our XML data - static const char xmlHeader[] = - "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n" - DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE // \n is included - "<node>\n" - " <interface name=\"local.name.is.not.important\">\n" - " <!-- begin data -->\n"; - static const char xmlFooter[] = "\n" - " <!-- end data -->\n" - " </interface>\n" - "</node>\n"; - - process.write(xmlHeader, int(sizeof xmlHeader) - 1); - process.write(xmlSnippet.toLatin1()); - process.write(xmlFooter, int(sizeof xmlFooter) - 1); - while (process.bytesToWrite()) - QVERIFY2(process.waitForBytesWritten(), qPrintable(process.errorString())); - // fprintf(stderr, "%s%s%s", xmlHeader, xmlSnippet.toLatin1().constData(), xmlFooter); - - process.closeWriteChannel(); - QVERIFY2(process.waitForFinished(), qPrintable(process.errorString())); + QStringList flags = {"-", "-N"}; + runTool(process, xmlSnippet.toLatin1(), flags); + if (QTest::currentTestFailed()) return; QByteArray errOutput = process.readAllStandardError(); QVERIFY2(errOutput.isEmpty(), errOutput); @@ -259,6 +339,149 @@ void tst_qdbusxml2cpp::process() QVERIFY2(output.count(adaptorSearch) == 1, qPrintable(adaptorSearch.pattern() + "\nin\n" + output)); } +void tst_qdbusxml2cpp::includeStyle_data() +{ + QTest::addColumn<bool>("isGlobal"); + QTest::addColumn<QByteArray>("expected"); + + QTest::newRow("localInclude") << false << QByteArray("#include \"test.hpp\""); + QTest::newRow("globalInclude") << true << QByteArray("#include <test.hpp>"); +} + +void tst_qdbusxml2cpp::includeStyle() +{ + QFETCH(bool, isGlobal); + QFETCH(QByteArray, expected); + + QProcess process; + QStringList flags = {"-", "-N", (isGlobal ? "-I" : "-i"), "test.hpp"}; + + runTool(process,QByteArray{},flags); + QCOMPARE(process.exitCode(), 0); + + QByteArray errOutput = process.readAllStandardError(); + QVERIFY2(errOutput.isEmpty(), errOutput); + + QByteArray fullOutput = process.readAll(); + QVERIFY(!fullOutput.isEmpty()); + QVERIFY(fullOutput.contains(expected)); +} + +void tst_qdbusxml2cpp::missingAnnotation_data() +{ + QTest::addColumn<QString>("xmlSnippet"); + QTest::addColumn<QString>("annotationName"); + QTest::addColumn<QString>("location"); + + QTest::newRow("property") + << R"(<property type="%1" name="name" access="readwrite"/>)" + << "org.qtproject.QtDBus.QtTypeName" + << "7:2"; + QTest::newRow("method-in") + << R"(<method name="Method"> + <arg type="%1" name="name" direction="in"/> + </method>)" + << "org.qtproject.QtDBus.QtTypeName.In0" + << "8:22"; + QTest::newRow("method-out") + << R"(<method name="Method"> + <arg type="%1" name="name" direction="out"/> + </method>)" + << "org.qtproject.QtDBus.QtTypeName.Out0" + << "8:22"; + QTest::newRow("signal") + << R"(<signal name="Signal"> + <arg type="%1" name="name"/> + </signal>)" + << "org.qtproject.QtDBus.QtTypeName.Out0" + << "8:22"; + QTest::newRow("signal-out") + << R"(<signal name="Signal"> + <arg type="%1" name="name" direction="out"/> + </signal>)" + << "org.qtproject.QtDBus.QtTypeName.Out0" + << "8:22"; +} + +void tst_qdbusxml2cpp::missingAnnotation() +{ + QFETCH(QString, xmlSnippet); + QFETCH(QString, annotationName); + QFETCH(QString, location); + + QString type = "(ii)"; + QProcess process; + QStringList flags = {"-", "-N"}; + runTool(process, xmlSnippet.arg(type).toLatin1(),flags); + if (QTest::currentTestFailed()) return; + + // it must have failed + QString errOutput = QString::fromLatin1(process.readAllStandardError().trimmed()); + QCOMPARE(process.exitCode(), 1); + QCOMPARE(process.readAllStandardOutput(), QByteArray()); + QVERIFY(!errOutput.isEmpty()); + + // check it did suggest the right annotation + QString expected = R"(<standard input>:%3: error: unknown type `%1' +<standard input>:%3: note: you should add <annotation name="%2" value="<type>"/>)"; + expected = expected.arg(type, annotationName, location); + QCOMPARE(errOutput, expected); +} + +void tst_qdbusxml2cpp::includeMoc_data() +{ + QTest::addColumn<QString>("filenames"); + QTest::addColumn<QByteArray>("expected"); + QTest::addColumn<QByteArray>("warning"); + + QTest::newRow("combined-h") << "foo.h" << QByteArray("#include \"foo.moc\"") << QByteArray(""); + QTest::newRow("combined-cpp") << "foo.cpp" << QByteArray("#include \"foo.moc\"") << QByteArray(""); + QTest::newRow("combined-cc") << "foo.cc" << QByteArray("#include \"foo.moc\"") << QByteArray(""); + QTest::newRow("without extension") << "foo" << QByteArray("#include \"moc_foo.cpp\"") << QByteArray(""); + QTest::newRow("cpp-only") << ":foo.cpp" << QByteArray("#include \"moc_foo.cpp\"") + << QByteArray("warning: no header name is provided, assuming it to be \"foo.h\""); + QTest::newRow("header-and-cpp") << "foo_h.h:foo.cpp" << QByteArray("#include \"moc_foo_h.cpp\"") << QByteArray(""); + + QTest::newRow("combined-cpp with dots") << "foo.bar.cpp" << QByteArray("#include \"foo.bar.moc\"") << QByteArray(""); + QTest::newRow("without extension with dots") << "foo.bar" << QByteArray("#include \"moc_foo.bar.cpp\"") << QByteArray(""); + QTest::newRow("header-and-cpp with dots") << "foo.bar_h.h:foo.bar.cpp" << QByteArray("#include \"moc_foo.bar_h.cpp\"") << QByteArray(""); +} + +void tst_qdbusxml2cpp::includeMoc() +{ + QFETCH(QString, filenames); + QFETCH(QByteArray, expected); + QFETCH(QByteArray, warning); + + QProcess process; + QStringList flags = {filenames, "--moc"}; + runTool(process,QByteArray{},flags); + QByteArray errOutput = process.readAllStandardError(); + QVERIFY(errOutput.startsWith(warning)); + QCOMPARE(process.exitCode(), 0); + + QStringList parts = filenames.split(u':'); + QFileInfo first{parts.first()}; + + const bool firstHasSuffix = QStringList({"h", "cpp", "cc"}).contains(first.suffix()); + + if ((parts.size() == 1) && firstHasSuffix) { + checkOneFile(parts.first(), expected); + } else if ((parts.size() == 1) && (!firstHasSuffix)) { + QString headerName{parts.first()}; + headerName += ".h"; + QString sourceName{parts.first()}; + sourceName += ".cpp"; + + checkTwoFiles(headerName, sourceName, expected); + } else if ((parts.size() == 2) && (parts.first().isEmpty())) { + checkOneFile(parts.last(), expected); + } + else if ((parts.size() == 2) && !parts.first().isEmpty() && !parts.last().isEmpty()) { + checkTwoFiles(parts.first(), parts.last(), expected); + } +} + QTEST_MAIN(tst_qdbusxml2cpp) #include "tst_qdbusxml2cpp.moc" diff --git a/tests/auto/tools/qmake/CMakeLists.txt b/tests/auto/tools/qmake/CMakeLists.txt new file mode 100644 index 0000000000..8fe0566baa --- /dev/null +++ b/tests/auto/tools/qmake/CMakeLists.txt @@ -0,0 +1,40 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qmake LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + +# Collect test data +file(GLOB_RECURSE test_data_glob + RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} + testdata/*) +list(APPEND test_data ${test_data_glob}) + +qt_internal_add_test(tst_qmake + SOURCES + testcompiler.cpp testcompiler.h + tst_qmake.cpp + TESTDATA ${test_data} +) + +set(dependencies + Qt::moc + Qt::qmake +) +if(TARGET Qt::Gui) + list(APPEND dependencies Qt::Gui) +endif() +if(TARGET Qt::Widgets) + list(APPEND dependencies Qt::Widgets) +endif() +if(TARGET Qt::rcc) + list(APPEND dependencies Qt::rcc) +endif() +if(TARGET Qt::uic) + list(APPEND dependencies Qt::uic) +endif() +# Add dependencies that are implicitly used inside the test +add_dependencies(tst_qmake ${dependencies}) diff --git a/tests/auto/tools/qmake/qmake.pro b/tests/auto/tools/qmake/qmake.pro deleted file mode 100644 index ac52fb81fa..0000000000 --- a/tests/auto/tools/qmake/qmake.pro +++ /dev/null @@ -1,17 +0,0 @@ -CONFIG += testcase -# Allow more time since examples are compiled, which may take longer on Windows. -win32:testcase.timeout=900 -TARGET = tst_qmake -HEADERS += testcompiler.h -SOURCES += tst_qmake.cpp testcompiler.cpp -QT = core testlib - -cross_compile: DEFINES += QMAKE_CROSS_COMPILED -debug_and_release { - CONFIG(debug, debug|release): \ - DEFINES += DEBUG_BUILD - else: \ - DEFINES += RELEASE_BUILD -} - -TESTDATA += testdata/* diff --git a/tests/auto/tools/qmake/testcompiler.cpp b/tests/auto/tools/qmake/testcompiler.cpp index 0a7ba3b40b..23d9b76187 100644 --- a/tests/auto/tools/qmake/testcompiler.cpp +++ b/tests/auto/tools/qmake/testcompiler.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "testcompiler.h" @@ -129,7 +104,8 @@ static inline QStringList systemEnvironment() #ifdef Q_OS_WIN static QStringList result; if (result.isEmpty()) { - foreach (const QString &variable, QProcess::systemEnvironment()) { + const auto env = QProcess::systemEnvironment(); + for (const QString &variable : env) { if (variable.startsWith(QStringLiteral("MAKEFLAGS="), Qt::CaseInsensitive)) { qWarning("Removing environment setting '%s'", qPrintable(variable)); } else { @@ -148,7 +124,7 @@ bool TestCompiler::runCommand(const QString &cmd, const QStringList &args, bool QString dbg = cmd; if (dbg.contains(' ')) dbg.prepend('"').append('"'); - foreach (QString arg, args) { + for (QString arg : args) { if (arg.contains(' ')) arg.prepend('"').append('"'); dbg.append(' ').append(arg); @@ -164,15 +140,17 @@ bool TestCompiler::runCommand(const QString &cmd, const QStringList &args, bool return errorOut(); } - child.setReadChannel(QProcess::StandardError); child.waitForFinished(-1); bool ok = child.exitStatus() == QProcess::NormalExit && (expectFail ^ (child.exitCode() == 0)); - foreach (const QByteArray &output, child.readAllStandardError().split('\n')) { - testOutput_.append(QString::fromLocal8Bit(output)); - - if (output.startsWith("Project MESSAGE: FAILED")) - ok = false; + for (auto channel : { QProcess::StandardOutput, QProcess::StandardError }) { + child.setReadChannel(channel); + while (!child.atEnd()) { + const QString output = QString::fromLocal8Bit(child.readLine()); + if (output.startsWith("Project MESSAGE: FAILED")) + ok = false; + testOutput_.append(output); + } } return ok ? true : errorOut(); @@ -279,14 +257,23 @@ bool TestCompiler::qmake(const QString &workDir, const QString &proName, const Q << additionalArguments); } +bool TestCompiler::qmake(const QString &workDir, const QStringList &arguments) +{ + QDir d; + d.setCurrent(workDir); // ### runCommand should take a workingDir argument instead + return runCommand(qmakeCmd_, arguments); +} + bool TestCompiler::make( const QString &workPath, const QString &target, bool expectFail ) { QDir D; D.setCurrent( workPath ); QStringList args = makeArgs_; - if (makeCmd_.contains("nmake", Qt::CaseInsensitive)) + if (makeCmd_.contains("nmake", Qt::CaseInsensitive) || + makeCmd_.contains("jom", Qt::CaseInsensitive)) { args << "/NOLOGO"; + } if (!target.isEmpty()) args << target; diff --git a/tests/auto/tools/qmake/testcompiler.h b/tests/auto/tools/qmake/testcompiler.h index 50232669c0..900f05b87a 100644 --- a/tests/auto/tools/qmake/testcompiler.h +++ b/tests/auto/tools/qmake/testcompiler.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef TESTCOMPILER_H #define TESTCOMPILER_H @@ -60,6 +35,8 @@ public: // executes a qmake on proName in the specified workDir, output goes to buildDir or workDir if it's null bool qmake(const QString &workDir, const QString &proName, const QString &buildDir = QString(), const QStringList &additionalArguments = QStringList()); + // executes qmake in workDir with the specified arguments + bool qmake(const QString &workDir, const QStringList &arguments); // executes a make in the specified workPath, with an optional target (eg. install) bool make( const QString &workPath, const QString &target = QString(), bool expectFail = false ); // checks if the executable exists in destDir @@ -71,13 +48,17 @@ public: bool removeProject( const QString &workPath, const QString &project ); // removes the file specified by 'fileName' on the 'workPath' bool removeFile( const QString &workPath, const QString &fileName ); - // returns each line of stdout of the last command append with a "new line" character(s) to suit the platform + + // Returns each line of stdout/stderr of the last commands + // separated by platform-specific line endings. QString commandOutput() const; + // clear the results of storage of stdout for running previous commands void clearCommandOutput(); -private: bool runCommand(const QString &cmd, const QStringList &args, bool expectFail = false); + +private: bool errorOut(); QString makeCmd_; diff --git a/tests/auto/tools/qmake/testdata/conflicting_targets/conflicting_targets.pro b/tests/auto/tools/qmake/testdata/conflicting_targets/conflicting_targets.pro new file mode 100644 index 0000000000..bd0d4d824a --- /dev/null +++ b/tests/auto/tools/qmake/testdata/conflicting_targets/conflicting_targets.pro @@ -0,0 +1,5 @@ +TEMPLATE = app +CONFIG += debug_and_release build_all +TARGET = bah +DESTDIR = shu +SOURCES += main.cpp diff --git a/tests/auto/tools/qmake/testdata/conflicting_targets/main.cpp b/tests/auto/tools/qmake/testdata/conflicting_targets/main.cpp new file mode 100644 index 0000000000..39de28135a --- /dev/null +++ b/tests/auto/tools/qmake/testdata/conflicting_targets/main.cpp @@ -0,0 +1,4 @@ +int main(int, char **) +{ + return 0; +} diff --git a/tests/auto/tools/qmake/testdata/findDeps/main.cpp b/tests/auto/tools/qmake/testdata/findDeps/main.cpp index aef383b93b..29c7b2b5f5 100644 --- a/tests/auto/tools/qmake/testdata/findDeps/main.cpp +++ b/tests/auto/tools/qmake/testdata/findDeps/main.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #define spurious \ / #include "needed.cpp" diff --git a/tests/auto/tools/qmake/testdata/findDeps/object1.h b/tests/auto/tools/qmake/testdata/findDeps/object1.h index 804b43be60..02f01d9704 100644 --- a/tests/auto/tools/qmake/testdata/findDeps/object1.h +++ b/tests/auto/tools/qmake/testdata/findDeps/object1.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QObject> diff --git a/tests/auto/tools/qmake/testdata/findDeps/object2.h b/tests/auto/tools/qmake/testdata/findDeps/object2.h index 213be8fa9c..ba976af8e5 100644 --- a/tests/auto/tools/qmake/testdata/findDeps/object2.h +++ b/tests/auto/tools/qmake/testdata/findDeps/object2.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QObject> diff --git a/tests/auto/tools/qmake/testdata/findDeps/object3.h b/tests/auto/tools/qmake/testdata/findDeps/object3.h index db940adb58..55c6c36dc0 100644 --- a/tests/auto/tools/qmake/testdata/findDeps/object3.h +++ b/tests/auto/tools/qmake/testdata/findDeps/object3.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QObject> diff --git a/tests/auto/tools/qmake/testdata/findDeps/object4.h b/tests/auto/tools/qmake/testdata/findDeps/object4.h index c46da036d5..59f4dcbc63 100644 --- a/tests/auto/tools/qmake/testdata/findDeps/object4.h +++ b/tests/auto/tools/qmake/testdata/findDeps/object4.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QObject> diff --git a/tests/auto/tools/qmake/testdata/findDeps/object5.h b/tests/auto/tools/qmake/testdata/findDeps/object5.h index 29405a7010..47531a42fa 100644 --- a/tests/auto/tools/qmake/testdata/findDeps/object5.h +++ b/tests/auto/tools/qmake/testdata/findDeps/object5.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QObject> diff --git a/tests/auto/tools/qmake/testdata/findDeps/object6.h b/tests/auto/tools/qmake/testdata/findDeps/object6.h index 11ae0564f4..85b9e95834 100644 --- a/tests/auto/tools/qmake/testdata/findDeps/object6.h +++ b/tests/auto/tools/qmake/testdata/findDeps/object6.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QObject> diff --git a/tests/auto/tools/qmake/testdata/findDeps/object7.h b/tests/auto/tools/qmake/testdata/findDeps/object7.h index 4c6190d38c..555262bc8e 100644 --- a/tests/auto/tools/qmake/testdata/findDeps/object7.h +++ b/tests/auto/tools/qmake/testdata/findDeps/object7.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QObject> diff --git a/tests/auto/tools/qmake/testdata/findDeps/object8.h b/tests/auto/tools/qmake/testdata/findDeps/object8.h index 6d3f82ee44..f04182e80c 100644 --- a/tests/auto/tools/qmake/testdata/findDeps/object8.h +++ b/tests/auto/tools/qmake/testdata/findDeps/object8.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QObject> diff --git a/tests/auto/tools/qmake/testdata/findDeps/object9.h b/tests/auto/tools/qmake/testdata/findDeps/object9.h index 3fab5b9078..36722add4e 100644 --- a/tests/auto/tools/qmake/testdata/findDeps/object9.h +++ b/tests/auto/tools/qmake/testdata/findDeps/object9.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QObject> diff --git a/tests/auto/tools/qmake/testdata/findDeps/objecta.h b/tests/auto/tools/qmake/testdata/findDeps/objecta.h index 1e5d984748..f563e27e29 100644 --- a/tests/auto/tools/qmake/testdata/findDeps/objecta.h +++ b/tests/auto/tools/qmake/testdata/findDeps/objecta.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QObject> diff --git a/tests/auto/tools/qmake/testdata/findDeps/objectf.h b/tests/auto/tools/qmake/testdata/findDeps/objectf.h index 5f5f26b341..601c22aad6 100644 --- a/tests/auto/tools/qmake/testdata/findDeps/objectf.h +++ b/tests/auto/tools/qmake/testdata/findDeps/objectf.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QObject> diff --git a/tests/auto/tools/qmake/testdata/findMocs/digitseparated.h b/tests/auto/tools/qmake/testdata/findMocs/digitseparated.h new file mode 100644 index 0000000000..ddedac26e3 --- /dev/null +++ b/tests/auto/tools/qmake/testdata/findMocs/digitseparated.h @@ -0,0 +1,8 @@ +#include <QObject> + +class AfterDigitSeparator : public QObject +{ + Q_OBJECT +public: + AfterDigitSeparator() : QObject(nullptr) {} +}; diff --git a/tests/auto/tools/qmake/testdata/findMocs/findMocs.pro b/tests/auto/tools/qmake/testdata/findMocs/findMocs.pro index af672c2621..de2fdff3d2 100644 --- a/tests/auto/tools/qmake/testdata/findMocs/findMocs.pro +++ b/tests/auto/tools/qmake/testdata/findMocs/findMocs.pro @@ -1,5 +1,6 @@ DESTDIR = ./ HEADERS += object1.h object2.h object3.h object4.h \ - object5.h object6.h object7.h object8.h object9.h + object5.h object6.h object7.h object8.h object9.h \ + digitseparated.h SOURCES += main.cpp diff --git a/tests/auto/tools/qmake/testdata/findMocs/main.cpp b/tests/auto/tools/qmake/testdata/findMocs/main.cpp index f5d3587fb5..6ee2d2f5e2 100644 --- a/tests/auto/tools/qmake/testdata/findMocs/main.cpp +++ b/tests/auto/tools/qmake/testdata/findMocs/main.cpp @@ -1,31 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ - +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <moc_object1.cpp> #include <moc_object2.cpp> @@ -37,4 +11,9 @@ #include "object8.h" #include <moc_object9.cpp> -int main() { return 0; } +int main() { return 0'000; } +/* Included *after* the use of a numeric literal with an *odd* number of digit + separator tick marks in it (and no subsequent apostrophe to end the + "single-quoted character literal" that the old parser though it was thus left + in). */ +#include <moc_digitseparated.cpp> diff --git a/tests/auto/tools/qmake/testdata/findMocs/object1.h b/tests/auto/tools/qmake/testdata/findMocs/object1.h index cac0ebf2fd..4d3900e642 100644 --- a/tests/auto/tools/qmake/testdata/findMocs/object1.h +++ b/tests/auto/tools/qmake/testdata/findMocs/object1.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only /**//*'*/ diff --git a/tests/auto/tools/qmake/testdata/findMocs/object2.h b/tests/auto/tools/qmake/testdata/findMocs/object2.h index 5cbcabd4b5..b76cd54c87 100644 --- a/tests/auto/tools/qmake/testdata/findMocs/object2.h +++ b/tests/auto/tools/qmake/testdata/findMocs/object2.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only /**//*"*/ #include <QObject> diff --git a/tests/auto/tools/qmake/testdata/findMocs/object3.h b/tests/auto/tools/qmake/testdata/findMocs/object3.h index cc84ed8c43..c8df2143b8 100644 --- a/tests/auto/tools/qmake/testdata/findMocs/object3.h +++ b/tests/auto/tools/qmake/testdata/findMocs/object3.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only /* */ diff --git a/tests/auto/tools/qmake/testdata/findMocs/object4.h b/tests/auto/tools/qmake/testdata/findMocs/object4.h index 8377869759..17c732ca65 100644 --- a/tests/auto/tools/qmake/testdata/findMocs/object4.h +++ b/tests/auto/tools/qmake/testdata/findMocs/object4.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QObject> diff --git a/tests/auto/tools/qmake/testdata/findMocs/object5.h b/tests/auto/tools/qmake/testdata/findMocs/object5.h index 6cadc77b57..673a87be3a 100644 --- a/tests/auto/tools/qmake/testdata/findMocs/object5.h +++ b/tests/auto/tools/qmake/testdata/findMocs/object5.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QObject> diff --git a/tests/auto/tools/qmake/testdata/findMocs/object6.h b/tests/auto/tools/qmake/testdata/findMocs/object6.h index 4de8a48c5b..ecfaed7d46 100644 --- a/tests/auto/tools/qmake/testdata/findMocs/object6.h +++ b/tests/auto/tools/qmake/testdata/findMocs/object6.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only /**//*'*/ #include <QObject> diff --git a/tests/auto/tools/qmake/testdata/findMocs/object7.h b/tests/auto/tools/qmake/testdata/findMocs/object7.h index 9784ae265d..e3dbb04706 100644 --- a/tests/auto/tools/qmake/testdata/findMocs/object7.h +++ b/tests/auto/tools/qmake/testdata/findMocs/object7.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only /**//*'*/ #include <QObject> diff --git a/tests/auto/tools/qmake/testdata/findMocs/object8.h b/tests/auto/tools/qmake/testdata/findMocs/object8.h index 3fd9debba6..95a868ce4f 100644 --- a/tests/auto/tools/qmake/testdata/findMocs/object8.h +++ b/tests/auto/tools/qmake/testdata/findMocs/object8.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QObject> diff --git a/tests/auto/tools/qmake/testdata/findMocs/object9.h b/tests/auto/tools/qmake/testdata/findMocs/object9.h index b7f38ea5e0..8d02ec33a4 100644 --- a/tests/auto/tools/qmake/testdata/findMocs/object9.h +++ b/tests/auto/tools/qmake/testdata/findMocs/object9.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QObject> diff --git a/tests/auto/tools/qmake/testdata/include_dir/main.cpp b/tests/auto/tools/qmake/testdata/include_dir/main.cpp index 0335d0f301..097515cbce 100644 --- a/tests/auto/tools/qmake/testdata/include_dir/main.cpp +++ b/tests/auto/tools/qmake/testdata/include_dir/main.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "test_file.h" diff --git a/tests/auto/tools/qmake/testdata/include_dir/test_file.cpp b/tests/auto/tools/qmake/testdata/include_dir/test_file.cpp index fd81ed9219..ca5590caf6 100644 --- a/tests/auto/tools/qmake/testdata/include_dir/test_file.cpp +++ b/tests/auto/tools/qmake/testdata/include_dir/test_file.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "test_file.h" diff --git a/tests/auto/tools/qmake/testdata/include_dir/test_file.h b/tests/auto/tools/qmake/testdata/include_dir/test_file.h index 7c29ef6896..8c9e6a47ac 100644 --- a/tests/auto/tools/qmake/testdata/include_dir/test_file.h +++ b/tests/auto/tools/qmake/testdata/include_dir/test_file.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <qwidget.h> #include "ui_untitled.h" diff --git a/tests/auto/tools/qmake/testdata/install_depends/main.cpp b/tests/auto/tools/qmake/testdata/install_depends/main.cpp index c764f8a438..cc3fa6b840 100644 --- a/tests/auto/tools/qmake/testdata/install_depends/main.cpp +++ b/tests/auto/tools/qmake/testdata/install_depends/main.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "test_file.h" diff --git a/tests/auto/tools/qmake/testdata/install_depends/test_file.cpp b/tests/auto/tools/qmake/testdata/install_depends/test_file.cpp index 8b5ab8f0ca..2a582f81fb 100644 --- a/tests/auto/tools/qmake/testdata/install_depends/test_file.cpp +++ b/tests/auto/tools/qmake/testdata/install_depends/test_file.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "test_file.h" diff --git a/tests/auto/tools/qmake/testdata/install_depends/test_file.h b/tests/auto/tools/qmake/testdata/install_depends/test_file.h index 82cb861345..e9a1ad4e01 100644 --- a/tests/auto/tools/qmake/testdata/install_depends/test_file.h +++ b/tests/auto/tools/qmake/testdata/install_depends/test_file.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <qobject.h> class SomeObject : public QObject diff --git a/tests/auto/tools/qmake/testdata/one_space/main.cpp b/tests/auto/tools/qmake/testdata/one_space/main.cpp index 236f348e94..1066d2d927 100644 --- a/tests/auto/tools/qmake/testdata/one_space/main.cpp +++ b/tests/auto/tools/qmake/testdata/one_space/main.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only diff --git a/tests/auto/tools/qmake/testdata/project/main.cpp b/tests/auto/tools/qmake/testdata/project/main.cpp index 38f74f50f1..1e7c54bd4e 100644 --- a/tests/auto/tools/qmake/testdata/project/main.cpp +++ b/tests/auto/tools/qmake/testdata/project/main.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "test_file.h" #include <qguiapplication.h> diff --git a/tests/auto/tools/qmake/testdata/project/test_file.cpp b/tests/auto/tools/qmake/testdata/project/test_file.cpp index f4787c63e6..44f74d5e61 100644 --- a/tests/auto/tools/qmake/testdata/project/test_file.cpp +++ b/tests/auto/tools/qmake/testdata/project/test_file.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "test_file.h" diff --git a/tests/auto/tools/qmake/testdata/project/test_file.h b/tests/auto/tools/qmake/testdata/project/test_file.h index c10ecf3493..3a3d6b4e80 100644 --- a/tests/auto/tools/qmake/testdata/project/test_file.h +++ b/tests/auto/tools/qmake/testdata/project/test_file.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <qobject.h> diff --git a/tests/auto/tools/qmake/testdata/quotedfilenames/main.cpp b/tests/auto/tools/qmake/testdata/quotedfilenames/main.cpp index 8730943e63..9604c17b9e 100644 --- a/tests/auto/tools/qmake/testdata/quotedfilenames/main.cpp +++ b/tests/auto/tools/qmake/testdata/quotedfilenames/main.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <header.h> diff --git a/tests/auto/tools/qmake/testdata/quotedfilenames/quotedfilenames.pro b/tests/auto/tools/qmake/testdata/quotedfilenames/quotedfilenames.pro index a4d20cc0f5..269014cc88 100644 --- a/tests/auto/tools/qmake/testdata/quotedfilenames/quotedfilenames.pro +++ b/tests/auto/tools/qmake/testdata/quotedfilenames/quotedfilenames.pro @@ -9,7 +9,7 @@ INCLUDEPATH += "include folder" RCCINPUT = "rc folder/test.qrc" RCCOUTPUT = "cpp folder/test.cpp" -qtPrepareTool(QMAKE_RCC, rcc) +qtPrepareLibExecTool(QMAKE_RCC, rcc) rcc_test.commands = $$QMAKE_RCC -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_IN} rcc_test.output = $$RCCOUTPUT diff --git a/tests/auto/tools/qmake/testdata/rawString/main.cpp b/tests/auto/tools/qmake/testdata/rawString/main.cpp index bc557f39f8..f43be64c83 100644 --- a/tests/auto/tools/qmake/testdata/rawString/main.cpp +++ b/tests/auto/tools/qmake/testdata/rawString/main.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only // macro names that *aren't* string-literal-prefixes: #define Ru8 "rue-it" diff --git a/tests/auto/tools/qmake/testdata/rawString/object1.h b/tests/auto/tools/qmake/testdata/rawString/object1.h index f7829bfdc4..77be17601b 100644 --- a/tests/auto/tools/qmake/testdata/rawString/object1.h +++ b/tests/auto/tools/qmake/testdata/rawString/object1.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #define rawstring R"blah(lorem " ipsum /*)blah"; #include <QObject> diff --git a/tests/auto/tools/qmake/testdata/rawString/object2.h b/tests/auto/tools/qmake/testdata/rawString/object2.h index d29f0c72ec..643f7035b2 100644 --- a/tests/auto/tools/qmake/testdata/rawString/object2.h +++ b/tests/auto/tools/qmake/testdata/rawString/object2.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2017 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: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$ -** -****************************************************************************/ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef TEST_QMAKE_RAWSTRING_OBJECT2_H #define TEST_QMAKE_RAWSTRING_OBJECT2_H diff --git a/tests/auto/tools/qmake/testdata/resources/main.cpp b/tests/auto/tools/qmake/testdata/resources/main.cpp index 236f348e94..1066d2d927 100644 --- a/tests/auto/tools/qmake/testdata/resources/main.cpp +++ b/tests/auto/tools/qmake/testdata/resources/main.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only diff --git a/tests/auto/tools/qmake/testdata/resources/resources.pro b/tests/auto/tools/qmake/testdata/resources/resources.pro index f024fe5617..8ced5048ae 100644 --- a/tests/auto/tools/qmake/testdata/resources/resources.pro +++ b/tests/auto/tools/qmake/testdata/resources/resources.pro @@ -1,4 +1,5 @@ TEMPLATE = app +CONFIG -= debug_and_release SOURCES = main.cpp pro_file.files = resources.pro diff --git a/tests/auto/tools/qmake/testdata/shadow_files/main.cpp b/tests/auto/tools/qmake/testdata/shadow_files/main.cpp index c764f8a438..cc3fa6b840 100644 --- a/tests/auto/tools/qmake/testdata/shadow_files/main.cpp +++ b/tests/auto/tools/qmake/testdata/shadow_files/main.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "test_file.h" diff --git a/tests/auto/tools/qmake/testdata/shadow_files/test_file.cpp b/tests/auto/tools/qmake/testdata/shadow_files/test_file.cpp index 8b5ab8f0ca..2a582f81fb 100644 --- a/tests/auto/tools/qmake/testdata/shadow_files/test_file.cpp +++ b/tests/auto/tools/qmake/testdata/shadow_files/test_file.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "test_file.h" diff --git a/tests/auto/tools/qmake/testdata/shadow_files/test_file.h b/tests/auto/tools/qmake/testdata/shadow_files/test_file.h index 82cb861345..e9a1ad4e01 100644 --- a/tests/auto/tools/qmake/testdata/shadow_files/test_file.h +++ b/tests/auto/tools/qmake/testdata/shadow_files/test_file.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <qobject.h> class SomeObject : public QObject diff --git a/tests/auto/tools/qmake/testdata/simple_app/main.cpp b/tests/auto/tools/qmake/testdata/simple_app/main.cpp index adf5d7e58e..95af1cc2a6 100644 --- a/tests/auto/tools/qmake/testdata/simple_app/main.cpp +++ b/tests/auto/tools/qmake/testdata/simple_app/main.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only diff --git a/tests/auto/tools/qmake/testdata/simple_app/test_file.cpp b/tests/auto/tools/qmake/testdata/simple_app/test_file.cpp index 8b5ab8f0ca..2a582f81fb 100644 --- a/tests/auto/tools/qmake/testdata/simple_app/test_file.cpp +++ b/tests/auto/tools/qmake/testdata/simple_app/test_file.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "test_file.h" diff --git a/tests/auto/tools/qmake/testdata/simple_app/test_file.h b/tests/auto/tools/qmake/testdata/simple_app/test_file.h index 82cb861345..e9a1ad4e01 100644 --- a/tests/auto/tools/qmake/testdata/simple_app/test_file.h +++ b/tests/auto/tools/qmake/testdata/simple_app/test_file.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <qobject.h> class SomeObject : public QObject diff --git a/tests/auto/tools/qmake/testdata/simple_dll/simple.cpp b/tests/auto/tools/qmake/testdata/simple_dll/simple.cpp index e0a4d1cfe9..4fb8aa6553 100644 --- a/tests/auto/tools/qmake/testdata/simple_dll/simple.cpp +++ b/tests/auto/tools/qmake/testdata/simple_dll/simple.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "simple.h" diff --git a/tests/auto/tools/qmake/testdata/simple_dll/simple.h b/tests/auto/tools/qmake/testdata/simple_dll/simple.h index 632bdcea3f..5c328a239b 100644 --- a/tests/auto/tools/qmake/testdata/simple_dll/simple.h +++ b/tests/auto/tools/qmake/testdata/simple_dll/simple.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef SIMPLE_H #define SIMPLE_H diff --git a/tests/auto/tools/qmake/testdata/simple_lib/simple.cpp b/tests/auto/tools/qmake/testdata/simple_lib/simple.cpp index e0a4d1cfe9..4fb8aa6553 100644 --- a/tests/auto/tools/qmake/testdata/simple_lib/simple.cpp +++ b/tests/auto/tools/qmake/testdata/simple_lib/simple.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "simple.h" diff --git a/tests/auto/tools/qmake/testdata/simple_lib/simple.h b/tests/auto/tools/qmake/testdata/simple_lib/simple.h index 99a07614ee..11ddec6b5d 100644 --- a/tests/auto/tools/qmake/testdata/simple_lib/simple.h +++ b/tests/auto/tools/qmake/testdata/simple_lib/simple.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef SIMPLE_H #define SIMPLE_H diff --git a/tests/auto/tools/qmake/testdata/subdir_via_pro_file_extra_target/simple/main.cpp b/tests/auto/tools/qmake/testdata/subdir_via_pro_file_extra_target/simple/main.cpp index 9f75c9f4d9..a6381d9792 100644 --- a/tests/auto/tools/qmake/testdata/subdir_via_pro_file_extra_target/simple/main.cpp +++ b/tests/auto/tools/qmake/testdata/subdir_via_pro_file_extra_target/simple/main.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only int main(int,char**) diff --git a/tests/auto/tools/qmake/testdata/subdirs/simple_app/main.cpp b/tests/auto/tools/qmake/testdata/subdirs/simple_app/main.cpp index e2b6514f9f..29b5e4b059 100644 --- a/tests/auto/tools/qmake/testdata/subdirs/simple_app/main.cpp +++ b/tests/auto/tools/qmake/testdata/subdirs/simple_app/main.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <simple.h> diff --git a/tests/auto/tools/qmake/testdata/subdirs/simple_app/test_file.cpp b/tests/auto/tools/qmake/testdata/subdirs/simple_app/test_file.cpp index 8b5ab8f0ca..2a582f81fb 100644 --- a/tests/auto/tools/qmake/testdata/subdirs/simple_app/test_file.cpp +++ b/tests/auto/tools/qmake/testdata/subdirs/simple_app/test_file.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "test_file.h" diff --git a/tests/auto/tools/qmake/testdata/subdirs/simple_app/test_file.h b/tests/auto/tools/qmake/testdata/subdirs/simple_app/test_file.h index 82cb861345..e9a1ad4e01 100644 --- a/tests/auto/tools/qmake/testdata/subdirs/simple_app/test_file.h +++ b/tests/auto/tools/qmake/testdata/subdirs/simple_app/test_file.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <qobject.h> class SomeObject : public QObject diff --git a/tests/auto/tools/qmake/testdata/subdirs/simple_dll/simple.cpp b/tests/auto/tools/qmake/testdata/subdirs/simple_dll/simple.cpp index e0a4d1cfe9..4fb8aa6553 100644 --- a/tests/auto/tools/qmake/testdata/subdirs/simple_dll/simple.cpp +++ b/tests/auto/tools/qmake/testdata/subdirs/simple_dll/simple.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "simple.h" diff --git a/tests/auto/tools/qmake/testdata/subdirs/simple_dll/simple.h b/tests/auto/tools/qmake/testdata/subdirs/simple_dll/simple.h index f1bd405897..04033b6b85 100644 --- a/tests/auto/tools/qmake/testdata/subdirs/simple_dll/simple.h +++ b/tests/auto/tools/qmake/testdata/subdirs/simple_dll/simple.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef SIMPLE_H #define SIMPLE_H diff --git a/tests/auto/tools/qmake/testdata/windows_resources/inter.inc b/tests/auto/tools/qmake/testdata/windows_resources/inter.inc new file mode 100644 index 0000000000..0c2594214e --- /dev/null +++ b/tests/auto/tools/qmake/testdata/windows_resources/inter.inc @@ -0,0 +1 @@ +#include "version.inc" diff --git a/tests/auto/tools/qmake/testdata/windows_resources/main.cpp b/tests/auto/tools/qmake/testdata/windows_resources/main.cpp new file mode 100644 index 0000000000..237c8ce181 --- /dev/null +++ b/tests/auto/tools/qmake/testdata/windows_resources/main.cpp @@ -0,0 +1 @@ +int main() {} diff --git a/tests/auto/tools/qmake/testdata/windows_resources/version.inc b/tests/auto/tools/qmake/testdata/windows_resources/version.inc new file mode 100644 index 0000000000..b797c9acce --- /dev/null +++ b/tests/auto/tools/qmake/testdata/windows_resources/version.inc @@ -0,0 +1,28 @@ +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,0,0,0 + PRODUCTVERSION 1,0,0,0 + FILEFLAGS 0x0L + FILEFLAGSMASK 0x3fL + FILEOS 0x00040004L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "000004b0" + BEGIN + VALUE "CompanyName", "The Qt Company Ltd" + VALUE "FileDescription", "A Good File" + VALUE "FileVersion", "1.0.0.0" + VALUE "LegalCopyright", "Copyright (C) 2019 The Qt Company Ltd." + VALUE "InternalName", "foo" + VALUE "OriginalFilename", "foo.exe" + VALUE "ProductName", "A Good Product" + VALUE "ProductVersion", "1.0.0.0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0, 1200 + END +END diff --git a/tests/auto/tools/qmake/testdata/windows_resources/windows_resources.pro b/tests/auto/tools/qmake/testdata/windows_resources/windows_resources.pro new file mode 100644 index 0000000000..80a5e5c19a --- /dev/null +++ b/tests/auto/tools/qmake/testdata/windows_resources/windows_resources.pro @@ -0,0 +1,4 @@ +QT = core +SOURCES = main.cpp +RC_FILE = windows_resources.rc +TEMPLATE = app diff --git a/tests/auto/tools/qmake/testdata/windows_resources/windows_resources.rc b/tests/auto/tools/qmake/testdata/windows_resources/windows_resources.rc new file mode 100644 index 0000000000..4df652de35 --- /dev/null +++ b/tests/auto/tools/qmake/testdata/windows_resources/windows_resources.rc @@ -0,0 +1,2 @@ +#include "winver.h" +#include "inter.inc" diff --git a/tests/auto/tools/qmake/tst_qmake.cpp b/tests/auto/tools/qmake/tst_qmake.cpp index cacee30c86..a32b4ab228 100644 --- a/tests/auto/tools/qmake/tst_qmake.cpp +++ b/tests/auto/tools/qmake/tst_qmake.cpp @@ -1,48 +1,18 @@ -/**************************************************************************** -** -** 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> +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#include <QTest> #include "testcompiler.h" #include <QDir> #include <QDirIterator> #include <QObject> +#include <QRegularExpression> #include <QStandardPaths> #include <QTemporaryDir> - -#if defined(DEBUG_BUILD) -# define DIR_INFIX "debug/" -#elif defined(RELEASE_BUILD) -# define DIR_INFIX "release/" -#else -# define DIR_INFIX "" -#endif +#include <QLibraryInfo> +#include <QProcessEnvironment> class tst_qmake : public QObject { @@ -75,13 +45,17 @@ private slots: void findMocs(); void findDeps(); void rawString(); -#if defined(Q_OS_MAC) +#if defined(Q_OS_DARWIN) void bundle_spaces(); +#elif defined(Q_OS_WIN) + void windowsResources(); #endif void substitutes(); void project(); void proFileCache(); + void qinstall(); void resources(); + void conflictingTargets(); private: TestCompiler test_compiler; @@ -120,8 +94,17 @@ static void copyDir(const QString &sourceDirPath, const QString &targetDirPath) void tst_qmake::initTestCase() { QVERIFY2(tempWorkDir.isValid(), qPrintable(tempWorkDir.errorString())); - QString binpath = QLibraryInfo::location(QLibraryInfo::BinariesPath); + QString binpath = QLibraryInfo::path(QLibraryInfo::BinariesPath); QString cmd = QString("%1/qmake").arg(binpath); + + // If Qt is cross-compiled with CMake, we might also cross-compile qmake for the device. + // In this case we don't want to use the cross-compiled qmake, but rather the host qmake + // shell wrapper (if it's available). + const QString hostQmake = QString("%1/host-qmake").arg(binpath); + if (QFile::exists(hostQmake)) { + cmd = hostQmake; + } + #ifdef Q_CC_MSVC const QString jom = QStandardPaths::findExecutable(QLatin1String("jom.exe")); if (jom.isEmpty()) { @@ -141,7 +124,7 @@ void tst_qmake::initTestCase() QString testDataPath = QFINDTESTDATA(subProgram); if (!testDataPath.endsWith(subProgram)) QFAIL("Cannot find test data directory."); - testDataPath.chop(subProgram.length() - testDataSubDir.length()); + testDataPath.chop(subProgram.size() - testDataSubDir.size()); QString userWorkDir = qgetenv("TST_QMAKE_BUILD_DIR"); if (userWorkDir.isEmpty()) { @@ -313,6 +296,9 @@ void tst_qmake::subdirs() void tst_qmake::subdir_via_pro_file_extra_target() { + if (QProcessEnvironment::systemEnvironment().contains(QStringLiteral("QT_TEST_RUNNING_IN_CTEST"))) + QSKIP("This test does not run properly when invoked from CTest."); + QString workDir = base_path + "/testdata/subdir_via_pro_file_extra_target"; QDir D; @@ -422,7 +408,7 @@ void tst_qmake::prompt() { #if 0 QProcess qmake; - qmake.setReadChannelMode(QProcess::MergedChannels); + qmake.setProcessChannelMode(QProcess::MergedChannels); qmake.setWorkingDirectory(QLatin1String("testdata/prompt")); qmake.start(QLatin1String("qmake CONFIG-=debug_and_release CONFIG-=debug CONFIG+=release"), QIODevice::Text | QIODevice::ReadWrite); @@ -510,7 +496,8 @@ struct TempFile } }; -#if defined(Q_OS_MAC) +#if defined(Q_OS_DARWIN) + void tst_qmake::bundle_spaces() { QString workDir = base_path + "/testdata/bundle-spaces"; @@ -541,7 +528,34 @@ void tst_qmake::bundle_spaces() QVERIFY( !non_existing_file.exists() ); QVERIFY( test_compiler.removeMakefile(workDir) ); } -#endif // defined(Q_OS_MAC) + +#elif defined(Q_OS_WIN) // defined(Q_OS_DARWIN) + +void tst_qmake::windowsResources() +{ + QString workDir = base_path + "/testdata/windows_resources"; + QVERIFY(test_compiler.qmake(workDir, "windows_resources")); + QVERIFY(test_compiler.make(workDir)); + + // Another "make" must not rebuild the .res file + test_compiler.clearCommandOutput(); + QVERIFY(test_compiler.make(workDir)); + QVERIFY(!test_compiler.commandOutput().contains("windows_resources.rc")); + test_compiler.clearCommandOutput(); + + // Wait a second to make sure we get a new timestamp in the touch below + QTest::qWait(1000); + + // Touch the deepest include of the .rc file + QVERIFY(test_compiler.runCommand("cmd", QStringList{"/c", + "echo.>>" + QDir::toNativeSeparators(workDir + "/version.inc")})); + + // The next "make" must rebuild the .res file + QVERIFY(test_compiler.make(workDir)); + QVERIFY(test_compiler.commandOutput().contains("windows_resources.rc")); +} + +#endif // defined(Q_OS_WIN) void tst_qmake::substitutes() { @@ -588,13 +602,108 @@ void tst_qmake::proFileCache() QVERIFY( test_compiler.qmake( workDir, "pro_file_cache" )); } +void tst_qmake::qinstall() +{ + const QString testName = "qinstall"; + QDir testDataDir = base_path + "/testdata"; + if (testDataDir.exists(testName)) + testDataDir.rmdir(testName); + QVERIFY(testDataDir.mkdir(testName)); + const QString workDir = testDataDir.filePath(testName); + auto qinstall = [&](const QString &src, const QString &dst, bool executable = false) { + QStringList args = {"-install", "qinstall"}; + if (executable) + args << "-exe"; + args << src << dst; + return test_compiler.qmake(workDir, args); + }; + const QFileDevice::Permissions readFlags + = QFileDevice::ReadOwner | QFileDevice::ReadUser + | QFileDevice::ReadGroup | QFileDevice::ReadOther; + const QFileDevice::Permissions writeFlags + = QFileDevice::WriteOwner | QFileDevice::WriteUser + | QFileDevice::WriteGroup | QFileDevice::WriteOther; + const QFileDevice::Permissions exeFlags + = QFileDevice::ExeOwner | QFileDevice::ExeUser + | QFileDevice::ExeGroup | QFileDevice::ExeOther; + + // install a regular file + { + QFileInfo src(testDataDir.filePath("project/main.cpp")); + QFileInfo dst("foo.cpp"); + QVERIFY(qinstall(src.filePath(), dst.filePath())); + QVERIFY(dst.exists()); + QCOMPARE(src.size(), dst.size()); + QVERIFY(dst.permissions() & readFlags); + QVERIFY(dst.permissions() & writeFlags); + QVERIFY(!(dst.permissions() & exeFlags)); + test_compiler.clearCommandOutput(); + } + + // install an executable file + { + const QString mocFilePath = QLibraryInfo::path(QLibraryInfo::LibraryExecutablesPath) + + "/moc" +#ifdef Q_OS_WIN + + ".exe" +#endif + ; + QFileInfo src(mocFilePath); + QVERIFY(src.exists()); + QVERIFY(src.permissions() & exeFlags); + QFileInfo dst("copied_" + src.fileName()); + QVERIFY(qinstall(src.filePath(), dst.filePath(), true)); + QVERIFY(dst.exists()); + QCOMPARE(src.size(), dst.size()); + QVERIFY(dst.permissions() & readFlags); + QVERIFY(dst.permissions() & writeFlags); + QVERIFY(dst.permissions() & exeFlags); + test_compiler.clearCommandOutput(); + } + + // install a read-only file + { + QFile srcfile("foo.cpp"); + QVERIFY(srcfile.setPermissions(srcfile.permissions() & ~writeFlags)); + QFileInfo src(srcfile); + QFileInfo dst("bar.cpp"); + QVERIFY(qinstall(src.filePath(), dst.filePath())); + QVERIFY(dst.exists()); + QCOMPARE(src.size(), dst.size()); + QVERIFY(dst.permissions() & readFlags); + QVERIFY(dst.permissions() & writeFlags); + QVERIFY(!(dst.permissions() & exeFlags)); + test_compiler.clearCommandOutput(); + } + + // install a directory + { + QDir src = testDataDir; + src.cd("project"); + QDir dst("narf"); + QVERIFY(qinstall(src.absolutePath(), dst.absolutePath())); + QCOMPARE(src.entryList(QDir::Files, QDir::Name), dst.entryList(QDir::Files, QDir::Name)); + test_compiler.clearCommandOutput(); + } + + // install a directory with a read-only file + { + QDir src("narf"); + QFile srcfile(src.filePath("main.cpp")); + QVERIFY(srcfile.setPermissions(srcfile.permissions() & ~writeFlags)); + QDir dst("zort"); + QVERIFY(qinstall(src.absolutePath(), dst.absolutePath())); + QCOMPARE(src.entryList(QDir::Files, QDir::Name), dst.entryList(QDir::Files, QDir::Name)); + } +} + void tst_qmake::resources() { QString workDir = base_path + "/testdata/resources"; QVERIFY(test_compiler.qmake(workDir, "resources")); { - QFile qrcFile(workDir + '/' + DIR_INFIX "qmake_pro_file.qrc"); + QFile qrcFile(workDir + '/' + "qmake_pro_file.qrc"); QVERIFY2(qrcFile.exists(), qPrintable(qrcFile.fileName())); QVERIFY(qrcFile.open(QFile::ReadOnly)); QByteArray qrcXml = qrcFile.readAll(); @@ -603,7 +712,7 @@ void tst_qmake::resources() } { - QFile qrcFile(workDir + '/' + DIR_INFIX "qmake_subdir.qrc"); + QFile qrcFile(workDir + '/' + "qmake_subdir.qrc"); QVERIFY(qrcFile.exists()); QVERIFY(qrcFile.open(QFile::ReadOnly)); QByteArray qrcXml = qrcFile.readAll(); @@ -611,7 +720,7 @@ void tst_qmake::resources() } { - QFile qrcFile(workDir + '/' + DIR_INFIX "qmake_qmake_immediate.qrc"); + QFile qrcFile(workDir + '/' + "qmake_qmake_immediate.qrc"); QVERIFY(qrcFile.exists()); QVERIFY(qrcFile.open(QFile::ReadOnly)); QByteArray qrcXml = qrcFile.readAll(); @@ -621,5 +730,18 @@ void tst_qmake::resources() QVERIFY(test_compiler.make(workDir)); } +void tst_qmake::conflictingTargets() +{ + QString workDir = base_path + "/testdata/conflicting_targets"; + QVERIFY(test_compiler.qmake(workDir, "conflicting_targets")); + const QRegularExpression rex("Targets of builds '([^']+)' and '([^']+)' conflict"); + auto match = rex.match(test_compiler.commandOutput()); + QVERIFY(match.hasMatch()); + QStringList builds = { match.captured(1), match.captured(2) }; + std::sort(builds.begin(), builds.end()); + const QStringList expectedBuilds{"Debug", "Release"}; + QCOMPARE(builds, expectedBuilds); +} + QTEST_MAIN(tst_qmake) #include "tst_qmake.moc" diff --git a/tests/auto/tools/qmakelib/CMakeLists.txt b/tests/auto/tools/qmakelib/CMakeLists.txt new file mode 100644 index 0000000000..4c6a1e2a72 --- /dev/null +++ b/tests/auto/tools/qmakelib/CMakeLists.txt @@ -0,0 +1,44 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + +##################################################################### +## tst_qmakelib Test: +##################################################################### + +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qmakelib LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + +qt_internal_add_test(tst_qmakelib + SOURCES + ../../../../qmake/library/ioutils.cpp + ../../../../qmake/library/proitems.cpp + ../../../../qmake/library/qmakebuiltins.cpp + ../../../../qmake/library/qmakeevaluator.cpp + ../../../../qmake/library/qmakeglobals.cpp + ../../../../qmake/library/qmakeparser.cpp + ../../../../qmake/library/qmakevfs.cpp + ../../../../qmake/library/registry.cpp + evaltest.cpp + parsertest.cpp + tst_qmakelib.cpp tst_qmakelib.h + DEFINES + PROEVALUATOR_FULL + PROEVALUATOR_SETENV + PROPARSER_DEBUG + QT_USE_QSTRINGBUILDER + INCLUDE_DIRECTORIES + ../../../../qmake/library + LIBRARIES + Qt::CorePrivate +) + +## Scopes: +##################################################################### + +qt_internal_extend_target(tst_qmakelib CONDITION WIN32 + LIBRARIES + advapi32 +) diff --git a/tests/auto/tools/qmakelib/evaltest.cpp b/tests/auto/tools/qmakelib/evaltest.cpp index 948e2b3121..d36265eb92 100644 --- a/tests/auto/tools/qmakelib/evaltest.cpp +++ b/tests/auto/tools/qmakelib/evaltest.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "tst_qmakelib.h" @@ -2771,7 +2746,7 @@ static QString formatValue(const ProStringList &vals) { QString ret; - foreach (const ProString &str, vals) { + for (const ProString &str : vals) { ret += QLatin1Char(' '); ret += QMakeEvaluator::quoteValue(str); } @@ -2825,7 +2800,7 @@ static bool compareState(QMakeEvaluator *eval, ProFile *out) } ProValueMap::Iterator it; ProValueMap *vmap = eval->findValues(var, &it); - if (value.length() == 1 && value.at(0) == "UNDEF") { + if (value.size() == 1 && value.at(0) == "UNDEF") { if (vmap) { qWarning("Value of %s is incorrect.\n Actual:%s\nExpected: <UNDEFINED>", qPrintable(var.toQString()), @@ -2859,7 +2834,7 @@ void tst_qmakelib::proEval() QString infile = m_indir + "/test.pro"; bool verified = true; QMakeTestHandler handler; - handler.setExpectedMessages(msgs.replace("##:", infile + ':').split('\n', QString::SkipEmptyParts)); + handler.setExpectedMessages(msgs.replace("##:", infile + ':').split('\n', Qt::SkipEmptyParts)); QMakeVfs vfs; ProFileCache cache; QMakeParser parser(&cache, &vfs, &handler); @@ -2869,12 +2844,13 @@ void tst_qmakelib::proEval() globals.environment = m_env; globals.setProperties(m_prop); globals.setDirectories(m_indir, m_outdir); - ProFile *outPro = parser.parsedProBlock(QStringRef(&out), 0, "out", 1, QMakeParser::FullGrammar); + ProFile *outPro = + parser.parsedProBlock(out, 0, "out", 1, QMakeParser::FullGrammar); if (!outPro->isOk()) { qWarning("Expected output is malformed"); verified = false; } - ProFile *pro = parser.parsedProBlock(QStringRef(&in), 0, infile, 1, QMakeParser::FullGrammar); + ProFile *pro = parser.parsedProBlock(in, 0, infile, 1, QMakeParser::FullGrammar); QMakeEvaluator visitor(&globals, &parser, &vfs, &handler); visitor.setOutputDir(m_outdir); #ifdef Q_OS_WIN @@ -2888,9 +2864,9 @@ void tst_qmakelib::proEval() qWarning("Got unexpected message(s)"); verified = false; } - QStringList missingMsgs = handler.expectedMessages(); + const QStringList missingMsgs = handler.expectedMessages(); if (!missingMsgs.isEmpty()) { - foreach (const QString &msg, missingMsgs) + for (const QString &msg : missingMsgs) qWarning("Missing message: %s", qPrintable(msg)); verified = false; } diff --git a/tests/auto/tools/qmakelib/parsertest.cpp b/tests/auto/tools/qmakelib/parsertest.cpp index f736bf38bf..a603f04b73 100644 --- a/tests/auto/tools/qmakelib/parsertest.cpp +++ b/tests/auto/tools/qmakelib/parsertest.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "tst_qmakelib.h" @@ -40,9 +15,9 @@ public: TokenStream &operator<<(ushort n) { ts += QChar(n); return *this; } TokenStream &operator<<(uint n) { ts += QChar(n & 0xffff); ts += QChar(n >> 16); return *this; } - TokenStream &operator<<(const QStringRef &s) { ts += s; return *this; } - TokenStream &operator<<(const ProString &s) { return *this << ushort(s.length()) << s.toQStringRef(); } - TokenStream &operator<<(const ProKey &s) { return *this << s.hash() << s.toString(); } + TokenStream &operator<<(QStringView s) { ts += s; return *this; } + TokenStream &operator<<(const ProString &s) { return *this << ushort(s.length()) << s.toQStringView(); } + TokenStream &operator<<(const ProKey &s) { return *this << uint(s.hash()) << s.toString(); } private: QString ts; @@ -2028,17 +2003,17 @@ void tst_qmakelib::proParser() bool verified = true; QMakeTestHandler handler; - handler.setExpectedMessages(msgs.split('\n', QString::SkipEmptyParts)); + handler.setExpectedMessages(msgs.split('\n', Qt::SkipEmptyParts)); QMakeVfs vfs; QMakeParser parser(0, &vfs, &handler); - ProFile *pro = parser.parsedProBlock(QStringRef(&in), 0, "in", 1, QMakeParser::FullGrammar); + ProFile *pro = parser.parsedProBlock(QStringView{ in }, 0, "in", 1, QMakeParser::FullGrammar); if (handler.printedMessages()) { qWarning("Got unexpected message(s)"); verified = false; } - QStringList missingMsgs = handler.expectedMessages(); + const QStringList missingMsgs = handler.expectedMessages(); if (!missingMsgs.isEmpty()) { - foreach (const QString &msg, missingMsgs) + for (const QString &msg : missingMsgs) qWarning("Missing message: %s", qPrintable(msg)); verified = false; } diff --git a/tests/auto/tools/qmakelib/qmakelib.pro b/tests/auto/tools/qmakelib/qmakelib.pro deleted file mode 100644 index 29f17f6a14..0000000000 --- a/tests/auto/tools/qmakelib/qmakelib.pro +++ /dev/null @@ -1,25 +0,0 @@ -CONFIG += testcase -TARGET = tst_qmakelib -QT = core testlib -win32: LIBS += -ladvapi32 - -INCLUDEPATH += ../../../../qmake/library -VPATH += ../../../../qmake/library - -HEADERS += \ - tst_qmakelib.h - -SOURCES += \ - tst_qmakelib.cpp \ - parsertest.cpp \ - evaltest.cpp \ - ioutils.cpp \ - registry.cpp \ - proitems.cpp \ - qmakevfs.cpp \ - qmakeparser.cpp \ - qmakeglobals.cpp \ - qmakebuiltins.cpp \ - qmakeevaluator.cpp - -DEFINES += PROPARSER_DEBUG PROEVALUATOR_FULL PROEVALUATOR_SETENV diff --git a/tests/auto/tools/qmakelib/tst_qmakelib.cpp b/tests/auto/tools/qmakelib/tst_qmakelib.cpp index 4a4b20fe50..2fdec205c2 100644 --- a/tests/auto/tools/qmakelib/tst_qmakelib.cpp +++ b/tests/auto/tools/qmakelib/tst_qmakelib.cpp @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "tst_qmakelib.h" @@ -56,7 +31,7 @@ void tst_qmakelib::cleanupTestCase() void tst_qmakelib::proString() { - QString qs1(QStringLiteral("this is a string")); + QString qs1(QString::fromUtf8("this is a string")); ProString s1(qs1); QCOMPARE(s1.toQString(), QStringLiteral("this is a string")); @@ -76,13 +51,12 @@ void tst_qmakelib::proString() QCOMPARE(ProString(qs2, 3, 13).trimmed().toQString(), QStringLiteral("spacy string")); QCOMPARE(ProString(qs2, 1, 17).trimmed().toQString(), QStringLiteral("spacy string")); - QVERIFY(s2.toQStringRef().string()->isSharedWith(qs1)); s2.prepend(ProString("there ")); QCOMPARE(s2.toQString(), QStringLiteral("there is a str")); - QVERIFY(!s2.toQStringRef().string()->isSharedWith(qs1)); ProString s3("this is a longish string with bells and whistles"); s3 = s3.mid(18, 17); + QCOMPARE(s3.toQString(), QStringLiteral("string with bells")); // Prepend to detached string with lots of spare space in it. s3.prepend(ProString("another ")); QCOMPARE(s3.toQString(), QStringLiteral("another string with bells")); @@ -129,7 +103,6 @@ void tst_qmakelib::proString() ProString s5; s5.append(sl2); QCOMPARE(s5.toQString(), QStringLiteral("foo")); - QVERIFY(s5.toQStringRef().string()->isSharedWith(*sl2.first().toQStringRef().string())); QCOMPARE(ProString("one") + ProString(" more"), QStringLiteral("one more")); } diff --git a/tests/auto/tools/qmakelib/tst_qmakelib.h b/tests/auto/tools/qmakelib/tst_qmakelib.h index acfeb43ecd..2573dd27f4 100644 --- a/tests/auto/tools/qmakelib/tst_qmakelib.h +++ b/tests/auto/tools/qmakelib/tst_qmakelib.h @@ -1,36 +1,11 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <qmakeevaluator.h> #include <QObject> #include <QProcessEnvironment> -#include <QtTest/QtTest> +#include <QTest> class tst_qmakelib : public QObject { @@ -87,14 +62,14 @@ private: class QMakeTestHandler : public QMakeHandler { public: QMakeTestHandler() : QMakeHandler(), printed(false) {} - virtual void message(int type, const QString &msg, const QString &fileName, int lineNo) + virtual void message(int type, const QString &msg, const QString &fileName, int lineNo) override { print(fileName, lineNo, type, msg); } - virtual void fileMessage(int type, const QString &msg) - { Q_UNUSED(type) doPrint(msg); } + virtual void fileMessage(int type, const QString &msg) override + { Q_UNUSED(type); doPrint(msg); } - virtual void aboutToEval(ProFile *, ProFile *, EvalFileType) {} - virtual void doneWithEval(ProFile *) {} + virtual void aboutToEval(ProFile *, ProFile *, EvalFileType) override {} + virtual void doneWithEval(ProFile *) override {} void setExpectedMessages(const QStringList &msgs) { expected = msgs; } QStringList expectedMessages() const { return expected; } diff --git a/tests/auto/tools/qt_cmake_create/CMakeLists.txt b/tests/auto/tools/qt_cmake_create/CMakeLists.txt new file mode 100644 index 0000000000..7d6c49d141 --- /dev/null +++ b/tests/auto/tools/qt_cmake_create/CMakeLists.txt @@ -0,0 +1,20 @@ +# Copyright (C) 2023 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qt_cmake_create LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + +# Collect test data +file(GLOB_RECURSE test_data_glob + RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} + testdata/*) +list(APPEND test_data ${test_data_glob}) + +qt_internal_add_test(tst_qt_cmake_create + SOURCES + tst_qt_cmake_create.cpp + TESTDATA ${test_data} +) diff --git a/tests/auto/tools/qt_cmake_create/testdata/cpp_project/CMakeLists.txt.expected b/tests/auto/tools/qt_cmake_create/testdata/cpp_project/CMakeLists.txt.expected new file mode 100644 index 0000000000..7e646b722d --- /dev/null +++ b/tests/auto/tools/qt_cmake_create/testdata/cpp_project/CMakeLists.txt.expected @@ -0,0 +1,14 @@ +cmake_minimum_required(VERSION 3.16) +project(cpp_project LANGUAGES CXX) + +find_package(Qt6 REQUIRED COMPONENTS Core) +qt_standard_project_setup() + +qt_add_executable(cpp_project + main.cpp +) + +target_link_libraries(cpp_project + PRIVATE + Qt::Core +) diff --git a/tests/auto/tools/qt_cmake_create/testdata/cpp_project/main.cpp b/tests/auto/tools/qt_cmake_create/testdata/cpp_project/main.cpp new file mode 100644 index 0000000000..ae659d5ed4 --- /dev/null +++ b/tests/auto/tools/qt_cmake_create/testdata/cpp_project/main.cpp @@ -0,0 +1,7 @@ +#include <iostream> + +int main(int, char *[]) +{ + std::cout << "Now I have CMakeLists.txt. Thanks!" << std::endl; + return 0; +} diff --git a/tests/auto/tools/qt_cmake_create/testdata/proto_project/CMakeLists.txt.expected b/tests/auto/tools/qt_cmake_create/testdata/proto_project/CMakeLists.txt.expected new file mode 100644 index 0000000000..1b9ae912b2 --- /dev/null +++ b/tests/auto/tools/qt_cmake_create/testdata/proto_project/CMakeLists.txt.expected @@ -0,0 +1,17 @@ +cmake_minimum_required(VERSION 3.16) +project(proto_project LANGUAGES CXX) + +find_package(Qt6 REQUIRED COMPONENTS Protobuf Grpc) +qt_standard_project_setup() + +qt_add_protobuf(proto_project + GENERATE_PACKAGE_SUBFOLDERS + PROTO_FILES + test.proto +) + +target_link_libraries(proto_project + PRIVATE + Qt::Protobuf + Qt::Grpc +) diff --git a/tests/auto/tools/qt_cmake_create/testdata/proto_project/test.proto b/tests/auto/tools/qt_cmake_create/testdata/proto_project/test.proto new file mode 100644 index 0000000000..e03a5c0832 --- /dev/null +++ b/tests/auto/tools/qt_cmake_create/testdata/proto_project/test.proto @@ -0,0 +1,5 @@ +syntax = "proto3"; + +package test; +message Noop { +} diff --git a/tests/auto/tools/qt_cmake_create/testdata/qml_project/CMakeLists.txt.expected b/tests/auto/tools/qt_cmake_create/testdata/qml_project/CMakeLists.txt.expected new file mode 100644 index 0000000000..1187b0e54a --- /dev/null +++ b/tests/auto/tools/qt_cmake_create/testdata/qml_project/CMakeLists.txt.expected @@ -0,0 +1,27 @@ +cmake_minimum_required(VERSION 3.16) +project(qml_project LANGUAGES CXX) + +find_package(Qt6 REQUIRED COMPONENTS Gui Qml Quick Core) +qt_standard_project_setup() + +qt_add_executable(qml_project + main.cpp +) + +qt_add_qml_module(qml_project + URI qml_project + OUTPUT_DIRECTORY qml + VERSION 1.0 + RESOURCE_PREFIX /qt/qml + QML_FILES + TestComponent.qml + main.qml +) + +target_link_libraries(qml_project + PRIVATE + Qt::Gui + Qt::Qml + Qt::Quick + Qt::Core +) diff --git a/tests/auto/tools/qt_cmake_create/testdata/qml_project/TestComponent.qml b/tests/auto/tools/qt_cmake_create/testdata/qml_project/TestComponent.qml new file mode 100644 index 0000000000..f97cbcf115 --- /dev/null +++ b/tests/auto/tools/qt_cmake_create/testdata/qml_project/TestComponent.qml @@ -0,0 +1,4 @@ +import QtQuick + +Item { +} diff --git a/tests/auto/tools/qt_cmake_create/testdata/qml_project/main.cpp b/tests/auto/tools/qt_cmake_create/testdata/qml_project/main.cpp new file mode 100644 index 0000000000..13c7014d8c --- /dev/null +++ b/tests/auto/tools/qt_cmake_create/testdata/qml_project/main.cpp @@ -0,0 +1,18 @@ +#include <QGuiApplication> +#include <QQmlApplicationEngine> + +int main(int argc, char *argv[]) +{ + QGuiApplication app(argc, argv); + + QQmlApplicationEngine engine; + const QUrl url(QStringLiteral("qrc:/qt/qml/qml_project/main.qml")); + QObject::connect(&engine, &QQmlApplicationEngine::objectCreated, + &app, [url](QObject *obj, const QUrl &objUrl) { + if (!obj && url == objUrl) + QCoreApplication::exit(-1); + }, Qt::QueuedConnection); + engine.load(url); + + return app.exec(); +} diff --git a/tests/auto/tools/qt_cmake_create/testdata/qml_project/main.qml b/tests/auto/tools/qt_cmake_create/testdata/qml_project/main.qml new file mode 100644 index 0000000000..b42c9e7897 --- /dev/null +++ b/tests/auto/tools/qt_cmake_create/testdata/qml_project/main.qml @@ -0,0 +1,16 @@ +import QtQuick +import QtQuick.Window + +Window { + width: 640 + height: 480 + visible: true + title: "Hello World" + Text { + anchors.centerIn: parent + font.pointSize: 16 + text: "Now I have CMakeLists.txt. Thanks!" + } + TestComponent { + } +} diff --git a/tests/auto/tools/qt_cmake_create/testdata/qrc_project/CMakeLists.txt.expected b/tests/auto/tools/qt_cmake_create/testdata/qrc_project/CMakeLists.txt.expected new file mode 100644 index 0000000000..8a595ac3c2 --- /dev/null +++ b/tests/auto/tools/qt_cmake_create/testdata/qrc_project/CMakeLists.txt.expected @@ -0,0 +1,20 @@ +cmake_minimum_required(VERSION 3.16) +project(qrc_project LANGUAGES CXX) + +find_package(Qt6 REQUIRED COMPONENTS Core) +qt_standard_project_setup() + +qt_add_executable(qrc_project + main.cpp +) + +qt_add_resources(qrc_project_resources test.qrc) +target_sources(qrc_project + PRIVATE + ${qrc_project_resources} +) + +target_link_libraries(qrc_project + PRIVATE + Qt::Core +) diff --git a/tests/auto/tools/qt_cmake_create/testdata/qrc_project/main.cpp b/tests/auto/tools/qt_cmake_create/testdata/qrc_project/main.cpp new file mode 100644 index 0000000000..cd8ed8f57b --- /dev/null +++ b/tests/auto/tools/qt_cmake_create/testdata/qrc_project/main.cpp @@ -0,0 +1,13 @@ +#include <QFile> +#include <QDebug> + +int main(int, char **) +{ + QFile file(":/test.txt"); + if (!file.open(QFile::ReadOnly)) + return 1; + + QString data = QString::fromUtf8(file.readAll()); + qDebug() << data; + return 0; +} diff --git a/tests/auto/tools/qt_cmake_create/testdata/qrc_project/test.qrc b/tests/auto/tools/qt_cmake_create/testdata/qrc_project/test.qrc new file mode 100644 index 0000000000..adfe37b52e --- /dev/null +++ b/tests/auto/tools/qt_cmake_create/testdata/qrc_project/test.qrc @@ -0,0 +1,5 @@ +<RCC> + <qresource prefix="/"> + <file>test.txt</file> + </qresource> +</RCC> diff --git a/tests/auto/tools/qt_cmake_create/testdata/qrc_project/test.txt b/tests/auto/tools/qt_cmake_create/testdata/qrc_project/test.txt new file mode 100644 index 0000000000..6c5b215ebe --- /dev/null +++ b/tests/auto/tools/qt_cmake_create/testdata/qrc_project/test.txt @@ -0,0 +1 @@ +Now I have CMakeLists.txt. Thanks! diff --git a/tests/auto/tools/qt_cmake_create/testdata/ui_only_project/widget.ui b/tests/auto/tools/qt_cmake_create/testdata/ui_only_project/widget.ui new file mode 100644 index 0000000000..d2c4f620b1 --- /dev/null +++ b/tests/auto/tools/qt_cmake_create/testdata/ui_only_project/widget.ui @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>Widget</class> + <widget class="QWidget" name="Widget"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>800</width> + <height>600</height> + </rect> + </property> + <property name="windowTitle"> + <string>Widget</string> + </property> + <widget class="QLabel" name="label"> + <property name="geometry"> + <rect> + <x>10</x> + <y>6</y> + <width>781</width> + <height>581</height> + </rect> + </property> + <property name="text"> + <string>Now I have CMakeLists.txt. Thanks!</string> + </property> + </widget> + </widget> + <resources/> + <connections/> +</ui> diff --git a/tests/auto/tools/qt_cmake_create/testdata/ui_project/CMakeLists.txt.expected b/tests/auto/tools/qt_cmake_create/testdata/ui_project/CMakeLists.txt.expected new file mode 100644 index 0000000000..6252b71389 --- /dev/null +++ b/tests/auto/tools/qt_cmake_create/testdata/ui_project/CMakeLists.txt.expected @@ -0,0 +1,23 @@ +cmake_minimum_required(VERSION 3.16) +project(ui_project LANGUAGES CXX) + +find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + +qt_add_executable(ui_project + main.cpp + widget.cpp + widget.h +) + +target_sources(ui_project + PRIVATE + widget.ui +) + +target_link_libraries(ui_project + PRIVATE + Qt::Core + Qt::Gui + Qt::Widgets +) diff --git a/tests/auto/tools/qt_cmake_create/testdata/ui_project/main.cpp b/tests/auto/tools/qt_cmake_create/testdata/ui_project/main.cpp new file mode 100644 index 0000000000..b0a4ec2647 --- /dev/null +++ b/tests/auto/tools/qt_cmake_create/testdata/ui_project/main.cpp @@ -0,0 +1,11 @@ +#include "widget.h" + +#include <QApplication> + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + Widget w; + w.show(); + return a.exec(); +} diff --git a/tests/auto/tools/qt_cmake_create/testdata/ui_project/widget.cpp b/tests/auto/tools/qt_cmake_create/testdata/ui_project/widget.cpp new file mode 100644 index 0000000000..815d5f8c4b --- /dev/null +++ b/tests/auto/tools/qt_cmake_create/testdata/ui_project/widget.cpp @@ -0,0 +1,15 @@ +#include "widget.h" +#include "ui_widget.h" + +Widget::Widget(QWidget *parent) + : QWidget(parent) + , ui(new Ui::Widget) +{ + ui->setupUi(this); +} + +Widget::~Widget() +{ + delete ui; +} + diff --git a/tests/auto/tools/qt_cmake_create/testdata/ui_project/widget.h b/tests/auto/tools/qt_cmake_create/testdata/ui_project/widget.h new file mode 100644 index 0000000000..1fe2322b13 --- /dev/null +++ b/tests/auto/tools/qt_cmake_create/testdata/ui_project/widget.h @@ -0,0 +1,21 @@ +#ifndef WIDGET_H +#define WIDGET_H + +#include <QWidget> + +QT_BEGIN_NAMESPACE +namespace Ui { class Widget; } +QT_END_NAMESPACE + +class Widget : public QWidget +{ + Q_OBJECT + +public: + Widget(QWidget *parent = nullptr); + ~Widget(); + +private: + Ui::Widget *ui; +}; +#endif // WIDGET_H diff --git a/tests/auto/tools/qt_cmake_create/testdata/ui_project/widget.ui b/tests/auto/tools/qt_cmake_create/testdata/ui_project/widget.ui new file mode 100644 index 0000000000..d2c4f620b1 --- /dev/null +++ b/tests/auto/tools/qt_cmake_create/testdata/ui_project/widget.ui @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>Widget</class> + <widget class="QWidget" name="Widget"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>800</width> + <height>600</height> + </rect> + </property> + <property name="windowTitle"> + <string>Widget</string> + </property> + <widget class="QLabel" name="label"> + <property name="geometry"> + <rect> + <x>10</x> + <y>6</y> + <width>781</width> + <height>581</height> + </rect> + </property> + <property name="text"> + <string>Now I have CMakeLists.txt. Thanks!</string> + </property> + </widget> + </widget> + <resources/> + <connections/> +</ui> diff --git a/tests/auto/tools/qt_cmake_create/tst_qt_cmake_create.cpp b/tests/auto/tools/qt_cmake_create/tst_qt_cmake_create.cpp new file mode 100644 index 0000000000..6bbc58ef32 --- /dev/null +++ b/tests/auto/tools/qt_cmake_create/tst_qt_cmake_create.cpp @@ -0,0 +1,157 @@ +// Copyright (C) 2023 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#include <QTest> +#include <QtTest> + +#include <QLibraryInfo> +#include <QLatin1StringView> +#include <QDir> +#include <QFileInfo> +#include <QProcess> +#include <QCryptographicHash> + +#include <array> + +using namespace Qt::Literals::StringLiterals; + +class tst_qt_cmake_create : public QObject +{ + Q_OBJECT + +public: + tst_qt_cmake_create(); + +private slots: + void init(); + void initTestCase(); + void generatingCMakeLists_data(); + void generatingCMakeLists(); + +private: + QString m_testWorkDir; + QString m_shell; + QString m_cmd; +}; + +tst_qt_cmake_create::tst_qt_cmake_create() : m_testWorkDir(qApp->applicationDirPath()) { } + +void tst_qt_cmake_create::initTestCase() +{ + QString binpath = QLibraryInfo::path(QLibraryInfo::BinariesPath); +#ifdef Q_OS_WINDOWS + m_shell = QString("cmd.exe"); + m_cmd = QString("%1/qt-cmake-create.bat").arg(binpath); +#else + m_shell = QString("/bin/sh"); + m_cmd = QString("%1/qt-cmake-create").arg(binpath); + QVERIFY(QFile::exists(m_shell)); +#endif + + QVERIFY(QFile::exists(m_cmd)); +} + +void tst_qt_cmake_create::init() +{ + QFETCH(QString, projectDirPath); + QDir workDir(m_testWorkDir); + QString fullProjectPath = m_testWorkDir + '/' + projectDirPath; + if (workDir.exists(fullProjectPath)) { + QDir projectDir(projectDirPath); + projectDir.removeRecursively(); + } + workDir.mkdir(projectDirPath); + auto testDataPath = QFINDTESTDATA("testdata"_L1 + '/' + projectDirPath); + QVERIFY(QFile::exists(testDataPath)); + + for (const auto &fileInfo : QDir(testDataPath).entryInfoList(QDir::Files)) { + QVERIFY(QFile::copy(fileInfo.absoluteFilePath(), + fullProjectPath + '/' + fileInfo.fileName())); + } +} + +void tst_qt_cmake_create::generatingCMakeLists_data() +{ + QTest::addColumn<QString>("projectDirPath"); + QTest::addColumn<bool>("expectPass"); + QTest::addColumn<QString>("workDir"); + + const std::array<QLatin1StringView, 5> expectPass = { + "cpp"_L1, "proto"_L1, "qml"_L1, "qrc"_L1, "ui"_L1, + }; + + const std::array<QString, 5> workDirs = { + m_testWorkDir, ""_L1, m_testWorkDir, ""_L1, m_testWorkDir, + }; + + static_assert(expectPass.size() == workDirs.size()); + + const QLatin1StringView expectFail[] = { + "ui_only"_L1, + }; + + for (size_t i = 0; i < expectPass.size(); ++i) { + const auto type = expectPass.at(i); + QTest::addRow("tst_qt_cmake_create_%s", type.data()) + << QString("%1_project").arg(type) << true << workDirs.at(i); + } + + for (const auto type : expectFail) { + QTest::addRow("tst_qt_cmake_create_%s", type.data()) + << QString("%1_project").arg(type) << false << QString(); + } +} + +void tst_qt_cmake_create::generatingCMakeLists() +{ + QFETCH(QString, projectDirPath); + QFETCH(bool, expectPass); + QFETCH(QString, workDir); + + QString fullProjectPath = m_testWorkDir + '/' + projectDirPath; + QProcess command; + QStringList arguments = { +#ifdef Q_OS_WINDOWS + "/C"_L1, +#endif + m_cmd + }; + + QString workingDirectory = fullProjectPath; + if (!workDir.isEmpty()) { + workingDirectory = workDir; + arguments.append(fullProjectPath); + } + command.setProgram(m_shell); + command.setArguments(arguments); + command.setWorkingDirectory(workingDirectory); + + command.start(); + QVERIFY(command.waitForFinished()); + QCOMPARE(command.exitCode() == 0, expectPass); + + QFile actualFile = QFile(fullProjectPath + '/' + "CMakeLists.txt"_L1); + + // Skip the rest if we expect that qt-cmake-create should exit with error + if (!expectPass) { + QVERIFY(!actualFile.exists()); + return; + } + + QFile expectedFile = QFile(fullProjectPath + '/' + "CMakeLists.txt.expected"_L1); + QVERIFY(actualFile.open(QFile::ReadOnly)); + QVERIFY(expectedFile.open(QFile::ReadOnly)); + + auto actualData = actualFile.readAll(); + actualData.replace(QByteArrayView("\r\n"), QByteArrayView("\n")); + auto expectedData = expectedFile.readAll(); + expectedData.replace(QByteArrayView("\r\n"), QByteArrayView("\n")); + + static auto hash = [](const QByteArray &data) { + return QCryptographicHash::hash(data, QCryptographicHash::Sha1).toHex(); + }; + QCOMPARE_EQ(hash(actualData), hash(expectedData)); +} + +QTEST_MAIN(tst_qt_cmake_create) +#include "tst_qt_cmake_create.moc" diff --git a/tests/auto/tools/rcc/CMakeLists.txt b/tests/auto/tools/rcc/CMakeLists.txt new file mode 100644 index 0000000000..96863c49bd --- /dev/null +++ b/tests/auto/tools/rcc/CMakeLists.txt @@ -0,0 +1,77 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + +##################################################################### +## tst_rcc Test: +##################################################################### + +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_rcc LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + +qt_internal_add_test(tst_rcc + SOURCES + tst_rcc.cpp +) + +# Resources: +set(images_resource_files + "data/images/images/circle.png" + "data/images/images/square.png" + "data/images/images/subdir/triangle.png" +) + +qt_internal_add_resource(tst_rcc "images" + PREFIX + "/" + BASE + "data/images" + FILES + ${images_resource_files} +) +set(size-0_resource_files + "data/sizes/data/data-0.txt" +) + +qt_internal_add_resource(tst_rcc "size-0" + PREFIX + "/" + BASE + "data/sizes" + FILES + ${size-0_resource_files} +) +set(size-2-0-35-1_resource_files + "data/sizes/data/data-0.txt" + "data/sizes/data/data-1.txt" + "data/sizes/data/data-2.txt" + "data/sizes/data/data-35.txt" +) + +qt_internal_add_resource(tst_rcc "size-2-0-35-1" + PREFIX + "/" + BASE + "data/sizes" + FILES + ${size-2-0-35-1_resource_files} +) +set(size-1_resource_files + "data/sizes/data/data-1.txt" +) + +qt_internal_add_resource(tst_rcc "size-1" + PREFIX + "/" + BASE + "data/sizes" + FILES + ${size-1_resource_files} +) + +# Add dependencies that are implicitly used inside the test +add_dependencies(tst_rcc + Qt::rcc +) diff --git a/tests/auto/tools/rcc/data/depfile/simple.d.expected b/tests/auto/tools/rcc/data/depfile/simple.d.expected new file mode 100644 index 0000000000..4b7aad56b1 --- /dev/null +++ b/tests/auto/tools/rcc/data/depfile/simple.d.expected @@ -0,0 +1 @@ +simple.qrc.cpp: ../images/images/square.png ../images/images/circle.png diff --git a/tests/auto/tools/rcc/data/depfile/simple.d.expected32 b/tests/auto/tools/rcc/data/depfile/simple.d.expected32 new file mode 100644 index 0000000000..4b7aad56b1 --- /dev/null +++ b/tests/auto/tools/rcc/data/depfile/simple.d.expected32 @@ -0,0 +1 @@ +simple.qrc.cpp: ../images/images/square.png ../images/images/circle.png diff --git a/tests/auto/tools/rcc/data/depfile/simple.qrc b/tests/auto/tools/rcc/data/depfile/simple.qrc new file mode 100644 index 0000000000..521dc4d4a0 --- /dev/null +++ b/tests/auto/tools/rcc/data/depfile/simple.qrc @@ -0,0 +1,6 @@ +<!DOCTYPE RCC><RCC version="1.0"> +<qresource> + <file>../images/images/circle.png</file> + <file>../images/images/square.png</file> +</qresource> +</RCC> diff --git a/tests/auto/tools/rcc/data/depfile/specialchar$file.txt b/tests/auto/tools/rcc/data/depfile/specialchar$file.txt new file mode 100644 index 0000000000..5da849b5c6 --- /dev/null +++ b/tests/auto/tools/rcc/data/depfile/specialchar$file.txt @@ -0,0 +1 @@ +ABC diff --git a/tests/auto/tools/rcc/data/depfile/specialchar.d.expected b/tests/auto/tools/rcc/data/depfile/specialchar.d.expected new file mode 100644 index 0000000000..9dd1af0958 --- /dev/null +++ b/tests/auto/tools/rcc/data/depfile/specialchar.d.expected @@ -0,0 +1 @@ +specialchar.qrc.cpp: specialchar$$file.txt ../images/images/subdir/triangle.png diff --git a/tests/auto/tools/rcc/data/depfile/specialchar.qrc b/tests/auto/tools/rcc/data/depfile/specialchar.qrc new file mode 100644 index 0000000000..133cbc7655 --- /dev/null +++ b/tests/auto/tools/rcc/data/depfile/specialchar.qrc @@ -0,0 +1,6 @@ +<!DOCTYPE RCC><RCC version="1.0"> +<qresource> + <file>../images/images/subdir/triangle.png</file> + <file>specialchar$file.txt</file> +</qresource> +</RCC> diff --git a/tests/auto/tools/rcc/data/images/images.expected b/tests/auto/tools/rcc/data/images/images.expected index 45e96dccd0..b30c6ce623 100644 --- a/tests/auto/tools/rcc/data/images/images.expected +++ b/tests/auto/tools/rcc/data/images/images.expected @@ -1,13 +1,27 @@ /**************************************************************************** ** Resource object code ** -IGNORE: ** Created by: The Resource Compiler for Qt version 5.3.1 +IGNORE:** Created by: The Resource Compiler for Qt version 6.3.0 ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ +#ifdef _MSC_VER +// disable informational message "function ... selected for automatic inline expansion" +#pragma warning (disable: 4711) +#endif + static const unsigned char qt_resource_data[] = { -IGNORE: // /dev/qt5/qtbase/tests/auto/tools/rcc/data/images/images/circle.png +IGNORE: // D:/projects/qt/dev/src/qtbase/tests/auto/tools/rcc/data/images/images/square.png + 0x0,0x0,0x0,0x5e, + 0x89, + 0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0, + 0x0,0x0,0x20,0x0,0x0,0x0,0x20,0x1,0x3,0x0,0x0,0x0,0x49,0xb4,0xe8,0xb7, + 0x0,0x0,0x0,0x6,0x50,0x4c,0x54,0x45,0x0,0x0,0x0,0x58,0xa8,0xff,0x8c,0x14, + 0x1f,0xab,0x0,0x0,0x0,0x13,0x49,0x44,0x41,0x54,0x8,0xd7,0x63,0x60,0x0,0x81, + 0xfa,0xff,0xff,0xff,0xd,0x3e,0x2,0x4,0x0,0x8d,0x4d,0x68,0x6b,0xcf,0xb8,0x8e, + 0x86,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82, +IGNORE: // D:/projects/qt/dev/src/qtbase/tests/auto/tools/rcc/data/images/images/circle.png 0x0,0x0,0x0,0xa5, 0x89, 0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0, @@ -21,16 +35,7 @@ IGNORE: // /dev/qt5/qtbase/tests/auto/tools/rcc/data/images/images/circle.png 0x4c,0x48,0x31,0x15,0x53,0xec,0x5,0x14,0x9b,0x11,0xc5,0x6e,0x8,0xdd,0x8e,0x1b, 0x14,0x54,0x19,0xf3,0xa1,0x23,0xdb,0xd5,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44, 0xae,0x42,0x60,0x82, -IGNORE: // /dev/qt5/qtbase/tests/auto/tools/rcc/data/images/images/square.png - 0x0,0x0,0x0,0x5e, - 0x89, - 0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0, - 0x0,0x0,0x20,0x0,0x0,0x0,0x20,0x1,0x3,0x0,0x0,0x0,0x49,0xb4,0xe8,0xb7, - 0x0,0x0,0x0,0x6,0x50,0x4c,0x54,0x45,0x0,0x0,0x0,0x58,0xa8,0xff,0x8c,0x14, - 0x1f,0xab,0x0,0x0,0x0,0x13,0x49,0x44,0x41,0x54,0x8,0xd7,0x63,0x60,0x0,0x81, - 0xfa,0xff,0xff,0xff,0xd,0x3e,0x2,0x4,0x0,0x8d,0x4d,0x68,0x6b,0xcf,0xb8,0x8e, - 0x86,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82, -IGNORE: // /dev/qt5/qtbase/tests/auto/tools/rcc/data/images/images/subdir/triangle.png +IGNORE: // D:/projects/qt/dev/src/qtbase/tests/auto/tools/rcc/data/images/images/subdir/triangle.png 0x0,0x0,0x0,0xaa, 0x89, 0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0, @@ -58,16 +63,16 @@ static const unsigned char qt_resource_name[] = { 0x7,0xab,0x8b,0x2, 0x0,0x73, 0x0,0x75,0x0,0x62,0x0,0x64,0x0,0x69,0x0,0x72, - // circle.png - 0x0,0xa, - 0xa,0x2d,0x16,0x47, - 0x0,0x63, - 0x0,0x69,0x0,0x72,0x0,0x63,0x0,0x6c,0x0,0x65,0x0,0x2e,0x0,0x70,0x0,0x6e,0x0,0x67, // square.png 0x0,0xa, 0x8,0x8b,0x6,0x27, 0x0,0x73, 0x0,0x71,0x0,0x75,0x0,0x61,0x0,0x72,0x0,0x65,0x0,0x2e,0x0,0x70,0x0,0x6e,0x0,0x67, + // circle.png + 0x0,0xa, + 0xa,0x2d,0x16,0x47, + 0x0,0x63, + 0x0,0x69,0x0,0x72,0x0,0x63,0x0,0x6c,0x0,0x65,0x0,0x2e,0x0,0x70,0x0,0x6e,0x0,0x67, // triangle.png 0x0,0xc, 0x5,0x59,0xa7,0xc7, @@ -87,10 +92,10 @@ static const unsigned char qt_resource_struct[] = { 0x0,0x0,0x0,0x12,0x0,0x2,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x5, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, // :/images/square.png - 0x0,0x0,0x0,0x3e,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0xa9, + 0x0,0x0,0x0,0x24,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x0, TIMESTAMP:images/square.png // :/images/circle.png - 0x0,0x0,0x0,0x24,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x0, + 0x0,0x0,0x0,0x3e,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x62, TIMESTAMP:images/circle.png // :/images/subdir/triangle.png 0x0,0x0,0x0,0x58,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x1,0xb, @@ -110,12 +115,13 @@ TIMESTAMP:images/subdir/triangle.png # define QT_RCC_MANGLE_NAMESPACE(name) name #endif -#ifdef QT_NAMESPACE +#if defined(QT_INLINE_NAMESPACE) +inline namespace QT_NAMESPACE { +#elif defined(QT_NAMESPACE) namespace QT_NAMESPACE { #endif bool qRegisterResourceData(int, const unsigned char *, const unsigned char *, const unsigned char *); - bool qUnregisterResourceData(int, const unsigned char *, const unsigned char *, const unsigned char *); #ifdef QT_NAMESPACE @@ -125,22 +131,33 @@ bool qUnregisterResourceData(int, const unsigned char *, const unsigned char *, int QT_RCC_MANGLE_NAMESPACE(qInitResources)(); int QT_RCC_MANGLE_NAMESPACE(qInitResources)() { + int version = 3; QT_RCC_PREPEND_NAMESPACE(qRegisterResourceData) - (0x2, qt_resource_struct, qt_resource_name, qt_resource_data); + (version, qt_resource_struct, qt_resource_name, qt_resource_data); return 1; } int QT_RCC_MANGLE_NAMESPACE(qCleanupResources)(); int QT_RCC_MANGLE_NAMESPACE(qCleanupResources)() { + int version = 3; QT_RCC_PREPEND_NAMESPACE(qUnregisterResourceData) - (0x2, qt_resource_struct, qt_resource_name, qt_resource_data); + (version, qt_resource_struct, qt_resource_name, qt_resource_data); return 1; } +#ifdef __clang__ +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wexit-time-destructors" +#endif + namespace { struct initializer { initializer() { QT_RCC_MANGLE_NAMESPACE(qInitResources)(); } ~initializer() { QT_RCC_MANGLE_NAMESPACE(qCleanupResources)(); } } dummy; } + +#ifdef __clang__ +# pragma clang diagnostic pop +#endif diff --git a/tests/auto/tools/rcc/data/images/images.expected32 b/tests/auto/tools/rcc/data/images/images.expected32 new file mode 100644 index 0000000000..7e98fdd4fc --- /dev/null +++ b/tests/auto/tools/rcc/data/images/images.expected32 @@ -0,0 +1,154 @@ +/**************************************************************************** +** Resource object code +** +IGNORE:** Created by: The Resource Compiler for Qt version 6.3.0 +** +** WARNING! All changes made in this file will be lost! +*****************************************************************************/ + +#ifdef _MSC_VER +// disable informational message "function ... selected for automatic inline expansion" +#pragma warning (disable: 4711) +#endif + +static const unsigned char qt_resource_data[] = { +IGNORE: // D:/projects/qt/dev/src/qtbase/tests/auto/tools/rcc/data/images/images/square.png + 0x0,0x0,0x0,0x5e, + 0x89, + 0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0, + 0x0,0x0,0x20,0x0,0x0,0x0,0x20,0x1,0x3,0x0,0x0,0x0,0x49,0xb4,0xe8,0xb7, + 0x0,0x0,0x0,0x6,0x50,0x4c,0x54,0x45,0x0,0x0,0x0,0x58,0xa8,0xff,0x8c,0x14, + 0x1f,0xab,0x0,0x0,0x0,0x13,0x49,0x44,0x41,0x54,0x8,0xd7,0x63,0x60,0x0,0x81, + 0xfa,0xff,0xff,0xff,0xd,0x3e,0x2,0x4,0x0,0x8d,0x4d,0x68,0x6b,0xcf,0xb8,0x8e, + 0x86,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82, +IGNORE: // D:/projects/qt/dev/src/qtbase/tests/auto/tools/rcc/data/images/images/circle.png + 0x0,0x0,0x0,0xa5, + 0x89, + 0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0, + 0x0,0x0,0x20,0x0,0x0,0x0,0x20,0x8,0x6,0x0,0x0,0x0,0x73,0x7a,0x7a,0xf4, + 0x0,0x0,0x0,0x6c,0x49,0x44,0x41,0x54,0x58,0xc3,0xed,0xd7,0x5b,0xe,0x0,0x10, + 0xc,0x44,0x51,0xcb,0xb4,0x44,0xbb,0x64,0x3,0x1e,0xd5,0x18,0x1d,0x31,0x12,0xdf, + 0xf7,0x7c,0xd1,0xa6,0xf4,0xe8,0xa9,0x93,0x8b,0x8f,0xe6,0x52,0x87,0x17,0x81,0x59, + 0x46,0xd,0x18,0x7f,0xdc,0x13,0x1e,0x40,0x62,0xe2,0x5e,0xc4,0xd1,0xf8,0x2e,0x2, + 0x12,0xb7,0x22,0xa0,0x71,0xb,0x22,0x14,0x70,0x25,0x3e,0x43,0xfc,0xd,0xb8,0x1a, + 0xef,0x21,0x4,0x10,0x40,0x0,0x3d,0x44,0x14,0x0,0x7d,0xc7,0x14,0x13,0x11,0xc5, + 0x4c,0x48,0x31,0x15,0x53,0xec,0x5,0x14,0x9b,0x11,0xc5,0x6e,0x8,0xdd,0x8e,0x1b, + 0x14,0x54,0x19,0xf3,0xa1,0x23,0xdb,0xd5,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44, + 0xae,0x42,0x60,0x82, +IGNORE: // D:/projects/qt/dev/src/qtbase/tests/auto/tools/rcc/data/images/images/subdir/triangle.png + 0x0,0x0,0x0,0xaa, + 0x89, + 0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0, + 0x0,0x0,0x20,0x0,0x0,0x0,0x20,0x8,0x6,0x0,0x0,0x0,0x73,0x7a,0x7a,0xf4, + 0x0,0x0,0x0,0x71,0x49,0x44,0x41,0x54,0x58,0xc3,0xed,0xce,0x4b,0xa,0x80,0x30, + 0x10,0x4,0xd1,0x1c,0xd3,0x23,0x7a,0xcb,0x11,0x82,0xb8,0x50,0x62,0x92,0xf9,0xd5, + 0x66,0x1a,0x7a,0x5d,0xaf,0xb5,0x5a,0xcd,0x36,0xb9,0xcf,0xc4,0x8f,0x53,0xfa,0x9, + 0xc4,0x13,0xa7,0x10,0x28,0xe0,0x13,0xcf,0x44,0xc,0xe3,0x59,0x8,0x14,0x30,0x8d, + 0x47,0x23,0x50,0xc0,0x72,0x3c,0x2,0xb1,0x1d,0xf7,0x46,0xa0,0x0,0x75,0xdc,0x3, + 0x61,0x8e,0x5b,0x11,0x28,0xc0,0x2d,0xae,0x45,0xa0,0x0,0xf7,0xf8,0xe,0x22,0x2c, + 0xbe,0x8a,0x40,0x1,0xe1,0xf1,0x3f,0x44,0x5a,0x7c,0x84,0x40,0x1,0xe9,0xf1,0x37, + 0x42,0xe0,0xd7,0xd8,0x5d,0xf,0x6f,0x97,0x11,0x88,0x38,0xa9,0x1e,0x0,0x0,0x0, + 0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82, + +}; + +static const unsigned char qt_resource_name[] = { + // images + 0x0,0x6, + 0x7,0x3,0x7d,0xc3, + 0x0,0x69, + 0x0,0x6d,0x0,0x61,0x0,0x67,0x0,0x65,0x0,0x73, + // square.png + 0x0,0xa, + 0x8,0x8b,0x6,0x27, + 0x0,0x73, + 0x0,0x71,0x0,0x75,0x0,0x61,0x0,0x72,0x0,0x65,0x0,0x2e,0x0,0x70,0x0,0x6e,0x0,0x67, + // subdir + 0x0,0x6, + 0x7,0xab,0x8b,0x2, + 0x0,0x73, + 0x0,0x75,0x0,0x62,0x0,0x64,0x0,0x69,0x0,0x72, + // circle.png + 0x0,0xa, + 0xa,0x2d,0x16,0x47, + 0x0,0x63, + 0x0,0x69,0x0,0x72,0x0,0x63,0x0,0x6c,0x0,0x65,0x0,0x2e,0x0,0x70,0x0,0x6e,0x0,0x67, + // triangle.png + 0x0,0xc, + 0x5,0x59,0xa7,0xc7, + 0x0,0x74, + 0x0,0x72,0x0,0x69,0x0,0x61,0x0,0x6e,0x0,0x67,0x0,0x6c,0x0,0x65,0x0,0x2e,0x0,0x70,0x0,0x6e,0x0,0x67, + +}; + +static const unsigned char qt_resource_struct[] = { + // : + 0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x1, +0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, + // :/images + 0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x3,0x0,0x0,0x0,0x2, +0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, + // :/images/subdir + 0x0,0x0,0x0,0x2c,0x0,0x2,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x5, +0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, + // :/images/square.png + 0x0,0x0,0x0,0x12,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x0, +TIMESTAMP:images/square.png + // :/images/circle.png + 0x0,0x0,0x0,0x3e,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x62, +TIMESTAMP:images/circle.png + // :/images/subdir/triangle.png + 0x0,0x0,0x0,0x58,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x1,0xb, +TIMESTAMP:images/subdir/triangle.png + +}; + +#ifdef QT_NAMESPACE +# define QT_RCC_PREPEND_NAMESPACE(name) ::QT_NAMESPACE::name +# define QT_RCC_MANGLE_NAMESPACE0(x) x +# define QT_RCC_MANGLE_NAMESPACE1(a, b) a##_##b +# define QT_RCC_MANGLE_NAMESPACE2(a, b) QT_RCC_MANGLE_NAMESPACE1(a,b) +# define QT_RCC_MANGLE_NAMESPACE(name) QT_RCC_MANGLE_NAMESPACE2( \ + QT_RCC_MANGLE_NAMESPACE0(name), QT_RCC_MANGLE_NAMESPACE0(QT_NAMESPACE)) +#else +# define QT_RCC_PREPEND_NAMESPACE(name) name +# define QT_RCC_MANGLE_NAMESPACE(name) name +#endif + +#if defined(QT_INLINE_NAMESPACE) +inline namespace QT_NAMESPACE { +#elif defined(QT_NAMESPACE) +namespace QT_NAMESPACE { +#endif + +bool qRegisterResourceData(int, const unsigned char *, const unsigned char *, const unsigned char *); +bool qUnregisterResourceData(int, const unsigned char *, const unsigned char *, const unsigned char *); + +#ifdef QT_NAMESPACE +} +#endif + +int QT_RCC_MANGLE_NAMESPACE(qInitResources)(); +int QT_RCC_MANGLE_NAMESPACE(qInitResources)() +{ + int version = 3; + QT_RCC_PREPEND_NAMESPACE(qRegisterResourceData) + (version, qt_resource_struct, qt_resource_name, qt_resource_data); + return 1; +} + +int QT_RCC_MANGLE_NAMESPACE(qCleanupResources)(); +int QT_RCC_MANGLE_NAMESPACE(qCleanupResources)() +{ + int version = 3; + QT_RCC_PREPEND_NAMESPACE(qUnregisterResourceData) + (version, qt_resource_struct, qt_resource_name, qt_resource_data); + return 1; +} + +namespace { + struct initializer { + initializer() { QT_RCC_MANGLE_NAMESPACE(qInitResources)(); } + ~initializer() { QT_RCC_MANGLE_NAMESPACE(qCleanupResources)(); } + } dummy; +} diff --git a/tests/auto/tools/rcc/data/sizes/data/data-0.txt b/tests/auto/tools/rcc/data/sizes/data/data-0.txt new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/tests/auto/tools/rcc/data/sizes/data/data-0.txt diff --git a/tests/auto/tools/rcc/data/sizes/data/data-1.txt b/tests/auto/tools/rcc/data/sizes/data/data-1.txt new file mode 100644 index 0000000000..b516b2c489 --- /dev/null +++ b/tests/auto/tools/rcc/data/sizes/data/data-1.txt @@ -0,0 +1 @@ +@
\ No newline at end of file diff --git a/tests/auto/tools/rcc/data/sizes/data/data-2.txt b/tests/auto/tools/rcc/data/sizes/data/data-2.txt new file mode 100644 index 0000000000..a616ad491b --- /dev/null +++ b/tests/auto/tools/rcc/data/sizes/data/data-2.txt @@ -0,0 +1 @@ +01
\ No newline at end of file diff --git a/tests/auto/tools/rcc/data/sizes/data/data-35.txt b/tests/auto/tools/rcc/data/sizes/data/data-35.txt new file mode 100644 index 0000000000..19a8036a15 --- /dev/null +++ b/tests/auto/tools/rcc/data/sizes/data/data-35.txt @@ -0,0 +1 @@ +0123456789 0123456789 0123456789 12
\ No newline at end of file diff --git a/tests/auto/tools/rcc/data/sizes/size-0.expected b/tests/auto/tools/rcc/data/sizes/size-0.expected new file mode 100644 index 0000000000..79defe7868 --- /dev/null +++ b/tests/auto/tools/rcc/data/sizes/size-0.expected @@ -0,0 +1,105 @@ +/**************************************************************************** +** Resource object code +** +IGNORE: ** Created by: The Resource Compiler for Qt version 5.11.2 +** +** WARNING! All changes made in this file will be lost! +*****************************************************************************/ + +#ifdef _MSC_VER +// disable informational message "function ... selected for automatic inline expansion" +#pragma warning (disable: 4711) +#endif + +static const unsigned char qt_resource_data[] = { +IGNORE: // /data/dev/qt-5/qtbase/tests/auto/tools/rcc/data/sizes/data/data-0.txt + 0x0,0x0,0x0,0x0, + + +}; + +static const unsigned char qt_resource_name[] = { + // data + 0x0,0x4, + 0x0,0x6,0xa8,0xa1, + 0x0,0x64, + 0x0,0x61,0x0,0x74,0x0,0x61, + // data-0.txt + 0x0,0xa, + 0x4,0xe,0xa,0xb4, + 0x0,0x64, + 0x0,0x61,0x0,0x74,0x0,0x61,0x0,0x2d,0x0,0x30,0x0,0x2e,0x0,0x74,0x0,0x78,0x0,0x74, + +}; + +static const unsigned char qt_resource_struct[] = { + // : + 0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x1, +0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, + // :/data + 0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x2, +0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, + // :/data/data-0.txt + 0x0,0x0,0x0,0xe,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x0, +TIMESTAMP:data/data-0.txt + +}; + +#ifdef QT_NAMESPACE +# define QT_RCC_PREPEND_NAMESPACE(name) ::QT_NAMESPACE::name +# define QT_RCC_MANGLE_NAMESPACE0(x) x +# define QT_RCC_MANGLE_NAMESPACE1(a, b) a##_##b +# define QT_RCC_MANGLE_NAMESPACE2(a, b) QT_RCC_MANGLE_NAMESPACE1(a,b) +# define QT_RCC_MANGLE_NAMESPACE(name) QT_RCC_MANGLE_NAMESPACE2( \ + QT_RCC_MANGLE_NAMESPACE0(name), QT_RCC_MANGLE_NAMESPACE0(QT_NAMESPACE)) +#else +# define QT_RCC_PREPEND_NAMESPACE(name) name +# define QT_RCC_MANGLE_NAMESPACE(name) name +#endif + +#if defined(QT_INLINE_NAMESPACE) +inline namespace QT_NAMESPACE { +#elif defined(QT_NAMESPACE) +namespace QT_NAMESPACE { +#endif + +bool qRegisterResourceData(int, const unsigned char *, const unsigned char *, const unsigned char *); +bool qUnregisterResourceData(int, const unsigned char *, const unsigned char *, const unsigned char *); + +#ifdef QT_NAMESPACE +} +#endif + +int QT_RCC_MANGLE_NAMESPACE(qInitResources)(); +int QT_RCC_MANGLE_NAMESPACE(qInitResources)() +{ + int version = 3; + QT_RCC_PREPEND_NAMESPACE(qRegisterResourceData) + (version, qt_resource_struct, qt_resource_name, qt_resource_data); + return 1; +} + +int QT_RCC_MANGLE_NAMESPACE(qCleanupResources)(); +int QT_RCC_MANGLE_NAMESPACE(qCleanupResources)() +{ + int version = 3; + QT_RCC_PREPEND_NAMESPACE(qUnregisterResourceData) + (version, qt_resource_struct, qt_resource_name, qt_resource_data); + return 1; +} + +#ifdef __clang__ +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wexit-time-destructors" +#endif + +namespace { + struct initializer { + initializer() { QT_RCC_MANGLE_NAMESPACE(qInitResources)(); } + ~initializer() { QT_RCC_MANGLE_NAMESPACE(qCleanupResources)(); } + } dummy; +} + +#ifdef __clang__ +# pragma clang diagnostic pop +#endif diff --git a/tests/auto/tools/rcc/data/sizes/size-0.qrc b/tests/auto/tools/rcc/data/sizes/size-0.qrc new file mode 100644 index 0000000000..9f47732fe2 --- /dev/null +++ b/tests/auto/tools/rcc/data/sizes/size-0.qrc @@ -0,0 +1,5 @@ +<!DOCTYPE RCC><RCC version="1.0"> +<qresource> + <file>data/data-0.txt</file> +</qresource> +</RCC> diff --git a/tests/auto/tools/rcc/data/sizes/size-1.expected b/tests/auto/tools/rcc/data/sizes/size-1.expected new file mode 100644 index 0000000000..925de99c32 --- /dev/null +++ b/tests/auto/tools/rcc/data/sizes/size-1.expected @@ -0,0 +1,106 @@ +/**************************************************************************** +** Resource object code +** +IGNORE:** Created by: The Resource Compiler for Qt version 5.11.2 +** +** WARNING! All changes made in this file will be lost! +*****************************************************************************/ + +#ifdef _MSC_VER +// disable informational message "function ... selected for automatic inline expansion" +#pragma warning (disable: 4711) +#endif + +static const unsigned char qt_resource_data[] = { +IGNORE: // /data/dev/qt-5/qtbase/tests/auto/tools/rcc/data/sizes/data/data-1.txt + 0x0,0x0,0x0,0x1, + 0x40, + + +}; + +static const unsigned char qt_resource_name[] = { + // data + 0x0,0x4, + 0x0,0x6,0xa8,0xa1, + 0x0,0x64, + 0x0,0x61,0x0,0x74,0x0,0x61, + // data-1.txt + 0x0,0xa, + 0x4,0x11,0xa,0xb4, + 0x0,0x64, + 0x0,0x61,0x0,0x74,0x0,0x61,0x0,0x2d,0x0,0x31,0x0,0x2e,0x0,0x74,0x0,0x78,0x0,0x74, + +}; + +static const unsigned char qt_resource_struct[] = { + // : + 0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x1, +0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, + // :/data + 0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x2, +0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, + // :/data/data-1.txt + 0x0,0x0,0x0,0xe,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x0, +TIMESTAMP:data/data-1.txt + +}; + +#ifdef QT_NAMESPACE +# define QT_RCC_PREPEND_NAMESPACE(name) ::QT_NAMESPACE::name +# define QT_RCC_MANGLE_NAMESPACE0(x) x +# define QT_RCC_MANGLE_NAMESPACE1(a, b) a##_##b +# define QT_RCC_MANGLE_NAMESPACE2(a, b) QT_RCC_MANGLE_NAMESPACE1(a,b) +# define QT_RCC_MANGLE_NAMESPACE(name) QT_RCC_MANGLE_NAMESPACE2( \ + QT_RCC_MANGLE_NAMESPACE0(name), QT_RCC_MANGLE_NAMESPACE0(QT_NAMESPACE)) +#else +# define QT_RCC_PREPEND_NAMESPACE(name) name +# define QT_RCC_MANGLE_NAMESPACE(name) name +#endif + +#if defined(QT_INLINE_NAMESPACE) +inline namespace QT_NAMESPACE { +#elif defined(QT_NAMESPACE) +namespace QT_NAMESPACE { +#endif + +bool qRegisterResourceData(int, const unsigned char *, const unsigned char *, const unsigned char *); +bool qUnregisterResourceData(int, const unsigned char *, const unsigned char *, const unsigned char *); + +#ifdef QT_NAMESPACE +} +#endif + +int QT_RCC_MANGLE_NAMESPACE(qInitResources)(); +int QT_RCC_MANGLE_NAMESPACE(qInitResources)() +{ + int version = 3; + QT_RCC_PREPEND_NAMESPACE(qRegisterResourceData) + (version, qt_resource_struct, qt_resource_name, qt_resource_data); + return 1; +} + +int QT_RCC_MANGLE_NAMESPACE(qCleanupResources)(); +int QT_RCC_MANGLE_NAMESPACE(qCleanupResources)() +{ + int version = 3; + QT_RCC_PREPEND_NAMESPACE(qUnregisterResourceData) + (version, qt_resource_struct, qt_resource_name, qt_resource_data); + return 1; +} + +#ifdef __clang__ +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wexit-time-destructors" +#endif + +namespace { + struct initializer { + initializer() { QT_RCC_MANGLE_NAMESPACE(qInitResources)(); } + ~initializer() { QT_RCC_MANGLE_NAMESPACE(qCleanupResources)(); } + } dummy; +} + +#ifdef __clang__ +# pragma clang diagnostic pop +#endif diff --git a/tests/auto/tools/rcc/data/sizes/size-1.qrc b/tests/auto/tools/rcc/data/sizes/size-1.qrc new file mode 100644 index 0000000000..9fde9a1722 --- /dev/null +++ b/tests/auto/tools/rcc/data/sizes/size-1.qrc @@ -0,0 +1,5 @@ +<!DOCTYPE RCC><RCC version="1.0"> +<qresource> + <file>data/data-1.txt</file> +</qresource> +</RCC> diff --git a/tests/auto/tools/rcc/data/sizes/size-2-0-35-1.expected b/tests/auto/tools/rcc/data/sizes/size-2-0-35-1.expected new file mode 100644 index 0000000000..d858e15dba --- /dev/null +++ b/tests/auto/tools/rcc/data/sizes/size-2-0-35-1.expected @@ -0,0 +1,143 @@ +/**************************************************************************** +** Resource object code +** +IGNORE:** Created by: The Resource Compiler for Qt version 6.3.0 +** +** WARNING! All changes made in this file will be lost! +*****************************************************************************/ + +#ifdef _MSC_VER +// disable informational message "function ... selected for automatic inline expansion" +#pragma warning (disable: 4711) +#endif + +static const unsigned char qt_resource_data[] = { +IGNORE: // D:/projects/qt/dev/src/qtbase/tests/auto/tools/rcc/data/sizes/data/data-2.txt + 0x0,0x0,0x0,0x2, + 0x30, + 0x31, +IGNORE: // D:/projects/qt/dev/src/qtbase/tests/auto/tools/rcc/data/sizes/data/data-1.txt + 0x0,0x0,0x0,0x1, + 0x40, + +IGNORE: // D:/projects/qt/dev/src/qtbase/tests/auto/tools/rcc/data/sizes/data/data-0.txt + 0x0,0x0,0x0,0x0, + +IGNORE: // D:/projects/qt/dev/src/qtbase/tests/auto/tools/rcc/data/sizes/data/data-35.txt + 0x0,0x0,0x0,0x23, + 0x30, + 0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x20,0x30,0x31,0x32,0x33,0x34,0x35, + 0x36,0x37,0x38,0x39,0x20,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x20, + 0x31,0x32, + +}; + +static const unsigned char qt_resource_name[] = { + // data + 0x0,0x4, + 0x0,0x6,0xa8,0xa1, + 0x0,0x64, + 0x0,0x61,0x0,0x74,0x0,0x61, + // data-2.txt + 0x0,0xa, + 0x4,0x8,0xa,0xb4, + 0x0,0x64, + 0x0,0x61,0x0,0x74,0x0,0x61,0x0,0x2d,0x0,0x32,0x0,0x2e,0x0,0x74,0x0,0x78,0x0,0x74, + // data-1.txt + 0x0,0xa, + 0x4,0x11,0xa,0xb4, + 0x0,0x64, + 0x0,0x61,0x0,0x74,0x0,0x61,0x0,0x2d,0x0,0x31,0x0,0x2e,0x0,0x74,0x0,0x78,0x0,0x74, + // data-0.txt + 0x0,0xa, + 0x4,0xe,0xa,0xb4, + 0x0,0x64, + 0x0,0x61,0x0,0x74,0x0,0x61,0x0,0x2d,0x0,0x30,0x0,0x2e,0x0,0x74,0x0,0x78,0x0,0x74, + // data-35.txt + 0x0,0xb, + 0x0,0xb5,0x4f,0x74, + 0x0,0x64, + 0x0,0x61,0x0,0x74,0x0,0x61,0x0,0x2d,0x0,0x33,0x0,0x35,0x0,0x2e,0x0,0x74,0x0,0x78,0x0,0x74, + +}; + +static const unsigned char qt_resource_struct[] = { + // : + 0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x1, +0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, + // :/data + 0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x4,0x0,0x0,0x0,0x2, +0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, + // :/data/data-35.txt + 0x0,0x0,0x0,0x5c,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0xf, +TIMESTAMP:data/data-35.txt + // :/data/data-2.txt + 0x0,0x0,0x0,0xe,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x0, +TIMESTAMP:data/data-2.txt + // :/data/data-0.txt + 0x0,0x0,0x0,0x42,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0xb, +TIMESTAMP:data/data-0.txt + // :/data/data-1.txt + 0x0,0x0,0x0,0x28,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x6, +TIMESTAMP:data/data-1.txt + +}; + +#ifdef QT_NAMESPACE +# define QT_RCC_PREPEND_NAMESPACE(name) ::QT_NAMESPACE::name +# define QT_RCC_MANGLE_NAMESPACE0(x) x +# define QT_RCC_MANGLE_NAMESPACE1(a, b) a##_##b +# define QT_RCC_MANGLE_NAMESPACE2(a, b) QT_RCC_MANGLE_NAMESPACE1(a,b) +# define QT_RCC_MANGLE_NAMESPACE(name) QT_RCC_MANGLE_NAMESPACE2( \ + QT_RCC_MANGLE_NAMESPACE0(name), QT_RCC_MANGLE_NAMESPACE0(QT_NAMESPACE)) +#else +# define QT_RCC_PREPEND_NAMESPACE(name) name +# define QT_RCC_MANGLE_NAMESPACE(name) name +#endif + +#if defined(QT_INLINE_NAMESPACE) +inline namespace QT_NAMESPACE { +#elif defined(QT_NAMESPACE) +namespace QT_NAMESPACE { +#endif + +bool qRegisterResourceData(int, const unsigned char *, const unsigned char *, const unsigned char *); +bool qUnregisterResourceData(int, const unsigned char *, const unsigned char *, const unsigned char *); + +#ifdef QT_NAMESPACE +} +#endif + +int QT_RCC_MANGLE_NAMESPACE(qInitResources)(); +int QT_RCC_MANGLE_NAMESPACE(qInitResources)() +{ + int version = 3; + QT_RCC_PREPEND_NAMESPACE(qRegisterResourceData) + (version, qt_resource_struct, qt_resource_name, qt_resource_data); + return 1; +} + +int QT_RCC_MANGLE_NAMESPACE(qCleanupResources)(); +int QT_RCC_MANGLE_NAMESPACE(qCleanupResources)() +{ + int version = 3; + QT_RCC_PREPEND_NAMESPACE(qUnregisterResourceData) + (version, qt_resource_struct, qt_resource_name, qt_resource_data); + return 1; +} + +#ifdef __clang__ +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wexit-time-destructors" +#endif + +namespace { + struct initializer { + initializer() { QT_RCC_MANGLE_NAMESPACE(qInitResources)(); } + ~initializer() { QT_RCC_MANGLE_NAMESPACE(qCleanupResources)(); } + } dummy; +} + +#ifdef __clang__ +# pragma clang diagnostic pop +#endif diff --git a/tests/auto/tools/rcc/data/sizes/size-2-0-35-1.expected32 b/tests/auto/tools/rcc/data/sizes/size-2-0-35-1.expected32 new file mode 100644 index 0000000000..a67e0ffc6e --- /dev/null +++ b/tests/auto/tools/rcc/data/sizes/size-2-0-35-1.expected32 @@ -0,0 +1,134 @@ +/**************************************************************************** +** Resource object code +** +IGNORE:** Created by: The Resource Compiler for Qt version 6.3.0 +** +** WARNING! All changes made in this file will be lost! +*****************************************************************************/ + +#ifdef _MSC_VER +// disable informational message "function ... selected for automatic inline expansion" +#pragma warning (disable: 4711) +#endif + +static const unsigned char qt_resource_data[] = { +IGNORE: // D:/projects/qt/dev/src/qtbase/tests/auto/tools/rcc/data/sizes/data/data-1.txt + 0x0,0x0,0x0,0x1, + 0x40, + +IGNORE: // D:/projects/qt/dev/src/qtbase/tests/auto/tools/rcc/data/sizes/data/data-2.txt + 0x0,0x0,0x0,0x2, + 0x30, + 0x31, +IGNORE: // D:/projects/qt/dev/src/qtbase/tests/auto/tools/rcc/data/sizes/data/data-35.txt + 0x0,0x0,0x0,0x23, + 0x30, + 0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x20,0x30,0x31,0x32,0x33,0x34,0x35, + 0x36,0x37,0x38,0x39,0x20,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x20, + 0x31,0x32, +IGNORE: // D:/projects/qt/dev/src/qtbase/tests/auto/tools/rcc/data/sizes/data/data-0.txt + 0x0,0x0,0x0,0x0, + + +}; + +static const unsigned char qt_resource_name[] = { + // data + 0x0,0x4, + 0x0,0x6,0xa8,0xa1, + 0x0,0x64, + 0x0,0x61,0x0,0x74,0x0,0x61, + // data-1.txt + 0x0,0xa, + 0x4,0x11,0xa,0xb4, + 0x0,0x64, + 0x0,0x61,0x0,0x74,0x0,0x61,0x0,0x2d,0x0,0x31,0x0,0x2e,0x0,0x74,0x0,0x78,0x0,0x74, + // data-2.txt + 0x0,0xa, + 0x4,0x8,0xa,0xb4, + 0x0,0x64, + 0x0,0x61,0x0,0x74,0x0,0x61,0x0,0x2d,0x0,0x32,0x0,0x2e,0x0,0x74,0x0,0x78,0x0,0x74, + // data-35.txt + 0x0,0xb, + 0x0,0xb5,0x4f,0x74, + 0x0,0x64, + 0x0,0x61,0x0,0x74,0x0,0x61,0x0,0x2d,0x0,0x33,0x0,0x35,0x0,0x2e,0x0,0x74,0x0,0x78,0x0,0x74, + // data-0.txt + 0x0,0xa, + 0x4,0xe,0xa,0xb4, + 0x0,0x64, + 0x0,0x61,0x0,0x74,0x0,0x61,0x0,0x2d,0x0,0x30,0x0,0x2e,0x0,0x74,0x0,0x78,0x0,0x74, + +}; + +static const unsigned char qt_resource_struct[] = { + // : + 0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x1, +0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, + // :/data + 0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x4,0x0,0x0,0x0,0x2, +0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, + // :/data/data-35.txt + 0x0,0x0,0x0,0x42,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0xb, +TIMESTAMP:data/data-35.txt + // :/data/data-2.txt + 0x0,0x0,0x0,0x28,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x5, +TIMESTAMP:data/data-2.txt + // :/data/data-0.txt + 0x0,0x0,0x0,0x5e,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x32, +TIMESTAMP:data/data-0.txt + // :/data/data-1.txt + 0x0,0x0,0x0,0xe,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x0, +TIMESTAMP:data/data-1.txt + +}; + +#ifdef QT_NAMESPACE +# define QT_RCC_PREPEND_NAMESPACE(name) ::QT_NAMESPACE::name +# define QT_RCC_MANGLE_NAMESPACE0(x) x +# define QT_RCC_MANGLE_NAMESPACE1(a, b) a##_##b +# define QT_RCC_MANGLE_NAMESPACE2(a, b) QT_RCC_MANGLE_NAMESPACE1(a,b) +# define QT_RCC_MANGLE_NAMESPACE(name) QT_RCC_MANGLE_NAMESPACE2( \ + QT_RCC_MANGLE_NAMESPACE0(name), QT_RCC_MANGLE_NAMESPACE0(QT_NAMESPACE)) +#else +# define QT_RCC_PREPEND_NAMESPACE(name) name +# define QT_RCC_MANGLE_NAMESPACE(name) name +#endif + +#if defined(QT_INLINE_NAMESPACE) +inline namespace QT_NAMESPACE { +#elif defined(QT_NAMESPACE) +namespace QT_NAMESPACE { +#endif + +bool qRegisterResourceData(int, const unsigned char *, const unsigned char *, const unsigned char *); +bool qUnregisterResourceData(int, const unsigned char *, const unsigned char *, const unsigned char *); + +#ifdef QT_NAMESPACE +} +#endif + +int QT_RCC_MANGLE_NAMESPACE(qInitResources)(); +int QT_RCC_MANGLE_NAMESPACE(qInitResources)() +{ + int version = 3; + QT_RCC_PREPEND_NAMESPACE(qRegisterResourceData) + (version, qt_resource_struct, qt_resource_name, qt_resource_data); + return 1; +} + +int QT_RCC_MANGLE_NAMESPACE(qCleanupResources)(); +int QT_RCC_MANGLE_NAMESPACE(qCleanupResources)() +{ + int version = 3; + QT_RCC_PREPEND_NAMESPACE(qUnregisterResourceData) + (version, qt_resource_struct, qt_resource_name, qt_resource_data); + return 1; +} + +namespace { + struct initializer { + initializer() { QT_RCC_MANGLE_NAMESPACE(qInitResources)(); } + ~initializer() { QT_RCC_MANGLE_NAMESPACE(qCleanupResources)(); } + } dummy; +} diff --git a/tests/auto/tools/rcc/data/sizes/size-2-0-35-1.qrc b/tests/auto/tools/rcc/data/sizes/size-2-0-35-1.qrc new file mode 100644 index 0000000000..039c9203ff --- /dev/null +++ b/tests/auto/tools/rcc/data/sizes/size-2-0-35-1.qrc @@ -0,0 +1,8 @@ +<!DOCTYPE RCC><RCC version="1.0"> +<qresource> + <file>data/data-2.txt</file> + <file>data/data-0.txt</file> + <file>data/data-35.txt</file> + <file>data/data-1.txt</file> +</qresource> +</RCC> diff --git a/tests/auto/tools/rcc/data/sizes/size-2-0-35-1_python.expected b/tests/auto/tools/rcc/data/sizes/size-2-0-35-1_python.expected new file mode 100644 index 0000000000..849e91c012 --- /dev/null +++ b/tests/auto/tools/rcc/data/sizes/size-2-0-35-1_python.expected @@ -0,0 +1,68 @@ +# Resource object code (Python 3) +# Created by: object code +# Created by: The Resource Compiler for Qt version 6.3.0 +# WARNING! All changes made in this file will be lost! + +from PySide6 import QtCore + +qt_resource_data = b"\ +\x00\x00\x00\x02\ +0\ +1\ +\x00\x00\x00\x01\ +@\ +\ +\x00\x00\x00\x00\ +\ +\x00\x00\x00#\ +0\ +123456789 012345\ +6789 0123456789 \ +12\ +" + +qt_resource_name = b"\ +\x00\x04\ +\x00\x06\xa8\xa1\ +\x00d\ +\x00a\x00t\x00a\ +\x00\x0a\ +\x04\x08\x0a\xb4\ +\x00d\ +\x00a\x00t\x00a\x00-\x002\x00.\x00t\x00x\x00t\ +\x00\x0a\ +\x04\x11\x0a\xb4\ +\x00d\ +\x00a\x00t\x00a\x00-\x001\x00.\x00t\x00x\x00t\ +\x00\x0a\ +\x04\x0e\x0a\xb4\ +\x00d\ +\x00a\x00t\x00a\x00-\x000\x00.\x00t\x00x\x00t\ +\x00\x0b\ +\x00\xb5Ot\ +\x00d\ +\x00a\x00t\x00a\x00-\x003\x005\x00.\x00t\x00x\x00t\ +" + +qt_resource_struct = b"\ +\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\ +\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x02\x00\x00\x00\x04\x00\x00\x00\x02\ +\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x5c\x00\x00\x00\x00\x00\x01\x00\x00\x00\x0f\ +IGNORE: (time stamp) +\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\ +IGNORE: (time stamp) +\x00\x00\x00B\x00\x00\x00\x00\x00\x01\x00\x00\x00\x0b\ +IGNORE: (time stamp) +\x00\x00\x00(\x00\x00\x00\x00\x00\x01\x00\x00\x00\x06\ +IGNORE: (time stamp) +" + +def qInitResources(): + QtCore.qRegisterResourceData(0x03, qt_resource_struct, qt_resource_name, qt_resource_data) + +def qCleanupResources(): + QtCore.qUnregisterResourceData(0x03, qt_resource_struct, qt_resource_name, qt_resource_data) + +qInitResources() diff --git a/tests/auto/tools/rcc/data/sizes/size-2-0-35-1_python.expected32 b/tests/auto/tools/rcc/data/sizes/size-2-0-35-1_python.expected32 new file mode 100644 index 0000000000..0fa118d24f --- /dev/null +++ b/tests/auto/tools/rcc/data/sizes/size-2-0-35-1_python.expected32 @@ -0,0 +1,68 @@ +# Resource object code (Python 3) +# Created by: object code +# Created by: The Resource Compiler for Qt version 6.3.0 +# WARNING! All changes made in this file will be lost! + +from PySide6 import QtCore + +qt_resource_data = b"\ +\x00\x00\x00\x01\ +@\ +\ +\x00\x00\x00\x02\ +0\ +1\ +\x00\x00\x00#\ +0\ +123456789 012345\ +6789 0123456789 \ +12\ +\x00\x00\x00\x00\ +\ +" + +qt_resource_name = b"\ +\x00\x04\ +\x00\x06\xa8\xa1\ +\x00d\ +\x00a\x00t\x00a\ +\x00\x0a\ +\x04\x11\x0a\xb4\ +\x00d\ +\x00a\x00t\x00a\x00-\x001\x00.\x00t\x00x\x00t\ +\x00\x0a\ +\x04\x08\x0a\xb4\ +\x00d\ +\x00a\x00t\x00a\x00-\x002\x00.\x00t\x00x\x00t\ +\x00\x0b\ +\x00\xb5Ot\ +\x00d\ +\x00a\x00t\x00a\x00-\x003\x005\x00.\x00t\x00x\x00t\ +\x00\x0a\ +\x04\x0e\x0a\xb4\ +\x00d\ +\x00a\x00t\x00a\x00-\x000\x00.\x00t\x00x\x00t\ +" + +qt_resource_struct = b"\ +\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\ +\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x02\x00\x00\x00\x04\x00\x00\x00\x02\ +\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00B\x00\x00\x00\x00\x00\x01\x00\x00\x00\x0b\ +IGNORE: (time stamp) +\x00\x00\x00(\x00\x00\x00\x00\x00\x01\x00\x00\x00\x05\ +IGNORE: (time stamp) +\x00\x00\x00^\x00\x00\x00\x00\x00\x01\x00\x00\x002\ +IGNORE: (time stamp) +\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\ +IGNORE: (time stamp) +" + +def qInitResources(): + QtCore.qRegisterResourceData(0x03, qt_resource_struct, qt_resource_name, qt_resource_data) + +def qCleanupResources(): + QtCore.qUnregisterResourceData(0x03, qt_resource_struct, qt_resource_name, qt_resource_data) + +qInitResources() diff --git a/tests/auto/tools/rcc/rcc.pro b/tests/auto/tools/rcc/rcc.pro deleted file mode 100644 index 264b8ecc66..0000000000 --- a/tests/auto/tools/rcc/rcc.pro +++ /dev/null @@ -1,5 +0,0 @@ -CONFIG += testcase -QT = core testlib -TARGET = tst_rcc - -SOURCES += tst_rcc.cpp diff --git a/tests/auto/tools/rcc/tst_rcc.cpp b/tests/auto/tools/rcc/tst_rcc.cpp index 54a2854ede..88a6e17e2f 100644 --- a/tests/auto/tools/rcc/tst_rcc.cpp +++ b/tests/auto/tools/rcc/tst_rcc.cpp @@ -1,33 +1,9 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Giuseppe D'Angelo <dangelog@gmail.com> -** 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> +// Copyright (C) 2012 Giuseppe D'Angelo <dangelog@gmail.com> +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#include <QTest> +#include <QLibraryInfo> #include <QtCore/QString> #include <QtCore/QCoreApplication> #include <QtCore/QByteArray> @@ -46,6 +22,33 @@ typedef QMap<QString, QString> QStringMap; Q_DECLARE_METATYPE(QStringMap) +static QByteArray msgProcessStartFailed(const QProcess &p) +{ + const QString result = QLatin1String("Could not start \"") + + QDir::toNativeSeparators(p.program()) + QLatin1String("\": ") + + p.errorString(); + return result.toLocal8Bit(); +} + +static QByteArray msgProcessTimeout(const QProcess &p) +{ + return '"' + QDir::toNativeSeparators(p.program()).toLocal8Bit() + + "\" timed out."; +} + +static QByteArray msgProcessCrashed(QProcess &p) +{ + return '"' + QDir::toNativeSeparators(p.program()).toLocal8Bit() + + "\" crashed.\n" + p.readAllStandardError(); +} + +static QByteArray msgProcessFailed(QProcess &p) +{ + return '"' + QDir::toNativeSeparators(p.program()).toLocal8Bit() + + "\" returned " + QByteArray::number(p.exitCode()) + ":\n" + + p.readAllStandardError(); +} + class tst_rcc : public QObject { Q_OBJECT @@ -55,35 +58,41 @@ private slots: void rcc_data(); void rcc(); + void binary_data(); void binary(); + void readback_data(); + void readback(); + + void depFileGeneration_data(); + void depFileGeneration(); + + void python(); + void cleanupTestCase(); private: QString m_rcc; + QString m_dataPath; }; void tst_rcc::initTestCase() { - // rcc uses a QHash to store files in the resource system. - // we must force a certain hash order when testing or tst_rcc will fail, see QTBUG-25078 - QVERIFY(qputenv("QT_RCC_TEST", "1")); - m_rcc = QLibraryInfo::location(QLibraryInfo::BinariesPath) + QLatin1String("/rcc"); -} + m_rcc = QLibraryInfo::path(QLibraryInfo::LibraryExecutablesPath) + QLatin1String("/rcc"); -QString findExpectedFile(const QString &base) -{ - QString expectedrccfile = base; + m_dataPath = QFINDTESTDATA("data"); + QVERIFY(!m_dataPath.isEmpty()); +} - // Must be updated with each minor release. - if (QFileInfo(expectedrccfile + QLatin1String(".450")).exists()) - expectedrccfile += QLatin1String(".450"); - return expectedrccfile; +static inline bool isPythonComment(const QString &line) +{ + return line.startsWith(QLatin1Char('#')); } -static QString doCompare(const QStringList &actual, const QStringList &expected) +static QString doCompare(const QStringList &actual, const QStringList &expected, + const QString &timeStampPath) { if (actual.size() != expected.size()) { return QString("Length count different: actual: %1, expected: %2") @@ -91,13 +100,21 @@ static QString doCompare(const QStringList &actual, const QStringList &expected) } QByteArray ba; + const bool isPython = isPythonComment(expected.constFirst()); for (int i = 0, n = expected.size(); i != n; ++i) { QString expectedLine = expected.at(i); if (expectedLine.startsWith("IGNORE:")) continue; + if (isPython && isPythonComment(expectedLine) && isPythonComment(actual.at(i))) + continue; if (expectedLine.startsWith("TIMESTAMP:")) { const QString relativePath = expectedLine.mid(strlen("TIMESTAMP:")); - const quint64 timeStamp = QFileInfo(relativePath).lastModified().toMSecsSinceEpoch(); + const QFileInfo fi(timeStampPath + QLatin1Char('/') + relativePath); + if (!fi.isFile()) { + ba.append("File " + fi.absoluteFilePath().toUtf8() + " does not exist!"); + break; + } + const quint64 timeStamp = quint64(fi.lastModified(QTimeZone::UTC).toMSecsSinceEpoch()); expectedLine.clear(); for (int shift = 56; shift >= 0; shift -= 8) { expectedLine.append(QLatin1String("0x")); @@ -106,9 +123,9 @@ static QString doCompare(const QStringList &actual, const QStringList &expected) } } if (expectedLine != actual.at(i)) { - qDebug() << "LINES" << i << "DIFFER"; + qDebug() << "LINES" << (i + 1) << "DIFFER"; ba.append( - "\n<<<<<< actual\n" + actual.at(i) + "\n======\n" + expectedLine + "\n<<<<<< actual\n" + actual.at(i).toUtf8() + "\n======\n" + expectedLine.toUtf8() + "\n>>>>>> expected\n" ); } @@ -122,10 +139,27 @@ void tst_rcc::rcc_data() QTest::addColumn<QString>("qrcfile"); QTest::addColumn<QString>("expected"); - QString dataPath = QFINDTESTDATA("data/images/"); - if (dataPath.isEmpty()) - QFAIL("data path not found"); - QTest::newRow("images") << dataPath << "images.qrc" << "images.expected"; + const QString imagesPath = m_dataPath + QLatin1String("/images"); + QTest::newRow("images") << imagesPath << "images.qrc" << + (sizeof(size_t) == 8 ? "images.expected" : "images.expected32"); + + const QString sizesPath = m_dataPath + QLatin1String("/sizes"); + QTest::newRow("size-0") << sizesPath << "size-0.qrc" << "size-0.expected"; + QTest::newRow("size-1") << sizesPath << "size-1.qrc" << "size-1.expected"; + QTest::newRow("size-2-0-35-1") << sizesPath << "size-2-0-35-1.qrc" << + (sizeof(size_t) == 8 ? "size-2-0-35-1.expected" : "size-2-0-35-1.expected32"); +} + +static QStringList readLinesFromFile(const QString &fileName, + Qt::SplitBehavior splitBehavior) +{ + QFile file(fileName); + + bool ok = file.open(QIODevice::ReadOnly | QIODevice::Text); + if (!ok) + qWarning() << "Could not open testdata file" << fileName << ":" << file.errorString(); + + return QString::fromUtf8(file.readAll()).split(QLatin1Char('\n'), splitBehavior); } void tst_rcc::rcc() @@ -134,29 +168,24 @@ void tst_rcc::rcc() QFETCH(QString, qrcfile); QFETCH(QString, expected); - if (!QDir::setCurrent(directory)) { - QString message = QString::fromLatin1("Unable to cd from '%1' to '%2'").arg(QDir::currentPath(), directory); - QFAIL(qPrintable(message)); - } - // If the file expectedoutput.txt exists, compare the // console output with the content of that file - const QString expected2 = findExpectedFile(expected); - QFile expectedFile(expected2); - if (!expectedFile.exists()) { - qDebug() << "NO EXPECTATIONS? " << expected2; - return; - } - // Launch + // Launch; force no compression, otherwise the output would be different + // depending on the compression algorithm we're using QProcess process; - process.start(m_rcc, QStringList(qrcfile)); + process.setWorkingDirectory(directory); + process.start(m_rcc, { "-no-compress", qrcfile }); + QVERIFY2(process.waitForStarted(), msgProcessStartFailed(process).constData()); if (!process.waitForFinished()) { - const QString path = QString::fromLocal8Bit(qgetenv("PATH")); - QString message = QString::fromLatin1("'%1' could not be found when run from '%2'. Path: '%3' "). - arg(m_rcc, QDir::currentPath(), path); - QFAIL(qPrintable(message)); + process.kill(); + QFAIL(msgProcessTimeout(process).constData()); } + QVERIFY2(process.exitStatus() == QProcess::NormalExit, + msgProcessCrashed(process).constData()); + QVERIFY2(process.exitCode() == 0, + msgProcessFailed(process).constData()); + const QChar cr = QLatin1Char('\r'); const QString err = QString::fromLocal8Bit(process.readAllStandardError()).remove(cr); const QString out = QString::fromLatin1(process.readAllStandardOutput()).remove(cr); @@ -169,63 +198,21 @@ void tst_rcc::rcc() const QChar nl = QLatin1Char('\n'); const QStringList actualLines = out.split(nl); - QVERIFY(expectedFile.open(QIODevice::ReadOnly|QIODevice::Text)); - const QStringList expectedLines = QString::fromLatin1(expectedFile.readAll()).split(nl); + const QStringList expectedLines = + readLinesFromFile(directory + QLatin1Char('/') + expected, Qt::KeepEmptyParts); + QVERIFY(!expectedLines.isEmpty()); - const QString diff = doCompare(actualLines, expectedLines); + const QString diff = doCompare(actualLines, expectedLines, directory); if (diff.size()) QFAIL(qPrintable(diff)); } - - -static void createRccBinaryData(const QString &rcc, const QString &baseDir, - const QString &qrcFileName, const QString &rccFileName) -{ - QString currentDir = QDir::currentPath(); - QDir::setCurrent(baseDir); - - QProcess rccProcess; - rccProcess.start(rcc, QStringList() << "-binary" << "-o" << rccFileName << qrcFileName); - bool ok = rccProcess.waitForFinished(); - if (!ok) { - QString errorString = QString::fromLatin1("Could not start rcc (is it in PATH?): %1").arg(rccProcess.errorString()); - QFAIL(qPrintable(errorString)); - } - - QByteArray output = rccProcess.readAllStandardOutput(); - if (!output.isEmpty()) { - QString errorMessage = QString::fromLatin1("rcc stdout: %1").arg(QString::fromLocal8Bit(output)); - QWARN(qPrintable(errorMessage)); - } - - output = rccProcess.readAllStandardError(); - if (!output.isEmpty()) { - QString errorMessage = QString::fromLatin1("rcc stderr: %1").arg(QString::fromLocal8Bit(output)); - QWARN(qPrintable(errorMessage)); - } - - QDir::setCurrent(currentDir); -} - -static QStringList readLinesFromFile(const QString &fileName) -{ - QFile file(fileName); - - bool ok = file.open(QIODevice::ReadOnly | QIODevice::Text); - if (!ok) - QWARN(qPrintable(QString::fromLatin1("Could not open testdata file %1: %2").arg(fileName, file.errorString()))); - - QStringList lines = QString::fromUtf8(file.readAll()).split(QLatin1Char('\n'), QString::SkipEmptyParts); - return lines; -} - static QStringMap readExpectedFiles(const QString &fileName) { QStringMap expectedFiles; - QStringList lines = readLinesFromFile(fileName); - foreach (const QString &line, lines) { + const QStringList lines = readLinesFromFile(fileName, Qt::SkipEmptyParts); + for (const QString &line : lines) { QString resourceFileName = line.section(QLatin1Char(' '), 0, 0, QString::SectionSkipEmpty); QString actualFileName = line.section(QLatin1Char(' '), 1, 1, QString::SectionSkipEmpty); expectedFiles[resourceFileName] = actualFileName; @@ -255,24 +242,42 @@ void tst_rcc::binary_data() QTest::addColumn<QString>("baseDirectory"); QTest::addColumn<QStringMap>("expectedFiles"); - QString dataPath = QFINDTESTDATA("data/binary/"); - if (dataPath.isEmpty()) - QFAIL("data path not found"); + QString dataPath = m_dataPath + QLatin1String("/binary/"); QDirIterator iter(dataPath, QStringList() << QLatin1String("*.qrc")); while (iter.hasNext()) { - iter.next(); - QFileInfo qrcFileInfo = iter.fileInfo(); + QFileInfo qrcFileInfo = iter.nextFileInfo(); QString absoluteBaseName = QFileInfo(qrcFileInfo.absolutePath(), qrcFileInfo.baseName()).absoluteFilePath(); QString rccFileName = absoluteBaseName + QLatin1String(".rcc"); - createRccBinaryData(m_rcc, dataPath, qrcFileInfo.absoluteFilePath(), rccFileName); + + // same as above: force no compression + QProcess rccProcess; + rccProcess.setWorkingDirectory(dataPath); + rccProcess.start(m_rcc, { "-binary", "-no-compress", "-o", rccFileName, qrcFileInfo.absoluteFilePath() }); + QVERIFY2(rccProcess.waitForStarted(), msgProcessStartFailed(rccProcess).constData()); + if (!rccProcess.waitForFinished()) { + rccProcess.kill(); + QFAIL(msgProcessTimeout(rccProcess).constData()); + } + QVERIFY2(rccProcess.exitStatus() == QProcess::NormalExit, + msgProcessCrashed(rccProcess).constData()); + QVERIFY2(rccProcess.exitCode() == 0, + msgProcessFailed(rccProcess).constData()); + + QByteArray output = rccProcess.readAllStandardOutput(); + if (!output.isEmpty()) + qWarning("rcc stdout: %s", output.constData()); + + output = rccProcess.readAllStandardError(); + if (!output.isEmpty()) + qWarning("rcc stderr: %s", output.constData()); QString localeFileName = absoluteBaseName + QLatin1String(".locale"); QFile localeFile(localeFileName); if (localeFile.exists()) { - QStringList locales = readLinesFromFile(localeFileName); - foreach (const QString &locale, locales) { + const QStringList locales = readLinesFromFile(localeFileName, Qt::SkipEmptyParts); + for (const QString &locale : locales) { QString expectedFileName = QString::fromLatin1("%1.%2.%3").arg(absoluteBaseName, locale, QLatin1String("expected")); QStringMap expectedFiles = readExpectedFiles(expectedFileName); QTest::newRow(qPrintable(qrcFileInfo.baseName() + QLatin1Char('_') + locale)) << rccFileName @@ -353,15 +358,122 @@ void tst_rcc::binary() QLocale::setDefault(oldDefaultLocale); } +void tst_rcc::readback_data() +{ + QTest::addColumn<QString>("resourceName"); + QTest::addColumn<QString>("fileSystemName"); + + QTest::newRow("data-0") << ":data/data-0.txt" << "sizes/data/data-0.txt"; + QTest::newRow("data-1") << ":data/data-1.txt" << "sizes/data/data-1.txt"; + QTest::newRow("data-2") << ":data/data-2.txt" << "sizes/data/data-2.txt"; + QTest::newRow("data-35") << ":data/data-35.txt" << "sizes/data/data-35.txt"; + QTest::newRow("circle") << ":images/circle.png" << "images/images/circle.png"; + QTest::newRow("square") << ":images/square.png" << "images/images/square.png"; + QTest::newRow("triangle") << ":images/subdir/triangle.png" + << "images/images/subdir/triangle.png"; +} + +void tst_rcc::readback() +{ + QFETCH(QString, resourceName); + QFETCH(QString, fileSystemName); + + QFile resourceFile(resourceName); + QVERIFY(resourceFile.open(QIODevice::ReadOnly)); + QByteArray resourceData = resourceFile.readAll(); + resourceFile.close(); + + QFile fileSystemFile(m_dataPath + QLatin1Char('/') + fileSystemName); + QVERIFY(fileSystemFile.open(QIODevice::ReadOnly)); + QByteArray fileSystemData = fileSystemFile.readAll(); + fileSystemFile.close(); + + QCOMPARE(resourceData, fileSystemData); +} + +void tst_rcc::depFileGeneration_data() +{ + QTest::addColumn<QString>("qrcfile"); + QTest::addColumn<QString>("depfile"); + QTest::addColumn<QString>("expected"); + + QTest::newRow("simple") << "simple.qrc" << "simple.d" + << (sizeof(size_t) == 8 ? "simple.d.expected" : "simple.d.expected32"); + QTest::newRow("specialchar") << "specialchar.qrc" << "specialchar.d" << "specialchar.d.expected"; +} + +void tst_rcc::depFileGeneration() +{ + QFETCH(QString, qrcfile); + QFETCH(QString, depfile); + QFETCH(QString, expected); + const QString directory = m_dataPath + QLatin1String("/depfile"); + + QProcess process; + process.setWorkingDirectory(directory); + process.start(m_rcc, { "-d", depfile, "-o", qrcfile + ".cpp", qrcfile }); + QVERIFY2(process.waitForStarted(), msgProcessStartFailed(process).constData()); + if (!process.waitForFinished()) { + process.kill(); + QFAIL(msgProcessTimeout(process).constData()); + } + QVERIFY2(process.exitStatus() == QProcess::NormalExit, + msgProcessCrashed(process).constData()); + QVERIFY2(process.exitCode() == 0, + msgProcessFailed(process).constData()); + + QFile depFileOutput(directory + QLatin1String("/") + depfile); + QVERIFY(depFileOutput.open(QIODevice::ReadOnly | QIODevice::Text)); + QByteArray depFileData = depFileOutput.readAll(); + depFileOutput.close(); + + QFile depFileExpected(directory + QLatin1String("/") + expected); + QVERIFY(depFileExpected.open(QIODevice::ReadOnly | QIODevice::Text)); + QByteArray expectedData = depFileExpected.readAll(); + depFileExpected.close(); + + QCOMPARE(depFileData, expectedData); +} + +void tst_rcc::python() +{ + const QString path = m_dataPath + QLatin1String("/sizes"); + const QString testFileRoot = path + QLatin1String("/size-2-0-35-1"); + const QString qrcFile = testFileRoot + QLatin1String(".qrc"); + QString expectedFile = testFileRoot + QLatin1String("_python.expected"); + if (sizeof(size_t) == 4) + expectedFile += QLatin1String("32"); + const QString actualFile = testFileRoot + QLatin1String(".rcc"); + + QProcess process; + process.setWorkingDirectory(path); + process.start(m_rcc, { "-g", "python", "-o", actualFile, qrcFile}); + QVERIFY2(process.waitForStarted(), msgProcessStartFailed(process).constData()); + if (!process.waitForFinished()) { + process.kill(); + QFAIL(msgProcessTimeout(process).constData()); + } + QVERIFY2(process.exitStatus() == QProcess::NormalExit, + msgProcessCrashed(process).constData()); + QVERIFY2(process.exitCode() == 0, + msgProcessFailed(process).constData()); + + const auto actualLines = readLinesFromFile(actualFile, Qt::KeepEmptyParts); + QVERIFY(!actualLines.isEmpty()); + const auto expectedLines = readLinesFromFile(expectedFile, Qt::KeepEmptyParts); + QVERIFY(!expectedLines.isEmpty()); + const QString diff = doCompare(actualLines, expectedLines, path); + if (!diff.isEmpty()) + QFAIL(qPrintable(diff)); +} void tst_rcc::cleanupTestCase() { - QString dataPath = QFINDTESTDATA("data/binary/"); - if (dataPath.isEmpty()) - return; - QDir dataDir(dataPath); + QDir dataDir(m_dataPath + QLatin1String("/binary")); QFileInfoList entries = dataDir.entryInfoList(QStringList() << QLatin1String("*.rcc")); - foreach (const QFileInfo &entry, entries) + QDir dataDepDir(m_dataPath + QLatin1String("/depfile")); + entries += dataDepDir.entryInfoList({QLatin1String("*.d"), QLatin1String("*.qrc.cpp")}); + for (const QFileInfo &entry : std::as_const(entries)) QFile::remove(entry.absoluteFilePath()); } diff --git a/tests/auto/tools/tools.pro b/tests/auto/tools/tools.pro deleted file mode 100644 index 7e4dc67b09..0000000000 --- a/tests/auto/tools/tools.pro +++ /dev/null @@ -1,10 +0,0 @@ -TEMPLATE=subdirs -SUBDIRS=\ - qmakelib \ - qmake \ - uic \ - moc \ - rcc \ - -qtHaveModule(dbus): SUBDIRS += qdbuscpp2xml qdbusxml2cpp -!qtHaveModule(widgets): SUBDIRS -= uic diff --git a/tests/auto/tools/uic/CMakeLists.txt b/tests/auto/tools/uic/CMakeLists.txt new file mode 100644 index 0000000000..2a1d4b5164 --- /dev/null +++ b/tests/auto/tools/uic/CMakeLists.txt @@ -0,0 +1,22 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + +##################################################################### +## tst_uic Test: +##################################################################### + +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_uic LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + +qt_internal_add_test(tst_uic + SOURCES + tst_uic.cpp +) + +# Add dependencies that are implicitly used inside the test +add_dependencies(tst_uic + Qt::uic +) diff --git a/tests/auto/tools/uic/baseline/Dialog_with_Buttons_Bottom.ui.h b/tests/auto/tools/uic/baseline/Dialog_with_Buttons_Bottom.ui.h index 1f5004b2aa..acf202fe8a 100644 --- a/tests/auto/tools/uic/baseline/Dialog_with_Buttons_Bottom.ui.h +++ b/tests/auto/tools/uic/baseline/Dialog_with_Buttons_Bottom.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'Dialog_with_Buttons_Bottom.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -10,6 +10,7 @@ #define DIALOG_WITH_BUTTONS_BOTTOM_H #include <QtCore/QVariant> +#include <QtWidgets/QAbstractButton> #include <QtWidgets/QApplication> #include <QtWidgets/QDialog> #include <QtWidgets/QDialogButtonBox> @@ -24,24 +25,24 @@ public: void setupUi(QDialog *Dialog) { if (Dialog->objectName().isEmpty()) - Dialog->setObjectName(QString::fromUtf8("Dialog")); + Dialog->setObjectName("Dialog"); Dialog->resize(400, 300); buttonBox = new QDialogButtonBox(Dialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName("buttonBox"); buttonBox->setGeometry(QRect(30, 240, 341, 32)); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); retranslateUi(Dialog); - QObject::connect(buttonBox, SIGNAL(accepted()), Dialog, SLOT(accept())); - QObject::connect(buttonBox, SIGNAL(rejected()), Dialog, SLOT(reject())); + QObject::connect(buttonBox, &QDialogButtonBox::accepted, Dialog, qOverload<>(&QDialog::accept)); + QObject::connect(buttonBox, &QDialogButtonBox::rejected, Dialog, qOverload<>(&QDialog::reject)); QMetaObject::connectSlotsByName(Dialog); } // setupUi void retranslateUi(QDialog *Dialog) { - Dialog->setWindowTitle(QApplication::translate("Dialog", "Dialog", nullptr)); + Dialog->setWindowTitle(QCoreApplication::translate("Dialog", "Dialog", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/Dialog_with_Buttons_Right.ui.h b/tests/auto/tools/uic/baseline/Dialog_with_Buttons_Right.ui.h index 8dd8b11b62..d8dc7ffd70 100644 --- a/tests/auto/tools/uic/baseline/Dialog_with_Buttons_Right.ui.h +++ b/tests/auto/tools/uic/baseline/Dialog_with_Buttons_Right.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'Dialog_with_Buttons_Right.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -10,6 +10,7 @@ #define DIALOG_WITH_BUTTONS_RIGHT_H #include <QtCore/QVariant> +#include <QtWidgets/QAbstractButton> #include <QtWidgets/QApplication> #include <QtWidgets/QDialog> #include <QtWidgets/QDialogButtonBox> @@ -24,24 +25,24 @@ public: void setupUi(QDialog *Dialog) { if (Dialog->objectName().isEmpty()) - Dialog->setObjectName(QString::fromUtf8("Dialog")); + Dialog->setObjectName("Dialog"); Dialog->resize(400, 300); buttonBox = new QDialogButtonBox(Dialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName("buttonBox"); buttonBox->setGeometry(QRect(290, 20, 81, 241)); buttonBox->setOrientation(Qt::Vertical); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); retranslateUi(Dialog); - QObject::connect(buttonBox, SIGNAL(accepted()), Dialog, SLOT(accept())); - QObject::connect(buttonBox, SIGNAL(rejected()), Dialog, SLOT(reject())); + QObject::connect(buttonBox, &QDialogButtonBox::accepted, Dialog, qOverload<>(&QDialog::accept)); + QObject::connect(buttonBox, &QDialogButtonBox::rejected, Dialog, qOverload<>(&QDialog::reject)); QMetaObject::connectSlotsByName(Dialog); } // setupUi void retranslateUi(QDialog *Dialog) { - Dialog->setWindowTitle(QApplication::translate("Dialog", "Dialog", nullptr)); + Dialog->setWindowTitle(QCoreApplication::translate("Dialog", "Dialog", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/Dialog_without_Buttons.ui.h b/tests/auto/tools/uic/baseline/Dialog_without_Buttons.ui.h index 95acabf3f8..747b0fd280 100644 --- a/tests/auto/tools/uic/baseline/Dialog_without_Buttons.ui.h +++ b/tests/auto/tools/uic/baseline/Dialog_without_Buttons.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'Dialog_without_Buttons.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -22,7 +22,7 @@ public: void setupUi(QDialog *Dialog) { if (Dialog->objectName().isEmpty()) - Dialog->setObjectName(QString::fromUtf8("Dialog")); + Dialog->setObjectName("Dialog"); Dialog->resize(400, 300); retranslateUi(Dialog); @@ -32,7 +32,7 @@ public: void retranslateUi(QDialog *Dialog) { - Dialog->setWindowTitle(QApplication::translate("Dialog", "Dialog", nullptr)); + Dialog->setWindowTitle(QCoreApplication::translate("Dialog", "Dialog", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/Main_Window.ui.h b/tests/auto/tools/uic/baseline/Main_Window.ui.h index 9e59e9f2e5..1bc02fb97d 100644 --- a/tests/auto/tools/uic/baseline/Main_Window.ui.h +++ b/tests/auto/tools/uic/baseline/Main_Window.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'Main_Window.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -28,16 +28,16 @@ public: void setupUi(QMainWindow *MainWindow) { if (MainWindow->objectName().isEmpty()) - MainWindow->setObjectName(QString::fromUtf8("MainWindow")); + MainWindow->setObjectName("MainWindow"); MainWindow->resize(800, 600); menubar = new QMenuBar(MainWindow); - menubar->setObjectName(QString::fromUtf8("menubar")); + menubar->setObjectName("menubar"); MainWindow->setMenuBar(menubar); centralwidget = new QWidget(MainWindow); - centralwidget->setObjectName(QString::fromUtf8("centralwidget")); + centralwidget->setObjectName("centralwidget"); MainWindow->setCentralWidget(centralwidget); statusbar = new QStatusBar(MainWindow); - statusbar->setObjectName(QString::fromUtf8("statusbar")); + statusbar->setObjectName("statusbar"); MainWindow->setStatusBar(statusbar); retranslateUi(MainWindow); @@ -47,7 +47,7 @@ public: void retranslateUi(QMainWindow *MainWindow) { - MainWindow->setWindowTitle(QApplication::translate("MainWindow", "MainWindow", nullptr)); + MainWindow->setWindowTitle(QCoreApplication::translate("MainWindow", "MainWindow", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/Widget.ui.h b/tests/auto/tools/uic/baseline/Widget.ui.h index 4318c2262f..4d4846e6c5 100644 --- a/tests/auto/tools/uic/baseline/Widget.ui.h +++ b/tests/auto/tools/uic/baseline/Widget.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'Widget.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -30,22 +30,22 @@ public: void setupUi(QWidget *Form) { if (Form->objectName().isEmpty()) - Form->setObjectName(QString::fromUtf8("Form")); + Form->setObjectName("Form"); Form->resize(400, 300); vboxLayout = new QVBoxLayout(Form); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); Alabel = new QLabel(Form); - Alabel->setObjectName(QString::fromUtf8("Alabel")); + Alabel->setObjectName("Alabel"); vboxLayout->addWidget(Alabel); groupBox = new QGroupBox(Form); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName("groupBox"); vboxLayout->addWidget(groupBox); pushButton = new QPushButton(Form); - pushButton->setObjectName(QString::fromUtf8("pushButton")); + pushButton->setObjectName("pushButton"); vboxLayout->addWidget(pushButton); @@ -57,13 +57,13 @@ public: void retranslateUi(QWidget *Form) { - Form->setWindowTitle(QApplication::translate("Form", "Form", nullptr)); - Alabel->setText(QApplication::translate("Form", "A label.\n" + Form->setWindowTitle(QCoreApplication::translate("Form", "Form", nullptr)); + Alabel->setText(QCoreApplication::translate("Form", "A label.\n" "One new line.\n" "Another new line.\n" "Last line.", nullptr)); - groupBox->setTitle(QApplication::translate("Form", "A Group Box", nullptr)); - pushButton->setText(QApplication::translate("Form", "PushButton", nullptr)); + groupBox->setTitle(QCoreApplication::translate("Form", "A Group Box", nullptr)); + pushButton->setText(QCoreApplication::translate("Form", "PushButton", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/addlinkdialog.ui.h b/tests/auto/tools/uic/baseline/addlinkdialog.ui.h index 17f51a92f8..70c1fc36b7 100644 --- a/tests/auto/tools/uic/baseline/addlinkdialog.ui.h +++ b/tests/auto/tools/uic/baseline/addlinkdialog.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'addlinkdialog.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -10,6 +10,7 @@ #define ADDLINKDIALOG_H #include <QtCore/QVariant> +#include <QtWidgets/QAbstractButton> #include <QtWidgets/QApplication> #include <QtWidgets/QDialog> #include <QtWidgets/QDialogButtonBox> @@ -38,50 +39,50 @@ public: void setupUi(QDialog *AddLinkDialog) { if (AddLinkDialog->objectName().isEmpty()) - AddLinkDialog->setObjectName(QString::fromUtf8("AddLinkDialog")); + AddLinkDialog->setObjectName("AddLinkDialog"); AddLinkDialog->setSizeGripEnabled(false); AddLinkDialog->setModal(true); verticalLayout = new QVBoxLayout(AddLinkDialog); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + verticalLayout->setObjectName("verticalLayout"); formLayout = new QFormLayout(); - formLayout->setObjectName(QString::fromUtf8("formLayout")); + formLayout->setObjectName("formLayout"); label = new QLabel(AddLinkDialog); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName("label"); formLayout->setWidget(0, QFormLayout::LabelRole, label); titleInput = new QLineEdit(AddLinkDialog); - titleInput->setObjectName(QString::fromUtf8("titleInput")); + titleInput->setObjectName("titleInput"); titleInput->setMinimumSize(QSize(337, 0)); formLayout->setWidget(0, QFormLayout::FieldRole, titleInput); label_2 = new QLabel(AddLinkDialog); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName("label_2"); formLayout->setWidget(1, QFormLayout::LabelRole, label_2); urlInput = new QLineEdit(AddLinkDialog); - urlInput->setObjectName(QString::fromUtf8("urlInput")); + urlInput->setObjectName("urlInput"); formLayout->setWidget(1, QFormLayout::FieldRole, urlInput); verticalLayout->addLayout(formLayout); - verticalSpacer = new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding); + verticalSpacer = new QSpacerItem(0, 0, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Expanding); verticalLayout->addItem(verticalSpacer); line = new QFrame(AddLinkDialog); - line->setObjectName(QString::fromUtf8("line")); - line->setFrameShape(QFrame::HLine); - line->setFrameShadow(QFrame::Sunken); + line->setObjectName("line"); + line->setFrameShape(QFrame::Shape::HLine); + line->setFrameShadow(QFrame::Shadow::Sunken); verticalLayout->addWidget(line); buttonBox = new QDialogButtonBox(AddLinkDialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName("buttonBox"); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); @@ -89,17 +90,17 @@ public: retranslateUi(AddLinkDialog); - QObject::connect(buttonBox, SIGNAL(accepted()), AddLinkDialog, SLOT(accept())); - QObject::connect(buttonBox, SIGNAL(rejected()), AddLinkDialog, SLOT(reject())); + QObject::connect(buttonBox, &QDialogButtonBox::accepted, AddLinkDialog, qOverload<>(&QDialog::accept)); + QObject::connect(buttonBox, &QDialogButtonBox::rejected, AddLinkDialog, qOverload<>(&QDialog::reject)); QMetaObject::connectSlotsByName(AddLinkDialog); } // setupUi void retranslateUi(QDialog *AddLinkDialog) { - AddLinkDialog->setWindowTitle(QApplication::translate("AddLinkDialog", "Insert Link", nullptr)); - label->setText(QApplication::translate("AddLinkDialog", "Title:", nullptr)); - label_2->setText(QApplication::translate("AddLinkDialog", "URL:", nullptr)); + AddLinkDialog->setWindowTitle(QCoreApplication::translate("AddLinkDialog", "Insert Link", nullptr)); + label->setText(QCoreApplication::translate("AddLinkDialog", "Title:", nullptr)); + label_2->setText(QCoreApplication::translate("AddLinkDialog", "URL:", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/addtorrentform.ui.h b/tests/auto/tools/uic/baseline/addtorrentform.ui.h index d259a011bf..93b1272633 100644 --- a/tests/auto/tools/uic/baseline/addtorrentform.ui.h +++ b/tests/auto/tools/uic/baseline/addtorrentform.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'addtorrentform.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -56,7 +56,7 @@ public: void setupUi(QDialog *AddTorrentFile) { if (AddTorrentFile->objectName().isEmpty()) - AddTorrentFile->setObjectName(QString::fromUtf8("AddTorrentFile")); + AddTorrentFile->setObjectName("AddTorrentFile"); AddTorrentFile->resize(464, 385); AddTorrentFile->setSizeGripEnabled(false); AddTorrentFile->setModal(true); @@ -65,56 +65,56 @@ public: vboxLayout->setSpacing(6); #endif vboxLayout->setContentsMargins(8, 8, 8, 8); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); groupBox = new QGroupBox(AddTorrentFile); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName("groupBox"); widget = new QWidget(groupBox); - widget->setObjectName(QString::fromUtf8("widget")); + widget->setObjectName("widget"); widget->setGeometry(QRect(10, 40, 364, 33)); gridLayout = new QGridLayout(groupBox); #ifndef Q_OS_MAC gridLayout->setSpacing(6); #endif gridLayout->setContentsMargins(8, 8, 8, 8); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); label_4 = new QLabel(groupBox); - label_4->setObjectName(QString::fromUtf8("label_4")); + label_4->setObjectName("label_4"); gridLayout->addWidget(label_4, 6, 0, 1, 1); torrentFile = new QLineEdit(groupBox); - torrentFile->setObjectName(QString::fromUtf8("torrentFile")); + torrentFile->setObjectName("torrentFile"); gridLayout->addWidget(torrentFile, 0, 1, 1, 2); label_2 = new QLabel(groupBox); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName("label_2"); gridLayout->addWidget(label_2, 1, 0, 1, 1); browseTorrents = new QPushButton(groupBox); - browseTorrents->setObjectName(QString::fromUtf8("browseTorrents")); + browseTorrents->setObjectName("browseTorrents"); gridLayout->addWidget(browseTorrents, 0, 3, 1, 1); label_5 = new QLabel(groupBox); - label_5->setObjectName(QString::fromUtf8("label_5")); + label_5->setObjectName("label_5"); label_5->setAlignment(Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop); gridLayout->addWidget(label_5, 5, 0, 1, 1); label_3 = new QLabel(groupBox); - label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setObjectName("label_3"); gridLayout->addWidget(label_3, 4, 0, 1, 1); label_6 = new QLabel(groupBox); - label_6->setObjectName(QString::fromUtf8("label_6")); + label_6->setObjectName("label_6"); gridLayout->addWidget(label_6, 2, 0, 1, 1); torrentContents = new QTextEdit(groupBox); - torrentContents->setObjectName(QString::fromUtf8("torrentContents")); + torrentContents->setObjectName("torrentContents"); torrentContents->setFocusPolicy(Qt::NoFocus); torrentContents->setTabChangesFocus(true); torrentContents->setLineWrapMode(QTextEdit::NoWrap); @@ -123,43 +123,43 @@ public: gridLayout->addWidget(torrentContents, 5, 1, 1, 3); destinationFolder = new QLineEdit(groupBox); - destinationFolder->setObjectName(QString::fromUtf8("destinationFolder")); + destinationFolder->setObjectName("destinationFolder"); destinationFolder->setFocusPolicy(Qt::StrongFocus); gridLayout->addWidget(destinationFolder, 6, 1, 1, 2); announceUrl = new QLabel(groupBox); - announceUrl->setObjectName(QString::fromUtf8("announceUrl")); + announceUrl->setObjectName("announceUrl"); gridLayout->addWidget(announceUrl, 1, 1, 1, 3); label = new QLabel(groupBox); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName("label"); gridLayout->addWidget(label, 0, 0, 1, 1); browseDestination = new QPushButton(groupBox); - browseDestination->setObjectName(QString::fromUtf8("browseDestination")); + browseDestination->setObjectName("browseDestination"); gridLayout->addWidget(browseDestination, 6, 3, 1, 1); label_7 = new QLabel(groupBox); - label_7->setObjectName(QString::fromUtf8("label_7")); + label_7->setObjectName("label_7"); gridLayout->addWidget(label_7, 3, 0, 1, 1); commentLabel = new QLabel(groupBox); - commentLabel->setObjectName(QString::fromUtf8("commentLabel")); + commentLabel->setObjectName("commentLabel"); gridLayout->addWidget(commentLabel, 3, 1, 1, 3); creatorLabel = new QLabel(groupBox); - creatorLabel->setObjectName(QString::fromUtf8("creatorLabel")); + creatorLabel->setObjectName("creatorLabel"); gridLayout->addWidget(creatorLabel, 2, 1, 1, 3); sizeLabel = new QLabel(groupBox); - sizeLabel->setObjectName(QString::fromUtf8("sizeLabel")); + sizeLabel->setObjectName("sizeLabel"); gridLayout->addWidget(sizeLabel, 4, 1, 1, 3); @@ -171,19 +171,19 @@ public: hboxLayout->setSpacing(6); #endif hboxLayout->setContentsMargins(0, 0, 0, 0); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); - spacerItem = new QSpacerItem(131, 31, QSizePolicy::Expanding, QSizePolicy::Minimum); + hboxLayout->setObjectName("hboxLayout"); + spacerItem = new QSpacerItem(131, 31, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); hboxLayout->addItem(spacerItem); okButton = new QPushButton(AddTorrentFile); - okButton->setObjectName(QString::fromUtf8("okButton")); + okButton->setObjectName("okButton"); okButton->setEnabled(false); hboxLayout->addWidget(okButton); cancelButton = new QPushButton(AddTorrentFile); - cancelButton->setObjectName(QString::fromUtf8("cancelButton")); + cancelButton->setObjectName("cancelButton"); hboxLayout->addWidget(cancelButton); @@ -198,8 +198,8 @@ public: QWidget::setTabOrder(okButton, cancelButton); retranslateUi(AddTorrentFile); - QObject::connect(okButton, SIGNAL(clicked()), AddTorrentFile, SLOT(accept())); - QObject::connect(cancelButton, SIGNAL(clicked()), AddTorrentFile, SLOT(reject())); + QObject::connect(okButton, &QPushButton::clicked, AddTorrentFile, qOverload<>(&QDialog::accept)); + QObject::connect(cancelButton, &QPushButton::clicked, AddTorrentFile, qOverload<>(&QDialog::reject)); browseTorrents->setDefault(true); @@ -209,23 +209,23 @@ public: void retranslateUi(QDialog *AddTorrentFile) { - AddTorrentFile->setWindowTitle(QApplication::translate("AddTorrentFile", "Add a torrent", nullptr)); - groupBox->setTitle(QApplication::translate("AddTorrentFile", "Select a torrent source", nullptr)); - label_4->setText(QApplication::translate("AddTorrentFile", "Destination:", nullptr)); - label_2->setText(QApplication::translate("AddTorrentFile", "Tracker URL:", nullptr)); - browseTorrents->setText(QApplication::translate("AddTorrentFile", "Browse", nullptr)); - label_5->setText(QApplication::translate("AddTorrentFile", "File(s):", nullptr)); - label_3->setText(QApplication::translate("AddTorrentFile", "Size:", nullptr)); - label_6->setText(QApplication::translate("AddTorrentFile", "Creator:", nullptr)); - announceUrl->setText(QApplication::translate("AddTorrentFile", "<none>", nullptr)); - label->setText(QApplication::translate("AddTorrentFile", "Torrent file:", nullptr)); - browseDestination->setText(QApplication::translate("AddTorrentFile", "Browse", nullptr)); - label_7->setText(QApplication::translate("AddTorrentFile", "Comment:", nullptr)); - commentLabel->setText(QApplication::translate("AddTorrentFile", "<none>", nullptr)); - creatorLabel->setText(QApplication::translate("AddTorrentFile", "<none>", nullptr)); - sizeLabel->setText(QApplication::translate("AddTorrentFile", "0", nullptr)); - okButton->setText(QApplication::translate("AddTorrentFile", "&OK", nullptr)); - cancelButton->setText(QApplication::translate("AddTorrentFile", "&Cancel", nullptr)); + AddTorrentFile->setWindowTitle(QCoreApplication::translate("AddTorrentFile", "Add a torrent", nullptr)); + groupBox->setTitle(QCoreApplication::translate("AddTorrentFile", "Select a torrent source", nullptr)); + label_4->setText(QCoreApplication::translate("AddTorrentFile", "Destination:", nullptr)); + label_2->setText(QCoreApplication::translate("AddTorrentFile", "Tracker URL:", nullptr)); + browseTorrents->setText(QCoreApplication::translate("AddTorrentFile", "Browse", nullptr)); + label_5->setText(QCoreApplication::translate("AddTorrentFile", "File(s):", nullptr)); + label_3->setText(QCoreApplication::translate("AddTorrentFile", "Size:", nullptr)); + label_6->setText(QCoreApplication::translate("AddTorrentFile", "Creator:", nullptr)); + announceUrl->setText(QCoreApplication::translate("AddTorrentFile", "<none>", nullptr)); + label->setText(QCoreApplication::translate("AddTorrentFile", "Torrent file:", nullptr)); + browseDestination->setText(QCoreApplication::translate("AddTorrentFile", "Browse", nullptr)); + label_7->setText(QCoreApplication::translate("AddTorrentFile", "Comment:", nullptr)); + commentLabel->setText(QCoreApplication::translate("AddTorrentFile", "<none>", nullptr)); + creatorLabel->setText(QCoreApplication::translate("AddTorrentFile", "<none>", nullptr)); + sizeLabel->setText(QCoreApplication::translate("AddTorrentFile", "0", nullptr)); + okButton->setText(QCoreApplication::translate("AddTorrentFile", "&OK", nullptr)); + cancelButton->setText(QCoreApplication::translate("AddTorrentFile", "&Cancel", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/authenticationdialog.ui.h b/tests/auto/tools/uic/baseline/authenticationdialog.ui.h index 16c9ce16a8..a3e75b7a50 100644 --- a/tests/auto/tools/uic/baseline/authenticationdialog.ui.h +++ b/tests/auto/tools/uic/baseline/authenticationdialog.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'authenticationdialog.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -10,6 +10,7 @@ #define AUTHENTICATIONDIALOG_H #include <QtCore/QVariant> +#include <QtWidgets/QAbstractButton> #include <QtWidgets/QApplication> #include <QtWidgets/QDialog> #include <QtWidgets/QDialogButtonBox> @@ -37,78 +38,77 @@ public: void setupUi(QDialog *Dialog) { if (Dialog->objectName().isEmpty()) - Dialog->setObjectName(QString::fromUtf8("Dialog")); + Dialog->setObjectName("Dialog"); Dialog->resize(389, 243); gridLayout = new QGridLayout(Dialog); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); label = new QLabel(Dialog); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName("label"); label->setWordWrap(false); gridLayout->addWidget(label, 0, 0, 1, 2); label_2 = new QLabel(Dialog); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName("label_2"); gridLayout->addWidget(label_2, 2, 0, 1, 1); userEdit = new QLineEdit(Dialog); - userEdit->setObjectName(QString::fromUtf8("userEdit")); + userEdit->setObjectName("userEdit"); gridLayout->addWidget(userEdit, 2, 1, 1, 1); label_3 = new QLabel(Dialog); - label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setObjectName("label_3"); gridLayout->addWidget(label_3, 3, 0, 1, 1); passwordEdit = new QLineEdit(Dialog); - passwordEdit->setObjectName(QString::fromUtf8("passwordEdit")); + passwordEdit->setObjectName("passwordEdit"); gridLayout->addWidget(passwordEdit, 3, 1, 1, 1); buttonBox = new QDialogButtonBox(Dialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName("buttonBox"); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); gridLayout->addWidget(buttonBox, 5, 0, 1, 2); label_4 = new QLabel(Dialog); - label_4->setObjectName(QString::fromUtf8("label_4")); + label_4->setObjectName("label_4"); gridLayout->addWidget(label_4, 1, 0, 1, 1); siteDescription = new QLabel(Dialog); - siteDescription->setObjectName(QString::fromUtf8("siteDescription")); + siteDescription->setObjectName("siteDescription"); QFont font; font.setBold(true); - font.setWeight(75); siteDescription->setFont(font); siteDescription->setWordWrap(true); gridLayout->addWidget(siteDescription, 1, 1, 1, 1); - spacerItem = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem = new QSpacerItem(20, 40, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Expanding); gridLayout->addItem(spacerItem, 4, 0, 1, 1); retranslateUi(Dialog); - QObject::connect(buttonBox, SIGNAL(accepted()), Dialog, SLOT(accept())); - QObject::connect(buttonBox, SIGNAL(rejected()), Dialog, SLOT(reject())); + QObject::connect(buttonBox, &QDialogButtonBox::accepted, Dialog, qOverload<>(&QDialog::accept)); + QObject::connect(buttonBox, &QDialogButtonBox::rejected, Dialog, qOverload<>(&QDialog::reject)); QMetaObject::connectSlotsByName(Dialog); } // setupUi void retranslateUi(QDialog *Dialog) { - Dialog->setWindowTitle(QApplication::translate("Dialog", "Http authentication required", nullptr)); - label->setText(QApplication::translate("Dialog", "You need to supply a Username and a Password to access this site", nullptr)); - label_2->setText(QApplication::translate("Dialog", "Username:", nullptr)); - label_3->setText(QApplication::translate("Dialog", "Password:", nullptr)); - label_4->setText(QApplication::translate("Dialog", "Site:", nullptr)); - siteDescription->setText(QApplication::translate("Dialog", "%1 at %2", nullptr)); + Dialog->setWindowTitle(QCoreApplication::translate("Dialog", "Http authentication required", nullptr)); + label->setText(QCoreApplication::translate("Dialog", "You need to supply a Username and a Password to access this site", nullptr)); + label_2->setText(QCoreApplication::translate("Dialog", "Username:", nullptr)); + label_3->setText(QCoreApplication::translate("Dialog", "Password:", nullptr)); + label_4->setText(QCoreApplication::translate("Dialog", "Site:", nullptr)); + siteDescription->setText(QCoreApplication::translate("Dialog", "%1 at %2", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/backside.ui.h b/tests/auto/tools/uic/baseline/backside.ui.h index e7053c632f..f4e29dad98 100644 --- a/tests/auto/tools/uic/baseline/backside.ui.h +++ b/tests/auto/tools/uic/baseline/backside.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'backside.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -47,47 +47,47 @@ public: void setupUi(QWidget *BackSide) { if (BackSide->objectName().isEmpty()) - BackSide->setObjectName(QString::fromUtf8("BackSide")); + BackSide->setObjectName("BackSide"); BackSide->resize(378, 385); verticalLayout_2 = new QVBoxLayout(BackSide); - verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2")); + verticalLayout_2->setObjectName("verticalLayout_2"); groupBox = new QGroupBox(BackSide); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName("groupBox"); groupBox->setFlat(true); groupBox->setCheckable(true); gridLayout = new QGridLayout(groupBox); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); label = new QLabel(groupBox); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName("label"); gridLayout->addWidget(label, 0, 0, 1, 1); hostName = new QLineEdit(groupBox); - hostName->setObjectName(QString::fromUtf8("hostName")); + hostName->setObjectName("hostName"); gridLayout->addWidget(hostName, 0, 1, 1, 1); label_2 = new QLabel(groupBox); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName("label_2"); gridLayout->addWidget(label_2, 1, 0, 1, 1); label_3 = new QLabel(groupBox); - label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setObjectName("label_3"); gridLayout->addWidget(label_3, 2, 0, 1, 1); horizontalLayout = new QHBoxLayout(); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); + horizontalLayout->setObjectName("horizontalLayout"); horizontalSlider = new QSlider(groupBox); - horizontalSlider->setObjectName(QString::fromUtf8("horizontalSlider")); + horizontalSlider->setObjectName("horizontalSlider"); horizontalSlider->setValue(42); horizontalSlider->setOrientation(Qt::Horizontal); horizontalLayout->addWidget(horizontalSlider); spinBox = new QSpinBox(groupBox); - spinBox->setObjectName(QString::fromUtf8("spinBox")); + spinBox->setObjectName("spinBox"); spinBox->setValue(42); horizontalLayout->addWidget(spinBox); @@ -96,7 +96,7 @@ public: gridLayout->addLayout(horizontalLayout, 2, 1, 1, 1); dateTimeEdit = new QDateTimeEdit(groupBox); - dateTimeEdit->setObjectName(QString::fromUtf8("dateTimeEdit")); + dateTimeEdit->setObjectName("dateTimeEdit"); gridLayout->addWidget(dateTimeEdit, 1, 1, 1, 1); @@ -104,11 +104,11 @@ public: verticalLayout_2->addWidget(groupBox); groupBox_2 = new QGroupBox(BackSide); - groupBox_2->setObjectName(QString::fromUtf8("groupBox_2")); + groupBox_2->setObjectName("groupBox_2"); groupBox_2->setFlat(true); groupBox_2->setCheckable(true); horizontalLayout_2 = new QHBoxLayout(groupBox_2); - horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2")); + horizontalLayout_2->setObjectName("horizontalLayout_2"); treeWidget = new QTreeWidget(groupBox_2); QTreeWidgetItem *__qtreewidgetitem = new QTreeWidgetItem(treeWidget); QTreeWidgetItem *__qtreewidgetitem1 = new QTreeWidgetItem(__qtreewidgetitem); @@ -121,7 +121,7 @@ public: QTreeWidgetItem *__qtreewidgetitem4 = new QTreeWidgetItem(treeWidget); QTreeWidgetItem *__qtreewidgetitem5 = new QTreeWidgetItem(__qtreewidgetitem4); new QTreeWidgetItem(__qtreewidgetitem5); - treeWidget->setObjectName(QString::fromUtf8("treeWidget")); + treeWidget->setObjectName("treeWidget"); horizontalLayout_2->addWidget(treeWidget); @@ -136,48 +136,48 @@ public: QWidget::setTabOrder(groupBox_2, treeWidget); retranslateUi(BackSide); - QObject::connect(horizontalSlider, SIGNAL(valueChanged(int)), spinBox, SLOT(setValue(int))); - QObject::connect(spinBox, SIGNAL(valueChanged(int)), horizontalSlider, SLOT(setValue(int))); + QObject::connect(horizontalSlider, &QSlider::valueChanged, spinBox, &QSpinBox::setValue); + QObject::connect(spinBox, &QSpinBox::valueChanged, horizontalSlider, &QSlider::setValue); QMetaObject::connectSlotsByName(BackSide); } // setupUi void retranslateUi(QWidget *BackSide) { - BackSide->setWindowTitle(QApplication::translate("BackSide", "BackSide", nullptr)); - groupBox->setTitle(QApplication::translate("BackSide", "Settings", nullptr)); - label->setText(QApplication::translate("BackSide", "Title:", nullptr)); - hostName->setText(QApplication::translate("BackSide", "Pad Navigator Example", nullptr)); - label_2->setText(QApplication::translate("BackSide", "Modified:", nullptr)); - label_3->setText(QApplication::translate("BackSide", "Extent", nullptr)); - groupBox_2->setTitle(QApplication::translate("BackSide", "Other input", nullptr)); + BackSide->setWindowTitle(QCoreApplication::translate("BackSide", "BackSide", nullptr)); + groupBox->setTitle(QCoreApplication::translate("BackSide", "Settings", nullptr)); + label->setText(QCoreApplication::translate("BackSide", "Title:", nullptr)); + hostName->setText(QCoreApplication::translate("BackSide", "Pad Navigator Example", nullptr)); + label_2->setText(QCoreApplication::translate("BackSide", "Modified:", nullptr)); + label_3->setText(QCoreApplication::translate("BackSide", "Extent", nullptr)); + groupBox_2->setTitle(QCoreApplication::translate("BackSide", "Other input", nullptr)); QTreeWidgetItem *___qtreewidgetitem = treeWidget->headerItem(); - ___qtreewidgetitem->setText(0, QApplication::translate("BackSide", "Widgets On Graphics View", nullptr)); + ___qtreewidgetitem->setText(0, QCoreApplication::translate("BackSide", "Widgets On Graphics View", nullptr)); const bool __sortingEnabled = treeWidget->isSortingEnabled(); treeWidget->setSortingEnabled(false); QTreeWidgetItem *___qtreewidgetitem1 = treeWidget->topLevelItem(0); - ___qtreewidgetitem1->setText(0, QApplication::translate("BackSide", "QGraphicsProxyWidget", nullptr)); + ___qtreewidgetitem1->setText(0, QCoreApplication::translate("BackSide", "QGraphicsProxyWidget", nullptr)); QTreeWidgetItem *___qtreewidgetitem2 = ___qtreewidgetitem1->child(0); - ___qtreewidgetitem2->setText(0, QApplication::translate("BackSide", "QGraphicsWidget", nullptr)); + ___qtreewidgetitem2->setText(0, QCoreApplication::translate("BackSide", "QGraphicsWidget", nullptr)); QTreeWidgetItem *___qtreewidgetitem3 = ___qtreewidgetitem2->child(0); - ___qtreewidgetitem3->setText(0, QApplication::translate("BackSide", "QObject", nullptr)); + ___qtreewidgetitem3->setText(0, QCoreApplication::translate("BackSide", "QObject", nullptr)); QTreeWidgetItem *___qtreewidgetitem4 = ___qtreewidgetitem2->child(1); - ___qtreewidgetitem4->setText(0, QApplication::translate("BackSide", "QGraphicsItem", nullptr)); + ___qtreewidgetitem4->setText(0, QCoreApplication::translate("BackSide", "QGraphicsItem", nullptr)); QTreeWidgetItem *___qtreewidgetitem5 = ___qtreewidgetitem2->child(2); - ___qtreewidgetitem5->setText(0, QApplication::translate("BackSide", "QGraphicsLayoutItem", nullptr)); + ___qtreewidgetitem5->setText(0, QCoreApplication::translate("BackSide", "QGraphicsLayoutItem", nullptr)); QTreeWidgetItem *___qtreewidgetitem6 = treeWidget->topLevelItem(1); - ___qtreewidgetitem6->setText(0, QApplication::translate("BackSide", "QGraphicsGridLayout", nullptr)); + ___qtreewidgetitem6->setText(0, QCoreApplication::translate("BackSide", "QGraphicsGridLayout", nullptr)); QTreeWidgetItem *___qtreewidgetitem7 = ___qtreewidgetitem6->child(0); - ___qtreewidgetitem7->setText(0, QApplication::translate("BackSide", "QGraphicsLayout", nullptr)); + ___qtreewidgetitem7->setText(0, QCoreApplication::translate("BackSide", "QGraphicsLayout", nullptr)); QTreeWidgetItem *___qtreewidgetitem8 = ___qtreewidgetitem7->child(0); - ___qtreewidgetitem8->setText(0, QApplication::translate("BackSide", "QGraphicsLayoutItem", nullptr)); + ___qtreewidgetitem8->setText(0, QCoreApplication::translate("BackSide", "QGraphicsLayoutItem", nullptr)); QTreeWidgetItem *___qtreewidgetitem9 = treeWidget->topLevelItem(2); - ___qtreewidgetitem9->setText(0, QApplication::translate("BackSide", "QGraphicsLinearLayout", nullptr)); + ___qtreewidgetitem9->setText(0, QCoreApplication::translate("BackSide", "QGraphicsLinearLayout", nullptr)); QTreeWidgetItem *___qtreewidgetitem10 = ___qtreewidgetitem9->child(0); - ___qtreewidgetitem10->setText(0, QApplication::translate("BackSide", "QGraphicsLayout", nullptr)); + ___qtreewidgetitem10->setText(0, QCoreApplication::translate("BackSide", "QGraphicsLayout", nullptr)); QTreeWidgetItem *___qtreewidgetitem11 = ___qtreewidgetitem10->child(0); - ___qtreewidgetitem11->setText(0, QApplication::translate("BackSide", "QGraphicsLayoutItem", nullptr)); + ___qtreewidgetitem11->setText(0, QCoreApplication::translate("BackSide", "QGraphicsLayoutItem", nullptr)); treeWidget->setSortingEnabled(__sortingEnabled); } // retranslateUi diff --git a/tests/auto/tools/uic/baseline/batchtranslation.ui b/tests/auto/tools/uic/baseline/batchtranslation.ui index 3e757242d9..49a483061d 100644 --- a/tests/auto/tools/uic/baseline/batchtranslation.ui +++ b/tests/auto/tools/uic/baseline/batchtranslation.ui @@ -1,32 +1,8 @@ <ui version="4.0" > - <author></author> - <comment>********************************************************************* -** -** 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$ -** -*********************************************************************</comment> +<comment> +* Copyright (C) 2016 The Qt Company Ltd. +* SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +</comment> <exportmacro></exportmacro> <class>databaseTranslationDialog</class> <widget class="QDialog" name="databaseTranslationDialog" > diff --git a/tests/auto/tools/uic/baseline/batchtranslation.ui.h b/tests/auto/tools/uic/baseline/batchtranslation.ui.h index 8a4dc7a677..43bca0f950 100644 --- a/tests/auto/tools/uic/baseline/batchtranslation.ui.h +++ b/tests/auto/tools/uic/baseline/batchtranslation.ui.h @@ -1,37 +1,14 @@ /* -********************************************************************* -** -** 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$ -** -********************************************************************* + +* Copyright (C) 2016 The Qt Company Ltd. +* SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + */ /******************************************************************************** ** Form generated from reading UI file 'batchtranslation.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -78,7 +55,7 @@ public: void setupUi(QDialog *databaseTranslationDialog) { if (databaseTranslationDialog->objectName().isEmpty()) - databaseTranslationDialog->setObjectName(QString::fromUtf8("databaseTranslationDialog")); + databaseTranslationDialog->setObjectName("databaseTranslationDialog"); databaseTranslationDialog->resize(425, 370); vboxLayout = new QVBoxLayout(databaseTranslationDialog); #ifndef Q_OS_MAC @@ -87,10 +64,10 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); groupBox = new QGroupBox(databaseTranslationDialog); - groupBox->setObjectName(QString::fromUtf8("groupBox")); - QSizePolicy sizePolicy(static_cast<QSizePolicy::Policy>(5), static_cast<QSizePolicy::Policy>(4)); + groupBox->setObjectName("groupBox"); + QSizePolicy sizePolicy(QSizePolicy::Policy::Preferred, QSizePolicy::Policy::Maximum); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); sizePolicy.setHeightForWidth(groupBox->sizePolicy().hasHeightForWidth()); @@ -102,15 +79,15 @@ public: #ifndef Q_OS_MAC vboxLayout1->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName("vboxLayout1"); ckOnlyUntranslated = new QCheckBox(groupBox); - ckOnlyUntranslated->setObjectName(QString::fromUtf8("ckOnlyUntranslated")); + ckOnlyUntranslated->setObjectName("ckOnlyUntranslated"); ckOnlyUntranslated->setChecked(true); vboxLayout1->addWidget(ckOnlyUntranslated); ckMarkFinished = new QCheckBox(groupBox); - ckMarkFinished->setObjectName(QString::fromUtf8("ckMarkFinished")); + ckMarkFinished->setObjectName("ckMarkFinished"); ckMarkFinished->setChecked(true); vboxLayout1->addWidget(ckMarkFinished); @@ -119,8 +96,8 @@ public: vboxLayout->addWidget(groupBox); groupBox_2 = new QGroupBox(databaseTranslationDialog); - groupBox_2->setObjectName(QString::fromUtf8("groupBox_2")); - QSizePolicy sizePolicy1(static_cast<QSizePolicy::Policy>(5), static_cast<QSizePolicy::Policy>(1)); + groupBox_2->setObjectName("groupBox_2"); + QSizePolicy sizePolicy1(QSizePolicy::Policy::Preferred, QSizePolicy::Policy::Minimum); sizePolicy1.setHorizontalStretch(0); sizePolicy1.setVerticalStretch(0); sizePolicy1.setHeightForWidth(groupBox_2->sizePolicy().hasHeightForWidth()); @@ -132,7 +109,7 @@ public: #ifndef Q_OS_MAC vboxLayout2->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2")); + vboxLayout2->setObjectName("vboxLayout2"); hboxLayout = new QHBoxLayout(); #ifndef Q_OS_MAC hboxLayout->setSpacing(6); @@ -140,9 +117,9 @@ public: #ifndef Q_OS_MAC hboxLayout->setContentsMargins(0, 0, 0, 0); #endif - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName("hboxLayout"); phrasebookList = new QListView(groupBox_2); - phrasebookList->setObjectName(QString::fromUtf8("phrasebookList")); + phrasebookList->setObjectName("phrasebookList"); phrasebookList->setUniformItemSizes(true); hboxLayout->addWidget(phrasebookList); @@ -152,18 +129,18 @@ public: vboxLayout3->setSpacing(6); #endif vboxLayout3->setContentsMargins(0, 0, 0, 0); - vboxLayout3->setObjectName(QString::fromUtf8("vboxLayout3")); + vboxLayout3->setObjectName("vboxLayout3"); moveUpButton = new QPushButton(groupBox_2); - moveUpButton->setObjectName(QString::fromUtf8("moveUpButton")); + moveUpButton->setObjectName("moveUpButton"); vboxLayout3->addWidget(moveUpButton); moveDownButton = new QPushButton(groupBox_2); - moveDownButton->setObjectName(QString::fromUtf8("moveDownButton")); + moveDownButton->setObjectName("moveDownButton"); vboxLayout3->addWidget(moveDownButton); - spacerItem = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem = new QSpacerItem(20, 40, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Expanding); vboxLayout3->addItem(spacerItem); @@ -174,7 +151,7 @@ public: vboxLayout2->addLayout(hboxLayout); label = new QLabel(groupBox_2); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName("label"); label->setWordWrap(true); vboxLayout2->addWidget(label); @@ -187,18 +164,18 @@ public: hboxLayout1->setSpacing(6); #endif hboxLayout1->setContentsMargins(0, 0, 0, 0); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); - spacerItem1 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + hboxLayout1->setObjectName("hboxLayout1"); + spacerItem1 = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); hboxLayout1->addItem(spacerItem1); runButton = new QPushButton(databaseTranslationDialog); - runButton->setObjectName(QString::fromUtf8("runButton")); + runButton->setObjectName("runButton"); hboxLayout1->addWidget(runButton); cancelButton = new QPushButton(databaseTranslationDialog); - cancelButton->setObjectName(QString::fromUtf8("cancelButton")); + cancelButton->setObjectName("cancelButton"); hboxLayout1->addWidget(cancelButton); @@ -213,16 +190,16 @@ public: void retranslateUi(QDialog *databaseTranslationDialog) { - databaseTranslationDialog->setWindowTitle(QApplication::translate("databaseTranslationDialog", "Qt Linguist - Batch Translation", nullptr)); - groupBox->setTitle(QApplication::translate("databaseTranslationDialog", "Options", nullptr)); - ckOnlyUntranslated->setText(QApplication::translate("databaseTranslationDialog", "Only translate entries with no translation", nullptr)); - ckMarkFinished->setText(QApplication::translate("databaseTranslationDialog", "Set translated entries to finished", nullptr)); - groupBox_2->setTitle(QApplication::translate("databaseTranslationDialog", "Phrase book preference", nullptr)); - moveUpButton->setText(QApplication::translate("databaseTranslationDialog", "Move up", nullptr)); - moveDownButton->setText(QApplication::translate("databaseTranslationDialog", "Move down", nullptr)); - label->setText(QApplication::translate("databaseTranslationDialog", "The batch translator will search through the selected phrasebooks in the order given above.", nullptr)); - runButton->setText(QApplication::translate("databaseTranslationDialog", "&Run", nullptr)); - cancelButton->setText(QApplication::translate("databaseTranslationDialog", "&Cancel", nullptr)); + databaseTranslationDialog->setWindowTitle(QCoreApplication::translate("databaseTranslationDialog", "Qt Linguist - Batch Translation", nullptr)); + groupBox->setTitle(QCoreApplication::translate("databaseTranslationDialog", "Options", nullptr)); + ckOnlyUntranslated->setText(QCoreApplication::translate("databaseTranslationDialog", "Only translate entries with no translation", nullptr)); + ckMarkFinished->setText(QCoreApplication::translate("databaseTranslationDialog", "Set translated entries to finished", nullptr)); + groupBox_2->setTitle(QCoreApplication::translate("databaseTranslationDialog", "Phrase book preference", nullptr)); + moveUpButton->setText(QCoreApplication::translate("databaseTranslationDialog", "Move up", nullptr)); + moveDownButton->setText(QCoreApplication::translate("databaseTranslationDialog", "Move down", nullptr)); + label->setText(QCoreApplication::translate("databaseTranslationDialog", "The batch translator will search through the selected phrasebooks in the order given above.", nullptr)); + runButton->setText(QCoreApplication::translate("databaseTranslationDialog", "&Run", nullptr)); + cancelButton->setText(QCoreApplication::translate("databaseTranslationDialog", "&Cancel", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/bookmarkdialog.ui.h b/tests/auto/tools/uic/baseline/bookmarkdialog.ui.h index b5a44998be..45cc3957d0 100644 --- a/tests/auto/tools/uic/baseline/bookmarkdialog.ui.h +++ b/tests/auto/tools/uic/baseline/bookmarkdialog.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'bookmarkdialog.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -10,6 +10,7 @@ #define BOOKMARKDIALOG_H #include <QtCore/QVariant> +#include <QtWidgets/QAbstractButton> #include <QtWidgets/QApplication> #include <QtWidgets/QComboBox> #include <QtWidgets/QDialog> @@ -48,26 +49,26 @@ public: void setupUi(QDialog *BookmarkDialog) { if (BookmarkDialog->objectName().isEmpty()) - BookmarkDialog->setObjectName(QString::fromUtf8("BookmarkDialog")); + BookmarkDialog->setObjectName("BookmarkDialog"); BookmarkDialog->resize(450, 135); - QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); + QSizePolicy sizePolicy(QSizePolicy::Policy::Preferred, QSizePolicy::Policy::Preferred); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); sizePolicy.setHeightForWidth(BookmarkDialog->sizePolicy().hasHeightForWidth()); BookmarkDialog->setSizePolicy(sizePolicy); verticalLayout_3 = new QVBoxLayout(BookmarkDialog); - verticalLayout_3->setObjectName(QString::fromUtf8("verticalLayout_3")); + verticalLayout_3->setObjectName("verticalLayout_3"); horizontalLayout = new QHBoxLayout(); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); + horizontalLayout->setObjectName("horizontalLayout"); verticalLayout_2 = new QVBoxLayout(); - verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2")); + verticalLayout_2->setObjectName("verticalLayout_2"); label = new QLabel(BookmarkDialog); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName("label"); verticalLayout_2->addWidget(label); label_2 = new QLabel(BookmarkDialog); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName("label_2"); verticalLayout_2->addWidget(label_2); @@ -75,14 +76,14 @@ public: horizontalLayout->addLayout(verticalLayout_2); verticalLayout = new QVBoxLayout(); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + verticalLayout->setObjectName("verticalLayout"); bookmarkEdit = new QLineEdit(BookmarkDialog); - bookmarkEdit->setObjectName(QString::fromUtf8("bookmarkEdit")); + bookmarkEdit->setObjectName("bookmarkEdit"); verticalLayout->addWidget(bookmarkEdit); bookmarkFolders = new QComboBox(BookmarkDialog); - bookmarkFolders->setObjectName(QString::fromUtf8("bookmarkFolders")); + bookmarkFolders->setObjectName("bookmarkFolders"); verticalLayout->addWidget(bookmarkFolders); @@ -93,17 +94,17 @@ public: verticalLayout_3->addLayout(horizontalLayout); horizontalLayout_3 = new QHBoxLayout(); - horizontalLayout_3->setObjectName(QString::fromUtf8("horizontalLayout_3")); + horizontalLayout_3->setObjectName("horizontalLayout_3"); toolButton = new QToolButton(BookmarkDialog); - toolButton->setObjectName(QString::fromUtf8("toolButton")); + toolButton->setObjectName("toolButton"); toolButton->setMinimumSize(QSize(25, 20)); horizontalLayout_3->addWidget(toolButton); line = new QFrame(BookmarkDialog); - line->setObjectName(QString::fromUtf8("line")); - line->setFrameShape(QFrame::HLine); - line->setFrameShadow(QFrame::Sunken); + line->setObjectName("line"); + line->setFrameShape(QFrame::Shape::HLine); + line->setFrameShadow(QFrame::Shadow::Sunken); horizontalLayout_3->addWidget(line); @@ -111,9 +112,9 @@ public: verticalLayout_3->addLayout(horizontalLayout_3); bookmarkWidget = new BookmarkWidget(BookmarkDialog); - bookmarkWidget->setObjectName(QString::fromUtf8("bookmarkWidget")); + bookmarkWidget->setObjectName("bookmarkWidget"); bookmarkWidget->setEnabled(true); - QSizePolicy sizePolicy1(QSizePolicy::Expanding, QSizePolicy::Ignored); + QSizePolicy sizePolicy1(QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Ignored); sizePolicy1.setHorizontalStretch(0); sizePolicy1.setVerticalStretch(0); sizePolicy1.setHeightForWidth(bookmarkWidget->sizePolicy().hasHeightForWidth()); @@ -122,14 +123,14 @@ public: verticalLayout_3->addWidget(bookmarkWidget); horizontalLayout_4 = new QHBoxLayout(); - horizontalLayout_4->setObjectName(QString::fromUtf8("horizontalLayout_4")); + horizontalLayout_4->setObjectName("horizontalLayout_4"); newFolderButton = new QPushButton(BookmarkDialog); - newFolderButton->setObjectName(QString::fromUtf8("newFolderButton")); + newFolderButton->setObjectName("newFolderButton"); horizontalLayout_4->addWidget(newFolderButton); buttonBox = new QDialogButtonBox(BookmarkDialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName("buttonBox"); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); @@ -140,21 +141,21 @@ public: retranslateUi(BookmarkDialog); - QObject::connect(buttonBox, SIGNAL(accepted()), BookmarkDialog, SLOT(accept())); - QObject::connect(buttonBox, SIGNAL(rejected()), BookmarkDialog, SLOT(reject())); + QObject::connect(buttonBox, &QDialogButtonBox::accepted, BookmarkDialog, qOverload<>(&QDialog::accept)); + QObject::connect(buttonBox, &QDialogButtonBox::rejected, BookmarkDialog, qOverload<>(&QDialog::reject)); QMetaObject::connectSlotsByName(BookmarkDialog); } // setupUi void retranslateUi(QDialog *BookmarkDialog) { - BookmarkDialog->setWindowTitle(QApplication::translate("BookmarkDialog", "Add Bookmark", nullptr)); - label->setText(QApplication::translate("BookmarkDialog", "Bookmark:", nullptr)); - label_2->setText(QApplication::translate("BookmarkDialog", "Add in Folder:", nullptr)); - toolButton->setText(QApplication::translate("BookmarkDialog", "+", nullptr)); + BookmarkDialog->setWindowTitle(QCoreApplication::translate("BookmarkDialog", "Add Bookmark", nullptr)); + label->setText(QCoreApplication::translate("BookmarkDialog", "Bookmark:", nullptr)); + label_2->setText(QCoreApplication::translate("BookmarkDialog", "Add in Folder:", nullptr)); + toolButton->setText(QCoreApplication::translate("BookmarkDialog", "+", nullptr)); QTreeWidgetItem *___qtreewidgetitem = bookmarkWidget->headerItem(); - ___qtreewidgetitem->setText(0, QApplication::translate("BookmarkDialog", "1", nullptr)); - newFolderButton->setText(QApplication::translate("BookmarkDialog", "New Folder", nullptr)); + ___qtreewidgetitem->setText(0, QCoreApplication::translate("BookmarkDialog", "1", nullptr)); + newFolderButton->setText(QCoreApplication::translate("BookmarkDialog", "New Folder", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/bookwindow.ui.h b/tests/auto/tools/uic/baseline/bookwindow.ui.h index 8fe5f000e2..c484a051b8 100644 --- a/tests/auto/tools/uic/baseline/bookwindow.ui.h +++ b/tests/auto/tools/uic/baseline/bookwindow.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'bookwindow.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -49,10 +49,10 @@ public: void setupUi(QMainWindow *BookWindow) { if (BookWindow->objectName().isEmpty()) - BookWindow->setObjectName(QString::fromUtf8("BookWindow")); + BookWindow->setObjectName("BookWindow"); BookWindow->resize(601, 420); centralWidget = new QWidget(BookWindow); - centralWidget->setObjectName(QString::fromUtf8("centralWidget")); + centralWidget->setObjectName("centralWidget"); vboxLayout = new QVBoxLayout(centralWidget); #ifndef Q_OS_MAC vboxLayout->setSpacing(6); @@ -60,9 +60,9 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); groupBox = new QGroupBox(centralWidget); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName("groupBox"); vboxLayout1 = new QVBoxLayout(groupBox); #ifndef Q_OS_MAC vboxLayout1->setSpacing(6); @@ -70,57 +70,57 @@ public: #ifndef Q_OS_MAC vboxLayout1->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName("vboxLayout1"); bookTable = new QTableView(groupBox); - bookTable->setObjectName(QString::fromUtf8("bookTable")); + bookTable->setObjectName("bookTable"); bookTable->setSelectionBehavior(QAbstractItemView::SelectRows); vboxLayout1->addWidget(bookTable); groupBox_2 = new QGroupBox(groupBox); - groupBox_2->setObjectName(QString::fromUtf8("groupBox_2")); + groupBox_2->setObjectName("groupBox_2"); formLayout = new QFormLayout(groupBox_2); - formLayout->setObjectName(QString::fromUtf8("formLayout")); + formLayout->setObjectName("formLayout"); label_5 = new QLabel(groupBox_2); - label_5->setObjectName(QString::fromUtf8("label_5")); + label_5->setObjectName("label_5"); formLayout->setWidget(0, QFormLayout::LabelRole, label_5); titleEdit = new QLineEdit(groupBox_2); - titleEdit->setObjectName(QString::fromUtf8("titleEdit")); + titleEdit->setObjectName("titleEdit"); titleEdit->setEnabled(true); formLayout->setWidget(0, QFormLayout::FieldRole, titleEdit); label_2_2_2_2 = new QLabel(groupBox_2); - label_2_2_2_2->setObjectName(QString::fromUtf8("label_2_2_2_2")); + label_2_2_2_2->setObjectName("label_2_2_2_2"); formLayout->setWidget(1, QFormLayout::LabelRole, label_2_2_2_2); authorEdit = new QComboBox(groupBox_2); - authorEdit->setObjectName(QString::fromUtf8("authorEdit")); + authorEdit->setObjectName("authorEdit"); authorEdit->setEnabled(true); formLayout->setWidget(1, QFormLayout::FieldRole, authorEdit); label_3 = new QLabel(groupBox_2); - label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setObjectName("label_3"); formLayout->setWidget(2, QFormLayout::LabelRole, label_3); genreEdit = new QComboBox(groupBox_2); - genreEdit->setObjectName(QString::fromUtf8("genreEdit")); + genreEdit->setObjectName("genreEdit"); genreEdit->setEnabled(true); formLayout->setWidget(2, QFormLayout::FieldRole, genreEdit); label_4 = new QLabel(groupBox_2); - label_4->setObjectName(QString::fromUtf8("label_4")); + label_4->setObjectName("label_4"); formLayout->setWidget(3, QFormLayout::LabelRole, label_4); yearEdit = new QSpinBox(groupBox_2); - yearEdit->setObjectName(QString::fromUtf8("yearEdit")); + yearEdit->setObjectName("yearEdit"); yearEdit->setEnabled(true); yearEdit->setMaximum(2100); yearEdit->setMinimum(-1000); @@ -128,12 +128,12 @@ public: formLayout->setWidget(3, QFormLayout::FieldRole, yearEdit); label = new QLabel(groupBox_2); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName("label"); formLayout->setWidget(4, QFormLayout::LabelRole, label); ratingEdit = new QSpinBox(groupBox_2); - ratingEdit->setObjectName(QString::fromUtf8("ratingEdit")); + ratingEdit->setObjectName("ratingEdit"); ratingEdit->setMaximum(5); formLayout->setWidget(4, QFormLayout::FieldRole, ratingEdit); @@ -157,15 +157,15 @@ public: void retranslateUi(QMainWindow *BookWindow) { - BookWindow->setWindowTitle(QApplication::translate("BookWindow", "Books", nullptr)); - groupBox->setTitle(QApplication::translate("BookWindow", "Books", nullptr)); - groupBox_2->setTitle(QApplication::translate("BookWindow", "Details", nullptr)); - label_5->setText(QApplication::translate("BookWindow", "<b>Title:</b>", nullptr)); - label_2_2_2_2->setText(QApplication::translate("BookWindow", "<b>Author: </b>", nullptr)); - label_3->setText(QApplication::translate("BookWindow", "<b>Genre:</b>", nullptr)); - label_4->setText(QApplication::translate("BookWindow", "<b>Year:</b>", nullptr)); + BookWindow->setWindowTitle(QCoreApplication::translate("BookWindow", "Books", nullptr)); + groupBox->setTitle(QCoreApplication::translate("BookWindow", "Books", nullptr)); + groupBox_2->setTitle(QCoreApplication::translate("BookWindow", "Details", nullptr)); + label_5->setText(QCoreApplication::translate("BookWindow", "<b>Title:</b>", nullptr)); + label_2_2_2_2->setText(QCoreApplication::translate("BookWindow", "<b>Author: </b>", nullptr)); + label_3->setText(QCoreApplication::translate("BookWindow", "<b>Genre:</b>", nullptr)); + label_4->setText(QCoreApplication::translate("BookWindow", "<b>Year:</b>", nullptr)); yearEdit->setPrefix(QString()); - label->setText(QApplication::translate("BookWindow", "<b>Rating:</b>", nullptr)); + label->setText(QCoreApplication::translate("BookWindow", "<b>Rating:</b>", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/browserwidget.ui.h b/tests/auto/tools/uic/baseline/browserwidget.ui.h index 3db93c34cf..1fa42647a5 100644 --- a/tests/auto/tools/uic/baseline/browserwidget.ui.h +++ b/tests/auto/tools/uic/baseline/browserwidget.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'browserwidget.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -10,7 +10,7 @@ #define BROWSERWIDGET_H #include <QtCore/QVariant> -#include <QtWidgets/QAction> +#include <QtGui/QAction> #include <QtWidgets/QApplication> #include <QtWidgets/QGroupBox> #include <QtWidgets/QHBoxLayout> @@ -46,39 +46,39 @@ public: void setupUi(QWidget *Browser) { if (Browser->objectName().isEmpty()) - Browser->setObjectName(QString::fromUtf8("Browser")); + Browser->setObjectName("Browser"); Browser->resize(765, 515); insertRowAction = new QAction(Browser); - insertRowAction->setObjectName(QString::fromUtf8("insertRowAction")); + insertRowAction->setObjectName("insertRowAction"); insertRowAction->setEnabled(false); deleteRowAction = new QAction(Browser); - deleteRowAction->setObjectName(QString::fromUtf8("deleteRowAction")); + deleteRowAction->setObjectName("deleteRowAction"); deleteRowAction->setEnabled(false); vboxLayout = new QVBoxLayout(Browser); #ifndef Q_OS_MAC vboxLayout->setSpacing(6); #endif vboxLayout->setContentsMargins(8, 8, 8, 8); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); splitter_2 = new QSplitter(Browser); - splitter_2->setObjectName(QString::fromUtf8("splitter_2")); - QSizePolicy sizePolicy(static_cast<QSizePolicy::Policy>(7), static_cast<QSizePolicy::Policy>(7)); + splitter_2->setObjectName("splitter_2"); + QSizePolicy sizePolicy(QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Expanding); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); sizePolicy.setHeightForWidth(splitter_2->sizePolicy().hasHeightForWidth()); splitter_2->setSizePolicy(sizePolicy); splitter_2->setOrientation(Qt::Horizontal); connectionWidget = new ConnectionWidget(splitter_2); - connectionWidget->setObjectName(QString::fromUtf8("connectionWidget")); - QSizePolicy sizePolicy1(static_cast<QSizePolicy::Policy>(13), static_cast<QSizePolicy::Policy>(7)); + connectionWidget->setObjectName("connectionWidget"); + QSizePolicy sizePolicy1(QSizePolicy::Policy::Ignored, QSizePolicy::Policy::Expanding); sizePolicy1.setHorizontalStretch(1); sizePolicy1.setVerticalStretch(0); sizePolicy1.setHeightForWidth(connectionWidget->sizePolicy().hasHeightForWidth()); connectionWidget->setSizePolicy(sizePolicy1); splitter_2->addWidget(connectionWidget); table = new QTableView(splitter_2); - table->setObjectName(QString::fromUtf8("table")); - QSizePolicy sizePolicy2(static_cast<QSizePolicy::Policy>(7), static_cast<QSizePolicy::Policy>(7)); + table->setObjectName("table"); + QSizePolicy sizePolicy2(QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Expanding); sizePolicy2.setHorizontalStretch(2); sizePolicy2.setVerticalStretch(0); sizePolicy2.setHeightForWidth(table->sizePolicy().hasHeightForWidth()); @@ -90,8 +90,8 @@ public: vboxLayout->addWidget(splitter_2); groupBox = new QGroupBox(Browser); - groupBox->setObjectName(QString::fromUtf8("groupBox")); - QSizePolicy sizePolicy3(static_cast<QSizePolicy::Policy>(5), static_cast<QSizePolicy::Policy>(3)); + groupBox->setObjectName("groupBox"); + QSizePolicy sizePolicy3(QSizePolicy::Policy::Preferred, QSizePolicy::Policy::MinimumExpanding); sizePolicy3.setHorizontalStretch(0); sizePolicy3.setVerticalStretch(0); sizePolicy3.setHeightForWidth(groupBox->sizePolicy().hasHeightForWidth()); @@ -104,10 +104,10 @@ public: #ifndef Q_OS_MAC vboxLayout1->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName("vboxLayout1"); sqlEdit = new QTextEdit(groupBox); - sqlEdit->setObjectName(QString::fromUtf8("sqlEdit")); - QSizePolicy sizePolicy4(static_cast<QSizePolicy::Policy>(7), static_cast<QSizePolicy::Policy>(3)); + sqlEdit->setObjectName("sqlEdit"); + QSizePolicy sizePolicy4(QSizePolicy::Policy::Expanding, QSizePolicy::Policy::MinimumExpanding); sizePolicy4.setHorizontalStretch(0); sizePolicy4.setVerticalStretch(0); sizePolicy4.setHeightForWidth(sqlEdit->sizePolicy().hasHeightForWidth()); @@ -122,18 +122,18 @@ public: hboxLayout->setSpacing(6); #endif hboxLayout->setContentsMargins(1, 1, 1, 1); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); - spacerItem = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + hboxLayout->setObjectName("hboxLayout"); + spacerItem = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); hboxLayout->addItem(spacerItem); clearButton = new QPushButton(groupBox); - clearButton->setObjectName(QString::fromUtf8("clearButton")); + clearButton->setObjectName("clearButton"); hboxLayout->addWidget(clearButton); submitButton = new QPushButton(groupBox); - submitButton->setObjectName(QString::fromUtf8("submitButton")); + submitButton->setObjectName("submitButton"); hboxLayout->addWidget(submitButton); @@ -155,18 +155,18 @@ public: void retranslateUi(QWidget *Browser) { - Browser->setWindowTitle(QApplication::translate("Browser", "Qt SQL Browser", nullptr)); - insertRowAction->setText(QApplication::translate("Browser", "&Insert Row", nullptr)); -#ifndef QT_NO_STATUSTIP - insertRowAction->setStatusTip(QApplication::translate("Browser", "Inserts a new Row", nullptr)); -#endif // QT_NO_STATUSTIP - deleteRowAction->setText(QApplication::translate("Browser", "&Delete Row", nullptr)); -#ifndef QT_NO_STATUSTIP - deleteRowAction->setStatusTip(QApplication::translate("Browser", "Deletes the current Row", nullptr)); -#endif // QT_NO_STATUSTIP - groupBox->setTitle(QApplication::translate("Browser", "SQL Query", nullptr)); - clearButton->setText(QApplication::translate("Browser", "&Clear", nullptr)); - submitButton->setText(QApplication::translate("Browser", "&Submit", nullptr)); + Browser->setWindowTitle(QCoreApplication::translate("Browser", "Qt SQL Browser", nullptr)); + insertRowAction->setText(QCoreApplication::translate("Browser", "&Insert Row", nullptr)); +#if QT_CONFIG(statustip) + insertRowAction->setStatusTip(QCoreApplication::translate("Browser", "Inserts a new Row", nullptr)); +#endif // QT_CONFIG(statustip) + deleteRowAction->setText(QCoreApplication::translate("Browser", "&Delete Row", nullptr)); +#if QT_CONFIG(statustip) + deleteRowAction->setStatusTip(QCoreApplication::translate("Browser", "Deletes the current Row", nullptr)); +#endif // QT_CONFIG(statustip) + groupBox->setTitle(QCoreApplication::translate("Browser", "SQL Query", nullptr)); + clearButton->setText(QCoreApplication::translate("Browser", "&Clear", nullptr)); + submitButton->setText(QCoreApplication::translate("Browser", "&Submit", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/bug18156QTreeWidget.ui.h b/tests/auto/tools/uic/baseline/bug18156QTreeWidget.ui.h index 47f8f22132..33fbc15cca 100644 --- a/tests/auto/tools/uic/baseline/bug18156QTreeWidget.ui.h +++ b/tests/auto/tools/uic/baseline/bug18156QTreeWidget.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'bug18156QTreeWidget.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -10,6 +10,7 @@ #define BUG18156QTREEWIDGET_H #include <QtCore/QVariant> +#include <QtWidgets/QAbstractButton> #include <QtWidgets/QApplication> #include <QtWidgets/QDialog> #include <QtWidgets/QDialogButtonBox> @@ -29,19 +30,19 @@ public: void setupUi(QDialog *Dialog) { if (Dialog->objectName().isEmpty()) - Dialog->setObjectName(QString::fromUtf8("Dialog")); + Dialog->setObjectName("Dialog"); Dialog->resize(400, 300); gridLayout = new QGridLayout(Dialog); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); treeWidget = new QTreeWidget(Dialog); treeWidget->headerItem()->setText(0, QString()); treeWidget->headerItem()->setText(2, QString()); - treeWidget->setObjectName(QString::fromUtf8("treeWidget")); + treeWidget->setObjectName("treeWidget"); gridLayout->addWidget(treeWidget, 0, 0, 1, 1); buttonBox = new QDialogButtonBox(Dialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName("buttonBox"); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); @@ -49,17 +50,17 @@ public: retranslateUi(Dialog); - QObject::connect(buttonBox, SIGNAL(accepted()), Dialog, SLOT(accept())); - QObject::connect(buttonBox, SIGNAL(rejected()), Dialog, SLOT(reject())); + QObject::connect(buttonBox, &QDialogButtonBox::accepted, Dialog, qOverload<>(&QDialog::accept)); + QObject::connect(buttonBox, &QDialogButtonBox::rejected, Dialog, qOverload<>(&QDialog::reject)); QMetaObject::connectSlotsByName(Dialog); } // setupUi void retranslateUi(QDialog *Dialog) { - Dialog->setWindowTitle(QApplication::translate("Dialog", "Dialog", nullptr)); + Dialog->setWindowTitle(QCoreApplication::translate("Dialog", "Dialog", nullptr)); QTreeWidgetItem *___qtreewidgetitem = treeWidget->headerItem(); - ___qtreewidgetitem->setText(1, QApplication::translate("Dialog", "4", nullptr)); + ___qtreewidgetitem->setText(1, QCoreApplication::translate("Dialog", "4", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/buttongroup.ui.h b/tests/auto/tools/uic/baseline/buttongroup.ui.h index 87814dcba1..b6804de552 100644 --- a/tests/auto/tools/uic/baseline/buttongroup.ui.h +++ b/tests/auto/tools/uic/baseline/buttongroup.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'buttongroup.ui' ** -** Created by: Qt User Interface Compiler version 5.12.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -51,13 +51,13 @@ public: void setupUi(QWidget *Form) { if (Form->objectName().isEmpty()) - Form->setObjectName(QString::fromUtf8("Form")); + Form->setObjectName("Form"); Form->resize(545, 471); gridLayout = new QGridLayout(Form); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); easingCurvePicker = new QListWidget(Form); - easingCurvePicker->setObjectName(QString::fromUtf8("easingCurvePicker")); - QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); + easingCurvePicker->setObjectName("easingCurvePicker"); + QSizePolicy sizePolicy(QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Preferred); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); sizePolicy.setHeightForWidth(easingCurvePicker->sizePolicy().hasHeightForWidth()); @@ -72,17 +72,17 @@ public: gridLayout->addWidget(easingCurvePicker, 0, 0, 1, 2); verticalLayout = new QVBoxLayout(); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + verticalLayout->setObjectName("verticalLayout"); groupBox_2 = new QGroupBox(Form); - groupBox_2->setObjectName(QString::fromUtf8("groupBox_2")); + groupBox_2->setObjectName("groupBox_2"); groupBox_2->setMaximumSize(QSize(16777215, 16777215)); gridLayout_2 = new QGridLayout(groupBox_2); - gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2")); + gridLayout_2->setObjectName("gridLayout_2"); lineRadio = new QRadioButton(groupBox_2); buttonGroup = new QButtonGroup(Form); - buttonGroup->setObjectName(QString::fromUtf8("buttonGroup")); + buttonGroup->setObjectName("buttonGroup"); buttonGroup->addButton(lineRadio); - lineRadio->setObjectName(QString::fromUtf8("lineRadio")); + lineRadio->setObjectName("lineRadio"); lineRadio->setMaximumSize(QSize(16777215, 40)); lineRadio->setLayoutDirection(Qt::LeftToRight); lineRadio->setChecked(true); @@ -91,7 +91,7 @@ public: circleRadio = new QRadioButton(groupBox_2); buttonGroup->addButton(circleRadio); - circleRadio->setObjectName(QString::fromUtf8("circleRadio")); + circleRadio->setObjectName("circleRadio"); circleRadio->setMaximumSize(QSize(16777215, 40)); gridLayout_2->addWidget(circleRadio, 1, 0, 1, 1); @@ -100,18 +100,18 @@ public: verticalLayout->addWidget(groupBox_2); groupBox = new QGroupBox(Form); - groupBox->setObjectName(QString::fromUtf8("groupBox")); - QSizePolicy sizePolicy1(QSizePolicy::Fixed, QSizePolicy::Preferred); + groupBox->setObjectName("groupBox"); + QSizePolicy sizePolicy1(QSizePolicy::Policy::Fixed, QSizePolicy::Policy::Preferred); sizePolicy1.setHorizontalStretch(0); sizePolicy1.setVerticalStretch(0); sizePolicy1.setHeightForWidth(groupBox->sizePolicy().hasHeightForWidth()); groupBox->setSizePolicy(sizePolicy1); formLayout = new QFormLayout(groupBox); - formLayout->setObjectName(QString::fromUtf8("formLayout")); + formLayout->setObjectName("formLayout"); formLayout->setFieldGrowthPolicy(QFormLayout::AllNonFixedFieldsGrow); label = new QLabel(groupBox); - label->setObjectName(QString::fromUtf8("label")); - QSizePolicy sizePolicy2(QSizePolicy::Preferred, QSizePolicy::Preferred); + label->setObjectName("label"); + QSizePolicy sizePolicy2(QSizePolicy::Policy::Preferred, QSizePolicy::Policy::Preferred); sizePolicy2.setHorizontalStretch(0); sizePolicy2.setVerticalStretch(0); sizePolicy2.setHeightForWidth(label->sizePolicy().hasHeightForWidth()); @@ -121,9 +121,9 @@ public: formLayout->setWidget(0, QFormLayout::LabelRole, label); periodSpinBox = new QDoubleSpinBox(groupBox); - periodSpinBox->setObjectName(QString::fromUtf8("periodSpinBox")); + periodSpinBox->setObjectName("periodSpinBox"); periodSpinBox->setEnabled(false); - QSizePolicy sizePolicy3(QSizePolicy::Minimum, QSizePolicy::Fixed); + QSizePolicy sizePolicy3(QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Fixed); sizePolicy3.setHorizontalStretch(0); sizePolicy3.setVerticalStretch(0); sizePolicy3.setHeightForWidth(periodSpinBox->sizePolicy().hasHeightForWidth()); @@ -136,7 +136,7 @@ public: formLayout->setWidget(0, QFormLayout::FieldRole, periodSpinBox); amplitudeSpinBox = new QDoubleSpinBox(groupBox); - amplitudeSpinBox->setObjectName(QString::fromUtf8("amplitudeSpinBox")); + amplitudeSpinBox->setObjectName("amplitudeSpinBox"); amplitudeSpinBox->setEnabled(false); amplitudeSpinBox->setMinimumSize(QSize(0, 30)); amplitudeSpinBox->setMinimum(-1.000000000000000); @@ -146,13 +146,13 @@ public: formLayout->setWidget(2, QFormLayout::FieldRole, amplitudeSpinBox); label_3 = new QLabel(groupBox); - label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setObjectName("label_3"); label_3->setMinimumSize(QSize(0, 30)); formLayout->setWidget(4, QFormLayout::LabelRole, label_3); overshootSpinBox = new QDoubleSpinBox(groupBox); - overshootSpinBox->setObjectName(QString::fromUtf8("overshootSpinBox")); + overshootSpinBox->setObjectName("overshootSpinBox"); overshootSpinBox->setEnabled(false); overshootSpinBox->setMinimumSize(QSize(0, 30)); overshootSpinBox->setMinimum(-1.000000000000000); @@ -162,7 +162,7 @@ public: formLayout->setWidget(4, QFormLayout::FieldRole, overshootSpinBox); label_2 = new QLabel(groupBox); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName("label_2"); label_2->setMinimumSize(QSize(0, 30)); formLayout->setWidget(2, QFormLayout::LabelRole, label_2); @@ -170,7 +170,7 @@ public: verticalLayout->addWidget(groupBox); - verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Expanding); verticalLayout->addItem(verticalSpacer); @@ -178,8 +178,8 @@ public: gridLayout->addLayout(verticalLayout, 1, 0, 1, 1); graphicsView = new QGraphicsView(Form); - graphicsView->setObjectName(QString::fromUtf8("graphicsView")); - QSizePolicy sizePolicy4(QSizePolicy::Expanding, QSizePolicy::Expanding); + graphicsView->setObjectName("graphicsView"); + QSizePolicy sizePolicy4(QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Expanding); sizePolicy4.setHorizontalStretch(0); sizePolicy4.setVerticalStretch(0); sizePolicy4.setHeightForWidth(graphicsView->sizePolicy().hasHeightForWidth()); @@ -195,14 +195,14 @@ public: void retranslateUi(QWidget *Form) { - Form->setWindowTitle(QApplication::translate("Form", "Easing curves", nullptr)); - groupBox_2->setTitle(QApplication::translate("Form", "Path type", nullptr)); - lineRadio->setText(QApplication::translate("Form", "Line", nullptr)); - circleRadio->setText(QApplication::translate("Form", "Circle", nullptr)); - groupBox->setTitle(QApplication::translate("Form", "Properties", nullptr)); - label->setText(QApplication::translate("Form", "Period", nullptr)); - label_3->setText(QApplication::translate("Form", "Overshoot", nullptr)); - label_2->setText(QApplication::translate("Form", "Amplitude", nullptr)); + Form->setWindowTitle(QCoreApplication::translate("Form", "Easing curves", nullptr)); + groupBox_2->setTitle(QCoreApplication::translate("Form", "Path type", nullptr)); + lineRadio->setText(QCoreApplication::translate("Form", "Line", nullptr)); + circleRadio->setText(QCoreApplication::translate("Form", "Circle", nullptr)); + groupBox->setTitle(QCoreApplication::translate("Form", "Properties", nullptr)); + label->setText(QCoreApplication::translate("Form", "Period", nullptr)); + label_3->setText(QCoreApplication::translate("Form", "Overshoot", nullptr)); + label_2->setText(QCoreApplication::translate("Form", "Amplitude", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/calculator.ui.h b/tests/auto/tools/uic/baseline/calculator.ui.h index 0387ee472b..5f52aff2d2 100644 --- a/tests/auto/tools/uic/baseline/calculator.ui.h +++ b/tests/auto/tools/uic/baseline/calculator.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'calculator.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -52,9 +52,9 @@ public: void setupUi(QWidget *Calculator) { if (Calculator->objectName().isEmpty()) - Calculator->setObjectName(QString::fromUtf8("Calculator")); + Calculator->setObjectName("Calculator"); Calculator->resize(314, 301); - QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); + QSizePolicy sizePolicy(QSizePolicy::Policy::Fixed, QSizePolicy::Policy::Fixed); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); sizePolicy.setHeightForWidth(Calculator->sizePolicy().hasHeightForWidth()); @@ -62,88 +62,88 @@ public: Calculator->setMinimumSize(QSize(314, 301)); Calculator->setMaximumSize(QSize(314, 301)); backspaceButton = new QToolButton(Calculator); - backspaceButton->setObjectName(QString::fromUtf8("backspaceButton")); + backspaceButton->setObjectName("backspaceButton"); backspaceButton->setGeometry(QRect(10, 50, 91, 41)); clearButton = new QToolButton(Calculator); - clearButton->setObjectName(QString::fromUtf8("clearButton")); + clearButton->setObjectName("clearButton"); clearButton->setGeometry(QRect(110, 50, 91, 41)); clearAllButton = new QToolButton(Calculator); - clearAllButton->setObjectName(QString::fromUtf8("clearAllButton")); + clearAllButton->setObjectName("clearAllButton"); clearAllButton->setGeometry(QRect(210, 50, 91, 41)); clearMemoryButton = new QToolButton(Calculator); - clearMemoryButton->setObjectName(QString::fromUtf8("clearMemoryButton")); + clearMemoryButton->setObjectName("clearMemoryButton"); clearMemoryButton->setGeometry(QRect(10, 100, 41, 41)); readMemoryButton = new QToolButton(Calculator); - readMemoryButton->setObjectName(QString::fromUtf8("readMemoryButton")); + readMemoryButton->setObjectName("readMemoryButton"); readMemoryButton->setGeometry(QRect(10, 150, 41, 41)); setMemoryButton = new QToolButton(Calculator); - setMemoryButton->setObjectName(QString::fromUtf8("setMemoryButton")); + setMemoryButton->setObjectName("setMemoryButton"); setMemoryButton->setGeometry(QRect(10, 200, 41, 41)); addToMemoryButton = new QToolButton(Calculator); - addToMemoryButton->setObjectName(QString::fromUtf8("addToMemoryButton")); + addToMemoryButton->setObjectName("addToMemoryButton"); addToMemoryButton->setGeometry(QRect(10, 250, 41, 41)); sevenButton = new QToolButton(Calculator); - sevenButton->setObjectName(QString::fromUtf8("sevenButton")); + sevenButton->setObjectName("sevenButton"); sevenButton->setGeometry(QRect(60, 100, 41, 41)); eightButton = new QToolButton(Calculator); - eightButton->setObjectName(QString::fromUtf8("eightButton")); + eightButton->setObjectName("eightButton"); eightButton->setGeometry(QRect(110, 100, 41, 41)); nineButton = new QToolButton(Calculator); - nineButton->setObjectName(QString::fromUtf8("nineButton")); + nineButton->setObjectName("nineButton"); nineButton->setGeometry(QRect(160, 100, 41, 41)); fourButton = new QToolButton(Calculator); - fourButton->setObjectName(QString::fromUtf8("fourButton")); + fourButton->setObjectName("fourButton"); fourButton->setGeometry(QRect(60, 150, 41, 41)); fiveButton = new QToolButton(Calculator); - fiveButton->setObjectName(QString::fromUtf8("fiveButton")); + fiveButton->setObjectName("fiveButton"); fiveButton->setGeometry(QRect(110, 150, 41, 41)); sixButton = new QToolButton(Calculator); - sixButton->setObjectName(QString::fromUtf8("sixButton")); + sixButton->setObjectName("sixButton"); sixButton->setGeometry(QRect(160, 150, 41, 41)); oneButton = new QToolButton(Calculator); - oneButton->setObjectName(QString::fromUtf8("oneButton")); + oneButton->setObjectName("oneButton"); oneButton->setGeometry(QRect(60, 200, 41, 41)); twoButton = new QToolButton(Calculator); - twoButton->setObjectName(QString::fromUtf8("twoButton")); + twoButton->setObjectName("twoButton"); twoButton->setGeometry(QRect(110, 200, 41, 41)); threeButton = new QToolButton(Calculator); - threeButton->setObjectName(QString::fromUtf8("threeButton")); + threeButton->setObjectName("threeButton"); threeButton->setGeometry(QRect(160, 200, 41, 41)); zeroButton = new QToolButton(Calculator); - zeroButton->setObjectName(QString::fromUtf8("zeroButton")); + zeroButton->setObjectName("zeroButton"); zeroButton->setGeometry(QRect(60, 250, 41, 41)); pointButton = new QToolButton(Calculator); - pointButton->setObjectName(QString::fromUtf8("pointButton")); + pointButton->setObjectName("pointButton"); pointButton->setGeometry(QRect(110, 250, 41, 41)); changeSignButton = new QToolButton(Calculator); - changeSignButton->setObjectName(QString::fromUtf8("changeSignButton")); + changeSignButton->setObjectName("changeSignButton"); changeSignButton->setGeometry(QRect(160, 250, 41, 41)); plusButton = new QToolButton(Calculator); - plusButton->setObjectName(QString::fromUtf8("plusButton")); + plusButton->setObjectName("plusButton"); plusButton->setGeometry(QRect(210, 250, 41, 41)); divisionButton = new QToolButton(Calculator); - divisionButton->setObjectName(QString::fromUtf8("divisionButton")); + divisionButton->setObjectName("divisionButton"); divisionButton->setGeometry(QRect(210, 100, 41, 41)); timesButton = new QToolButton(Calculator); - timesButton->setObjectName(QString::fromUtf8("timesButton")); + timesButton->setObjectName("timesButton"); timesButton->setGeometry(QRect(210, 150, 41, 41)); minusButton = new QToolButton(Calculator); - minusButton->setObjectName(QString::fromUtf8("minusButton")); + minusButton->setObjectName("minusButton"); minusButton->setGeometry(QRect(210, 200, 41, 41)); squareRootButton = new QToolButton(Calculator); - squareRootButton->setObjectName(QString::fromUtf8("squareRootButton")); + squareRootButton->setObjectName("squareRootButton"); squareRootButton->setGeometry(QRect(260, 100, 41, 41)); powerButton = new QToolButton(Calculator); - powerButton->setObjectName(QString::fromUtf8("powerButton")); + powerButton->setObjectName("powerButton"); powerButton->setGeometry(QRect(260, 150, 41, 41)); reciprocalButton = new QToolButton(Calculator); - reciprocalButton->setObjectName(QString::fromUtf8("reciprocalButton")); + reciprocalButton->setObjectName("reciprocalButton"); reciprocalButton->setGeometry(QRect(260, 200, 41, 41)); equalButton = new QToolButton(Calculator); - equalButton->setObjectName(QString::fromUtf8("equalButton")); + equalButton->setObjectName("equalButton"); equalButton->setGeometry(QRect(260, 250, 41, 41)); display = new QLineEdit(Calculator); - display->setObjectName(QString::fromUtf8("display")); + display->setObjectName("display"); display->setGeometry(QRect(10, 10, 291, 31)); display->setMaxLength(15); display->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); @@ -156,34 +156,34 @@ public: void retranslateUi(QWidget *Calculator) { - Calculator->setWindowTitle(QApplication::translate("Calculator", "Calculator", nullptr)); - backspaceButton->setText(QApplication::translate("Calculator", "Backspace", nullptr)); - clearButton->setText(QApplication::translate("Calculator", "Clear", nullptr)); - clearAllButton->setText(QApplication::translate("Calculator", "Clear All", nullptr)); - clearMemoryButton->setText(QApplication::translate("Calculator", "MC", nullptr)); - readMemoryButton->setText(QApplication::translate("Calculator", "MR", nullptr)); - setMemoryButton->setText(QApplication::translate("Calculator", "MS", nullptr)); - addToMemoryButton->setText(QApplication::translate("Calculator", "M+", nullptr)); - sevenButton->setText(QApplication::translate("Calculator", "7", nullptr)); - eightButton->setText(QApplication::translate("Calculator", "8", nullptr)); - nineButton->setText(QApplication::translate("Calculator", "9", nullptr)); - fourButton->setText(QApplication::translate("Calculator", "4", nullptr)); - fiveButton->setText(QApplication::translate("Calculator", "5", nullptr)); - sixButton->setText(QApplication::translate("Calculator", "6", nullptr)); - oneButton->setText(QApplication::translate("Calculator", "1", nullptr)); - twoButton->setText(QApplication::translate("Calculator", "2", nullptr)); - threeButton->setText(QApplication::translate("Calculator", "3", nullptr)); - zeroButton->setText(QApplication::translate("Calculator", "0", nullptr)); - pointButton->setText(QApplication::translate("Calculator", ".", nullptr)); - changeSignButton->setText(QApplication::translate("Calculator", "+-", nullptr)); - plusButton->setText(QApplication::translate("Calculator", "+", nullptr)); - divisionButton->setText(QApplication::translate("Calculator", "/", nullptr)); - timesButton->setText(QApplication::translate("Calculator", "*", nullptr)); - minusButton->setText(QApplication::translate("Calculator", "-", nullptr)); - squareRootButton->setText(QApplication::translate("Calculator", "Sqrt", nullptr)); - powerButton->setText(QApplication::translate("Calculator", "x^2", nullptr)); - reciprocalButton->setText(QApplication::translate("Calculator", "1/x", nullptr)); - equalButton->setText(QApplication::translate("Calculator", "=", nullptr)); + Calculator->setWindowTitle(QCoreApplication::translate("Calculator", "Calculator", nullptr)); + backspaceButton->setText(QCoreApplication::translate("Calculator", "Backspace", nullptr)); + clearButton->setText(QCoreApplication::translate("Calculator", "Clear", nullptr)); + clearAllButton->setText(QCoreApplication::translate("Calculator", "Clear All", nullptr)); + clearMemoryButton->setText(QCoreApplication::translate("Calculator", "MC", nullptr)); + readMemoryButton->setText(QCoreApplication::translate("Calculator", "MR", nullptr)); + setMemoryButton->setText(QCoreApplication::translate("Calculator", "MS", nullptr)); + addToMemoryButton->setText(QCoreApplication::translate("Calculator", "M+", nullptr)); + sevenButton->setText(QCoreApplication::translate("Calculator", "7", nullptr)); + eightButton->setText(QCoreApplication::translate("Calculator", "8", nullptr)); + nineButton->setText(QCoreApplication::translate("Calculator", "9", nullptr)); + fourButton->setText(QCoreApplication::translate("Calculator", "4", nullptr)); + fiveButton->setText(QCoreApplication::translate("Calculator", "5", nullptr)); + sixButton->setText(QCoreApplication::translate("Calculator", "6", nullptr)); + oneButton->setText(QCoreApplication::translate("Calculator", "1", nullptr)); + twoButton->setText(QCoreApplication::translate("Calculator", "2", nullptr)); + threeButton->setText(QCoreApplication::translate("Calculator", "3", nullptr)); + zeroButton->setText(QCoreApplication::translate("Calculator", "0", nullptr)); + pointButton->setText(QCoreApplication::translate("Calculator", ".", nullptr)); + changeSignButton->setText(QCoreApplication::translate("Calculator", "+-", nullptr)); + plusButton->setText(QCoreApplication::translate("Calculator", "+", nullptr)); + divisionButton->setText(QCoreApplication::translate("Calculator", "/", nullptr)); + timesButton->setText(QCoreApplication::translate("Calculator", "*", nullptr)); + minusButton->setText(QCoreApplication::translate("Calculator", "-", nullptr)); + squareRootButton->setText(QCoreApplication::translate("Calculator", "Sqrt", nullptr)); + powerButton->setText(QCoreApplication::translate("Calculator", "x^2", nullptr)); + reciprocalButton->setText(QCoreApplication::translate("Calculator", "1/x", nullptr)); + equalButton->setText(QCoreApplication::translate("Calculator", "=", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/calculatorform.ui.h b/tests/auto/tools/uic/baseline/calculatorform.ui.h index f4661c6237..d905d7fbb2 100644 --- a/tests/auto/tools/uic/baseline/calculatorform.ui.h +++ b/tests/auto/tools/uic/baseline/calculatorform.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'calculatorform.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -43,9 +43,9 @@ public: void setupUi(QWidget *CalculatorForm) { if (CalculatorForm->objectName().isEmpty()) - CalculatorForm->setObjectName(QString::fromUtf8("CalculatorForm")); + CalculatorForm->setObjectName("CalculatorForm"); CalculatorForm->resize(276, 98); - QSizePolicy sizePolicy(static_cast<QSizePolicy::Policy>(5), static_cast<QSizePolicy::Policy>(5)); + QSizePolicy sizePolicy(QSizePolicy::Policy::Preferred, QSizePolicy::Policy::Preferred); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); sizePolicy.setHeightForWidth(CalculatorForm->sizePolicy().hasHeightForWidth()); @@ -57,30 +57,30 @@ public: #ifndef Q_OS_MAC gridLayout->setContentsMargins(9, 9, 9, 9); #endif - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); gridLayout->setObjectName(QString::fromUtf8("")); hboxLayout = new QHBoxLayout(); #ifndef Q_OS_MAC hboxLayout->setSpacing(6); #endif hboxLayout->setContentsMargins(1, 1, 1, 1); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName("hboxLayout"); hboxLayout->setObjectName(QString::fromUtf8("")); vboxLayout = new QVBoxLayout(); #ifndef Q_OS_MAC vboxLayout->setSpacing(6); #endif vboxLayout->setContentsMargins(1, 1, 1, 1); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); vboxLayout->setObjectName(QString::fromUtf8("")); label = new QLabel(CalculatorForm); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName("label"); label->setGeometry(QRect(1, 1, 45, 19)); vboxLayout->addWidget(label); inputSpinBox1 = new QSpinBox(CalculatorForm); - inputSpinBox1->setObjectName(QString::fromUtf8("inputSpinBox1")); + inputSpinBox1->setObjectName("inputSpinBox1"); inputSpinBox1->setGeometry(QRect(1, 26, 45, 25)); inputSpinBox1->setMouseTracking(true); @@ -90,7 +90,7 @@ public: hboxLayout->addLayout(vboxLayout); label_3 = new QLabel(CalculatorForm); - label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setObjectName("label_3"); label_3->setGeometry(QRect(54, 1, 7, 52)); label_3->setAlignment(Qt::AlignCenter); @@ -101,16 +101,16 @@ public: vboxLayout1->setSpacing(6); #endif vboxLayout1->setContentsMargins(1, 1, 1, 1); - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName("vboxLayout1"); vboxLayout1->setObjectName(QString::fromUtf8("")); label_2 = new QLabel(CalculatorForm); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName("label_2"); label_2->setGeometry(QRect(1, 1, 45, 19)); vboxLayout1->addWidget(label_2); inputSpinBox2 = new QSpinBox(CalculatorForm); - inputSpinBox2->setObjectName(QString::fromUtf8("inputSpinBox2")); + inputSpinBox2->setObjectName("inputSpinBox2"); inputSpinBox2->setGeometry(QRect(1, 26, 45, 25)); inputSpinBox2->setMouseTracking(true); @@ -120,7 +120,7 @@ public: hboxLayout->addLayout(vboxLayout1); label_3_2 = new QLabel(CalculatorForm); - label_3_2->setObjectName(QString::fromUtf8("label_3_2")); + label_3_2->setObjectName("label_3_2"); label_3_2->setGeometry(QRect(120, 1, 7, 52)); label_3_2->setAlignment(Qt::AlignCenter); @@ -131,16 +131,16 @@ public: vboxLayout2->setSpacing(6); #endif vboxLayout2->setContentsMargins(1, 1, 1, 1); - vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2")); + vboxLayout2->setObjectName("vboxLayout2"); vboxLayout2->setObjectName(QString::fromUtf8("")); label_2_2_2 = new QLabel(CalculatorForm); - label_2_2_2->setObjectName(QString::fromUtf8("label_2_2_2")); + label_2_2_2->setObjectName("label_2_2_2"); label_2_2_2->setGeometry(QRect(1, 1, 37, 17)); vboxLayout2->addWidget(label_2_2_2); outputWidget = new QLabel(CalculatorForm); - outputWidget->setObjectName(QString::fromUtf8("outputWidget")); + outputWidget->setObjectName("outputWidget"); outputWidget->setGeometry(QRect(1, 24, 37, 27)); outputWidget->setFrameShape(QFrame::Box); outputWidget->setFrameShadow(QFrame::Sunken); @@ -154,11 +154,11 @@ public: gridLayout->addLayout(hboxLayout, 0, 0, 1, 1); - spacerItem = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem = new QSpacerItem(20, 40, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Expanding); gridLayout->addItem(spacerItem, 1, 0, 1, 1); - spacerItem1 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacerItem1 = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); gridLayout->addItem(spacerItem1, 0, 1, 1, 1); @@ -170,13 +170,13 @@ public: void retranslateUi(QWidget *CalculatorForm) { - CalculatorForm->setWindowTitle(QApplication::translate("CalculatorForm", "Calculator Builder", nullptr)); - label->setText(QApplication::translate("CalculatorForm", "Input 1", nullptr)); - label_3->setText(QApplication::translate("CalculatorForm", "+", nullptr)); - label_2->setText(QApplication::translate("CalculatorForm", "Input 2", nullptr)); - label_3_2->setText(QApplication::translate("CalculatorForm", "=", nullptr)); - label_2_2_2->setText(QApplication::translate("CalculatorForm", "Output", nullptr)); - outputWidget->setText(QApplication::translate("CalculatorForm", "0", nullptr)); + CalculatorForm->setWindowTitle(QCoreApplication::translate("CalculatorForm", "Calculator Builder", nullptr)); + label->setText(QCoreApplication::translate("CalculatorForm", "Input 1", nullptr)); + label_3->setText(QCoreApplication::translate("CalculatorForm", "+", nullptr)); + label_2->setText(QCoreApplication::translate("CalculatorForm", "Input 2", nullptr)); + label_3_2->setText(QCoreApplication::translate("CalculatorForm", "=", nullptr)); + label_2_2_2->setText(QCoreApplication::translate("CalculatorForm", "Output", nullptr)); + outputWidget->setText(QCoreApplication::translate("CalculatorForm", "0", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/certificateinfo.ui.h b/tests/auto/tools/uic/baseline/certificateinfo.ui.h index 2aa47d40ad..fb34b675cf 100644 --- a/tests/auto/tools/uic/baseline/certificateinfo.ui.h +++ b/tests/auto/tools/uic/baseline/certificateinfo.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'certificateinfo.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -10,6 +10,7 @@ #define CERTIFICATEINFO_H #include <QtCore/QVariant> +#include <QtWidgets/QAbstractButton> #include <QtWidgets/QApplication> #include <QtWidgets/QDialog> #include <QtWidgets/QDialogButtonBox> @@ -38,16 +39,16 @@ public: void setupUi(QDialog *CertificateInfo) { if (CertificateInfo->objectName().isEmpty()) - CertificateInfo->setObjectName(QString::fromUtf8("CertificateInfo")); + CertificateInfo->setObjectName("CertificateInfo"); CertificateInfo->resize(400, 397); vboxLayout = new QVBoxLayout(CertificateInfo); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); groupBox = new QGroupBox(CertificateInfo); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName("groupBox"); hboxLayout = new QHBoxLayout(groupBox); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName("hboxLayout"); certificationPathView = new QListWidget(groupBox); - certificationPathView->setObjectName(QString::fromUtf8("certificationPathView")); + certificationPathView->setObjectName("certificationPathView"); hboxLayout->addWidget(certificationPathView); @@ -55,11 +56,11 @@ public: vboxLayout->addWidget(groupBox); groupBox_2 = new QGroupBox(CertificateInfo); - groupBox_2->setObjectName(QString::fromUtf8("groupBox_2")); + groupBox_2->setObjectName("groupBox_2"); hboxLayout1 = new QHBoxLayout(groupBox_2); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName("hboxLayout1"); certificateInfoView = new QListWidget(groupBox_2); - certificateInfoView->setObjectName(QString::fromUtf8("certificateInfoView")); + certificateInfoView->setObjectName("certificateInfoView"); hboxLayout1->addWidget(certificateInfoView); @@ -67,13 +68,13 @@ public: vboxLayout->addWidget(groupBox_2); hboxLayout2 = new QHBoxLayout(); - hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2")); - spacerItem = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + hboxLayout2->setObjectName("hboxLayout2"); + spacerItem = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); hboxLayout2->addItem(spacerItem); buttonBox = new QDialogButtonBox(CertificateInfo); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName("buttonBox"); buttonBox->setStandardButtons(QDialogButtonBox::Close); hboxLayout2->addWidget(buttonBox); @@ -83,16 +84,16 @@ public: retranslateUi(CertificateInfo); - QObject::connect(buttonBox, SIGNAL(clicked(QAbstractButton*)), CertificateInfo, SLOT(accept())); + QObject::connect(buttonBox, &QDialogButtonBox::clicked, CertificateInfo, qOverload<>(&QDialog::accept)); QMetaObject::connectSlotsByName(CertificateInfo); } // setupUi void retranslateUi(QDialog *CertificateInfo) { - CertificateInfo->setWindowTitle(QApplication::translate("CertificateInfo", "Display Certificate Information", nullptr)); - groupBox->setTitle(QApplication::translate("CertificateInfo", "Certification Path", nullptr)); - groupBox_2->setTitle(QApplication::translate("CertificateInfo", "Certificate Information", nullptr)); + CertificateInfo->setWindowTitle(QCoreApplication::translate("CertificateInfo", "Display Certificate Information", nullptr)); + groupBox->setTitle(QCoreApplication::translate("CertificateInfo", "Certification Path", nullptr)); + groupBox_2->setTitle(QCoreApplication::translate("CertificateInfo", "Certificate Information", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/chatdialog.ui.h b/tests/auto/tools/uic/baseline/chatdialog.ui.h index ace6951669..f3351a9895 100644 --- a/tests/auto/tools/uic/baseline/chatdialog.ui.h +++ b/tests/auto/tools/uic/baseline/chatdialog.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'chatdialog.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -35,7 +35,7 @@ public: void setupUi(QDialog *ChatDialog) { if (ChatDialog->objectName().isEmpty()) - ChatDialog->setObjectName(QString::fromUtf8("ChatDialog")); + ChatDialog->setObjectName("ChatDialog"); ChatDialog->resize(513, 349); vboxLayout = new QVBoxLayout(ChatDialog); #ifndef Q_OS_MAC @@ -44,7 +44,7 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); hboxLayout = new QHBoxLayout(); #ifndef Q_OS_MAC hboxLayout->setSpacing(6); @@ -52,16 +52,16 @@ public: #ifndef Q_OS_MAC hboxLayout->setContentsMargins(0, 0, 0, 0); #endif - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName("hboxLayout"); textEdit = new QTextEdit(ChatDialog); - textEdit->setObjectName(QString::fromUtf8("textEdit")); + textEdit->setObjectName("textEdit"); textEdit->setFocusPolicy(Qt::NoFocus); textEdit->setReadOnly(true); hboxLayout->addWidget(textEdit); listWidget = new QListWidget(ChatDialog); - listWidget->setObjectName(QString::fromUtf8("listWidget")); + listWidget->setObjectName("listWidget"); listWidget->setMaximumSize(QSize(180, 16777215)); listWidget->setFocusPolicy(Qt::NoFocus); @@ -75,14 +75,14 @@ public: hboxLayout1->setSpacing(6); #endif hboxLayout1->setContentsMargins(0, 0, 0, 0); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName("hboxLayout1"); label = new QLabel(ChatDialog); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName("label"); hboxLayout1->addWidget(label); lineEdit = new QLineEdit(ChatDialog); - lineEdit->setObjectName(QString::fromUtf8("lineEdit")); + lineEdit->setObjectName("lineEdit"); hboxLayout1->addWidget(lineEdit); @@ -97,8 +97,8 @@ public: void retranslateUi(QDialog *ChatDialog) { - ChatDialog->setWindowTitle(QApplication::translate("ChatDialog", "Chat", nullptr)); - label->setText(QApplication::translate("ChatDialog", "Message:", nullptr)); + ChatDialog->setWindowTitle(QCoreApplication::translate("ChatDialog", "Chat", nullptr)); + label->setText(QCoreApplication::translate("ChatDialog", "Message:", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/chatmainwindow.ui.h b/tests/auto/tools/uic/baseline/chatmainwindow.ui.h index 8d4ccd53ae..b1ae1fc318 100644 --- a/tests/auto/tools/uic/baseline/chatmainwindow.ui.h +++ b/tests/auto/tools/uic/baseline/chatmainwindow.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'chatmainwindow.ui' ** -** Created by: Qt User Interface Compiler version 5.9.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -10,7 +10,7 @@ #define CHATMAINWINDOW_H #include <QtCore/QVariant> -#include <QtWidgets/QAction> +#include <QtGui/QAction> #include <QtWidgets/QApplication> #include <QtWidgets/QHBoxLayout> #include <QtWidgets/QLabel> @@ -48,16 +48,16 @@ public: void setupUi(QMainWindow *ChatMainWindow) { if (ChatMainWindow->objectName().isEmpty()) - ChatMainWindow->setObjectName(QString::fromUtf8("ChatMainWindow")); + ChatMainWindow->setObjectName("ChatMainWindow"); ChatMainWindow->resize(800, 600); actionQuit = new QAction(ChatMainWindow); - actionQuit->setObjectName(QString::fromUtf8("actionQuit")); + actionQuit->setObjectName("actionQuit"); actionAboutQt = new QAction(ChatMainWindow); - actionAboutQt->setObjectName(QString::fromUtf8("actionAboutQt")); + actionAboutQt->setObjectName("actionAboutQt"); actionChangeNickname = new QAction(ChatMainWindow); - actionChangeNickname->setObjectName(QString::fromUtf8("actionChangeNickname")); + actionChangeNickname->setObjectName("actionChangeNickname"); centralwidget = new QWidget(ChatMainWindow); - centralwidget->setObjectName(QString::fromUtf8("centralwidget")); + centralwidget->setObjectName("centralwidget"); hboxLayout = new QHBoxLayout(centralwidget); #ifndef Q_OS_MAC hboxLayout->setSpacing(6); @@ -65,7 +65,7 @@ public: #ifndef Q_OS_MAC hboxLayout->setContentsMargins(9, 9, 9, 9); #endif - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName("hboxLayout"); vboxLayout = new QVBoxLayout(); #ifndef Q_OS_MAC vboxLayout->setSpacing(6); @@ -73,9 +73,9 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(0, 0, 0, 0); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); chatHistory = new QTextBrowser(centralwidget); - chatHistory->setObjectName(QString::fromUtf8("chatHistory")); + chatHistory->setObjectName("chatHistory"); chatHistory->setAcceptDrops(false); chatHistory->setAcceptRichText(true); @@ -86,20 +86,20 @@ public: hboxLayout1->setSpacing(6); #endif hboxLayout1->setContentsMargins(0, 0, 0, 0); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName("hboxLayout1"); label = new QLabel(centralwidget); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName("label"); hboxLayout1->addWidget(label); messageLineEdit = new QLineEdit(centralwidget); - messageLineEdit->setObjectName(QString::fromUtf8("messageLineEdit")); + messageLineEdit->setObjectName("messageLineEdit"); hboxLayout1->addWidget(messageLineEdit); sendButton = new QPushButton(centralwidget); - sendButton->setObjectName(QString::fromUtf8("sendButton")); - QSizePolicy sizePolicy(static_cast<QSizePolicy::Policy>(1), static_cast<QSizePolicy::Policy>(0)); + sendButton->setObjectName("sendButton"); + QSizePolicy sizePolicy(QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Fixed); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); sizePolicy.setHeightForWidth(sendButton->sizePolicy().hasHeightForWidth()); @@ -115,19 +115,19 @@ public: ChatMainWindow->setCentralWidget(centralwidget); menubar = new QMenuBar(ChatMainWindow); - menubar->setObjectName(QString::fromUtf8("menubar")); + menubar->setObjectName("menubar"); menubar->setGeometry(QRect(0, 0, 800, 31)); menuQuit = new QMenu(menubar); - menuQuit->setObjectName(QString::fromUtf8("menuQuit")); + menuQuit->setObjectName("menuQuit"); menuFile = new QMenu(menubar); - menuFile->setObjectName(QString::fromUtf8("menuFile")); + menuFile->setObjectName("menuFile"); ChatMainWindow->setMenuBar(menubar); statusbar = new QStatusBar(ChatMainWindow); - statusbar->setObjectName(QString::fromUtf8("statusbar")); + statusbar->setObjectName("statusbar"); ChatMainWindow->setStatusBar(statusbar); -#ifndef QT_NO_SHORTCUT +#if QT_CONFIG(shortcut) label->setBuddy(messageLineEdit); -#endif // QT_NO_SHORTCUT +#endif // QT_CONFIG(shortcut) QWidget::setTabOrder(chatHistory, messageLineEdit); QWidget::setTabOrder(messageLineEdit, sendButton); @@ -139,37 +139,37 @@ public: menuFile->addAction(actionQuit); retranslateUi(ChatMainWindow); - QObject::connect(messageLineEdit, SIGNAL(returnPressed()), sendButton, SLOT(animateClick())); - QObject::connect(actionQuit, SIGNAL(triggered(bool)), ChatMainWindow, SLOT(close())); + QObject::connect(messageLineEdit, &QLineEdit::returnPressed, sendButton, qOverload<>(&QPushButton::animateClick)); + QObject::connect(actionQuit, &QAction::triggered, ChatMainWindow, qOverload<>(&QMainWindow::close)); QMetaObject::connectSlotsByName(ChatMainWindow); } // setupUi void retranslateUi(QMainWindow *ChatMainWindow) { - ChatMainWindow->setWindowTitle(QApplication::translate("ChatMainWindow", "Qt D-Bus Chat", nullptr)); - actionQuit->setText(QApplication::translate("ChatMainWindow", "Quit", nullptr)); -#ifndef QT_NO_SHORTCUT - actionQuit->setShortcut(QApplication::translate("ChatMainWindow", "Ctrl+Q", nullptr)); -#endif // QT_NO_SHORTCUT - actionAboutQt->setText(QApplication::translate("ChatMainWindow", "About Qt...", nullptr)); - actionChangeNickname->setText(QApplication::translate("ChatMainWindow", "Change nickname...", nullptr)); -#ifndef QT_NO_SHORTCUT - actionChangeNickname->setShortcut(QApplication::translate("ChatMainWindow", "Ctrl+N", nullptr)); -#endif // QT_NO_SHORTCUT -#ifndef QT_NO_TOOLTIP - chatHistory->setToolTip(QApplication::translate("ChatMainWindow", "Messages sent and received from other users", nullptr)); -#endif // QT_NO_TOOLTIP - label->setText(QApplication::translate("ChatMainWindow", "Message:", nullptr)); -#ifndef QT_NO_TOOLTIP - sendButton->setToolTip(QApplication::translate("ChatMainWindow", "Sends a message to other people", nullptr)); -#endif // QT_NO_TOOLTIP -#ifndef QT_NO_WHATSTHIS + ChatMainWindow->setWindowTitle(QCoreApplication::translate("ChatMainWindow", "Qt D-Bus Chat", nullptr)); + actionQuit->setText(QCoreApplication::translate("ChatMainWindow", "Quit", nullptr)); +#if QT_CONFIG(shortcut) + actionQuit->setShortcut(QCoreApplication::translate("ChatMainWindow", "Ctrl+Q", nullptr)); +#endif // QT_CONFIG(shortcut) + actionAboutQt->setText(QCoreApplication::translate("ChatMainWindow", "About Qt...", nullptr)); + actionChangeNickname->setText(QCoreApplication::translate("ChatMainWindow", "Change nickname...", nullptr)); +#if QT_CONFIG(shortcut) + actionChangeNickname->setShortcut(QCoreApplication::translate("ChatMainWindow", "Ctrl+N", nullptr)); +#endif // QT_CONFIG(shortcut) +#if QT_CONFIG(tooltip) + chatHistory->setToolTip(QCoreApplication::translate("ChatMainWindow", "Messages sent and received from other users", nullptr)); +#endif // QT_CONFIG(tooltip) + label->setText(QCoreApplication::translate("ChatMainWindow", "Message:", nullptr)); +#if QT_CONFIG(tooltip) + sendButton->setToolTip(QCoreApplication::translate("ChatMainWindow", "Sends a message to other people", nullptr)); +#endif // QT_CONFIG(tooltip) +#if QT_CONFIG(whatsthis) sendButton->setWhatsThis(QString()); -#endif // QT_NO_WHATSTHIS - sendButton->setText(QApplication::translate("ChatMainWindow", "Send", nullptr)); - menuQuit->setTitle(QApplication::translate("ChatMainWindow", "Help", nullptr)); - menuFile->setTitle(QApplication::translate("ChatMainWindow", "File", nullptr)); +#endif // QT_CONFIG(whatsthis) + sendButton->setText(QCoreApplication::translate("ChatMainWindow", "Send", nullptr)); + menuQuit->setTitle(QCoreApplication::translate("ChatMainWindow", "Help", nullptr)); + menuFile->setTitle(QCoreApplication::translate("ChatMainWindow", "File", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/chatsetnickname.ui.h b/tests/auto/tools/uic/baseline/chatsetnickname.ui.h index c73dfb2c6e..e8674e0960 100644 --- a/tests/auto/tools/uic/baseline/chatsetnickname.ui.h +++ b/tests/auto/tools/uic/baseline/chatsetnickname.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'chatsetnickname.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -37,9 +37,9 @@ public: void setupUi(QDialog *NicknameDialog) { if (NicknameDialog->objectName().isEmpty()) - NicknameDialog->setObjectName(QString::fromUtf8("NicknameDialog")); + NicknameDialog->setObjectName("NicknameDialog"); NicknameDialog->resize(396, 105); - QSizePolicy sizePolicy(static_cast<QSizePolicy::Policy>(1), static_cast<QSizePolicy::Policy>(1)); + QSizePolicy sizePolicy(QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Minimum); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); sizePolicy.setHeightForWidth(NicknameDialog->sizePolicy().hasHeightForWidth()); @@ -51,7 +51,7 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); vboxLayout1 = new QVBoxLayout(); #ifndef Q_OS_MAC vboxLayout1->setSpacing(6); @@ -59,16 +59,16 @@ public: #ifndef Q_OS_MAC vboxLayout1->setContentsMargins(0, 0, 0, 0); #endif - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName("vboxLayout1"); label = new QLabel(NicknameDialog); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName("label"); sizePolicy.setHeightForWidth(label->sizePolicy().hasHeightForWidth()); label->setSizePolicy(sizePolicy); vboxLayout1->addWidget(label); nickname = new QLineEdit(NicknameDialog); - nickname->setObjectName(QString::fromUtf8("nickname")); + nickname->setObjectName("nickname"); vboxLayout1->addWidget(nickname); @@ -80,22 +80,22 @@ public: hboxLayout->setSpacing(6); #endif hboxLayout->setContentsMargins(0, 0, 0, 0); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); - spacerItem = new QSpacerItem(131, 31, QSizePolicy::Expanding, QSizePolicy::Minimum); + hboxLayout->setObjectName("hboxLayout"); + spacerItem = new QSpacerItem(131, 31, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); hboxLayout->addItem(spacerItem); okButton = new QPushButton(NicknameDialog); - okButton->setObjectName(QString::fromUtf8("okButton")); + okButton->setObjectName("okButton"); hboxLayout->addWidget(okButton); cancelButton = new QPushButton(NicknameDialog); - cancelButton->setObjectName(QString::fromUtf8("cancelButton")); + cancelButton->setObjectName("cancelButton"); hboxLayout->addWidget(cancelButton); - spacerItem1 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacerItem1 = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); hboxLayout->addItem(spacerItem1); @@ -104,18 +104,18 @@ public: retranslateUi(NicknameDialog); - QObject::connect(okButton, SIGNAL(clicked()), NicknameDialog, SLOT(accept())); - QObject::connect(cancelButton, SIGNAL(clicked()), NicknameDialog, SLOT(reject())); + QObject::connect(okButton, &QPushButton::clicked, NicknameDialog, qOverload<>(&QDialog::accept)); + QObject::connect(cancelButton, &QPushButton::clicked, NicknameDialog, qOverload<>(&QDialog::reject)); QMetaObject::connectSlotsByName(NicknameDialog); } // setupUi void retranslateUi(QDialog *NicknameDialog) { - NicknameDialog->setWindowTitle(QApplication::translate("NicknameDialog", "Set nickname", nullptr)); - label->setText(QApplication::translate("NicknameDialog", "New nickname:", nullptr)); - okButton->setText(QApplication::translate("NicknameDialog", "OK", nullptr)); - cancelButton->setText(QApplication::translate("NicknameDialog", "Cancel", nullptr)); + NicknameDialog->setWindowTitle(QCoreApplication::translate("NicknameDialog", "Set nickname", nullptr)); + label->setText(QCoreApplication::translate("NicknameDialog", "New nickname:", nullptr)); + okButton->setText(QCoreApplication::translate("NicknameDialog", "OK", nullptr)); + cancelButton->setText(QCoreApplication::translate("NicknameDialog", "Cancel", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/config.ui b/tests/auto/tools/uic/baseline/config.ui index ff8251e017..cf0d88006f 100644 --- a/tests/auto/tools/uic/baseline/config.ui +++ b/tests/auto/tools/uic/baseline/config.ui @@ -1,31 +1,8 @@ <ui version="4.0" > - <comment>********************************************************************* -** -** 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$ -** -*********************************************************************</comment> +<comment> +* Copyright (C) 2016 The Qt Company Ltd. +* SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +</comment> <class>Config</class> <widget class="QDialog" name="Config" > <property name="geometry" > diff --git a/tests/auto/tools/uic/baseline/config.ui.h b/tests/auto/tools/uic/baseline/config.ui.h index 8287e0b1ac..3fc86035c8 100644 --- a/tests/auto/tools/uic/baseline/config.ui.h +++ b/tests/auto/tools/uic/baseline/config.ui.h @@ -1,37 +1,14 @@ /* -********************************************************************* -** -** 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$ -** -********************************************************************* + +* Copyright (C) 2016 The Qt Company Ltd. +* SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + */ /******************************************************************************** ** Form generated from reading UI file 'config.ui' ** -** Created by: Qt User Interface Compiler version 5.10.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -118,21 +95,21 @@ public: void setupUi(QDialog *Config) { if (Config->objectName().isEmpty()) - Config->setObjectName(QString::fromUtf8("Config")); + Config->setObjectName("Config"); Config->resize(600, 650); Config->setSizeGripEnabled(true); vboxLayout = new QVBoxLayout(Config); vboxLayout->setSpacing(6); vboxLayout->setContentsMargins(11, 11, 11, 11); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); vboxLayout->setContentsMargins(8, 8, 8, 8); hboxLayout = new QHBoxLayout(); hboxLayout->setSpacing(6); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName("hboxLayout"); hboxLayout->setContentsMargins(0, 0, 0, 0); ButtonGroup1 = new QGroupBox(Config); - ButtonGroup1->setObjectName(QString::fromUtf8("ButtonGroup1")); - QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); + ButtonGroup1->setObjectName("ButtonGroup1"); + QSizePolicy sizePolicy(QSizePolicy::Policy::Preferred, QSizePolicy::Policy::Preferred); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); sizePolicy.setHeightForWidth(ButtonGroup1->sizePolicy().hasHeightForWidth()); @@ -140,45 +117,45 @@ public: vboxLayout1 = new QVBoxLayout(ButtonGroup1); vboxLayout1->setSpacing(6); vboxLayout1->setContentsMargins(11, 11, 11, 11); - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName("vboxLayout1"); vboxLayout1->setContentsMargins(11, 11, 11, 11); size_176_220 = new QRadioButton(ButtonGroup1); - size_176_220->setObjectName(QString::fromUtf8("size_176_220")); + size_176_220->setObjectName("size_176_220"); vboxLayout1->addWidget(size_176_220); size_240_320 = new QRadioButton(ButtonGroup1); - size_240_320->setObjectName(QString::fromUtf8("size_240_320")); + size_240_320->setObjectName("size_240_320"); vboxLayout1->addWidget(size_240_320); size_320_240 = new QRadioButton(ButtonGroup1); - size_320_240->setObjectName(QString::fromUtf8("size_320_240")); + size_320_240->setObjectName("size_320_240"); vboxLayout1->addWidget(size_320_240); size_640_480 = new QRadioButton(ButtonGroup1); - size_640_480->setObjectName(QString::fromUtf8("size_640_480")); + size_640_480->setObjectName("size_640_480"); vboxLayout1->addWidget(size_640_480); size_800_600 = new QRadioButton(ButtonGroup1); - size_800_600->setObjectName(QString::fromUtf8("size_800_600")); + size_800_600->setObjectName("size_800_600"); vboxLayout1->addWidget(size_800_600); size_1024_768 = new QRadioButton(ButtonGroup1); - size_1024_768->setObjectName(QString::fromUtf8("size_1024_768")); + size_1024_768->setObjectName("size_1024_768"); vboxLayout1->addWidget(size_1024_768); hboxLayout1 = new QHBoxLayout(); hboxLayout1->setSpacing(6); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName("hboxLayout1"); hboxLayout1->setContentsMargins(0, 0, 0, 0); size_custom = new QRadioButton(ButtonGroup1); - size_custom->setObjectName(QString::fromUtf8("size_custom")); - QSizePolicy sizePolicy1(QSizePolicy::Fixed, QSizePolicy::Fixed); + size_custom->setObjectName("size_custom"); + QSizePolicy sizePolicy1(QSizePolicy::Policy::Fixed, QSizePolicy::Policy::Fixed); sizePolicy1.setHorizontalStretch(0); sizePolicy1.setVerticalStretch(0); sizePolicy1.setHeightForWidth(size_custom->sizePolicy().hasHeightForWidth()); @@ -187,7 +164,7 @@ public: hboxLayout1->addWidget(size_custom); size_width = new QSpinBox(ButtonGroup1); - size_width->setObjectName(QString::fromUtf8("size_width")); + size_width->setObjectName("size_width"); size_width->setMinimum(1); size_width->setMaximum(1280); size_width->setSingleStep(16); @@ -196,7 +173,7 @@ public: hboxLayout1->addWidget(size_width); size_height = new QSpinBox(ButtonGroup1); - size_height->setObjectName(QString::fromUtf8("size_height")); + size_height->setObjectName("size_height"); size_height->setMinimum(1); size_height->setMaximum(1024); size_height->setSingleStep(16); @@ -211,59 +188,59 @@ public: hboxLayout->addWidget(ButtonGroup1); ButtonGroup2 = new QGroupBox(Config); - ButtonGroup2->setObjectName(QString::fromUtf8("ButtonGroup2")); + ButtonGroup2->setObjectName("ButtonGroup2"); vboxLayout2 = new QVBoxLayout(ButtonGroup2); vboxLayout2->setSpacing(6); vboxLayout2->setContentsMargins(11, 11, 11, 11); - vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2")); + vboxLayout2->setObjectName("vboxLayout2"); vboxLayout2->setContentsMargins(11, 11, 11, 11); depth_1 = new QRadioButton(ButtonGroup2); - depth_1->setObjectName(QString::fromUtf8("depth_1")); + depth_1->setObjectName("depth_1"); vboxLayout2->addWidget(depth_1); depth_4gray = new QRadioButton(ButtonGroup2); - depth_4gray->setObjectName(QString::fromUtf8("depth_4gray")); + depth_4gray->setObjectName("depth_4gray"); vboxLayout2->addWidget(depth_4gray); depth_8 = new QRadioButton(ButtonGroup2); - depth_8->setObjectName(QString::fromUtf8("depth_8")); + depth_8->setObjectName("depth_8"); vboxLayout2->addWidget(depth_8); depth_12 = new QRadioButton(ButtonGroup2); - depth_12->setObjectName(QString::fromUtf8("depth_12")); + depth_12->setObjectName("depth_12"); vboxLayout2->addWidget(depth_12); depth_15 = new QRadioButton(ButtonGroup2); - depth_15->setObjectName(QString::fromUtf8("depth_15")); + depth_15->setObjectName("depth_15"); vboxLayout2->addWidget(depth_15); depth_16 = new QRadioButton(ButtonGroup2); - depth_16->setObjectName(QString::fromUtf8("depth_16")); + depth_16->setObjectName("depth_16"); vboxLayout2->addWidget(depth_16); depth_18 = new QRadioButton(ButtonGroup2); - depth_18->setObjectName(QString::fromUtf8("depth_18")); + depth_18->setObjectName("depth_18"); vboxLayout2->addWidget(depth_18); depth_24 = new QRadioButton(ButtonGroup2); - depth_24->setObjectName(QString::fromUtf8("depth_24")); + depth_24->setObjectName("depth_24"); vboxLayout2->addWidget(depth_24); depth_32 = new QRadioButton(ButtonGroup2); - depth_32->setObjectName(QString::fromUtf8("depth_32")); + depth_32->setObjectName("depth_32"); vboxLayout2->addWidget(depth_32); depth_32_argb = new QRadioButton(ButtonGroup2); - depth_32_argb->setObjectName(QString::fromUtf8("depth_32_argb")); + depth_32_argb->setObjectName("depth_32_argb"); vboxLayout2->addWidget(depth_32_argb); @@ -275,17 +252,17 @@ public: hboxLayout2 = new QHBoxLayout(); hboxLayout2->setSpacing(6); - hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2")); + hboxLayout2->setObjectName("hboxLayout2"); hboxLayout2->setContentsMargins(0, 0, 0, 0); TextLabel1_3 = new QLabel(Config); - TextLabel1_3->setObjectName(QString::fromUtf8("TextLabel1_3")); + TextLabel1_3->setObjectName("TextLabel1_3"); hboxLayout2->addWidget(TextLabel1_3); skin = new QComboBox(Config); skin->addItem(QString()); - skin->setObjectName(QString::fromUtf8("skin")); - QSizePolicy sizePolicy2(QSizePolicy::Expanding, QSizePolicy::Fixed); + skin->setObjectName("skin"); + QSizePolicy sizePolicy2(QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Fixed); sizePolicy2.setHorizontalStretch(0); sizePolicy2.setVerticalStretch(0); sizePolicy2.setHeightForWidth(skin->sizePolicy().hasHeightForWidth()); @@ -297,21 +274,21 @@ public: vboxLayout->addLayout(hboxLayout2); touchScreen = new QCheckBox(Config); - touchScreen->setObjectName(QString::fromUtf8("touchScreen")); + touchScreen->setObjectName("touchScreen"); vboxLayout->addWidget(touchScreen); lcdScreen = new QCheckBox(Config); - lcdScreen->setObjectName(QString::fromUtf8("lcdScreen")); + lcdScreen->setObjectName("lcdScreen"); vboxLayout->addWidget(lcdScreen); - spacerItem = new QSpacerItem(20, 10, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem = new QSpacerItem(20, 10, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Expanding); vboxLayout->addItem(spacerItem); TextLabel1 = new QLabel(Config); - TextLabel1->setObjectName(QString::fromUtf8("TextLabel1")); + TextLabel1->setObjectName("TextLabel1"); sizePolicy.setHeightForWidth(TextLabel1->sizePolicy().hasHeightForWidth()); TextLabel1->setSizePolicy(sizePolicy); TextLabel1->setWordWrap(true); @@ -319,21 +296,21 @@ public: vboxLayout->addWidget(TextLabel1); GroupBox1 = new QGroupBox(Config); - GroupBox1->setObjectName(QString::fromUtf8("GroupBox1")); + GroupBox1->setObjectName("GroupBox1"); gridLayout = new QGridLayout(GroupBox1); gridLayout->setSpacing(6); gridLayout->setContentsMargins(11, 11, 11, 11); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); gridLayout->setHorizontalSpacing(6); gridLayout->setVerticalSpacing(6); gridLayout->setContentsMargins(11, 11, 11, 11); TextLabel3 = new QLabel(GroupBox1); - TextLabel3->setObjectName(QString::fromUtf8("TextLabel3")); + TextLabel3->setObjectName("TextLabel3"); gridLayout->addWidget(TextLabel3, 6, 0, 1, 1); bslider = new QSlider(GroupBox1); - bslider->setObjectName(QString::fromUtf8("bslider")); + bslider->setObjectName("bslider"); QPalette palette; QBrush brush(QColor(128, 128, 128, 255)); brush.setStyle(Qt::SolidPattern); @@ -416,17 +393,17 @@ public: gridLayout->addWidget(bslider, 6, 1, 1, 1); blabel = new QLabel(GroupBox1); - blabel->setObjectName(QString::fromUtf8("blabel")); + blabel->setObjectName("blabel"); gridLayout->addWidget(blabel, 6, 2, 1, 1); TextLabel2 = new QLabel(GroupBox1); - TextLabel2->setObjectName(QString::fromUtf8("TextLabel2")); + TextLabel2->setObjectName("TextLabel2"); gridLayout->addWidget(TextLabel2, 4, 0, 1, 1); gslider = new QSlider(GroupBox1); - gslider->setObjectName(QString::fromUtf8("gslider")); + gslider->setObjectName("gslider"); QPalette palette1; palette1.setBrush(QPalette::Active, QPalette::WindowText, brush); QBrush brush11(QColor(0, 255, 0, 255)); @@ -497,22 +474,22 @@ public: gridLayout->addWidget(gslider, 4, 1, 1, 1); glabel = new QLabel(GroupBox1); - glabel->setObjectName(QString::fromUtf8("glabel")); + glabel->setObjectName("glabel"); gridLayout->addWidget(glabel, 4, 2, 1, 1); TextLabel7 = new QLabel(GroupBox1); - TextLabel7->setObjectName(QString::fromUtf8("TextLabel7")); + TextLabel7->setObjectName("TextLabel7"); gridLayout->addWidget(TextLabel7, 0, 0, 1, 1); TextLabel8 = new QLabel(GroupBox1); - TextLabel8->setObjectName(QString::fromUtf8("TextLabel8")); + TextLabel8->setObjectName("TextLabel8"); gridLayout->addWidget(TextLabel8, 0, 2, 1, 1); gammaslider = new QSlider(GroupBox1); - gammaslider->setObjectName(QString::fromUtf8("gammaslider")); + gammaslider->setObjectName("gammaslider"); QPalette palette2; palette2.setBrush(QPalette::Active, QPalette::WindowText, brush); palette2.setBrush(QPalette::Active, QPalette::Button, brush7); @@ -577,17 +554,17 @@ public: gridLayout->addWidget(gammaslider, 0, 1, 1, 1); TextLabel1_2 = new QLabel(GroupBox1); - TextLabel1_2->setObjectName(QString::fromUtf8("TextLabel1_2")); + TextLabel1_2->setObjectName("TextLabel1_2"); gridLayout->addWidget(TextLabel1_2, 2, 0, 1, 1); rlabel = new QLabel(GroupBox1); - rlabel->setObjectName(QString::fromUtf8("rlabel")); + rlabel->setObjectName("rlabel"); gridLayout->addWidget(rlabel, 2, 2, 1, 1); rslider = new QSlider(GroupBox1); - rslider->setObjectName(QString::fromUtf8("rslider")); + rslider->setObjectName("rslider"); QPalette palette3; palette3.setBrush(QPalette::Active, QPalette::WindowText, brush); QBrush brush18(QColor(255, 0, 0, 255)); @@ -658,12 +635,12 @@ public: gridLayout->addWidget(rslider, 2, 1, 1, 1); PushButton3 = new QPushButton(GroupBox1); - PushButton3->setObjectName(QString::fromUtf8("PushButton3")); + PushButton3->setObjectName("PushButton3"); gridLayout->addWidget(PushButton3, 8, 0, 1, 3); MyCustomWidget1 = new GammaView(GroupBox1); - MyCustomWidget1->setObjectName(QString::fromUtf8("MyCustomWidget1")); + MyCustomWidget1->setObjectName("MyCustomWidget1"); gridLayout->addWidget(MyCustomWidget1, 0, 3, 9, 1); @@ -672,20 +649,20 @@ public: hboxLayout3 = new QHBoxLayout(); hboxLayout3->setSpacing(6); - hboxLayout3->setObjectName(QString::fromUtf8("hboxLayout3")); + hboxLayout3->setObjectName("hboxLayout3"); hboxLayout3->setContentsMargins(0, 0, 0, 0); - spacerItem1 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacerItem1 = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); hboxLayout3->addItem(spacerItem1); buttonOk = new QPushButton(Config); - buttonOk->setObjectName(QString::fromUtf8("buttonOk")); + buttonOk->setObjectName("buttonOk"); buttonOk->setAutoDefault(true); hboxLayout3->addWidget(buttonOk); buttonCancel = new QPushButton(Config); - buttonCancel->setObjectName(QString::fromUtf8("buttonCancel")); + buttonCancel->setObjectName("buttonCancel"); buttonCancel->setAutoDefault(true); hboxLayout3->addWidget(buttonCancel); @@ -695,8 +672,8 @@ public: retranslateUi(Config); - QObject::connect(size_width, SIGNAL(valueChanged(int)), size_custom, SLOT(click())); - QObject::connect(size_height, SIGNAL(valueChanged(int)), size_custom, SLOT(click())); + QObject::connect(size_width, &QSpinBox::valueChanged, size_custom, qOverload<>(&QRadioButton::click)); + QObject::connect(size_height, &QSpinBox::valueChanged, size_custom, qOverload<>(&QRadioButton::click)); buttonOk->setDefault(true); @@ -706,44 +683,44 @@ public: void retranslateUi(QDialog *Config) { - Config->setWindowTitle(QApplication::translate("Config", "Configure", nullptr)); - ButtonGroup1->setTitle(QApplication::translate("Config", "Size", nullptr)); - size_176_220->setText(QApplication::translate("Config", "176x220 \"SmartPhone\"", nullptr)); - size_240_320->setText(QApplication::translate("Config", "240x320 \"PDA\"", nullptr)); - size_320_240->setText(QApplication::translate("Config", "320x240 \"TV\" / \"QVGA\"", nullptr)); - size_640_480->setText(QApplication::translate("Config", "640x480 \"VGA\"", nullptr)); - size_800_600->setText(QApplication::translate("Config", "800x600", nullptr)); - size_1024_768->setText(QApplication::translate("Config", "1024x768", nullptr)); - size_custom->setText(QApplication::translate("Config", "Custom", nullptr)); - ButtonGroup2->setTitle(QApplication::translate("Config", "Depth", nullptr)); - depth_1->setText(QApplication::translate("Config", "1 bit monochrome", nullptr)); - depth_4gray->setText(QApplication::translate("Config", "4 bit grayscale", nullptr)); - depth_8->setText(QApplication::translate("Config", "8 bit", nullptr)); - depth_12->setText(QApplication::translate("Config", "12 (16) bit", nullptr)); - depth_15->setText(QApplication::translate("Config", "15 bit", nullptr)); - depth_16->setText(QApplication::translate("Config", "16 bit", nullptr)); - depth_18->setText(QApplication::translate("Config", "18 bit", nullptr)); - depth_24->setText(QApplication::translate("Config", "24 bit", nullptr)); - depth_32->setText(QApplication::translate("Config", "32 bit", nullptr)); - depth_32_argb->setText(QApplication::translate("Config", "32 bit ARGB", nullptr)); - TextLabel1_3->setText(QApplication::translate("Config", "Skin", nullptr)); - skin->setItemText(0, QApplication::translate("Config", "None", nullptr)); - - touchScreen->setText(QApplication::translate("Config", "Emulate touch screen (no mouse move)", nullptr)); - lcdScreen->setText(QApplication::translate("Config", "Emulate LCD screen (Only with fixed zoom of 3.0 times magnification)", nullptr)); - TextLabel1->setText(QApplication::translate("Config", "<p>Note that any applications using the virtual framebuffer will be terminated if you change the Size or Depth <i>above</i>. You may freely modify the Gamma <i>below</i>.", nullptr)); - GroupBox1->setTitle(QApplication::translate("Config", "Gamma", nullptr)); - TextLabel3->setText(QApplication::translate("Config", "Blue", nullptr)); - blabel->setText(QApplication::translate("Config", "1.0", nullptr)); - TextLabel2->setText(QApplication::translate("Config", "Green", nullptr)); - glabel->setText(QApplication::translate("Config", "1.0", nullptr)); - TextLabel7->setText(QApplication::translate("Config", "All", nullptr)); - TextLabel8->setText(QApplication::translate("Config", "1.0", nullptr)); - TextLabel1_2->setText(QApplication::translate("Config", "Red", nullptr)); - rlabel->setText(QApplication::translate("Config", "1.0", nullptr)); - PushButton3->setText(QApplication::translate("Config", "Set all to 1.0", nullptr)); - buttonOk->setText(QApplication::translate("Config", "&OK", nullptr)); - buttonCancel->setText(QApplication::translate("Config", "&Cancel", nullptr)); + Config->setWindowTitle(QCoreApplication::translate("Config", "Configure", nullptr)); + ButtonGroup1->setTitle(QCoreApplication::translate("Config", "Size", nullptr)); + size_176_220->setText(QCoreApplication::translate("Config", "176x220 \"SmartPhone\"", nullptr)); + size_240_320->setText(QCoreApplication::translate("Config", "240x320 \"PDA\"", nullptr)); + size_320_240->setText(QCoreApplication::translate("Config", "320x240 \"TV\" / \"QVGA\"", nullptr)); + size_640_480->setText(QCoreApplication::translate("Config", "640x480 \"VGA\"", nullptr)); + size_800_600->setText(QCoreApplication::translate("Config", "800x600", nullptr)); + size_1024_768->setText(QCoreApplication::translate("Config", "1024x768", nullptr)); + size_custom->setText(QCoreApplication::translate("Config", "Custom", nullptr)); + ButtonGroup2->setTitle(QCoreApplication::translate("Config", "Depth", nullptr)); + depth_1->setText(QCoreApplication::translate("Config", "1 bit monochrome", nullptr)); + depth_4gray->setText(QCoreApplication::translate("Config", "4 bit grayscale", nullptr)); + depth_8->setText(QCoreApplication::translate("Config", "8 bit", nullptr)); + depth_12->setText(QCoreApplication::translate("Config", "12 (16) bit", nullptr)); + depth_15->setText(QCoreApplication::translate("Config", "15 bit", nullptr)); + depth_16->setText(QCoreApplication::translate("Config", "16 bit", nullptr)); + depth_18->setText(QCoreApplication::translate("Config", "18 bit", nullptr)); + depth_24->setText(QCoreApplication::translate("Config", "24 bit", nullptr)); + depth_32->setText(QCoreApplication::translate("Config", "32 bit", nullptr)); + depth_32_argb->setText(QCoreApplication::translate("Config", "32 bit ARGB", nullptr)); + TextLabel1_3->setText(QCoreApplication::translate("Config", "Skin", nullptr)); + skin->setItemText(0, QCoreApplication::translate("Config", "None", nullptr)); + + touchScreen->setText(QCoreApplication::translate("Config", "Emulate touch screen (no mouse move)", nullptr)); + lcdScreen->setText(QCoreApplication::translate("Config", "Emulate LCD screen (Only with fixed zoom of 3.0 times magnification)", nullptr)); + TextLabel1->setText(QCoreApplication::translate("Config", "<p>Note that any applications using the virtual framebuffer will be terminated if you change the Size or Depth <i>above</i>. You may freely modify the Gamma <i>below</i>.", nullptr)); + GroupBox1->setTitle(QCoreApplication::translate("Config", "Gamma", nullptr)); + TextLabel3->setText(QCoreApplication::translate("Config", "Blue", nullptr)); + blabel->setText(QCoreApplication::translate("Config", "1.0", nullptr)); + TextLabel2->setText(QCoreApplication::translate("Config", "Green", nullptr)); + glabel->setText(QCoreApplication::translate("Config", "1.0", nullptr)); + TextLabel7->setText(QCoreApplication::translate("Config", "All", nullptr)); + TextLabel8->setText(QCoreApplication::translate("Config", "1.0", nullptr)); + TextLabel1_2->setText(QCoreApplication::translate("Config", "Red", nullptr)); + rlabel->setText(QCoreApplication::translate("Config", "1.0", nullptr)); + PushButton3->setText(QCoreApplication::translate("Config", "Set all to 1.0", nullptr)); + buttonOk->setText(QCoreApplication::translate("Config", "&OK", nullptr)); + buttonCancel->setText(QCoreApplication::translate("Config", "&Cancel", nullptr)); } // retranslateUi }; 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..e591058a49 --- /dev/null +++ b/tests/auto/tools/uic/baseline/config.ui.py @@ -0,0 +1,659 @@ +# -*- coding: utf-8 -*- + +# +# Copyright (C) 2016 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +# + +################################################################################ +## Form generated from reading UI file 'config.ui' +## +## Created by: Qt User Interface Compiler version 6.0.0 +## +## WARNING! All changes made in this file will be lost when recompiling UI file! +################################################################################ + +from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale, + QMetaObject, QObject, QPoint, QRect, + QSize, QTime, QUrl, Qt) +from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor, + QFont, QFontDatabase, QGradient, QIcon, + QImage, QKeySequence, QLinearGradient, QPainter, + QPalette, QPixmap, QRadialGradient, QTransform) +from PySide6.QtWidgets import (QApplication, QCheckBox, QComboBox, QDialog, + QGridLayout, QGroupBox, QHBoxLayout, QLabel, + QPushButton, QRadioButton, QSizePolicy, QSlider, + QSpacerItem, QSpinBox, QVBoxLayout, QWidget) + +from gammaview import GammaView + +class Ui_Config(object): + def setupUi(self, Config): + if not 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.Policy.Preferred, QSizePolicy.Policy.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.Policy.Fixed, QSizePolicy.Policy.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.Policy.Expanding, QSizePolicy.Policy.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.Policy.Minimum, QSizePolicy.Policy.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.Policy.Expanding, QSizePolicy.Policy.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"<p>Note that any applications using the virtual framebuffer will be terminated if you change the Size or Depth <i>above</i>. You may freely modify the Gamma <i>below</i>.", 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/baseline/connectdialog.ui.h b/tests/auto/tools/uic/baseline/connectdialog.ui.h index a470a6705d..e3616cae2c 100644 --- a/tests/auto/tools/uic/baseline/connectdialog.ui.h +++ b/tests/auto/tools/uic/baseline/connectdialog.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'connectdialog.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -10,6 +10,7 @@ #define CONNECTDIALOG_H #include <QtCore/QVariant> +#include <QtWidgets/QAbstractButton> #include <QtWidgets/QApplication> #include <QtWidgets/QCheckBox> #include <QtWidgets/QDialog> @@ -46,28 +47,28 @@ public: void setupUi(QDialog *ConnectDialog) { if (ConnectDialog->objectName().isEmpty()) - ConnectDialog->setObjectName(QString::fromUtf8("ConnectDialog")); + ConnectDialog->setObjectName("ConnectDialog"); ConnectDialog->resize(585, 361); gridLayout = new QGridLayout(ConnectDialog); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); signalGroupBox = new QGroupBox(ConnectDialog); - signalGroupBox->setObjectName(QString::fromUtf8("signalGroupBox")); + signalGroupBox->setObjectName("signalGroupBox"); vboxLayout = new QVBoxLayout(signalGroupBox); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); signalList = new QListWidget(signalGroupBox); - signalList->setObjectName(QString::fromUtf8("signalList")); + signalList->setObjectName("signalList"); signalList->setTextElideMode(Qt::ElideMiddle); vboxLayout->addWidget(signalList); hboxLayout = new QHBoxLayout(); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName("hboxLayout"); editSignalsButton = new QToolButton(signalGroupBox); - editSignalsButton->setObjectName(QString::fromUtf8("editSignalsButton")); + editSignalsButton->setObjectName("editSignalsButton"); hboxLayout->addWidget(editSignalsButton); - spacerItem = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacerItem = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); hboxLayout->addItem(spacerItem); @@ -78,23 +79,23 @@ public: gridLayout->addWidget(signalGroupBox, 0, 0, 1, 2); slotGroupBox = new QGroupBox(ConnectDialog); - slotGroupBox->setObjectName(QString::fromUtf8("slotGroupBox")); + slotGroupBox->setObjectName("slotGroupBox"); vboxLayout1 = new QVBoxLayout(slotGroupBox); - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName("vboxLayout1"); slotList = new QListWidget(slotGroupBox); - slotList->setObjectName(QString::fromUtf8("slotList")); + slotList->setObjectName("slotList"); slotList->setTextElideMode(Qt::ElideMiddle); vboxLayout1->addWidget(slotList); hboxLayout1 = new QHBoxLayout(); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName("hboxLayout1"); editSlotsButton = new QToolButton(slotGroupBox); - editSlotsButton->setObjectName(QString::fromUtf8("editSlotsButton")); + editSlotsButton->setObjectName("editSlotsButton"); hboxLayout1->addWidget(editSlotsButton); - spacerItem1 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacerItem1 = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); hboxLayout1->addItem(spacerItem1); @@ -105,12 +106,12 @@ public: gridLayout->addWidget(slotGroupBox, 0, 2, 1, 1); showAllCheckBox = new QCheckBox(ConnectDialog); - showAllCheckBox->setObjectName(QString::fromUtf8("showAllCheckBox")); + showAllCheckBox->setObjectName("showAllCheckBox"); gridLayout->addWidget(showAllCheckBox, 1, 0, 1, 1); buttonBox = new QDialogButtonBox(ConnectDialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName("buttonBox"); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok); @@ -118,20 +119,20 @@ public: retranslateUi(ConnectDialog); - QObject::connect(buttonBox, SIGNAL(accepted()), ConnectDialog, SLOT(accept())); - QObject::connect(buttonBox, SIGNAL(rejected()), ConnectDialog, SLOT(reject())); + QObject::connect(buttonBox, &QDialogButtonBox::accepted, ConnectDialog, qOverload<>(&QDialog::accept)); + QObject::connect(buttonBox, &QDialogButtonBox::rejected, ConnectDialog, qOverload<>(&QDialog::reject)); QMetaObject::connectSlotsByName(ConnectDialog); } // setupUi void retranslateUi(QDialog *ConnectDialog) { - ConnectDialog->setWindowTitle(QApplication::translate("ConnectDialog", "Configure Connection", nullptr)); - signalGroupBox->setTitle(QApplication::translate("ConnectDialog", "GroupBox", nullptr)); - editSignalsButton->setText(QApplication::translate("ConnectDialog", "Edit...", nullptr)); - slotGroupBox->setTitle(QApplication::translate("ConnectDialog", "GroupBox", nullptr)); - editSlotsButton->setText(QApplication::translate("ConnectDialog", "Edit...", nullptr)); - showAllCheckBox->setText(QApplication::translate("ConnectDialog", "Show signals and slots inherited from QWidget", nullptr)); + ConnectDialog->setWindowTitle(QCoreApplication::translate("ConnectDialog", "Configure Connection", nullptr)); + signalGroupBox->setTitle(QCoreApplication::translate("ConnectDialog", "GroupBox", nullptr)); + editSignalsButton->setText(QCoreApplication::translate("ConnectDialog", "Edit...", nullptr)); + slotGroupBox->setTitle(QCoreApplication::translate("ConnectDialog", "GroupBox", nullptr)); + editSlotsButton->setText(QCoreApplication::translate("ConnectDialog", "Edit...", nullptr)); + showAllCheckBox->setText(QCoreApplication::translate("ConnectDialog", "Show signals and slots inherited from QWidget", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/controller.ui.h b/tests/auto/tools/uic/baseline/controller.ui.h index 72b0956472..6cc19409b3 100644 --- a/tests/auto/tools/uic/baseline/controller.ui.h +++ b/tests/auto/tools/uic/baseline/controller.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'controller.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -31,7 +31,7 @@ public: void setupUi(QWidget *Controller) { if (Controller->objectName().isEmpty()) - Controller->setObjectName(QString::fromUtf8("Controller")); + Controller->setObjectName("Controller"); Controller->resize(255, 111); gridLayout = new QGridLayout(Controller); #ifndef Q_OS_MAC @@ -40,30 +40,30 @@ public: #ifndef Q_OS_MAC gridLayout->setContentsMargins(9, 9, 9, 9); #endif - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); label = new QLabel(Controller); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName("label"); label->setAlignment(Qt::AlignCenter); gridLayout->addWidget(label, 1, 1, 1, 1); decelerate = new QPushButton(Controller); - decelerate->setObjectName(QString::fromUtf8("decelerate")); + decelerate->setObjectName("decelerate"); gridLayout->addWidget(decelerate, 2, 1, 1, 1); accelerate = new QPushButton(Controller); - accelerate->setObjectName(QString::fromUtf8("accelerate")); + accelerate->setObjectName("accelerate"); gridLayout->addWidget(accelerate, 0, 1, 1, 1); right = new QPushButton(Controller); - right->setObjectName(QString::fromUtf8("right")); + right->setObjectName("right"); gridLayout->addWidget(right, 1, 2, 1, 1); left = new QPushButton(Controller); - left->setObjectName(QString::fromUtf8("left")); + left->setObjectName("left"); gridLayout->addWidget(left, 1, 0, 1, 1); @@ -75,12 +75,12 @@ public: void retranslateUi(QWidget *Controller) { - Controller->setWindowTitle(QApplication::translate("Controller", "Controller", nullptr)); - label->setText(QApplication::translate("Controller", "Controller", nullptr)); - decelerate->setText(QApplication::translate("Controller", "Decelerate", nullptr)); - accelerate->setText(QApplication::translate("Controller", "Accelerate", nullptr)); - right->setText(QApplication::translate("Controller", "Right", nullptr)); - left->setText(QApplication::translate("Controller", "Left", nullptr)); + Controller->setWindowTitle(QCoreApplication::translate("Controller", "Controller", nullptr)); + label->setText(QCoreApplication::translate("Controller", "Controller", nullptr)); + decelerate->setText(QCoreApplication::translate("Controller", "Decelerate", nullptr)); + accelerate->setText(QCoreApplication::translate("Controller", "Accelerate", nullptr)); + right->setText(QCoreApplication::translate("Controller", "Right", nullptr)); + left->setText(QCoreApplication::translate("Controller", "Left", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/cookies.ui.h b/tests/auto/tools/uic/baseline/cookies.ui.h index 144c306874..b43b4d5425 100644 --- a/tests/auto/tools/uic/baseline/cookies.ui.h +++ b/tests/auto/tools/uic/baseline/cookies.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'cookies.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -10,6 +10,7 @@ #define COOKIES_H #include <QtCore/QVariant> +#include <QtWidgets/QAbstractButton> #include <QtWidgets/QApplication> #include <QtWidgets/QDialog> #include <QtWidgets/QDialogButtonBox> @@ -39,42 +40,42 @@ public: void setupUi(QDialog *CookiesDialog) { if (CookiesDialog->objectName().isEmpty()) - CookiesDialog->setObjectName(QString::fromUtf8("CookiesDialog")); + CookiesDialog->setObjectName("CookiesDialog"); CookiesDialog->resize(550, 370); gridLayout = new QGridLayout(CookiesDialog); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); - spacerItem = new QSpacerItem(252, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + gridLayout->setObjectName("gridLayout"); + spacerItem = new QSpacerItem(252, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); gridLayout->addItem(spacerItem, 0, 0, 1, 1); search = new SearchLineEdit(CookiesDialog); - search->setObjectName(QString::fromUtf8("search")); + search->setObjectName("search"); gridLayout->addWidget(search, 0, 1, 1, 1); cookiesTable = new EditTableView(CookiesDialog); - cookiesTable->setObjectName(QString::fromUtf8("cookiesTable")); + cookiesTable->setObjectName("cookiesTable"); gridLayout->addWidget(cookiesTable, 1, 0, 1, 2); hboxLayout = new QHBoxLayout(); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName("hboxLayout"); removeButton = new QPushButton(CookiesDialog); - removeButton->setObjectName(QString::fromUtf8("removeButton")); + removeButton->setObjectName("removeButton"); hboxLayout->addWidget(removeButton); removeAllButton = new QPushButton(CookiesDialog); - removeAllButton->setObjectName(QString::fromUtf8("removeAllButton")); + removeAllButton->setObjectName("removeAllButton"); hboxLayout->addWidget(removeAllButton); - spacerItem1 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacerItem1 = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); hboxLayout->addItem(spacerItem1); buttonBox = new QDialogButtonBox(CookiesDialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName("buttonBox"); buttonBox->setStandardButtons(QDialogButtonBox::Ok); hboxLayout->addWidget(buttonBox); @@ -84,16 +85,16 @@ public: retranslateUi(CookiesDialog); - QObject::connect(buttonBox, SIGNAL(accepted()), CookiesDialog, SLOT(accept())); + QObject::connect(buttonBox, &QDialogButtonBox::accepted, CookiesDialog, qOverload<>(&QDialog::accept)); QMetaObject::connectSlotsByName(CookiesDialog); } // setupUi void retranslateUi(QDialog *CookiesDialog) { - CookiesDialog->setWindowTitle(QApplication::translate("CookiesDialog", "Cookies", nullptr)); - removeButton->setText(QApplication::translate("CookiesDialog", "&Remove", nullptr)); - removeAllButton->setText(QApplication::translate("CookiesDialog", "Remove &All Cookies", nullptr)); + CookiesDialog->setWindowTitle(QCoreApplication::translate("CookiesDialog", "Cookies", nullptr)); + removeButton->setText(QCoreApplication::translate("CookiesDialog", "&Remove", nullptr)); + removeAllButton->setText(QCoreApplication::translate("CookiesDialog", "Remove &All Cookies", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/cookiesexceptions.ui.h b/tests/auto/tools/uic/baseline/cookiesexceptions.ui.h index a3bf7a449e..913bd7075d 100644 --- a/tests/auto/tools/uic/baseline/cookiesexceptions.ui.h +++ b/tests/auto/tools/uic/baseline/cookiesexceptions.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'cookiesexceptions.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -10,6 +10,7 @@ #define COOKIESEXCEPTIONS_H #include <QtCore/QVariant> +#include <QtWidgets/QAbstractButton> #include <QtWidgets/QApplication> #include <QtWidgets/QDialog> #include <QtWidgets/QDialogButtonBox> @@ -54,23 +55,23 @@ public: void setupUi(QDialog *CookiesExceptionsDialog) { if (CookiesExceptionsDialog->objectName().isEmpty()) - CookiesExceptionsDialog->setObjectName(QString::fromUtf8("CookiesExceptionsDialog")); + CookiesExceptionsDialog->setObjectName("CookiesExceptionsDialog"); CookiesExceptionsDialog->resize(466, 446); vboxLayout = new QVBoxLayout(CookiesExceptionsDialog); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); newExceptionGroupBox = new QGroupBox(CookiesExceptionsDialog); - newExceptionGroupBox->setObjectName(QString::fromUtf8("newExceptionGroupBox")); + newExceptionGroupBox->setObjectName("newExceptionGroupBox"); gridLayout = new QGridLayout(newExceptionGroupBox); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); hboxLayout = new QHBoxLayout(); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName("hboxLayout"); label = new QLabel(newExceptionGroupBox); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName("label"); hboxLayout->addWidget(label); domainLineEdit = new QLineEdit(newExceptionGroupBox); - domainLineEdit->setObjectName(QString::fromUtf8("domainLineEdit")); + domainLineEdit->setObjectName("domainLineEdit"); hboxLayout->addWidget(domainLineEdit); @@ -78,25 +79,25 @@ public: gridLayout->addLayout(hboxLayout, 0, 0, 1, 1); hboxLayout1 = new QHBoxLayout(); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); - spacerItem = new QSpacerItem(81, 25, QSizePolicy::Expanding, QSizePolicy::Minimum); + hboxLayout1->setObjectName("hboxLayout1"); + spacerItem = new QSpacerItem(81, 25, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); hboxLayout1->addItem(spacerItem); blockButton = new QPushButton(newExceptionGroupBox); - blockButton->setObjectName(QString::fromUtf8("blockButton")); + blockButton->setObjectName("blockButton"); blockButton->setEnabled(false); hboxLayout1->addWidget(blockButton); allowForSessionButton = new QPushButton(newExceptionGroupBox); - allowForSessionButton->setObjectName(QString::fromUtf8("allowForSessionButton")); + allowForSessionButton->setObjectName("allowForSessionButton"); allowForSessionButton->setEnabled(false); hboxLayout1->addWidget(allowForSessionButton); allowButton = new QPushButton(newExceptionGroupBox); - allowButton->setObjectName(QString::fromUtf8("allowButton")); + allowButton->setObjectName("allowButton"); allowButton->setEnabled(false); hboxLayout1->addWidget(allowButton); @@ -108,34 +109,34 @@ public: vboxLayout->addWidget(newExceptionGroupBox); ExceptionsGroupBox = new QGroupBox(CookiesExceptionsDialog); - ExceptionsGroupBox->setObjectName(QString::fromUtf8("ExceptionsGroupBox")); + ExceptionsGroupBox->setObjectName("ExceptionsGroupBox"); gridLayout1 = new QGridLayout(ExceptionsGroupBox); - gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); - spacerItem1 = new QSpacerItem(252, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + gridLayout1->setObjectName("gridLayout1"); + spacerItem1 = new QSpacerItem(252, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); gridLayout1->addItem(spacerItem1, 0, 0, 1, 3); search = new SearchLineEdit(ExceptionsGroupBox); - search->setObjectName(QString::fromUtf8("search")); + search->setObjectName("search"); gridLayout1->addWidget(search, 0, 3, 1, 1); exceptionTable = new EditTableView(ExceptionsGroupBox); - exceptionTable->setObjectName(QString::fromUtf8("exceptionTable")); + exceptionTable->setObjectName("exceptionTable"); gridLayout1->addWidget(exceptionTable, 1, 0, 1, 4); removeButton = new QPushButton(ExceptionsGroupBox); - removeButton->setObjectName(QString::fromUtf8("removeButton")); + removeButton->setObjectName("removeButton"); gridLayout1->addWidget(removeButton, 2, 0, 1, 1); removeAllButton = new QPushButton(ExceptionsGroupBox); - removeAllButton->setObjectName(QString::fromUtf8("removeAllButton")); + removeAllButton->setObjectName("removeAllButton"); gridLayout1->addWidget(removeAllButton, 2, 1, 1, 1); - spacerItem2 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacerItem2 = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); gridLayout1->addItem(spacerItem2, 2, 2, 1, 2); @@ -143,7 +144,7 @@ public: vboxLayout->addWidget(ExceptionsGroupBox); buttonBox = new QDialogButtonBox(CookiesExceptionsDialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName("buttonBox"); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Ok); @@ -151,22 +152,22 @@ public: retranslateUi(CookiesExceptionsDialog); - QObject::connect(buttonBox, SIGNAL(accepted()), CookiesExceptionsDialog, SLOT(accept())); + QObject::connect(buttonBox, &QDialogButtonBox::accepted, CookiesExceptionsDialog, qOverload<>(&QDialog::accept)); QMetaObject::connectSlotsByName(CookiesExceptionsDialog); } // setupUi void retranslateUi(QDialog *CookiesExceptionsDialog) { - CookiesExceptionsDialog->setWindowTitle(QApplication::translate("CookiesExceptionsDialog", "Cookie Exceptions", nullptr)); - newExceptionGroupBox->setTitle(QApplication::translate("CookiesExceptionsDialog", "New Exception", nullptr)); - label->setText(QApplication::translate("CookiesExceptionsDialog", "Domain:", nullptr)); - blockButton->setText(QApplication::translate("CookiesExceptionsDialog", "Block", nullptr)); - allowForSessionButton->setText(QApplication::translate("CookiesExceptionsDialog", "Allow For Session", nullptr)); - allowButton->setText(QApplication::translate("CookiesExceptionsDialog", "Allow", nullptr)); - ExceptionsGroupBox->setTitle(QApplication::translate("CookiesExceptionsDialog", "Exceptions", nullptr)); - removeButton->setText(QApplication::translate("CookiesExceptionsDialog", "&Remove", nullptr)); - removeAllButton->setText(QApplication::translate("CookiesExceptionsDialog", "Remove &All", nullptr)); + CookiesExceptionsDialog->setWindowTitle(QCoreApplication::translate("CookiesExceptionsDialog", "Cookie Exceptions", nullptr)); + newExceptionGroupBox->setTitle(QCoreApplication::translate("CookiesExceptionsDialog", "New Exception", nullptr)); + label->setText(QCoreApplication::translate("CookiesExceptionsDialog", "Domain:", nullptr)); + blockButton->setText(QCoreApplication::translate("CookiesExceptionsDialog", "Block", nullptr)); + allowForSessionButton->setText(QCoreApplication::translate("CookiesExceptionsDialog", "Allow For Session", nullptr)); + allowButton->setText(QCoreApplication::translate("CookiesExceptionsDialog", "Allow", nullptr)); + ExceptionsGroupBox->setTitle(QCoreApplication::translate("CookiesExceptionsDialog", "Exceptions", nullptr)); + removeButton->setText(QCoreApplication::translate("CookiesExceptionsDialog", "&Remove", nullptr)); + removeAllButton->setText(QCoreApplication::translate("CookiesExceptionsDialog", "Remove &All", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/default.ui.h b/tests/auto/tools/uic/baseline/default.ui.h index fafff9d728..821273039c 100644 --- a/tests/auto/tools/uic/baseline/default.ui.h +++ b/tests/auto/tools/uic/baseline/default.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'default.ui' ** -** Created by: Qt User Interface Compiler version 5.10.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -10,7 +10,8 @@ #define DEFAULT_H #include <QtCore/QVariant> -#include <QtWidgets/QAction> +#include <QtGui/QAction> +#include <QtWidgets/QAbstractButton> #include <QtWidgets/QApplication> #include <QtWidgets/QCheckBox> #include <QtWidgets/QComboBox> @@ -63,18 +64,18 @@ public: void setupUi(QMainWindow *MainWindow) { if (MainWindow->objectName().isEmpty()) - MainWindow->setObjectName(QString::fromUtf8("MainWindow")); + MainWindow->setObjectName("MainWindow"); MainWindow->resize(388, 413); exitAction = new QAction(MainWindow); - exitAction->setObjectName(QString::fromUtf8("exitAction")); + exitAction->setObjectName("exitAction"); aboutQtAction = new QAction(MainWindow); - aboutQtAction->setObjectName(QString::fromUtf8("aboutQtAction")); + aboutQtAction->setObjectName("aboutQtAction"); editStyleAction = new QAction(MainWindow); - editStyleAction->setObjectName(QString::fromUtf8("editStyleAction")); + editStyleAction->setObjectName("editStyleAction"); aboutAction = new QAction(MainWindow); - aboutAction->setObjectName(QString::fromUtf8("aboutAction")); + aboutAction->setObjectName("aboutAction"); centralwidget = new QWidget(MainWindow); - centralwidget->setObjectName(QString::fromUtf8("centralwidget")); + centralwidget->setObjectName("centralwidget"); gridLayout = new QGridLayout(centralwidget); #ifndef Q_OS_MAC gridLayout->setSpacing(6); @@ -82,9 +83,9 @@ public: #ifndef Q_OS_MAC gridLayout->setContentsMargins(9, 9, 9, 9); #endif - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); nameLabel = new QLabel(centralwidget); - nameLabel->setObjectName(QString::fromUtf8("nameLabel")); + nameLabel->setObjectName("nameLabel"); gridLayout->addWidget(nameLabel, 0, 0, 1, 1); @@ -93,72 +94,72 @@ public: nameCombo->addItem(QString()); nameCombo->addItem(QString()); nameCombo->addItem(QString()); - nameCombo->setObjectName(QString::fromUtf8("nameCombo")); + nameCombo->setObjectName("nameCombo"); nameCombo->setEditable(true); gridLayout->addWidget(nameCombo, 0, 1, 1, 3); - spacerItem = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacerItem = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); gridLayout->addItem(spacerItem, 1, 3, 1, 1); femaleRadioButton = new QRadioButton(centralwidget); - femaleRadioButton->setObjectName(QString::fromUtf8("femaleRadioButton")); + femaleRadioButton->setObjectName("femaleRadioButton"); gridLayout->addWidget(femaleRadioButton, 1, 2, 1, 1); agreeCheckBox = new QCheckBox(centralwidget); - agreeCheckBox->setObjectName(QString::fromUtf8("agreeCheckBox")); + agreeCheckBox->setObjectName("agreeCheckBox"); gridLayout->addWidget(agreeCheckBox, 6, 0, 1, 4); maleRadioButton = new QRadioButton(centralwidget); - maleRadioButton->setObjectName(QString::fromUtf8("maleRadioButton")); + maleRadioButton->setObjectName("maleRadioButton"); gridLayout->addWidget(maleRadioButton, 1, 1, 1, 1); genderLabel = new QLabel(centralwidget); - genderLabel->setObjectName(QString::fromUtf8("genderLabel")); + genderLabel->setObjectName("genderLabel"); gridLayout->addWidget(genderLabel, 1, 0, 1, 1); ageSpinBox = new QSpinBox(centralwidget); - ageSpinBox->setObjectName(QString::fromUtf8("ageSpinBox")); + ageSpinBox->setObjectName("ageSpinBox"); ageSpinBox->setMinimum(12); ageSpinBox->setValue(22); gridLayout->addWidget(ageSpinBox, 2, 1, 1, 3); buttonBox = new QDialogButtonBox(centralwidget); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName("buttonBox"); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok); gridLayout->addWidget(buttonBox, 7, 2, 1, 2); ageLabel = new QLabel(centralwidget); - ageLabel->setObjectName(QString::fromUtf8("ageLabel")); + ageLabel->setObjectName("ageLabel"); gridLayout->addWidget(ageLabel, 2, 0, 1, 1); passwordLabel = new QLabel(centralwidget); - passwordLabel->setObjectName(QString::fromUtf8("passwordLabel")); + passwordLabel->setObjectName("passwordLabel"); gridLayout->addWidget(passwordLabel, 3, 0, 1, 1); passwordEdit = new QLineEdit(centralwidget); - passwordEdit->setObjectName(QString::fromUtf8("passwordEdit")); + passwordEdit->setObjectName("passwordEdit"); passwordEdit->setEchoMode(QLineEdit::Password); gridLayout->addWidget(passwordEdit, 3, 1, 1, 3); label = new QLabel(centralwidget); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName("label"); gridLayout->addWidget(label, 5, 0, 1, 1); countryLabel = new QLabel(centralwidget); - countryLabel->setObjectName(QString::fromUtf8("countryLabel")); + countryLabel->setObjectName("countryLabel"); gridLayout->addWidget(countryLabel, 4, 0, 1, 1); @@ -166,7 +167,7 @@ public: new QListWidgetItem(professionList); new QListWidgetItem(professionList); new QListWidgetItem(professionList); - professionList->setObjectName(QString::fromUtf8("professionList")); + professionList->setObjectName("professionList"); gridLayout->addWidget(professionList, 5, 1, 1, 3); @@ -176,29 +177,29 @@ public: countryCombo->addItem(QString()); countryCombo->addItem(QString()); countryCombo->addItem(QString()); - countryCombo->setObjectName(QString::fromUtf8("countryCombo")); + countryCombo->setObjectName("countryCombo"); gridLayout->addWidget(countryCombo, 4, 1, 1, 3); MainWindow->setCentralWidget(centralwidget); menubar = new QMenuBar(MainWindow); - menubar->setObjectName(QString::fromUtf8("menubar")); + menubar->setObjectName("menubar"); menubar->setGeometry(QRect(0, 0, 388, 21)); menu_File = new QMenu(menubar); - menu_File->setObjectName(QString::fromUtf8("menu_File")); + menu_File->setObjectName("menu_File"); menu_Help = new QMenu(menubar); - menu_Help->setObjectName(QString::fromUtf8("menu_Help")); + menu_Help->setObjectName("menu_Help"); MainWindow->setMenuBar(menubar); statusbar = new QStatusBar(MainWindow); - statusbar->setObjectName(QString::fromUtf8("statusbar")); + statusbar->setObjectName("statusbar"); MainWindow->setStatusBar(statusbar); -#ifndef QT_NO_SHORTCUT +#if QT_CONFIG(shortcut) nameLabel->setBuddy(nameCombo); ageLabel->setBuddy(ageSpinBox); passwordLabel->setBuddy(passwordEdit); label->setBuddy(professionList); countryLabel->setBuddy(professionList); -#endif // QT_NO_SHORTCUT +#endif // QT_CONFIG(shortcut) QWidget::setTabOrder(maleRadioButton, femaleRadioButton); QWidget::setTabOrder(femaleRadioButton, ageSpinBox); QWidget::setTabOrder(ageSpinBox, passwordEdit); @@ -226,84 +227,84 @@ public: void retranslateUi(QMainWindow *MainWindow) { - MainWindow->setWindowTitle(QApplication::translate("MainWindow", "MainWindow", nullptr)); - exitAction->setText(QApplication::translate("MainWindow", "&Exit", nullptr)); - aboutQtAction->setText(QApplication::translate("MainWindow", "About Qt", nullptr)); - editStyleAction->setText(QApplication::translate("MainWindow", "Edit &Style", nullptr)); - aboutAction->setText(QApplication::translate("MainWindow", "About", nullptr)); - nameLabel->setText(QApplication::translate("MainWindow", "&Name:", nullptr)); - nameCombo->setItemText(0, QApplication::translate("MainWindow", "Girish", nullptr)); - nameCombo->setItemText(1, QApplication::translate("MainWindow", "Jasmin", nullptr)); - nameCombo->setItemText(2, QApplication::translate("MainWindow", "Simon", nullptr)); - nameCombo->setItemText(3, QApplication::translate("MainWindow", "Zack", nullptr)); - -#ifndef QT_NO_TOOLTIP - nameCombo->setToolTip(QApplication::translate("MainWindow", "Specify your name", nullptr)); -#endif // QT_NO_TOOLTIP -#ifndef QT_NO_TOOLTIP - femaleRadioButton->setToolTip(QApplication::translate("MainWindow", "Check this if you are female", nullptr)); -#endif // QT_NO_TOOLTIP - femaleRadioButton->setText(QApplication::translate("MainWindow", "&Female", nullptr)); -#ifndef QT_NO_TOOLTIP - agreeCheckBox->setToolTip(QApplication::translate("MainWindow", "Please read the license before checking this", nullptr)); -#endif // QT_NO_TOOLTIP - agreeCheckBox->setText(QApplication::translate("MainWindow", "I &accept the terms and conditions", nullptr)); -#ifndef QT_NO_TOOLTIP - maleRadioButton->setToolTip(QApplication::translate("MainWindow", "Check this if you are male", nullptr)); -#endif // QT_NO_TOOLTIP - maleRadioButton->setText(QApplication::translate("MainWindow", "&Male", nullptr)); - genderLabel->setText(QApplication::translate("MainWindow", "Gender:", nullptr)); -#ifndef QT_NO_TOOLTIP - ageSpinBox->setToolTip(QApplication::translate("MainWindow", "Specify your age", nullptr)); -#endif // QT_NO_TOOLTIP -#ifndef QT_NO_STATUSTIP - ageSpinBox->setStatusTip(QApplication::translate("MainWindow", "Specify your age here", nullptr)); -#endif // QT_NO_STATUSTIP - ageLabel->setText(QApplication::translate("MainWindow", "&Age:", nullptr)); - passwordLabel->setText(QApplication::translate("MainWindow", "&Password:", nullptr)); -#ifndef QT_NO_TOOLTIP - passwordEdit->setToolTip(QApplication::translate("MainWindow", "Specify your password", nullptr)); -#endif // QT_NO_TOOLTIP -#ifndef QT_NO_STATUSTIP - passwordEdit->setStatusTip(QApplication::translate("MainWindow", "Specify your password here", nullptr)); -#endif // QT_NO_STATUSTIP - passwordEdit->setText(QApplication::translate("MainWindow", "Password", nullptr)); - label->setText(QApplication::translate("MainWindow", "Profession", nullptr)); - countryLabel->setText(QApplication::translate("MainWindow", "&Country", nullptr)); + MainWindow->setWindowTitle(QCoreApplication::translate("MainWindow", "MainWindow", nullptr)); + exitAction->setText(QCoreApplication::translate("MainWindow", "&Exit", nullptr)); + aboutQtAction->setText(QCoreApplication::translate("MainWindow", "About Qt", nullptr)); + editStyleAction->setText(QCoreApplication::translate("MainWindow", "Edit &Style", nullptr)); + aboutAction->setText(QCoreApplication::translate("MainWindow", "About", nullptr)); + nameLabel->setText(QCoreApplication::translate("MainWindow", "&Name:", nullptr)); + nameCombo->setItemText(0, QCoreApplication::translate("MainWindow", "Girish", nullptr)); + nameCombo->setItemText(1, QCoreApplication::translate("MainWindow", "Jasmin", nullptr)); + nameCombo->setItemText(2, QCoreApplication::translate("MainWindow", "Simon", nullptr)); + nameCombo->setItemText(3, QCoreApplication::translate("MainWindow", "Zack", nullptr)); + +#if QT_CONFIG(tooltip) + nameCombo->setToolTip(QCoreApplication::translate("MainWindow", "Specify your name", nullptr)); +#endif // QT_CONFIG(tooltip) +#if QT_CONFIG(tooltip) + femaleRadioButton->setToolTip(QCoreApplication::translate("MainWindow", "Check this if you are female", nullptr)); +#endif // QT_CONFIG(tooltip) + femaleRadioButton->setText(QCoreApplication::translate("MainWindow", "&Female", nullptr)); +#if QT_CONFIG(tooltip) + agreeCheckBox->setToolTip(QCoreApplication::translate("MainWindow", "Please read the license before checking this", nullptr)); +#endif // QT_CONFIG(tooltip) + agreeCheckBox->setText(QCoreApplication::translate("MainWindow", "I &accept the terms and conditions", nullptr)); +#if QT_CONFIG(tooltip) + maleRadioButton->setToolTip(QCoreApplication::translate("MainWindow", "Check this if you are male", nullptr)); +#endif // QT_CONFIG(tooltip) + maleRadioButton->setText(QCoreApplication::translate("MainWindow", "&Male", nullptr)); + genderLabel->setText(QCoreApplication::translate("MainWindow", "Gender:", nullptr)); +#if QT_CONFIG(tooltip) + ageSpinBox->setToolTip(QCoreApplication::translate("MainWindow", "Specify your age", nullptr)); +#endif // QT_CONFIG(tooltip) +#if QT_CONFIG(statustip) + ageSpinBox->setStatusTip(QCoreApplication::translate("MainWindow", "Specify your age here", nullptr)); +#endif // QT_CONFIG(statustip) + ageLabel->setText(QCoreApplication::translate("MainWindow", "&Age:", nullptr)); + passwordLabel->setText(QCoreApplication::translate("MainWindow", "&Password:", nullptr)); +#if QT_CONFIG(tooltip) + passwordEdit->setToolTip(QCoreApplication::translate("MainWindow", "Specify your password", nullptr)); +#endif // QT_CONFIG(tooltip) +#if QT_CONFIG(statustip) + passwordEdit->setStatusTip(QCoreApplication::translate("MainWindow", "Specify your password here", nullptr)); +#endif // QT_CONFIG(statustip) + passwordEdit->setText(QCoreApplication::translate("MainWindow", "Password", nullptr)); + label->setText(QCoreApplication::translate("MainWindow", "Profession", nullptr)); + countryLabel->setText(QCoreApplication::translate("MainWindow", "&Country", nullptr)); const bool __sortingEnabled = professionList->isSortingEnabled(); professionList->setSortingEnabled(false); QListWidgetItem *___qlistwidgetitem = professionList->item(0); - ___qlistwidgetitem->setText(QApplication::translate("MainWindow", "Developer", nullptr)); + ___qlistwidgetitem->setText(QCoreApplication::translate("MainWindow", "Developer", nullptr)); QListWidgetItem *___qlistwidgetitem1 = professionList->item(1); - ___qlistwidgetitem1->setText(QApplication::translate("MainWindow", "Student", nullptr)); + ___qlistwidgetitem1->setText(QCoreApplication::translate("MainWindow", "Student", nullptr)); QListWidgetItem *___qlistwidgetitem2 = professionList->item(2); - ___qlistwidgetitem2->setText(QApplication::translate("MainWindow", "Fisherman", nullptr)); + ___qlistwidgetitem2->setText(QCoreApplication::translate("MainWindow", "Fisherman", nullptr)); professionList->setSortingEnabled(__sortingEnabled); -#ifndef QT_NO_TOOLTIP - professionList->setToolTip(QApplication::translate("MainWindow", "Select your profession", nullptr)); -#endif // QT_NO_TOOLTIP -#ifndef QT_NO_STATUSTIP - professionList->setStatusTip(QApplication::translate("MainWindow", "Select your profession", nullptr)); -#endif // QT_NO_STATUSTIP -#ifndef QT_NO_WHATSTHIS - professionList->setWhatsThis(QApplication::translate("MainWindow", "Select your profession", nullptr)); -#endif // QT_NO_WHATSTHIS - countryCombo->setItemText(0, QApplication::translate("MainWindow", "Germany", nullptr)); - countryCombo->setItemText(1, QApplication::translate("MainWindow", "India", nullptr)); - countryCombo->setItemText(2, QApplication::translate("MainWindow", "Norway", nullptr)); - countryCombo->setItemText(3, QApplication::translate("MainWindow", "United States Of America", nullptr)); - countryCombo->setItemText(4, QApplication::translate("MainWindow", "United Kingdom", nullptr)); - -#ifndef QT_NO_TOOLTIP - countryCombo->setToolTip(QApplication::translate("MainWindow", "Specify your country", nullptr)); -#endif // QT_NO_TOOLTIP -#ifndef QT_NO_STATUSTIP - countryCombo->setStatusTip(QApplication::translate("MainWindow", "Specify your country here", nullptr)); -#endif // QT_NO_STATUSTIP - menu_File->setTitle(QApplication::translate("MainWindow", "&File", nullptr)); - menu_Help->setTitle(QApplication::translate("MainWindow", "&Help", nullptr)); +#if QT_CONFIG(tooltip) + professionList->setToolTip(QCoreApplication::translate("MainWindow", "Select your profession", nullptr)); +#endif // QT_CONFIG(tooltip) +#if QT_CONFIG(statustip) + professionList->setStatusTip(QCoreApplication::translate("MainWindow", "Select your profession", nullptr)); +#endif // QT_CONFIG(statustip) +#if QT_CONFIG(whatsthis) + professionList->setWhatsThis(QCoreApplication::translate("MainWindow", "Select your profession", nullptr)); +#endif // QT_CONFIG(whatsthis) + countryCombo->setItemText(0, QCoreApplication::translate("MainWindow", "Germany", nullptr)); + countryCombo->setItemText(1, QCoreApplication::translate("MainWindow", "India", nullptr)); + countryCombo->setItemText(2, QCoreApplication::translate("MainWindow", "Norway", nullptr)); + countryCombo->setItemText(3, QCoreApplication::translate("MainWindow", "United States Of America", nullptr)); + countryCombo->setItemText(4, QCoreApplication::translate("MainWindow", "United Kingdom", nullptr)); + +#if QT_CONFIG(tooltip) + countryCombo->setToolTip(QCoreApplication::translate("MainWindow", "Specify your country", nullptr)); +#endif // QT_CONFIG(tooltip) +#if QT_CONFIG(statustip) + countryCombo->setStatusTip(QCoreApplication::translate("MainWindow", "Specify your country here", nullptr)); +#endif // QT_CONFIG(statustip) + menu_File->setTitle(QCoreApplication::translate("MainWindow", "&File", nullptr)); + menu_Help->setTitle(QCoreApplication::translate("MainWindow", "&Help", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/dialog.ui b/tests/auto/tools/uic/baseline/dialog.ui index e99d6fb3c4..936cc2eee8 100644 --- a/tests/auto/tools/uic/baseline/dialog.ui +++ b/tests/auto/tools/uic/baseline/dialog.ui @@ -1,4 +1,4 @@ -<ui version="4.0" > +<ui version="4.0" connectslotsbyname="false"> <class>Dialog</class> <widget class="QDialog" name="Dialog" > <property name="geometry" > diff --git a/tests/auto/tools/uic/baseline/dialog.ui.h b/tests/auto/tools/uic/baseline/dialog.ui.h index 2a159312b9..1e886e40d9 100644 --- a/tests/auto/tools/uic/baseline/dialog.ui.h +++ b/tests/auto/tools/uic/baseline/dialog.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'dialog.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -29,39 +29,37 @@ public: void setupUi(QDialog *Dialog) { if (Dialog->objectName().isEmpty()) - Dialog->setObjectName(QString::fromUtf8("Dialog")); + Dialog->setObjectName("Dialog"); Dialog->resize(451, 322); gridLayout = new QGridLayout(Dialog); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); loadFromFileButton = new QPushButton(Dialog); - loadFromFileButton->setObjectName(QString::fromUtf8("loadFromFileButton")); + loadFromFileButton->setObjectName("loadFromFileButton"); gridLayout->addWidget(loadFromFileButton, 0, 0, 1, 1); label = new QLabel(Dialog); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName("label"); label->setAlignment(Qt::AlignCenter); label->setWordWrap(true); gridLayout->addWidget(label, 1, 0, 1, 1); loadFromSharedMemoryButton = new QPushButton(Dialog); - loadFromSharedMemoryButton->setObjectName(QString::fromUtf8("loadFromSharedMemoryButton")); + loadFromSharedMemoryButton->setObjectName("loadFromSharedMemoryButton"); gridLayout->addWidget(loadFromSharedMemoryButton, 2, 0, 1, 1); retranslateUi(Dialog); - - QMetaObject::connectSlotsByName(Dialog); } // setupUi void retranslateUi(QDialog *Dialog) { - Dialog->setWindowTitle(QApplication::translate("Dialog", "Dialog", nullptr)); - loadFromFileButton->setText(QApplication::translate("Dialog", "Load Image From File...", nullptr)); - label->setText(QApplication::translate("Dialog", "Launch two of these dialogs. In the first, press the top button and load an image from a file. In the second, press the bottom button and display the loaded image from shared memory.", nullptr)); - loadFromSharedMemoryButton->setText(QApplication::translate("Dialog", "Display Image From Shared Memory", nullptr)); + Dialog->setWindowTitle(QCoreApplication::translate("Dialog", "Dialog", nullptr)); + loadFromFileButton->setText(QCoreApplication::translate("Dialog", "Load Image From File...", nullptr)); + label->setText(QCoreApplication::translate("Dialog", "Launch two of these dialogs. In the first, press the top button and load an image from a file. In the second, press the bottom button and display the loaded image from shared memory.", nullptr)); + loadFromSharedMemoryButton->setText(QCoreApplication::translate("Dialog", "Display Image From Shared Memory", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/downloaditem.ui.h b/tests/auto/tools/uic/baseline/downloaditem.ui.h index f0e8e88307..6698813fb6 100644 --- a/tests/auto/tools/uic/baseline/downloaditem.ui.h +++ b/tests/auto/tools/uic/baseline/downloaditem.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'downloaditem.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -41,14 +41,14 @@ public: void setupUi(QWidget *DownloadItem) { if (DownloadItem->objectName().isEmpty()) - DownloadItem->setObjectName(QString::fromUtf8("DownloadItem")); + DownloadItem->setObjectName("DownloadItem"); DownloadItem->resize(423, 110); horizontalLayout = new QHBoxLayout(DownloadItem); horizontalLayout->setContentsMargins(0, 0, 0, 0); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); + horizontalLayout->setObjectName("horizontalLayout"); fileIcon = new QLabel(DownloadItem); - fileIcon->setObjectName(QString::fromUtf8("fileIcon")); - QSizePolicy sizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); + fileIcon->setObjectName("fileIcon"); + QSizePolicy sizePolicy(QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Minimum); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); sizePolicy.setHeightForWidth(fileIcon->sizePolicy().hasHeightForWidth()); @@ -57,10 +57,10 @@ public: horizontalLayout->addWidget(fileIcon); verticalLayout_2 = new QVBoxLayout(); - verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2")); + verticalLayout_2->setObjectName("verticalLayout_2"); fileNameLabel = new SqueezeLabel(DownloadItem); - fileNameLabel->setObjectName(QString::fromUtf8("fileNameLabel")); - QSizePolicy sizePolicy1(QSizePolicy::Expanding, QSizePolicy::Preferred); + fileNameLabel->setObjectName("fileNameLabel"); + QSizePolicy sizePolicy1(QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Preferred); sizePolicy1.setHorizontalStretch(0); sizePolicy1.setVerticalStretch(0); sizePolicy1.setHeightForWidth(fileNameLabel->sizePolicy().hasHeightForWidth()); @@ -69,14 +69,14 @@ public: verticalLayout_2->addWidget(fileNameLabel); progressBar = new QProgressBar(DownloadItem); - progressBar->setObjectName(QString::fromUtf8("progressBar")); + progressBar->setObjectName("progressBar"); progressBar->setValue(0); verticalLayout_2->addWidget(progressBar); downloadInfoLabel = new SqueezeLabel(DownloadItem); - downloadInfoLabel->setObjectName(QString::fromUtf8("downloadInfoLabel")); - QSizePolicy sizePolicy2(QSizePolicy::Minimum, QSizePolicy::Preferred); + downloadInfoLabel->setObjectName("downloadInfoLabel"); + QSizePolicy sizePolicy2(QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Preferred); sizePolicy2.setHorizontalStretch(0); sizePolicy2.setVerticalStretch(0); sizePolicy2.setHeightForWidth(downloadInfoLabel->sizePolicy().hasHeightForWidth()); @@ -88,28 +88,28 @@ public: horizontalLayout->addLayout(verticalLayout_2); verticalLayout = new QVBoxLayout(); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); - verticalSpacer = new QSpacerItem(17, 1, QSizePolicy::Minimum, QSizePolicy::Expanding); + verticalLayout->setObjectName("verticalLayout"); + verticalSpacer = new QSpacerItem(17, 1, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Expanding); verticalLayout->addItem(verticalSpacer); tryAgainButton = new QPushButton(DownloadItem); - tryAgainButton->setObjectName(QString::fromUtf8("tryAgainButton")); + tryAgainButton->setObjectName("tryAgainButton"); tryAgainButton->setEnabled(false); verticalLayout->addWidget(tryAgainButton); stopButton = new QPushButton(DownloadItem); - stopButton->setObjectName(QString::fromUtf8("stopButton")); + stopButton->setObjectName("stopButton"); verticalLayout->addWidget(stopButton); openButton = new QPushButton(DownloadItem); - openButton->setObjectName(QString::fromUtf8("openButton")); + openButton->setObjectName("openButton"); verticalLayout->addWidget(openButton); - verticalSpacer_2 = new QSpacerItem(17, 5, QSizePolicy::Minimum, QSizePolicy::Expanding); + verticalSpacer_2 = new QSpacerItem(17, 5, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Expanding); verticalLayout->addItem(verticalSpacer_2); @@ -124,13 +124,13 @@ public: void retranslateUi(QWidget *DownloadItem) { - DownloadItem->setWindowTitle(QApplication::translate("DownloadItem", "Form", nullptr)); - fileIcon->setText(QApplication::translate("DownloadItem", "Ico", nullptr)); - fileNameLabel->setProperty("text", QVariant(QApplication::translate("DownloadItem", "Filename", nullptr))); + DownloadItem->setWindowTitle(QCoreApplication::translate("DownloadItem", "Form", nullptr)); + fileIcon->setText(QCoreApplication::translate("DownloadItem", "Ico", nullptr)); + fileNameLabel->setProperty("text", QVariant(QCoreApplication::translate("DownloadItem", "Filename", nullptr))); downloadInfoLabel->setProperty("text", QVariant(QString())); - tryAgainButton->setText(QApplication::translate("DownloadItem", "Try Again", nullptr)); - stopButton->setText(QApplication::translate("DownloadItem", "Stop", nullptr)); - openButton->setText(QApplication::translate("DownloadItem", "Open", nullptr)); + tryAgainButton->setText(QCoreApplication::translate("DownloadItem", "Try Again", nullptr)); + stopButton->setText(QCoreApplication::translate("DownloadItem", "Stop", nullptr)); + openButton->setText(QCoreApplication::translate("DownloadItem", "Open", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/downloads.ui.h b/tests/auto/tools/uic/baseline/downloads.ui.h index 1df992d30f..0d6fc5a263 100644 --- a/tests/auto/tools/uic/baseline/downloads.ui.h +++ b/tests/auto/tools/uic/baseline/downloads.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'downloads.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -36,26 +36,26 @@ public: void setupUi(QDialog *DownloadDialog) { if (DownloadDialog->objectName().isEmpty()) - DownloadDialog->setObjectName(QString::fromUtf8("DownloadDialog")); + DownloadDialog->setObjectName("DownloadDialog"); DownloadDialog->resize(332, 252); gridLayout = new QGridLayout(DownloadDialog); gridLayout->setSpacing(0); gridLayout->setContentsMargins(0, 0, 0, 0); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); downloadsView = new EditTableView(DownloadDialog); - downloadsView->setObjectName(QString::fromUtf8("downloadsView")); + downloadsView->setObjectName("downloadsView"); gridLayout->addWidget(downloadsView, 0, 0, 1, 3); horizontalLayout = new QHBoxLayout(); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); + horizontalLayout->setObjectName("horizontalLayout"); cleanupButton = new QPushButton(DownloadDialog); - cleanupButton->setObjectName(QString::fromUtf8("cleanupButton")); + cleanupButton->setObjectName("cleanupButton"); cleanupButton->setEnabled(false); horizontalLayout->addWidget(cleanupButton); - spacerItem = new QSpacerItem(58, 24, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacerItem = new QSpacerItem(58, 24, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); horizontalLayout->addItem(spacerItem); @@ -63,11 +63,11 @@ public: gridLayout->addLayout(horizontalLayout, 1, 0, 1, 1); itemCount = new QLabel(DownloadDialog); - itemCount->setObjectName(QString::fromUtf8("itemCount")); + itemCount->setObjectName("itemCount"); gridLayout->addWidget(itemCount, 1, 1, 1, 1); - horizontalSpacer = new QSpacerItem(148, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + horizontalSpacer = new QSpacerItem(148, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); gridLayout->addItem(horizontalSpacer, 1, 2, 1, 1); @@ -79,9 +79,9 @@ public: void retranslateUi(QDialog *DownloadDialog) { - DownloadDialog->setWindowTitle(QApplication::translate("DownloadDialog", "Downloads", nullptr)); - cleanupButton->setText(QApplication::translate("DownloadDialog", "Clean up", nullptr)); - itemCount->setText(QApplication::translate("DownloadDialog", "0 Items", nullptr)); + DownloadDialog->setWindowTitle(QCoreApplication::translate("DownloadDialog", "Downloads", nullptr)); + cleanupButton->setText(QCoreApplication::translate("DownloadDialog", "Clean up", nullptr)); + itemCount->setText(QCoreApplication::translate("DownloadDialog", "0 Items", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/embeddeddialog.ui.h b/tests/auto/tools/uic/baseline/embeddeddialog.ui.h index 194ff578e8..2188d8ebf1 100644 --- a/tests/auto/tools/uic/baseline/embeddeddialog.ui.h +++ b/tests/auto/tools/uic/baseline/embeddeddialog.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'embeddeddialog.ui' ** -** Created by: Qt User Interface Compiler version 5.10.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -36,59 +36,59 @@ public: void setupUi(QDialog *embeddedDialog) { if (embeddedDialog->objectName().isEmpty()) - embeddedDialog->setObjectName(QString::fromUtf8("embeddedDialog")); + embeddedDialog->setObjectName("embeddedDialog"); embeddedDialog->resize(407, 134); formLayout = new QFormLayout(embeddedDialog); - formLayout->setObjectName(QString::fromUtf8("formLayout")); + formLayout->setObjectName("formLayout"); label = new QLabel(embeddedDialog); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName("label"); formLayout->setWidget(0, QFormLayout::LabelRole, label); layoutDirection = new QComboBox(embeddedDialog); layoutDirection->addItem(QString()); layoutDirection->addItem(QString()); - layoutDirection->setObjectName(QString::fromUtf8("layoutDirection")); + layoutDirection->setObjectName("layoutDirection"); formLayout->setWidget(0, QFormLayout::FieldRole, layoutDirection); label_2 = new QLabel(embeddedDialog); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName("label_2"); formLayout->setWidget(1, QFormLayout::LabelRole, label_2); fontComboBox = new QFontComboBox(embeddedDialog); - fontComboBox->setObjectName(QString::fromUtf8("fontComboBox")); + fontComboBox->setObjectName("fontComboBox"); formLayout->setWidget(1, QFormLayout::FieldRole, fontComboBox); label_3 = new QLabel(embeddedDialog); - label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setObjectName("label_3"); formLayout->setWidget(2, QFormLayout::LabelRole, label_3); style = new QComboBox(embeddedDialog); - style->setObjectName(QString::fromUtf8("style")); + style->setObjectName("style"); formLayout->setWidget(2, QFormLayout::FieldRole, style); label_4 = new QLabel(embeddedDialog); - label_4->setObjectName(QString::fromUtf8("label_4")); + label_4->setObjectName("label_4"); formLayout->setWidget(3, QFormLayout::LabelRole, label_4); spacing = new QSlider(embeddedDialog); - spacing->setObjectName(QString::fromUtf8("spacing")); + spacing->setObjectName("spacing"); spacing->setOrientation(Qt::Horizontal); formLayout->setWidget(3, QFormLayout::FieldRole, spacing); -#ifndef QT_NO_SHORTCUT +#if QT_CONFIG(shortcut) label->setBuddy(layoutDirection); label_2->setBuddy(fontComboBox); label_3->setBuddy(style); label_4->setBuddy(spacing); -#endif // QT_NO_SHORTCUT +#endif // QT_CONFIG(shortcut) retranslateUi(embeddedDialog); @@ -97,14 +97,14 @@ public: void retranslateUi(QDialog *embeddedDialog) { - embeddedDialog->setWindowTitle(QApplication::translate("embeddedDialog", "Embedded Dialog", nullptr)); - label->setText(QApplication::translate("embeddedDialog", "Layout Direction:", nullptr)); - layoutDirection->setItemText(0, QApplication::translate("embeddedDialog", "Left to Right", nullptr)); - layoutDirection->setItemText(1, QApplication::translate("embeddedDialog", "Right to Left", nullptr)); - - label_2->setText(QApplication::translate("embeddedDialog", "Select Font:", nullptr)); - label_3->setText(QApplication::translate("embeddedDialog", "Style:", nullptr)); - label_4->setText(QApplication::translate("embeddedDialog", "Layout spacing:", nullptr)); + embeddedDialog->setWindowTitle(QCoreApplication::translate("embeddedDialog", "Embedded Dialog", nullptr)); + label->setText(QCoreApplication::translate("embeddedDialog", "Layout Direction:", nullptr)); + layoutDirection->setItemText(0, QCoreApplication::translate("embeddedDialog", "Left to Right", nullptr)); + layoutDirection->setItemText(1, QCoreApplication::translate("embeddedDialog", "Right to Left", nullptr)); + + label_2->setText(QCoreApplication::translate("embeddedDialog", "Select Font:", nullptr)); + label_3->setText(QCoreApplication::translate("embeddedDialog", "Style:", nullptr)); + label_4->setText(QCoreApplication::translate("embeddedDialog", "Layout spacing:", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/enumnostdset.ui.h b/tests/auto/tools/uic/baseline/enumnostdset.ui.h index 233fc616ac..f0e65299cd 100644 --- a/tests/auto/tools/uic/baseline/enumnostdset.ui.h +++ b/tests/auto/tools/uic/baseline/enumnostdset.ui.h @@ -24,10 +24,10 @@ public: void setupUi(QWidget *Form) { if (Form->objectName().isEmpty()) - Form->setObjectName(QString::fromUtf8("Form")); + Form->setObjectName("Form"); Form->resize(400, 300); worldTimeClock = new WorldTimeClock(Form); - worldTimeClock->setObjectName(QString::fromUtf8("worldTimeClock")); + worldTimeClock->setObjectName("worldTimeClock"); worldTimeClock->setGeometry(QRect(100, 100, 100, 100)); worldTimeClock->setProperty("penStyle", QVariant::fromValue(Qt::DashDotLine)); @@ -38,7 +38,7 @@ public: void retranslateUi(QWidget *Form) { - Form->setWindowTitle(QApplication::translate("Form", "Form", nullptr)); + Form->setWindowTitle(QCoreApplication::translate("Form", "Form", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/filespage.ui.h b/tests/auto/tools/uic/baseline/filespage.ui.h index 29ed981a8a..d567e4d150 100644 --- a/tests/auto/tools/uic/baseline/filespage.ui.h +++ b/tests/auto/tools/uic/baseline/filespage.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'filespage.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -34,24 +34,24 @@ public: void setupUi(QWidget *FilesPage) { if (FilesPage->objectName().isEmpty()) - FilesPage->setObjectName(QString::fromUtf8("FilesPage")); + FilesPage->setObjectName("FilesPage"); FilesPage->resize(417, 242); gridLayout = new QGridLayout(FilesPage); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); fileLabel = new QLabel(FilesPage); - fileLabel->setObjectName(QString::fromUtf8("fileLabel")); + fileLabel->setObjectName("fileLabel"); fileLabel->setWordWrap(true); gridLayout->addWidget(fileLabel, 0, 0, 1, 2); fileListWidget = new QListWidget(FilesPage); - fileListWidget->setObjectName(QString::fromUtf8("fileListWidget")); + fileListWidget->setObjectName("fileListWidget"); gridLayout->addWidget(fileListWidget, 1, 0, 3, 1); removeButton = new QPushButton(FilesPage); - removeButton->setObjectName(QString::fromUtf8("removeButton")); - QSizePolicy sizePolicy(QSizePolicy::Maximum, QSizePolicy::Fixed); + removeButton->setObjectName("removeButton"); + QSizePolicy sizePolicy(QSizePolicy::Policy::Maximum, QSizePolicy::Policy::Fixed); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); sizePolicy.setHeightForWidth(removeButton->sizePolicy().hasHeightForWidth()); @@ -60,15 +60,15 @@ public: gridLayout->addWidget(removeButton, 1, 1, 1, 1); removeAllButton = new QPushButton(FilesPage); - removeAllButton->setObjectName(QString::fromUtf8("removeAllButton")); + removeAllButton->setObjectName("removeAllButton"); gridLayout->addWidget(removeAllButton, 2, 1, 1, 1); - spacerItem = new QSpacerItem(75, 16, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem = new QSpacerItem(75, 16, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Expanding); gridLayout->addItem(spacerItem, 3, 1, 1, 1); - spacerItem1 = new QSpacerItem(20, 31, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem1 = new QSpacerItem(20, 31, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Expanding); gridLayout->addItem(spacerItem1, 4, 0, 1, 1); @@ -80,10 +80,10 @@ public: void retranslateUi(QWidget *FilesPage) { - FilesPage->setWindowTitle(QApplication::translate("FilesPage", "Form", nullptr)); - fileLabel->setText(QApplication::translate("FilesPage", "Files:", nullptr)); - removeButton->setText(QApplication::translate("FilesPage", "Remove", nullptr)); - removeAllButton->setText(QApplication::translate("FilesPage", "Remove All", nullptr)); + FilesPage->setWindowTitle(QCoreApplication::translate("FilesPage", "Form", nullptr)); + fileLabel->setText(QCoreApplication::translate("FilesPage", "Files:", nullptr)); + removeButton->setText(QCoreApplication::translate("FilesPage", "Remove", nullptr)); + removeAllButton->setText(QCoreApplication::translate("FilesPage", "Remove All", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/filternamedialog.ui.h b/tests/auto/tools/uic/baseline/filternamedialog.ui.h index 716c291fdd..e8a73e9607 100644 --- a/tests/auto/tools/uic/baseline/filternamedialog.ui.h +++ b/tests/auto/tools/uic/baseline/filternamedialog.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'filternamedialog.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -10,6 +10,7 @@ #define FILTERNAMEDIALOG_H #include <QtCore/QVariant> +#include <QtWidgets/QAbstractButton> #include <QtWidgets/QApplication> #include <QtWidgets/QDialog> #include <QtWidgets/QDialogButtonBox> @@ -34,35 +35,35 @@ public: void setupUi(QDialog *FilterNameDialogClass) { if (FilterNameDialogClass->objectName().isEmpty()) - FilterNameDialogClass->setObjectName(QString::fromUtf8("FilterNameDialogClass")); + FilterNameDialogClass->setObjectName("FilterNameDialogClass"); FilterNameDialogClass->resize(312, 95); gridLayout = new QGridLayout(FilterNameDialogClass); gridLayout->setSpacing(6); gridLayout->setContentsMargins(9, 9, 9, 9); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); label = new QLabel(FilterNameDialogClass); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName("label"); gridLayout->addWidget(label, 0, 0, 1, 1); lineEdit = new QLineEdit(FilterNameDialogClass); - lineEdit->setObjectName(QString::fromUtf8("lineEdit")); + lineEdit->setObjectName("lineEdit"); gridLayout->addWidget(lineEdit, 0, 1, 1, 2); line = new QFrame(FilterNameDialogClass); - line->setObjectName(QString::fromUtf8("line")); - line->setFrameShape(QFrame::HLine); - line->setFrameShadow(QFrame::Sunken); + line->setObjectName("line"); + line->setFrameShape(QFrame::Shape::HLine); + line->setFrameShadow(QFrame::Shadow::Sunken); gridLayout->addWidget(line, 1, 0, 1, 3); - spacerItem = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacerItem = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); gridLayout->addItem(spacerItem, 2, 0, 1, 2); buttonBox = new QDialogButtonBox(FilterNameDialogClass); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName("buttonBox"); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok); @@ -76,8 +77,8 @@ public: void retranslateUi(QDialog *FilterNameDialogClass) { - FilterNameDialogClass->setWindowTitle(QApplication::translate("FilterNameDialogClass", "FilterNameDialog", nullptr)); - label->setText(QApplication::translate("FilterNameDialogClass", "Filter Name:", nullptr)); + FilterNameDialogClass->setWindowTitle(QCoreApplication::translate("FilterNameDialogClass", "FilterNameDialog", nullptr)); + label->setText(QCoreApplication::translate("FilterNameDialogClass", "Filter Name:", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/filterpage.ui b/tests/auto/tools/uic/baseline/filterpage.ui index 7cda3d9bed..4c3ea810b6 100644 --- a/tests/auto/tools/uic/baseline/filterpage.ui +++ b/tests/auto/tools/uic/baseline/filterpage.ui @@ -108,7 +108,7 @@ <enum>Qt::Vertical</enum> </property> <property name="sizeType" > - <enum>QSizePolicy::Fixed</enum> + <enum>QSizePolicy::Policy::Fixed</enum> </property> <property name="sizeHint" > <size> diff --git a/tests/auto/tools/uic/baseline/filterpage.ui.h b/tests/auto/tools/uic/baseline/filterpage.ui.h index f6610fdc4d..ae7cdc073d 100644 --- a/tests/auto/tools/uic/baseline/filterpage.ui.h +++ b/tests/auto/tools/uic/baseline/filterpage.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'filterpage.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -42,56 +42,56 @@ public: void setupUi(QWidget *FilterPage) { if (FilterPage->objectName().isEmpty()) - FilterPage->setObjectName(QString::fromUtf8("FilterPage")); + FilterPage->setObjectName("FilterPage"); FilterPage->resize(419, 243); gridLayout = new QGridLayout(FilterPage); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); label = new QLabel(FilterPage); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName("label"); gridLayout->addWidget(label, 1, 0, 1, 1); filterLineEdit = new QLineEdit(FilterPage); - filterLineEdit->setObjectName(QString::fromUtf8("filterLineEdit")); + filterLineEdit->setObjectName("filterLineEdit"); gridLayout->addWidget(filterLineEdit, 2, 0, 1, 1); groupBox = new QGroupBox(FilterPage); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName("groupBox"); gridLayout1 = new QGridLayout(groupBox); - gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); + gridLayout1->setObjectName("gridLayout1"); customFilterWidget = new QTreeWidget(groupBox); - customFilterWidget->setObjectName(QString::fromUtf8("customFilterWidget")); + customFilterWidget->setObjectName("customFilterWidget"); customFilterWidget->setColumnCount(2); gridLayout1->addWidget(customFilterWidget, 0, 0, 3, 1); addButton = new QPushButton(groupBox); - addButton->setObjectName(QString::fromUtf8("addButton")); + addButton->setObjectName("addButton"); gridLayout1->addWidget(addButton, 0, 1, 1, 1); removeButton = new QPushButton(groupBox); - removeButton->setObjectName(QString::fromUtf8("removeButton")); + removeButton->setObjectName("removeButton"); gridLayout1->addWidget(removeButton, 1, 1, 1, 1); - spacerItem = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem = new QSpacerItem(20, 40, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Expanding); gridLayout1->addItem(spacerItem, 2, 1, 1, 1); gridLayout->addWidget(groupBox, 4, 0, 1, 1); - spacerItem1 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem1 = new QSpacerItem(20, 40, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Expanding); gridLayout->addItem(spacerItem1, 0, 0, 1, 1); - spacerItem2 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem2 = new QSpacerItem(20, 40, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Expanding); gridLayout->addItem(spacerItem2, 5, 0, 1, 1); - spacerItem3 = new QSpacerItem(20, 10, QSizePolicy::Minimum, QSizePolicy::Fixed); + spacerItem3 = new QSpacerItem(20, 10, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Fixed); gridLayout->addItem(spacerItem3, 3, 0, 1, 1); @@ -103,14 +103,14 @@ public: void retranslateUi(QWidget *FilterPage) { - FilterPage->setWindowTitle(QApplication::translate("FilterPage", "Form", nullptr)); - label->setText(QApplication::translate("FilterPage", "Filter attributes for current documentation (comma separated list):", nullptr)); - groupBox->setTitle(QApplication::translate("FilterPage", "Custom Filters", nullptr)); + FilterPage->setWindowTitle(QCoreApplication::translate("FilterPage", "Form", nullptr)); + label->setText(QCoreApplication::translate("FilterPage", "Filter attributes for current documentation (comma separated list):", nullptr)); + groupBox->setTitle(QCoreApplication::translate("FilterPage", "Custom Filters", nullptr)); QTreeWidgetItem *___qtreewidgetitem = customFilterWidget->headerItem(); - ___qtreewidgetitem->setText(1, QApplication::translate("FilterPage", "2", nullptr)); - ___qtreewidgetitem->setText(0, QApplication::translate("FilterPage", "1", nullptr)); - addButton->setText(QApplication::translate("FilterPage", "Add", nullptr)); - removeButton->setText(QApplication::translate("FilterPage", "Remove", nullptr)); + ___qtreewidgetitem->setText(1, QCoreApplication::translate("FilterPage", "2", nullptr)); + ___qtreewidgetitem->setText(0, QCoreApplication::translate("FilterPage", "1", nullptr)); + addButton->setText(QCoreApplication::translate("FilterPage", "Add", nullptr)); + removeButton->setText(QCoreApplication::translate("FilterPage", "Remove", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/finddialog.ui b/tests/auto/tools/uic/baseline/finddialog.ui index 9951e80f17..5faa39b354 100644 --- a/tests/auto/tools/uic/baseline/finddialog.ui +++ b/tests/auto/tools/uic/baseline/finddialog.ui @@ -1,31 +1,8 @@ <ui version="4.0" > - <comment>********************************************************************* -** -** 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$ -** -*********************************************************************</comment> +<comment> +* Copyright (C) 2016 The Qt Company Ltd. +* SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +</comment> <class>FindDialog</class> <widget class="QDialog" name="FindDialog" > <property name="geometry" > @@ -206,7 +183,7 @@ <enum>Qt::Vertical</enum> </property> <property name="sizeType" > - <enum>QSizePolicy::Expanding</enum> + <enum>QSizePolicy::Policy::Expanding</enum> </property> <property name="sizeHint" stdset="0" > <size> diff --git a/tests/auto/tools/uic/baseline/finddialog.ui.h b/tests/auto/tools/uic/baseline/finddialog.ui.h index a427be3614..179bf09f86 100644 --- a/tests/auto/tools/uic/baseline/finddialog.ui.h +++ b/tests/auto/tools/uic/baseline/finddialog.ui.h @@ -1,37 +1,14 @@ /* -********************************************************************* -** -** 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$ -** -********************************************************************* + +* Copyright (C) 2016 The Qt Company Ltd. +* SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + */ /******************************************************************************** ** Form generated from reading UI file 'finddialog.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -77,9 +54,9 @@ public: void setupUi(QDialog *FindDialog) { if (FindDialog->objectName().isEmpty()) - FindDialog->setObjectName(QString::fromUtf8("FindDialog")); + FindDialog->setObjectName("FindDialog"); FindDialog->resize(414, 170); - QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum); + QSizePolicy sizePolicy(QSizePolicy::Policy::Preferred, QSizePolicy::Policy::Maximum); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); sizePolicy.setHeightForWidth(FindDialog->sizePolicy().hasHeightForWidth()); @@ -87,22 +64,22 @@ public: hboxLayout = new QHBoxLayout(FindDialog); hboxLayout->setSpacing(6); hboxLayout->setContentsMargins(11, 11, 11, 11); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName("hboxLayout"); vboxLayout = new QVBoxLayout(); vboxLayout->setSpacing(6); vboxLayout->setContentsMargins(0, 0, 0, 0); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); hboxLayout1 = new QHBoxLayout(); hboxLayout1->setSpacing(6); hboxLayout1->setContentsMargins(0, 0, 0, 0); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName("hboxLayout1"); findWhat = new QLabel(FindDialog); - findWhat->setObjectName(QString::fromUtf8("findWhat")); + findWhat->setObjectName("findWhat"); hboxLayout1->addWidget(findWhat); led = new QLineEdit(FindDialog); - led->setObjectName(QString::fromUtf8("led")); + led->setObjectName("led"); hboxLayout1->addWidget(led); @@ -110,36 +87,36 @@ public: vboxLayout->addLayout(hboxLayout1); groupBox = new QGroupBox(FindDialog); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName("groupBox"); gridLayout = new QGridLayout(groupBox); gridLayout->setSpacing(6); gridLayout->setContentsMargins(9, 9, 9, 9); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); sourceText = new QCheckBox(groupBox); - sourceText->setObjectName(QString::fromUtf8("sourceText")); + sourceText->setObjectName("sourceText"); sourceText->setChecked(true); gridLayout->addWidget(sourceText, 1, 0, 1, 1); translations = new QCheckBox(groupBox); - translations->setObjectName(QString::fromUtf8("translations")); + translations->setObjectName("translations"); translations->setChecked(true); gridLayout->addWidget(translations, 2, 0, 1, 1); matchCase = new QCheckBox(groupBox); - matchCase->setObjectName(QString::fromUtf8("matchCase")); + matchCase->setObjectName("matchCase"); gridLayout->addWidget(matchCase, 0, 1, 1, 1); comments = new QCheckBox(groupBox); - comments->setObjectName(QString::fromUtf8("comments")); + comments->setObjectName("comments"); comments->setChecked(true); gridLayout->addWidget(comments, 0, 0, 1, 1); ignoreAccelerators = new QCheckBox(groupBox); - ignoreAccelerators->setObjectName(QString::fromUtf8("ignoreAccelerators")); + ignoreAccelerators->setObjectName("ignoreAccelerators"); ignoreAccelerators->setChecked(true); gridLayout->addWidget(ignoreAccelerators, 1, 1, 1, 1); @@ -153,28 +130,28 @@ public: vboxLayout1 = new QVBoxLayout(); vboxLayout1->setSpacing(6); vboxLayout1->setContentsMargins(0, 0, 0, 0); - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName("vboxLayout1"); findNxt = new QPushButton(FindDialog); - findNxt->setObjectName(QString::fromUtf8("findNxt")); + findNxt->setObjectName("findNxt"); findNxt->setFlat(false); vboxLayout1->addWidget(findNxt); cancel = new QPushButton(FindDialog); - cancel->setObjectName(QString::fromUtf8("cancel")); + cancel->setObjectName("cancel"); vboxLayout1->addWidget(cancel); - spacerItem = new QSpacerItem(20, 51, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem = new QSpacerItem(20, 51, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Expanding); vboxLayout1->addItem(spacerItem); hboxLayout->addLayout(vboxLayout1); -#ifndef QT_NO_SHORTCUT +#if QT_CONFIG(shortcut) findWhat->setBuddy(led); -#endif // QT_NO_SHORTCUT +#endif // QT_CONFIG(shortcut) QWidget::setTabOrder(led, findNxt); QWidget::setTabOrder(findNxt, cancel); QWidget::setTabOrder(cancel, comments); @@ -183,7 +160,7 @@ public: QWidget::setTabOrder(translations, matchCase); retranslateUi(FindDialog); - QObject::connect(cancel, SIGNAL(clicked()), FindDialog, SLOT(reject())); + QObject::connect(cancel, &QPushButton::clicked, FindDialog, qOverload<>(&QDialog::reject)); findNxt->setDefault(true); @@ -193,40 +170,40 @@ public: void retranslateUi(QDialog *FindDialog) { - FindDialog->setWindowTitle(QApplication::translate("FindDialog", "Find", nullptr)); -#ifndef QT_NO_WHATSTHIS - FindDialog->setWhatsThis(QApplication::translate("FindDialog", "This window allows you to search for some text in the translation source file.", nullptr)); -#endif // QT_NO_WHATSTHIS - findWhat->setText(QApplication::translate("FindDialog", "&Find what:", nullptr)); -#ifndef QT_NO_WHATSTHIS - led->setWhatsThis(QApplication::translate("FindDialog", "Type in the text to search for.", nullptr)); -#endif // QT_NO_WHATSTHIS - groupBox->setTitle(QApplication::translate("FindDialog", "Options", nullptr)); -#ifndef QT_NO_WHATSTHIS - sourceText->setWhatsThis(QApplication::translate("FindDialog", "Source texts are searched when checked.", nullptr)); -#endif // QT_NO_WHATSTHIS - sourceText->setText(QApplication::translate("FindDialog", "&Source texts", nullptr)); -#ifndef QT_NO_WHATSTHIS - translations->setWhatsThis(QApplication::translate("FindDialog", "Translations are searched when checked.", nullptr)); -#endif // QT_NO_WHATSTHIS - translations->setText(QApplication::translate("FindDialog", "&Translations", nullptr)); -#ifndef QT_NO_WHATSTHIS - matchCase->setWhatsThis(QApplication::translate("FindDialog", "Texts such as 'TeX' and 'tex' are considered as different when checked.", nullptr)); -#endif // QT_NO_WHATSTHIS - matchCase->setText(QApplication::translate("FindDialog", "&Match case", nullptr)); -#ifndef QT_NO_WHATSTHIS - comments->setWhatsThis(QApplication::translate("FindDialog", "Comments and contexts are searched when checked.", nullptr)); -#endif // QT_NO_WHATSTHIS - comments->setText(QApplication::translate("FindDialog", "&Comments", nullptr)); - ignoreAccelerators->setText(QApplication::translate("FindDialog", "Ignore &accelerators", nullptr)); -#ifndef QT_NO_WHATSTHIS - findNxt->setWhatsThis(QApplication::translate("FindDialog", "Click here to find the next occurrence of the text you typed in.", nullptr)); -#endif // QT_NO_WHATSTHIS - findNxt->setText(QApplication::translate("FindDialog", "Find Next", nullptr)); -#ifndef QT_NO_WHATSTHIS - cancel->setWhatsThis(QApplication::translate("FindDialog", "Click here to close this window.", nullptr)); -#endif // QT_NO_WHATSTHIS - cancel->setText(QApplication::translate("FindDialog", "Cancel", nullptr)); + FindDialog->setWindowTitle(QCoreApplication::translate("FindDialog", "Find", nullptr)); +#if QT_CONFIG(whatsthis) + FindDialog->setWhatsThis(QCoreApplication::translate("FindDialog", "This window allows you to search for some text in the translation source file.", nullptr)); +#endif // QT_CONFIG(whatsthis) + findWhat->setText(QCoreApplication::translate("FindDialog", "&Find what:", nullptr)); +#if QT_CONFIG(whatsthis) + led->setWhatsThis(QCoreApplication::translate("FindDialog", "Type in the text to search for.", nullptr)); +#endif // QT_CONFIG(whatsthis) + groupBox->setTitle(QCoreApplication::translate("FindDialog", "Options", nullptr)); +#if QT_CONFIG(whatsthis) + sourceText->setWhatsThis(QCoreApplication::translate("FindDialog", "Source texts are searched when checked.", nullptr)); +#endif // QT_CONFIG(whatsthis) + sourceText->setText(QCoreApplication::translate("FindDialog", "&Source texts", nullptr)); +#if QT_CONFIG(whatsthis) + translations->setWhatsThis(QCoreApplication::translate("FindDialog", "Translations are searched when checked.", nullptr)); +#endif // QT_CONFIG(whatsthis) + translations->setText(QCoreApplication::translate("FindDialog", "&Translations", nullptr)); +#if QT_CONFIG(whatsthis) + matchCase->setWhatsThis(QCoreApplication::translate("FindDialog", "Texts such as 'TeX' and 'tex' are considered as different when checked.", nullptr)); +#endif // QT_CONFIG(whatsthis) + matchCase->setText(QCoreApplication::translate("FindDialog", "&Match case", nullptr)); +#if QT_CONFIG(whatsthis) + comments->setWhatsThis(QCoreApplication::translate("FindDialog", "Comments and contexts are searched when checked.", nullptr)); +#endif // QT_CONFIG(whatsthis) + comments->setText(QCoreApplication::translate("FindDialog", "&Comments", nullptr)); + ignoreAccelerators->setText(QCoreApplication::translate("FindDialog", "Ignore &accelerators", nullptr)); +#if QT_CONFIG(whatsthis) + findNxt->setWhatsThis(QCoreApplication::translate("FindDialog", "Click here to find the next occurrence of the text you typed in.", nullptr)); +#endif // QT_CONFIG(whatsthis) + findNxt->setText(QCoreApplication::translate("FindDialog", "Find Next", nullptr)); +#if QT_CONFIG(whatsthis) + cancel->setWhatsThis(QCoreApplication::translate("FindDialog", "Click here to close this window.", nullptr)); +#endif // QT_CONFIG(whatsthis) + cancel->setText(QCoreApplication::translate("FindDialog", "Cancel", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/form.ui.h b/tests/auto/tools/uic/baseline/form.ui.h index ecc63e339b..18e6cbba6f 100644 --- a/tests/auto/tools/uic/baseline/form.ui.h +++ b/tests/auto/tools/uic/baseline/form.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'form.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -40,7 +40,7 @@ public: void setupUi(QWidget *WorldTimeForm) { if (WorldTimeForm->objectName().isEmpty()) - WorldTimeForm->setObjectName(QString::fromUtf8("WorldTimeForm")); + WorldTimeForm->setObjectName("WorldTimeForm"); WorldTimeForm->resize(400, 300); hboxLayout = new QHBoxLayout(WorldTimeForm); #ifndef Q_OS_MAC @@ -49,9 +49,9 @@ public: #ifndef Q_OS_MAC hboxLayout->setContentsMargins(9, 9, 9, 9); #endif - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName("hboxLayout"); worldTimeClock = new WorldTimeClock(WorldTimeForm); - worldTimeClock->setObjectName(QString::fromUtf8("worldTimeClock")); + worldTimeClock->setObjectName("worldTimeClock"); hboxLayout->addWidget(worldTimeClock); @@ -60,8 +60,8 @@ public: vboxLayout->setSpacing(6); #endif vboxLayout->setContentsMargins(1, 1, 1, 1); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); - spacerItem = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + vboxLayout->setObjectName("vboxLayout"); + spacerItem = new QSpacerItem(20, 40, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Expanding); vboxLayout->addItem(spacerItem); @@ -70,14 +70,14 @@ public: hboxLayout1->setSpacing(6); #endif hboxLayout1->setContentsMargins(1, 1, 1, 1); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName("hboxLayout1"); label = new QLabel(WorldTimeForm); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName("label"); hboxLayout1->addWidget(label); timeEdit = new QTimeEdit(WorldTimeForm); - timeEdit->setObjectName(QString::fromUtf8("timeEdit")); + timeEdit->setObjectName("timeEdit"); timeEdit->setReadOnly(true); hboxLayout1->addWidget(timeEdit); @@ -90,14 +90,14 @@ public: hboxLayout2->setSpacing(6); #endif hboxLayout2->setContentsMargins(1, 1, 1, 1); - hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2")); + hboxLayout2->setObjectName("hboxLayout2"); label_2 = new QLabel(WorldTimeForm); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName("label_2"); hboxLayout2->addWidget(label_2); spinBox = new QSpinBox(WorldTimeForm); - spinBox->setObjectName(QString::fromUtf8("spinBox")); + spinBox->setObjectName("spinBox"); spinBox->setMaximum(12); spinBox->setMinimum(-12); @@ -106,7 +106,7 @@ public: vboxLayout->addLayout(hboxLayout2); - spacerItem1 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem1 = new QSpacerItem(20, 40, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Expanding); vboxLayout->addItem(spacerItem1); @@ -123,9 +123,9 @@ public: void retranslateUi(QWidget *WorldTimeForm) { - WorldTimeForm->setWindowTitle(QApplication::translate("WorldTimeForm", "World Time Clock", nullptr)); - label->setText(QApplication::translate("WorldTimeForm", "Current time:", nullptr)); - label_2->setText(QApplication::translate("WorldTimeForm", "Set time zone:", nullptr)); + WorldTimeForm->setWindowTitle(QCoreApplication::translate("WorldTimeForm", "World Time Clock", nullptr)); + label->setText(QCoreApplication::translate("WorldTimeForm", "Current time:", nullptr)); + label_2->setText(QCoreApplication::translate("WorldTimeForm", "Set time zone:", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/formwindowsettings.ui b/tests/auto/tools/uic/baseline/formwindowsettings.ui index cb71e3a84d..a24f5ccbb1 100644 --- a/tests/auto/tools/uic/baseline/formwindowsettings.ui +++ b/tests/auto/tools/uic/baseline/formwindowsettings.ui @@ -1,31 +1,8 @@ <ui version="4.0" > - <comment>********************************************************************* -** -** 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$ -** -*********************************************************************</comment> +<comment> +* Copyright (C) 2016 The Qt Company Ltd. +* SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +</comment> <class>FormWindowSettings</class> <widget class="QDialog" name="FormWindowSettings" > <property name="geometry" > diff --git a/tests/auto/tools/uic/baseline/formwindowsettings.ui.h b/tests/auto/tools/uic/baseline/formwindowsettings.ui.h index d2cfa03edb..c0b778de7b 100644 --- a/tests/auto/tools/uic/baseline/formwindowsettings.ui.h +++ b/tests/auto/tools/uic/baseline/formwindowsettings.ui.h @@ -1,37 +1,14 @@ /* -********************************************************************* -** -** 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$ -** -********************************************************************* + +* Copyright (C) 2016 The Qt Company Ltd. +* SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + */ /******************************************************************************** ** Form generated from reading UI file 'formwindowsettings.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -40,6 +17,7 @@ #define FORMWINDOWSETTINGS_H #include <QtCore/QVariant> +#include <QtWidgets/QAbstractButton> #include <QtWidgets/QApplication> #include <QtWidgets/QDialog> #include <QtWidgets/QDialogButtonBox> @@ -92,21 +70,21 @@ public: void setupUi(QDialog *FormWindowSettings) { if (FormWindowSettings->objectName().isEmpty()) - FormWindowSettings->setObjectName(QString::fromUtf8("FormWindowSettings")); + FormWindowSettings->setObjectName("FormWindowSettings"); FormWindowSettings->resize(433, 465); gridLayout = new QGridLayout(FormWindowSettings); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); buttonBox = new QDialogButtonBox(FormWindowSettings); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName("buttonBox"); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok); gridLayout->addWidget(buttonBox, 6, 0, 1, 2); line = new QFrame(FormWindowSettings); - line->setObjectName(QString::fromUtf8("line")); - line->setFrameShape(QFrame::HLine); - line->setFrameShadow(QFrame::Sunken); + line->setObjectName("line"); + line->setFrameShape(QFrame::Shape::HLine); + line->setFrameShadow(QFrame::Shadow::Sunken); gridLayout->addWidget(line, 5, 0, 1, 2); @@ -115,33 +93,33 @@ public: hboxLayout->setSpacing(6); #endif hboxLayout->setContentsMargins(0, 0, 0, 0); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName("hboxLayout"); layoutDefaultGroupBox = new QGroupBox(FormWindowSettings); - layoutDefaultGroupBox->setObjectName(QString::fromUtf8("layoutDefaultGroupBox")); + layoutDefaultGroupBox->setObjectName("layoutDefaultGroupBox"); layoutDefaultGroupBox->setCheckable(true); gridLayout1 = new QGridLayout(layoutDefaultGroupBox); #ifndef Q_OS_MAC gridLayout1->setSpacing(6); #endif gridLayout1->setContentsMargins(8, 8, 8, 8); - gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); + gridLayout1->setObjectName("gridLayout1"); label_2 = new QLabel(layoutDefaultGroupBox); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName("label_2"); gridLayout1->addWidget(label_2, 1, 0, 1, 1); label = new QLabel(layoutDefaultGroupBox); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName("label"); gridLayout1->addWidget(label, 0, 0, 1, 1); defaultSpacingSpinBox = new QSpinBox(layoutDefaultGroupBox); - defaultSpacingSpinBox->setObjectName(QString::fromUtf8("defaultSpacingSpinBox")); + defaultSpacingSpinBox->setObjectName("defaultSpacingSpinBox"); gridLayout1->addWidget(defaultSpacingSpinBox, 1, 1, 1, 1); defaultMarginSpinBox = new QSpinBox(layoutDefaultGroupBox); - defaultMarginSpinBox->setObjectName(QString::fromUtf8("defaultMarginSpinBox")); + defaultMarginSpinBox->setObjectName("defaultMarginSpinBox"); gridLayout1->addWidget(defaultMarginSpinBox, 0, 1, 1, 1); @@ -149,31 +127,31 @@ public: hboxLayout->addWidget(layoutDefaultGroupBox); layoutFunctionGroupBox = new QGroupBox(FormWindowSettings); - layoutFunctionGroupBox->setObjectName(QString::fromUtf8("layoutFunctionGroupBox")); + layoutFunctionGroupBox->setObjectName("layoutFunctionGroupBox"); layoutFunctionGroupBox->setCheckable(true); gridLayout2 = new QGridLayout(layoutFunctionGroupBox); #ifndef Q_OS_MAC gridLayout2->setSpacing(6); #endif gridLayout2->setContentsMargins(8, 8, 8, 8); - gridLayout2->setObjectName(QString::fromUtf8("gridLayout2")); + gridLayout2->setObjectName("gridLayout2"); spacingFunctionLineEdit = new QLineEdit(layoutFunctionGroupBox); - spacingFunctionLineEdit->setObjectName(QString::fromUtf8("spacingFunctionLineEdit")); + spacingFunctionLineEdit->setObjectName("spacingFunctionLineEdit"); gridLayout2->addWidget(spacingFunctionLineEdit, 1, 1, 1, 1); marginFunctionLineEdit = new QLineEdit(layoutFunctionGroupBox); - marginFunctionLineEdit->setObjectName(QString::fromUtf8("marginFunctionLineEdit")); + marginFunctionLineEdit->setObjectName("marginFunctionLineEdit"); gridLayout2->addWidget(marginFunctionLineEdit, 0, 1, 1, 1); label_3 = new QLabel(layoutFunctionGroupBox); - label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setObjectName("label_3"); gridLayout2->addWidget(label_3, 0, 0, 1, 1); label_3_2 = new QLabel(layoutFunctionGroupBox); - label_3_2->setObjectName(QString::fromUtf8("label_3_2")); + label_3_2->setObjectName("label_3_2"); gridLayout2->addWidget(label_3_2, 1, 0, 1, 1); @@ -184,15 +162,15 @@ public: gridLayout->addLayout(hboxLayout, 2, 0, 1, 2); pixmapFunctionGroupBox_2 = new QGroupBox(FormWindowSettings); - pixmapFunctionGroupBox_2->setObjectName(QString::fromUtf8("pixmapFunctionGroupBox_2")); + pixmapFunctionGroupBox_2->setObjectName("pixmapFunctionGroupBox_2"); vboxLayout = new QVBoxLayout(pixmapFunctionGroupBox_2); #ifndef Q_OS_MAC vboxLayout->setSpacing(6); #endif vboxLayout->setContentsMargins(8, 8, 8, 8); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); authorLineEdit = new QLineEdit(pixmapFunctionGroupBox_2); - authorLineEdit->setObjectName(QString::fromUtf8("authorLineEdit")); + authorLineEdit->setObjectName("authorLineEdit"); vboxLayout->addWidget(authorLineEdit); @@ -200,15 +178,15 @@ public: gridLayout->addWidget(pixmapFunctionGroupBox_2, 0, 0, 1, 2); includeHintsGroupBox = new QGroupBox(FormWindowSettings); - includeHintsGroupBox->setObjectName(QString::fromUtf8("includeHintsGroupBox")); + includeHintsGroupBox->setObjectName("includeHintsGroupBox"); vboxLayout1 = new QVBoxLayout(includeHintsGroupBox); #ifndef Q_OS_MAC vboxLayout1->setSpacing(6); #endif vboxLayout1->setContentsMargins(8, 8, 8, 8); - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName("vboxLayout1"); includeHintsTextEdit = new QTextEdit(includeHintsGroupBox); - includeHintsTextEdit->setObjectName(QString::fromUtf8("includeHintsTextEdit")); + includeHintsTextEdit->setObjectName("includeHintsTextEdit"); vboxLayout1->addWidget(includeHintsTextEdit); @@ -220,18 +198,18 @@ public: hboxLayout1->setSpacing(6); #endif hboxLayout1->setContentsMargins(0, 0, 0, 0); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName("hboxLayout1"); pixmapFunctionGroupBox = new QGroupBox(FormWindowSettings); - pixmapFunctionGroupBox->setObjectName(QString::fromUtf8("pixmapFunctionGroupBox")); + pixmapFunctionGroupBox->setObjectName("pixmapFunctionGroupBox"); pixmapFunctionGroupBox->setCheckable(true); vboxLayout2 = new QVBoxLayout(pixmapFunctionGroupBox); #ifndef Q_OS_MAC vboxLayout2->setSpacing(6); #endif vboxLayout2->setContentsMargins(8, 8, 8, 8); - vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2")); + vboxLayout2->setObjectName("vboxLayout2"); pixmapFunctionLineEdit = new QLineEdit(pixmapFunctionGroupBox); - pixmapFunctionLineEdit->setObjectName(QString::fromUtf8("pixmapFunctionLineEdit")); + pixmapFunctionLineEdit->setObjectName("pixmapFunctionLineEdit"); vboxLayout2->addWidget(pixmapFunctionLineEdit); @@ -241,21 +219,21 @@ public: gridLayout->addLayout(hboxLayout1, 3, 1, 1, 1); - spacerItem = new QSpacerItem(111, 115, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem = new QSpacerItem(111, 115, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Expanding); gridLayout->addItem(spacerItem, 4, 1, 1, 1); gridPanel = new qdesigner_internal::GridPanel(FormWindowSettings); - gridPanel->setObjectName(QString::fromUtf8("gridPanel")); + gridPanel->setObjectName("gridPanel"); gridLayout->addWidget(gridPanel, 1, 0, 1, 2); -#ifndef QT_NO_SHORTCUT +#if QT_CONFIG(shortcut) label_2->setBuddy(defaultSpacingSpinBox); label->setBuddy(defaultMarginSpinBox); label_3->setBuddy(marginFunctionLineEdit); label_3_2->setBuddy(spacingFunctionLineEdit); -#endif // QT_NO_SHORTCUT +#endif // QT_CONFIG(shortcut) QWidget::setTabOrder(authorLineEdit, defaultMarginSpinBox); QWidget::setTabOrder(defaultMarginSpinBox, defaultSpacingSpinBox); QWidget::setTabOrder(defaultSpacingSpinBox, marginFunctionLineEdit); @@ -263,25 +241,25 @@ public: QWidget::setTabOrder(spacingFunctionLineEdit, pixmapFunctionLineEdit); retranslateUi(FormWindowSettings); - QObject::connect(buttonBox, SIGNAL(accepted()), FormWindowSettings, SLOT(accept())); - QObject::connect(buttonBox, SIGNAL(rejected()), FormWindowSettings, SLOT(reject())); + QObject::connect(buttonBox, &QDialogButtonBox::accepted, FormWindowSettings, qOverload<>(&QDialog::accept)); + QObject::connect(buttonBox, &QDialogButtonBox::rejected, FormWindowSettings, qOverload<>(&QDialog::reject)); QMetaObject::connectSlotsByName(FormWindowSettings); } // setupUi void retranslateUi(QDialog *FormWindowSettings) { - FormWindowSettings->setWindowTitle(QApplication::translate("FormWindowSettings", "Form Settings", nullptr)); - layoutDefaultGroupBox->setTitle(QApplication::translate("FormWindowSettings", "Layout &Default", nullptr)); - label_2->setText(QApplication::translate("FormWindowSettings", "&Spacing:", nullptr)); - label->setText(QApplication::translate("FormWindowSettings", "&Margin:", nullptr)); - layoutFunctionGroupBox->setTitle(QApplication::translate("FormWindowSettings", "&Layout Function", nullptr)); - label_3->setText(QApplication::translate("FormWindowSettings", "Ma&rgin:", nullptr)); - label_3_2->setText(QApplication::translate("FormWindowSettings", "Spa&cing:", nullptr)); - pixmapFunctionGroupBox_2->setTitle(QApplication::translate("FormWindowSettings", "&Author", nullptr)); - includeHintsGroupBox->setTitle(QApplication::translate("FormWindowSettings", "&Include Hints", nullptr)); - pixmapFunctionGroupBox->setTitle(QApplication::translate("FormWindowSettings", "&Pixmap Function", nullptr)); - gridPanel->setTitle(QApplication::translate("FormWindowSettings", "Grid", nullptr)); + FormWindowSettings->setWindowTitle(QCoreApplication::translate("FormWindowSettings", "Form Settings", nullptr)); + layoutDefaultGroupBox->setTitle(QCoreApplication::translate("FormWindowSettings", "Layout &Default", nullptr)); + label_2->setText(QCoreApplication::translate("FormWindowSettings", "&Spacing:", nullptr)); + label->setText(QCoreApplication::translate("FormWindowSettings", "&Margin:", nullptr)); + layoutFunctionGroupBox->setTitle(QCoreApplication::translate("FormWindowSettings", "&Layout Function", nullptr)); + label_3->setText(QCoreApplication::translate("FormWindowSettings", "Ma&rgin:", nullptr)); + label_3_2->setText(QCoreApplication::translate("FormWindowSettings", "Spa&cing:", nullptr)); + pixmapFunctionGroupBox_2->setTitle(QCoreApplication::translate("FormWindowSettings", "&Author", nullptr)); + includeHintsGroupBox->setTitle(QCoreApplication::translate("FormWindowSettings", "&Include Hints", nullptr)); + pixmapFunctionGroupBox->setTitle(QCoreApplication::translate("FormWindowSettings", "&Pixmap Function", nullptr)); + gridPanel->setTitle(QCoreApplication::translate("FormWindowSettings", "Grid", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/generalpage.ui b/tests/auto/tools/uic/baseline/generalpage.ui index 9c2babb0ae..0e6268ed70 100644 --- a/tests/auto/tools/uic/baseline/generalpage.ui +++ b/tests/auto/tools/uic/baseline/generalpage.ui @@ -39,7 +39,7 @@ <enum>Qt::Vertical</enum> </property> <property name="sizeType" > - <enum>QSizePolicy::Fixed</enum> + <enum>QSizePolicy::Policy::Fixed</enum> </property> <property name="sizeHint" > <size> diff --git a/tests/auto/tools/uic/baseline/generalpage.ui.h b/tests/auto/tools/uic/baseline/generalpage.ui.h index bd04285d28..799463796c 100644 --- a/tests/auto/tools/uic/baseline/generalpage.ui.h +++ b/tests/auto/tools/uic/baseline/generalpage.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'generalpage.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -33,35 +33,35 @@ public: void setupUi(QWidget *GeneralPage) { if (GeneralPage->objectName().isEmpty()) - GeneralPage->setObjectName(QString::fromUtf8("GeneralPage")); + GeneralPage->setObjectName("GeneralPage"); GeneralPage->resize(417, 243); gridLayout = new QGridLayout(GeneralPage); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); label = new QLabel(GeneralPage); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName("label"); gridLayout->addWidget(label, 1, 0, 1, 1); namespaceLineEdit = new QLineEdit(GeneralPage); - namespaceLineEdit->setObjectName(QString::fromUtf8("namespaceLineEdit")); + namespaceLineEdit->setObjectName("namespaceLineEdit"); gridLayout->addWidget(namespaceLineEdit, 1, 1, 1, 1); label_2 = new QLabel(GeneralPage); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName("label_2"); gridLayout->addWidget(label_2, 2, 0, 1, 1); folderLineEdit = new QLineEdit(GeneralPage); - folderLineEdit->setObjectName(QString::fromUtf8("folderLineEdit")); + folderLineEdit->setObjectName("folderLineEdit"); gridLayout->addWidget(folderLineEdit, 2, 1, 1, 1); - spacerItem = new QSpacerItem(20, 20, QSizePolicy::Minimum, QSizePolicy::Fixed); + spacerItem = new QSpacerItem(20, 20, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Fixed); gridLayout->addItem(spacerItem, 0, 1, 1, 1); - spacerItem1 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem1 = new QSpacerItem(20, 40, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Expanding); gridLayout->addItem(spacerItem1, 3, 1, 1, 1); @@ -73,9 +73,9 @@ public: void retranslateUi(QWidget *GeneralPage) { - GeneralPage->setWindowTitle(QApplication::translate("GeneralPage", "Form", nullptr)); - label->setText(QApplication::translate("GeneralPage", "Namespace:", nullptr)); - label_2->setText(QApplication::translate("GeneralPage", "Virtual Folder:", nullptr)); + GeneralPage->setWindowTitle(QCoreApplication::translate("GeneralPage", "Form", nullptr)); + label->setText(QCoreApplication::translate("GeneralPage", "Namespace:", nullptr)); + label_2->setText(QCoreApplication::translate("GeneralPage", "Virtual Folder:", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/gridalignment.ui.h b/tests/auto/tools/uic/baseline/gridalignment.ui.h index 421f257c9a..4f9260fbeb 100644 --- a/tests/auto/tools/uic/baseline/gridalignment.ui.h +++ b/tests/auto/tools/uic/baseline/gridalignment.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'gridalignment.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -29,27 +29,27 @@ public: void setupUi(QWidget *Form) { if (Form->objectName().isEmpty()) - Form->setObjectName(QString::fromUtf8("Form")); + Form->setObjectName("Form"); Form->resize(279, 163); gridLayout = new QGridLayout(Form); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); pushButton = new QPushButton(Form); - pushButton->setObjectName(QString::fromUtf8("pushButton")); + pushButton->setObjectName("pushButton"); gridLayout->addWidget(pushButton, 0, 0, 1, 1, Qt::AlignLeft); pushButton_3 = new QPushButton(Form); - pushButton_3->setObjectName(QString::fromUtf8("pushButton_3")); + pushButton_3->setObjectName("pushButton_3"); gridLayout->addWidget(pushButton_3, 0, 1, 1, 1, Qt::AlignTop); pushButton_2 = new QPushButton(Form); - pushButton_2->setObjectName(QString::fromUtf8("pushButton_2")); + pushButton_2->setObjectName("pushButton_2"); gridLayout->addWidget(pushButton_2, 1, 0, 1, 1, Qt::AlignRight); pushButton_4 = new QPushButton(Form); - pushButton_4->setObjectName(QString::fromUtf8("pushButton_4")); + pushButton_4->setObjectName("pushButton_4"); gridLayout->addWidget(pushButton_4, 1, 1, 1, 1, Qt::AlignBottom); @@ -61,11 +61,11 @@ public: void retranslateUi(QWidget *Form) { - Form->setWindowTitle(QApplication::translate("Form", "Form", nullptr)); - pushButton->setText(QApplication::translate("Form", "Left", nullptr)); - pushButton_3->setText(QApplication::translate("Form", "Top", nullptr)); - pushButton_2->setText(QApplication::translate("Form", "Right", nullptr)); - pushButton_4->setText(QApplication::translate("Form", "Bottom", nullptr)); + Form->setWindowTitle(QCoreApplication::translate("Form", "Form", nullptr)); + pushButton->setText(QCoreApplication::translate("Form", "Left", nullptr)); + pushButton_3->setText(QCoreApplication::translate("Form", "Top", nullptr)); + pushButton_2->setText(QCoreApplication::translate("Form", "Right", nullptr)); + pushButton_4->setText(QCoreApplication::translate("Form", "Bottom", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/gridpanel.ui.h b/tests/auto/tools/uic/baseline/gridpanel.ui.h index 858b71d0cc..8e061a4a9a 100644 --- a/tests/auto/tools/uic/baseline/gridpanel.ui.h +++ b/tests/auto/tools/uic/baseline/gridpanel.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'gridpanel.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -46,18 +46,18 @@ public: void setupUi(QWidget *qdesigner_internal__GridPanel) { if (qdesigner_internal__GridPanel->objectName().isEmpty()) - qdesigner_internal__GridPanel->setObjectName(QString::fromUtf8("qdesigner_internal__GridPanel")); + qdesigner_internal__GridPanel->setObjectName("qdesigner_internal__GridPanel"); qdesigner_internal__GridPanel->resize(393, 110); vboxLayout = new QVBoxLayout(qdesigner_internal__GridPanel); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); vboxLayout->setContentsMargins(0, 0, 0, 0); m_gridGroupBox = new QGroupBox(qdesigner_internal__GridPanel); - m_gridGroupBox->setObjectName(QString::fromUtf8("m_gridGroupBox")); + m_gridGroupBox->setObjectName("m_gridGroupBox"); gridLayout = new QGridLayout(m_gridGroupBox); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); m_visibleCheckBox = new QCheckBox(m_gridGroupBox); - m_visibleCheckBox->setObjectName(QString::fromUtf8("m_visibleCheckBox")); - QSizePolicy sizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); + m_visibleCheckBox->setObjectName("m_visibleCheckBox"); + QSizePolicy sizePolicy(QSizePolicy::Policy::MinimumExpanding, QSizePolicy::Policy::Fixed); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); sizePolicy.setHeightForWidth(m_visibleCheckBox->sizePolicy().hasHeightForWidth()); @@ -66,32 +66,32 @@ public: gridLayout->addWidget(m_visibleCheckBox, 0, 0, 1, 1); label = new QLabel(m_gridGroupBox); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName("label"); gridLayout->addWidget(label, 0, 1, 1, 1); m_deltaXSpinBox = new QSpinBox(m_gridGroupBox); - m_deltaXSpinBox->setObjectName(QString::fromUtf8("m_deltaXSpinBox")); + m_deltaXSpinBox->setObjectName("m_deltaXSpinBox"); m_deltaXSpinBox->setMinimum(2); m_deltaXSpinBox->setMaximum(100); gridLayout->addWidget(m_deltaXSpinBox, 0, 2, 1, 1); m_snapXCheckBox = new QCheckBox(m_gridGroupBox); - m_snapXCheckBox->setObjectName(QString::fromUtf8("m_snapXCheckBox")); + m_snapXCheckBox->setObjectName("m_snapXCheckBox"); sizePolicy.setHeightForWidth(m_snapXCheckBox->sizePolicy().hasHeightForWidth()); m_snapXCheckBox->setSizePolicy(sizePolicy); gridLayout->addWidget(m_snapXCheckBox, 0, 3, 1, 1); hboxLayout = new QHBoxLayout(); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName("hboxLayout"); m_resetButton = new QPushButton(m_gridGroupBox); - m_resetButton->setObjectName(QString::fromUtf8("m_resetButton")); + m_resetButton->setObjectName("m_resetButton"); hboxLayout->addWidget(m_resetButton); - spacerItem = new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacerItem = new QSpacerItem(20, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); hboxLayout->addItem(spacerItem); @@ -99,19 +99,19 @@ public: gridLayout->addLayout(hboxLayout, 1, 0, 1, 1); label_2 = new QLabel(m_gridGroupBox); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName("label_2"); gridLayout->addWidget(label_2, 1, 1, 1, 1); m_deltaYSpinBox = new QSpinBox(m_gridGroupBox); - m_deltaYSpinBox->setObjectName(QString::fromUtf8("m_deltaYSpinBox")); + m_deltaYSpinBox->setObjectName("m_deltaYSpinBox"); m_deltaYSpinBox->setMinimum(2); m_deltaYSpinBox->setMaximum(100); gridLayout->addWidget(m_deltaYSpinBox, 1, 2, 1, 1); m_snapYCheckBox = new QCheckBox(m_gridGroupBox); - m_snapYCheckBox->setObjectName(QString::fromUtf8("m_snapYCheckBox")); + m_snapYCheckBox->setObjectName("m_snapYCheckBox"); sizePolicy.setHeightForWidth(m_snapYCheckBox->sizePolicy().hasHeightForWidth()); m_snapYCheckBox->setSizePolicy(sizePolicy); @@ -120,10 +120,10 @@ public: vboxLayout->addWidget(m_gridGroupBox); -#ifndef QT_NO_SHORTCUT +#if QT_CONFIG(shortcut) label->setBuddy(m_deltaXSpinBox); label_2->setBuddy(m_deltaYSpinBox); -#endif // QT_NO_SHORTCUT +#endif // QT_CONFIG(shortcut) retranslateUi(qdesigner_internal__GridPanel); @@ -132,14 +132,14 @@ public: void retranslateUi(QWidget *qdesigner_internal__GridPanel) { - qdesigner_internal__GridPanel->setWindowTitle(QApplication::translate("qdesigner_internal::GridPanel", "Form", nullptr)); - m_gridGroupBox->setTitle(QApplication::translate("qdesigner_internal::GridPanel", "Grid", nullptr)); - m_visibleCheckBox->setText(QApplication::translate("qdesigner_internal::GridPanel", "Visible", nullptr)); - label->setText(QApplication::translate("qdesigner_internal::GridPanel", "Grid &X", nullptr)); - m_snapXCheckBox->setText(QApplication::translate("qdesigner_internal::GridPanel", "Snap", nullptr)); - m_resetButton->setText(QApplication::translate("qdesigner_internal::GridPanel", "Reset", nullptr)); - label_2->setText(QApplication::translate("qdesigner_internal::GridPanel", "Grid &Y", nullptr)); - m_snapYCheckBox->setText(QApplication::translate("qdesigner_internal::GridPanel", "Snap", nullptr)); + qdesigner_internal__GridPanel->setWindowTitle(QCoreApplication::translate("qdesigner_internal::GridPanel", "Form", nullptr)); + m_gridGroupBox->setTitle(QCoreApplication::translate("qdesigner_internal::GridPanel", "Grid", nullptr)); + m_visibleCheckBox->setText(QCoreApplication::translate("qdesigner_internal::GridPanel", "Visible", nullptr)); + label->setText(QCoreApplication::translate("qdesigner_internal::GridPanel", "Grid &X", nullptr)); + m_snapXCheckBox->setText(QCoreApplication::translate("qdesigner_internal::GridPanel", "Snap", nullptr)); + m_resetButton->setText(QCoreApplication::translate("qdesigner_internal::GridPanel", "Reset", nullptr)); + label_2->setText(QCoreApplication::translate("qdesigner_internal::GridPanel", "Grid &Y", nullptr)); + m_snapYCheckBox->setText(QCoreApplication::translate("qdesigner_internal::GridPanel", "Snap", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/helpdialog.ui b/tests/auto/tools/uic/baseline/helpdialog.ui index 8c3178183c..8f384657f3 100644 --- a/tests/auto/tools/uic/baseline/helpdialog.ui +++ b/tests/auto/tools/uic/baseline/helpdialog.ui @@ -1,32 +1,8 @@ <ui version="4.0" > - <author></author> - <comment>********************************************************************* -** -** 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$ -** -*********************************************************************</comment> +<comment> +* Copyright (C) 2016 The Qt Company Ltd. +* SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +</comment> <exportmacro></exportmacro> <class>HelpDialog</class> <widget class="QWidget" name="HelpDialog" > @@ -57,6 +33,9 @@ <string>Displays help topics organized by category, index or bookmarks. Another tab inherits the full text search.</string> </property> <widget class="QWidget" name="contentPage" > + <attribute name="icon"> + <iconset theme="edit-copy"/> + </attribute> <attribute name="title" > <string>Con&tents</string> </attribute> @@ -176,7 +155,7 @@ <enum>Qt::Horizontal</enum> </property> <property name="sizeType" > - <enum>QSizePolicy::Expanding</enum> + <enum>QSizePolicy::Policy::Expanding</enum> </property> <property name="sizeHint" > <size> @@ -233,7 +212,7 @@ <enum>Qt::Vertical</enum> </property> <property name="sizeType" > - <enum>QSizePolicy::Fixed</enum> + <enum>QSizePolicy::Policy::Fixed</enum> </property> <property name="sizeHint" > <size> @@ -310,7 +289,7 @@ <enum>Qt::Horizontal</enum> </property> <property name="sizeType" > - <enum>QSizePolicy::Expanding</enum> + <enum>QSizePolicy::Policy::Expanding</enum> </property> <property name="sizeHint" > <size> diff --git a/tests/auto/tools/uic/baseline/helpdialog.ui.h b/tests/auto/tools/uic/baseline/helpdialog.ui.h index abcf280cf9..6190d6bcba 100644 --- a/tests/auto/tools/uic/baseline/helpdialog.ui.h +++ b/tests/auto/tools/uic/baseline/helpdialog.ui.h @@ -1,37 +1,14 @@ /* -********************************************************************* -** -** 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$ -** -********************************************************************* + +* Copyright (C) 2016 The Qt Company Ltd. +* SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + */ /******************************************************************************** ** Form generated from reading UI file 'helpdialog.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -98,68 +75,69 @@ public: void setupUi(QWidget *HelpDialog) { if (HelpDialog->objectName().isEmpty()) - HelpDialog->setObjectName(QString::fromUtf8("HelpDialog")); + HelpDialog->setObjectName("HelpDialog"); HelpDialog->resize(274, 417); vboxLayout = new QVBoxLayout(HelpDialog); #ifndef Q_OS_MAC vboxLayout->setSpacing(6); #endif vboxLayout->setContentsMargins(0, 0, 0, 0); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); tabWidget = new QTabWidget(HelpDialog); - tabWidget->setObjectName(QString::fromUtf8("tabWidget")); + tabWidget->setObjectName("tabWidget"); contentPage = new QWidget(); - contentPage->setObjectName(QString::fromUtf8("contentPage")); + contentPage->setObjectName("contentPage"); vboxLayout1 = new QVBoxLayout(contentPage); #ifndef Q_OS_MAC vboxLayout1->setSpacing(6); #endif vboxLayout1->setContentsMargins(5, 5, 5, 5); - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName("vboxLayout1"); listContents = new QTreeWidget(contentPage); - listContents->setObjectName(QString::fromUtf8("listContents")); + listContents->setObjectName("listContents"); listContents->setContextMenuPolicy(Qt::CustomContextMenu); listContents->setRootIsDecorated(true); listContents->setUniformRowHeights(true); vboxLayout1->addWidget(listContents); - tabWidget->addTab(contentPage, QString()); + QIcon icon(QIcon::fromTheme(QString::fromUtf8("edit-copy"))); + tabWidget->addTab(contentPage, icon, QString()); indexPage = new QWidget(); - indexPage->setObjectName(QString::fromUtf8("indexPage")); + indexPage->setObjectName("indexPage"); vboxLayout2 = new QVBoxLayout(indexPage); #ifndef Q_OS_MAC vboxLayout2->setSpacing(6); #endif vboxLayout2->setContentsMargins(5, 5, 5, 5); - vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2")); + vboxLayout2->setObjectName("vboxLayout2"); TextLabel1 = new QLabel(indexPage); - TextLabel1->setObjectName(QString::fromUtf8("TextLabel1")); + TextLabel1->setObjectName("TextLabel1"); vboxLayout2->addWidget(TextLabel1); editIndex = new QLineEdit(indexPage); - editIndex->setObjectName(QString::fromUtf8("editIndex")); + editIndex->setObjectName("editIndex"); vboxLayout2->addWidget(editIndex); listIndex = new QListView(indexPage); - listIndex->setObjectName(QString::fromUtf8("listIndex")); + listIndex->setObjectName("listIndex"); listIndex->setContextMenuPolicy(Qt::CustomContextMenu); vboxLayout2->addWidget(listIndex); tabWidget->addTab(indexPage, QString()); bookmarkPage = new QWidget(); - bookmarkPage->setObjectName(QString::fromUtf8("bookmarkPage")); + bookmarkPage->setObjectName("bookmarkPage"); vboxLayout3 = new QVBoxLayout(bookmarkPage); #ifndef Q_OS_MAC vboxLayout3->setSpacing(6); #endif vboxLayout3->setContentsMargins(5, 5, 5, 5); - vboxLayout3->setObjectName(QString::fromUtf8("vboxLayout3")); + vboxLayout3->setObjectName("vboxLayout3"); listBookmarks = new QTreeWidget(bookmarkPage); - listBookmarks->setObjectName(QString::fromUtf8("listBookmarks")); + listBookmarks->setObjectName("listBookmarks"); listBookmarks->setContextMenuPolicy(Qt::CustomContextMenu); listBookmarks->setUniformRowHeights(true); @@ -170,18 +148,18 @@ public: hboxLayout->setSpacing(6); #endif hboxLayout->setContentsMargins(0, 0, 0, 0); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); - spacerItem = new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + hboxLayout->setObjectName("hboxLayout"); + spacerItem = new QSpacerItem(20, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); hboxLayout->addItem(spacerItem); buttonAdd = new QPushButton(bookmarkPage); - buttonAdd->setObjectName(QString::fromUtf8("buttonAdd")); + buttonAdd->setObjectName("buttonAdd"); hboxLayout->addWidget(buttonAdd); buttonRemove = new QPushButton(bookmarkPage); - buttonRemove->setObjectName(QString::fromUtf8("buttonRemove")); + buttonRemove->setObjectName("buttonRemove"); hboxLayout->addWidget(buttonRemove); @@ -190,35 +168,35 @@ public: tabWidget->addTab(bookmarkPage, QString()); searchPage = new QWidget(); - searchPage->setObjectName(QString::fromUtf8("searchPage")); + searchPage->setObjectName("searchPage"); gridLayout = new QGridLayout(searchPage); #ifndef Q_OS_MAC gridLayout->setSpacing(6); #endif gridLayout->setContentsMargins(5, 5, 5, 5); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); - spacerItem1 = new QSpacerItem(20, 20, QSizePolicy::Minimum, QSizePolicy::Fixed); + gridLayout->setObjectName("gridLayout"); + spacerItem1 = new QSpacerItem(20, 20, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Fixed); gridLayout->addItem(spacerItem1, 3, 0, 1, 1); TextLabel1_2 = new QLabel(searchPage); - TextLabel1_2->setObjectName(QString::fromUtf8("TextLabel1_2")); + TextLabel1_2->setObjectName("TextLabel1_2"); gridLayout->addWidget(TextLabel1_2, 0, 0, 1, 1); termsEdit = new QLineEdit(searchPage); - termsEdit->setObjectName(QString::fromUtf8("termsEdit")); + termsEdit->setObjectName("termsEdit"); gridLayout->addWidget(termsEdit, 1, 0, 1, 1); resultBox = new QListWidget(searchPage); - resultBox->setObjectName(QString::fromUtf8("resultBox")); + resultBox->setObjectName("resultBox"); resultBox->setContextMenuPolicy(Qt::CustomContextMenu); gridLayout->addWidget(resultBox, 5, 0, 1, 1); TextLabel2 = new QLabel(searchPage); - TextLabel2->setObjectName(QString::fromUtf8("TextLabel2")); + TextLabel2->setObjectName("TextLabel2"); gridLayout->addWidget(TextLabel2, 4, 0, 1, 1); @@ -227,18 +205,18 @@ public: hboxLayout1->setSpacing(6); #endif hboxLayout1->setContentsMargins(1, 1, 1, 1); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName("hboxLayout1"); helpButton = new QPushButton(searchPage); - helpButton->setObjectName(QString::fromUtf8("helpButton")); + helpButton->setObjectName("helpButton"); hboxLayout1->addWidget(helpButton); - spacerItem2 = new QSpacerItem(61, 21, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacerItem2 = new QSpacerItem(61, 21, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); hboxLayout1->addItem(spacerItem2); searchButton = new QPushButton(searchPage); - searchButton->setObjectName(QString::fromUtf8("searchButton")); + searchButton->setObjectName("searchButton"); searchButton->setEnabled(false); hboxLayout1->addWidget(searchButton); @@ -251,7 +229,7 @@ public: vboxLayout->addWidget(tabWidget); framePrepare = new QFrame(HelpDialog); - framePrepare->setObjectName(QString::fromUtf8("framePrepare")); + framePrepare->setObjectName("framePrepare"); framePrepare->setFrameShape(QFrame::StyledPanel); framePrepare->setFrameShadow(QFrame::Raised); hboxLayout2 = new QHBoxLayout(framePrepare); @@ -259,25 +237,25 @@ public: hboxLayout2->setSpacing(6); #endif hboxLayout2->setContentsMargins(3, 3, 3, 3); - hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2")); + hboxLayout2->setObjectName("hboxLayout2"); labelPrepare = new QLabel(framePrepare); - labelPrepare->setObjectName(QString::fromUtf8("labelPrepare")); + labelPrepare->setObjectName("labelPrepare"); hboxLayout2->addWidget(labelPrepare); progressPrepare = new QProgressBar(framePrepare); - progressPrepare->setObjectName(QString::fromUtf8("progressPrepare")); + progressPrepare->setObjectName("progressPrepare"); hboxLayout2->addWidget(progressPrepare); vboxLayout->addWidget(framePrepare); -#ifndef QT_NO_SHORTCUT +#if QT_CONFIG(shortcut) TextLabel1->setBuddy(editIndex); TextLabel1_2->setBuddy(termsEdit); TextLabel2->setBuddy(resultBox); -#endif // QT_NO_SHORTCUT +#endif // QT_CONFIG(shortcut) QWidget::setTabOrder(tabWidget, listContents); QWidget::setTabOrder(listContents, editIndex); QWidget::setTabOrder(editIndex, listIndex); @@ -296,77 +274,77 @@ public: void retranslateUi(QWidget *HelpDialog) { - HelpDialog->setWindowTitle(QApplication::translate("HelpDialog", "Help", nullptr)); -#ifndef QT_NO_WHATSTHIS - HelpDialog->setWhatsThis(QApplication::translate("HelpDialog", "<b>Help</b><p>Choose the topic you want help on from the contents list, or search the index for keywords.</p>", nullptr)); -#endif // QT_NO_WHATSTHIS -#ifndef QT_NO_WHATSTHIS - tabWidget->setWhatsThis(QApplication::translate("HelpDialog", "Displays help topics organized by category, index or bookmarks. Another tab inherits the full text search.", nullptr)); -#endif // QT_NO_WHATSTHIS + HelpDialog->setWindowTitle(QCoreApplication::translate("HelpDialog", "Help", nullptr)); +#if QT_CONFIG(whatsthis) + HelpDialog->setWhatsThis(QCoreApplication::translate("HelpDialog", "<b>Help</b><p>Choose the topic you want help on from the contents list, or search the index for keywords.</p>", nullptr)); +#endif // QT_CONFIG(whatsthis) +#if QT_CONFIG(whatsthis) + tabWidget->setWhatsThis(QCoreApplication::translate("HelpDialog", "Displays help topics organized by category, index or bookmarks. Another tab inherits the full text search.", nullptr)); +#endif // QT_CONFIG(whatsthis) QTreeWidgetItem *___qtreewidgetitem = listContents->headerItem(); - ___qtreewidgetitem->setText(0, QApplication::translate("HelpDialog", "column 1", nullptr)); -#ifndef QT_NO_WHATSTHIS - listContents->setWhatsThis(QApplication::translate("HelpDialog", "<b>Help topics organized by category.</b><p>Double-click an item to see the topics in that category. To view a topic, just double-click it.</p>", nullptr)); -#endif // QT_NO_WHATSTHIS - tabWidget->setTabText(tabWidget->indexOf(contentPage), QApplication::translate("HelpDialog", "Con&tents", nullptr)); - TextLabel1->setText(QApplication::translate("HelpDialog", "&Look For:", nullptr)); -#ifndef QT_NO_TOOLTIP - editIndex->setToolTip(QApplication::translate("HelpDialog", "Enter keyword", nullptr)); -#endif // QT_NO_TOOLTIP -#ifndef QT_NO_WHATSTHIS - editIndex->setWhatsThis(QApplication::translate("HelpDialog", "<b>Enter a keyword.</b><p>The list will select an item that matches the entered string best.</p>", nullptr)); -#endif // QT_NO_WHATSTHIS -#ifndef QT_NO_WHATSTHIS - listIndex->setWhatsThis(QApplication::translate("HelpDialog", "<b>List of available help topics.</b><p>Double-click on an item to open its help page. If more than one is found, you must specify which page you want.</p>", nullptr)); -#endif // QT_NO_WHATSTHIS - tabWidget->setTabText(tabWidget->indexOf(indexPage), QApplication::translate("HelpDialog", "&Index", nullptr)); + ___qtreewidgetitem->setText(0, QCoreApplication::translate("HelpDialog", "column 1", nullptr)); +#if QT_CONFIG(whatsthis) + listContents->setWhatsThis(QCoreApplication::translate("HelpDialog", "<b>Help topics organized by category.</b><p>Double-click an item to see the topics in that category. To view a topic, just double-click it.</p>", nullptr)); +#endif // QT_CONFIG(whatsthis) + tabWidget->setTabText(tabWidget->indexOf(contentPage), QCoreApplication::translate("HelpDialog", "Con&tents", nullptr)); + TextLabel1->setText(QCoreApplication::translate("HelpDialog", "&Look For:", nullptr)); +#if QT_CONFIG(tooltip) + editIndex->setToolTip(QCoreApplication::translate("HelpDialog", "Enter keyword", nullptr)); +#endif // QT_CONFIG(tooltip) +#if QT_CONFIG(whatsthis) + editIndex->setWhatsThis(QCoreApplication::translate("HelpDialog", "<b>Enter a keyword.</b><p>The list will select an item that matches the entered string best.</p>", nullptr)); +#endif // QT_CONFIG(whatsthis) +#if QT_CONFIG(whatsthis) + listIndex->setWhatsThis(QCoreApplication::translate("HelpDialog", "<b>List of available help topics.</b><p>Double-click on an item to open its help page. If more than one is found, you must specify which page you want.</p>", nullptr)); +#endif // QT_CONFIG(whatsthis) + tabWidget->setTabText(tabWidget->indexOf(indexPage), QCoreApplication::translate("HelpDialog", "&Index", nullptr)); QTreeWidgetItem *___qtreewidgetitem1 = listBookmarks->headerItem(); - ___qtreewidgetitem1->setText(0, QApplication::translate("HelpDialog", "column 1", nullptr)); -#ifndef QT_NO_WHATSTHIS - listBookmarks->setWhatsThis(QApplication::translate("HelpDialog", "Displays the list of bookmarks.", nullptr)); -#endif // QT_NO_WHATSTHIS -#ifndef QT_NO_TOOLTIP - buttonAdd->setToolTip(QApplication::translate("HelpDialog", "Add new bookmark", nullptr)); -#endif // QT_NO_TOOLTIP -#ifndef QT_NO_WHATSTHIS - buttonAdd->setWhatsThis(QApplication::translate("HelpDialog", "Add the currently displayed page as a new bookmark.", nullptr)); -#endif // QT_NO_WHATSTHIS - buttonAdd->setText(QApplication::translate("HelpDialog", "&New", nullptr)); -#ifndef QT_NO_TOOLTIP - buttonRemove->setToolTip(QApplication::translate("HelpDialog", "Delete bookmark", nullptr)); -#endif // QT_NO_TOOLTIP -#ifndef QT_NO_WHATSTHIS - buttonRemove->setWhatsThis(QApplication::translate("HelpDialog", "Delete the selected bookmark.", nullptr)); -#endif // QT_NO_WHATSTHIS - buttonRemove->setText(QApplication::translate("HelpDialog", "&Delete", nullptr)); - tabWidget->setTabText(tabWidget->indexOf(bookmarkPage), QApplication::translate("HelpDialog", "&Bookmarks", nullptr)); - TextLabel1_2->setText(QApplication::translate("HelpDialog", "Searching f&or:", nullptr)); -#ifndef QT_NO_TOOLTIP - termsEdit->setToolTip(QApplication::translate("HelpDialog", "Enter searchword(s).", nullptr)); -#endif // QT_NO_TOOLTIP -#ifndef QT_NO_WHATSTHIS - termsEdit->setWhatsThis(QApplication::translate("HelpDialog", "<b>Enter search word(s).</b><p>Enter here the word(s) you are looking for. The words may contain wildcards (*). For a sequence of words quote them.</p>", nullptr)); -#endif // QT_NO_WHATSTHIS -#ifndef QT_NO_WHATSTHIS - resultBox->setWhatsThis(QApplication::translate("HelpDialog", "<b>Found documents</b><p>This list contains all found documents from the last search. The documents are ordered, i.e. the first document has the most matches.</p>", nullptr)); -#endif // QT_NO_WHATSTHIS - TextLabel2->setText(QApplication::translate("HelpDialog", "Found &Documents:", nullptr)); -#ifndef QT_NO_TOOLTIP - helpButton->setToolTip(QApplication::translate("HelpDialog", "Display the help page.", nullptr)); -#endif // QT_NO_TOOLTIP -#ifndef QT_NO_WHATSTHIS - helpButton->setWhatsThis(QApplication::translate("HelpDialog", "Display the help page for the full text search.", nullptr)); -#endif // QT_NO_WHATSTHIS - helpButton->setText(QApplication::translate("HelpDialog", "He&lp", nullptr)); -#ifndef QT_NO_TOOLTIP - searchButton->setToolTip(QApplication::translate("HelpDialog", "Start searching.", nullptr)); -#endif // QT_NO_TOOLTIP -#ifndef QT_NO_WHATSTHIS - searchButton->setWhatsThis(QApplication::translate("HelpDialog", "Pressing this button starts the search.", nullptr)); -#endif // QT_NO_WHATSTHIS - searchButton->setText(QApplication::translate("HelpDialog", "&Search", nullptr)); - tabWidget->setTabText(tabWidget->indexOf(searchPage), QApplication::translate("HelpDialog", "&Search", nullptr)); - labelPrepare->setText(QApplication::translate("HelpDialog", "Preparing...", nullptr)); + ___qtreewidgetitem1->setText(0, QCoreApplication::translate("HelpDialog", "column 1", nullptr)); +#if QT_CONFIG(whatsthis) + listBookmarks->setWhatsThis(QCoreApplication::translate("HelpDialog", "Displays the list of bookmarks.", nullptr)); +#endif // QT_CONFIG(whatsthis) +#if QT_CONFIG(tooltip) + buttonAdd->setToolTip(QCoreApplication::translate("HelpDialog", "Add new bookmark", nullptr)); +#endif // QT_CONFIG(tooltip) +#if QT_CONFIG(whatsthis) + buttonAdd->setWhatsThis(QCoreApplication::translate("HelpDialog", "Add the currently displayed page as a new bookmark.", nullptr)); +#endif // QT_CONFIG(whatsthis) + buttonAdd->setText(QCoreApplication::translate("HelpDialog", "&New", nullptr)); +#if QT_CONFIG(tooltip) + buttonRemove->setToolTip(QCoreApplication::translate("HelpDialog", "Delete bookmark", nullptr)); +#endif // QT_CONFIG(tooltip) +#if QT_CONFIG(whatsthis) + buttonRemove->setWhatsThis(QCoreApplication::translate("HelpDialog", "Delete the selected bookmark.", nullptr)); +#endif // QT_CONFIG(whatsthis) + buttonRemove->setText(QCoreApplication::translate("HelpDialog", "&Delete", nullptr)); + tabWidget->setTabText(tabWidget->indexOf(bookmarkPage), QCoreApplication::translate("HelpDialog", "&Bookmarks", nullptr)); + TextLabel1_2->setText(QCoreApplication::translate("HelpDialog", "Searching f&or:", nullptr)); +#if QT_CONFIG(tooltip) + termsEdit->setToolTip(QCoreApplication::translate("HelpDialog", "Enter searchword(s).", nullptr)); +#endif // QT_CONFIG(tooltip) +#if QT_CONFIG(whatsthis) + termsEdit->setWhatsThis(QCoreApplication::translate("HelpDialog", "<b>Enter search word(s).</b><p>Enter here the word(s) you are looking for. The words may contain wildcards (*). For a sequence of words quote them.</p>", nullptr)); +#endif // QT_CONFIG(whatsthis) +#if QT_CONFIG(whatsthis) + resultBox->setWhatsThis(QCoreApplication::translate("HelpDialog", "<b>Found documents</b><p>This list contains all found documents from the last search. The documents are ordered, i.e. the first document has the most matches.</p>", nullptr)); +#endif // QT_CONFIG(whatsthis) + TextLabel2->setText(QCoreApplication::translate("HelpDialog", "Found &Documents:", nullptr)); +#if QT_CONFIG(tooltip) + helpButton->setToolTip(QCoreApplication::translate("HelpDialog", "Display the help page.", nullptr)); +#endif // QT_CONFIG(tooltip) +#if QT_CONFIG(whatsthis) + helpButton->setWhatsThis(QCoreApplication::translate("HelpDialog", "Display the help page for the full text search.", nullptr)); +#endif // QT_CONFIG(whatsthis) + helpButton->setText(QCoreApplication::translate("HelpDialog", "He&lp", nullptr)); +#if QT_CONFIG(tooltip) + searchButton->setToolTip(QCoreApplication::translate("HelpDialog", "Start searching.", nullptr)); +#endif // QT_CONFIG(tooltip) +#if QT_CONFIG(whatsthis) + searchButton->setWhatsThis(QCoreApplication::translate("HelpDialog", "Pressing this button starts the search.", nullptr)); +#endif // QT_CONFIG(whatsthis) + searchButton->setText(QCoreApplication::translate("HelpDialog", "&Search", nullptr)); + tabWidget->setTabText(tabWidget->indexOf(searchPage), QCoreApplication::translate("HelpDialog", "&Search", nullptr)); + labelPrepare->setText(QCoreApplication::translate("HelpDialog", "Preparing...", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/history.ui.h b/tests/auto/tools/uic/baseline/history.ui.h index 715312d11a..381c7591dc 100644 --- a/tests/auto/tools/uic/baseline/history.ui.h +++ b/tests/auto/tools/uic/baseline/history.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'history.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -10,6 +10,7 @@ #define HISTORY_H #include <QtCore/QVariant> +#include <QtWidgets/QAbstractButton> #include <QtWidgets/QApplication> #include <QtWidgets/QDialog> #include <QtWidgets/QDialogButtonBox> @@ -39,42 +40,42 @@ public: void setupUi(QDialog *HistoryDialog) { if (HistoryDialog->objectName().isEmpty()) - HistoryDialog->setObjectName(QString::fromUtf8("HistoryDialog")); + HistoryDialog->setObjectName("HistoryDialog"); HistoryDialog->resize(758, 450); gridLayout = new QGridLayout(HistoryDialog); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); - spacerItem = new QSpacerItem(252, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + gridLayout->setObjectName("gridLayout"); + spacerItem = new QSpacerItem(252, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); gridLayout->addItem(spacerItem, 0, 0, 1, 1); search = new SearchLineEdit(HistoryDialog); - search->setObjectName(QString::fromUtf8("search")); + search->setObjectName("search"); gridLayout->addWidget(search, 0, 1, 1, 1); tree = new EditTreeView(HistoryDialog); - tree->setObjectName(QString::fromUtf8("tree")); + tree->setObjectName("tree"); gridLayout->addWidget(tree, 1, 0, 1, 2); hboxLayout = new QHBoxLayout(); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName("hboxLayout"); removeButton = new QPushButton(HistoryDialog); - removeButton->setObjectName(QString::fromUtf8("removeButton")); + removeButton->setObjectName("removeButton"); hboxLayout->addWidget(removeButton); removeAllButton = new QPushButton(HistoryDialog); - removeAllButton->setObjectName(QString::fromUtf8("removeAllButton")); + removeAllButton->setObjectName("removeAllButton"); hboxLayout->addWidget(removeAllButton); - spacerItem1 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacerItem1 = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); hboxLayout->addItem(spacerItem1); buttonBox = new QDialogButtonBox(HistoryDialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName("buttonBox"); buttonBox->setStandardButtons(QDialogButtonBox::Ok); hboxLayout->addWidget(buttonBox); @@ -84,16 +85,16 @@ public: retranslateUi(HistoryDialog); - QObject::connect(buttonBox, SIGNAL(accepted()), HistoryDialog, SLOT(accept())); + QObject::connect(buttonBox, &QDialogButtonBox::accepted, HistoryDialog, qOverload<>(&QDialog::accept)); QMetaObject::connectSlotsByName(HistoryDialog); } // setupUi void retranslateUi(QDialog *HistoryDialog) { - HistoryDialog->setWindowTitle(QApplication::translate("HistoryDialog", "History", nullptr)); - removeButton->setText(QApplication::translate("HistoryDialog", "&Remove", nullptr)); - removeAllButton->setText(QApplication::translate("HistoryDialog", "Remove &All", nullptr)); + HistoryDialog->setWindowTitle(QCoreApplication::translate("HistoryDialog", "History", nullptr)); + removeButton->setText(QCoreApplication::translate("HistoryDialog", "&Remove", nullptr)); + removeAllButton->setText(QCoreApplication::translate("HistoryDialog", "Remove &All", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/icontheme.ui b/tests/auto/tools/uic/baseline/icontheme.ui index a21463561b..328e86602b 100644 --- a/tests/auto/tools/uic/baseline/icontheme.ui +++ b/tests/auto/tools/uic/baseline/icontheme.ui @@ -6,8 +6,8 @@ <rect> <x>0</x> <y>0</y> - <width>122</width> - <height>117</height> + <width>343</width> + <height>478</height> </rect> </property> <property name="windowTitle"> @@ -42,9 +42,28 @@ <string>PushButton</string> </property> <property name="icon"> - <iconset theme="edit-copy"> - <normaloff/> - </iconset> + <iconset theme="edit-copy"/> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="themeenum"> + <property name="text"> + <string>PushButton</string> + </property> + <property name="icon"> + <iconset theme="QIcon::ThemeIcon::EditCopy"/> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="fileandthemeenum"> + <property name="text"> + <string>PushButton</string> + </property> + <property name="icon"> + <iconset theme="QIcon::ThemeIcon::EditCopy"> + <normaloff>image7.png</normaloff>image7.png</iconset> </property> </widget> </item> diff --git a/tests/auto/tools/uic/baseline/icontheme.ui.h b/tests/auto/tools/uic/baseline/icontheme.ui.h index 936d6b5cf7..b3e1e3fa0c 100644 --- a/tests/auto/tools/uic/baseline/icontheme.ui.h +++ b/tests/auto/tools/uic/baseline/icontheme.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'icontheme.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -25,48 +25,63 @@ public: QPushButton *fileicon; QPushButton *fileandthemeicon; QPushButton *themeicon; + QPushButton *themeenum; + QPushButton *fileandthemeenum; void setupUi(QWidget *Form) { if (Form->objectName().isEmpty()) - Form->setObjectName(QString::fromUtf8("Form")); - Form->resize(122, 117); + Form->setObjectName("Form"); + Form->resize(343, 478); verticalLayout = new QVBoxLayout(Form); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + verticalLayout->setObjectName("verticalLayout"); fileicon = new QPushButton(Form); - fileicon->setObjectName(QString::fromUtf8("fileicon")); + fileicon->setObjectName("fileicon"); QIcon icon; - icon.addFile(QString::fromUtf8("image1.png"), QSize(), QIcon::Normal, QIcon::Off); + icon.addFile(QString::fromUtf8("image1.png"), QSize(), QIcon::Mode::Normal, QIcon::State::Off); fileicon->setIcon(icon); verticalLayout->addWidget(fileicon); fileandthemeicon = new QPushButton(Form); - fileandthemeicon->setObjectName(QString::fromUtf8("fileandthemeicon")); + fileandthemeicon->setObjectName("fileandthemeicon"); QIcon icon1; QString iconThemeName = QString::fromUtf8("edit-copy"); if (QIcon::hasThemeIcon(iconThemeName)) { icon1 = QIcon::fromTheme(iconThemeName); } else { - icon1.addFile(QString::fromUtf8("image7.png"), QSize(), QIcon::Normal, QIcon::Off); + icon1.addFile(QString::fromUtf8("image7.png"), QSize(), QIcon::Mode::Normal, QIcon::State::Off); } fileandthemeicon->setIcon(icon1); verticalLayout->addWidget(fileandthemeicon); themeicon = new QPushButton(Form); - themeicon->setObjectName(QString::fromUtf8("themeicon")); - QIcon icon2; - iconThemeName = QString::fromUtf8("edit-copy"); - if (QIcon::hasThemeIcon(iconThemeName)) { - icon2 = QIcon::fromTheme(iconThemeName); - } else { - icon2.addFile(QString::fromUtf8(""), QSize(), QIcon::Normal, QIcon::Off); - } + themeicon->setObjectName("themeicon"); + QIcon icon2(QIcon::fromTheme(QString::fromUtf8("edit-copy"))); themeicon->setIcon(icon2); verticalLayout->addWidget(themeicon); + themeenum = new QPushButton(Form); + themeenum->setObjectName("themeenum"); + QIcon icon3(QIcon::fromTheme(QIcon::ThemeIcon::EditCopy)); + themeenum->setIcon(icon3); + + verticalLayout->addWidget(themeenum); + + fileandthemeenum = new QPushButton(Form); + fileandthemeenum->setObjectName("fileandthemeenum"); + QIcon icon4; + if (QIcon::hasThemeIcon(QIcon::ThemeIcon::EditCopy)) { + icon4 = QIcon::fromTheme(QIcon::ThemeIcon::EditCopy); + } else { + icon4.addFile(QString::fromUtf8("image7.png"), QSize(), QIcon::Mode::Normal, QIcon::State::Off); + } + fileandthemeenum->setIcon(icon4); + + verticalLayout->addWidget(fileandthemeenum); + retranslateUi(Form); @@ -75,10 +90,12 @@ public: void retranslateUi(QWidget *Form) { - Form->setWindowTitle(QApplication::translate("Form", "Form", nullptr)); - fileicon->setText(QApplication::translate("Form", "fileicon", nullptr)); - fileandthemeicon->setText(QApplication::translate("Form", "PushButton", nullptr)); - themeicon->setText(QApplication::translate("Form", "PushButton", nullptr)); + Form->setWindowTitle(QCoreApplication::translate("Form", "Form", nullptr)); + fileicon->setText(QCoreApplication::translate("Form", "fileicon", nullptr)); + fileandthemeicon->setText(QCoreApplication::translate("Form", "PushButton", nullptr)); + themeicon->setText(QCoreApplication::translate("Form", "PushButton", nullptr)); + themeenum->setText(QCoreApplication::translate("Form", "PushButton", nullptr)); + fileandthemeenum->setText(QCoreApplication::translate("Form", "PushButton", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/idbased.ui.h b/tests/auto/tools/uic/baseline/idbased.ui.h index e246313e11..f1138b8c77 100644 --- a/tests/auto/tools/uic/baseline/idbased.ui.h +++ b/tests/auto/tools/uic/baseline/idbased.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'idbased.ui' ** -** Created by: Qt User Interface Compiler version 5.11.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -26,12 +26,12 @@ public: void setupUi(QWidget *Form) { if (Form->objectName().isEmpty()) - Form->setObjectName(QString::fromUtf8("Form")); + Form->setObjectName("Form"); Form->resize(400, 300); verticalLayout = new QVBoxLayout(Form); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + verticalLayout->setObjectName("verticalLayout"); pushButton = new QPushButton(Form); - pushButton->setObjectName(QString::fromUtf8("pushButton")); + pushButton->setObjectName("pushButton"); verticalLayout->addWidget(pushButton); @@ -44,15 +44,15 @@ public: void retranslateUi(QWidget *Form) { Form->setWindowTitle(qtTrId("windowTitleId")); -#ifndef QT_NO_TOOLTIP +#if QT_CONFIG(tooltip) pushButton->setToolTip(qtTrId("buttonToolTipId")); -#endif // QT_NO_TOOLTIP -#ifndef QT_NO_STATUSTIP +#endif // QT_CONFIG(tooltip) +#if QT_CONFIG(statustip) pushButton->setStatusTip(qtTrId("buttonStatusTipId")); -#endif // QT_NO_STATUSTIP -#ifndef QT_NO_WHATSTHIS +#endif // QT_CONFIG(statustip) +#if QT_CONFIG(whatsthis) pushButton->setWhatsThis(qtTrId("buttonWhatsThisId")); -#endif // QT_NO_WHATSTHIS +#endif // QT_CONFIG(whatsthis) pushButton->setText(qtTrId("buttonTextId")); } // retranslateUi diff --git a/tests/auto/tools/uic/baseline/identifierpage.ui b/tests/auto/tools/uic/baseline/identifierpage.ui index cd0df75638..702769540a 100644 --- a/tests/auto/tools/uic/baseline/identifierpage.ui +++ b/tests/auto/tools/uic/baseline/identifierpage.ui @@ -19,7 +19,7 @@ <enum>Qt::Vertical</enum> </property> <property name="sizeType" > - <enum>QSizePolicy::Fixed</enum> + <enum>QSizePolicy::Policy::Fixed</enum> </property> <property name="sizeHint" > <size> @@ -55,7 +55,7 @@ <enum>Qt::Horizontal</enum> </property> <property name="sizeType" > - <enum>QSizePolicy::Fixed</enum> + <enum>QSizePolicy::Policy::Fixed</enum> </property> <property name="sizeHint" > <size> diff --git a/tests/auto/tools/uic/baseline/identifierpage.ui.h b/tests/auto/tools/uic/baseline/identifierpage.ui.h index 322a9cf30a..4cd3f8e7c3 100644 --- a/tests/auto/tools/uic/baseline/identifierpage.ui.h +++ b/tests/auto/tools/uic/baseline/identifierpage.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'identifierpage.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -36,63 +36,63 @@ public: void setupUi(QWidget *IdentifierPage) { if (IdentifierPage->objectName().isEmpty()) - IdentifierPage->setObjectName(QString::fromUtf8("IdentifierPage")); + IdentifierPage->setObjectName("IdentifierPage"); IdentifierPage->resize(417, 242); gridLayout = new QGridLayout(IdentifierPage); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); - spacerItem = new QSpacerItem(20, 20, QSizePolicy::Minimum, QSizePolicy::Fixed); + gridLayout->setObjectName("gridLayout"); + spacerItem = new QSpacerItem(20, 20, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Fixed); gridLayout->addItem(spacerItem, 0, 1, 1, 1); identifierCheckBox = new QCheckBox(IdentifierPage); - identifierCheckBox->setObjectName(QString::fromUtf8("identifierCheckBox")); + identifierCheckBox->setObjectName("identifierCheckBox"); gridLayout->addWidget(identifierCheckBox, 1, 0, 1, 3); - spacerItem1 = new QSpacerItem(161, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacerItem1 = new QSpacerItem(161, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); gridLayout->addItem(spacerItem1, 1, 3, 1, 1); - spacerItem2 = new QSpacerItem(30, 20, QSizePolicy::Fixed, QSizePolicy::Minimum); + spacerItem2 = new QSpacerItem(30, 20, QSizePolicy::Policy::Fixed, QSizePolicy::Policy::Minimum); gridLayout->addItem(spacerItem2, 2, 0, 1, 1); globalButton = new QRadioButton(IdentifierPage); - globalButton->setObjectName(QString::fromUtf8("globalButton")); + globalButton->setObjectName("globalButton"); globalButton->setEnabled(false); globalButton->setChecked(true); gridLayout->addWidget(globalButton, 2, 1, 1, 1); prefixLineEdit = new QLineEdit(IdentifierPage); - prefixLineEdit->setObjectName(QString::fromUtf8("prefixLineEdit")); + prefixLineEdit->setObjectName("prefixLineEdit"); prefixLineEdit->setEnabled(false); gridLayout->addWidget(prefixLineEdit, 2, 2, 1, 1); fileNameButton = new QRadioButton(IdentifierPage); - fileNameButton->setObjectName(QString::fromUtf8("fileNameButton")); + fileNameButton->setObjectName("fileNameButton"); fileNameButton->setEnabled(false); gridLayout->addWidget(fileNameButton, 3, 1, 1, 2); - spacerItem3 = new QSpacerItem(20, 31, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem3 = new QSpacerItem(20, 31, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Expanding); gridLayout->addItem(spacerItem3, 4, 1, 1, 1); retranslateUi(IdentifierPage); - QObject::connect(globalButton, SIGNAL(toggled(bool)), prefixLineEdit, SLOT(setEnabled(bool))); + QObject::connect(globalButton, &QRadioButton::toggled, prefixLineEdit, &QLineEdit::setEnabled); QMetaObject::connectSlotsByName(IdentifierPage); } // setupUi void retranslateUi(QWidget *IdentifierPage) { - IdentifierPage->setWindowTitle(QApplication::translate("IdentifierPage", "Form", nullptr)); - identifierCheckBox->setText(QApplication::translate("IdentifierPage", "Create identifiers", nullptr)); - globalButton->setText(QApplication::translate("IdentifierPage", "Global prefix:", nullptr)); - fileNameButton->setText(QApplication::translate("IdentifierPage", "Inherit prefix from file names", nullptr)); + IdentifierPage->setWindowTitle(QCoreApplication::translate("IdentifierPage", "Form", nullptr)); + identifierCheckBox->setText(QCoreApplication::translate("IdentifierPage", "Create identifiers", nullptr)); + globalButton->setText(QCoreApplication::translate("IdentifierPage", "Global prefix:", nullptr)); + fileNameButton->setText(QCoreApplication::translate("IdentifierPage", "Inherit prefix from file names", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/imagedialog.ui.h b/tests/auto/tools/uic/baseline/imagedialog.ui.h index e32e7639fa..a0b16acb7e 100644 --- a/tests/auto/tools/uic/baseline/imagedialog.ui.h +++ b/tests/auto/tools/uic/baseline/imagedialog.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'imagedialog.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -46,7 +46,7 @@ public: void setupUi(QDialog *dialog) { if (dialog->objectName().isEmpty()) - dialog->setObjectName(QString::fromUtf8("dialog")); + dialog->setObjectName("dialog"); dialog->setObjectName(QString::fromUtf8("ImageDialog")); dialog->resize(320, 180); vboxLayout = new QVBoxLayout(dialog); @@ -56,17 +56,17 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); vboxLayout->setObjectName(QString::fromUtf8("")); gridLayout = new QGridLayout(); #ifndef Q_OS_MAC gridLayout->setSpacing(6); #endif gridLayout->setContentsMargins(1, 1, 1, 1); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); gridLayout->setObjectName(QString::fromUtf8("")); widthLabel = new QLabel(dialog); - widthLabel->setObjectName(QString::fromUtf8("widthLabel")); + widthLabel->setObjectName("widthLabel"); widthLabel->setGeometry(QRect(1, 27, 67, 22)); widthLabel->setFrameShape(QFrame::NoFrame); widthLabel->setFrameShadow(QFrame::Plain); @@ -75,7 +75,7 @@ public: gridLayout->addWidget(widthLabel, 1, 0, 1, 1); heightLabel = new QLabel(dialog); - heightLabel->setObjectName(QString::fromUtf8("heightLabel")); + heightLabel->setObjectName("heightLabel"); heightLabel->setGeometry(QRect(1, 55, 67, 22)); heightLabel->setFrameShape(QFrame::NoFrame); heightLabel->setFrameShadow(QFrame::Plain); @@ -84,9 +84,9 @@ public: gridLayout->addWidget(heightLabel, 2, 0, 1, 1); colorDepthCombo = new QComboBox(dialog); - colorDepthCombo->setObjectName(QString::fromUtf8("colorDepthCombo")); + colorDepthCombo->setObjectName("colorDepthCombo"); colorDepthCombo->setGeometry(QRect(74, 83, 227, 22)); - QSizePolicy sizePolicy(static_cast<QSizePolicy::Policy>(5), static_cast<QSizePolicy::Policy>(0)); + QSizePolicy sizePolicy(QSizePolicy::Policy::Preferred, QSizePolicy::Policy::Fixed); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); sizePolicy.setHeightForWidth(colorDepthCombo->sizePolicy().hasHeightForWidth()); @@ -96,9 +96,9 @@ public: gridLayout->addWidget(colorDepthCombo, 3, 1, 1, 1); nameLineEdit = new QLineEdit(dialog); - nameLineEdit->setObjectName(QString::fromUtf8("nameLineEdit")); + nameLineEdit->setObjectName("nameLineEdit"); nameLineEdit->setGeometry(QRect(74, 83, 227, 22)); - QSizePolicy sizePolicy1(static_cast<QSizePolicy::Policy>(5), static_cast<QSizePolicy::Policy>(0)); + QSizePolicy sizePolicy1(QSizePolicy::Policy::Preferred, QSizePolicy::Policy::Fixed); sizePolicy1.setHorizontalStretch(1); sizePolicy1.setVerticalStretch(0); sizePolicy1.setHeightForWidth(nameLineEdit->sizePolicy().hasHeightForWidth()); @@ -108,7 +108,7 @@ public: gridLayout->addWidget(nameLineEdit, 0, 1, 1, 1); spinBox = new QSpinBox(dialog); - spinBox->setObjectName(QString::fromUtf8("spinBox")); + spinBox->setObjectName("spinBox"); spinBox->setGeometry(QRect(74, 1, 227, 20)); sizePolicy.setHeightForWidth(spinBox->sizePolicy().hasHeightForWidth()); spinBox->setSizePolicy(sizePolicy); @@ -120,7 +120,7 @@ public: gridLayout->addWidget(spinBox, 1, 1, 1, 1); spinBox_2 = new QSpinBox(dialog); - spinBox_2->setObjectName(QString::fromUtf8("spinBox_2")); + spinBox_2->setObjectName("spinBox_2"); spinBox_2->setGeometry(QRect(74, 27, 227, 22)); sizePolicy.setHeightForWidth(spinBox_2->sizePolicy().hasHeightForWidth()); spinBox_2->setSizePolicy(sizePolicy); @@ -132,7 +132,7 @@ public: gridLayout->addWidget(spinBox_2, 2, 1, 1, 1); nameLabel = new QLabel(dialog); - nameLabel->setObjectName(QString::fromUtf8("nameLabel")); + nameLabel->setObjectName("nameLabel"); nameLabel->setGeometry(QRect(1, 1, 67, 20)); nameLabel->setFrameShape(QFrame::NoFrame); nameLabel->setFrameShadow(QFrame::Plain); @@ -141,7 +141,7 @@ public: gridLayout->addWidget(nameLabel, 0, 0, 1, 1); colorDepthLabel = new QLabel(dialog); - colorDepthLabel->setObjectName(QString::fromUtf8("colorDepthLabel")); + colorDepthLabel->setObjectName("colorDepthLabel"); colorDepthLabel->setGeometry(QRect(1, 83, 67, 22)); colorDepthLabel->setFrameShape(QFrame::NoFrame); colorDepthLabel->setFrameShadow(QFrame::Plain); @@ -152,7 +152,7 @@ public: vboxLayout->addLayout(gridLayout); - spacerItem = new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem = new QSpacerItem(0, 0, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Expanding); vboxLayout->addItem(spacerItem); @@ -161,20 +161,20 @@ public: hboxLayout->setSpacing(6); #endif hboxLayout->setContentsMargins(1, 1, 1, 1); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName("hboxLayout"); hboxLayout->setObjectName(QString::fromUtf8("")); - spacerItem1 = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacerItem1 = new QSpacerItem(0, 0, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); hboxLayout->addItem(spacerItem1); okButton = new QPushButton(dialog); - okButton->setObjectName(QString::fromUtf8("okButton")); + okButton->setObjectName("okButton"); okButton->setGeometry(QRect(135, 1, 80, 24)); hboxLayout->addWidget(okButton); cancelButton = new QPushButton(dialog); - cancelButton->setObjectName(QString::fromUtf8("cancelButton")); + cancelButton->setObjectName("cancelButton"); cancelButton->setGeometry(QRect(221, 1, 80, 24)); hboxLayout->addWidget(cancelButton); @@ -189,21 +189,21 @@ public: QWidget::setTabOrder(okButton, cancelButton); retranslateUi(dialog); - QObject::connect(nameLineEdit, SIGNAL(returnPressed()), okButton, SLOT(animateClick())); + QObject::connect(nameLineEdit, &QLineEdit::returnPressed, okButton, qOverload<>(&QPushButton::animateClick)); QMetaObject::connectSlotsByName(dialog); } // setupUi void retranslateUi(QDialog *dialog) { - dialog->setWindowTitle(QApplication::translate("ImageDialog", "Create Image", nullptr)); - widthLabel->setText(QApplication::translate("ImageDialog", "Width:", nullptr)); - heightLabel->setText(QApplication::translate("ImageDialog", "Height:", nullptr)); - nameLineEdit->setText(QApplication::translate("ImageDialog", "Untitled image", nullptr)); - nameLabel->setText(QApplication::translate("ImageDialog", "Name:", nullptr)); - colorDepthLabel->setText(QApplication::translate("ImageDialog", "Color depth:", nullptr)); - okButton->setText(QApplication::translate("ImageDialog", "OK", nullptr)); - cancelButton->setText(QApplication::translate("ImageDialog", "Cancel", nullptr)); + dialog->setWindowTitle(QCoreApplication::translate("ImageDialog", "Create Image", nullptr)); + widthLabel->setText(QCoreApplication::translate("ImageDialog", "Width:", nullptr)); + heightLabel->setText(QCoreApplication::translate("ImageDialog", "Height:", nullptr)); + nameLineEdit->setText(QCoreApplication::translate("ImageDialog", "Untitled image", nullptr)); + nameLabel->setText(QCoreApplication::translate("ImageDialog", "Name:", nullptr)); + colorDepthLabel->setText(QCoreApplication::translate("ImageDialog", "Color depth:", nullptr)); + okButton->setText(QCoreApplication::translate("ImageDialog", "OK", nullptr)); + cancelButton->setText(QCoreApplication::translate("ImageDialog", "Cancel", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/inputpage.ui b/tests/auto/tools/uic/baseline/inputpage.ui index e7cd3a0fad..6c115e1c59 100644 --- a/tests/auto/tools/uic/baseline/inputpage.ui +++ b/tests/auto/tools/uic/baseline/inputpage.ui @@ -19,7 +19,7 @@ <enum>Qt::Vertical</enum> </property> <property name="sizeType" > - <enum>QSizePolicy::Fixed</enum> + <enum>QSizePolicy::Policy::Fixed</enum> </property> <property name="sizeHint" > <size> diff --git a/tests/auto/tools/uic/baseline/inputpage.ui.h b/tests/auto/tools/uic/baseline/inputpage.ui.h index 9367dec6df..1223360f31 100644 --- a/tests/auto/tools/uic/baseline/inputpage.ui.h +++ b/tests/auto/tools/uic/baseline/inputpage.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'inputpage.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -35,17 +35,17 @@ public: void setupUi(QWidget *InputPage) { if (InputPage->objectName().isEmpty()) - InputPage->setObjectName(QString::fromUtf8("InputPage")); + InputPage->setObjectName("InputPage"); InputPage->resize(417, 242); gridLayout = new QGridLayout(InputPage); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); - spacerItem = new QSpacerItem(20, 20, QSizePolicy::Minimum, QSizePolicy::Fixed); + gridLayout->setObjectName("gridLayout"); + spacerItem = new QSpacerItem(20, 20, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Fixed); gridLayout->addItem(spacerItem, 0, 2, 1, 1); label = new QLabel(InputPage); - label->setObjectName(QString::fromUtf8("label")); - QSizePolicy sizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred); + label->setObjectName("label"); + QSizePolicy sizePolicy(QSizePolicy::Policy::Maximum, QSizePolicy::Policy::Preferred); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); sizePolicy.setHeightForWidth(label->sizePolicy().hasHeightForWidth()); @@ -55,21 +55,21 @@ public: hboxLayout = new QHBoxLayout(); hboxLayout->setSpacing(0); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName("hboxLayout"); fileLineEdit = new QLineEdit(InputPage); - fileLineEdit->setObjectName(QString::fromUtf8("fileLineEdit")); + fileLineEdit->setObjectName("fileLineEdit"); hboxLayout->addWidget(fileLineEdit); browseButton = new QToolButton(InputPage); - browseButton->setObjectName(QString::fromUtf8("browseButton")); + browseButton->setObjectName("browseButton"); hboxLayout->addWidget(browseButton); gridLayout->addLayout(hboxLayout, 1, 1, 1, 2); - spacerItem1 = new QSpacerItem(20, 31, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem1 = new QSpacerItem(20, 31, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Expanding); gridLayout->addItem(spacerItem1, 2, 1, 1, 1); @@ -81,9 +81,9 @@ public: void retranslateUi(QWidget *InputPage) { - InputPage->setWindowTitle(QApplication::translate("InputPage", "Form", nullptr)); - label->setText(QApplication::translate("InputPage", "File name:", nullptr)); - browseButton->setText(QApplication::translate("InputPage", "...", nullptr)); + InputPage->setWindowTitle(QCoreApplication::translate("InputPage", "Form", nullptr)); + label->setText(QCoreApplication::translate("InputPage", "File name:", nullptr)); + browseButton->setText(QCoreApplication::translate("InputPage", "...", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/installdialog.ui.h b/tests/auto/tools/uic/baseline/installdialog.ui.h index 3ec7f69b76..edb640f956 100644 --- a/tests/auto/tools/uic/baseline/installdialog.ui.h +++ b/tests/auto/tools/uic/baseline/installdialog.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'installdialog.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -44,68 +44,68 @@ public: void setupUi(QDialog *InstallDialog) { if (InstallDialog->objectName().isEmpty()) - InstallDialog->setObjectName(QString::fromUtf8("InstallDialog")); + InstallDialog->setObjectName("InstallDialog"); InstallDialog->resize(436, 245); gridLayout = new QGridLayout(InstallDialog); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); label = new QLabel(InstallDialog); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName("label"); gridLayout->addWidget(label, 0, 0, 1, 4); listWidget = new QListWidget(InstallDialog); - listWidget->setObjectName(QString::fromUtf8("listWidget")); + listWidget->setObjectName("listWidget"); gridLayout->addWidget(listWidget, 1, 0, 4, 4); installButton = new QPushButton(InstallDialog); - installButton->setObjectName(QString::fromUtf8("installButton")); + installButton->setObjectName("installButton"); gridLayout->addWidget(installButton, 1, 4, 1, 1); cancelButton = new QPushButton(InstallDialog); - cancelButton->setObjectName(QString::fromUtf8("cancelButton")); + cancelButton->setObjectName("cancelButton"); gridLayout->addWidget(cancelButton, 2, 4, 1, 1); closeButton = new QPushButton(InstallDialog); - closeButton->setObjectName(QString::fromUtf8("closeButton")); + closeButton->setObjectName("closeButton"); gridLayout->addWidget(closeButton, 3, 4, 1, 1); - spacerItem = new QSpacerItem(20, 56, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem = new QSpacerItem(20, 56, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Expanding); gridLayout->addItem(spacerItem, 4, 4, 1, 1); label_4 = new QLabel(InstallDialog); - label_4->setObjectName(QString::fromUtf8("label_4")); + label_4->setObjectName("label_4"); gridLayout->addWidget(label_4, 5, 0, 1, 1); pathLineEdit = new QLineEdit(InstallDialog); - pathLineEdit->setObjectName(QString::fromUtf8("pathLineEdit")); + pathLineEdit->setObjectName("pathLineEdit"); gridLayout->addWidget(pathLineEdit, 5, 1, 1, 2); browseButton = new QToolButton(InstallDialog); - browseButton->setObjectName(QString::fromUtf8("browseButton")); + browseButton->setObjectName("browseButton"); gridLayout->addWidget(browseButton, 5, 3, 1, 1); line = new QFrame(InstallDialog); - line->setObjectName(QString::fromUtf8("line")); - line->setFrameShape(QFrame::HLine); - line->setFrameShadow(QFrame::Sunken); + line->setObjectName("line"); + line->setFrameShape(QFrame::Shape::HLine); + line->setFrameShadow(QFrame::Shadow::Sunken); gridLayout->addWidget(line, 6, 0, 1, 5); statusLabel = new QLabel(InstallDialog); - statusLabel->setObjectName(QString::fromUtf8("statusLabel")); + statusLabel->setObjectName("statusLabel"); gridLayout->addWidget(statusLabel, 7, 0, 1, 2); progressBar = new QProgressBar(InstallDialog); - progressBar->setObjectName(QString::fromUtf8("progressBar")); + progressBar->setObjectName("progressBar"); progressBar->setValue(0); progressBar->setOrientation(Qt::Horizontal); @@ -113,20 +113,20 @@ public: retranslateUi(InstallDialog); - QObject::connect(closeButton, SIGNAL(clicked()), InstallDialog, SLOT(accept())); + QObject::connect(closeButton, &QPushButton::clicked, InstallDialog, qOverload<>(&QDialog::accept)); QMetaObject::connectSlotsByName(InstallDialog); } // setupUi void retranslateUi(QDialog *InstallDialog) { - InstallDialog->setWindowTitle(QApplication::translate("InstallDialog", "Install Documentation", nullptr)); - label->setText(QApplication::translate("InstallDialog", "Available Documentation:", nullptr)); - installButton->setText(QApplication::translate("InstallDialog", "Install", nullptr)); - cancelButton->setText(QApplication::translate("InstallDialog", "Cancel", nullptr)); - closeButton->setText(QApplication::translate("InstallDialog", "Close", nullptr)); - label_4->setText(QApplication::translate("InstallDialog", "Installation Path:", nullptr)); - browseButton->setText(QApplication::translate("InstallDialog", "...", nullptr)); + InstallDialog->setWindowTitle(QCoreApplication::translate("InstallDialog", "Install Documentation", nullptr)); + label->setText(QCoreApplication::translate("InstallDialog", "Available Documentation:", nullptr)); + installButton->setText(QCoreApplication::translate("InstallDialog", "Install", nullptr)); + cancelButton->setText(QCoreApplication::translate("InstallDialog", "Cancel", nullptr)); + closeButton->setText(QCoreApplication::translate("InstallDialog", "Close", nullptr)); + label_4->setText(QCoreApplication::translate("InstallDialog", "Installation Path:", nullptr)); + browseButton->setText(QCoreApplication::translate("InstallDialog", "...", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/languagesdialog.ui.h b/tests/auto/tools/uic/baseline/languagesdialog.ui.h index cf2599fd07..d3a927a434 100644 --- a/tests/auto/tools/uic/baseline/languagesdialog.ui.h +++ b/tests/auto/tools/uic/baseline/languagesdialog.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'languagesdialog.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -39,60 +39,60 @@ public: void setupUi(QDialog *LanguagesDialog) { if (LanguagesDialog->objectName().isEmpty()) - LanguagesDialog->setObjectName(QString::fromUtf8("LanguagesDialog")); + LanguagesDialog->setObjectName("LanguagesDialog"); LanguagesDialog->resize(400, 300); verticalLayout = new QVBoxLayout(LanguagesDialog); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + verticalLayout->setObjectName("verticalLayout"); languagesList = new QTreeWidget(LanguagesDialog); - languagesList->setObjectName(QString::fromUtf8("languagesList")); + languagesList->setObjectName("languagesList"); languagesList->setIndentation(0); verticalLayout->addWidget(languagesList); hboxLayout = new QHBoxLayout(); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName("hboxLayout"); upButton = new QToolButton(LanguagesDialog); - upButton->setObjectName(QString::fromUtf8("upButton")); + upButton->setObjectName("upButton"); upButton->setEnabled(false); QIcon icon; - icon.addFile(QString::fromUtf8(":/images/up.png"), QSize(), QIcon::Normal, QIcon::Off); + icon.addFile(QString::fromUtf8(":/images/up.png"), QSize(), QIcon::Mode::Normal, QIcon::State::Off); upButton->setIcon(icon); hboxLayout->addWidget(upButton); downButton = new QToolButton(LanguagesDialog); - downButton->setObjectName(QString::fromUtf8("downButton")); + downButton->setObjectName("downButton"); downButton->setEnabled(false); QIcon icon1; - icon1.addFile(QString::fromUtf8(":/images/down.png"), QSize(), QIcon::Normal, QIcon::Off); + icon1.addFile(QString::fromUtf8(":/images/down.png"), QSize(), QIcon::Mode::Normal, QIcon::State::Off); downButton->setIcon(icon1); hboxLayout->addWidget(downButton); removeButton = new QToolButton(LanguagesDialog); - removeButton->setObjectName(QString::fromUtf8("removeButton")); + removeButton->setObjectName("removeButton"); removeButton->setEnabled(false); QIcon icon2; - icon2.addFile(QString::fromUtf8(":/images/editdelete.png"), QSize(), QIcon::Normal, QIcon::Off); + icon2.addFile(QString::fromUtf8(":/images/editdelete.png"), QSize(), QIcon::Mode::Normal, QIcon::State::Off); removeButton->setIcon(icon2); hboxLayout->addWidget(removeButton); openFileButton = new QToolButton(LanguagesDialog); - openFileButton->setObjectName(QString::fromUtf8("openFileButton")); + openFileButton->setObjectName("openFileButton"); openFileButton->setEnabled(true); QIcon icon3; - icon3.addFile(QString::fromUtf8(":/images/mac/fileopen.png"), QSize(), QIcon::Normal, QIcon::Off); + icon3.addFile(QString::fromUtf8(":/images/mac/fileopen.png"), QSize(), QIcon::Mode::Normal, QIcon::State::Off); openFileButton->setIcon(icon3); hboxLayout->addWidget(openFileButton); - spacerItem = new QSpacerItem(121, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacerItem = new QSpacerItem(121, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); hboxLayout->addItem(spacerItem); okButton = new QPushButton(LanguagesDialog); - okButton->setObjectName(QString::fromUtf8("okButton")); + okButton->setObjectName("okButton"); hboxLayout->addWidget(okButton); @@ -101,46 +101,46 @@ public: retranslateUi(LanguagesDialog); - QObject::connect(okButton, SIGNAL(clicked()), LanguagesDialog, SLOT(accept())); + QObject::connect(okButton, &QPushButton::clicked, LanguagesDialog, qOverload<>(&QDialog::accept)); QMetaObject::connectSlotsByName(LanguagesDialog); } // setupUi void retranslateUi(QDialog *LanguagesDialog) { - LanguagesDialog->setWindowTitle(QApplication::translate("LanguagesDialog", "Auxiliary Languages", nullptr)); + LanguagesDialog->setWindowTitle(QCoreApplication::translate("LanguagesDialog", "Auxiliary Languages", nullptr)); QTreeWidgetItem *___qtreewidgetitem = languagesList->headerItem(); - ___qtreewidgetitem->setText(1, QApplication::translate("LanguagesDialog", "File", nullptr)); - ___qtreewidgetitem->setText(0, QApplication::translate("LanguagesDialog", "Locale", nullptr)); -#ifndef QT_NO_TOOLTIP - upButton->setToolTip(QApplication::translate("LanguagesDialog", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n" + ___qtreewidgetitem->setText(1, QCoreApplication::translate("LanguagesDialog", "File", nullptr)); + ___qtreewidgetitem->setText(0, QCoreApplication::translate("LanguagesDialog", "Locale", nullptr)); +#if QT_CONFIG(tooltip) + upButton->setToolTip(QCoreApplication::translate("LanguagesDialog", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n" "p, li { white-space: pre-wrap; }\n" "</style></head><body style=\" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;\">\n" "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Move selected language up</p></body></html>", nullptr)); -#endif // QT_NO_TOOLTIP - upButton->setText(QApplication::translate("LanguagesDialog", "up", nullptr)); -#ifndef QT_NO_TOOLTIP - downButton->setToolTip(QApplication::translate("LanguagesDialog", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n" +#endif // QT_CONFIG(tooltip) + upButton->setText(QCoreApplication::translate("LanguagesDialog", "up", nullptr)); +#if QT_CONFIG(tooltip) + downButton->setToolTip(QCoreApplication::translate("LanguagesDialog", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n" "p, li { white-space: pre-wrap; }\n" "</style></head><body style=\" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;\">\n" "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;\">Move selected language down</p></body></html>", nullptr)); -#endif // QT_NO_TOOLTIP - downButton->setText(QApplication::translate("LanguagesDialog", "down", nullptr)); -#ifndef QT_NO_TOOLTIP - removeButton->setToolTip(QApplication::translate("LanguagesDialog", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n" +#endif // QT_CONFIG(tooltip) + downButton->setText(QCoreApplication::translate("LanguagesDialog", "down", nullptr)); +#if QT_CONFIG(tooltip) + removeButton->setToolTip(QCoreApplication::translate("LanguagesDialog", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n" "p, li { white-space: pre-wrap; }\n" "</style></head><body style=\" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;\">\n" "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Remove selected language</p></body></html>", nullptr)); -#endif // QT_NO_TOOLTIP - removeButton->setText(QApplication::translate("LanguagesDialog", "remove", nullptr)); -#ifndef QT_NO_TOOLTIP - openFileButton->setToolTip(QApplication::translate("LanguagesDialog", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n" +#endif // QT_CONFIG(tooltip) + removeButton->setText(QCoreApplication::translate("LanguagesDialog", "remove", nullptr)); +#if QT_CONFIG(tooltip) + openFileButton->setToolTip(QCoreApplication::translate("LanguagesDialog", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n" "p, li { white-space: pre-wrap; }\n" "</style></head><body style=\" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;\">\n" "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Open auxiliary language files</p></body></html>", nullptr)); -#endif // QT_NO_TOOLTIP - openFileButton->setText(QApplication::translate("LanguagesDialog", "...", nullptr)); - okButton->setText(QApplication::translate("LanguagesDialog", "OK", nullptr)); +#endif // QT_CONFIG(tooltip) + openFileButton->setText(QCoreApplication::translate("LanguagesDialog", "...", nullptr)); + okButton->setText(QCoreApplication::translate("LanguagesDialog", "OK", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/listwidgeteditor.ui b/tests/auto/tools/uic/baseline/listwidgeteditor.ui index 239923d528..e9bc8b2c94 100644 --- a/tests/auto/tools/uic/baseline/listwidgeteditor.ui +++ b/tests/auto/tools/uic/baseline/listwidgeteditor.ui @@ -1,31 +1,8 @@ <ui version="4.0" > - <comment>********************************************************************* -** -** 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$ -** -*********************************************************************</comment> +<comment> +* Copyright (C) 2016 The Qt Company Ltd. +* SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +</comment> <class>qdesigner_internal::ListWidgetEditor</class> <widget class="QDialog" name="qdesigner_internal::ListWidgetEditor" > <property name="geometry" > diff --git a/tests/auto/tools/uic/baseline/listwidgeteditor.ui.h b/tests/auto/tools/uic/baseline/listwidgeteditor.ui.h index 14067ced18..8a3247e1eb 100644 --- a/tests/auto/tools/uic/baseline/listwidgeteditor.ui.h +++ b/tests/auto/tools/uic/baseline/listwidgeteditor.ui.h @@ -1,37 +1,14 @@ /* -********************************************************************* -** -** 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$ -** -********************************************************************* + +* Copyright (C) 2016 The Qt Company Ltd. +* SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + */ /******************************************************************************** ** Form generated from reading UI file 'listwidgeteditor.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -40,6 +17,7 @@ #define LISTWIDGETEDITOR_H #include <QtCore/QVariant> +#include <QtWidgets/QAbstractButton> #include <QtWidgets/QApplication> #include <QtWidgets/QDialog> #include <QtWidgets/QDialogButtonBox> @@ -79,7 +57,7 @@ public: void setupUi(QDialog *qdesigner_internal__ListWidgetEditor) { if (qdesigner_internal__ListWidgetEditor->objectName().isEmpty()) - qdesigner_internal__ListWidgetEditor->setObjectName(QString::fromUtf8("qdesigner_internal__ListWidgetEditor")); + qdesigner_internal__ListWidgetEditor->setObjectName("qdesigner_internal__ListWidgetEditor"); qdesigner_internal__ListWidgetEditor->resize(223, 245); vboxLayout = new QVBoxLayout(qdesigner_internal__ListWidgetEditor); #ifndef Q_OS_MAC @@ -88,39 +66,39 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); groupBox = new QGroupBox(qdesigner_internal__ListWidgetEditor); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName("groupBox"); gridLayout = new QGridLayout(groupBox); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); listWidget = new QListWidget(groupBox); - listWidget->setObjectName(QString::fromUtf8("listWidget")); + listWidget->setObjectName("listWidget"); gridLayout->addWidget(listWidget, 0, 0, 1, 1); horizontalLayout_2 = new QHBoxLayout(); - horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2")); + horizontalLayout_2->setObjectName("horizontalLayout_2"); newItemButton = new QToolButton(groupBox); - newItemButton->setObjectName(QString::fromUtf8("newItemButton")); + newItemButton->setObjectName("newItemButton"); horizontalLayout_2->addWidget(newItemButton); deleteItemButton = new QToolButton(groupBox); - deleteItemButton->setObjectName(QString::fromUtf8("deleteItemButton")); + deleteItemButton->setObjectName("deleteItemButton"); horizontalLayout_2->addWidget(deleteItemButton); - spacerItem = new QSpacerItem(16, 10, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacerItem = new QSpacerItem(16, 10, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); horizontalLayout_2->addItem(spacerItem); moveItemUpButton = new QToolButton(groupBox); - moveItemUpButton->setObjectName(QString::fromUtf8("moveItemUpButton")); + moveItemUpButton->setObjectName("moveItemUpButton"); horizontalLayout_2->addWidget(moveItemUpButton); moveItemDownButton = new QToolButton(groupBox); - moveItemDownButton->setObjectName(QString::fromUtf8("moveItemDownButton")); + moveItemDownButton->setObjectName("moveItemDownButton"); horizontalLayout_2->addWidget(moveItemDownButton); @@ -128,18 +106,18 @@ public: gridLayout->addLayout(horizontalLayout_2, 1, 0, 1, 1); horizontalLayout = new QHBoxLayout(); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); + horizontalLayout->setObjectName("horizontalLayout"); label = new QLabel(groupBox); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName("label"); horizontalLayout->addWidget(label); itemIconSelector = new qdesigner_internal::IconSelector(groupBox); - itemIconSelector->setObjectName(QString::fromUtf8("itemIconSelector")); + itemIconSelector->setObjectName("itemIconSelector"); horizontalLayout->addWidget(itemIconSelector); - horizontalSpacer = new QSpacerItem(108, 21, QSizePolicy::Expanding, QSizePolicy::Minimum); + horizontalSpacer = new QSpacerItem(108, 21, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); horizontalLayout->addItem(horizontalSpacer); @@ -150,7 +128,7 @@ public: vboxLayout->addWidget(groupBox); buttonBox = new QDialogButtonBox(qdesigner_internal__ListWidgetEditor); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName("buttonBox"); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); @@ -164,36 +142,36 @@ public: QWidget::setTabOrder(moveItemUpButton, moveItemDownButton); retranslateUi(qdesigner_internal__ListWidgetEditor); - QObject::connect(buttonBox, SIGNAL(accepted()), qdesigner_internal__ListWidgetEditor, SLOT(accept())); - QObject::connect(buttonBox, SIGNAL(rejected()), qdesigner_internal__ListWidgetEditor, SLOT(reject())); + QObject::connect(buttonBox, &QDialogButtonBox::accepted, qdesigner_internal__ListWidgetEditor, qOverload<>(&QDialog::accept)); + QObject::connect(buttonBox, &QDialogButtonBox::rejected, qdesigner_internal__ListWidgetEditor, qOverload<>(&QDialog::reject)); QMetaObject::connectSlotsByName(qdesigner_internal__ListWidgetEditor); } // setupUi void retranslateUi(QDialog *qdesigner_internal__ListWidgetEditor) { - qdesigner_internal__ListWidgetEditor->setWindowTitle(QApplication::translate("qdesigner_internal::ListWidgetEditor", "Dialog", nullptr)); - groupBox->setTitle(QApplication::translate("qdesigner_internal::ListWidgetEditor", "Items List", nullptr)); -#ifndef QT_NO_TOOLTIP - listWidget->setToolTip(QApplication::translate("qdesigner_internal::ListWidgetEditor", "Items List", nullptr)); -#endif // QT_NO_TOOLTIP -#ifndef QT_NO_TOOLTIP - newItemButton->setToolTip(QApplication::translate("qdesigner_internal::ListWidgetEditor", "New Item", nullptr)); -#endif // QT_NO_TOOLTIP - newItemButton->setText(QApplication::translate("qdesigner_internal::ListWidgetEditor", "&New", nullptr)); -#ifndef QT_NO_TOOLTIP - deleteItemButton->setToolTip(QApplication::translate("qdesigner_internal::ListWidgetEditor", "Delete Item", nullptr)); -#endif // QT_NO_TOOLTIP - deleteItemButton->setText(QApplication::translate("qdesigner_internal::ListWidgetEditor", "&Delete", nullptr)); -#ifndef QT_NO_TOOLTIP - moveItemUpButton->setToolTip(QApplication::translate("qdesigner_internal::ListWidgetEditor", "Move Item Up", nullptr)); -#endif // QT_NO_TOOLTIP - moveItemUpButton->setText(QApplication::translate("qdesigner_internal::ListWidgetEditor", "U", nullptr)); -#ifndef QT_NO_TOOLTIP - moveItemDownButton->setToolTip(QApplication::translate("qdesigner_internal::ListWidgetEditor", "Move Item Down", nullptr)); -#endif // QT_NO_TOOLTIP - moveItemDownButton->setText(QApplication::translate("qdesigner_internal::ListWidgetEditor", "D", nullptr)); - label->setText(QApplication::translate("qdesigner_internal::ListWidgetEditor", "Icon", nullptr)); + qdesigner_internal__ListWidgetEditor->setWindowTitle(QCoreApplication::translate("qdesigner_internal::ListWidgetEditor", "Dialog", nullptr)); + groupBox->setTitle(QCoreApplication::translate("qdesigner_internal::ListWidgetEditor", "Items List", nullptr)); +#if QT_CONFIG(tooltip) + listWidget->setToolTip(QCoreApplication::translate("qdesigner_internal::ListWidgetEditor", "Items List", nullptr)); +#endif // QT_CONFIG(tooltip) +#if QT_CONFIG(tooltip) + newItemButton->setToolTip(QCoreApplication::translate("qdesigner_internal::ListWidgetEditor", "New Item", nullptr)); +#endif // QT_CONFIG(tooltip) + newItemButton->setText(QCoreApplication::translate("qdesigner_internal::ListWidgetEditor", "&New", nullptr)); +#if QT_CONFIG(tooltip) + deleteItemButton->setToolTip(QCoreApplication::translate("qdesigner_internal::ListWidgetEditor", "Delete Item", nullptr)); +#endif // QT_CONFIG(tooltip) + deleteItemButton->setText(QCoreApplication::translate("qdesigner_internal::ListWidgetEditor", "&Delete", nullptr)); +#if QT_CONFIG(tooltip) + moveItemUpButton->setToolTip(QCoreApplication::translate("qdesigner_internal::ListWidgetEditor", "Move Item Up", nullptr)); +#endif // QT_CONFIG(tooltip) + moveItemUpButton->setText(QCoreApplication::translate("qdesigner_internal::ListWidgetEditor", "U", nullptr)); +#if QT_CONFIG(tooltip) + moveItemDownButton->setToolTip(QCoreApplication::translate("qdesigner_internal::ListWidgetEditor", "Move Item Down", nullptr)); +#endif // QT_CONFIG(tooltip) + moveItemDownButton->setText(QCoreApplication::translate("qdesigner_internal::ListWidgetEditor", "D", nullptr)); + label->setText(QCoreApplication::translate("qdesigner_internal::ListWidgetEditor", "Icon", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/mainwindow.ui.h b/tests/auto/tools/uic/baseline/mainwindow.ui.h index fe84d0baa3..13cba301bd 100644 --- a/tests/auto/tools/uic/baseline/mainwindow.ui.h +++ b/tests/auto/tools/uic/baseline/mainwindow.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'mainwindow.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -10,7 +10,7 @@ #define MAINWINDOW_H #include <QtCore/QVariant> -#include <QtWidgets/QAction> +#include <QtGui/QAction> #include <QtWidgets/QApplication> #include <QtWidgets/QCheckBox> #include <QtWidgets/QComboBox> @@ -86,14 +86,14 @@ public: void setupUi(QMainWindow *MainWindow) { if (MainWindow->objectName().isEmpty()) - MainWindow->setObjectName(QString::fromUtf8("MainWindow")); + MainWindow->setObjectName("MainWindow"); MainWindow->resize(829, 813); actionAdd_Custom_Font = new QAction(MainWindow); - actionAdd_Custom_Font->setObjectName(QString::fromUtf8("actionAdd_Custom_Font")); + actionAdd_Custom_Font->setObjectName("actionAdd_Custom_Font"); action_Exit = new QAction(MainWindow); - action_Exit->setObjectName(QString::fromUtf8("action_Exit")); + action_Exit->setObjectName("action_Exit"); centralwidget = new QWidget(MainWindow); - centralwidget->setObjectName(QString::fromUtf8("centralwidget")); + centralwidget->setObjectName("centralwidget"); vboxLayout = new QVBoxLayout(centralwidget); #ifndef Q_OS_MAC vboxLayout->setSpacing(6); @@ -101,9 +101,9 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); groupBox = new QGroupBox(centralwidget); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName("groupBox"); hboxLayout = new QHBoxLayout(groupBox); #ifndef Q_OS_MAC hboxLayout->setSpacing(6); @@ -111,44 +111,44 @@ public: #ifndef Q_OS_MAC hboxLayout->setContentsMargins(9, 9, 9, 9); #endif - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName("hboxLayout"); label = new QLabel(groupBox); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName("label"); hboxLayout->addWidget(label); fontComboBox = new QFontComboBox(groupBox); - fontComboBox->setObjectName(QString::fromUtf8("fontComboBox")); + fontComboBox->setObjectName("fontComboBox"); hboxLayout->addWidget(fontComboBox); label_2 = new QLabel(groupBox); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName("label_2"); hboxLayout->addWidget(label_2); pixelSize = new QSpinBox(groupBox); - pixelSize->setObjectName(QString::fromUtf8("pixelSize")); + pixelSize->setObjectName("pixelSize"); pixelSize->setMinimum(1); hboxLayout->addWidget(pixelSize); label_7 = new QLabel(groupBox); - label_7->setObjectName(QString::fromUtf8("label_7")); + label_7->setObjectName("label_7"); hboxLayout->addWidget(label_7); weightCombo = new QComboBox(groupBox); - weightCombo->setObjectName(QString::fromUtf8("weightCombo")); + weightCombo->setObjectName("weightCombo"); hboxLayout->addWidget(weightCombo); italic = new QCheckBox(groupBox); - italic->setObjectName(QString::fromUtf8("italic")); + italic->setObjectName("italic"); hboxLayout->addWidget(italic); - spacerItem = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacerItem = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); hboxLayout->addItem(spacerItem); @@ -156,7 +156,7 @@ public: vboxLayout->addWidget(groupBox); groupBox_2 = new QGroupBox(centralwidget); - groupBox_2->setObjectName(QString::fromUtf8("groupBox_2")); + groupBox_2->setObjectName("groupBox_2"); vboxLayout1 = new QVBoxLayout(groupBox_2); #ifndef Q_OS_MAC vboxLayout1->setSpacing(6); @@ -164,9 +164,9 @@ public: #ifndef Q_OS_MAC vboxLayout1->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName("vboxLayout1"); chooseFromCodePoints = new QRadioButton(groupBox_2); - chooseFromCodePoints->setObjectName(QString::fromUtf8("chooseFromCodePoints")); + chooseFromCodePoints->setObjectName("chooseFromCodePoints"); chooseFromCodePoints->setChecked(true); vboxLayout1->addWidget(chooseFromCodePoints); @@ -176,9 +176,9 @@ public: vboxLayout2->setSpacing(6); #endif vboxLayout2->setContentsMargins(0, 0, 0, 0); - vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2")); + vboxLayout2->setObjectName("vboxLayout2"); characterRangeView = new QListWidget(groupBox_2); - characterRangeView->setObjectName(QString::fromUtf8("characterRangeView")); + characterRangeView->setObjectName("characterRangeView"); vboxLayout2->addWidget(characterRangeView); @@ -187,23 +187,23 @@ public: hboxLayout1->setSpacing(6); #endif hboxLayout1->setContentsMargins(0, 0, 0, 0); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName("hboxLayout1"); selectAll = new QPushButton(groupBox_2); - selectAll->setObjectName(QString::fromUtf8("selectAll")); + selectAll->setObjectName("selectAll"); hboxLayout1->addWidget(selectAll); deselectAll = new QPushButton(groupBox_2); - deselectAll->setObjectName(QString::fromUtf8("deselectAll")); + deselectAll->setObjectName("deselectAll"); hboxLayout1->addWidget(deselectAll); invertSelection = new QPushButton(groupBox_2); - invertSelection->setObjectName(QString::fromUtf8("invertSelection")); + invertSelection->setObjectName("invertSelection"); hboxLayout1->addWidget(invertSelection); - spacerItem1 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacerItem1 = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); hboxLayout1->addItem(spacerItem1); @@ -214,7 +214,7 @@ public: vboxLayout1->addLayout(vboxLayout2); chooseFromSampleFile = new QRadioButton(groupBox_2); - chooseFromSampleFile->setObjectName(QString::fromUtf8("chooseFromSampleFile")); + chooseFromSampleFile->setObjectName("chooseFromSampleFile"); vboxLayout1->addWidget(chooseFromSampleFile); @@ -223,27 +223,27 @@ public: hboxLayout2->setSpacing(6); #endif hboxLayout2->setContentsMargins(0, 0, 0, 0); - hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2")); + hboxLayout2->setObjectName("hboxLayout2"); label_5 = new QLabel(groupBox_2); - label_5->setObjectName(QString::fromUtf8("label_5")); + label_5->setObjectName("label_5"); label_5->setEnabled(false); hboxLayout2->addWidget(label_5); sampleFile = new QLineEdit(groupBox_2); - sampleFile->setObjectName(QString::fromUtf8("sampleFile")); + sampleFile->setObjectName("sampleFile"); sampleFile->setEnabled(false); hboxLayout2->addWidget(sampleFile); browseSampleFile = new QPushButton(groupBox_2); - browseSampleFile->setObjectName(QString::fromUtf8("browseSampleFile")); + browseSampleFile->setObjectName("browseSampleFile"); browseSampleFile->setEnabled(false); hboxLayout2->addWidget(browseSampleFile); charCount = new QLabel(groupBox_2); - charCount->setObjectName(QString::fromUtf8("charCount")); + charCount->setObjectName("charCount"); charCount->setEnabled(false); hboxLayout2->addWidget(charCount); @@ -255,7 +255,7 @@ public: vboxLayout->addWidget(groupBox_2); groupBox_3 = new QGroupBox(centralwidget); - groupBox_3->setObjectName(QString::fromUtf8("groupBox_3")); + groupBox_3->setObjectName("groupBox_3"); hboxLayout3 = new QHBoxLayout(groupBox_3); #ifndef Q_OS_MAC hboxLayout3->setSpacing(6); @@ -263,9 +263,9 @@ public: #ifndef Q_OS_MAC hboxLayout3->setContentsMargins(9, 9, 9, 9); #endif - hboxLayout3->setObjectName(QString::fromUtf8("hboxLayout3")); + hboxLayout3->setObjectName("hboxLayout3"); preview = new QLineEdit(groupBox_3); - preview->setObjectName(QString::fromUtf8("preview")); + preview->setObjectName("preview"); hboxLayout3->addWidget(preview); @@ -273,7 +273,7 @@ public: vboxLayout->addWidget(groupBox_3); groupBox_4 = new QGroupBox(centralwidget); - groupBox_4->setObjectName(QString::fromUtf8("groupBox_4")); + groupBox_4->setObjectName("groupBox_4"); hboxLayout4 = new QHBoxLayout(groupBox_4); #ifndef Q_OS_MAC hboxLayout4->setSpacing(6); @@ -281,29 +281,29 @@ public: #ifndef Q_OS_MAC hboxLayout4->setContentsMargins(9, 9, 9, 9); #endif - hboxLayout4->setObjectName(QString::fromUtf8("hboxLayout4")); + hboxLayout4->setObjectName("hboxLayout4"); label_3 = new QLabel(groupBox_4); - label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setObjectName("label_3"); hboxLayout4->addWidget(label_3); path = new QLineEdit(groupBox_4); - path->setObjectName(QString::fromUtf8("path")); + path->setObjectName("path"); hboxLayout4->addWidget(path); browsePath = new QPushButton(groupBox_4); - browsePath->setObjectName(QString::fromUtf8("browsePath")); + browsePath->setObjectName("browsePath"); hboxLayout4->addWidget(browsePath); label_4 = new QLabel(groupBox_4); - label_4->setObjectName(QString::fromUtf8("label_4")); + label_4->setObjectName("label_4"); hboxLayout4->addWidget(label_4); fileName = new QLineEdit(groupBox_4); - fileName->setObjectName(QString::fromUtf8("fileName")); + fileName->setObjectName("fileName"); fileName->setEnabled(false); hboxLayout4->addWidget(fileName); @@ -316,13 +316,13 @@ public: hboxLayout5->setSpacing(6); #endif hboxLayout5->setContentsMargins(0, 0, 0, 0); - hboxLayout5->setObjectName(QString::fromUtf8("hboxLayout5")); + hboxLayout5->setObjectName("hboxLayout5"); generate = new QPushButton(centralwidget); - generate->setObjectName(QString::fromUtf8("generate")); + generate->setObjectName("generate"); hboxLayout5->addWidget(generate); - spacerItem2 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacerItem2 = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); hboxLayout5->addItem(spacerItem2); @@ -331,13 +331,13 @@ public: MainWindow->setCentralWidget(centralwidget); menubar = new QMenuBar(MainWindow); - menubar->setObjectName(QString::fromUtf8("menubar")); + menubar->setObjectName("menubar"); menubar->setGeometry(QRect(0, 0, 829, 29)); menuFile = new QMenu(menubar); - menuFile->setObjectName(QString::fromUtf8("menuFile")); + menuFile->setObjectName("menuFile"); MainWindow->setMenuBar(menubar); statusbar = new QStatusBar(MainWindow); - statusbar->setObjectName(QString::fromUtf8("statusbar")); + statusbar->setObjectName("statusbar"); MainWindow->setStatusBar(statusbar); menubar->addAction(menuFile->menuAction()); @@ -346,45 +346,45 @@ public: menuFile->addAction(action_Exit); retranslateUi(MainWindow); - QObject::connect(action_Exit, SIGNAL(triggered()), MainWindow, SLOT(close())); - QObject::connect(chooseFromCodePoints, SIGNAL(toggled(bool)), characterRangeView, SLOT(setEnabled(bool))); - QObject::connect(chooseFromCodePoints, SIGNAL(toggled(bool)), selectAll, SLOT(setEnabled(bool))); - QObject::connect(chooseFromCodePoints, SIGNAL(toggled(bool)), deselectAll, SLOT(setEnabled(bool))); - QObject::connect(chooseFromCodePoints, SIGNAL(toggled(bool)), invertSelection, SLOT(setEnabled(bool))); - QObject::connect(chooseFromSampleFile, SIGNAL(toggled(bool)), sampleFile, SLOT(setEnabled(bool))); - QObject::connect(chooseFromSampleFile, SIGNAL(toggled(bool)), browseSampleFile, SLOT(setEnabled(bool))); - QObject::connect(chooseFromSampleFile, SIGNAL(toggled(bool)), charCount, SLOT(setEnabled(bool))); - QObject::connect(chooseFromSampleFile, SIGNAL(toggled(bool)), label_5, SLOT(setEnabled(bool))); + QObject::connect(action_Exit, &QAction::triggered, MainWindow, qOverload<>(&QMainWindow::close)); + QObject::connect(chooseFromCodePoints, &QRadioButton::toggled, characterRangeView, &QListWidget::setEnabled); + QObject::connect(chooseFromCodePoints, &QRadioButton::toggled, selectAll, &QPushButton::setEnabled); + QObject::connect(chooseFromCodePoints, &QRadioButton::toggled, deselectAll, &QPushButton::setEnabled); + QObject::connect(chooseFromCodePoints, &QRadioButton::toggled, invertSelection, &QPushButton::setEnabled); + QObject::connect(chooseFromSampleFile, &QRadioButton::toggled, sampleFile, &QLineEdit::setEnabled); + QObject::connect(chooseFromSampleFile, &QRadioButton::toggled, browseSampleFile, &QPushButton::setEnabled); + QObject::connect(chooseFromSampleFile, &QRadioButton::toggled, charCount, &QLabel::setEnabled); + QObject::connect(chooseFromSampleFile, &QRadioButton::toggled, label_5, &QLabel::setEnabled); QMetaObject::connectSlotsByName(MainWindow); } // setupUi void retranslateUi(QMainWindow *MainWindow) { - MainWindow->setWindowTitle(QApplication::translate("MainWindow", "MakeQPF", nullptr)); - actionAdd_Custom_Font->setText(QApplication::translate("MainWindow", "&Add Custom Font...", nullptr)); - action_Exit->setText(QApplication::translate("MainWindow", "&Exit", nullptr)); - groupBox->setTitle(QApplication::translate("MainWindow", "Font Properties", nullptr)); - label->setText(QApplication::translate("MainWindow", "Family:", nullptr)); - label_2->setText(QApplication::translate("MainWindow", "Pixel Size:", nullptr)); - label_7->setText(QApplication::translate("MainWindow", "Weight:", nullptr)); - italic->setText(QApplication::translate("MainWindow", "Italic", nullptr)); - groupBox_2->setTitle(QApplication::translate("MainWindow", "Glyph Coverage", nullptr)); - chooseFromCodePoints->setText(QApplication::translate("MainWindow", "Choose from Unicode Codepoints:", nullptr)); - selectAll->setText(QApplication::translate("MainWindow", "Select &All", nullptr)); - deselectAll->setText(QApplication::translate("MainWindow", "&Deselect All", nullptr)); - invertSelection->setText(QApplication::translate("MainWindow", "&Invert Selection", nullptr)); - chooseFromSampleFile->setText(QApplication::translate("MainWindow", "Choose from Sample Text File (UTF-8 Encoded):", nullptr)); - label_5->setText(QApplication::translate("MainWindow", "Path:", nullptr)); - browseSampleFile->setText(QApplication::translate("MainWindow", "Browse...", nullptr)); - charCount->setText(QApplication::translate("MainWindow", "TextLabel", nullptr)); - groupBox_3->setTitle(QApplication::translate("MainWindow", "Preview", nullptr)); - groupBox_4->setTitle(QApplication::translate("MainWindow", "Output Options", nullptr)); - label_3->setText(QApplication::translate("MainWindow", "Path:", nullptr)); - browsePath->setText(QApplication::translate("MainWindow", "Browse...", nullptr)); - label_4->setText(QApplication::translate("MainWindow", "Filename:", nullptr)); - generate->setText(QApplication::translate("MainWindow", "Generate Pre-Rendered Font...", nullptr)); - menuFile->setTitle(QApplication::translate("MainWindow", "File", nullptr)); + MainWindow->setWindowTitle(QCoreApplication::translate("MainWindow", "MakeQPF", nullptr)); + actionAdd_Custom_Font->setText(QCoreApplication::translate("MainWindow", "&Add Custom Font...", nullptr)); + action_Exit->setText(QCoreApplication::translate("MainWindow", "&Exit", nullptr)); + groupBox->setTitle(QCoreApplication::translate("MainWindow", "Font Properties", nullptr)); + label->setText(QCoreApplication::translate("MainWindow", "Family:", nullptr)); + label_2->setText(QCoreApplication::translate("MainWindow", "Pixel Size:", nullptr)); + label_7->setText(QCoreApplication::translate("MainWindow", "Weight:", nullptr)); + italic->setText(QCoreApplication::translate("MainWindow", "Italic", nullptr)); + groupBox_2->setTitle(QCoreApplication::translate("MainWindow", "Glyph Coverage", nullptr)); + chooseFromCodePoints->setText(QCoreApplication::translate("MainWindow", "Choose from Unicode Codepoints:", nullptr)); + selectAll->setText(QCoreApplication::translate("MainWindow", "Select &All", nullptr)); + deselectAll->setText(QCoreApplication::translate("MainWindow", "&Deselect All", nullptr)); + invertSelection->setText(QCoreApplication::translate("MainWindow", "&Invert Selection", nullptr)); + chooseFromSampleFile->setText(QCoreApplication::translate("MainWindow", "Choose from Sample Text File (UTF-8 Encoded):", nullptr)); + label_5->setText(QCoreApplication::translate("MainWindow", "Path:", nullptr)); + browseSampleFile->setText(QCoreApplication::translate("MainWindow", "Browse...", nullptr)); + charCount->setText(QCoreApplication::translate("MainWindow", "TextLabel", nullptr)); + groupBox_3->setTitle(QCoreApplication::translate("MainWindow", "Preview", nullptr)); + groupBox_4->setTitle(QCoreApplication::translate("MainWindow", "Output Options", nullptr)); + label_3->setText(QCoreApplication::translate("MainWindow", "Path:", nullptr)); + browsePath->setText(QCoreApplication::translate("MainWindow", "Browse...", nullptr)); + label_4->setText(QCoreApplication::translate("MainWindow", "Filename:", nullptr)); + generate->setText(QCoreApplication::translate("MainWindow", "Generate Pre-Rendered Font...", nullptr)); + menuFile->setTitle(QCoreApplication::translate("MainWindow", "File", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/mydialog.ui.h b/tests/auto/tools/uic/baseline/mydialog.ui.h index 1a784d1b0a..0d8b088246 100644 --- a/tests/auto/tools/uic/baseline/mydialog.ui.h +++ b/tests/auto/tools/uic/baseline/mydialog.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'mydialog.ui' ** -** Created by: Qt User Interface Compiler version 5.9.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -28,7 +28,7 @@ public: void setupUi(QDialog *MyDialog) { if (MyDialog->objectName().isEmpty()) - MyDialog->setObjectName(QString::fromUtf8("MyDialog")); + MyDialog->setObjectName("MyDialog"); MyDialog->resize(401, 70); vboxLayout = new QVBoxLayout(MyDialog); #ifndef Q_OS_MAC @@ -37,14 +37,14 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); aLabel = new QLabel(MyDialog); - aLabel->setObjectName(QString::fromUtf8("aLabel")); + aLabel->setObjectName("aLabel"); vboxLayout->addWidget(aLabel); aButton = new QPushButton(MyDialog); - aButton->setObjectName(QString::fromUtf8("aButton")); + aButton->setObjectName("aButton"); vboxLayout->addWidget(aButton); @@ -56,12 +56,12 @@ public: void retranslateUi(QDialog *MyDialog) { - MyDialog->setWindowTitle(QApplication::translate("MyDialog", "Mach 2!", nullptr)); - aLabel->setText(QApplication::translate("MyDialog", "Join the life in the fastlane; - PCH enable your project today! -", nullptr)); - aButton->setText(QApplication::translate("MyDialog", "&Quit", nullptr)); -#ifndef QT_NO_SHORTCUT - aButton->setShortcut(QApplication::translate("MyDialog", "Alt+Q", nullptr)); -#endif // QT_NO_SHORTCUT + MyDialog->setWindowTitle(QCoreApplication::translate("MyDialog", "Mach 2!", nullptr)); + aLabel->setText(QCoreApplication::translate("MyDialog", "Join the life in the fastlane; - PCH enable your project today! -", nullptr)); + aButton->setText(QCoreApplication::translate("MyDialog", "&Quit", nullptr)); +#if QT_CONFIG(shortcut) + aButton->setShortcut(QCoreApplication::translate("MyDialog", "Alt+Q", nullptr)); +#endif // QT_CONFIG(shortcut) } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/myform.ui.h b/tests/auto/tools/uic/baseline/myform.ui.h index d3a08e04c9..a643fcc16a 100644 --- a/tests/auto/tools/uic/baseline/myform.ui.h +++ b/tests/auto/tools/uic/baseline/myform.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'myform.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -41,70 +41,70 @@ public: void setupUi(QWidget *Form) { if (Form->objectName().isEmpty()) - Form->setObjectName(QString::fromUtf8("Form")); + Form->setObjectName("Form"); Form->resize(258, 224); vboxLayout = new QVBoxLayout(Form); #ifndef Q_OS_MAC vboxLayout->setSpacing(6); #endif vboxLayout->setContentsMargins(8, 8, 8, 8); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); groupBox = new QGroupBox(Form); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName("groupBox"); gridLayout = new QGridLayout(groupBox); #ifndef Q_OS_MAC gridLayout->setSpacing(6); #endif gridLayout->setContentsMargins(8, 8, 8, 8); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); radioButton_2 = new QRadioButton(groupBox); - radioButton_2->setObjectName(QString::fromUtf8("radioButton_2")); + radioButton_2->setObjectName("radioButton_2"); gridLayout->addWidget(radioButton_2, 1, 0, 1, 1); radioButton = new QRadioButton(groupBox); - radioButton->setObjectName(QString::fromUtf8("radioButton")); + radioButton->setObjectName("radioButton"); radioButton->setChecked(true); gridLayout->addWidget(radioButton, 0, 0, 1, 1); checkBox_2 = new QCheckBox(groupBox); - checkBox_2->setObjectName(QString::fromUtf8("checkBox_2")); + checkBox_2->setObjectName("checkBox_2"); checkBox_2->setChecked(true); gridLayout->addWidget(checkBox_2, 1, 1, 1, 1); - spacerItem = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem = new QSpacerItem(20, 40, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Expanding); gridLayout->addItem(spacerItem, 5, 0, 1, 1); checkBox = new QCheckBox(groupBox); - checkBox->setObjectName(QString::fromUtf8("checkBox")); + checkBox->setObjectName("checkBox"); gridLayout->addWidget(checkBox, 0, 1, 1, 1); radioButton_2_2 = new QRadioButton(groupBox); - radioButton_2_2->setObjectName(QString::fromUtf8("radioButton_2_2")); + radioButton_2_2->setObjectName("radioButton_2_2"); gridLayout->addWidget(radioButton_2_2, 2, 0, 1, 1); radioButton_3 = new QRadioButton(groupBox); - radioButton_3->setObjectName(QString::fromUtf8("radioButton_3")); + radioButton_3->setObjectName("radioButton_3"); gridLayout->addWidget(radioButton_3, 3, 0, 1, 1); radioButton_4 = new QRadioButton(groupBox); - radioButton_4->setObjectName(QString::fromUtf8("radioButton_4")); + radioButton_4->setObjectName("radioButton_4"); gridLayout->addWidget(radioButton_4, 4, 0, 1, 1); checkBox_3 = new QCheckBox(groupBox); - checkBox_3->setObjectName(QString::fromUtf8("checkBox_3")); + checkBox_3->setObjectName("checkBox_3"); gridLayout->addWidget(checkBox_3, 2, 1, 1, 1); checkBox_4 = new QCheckBox(groupBox); - checkBox_4->setObjectName(QString::fromUtf8("checkBox_4")); + checkBox_4->setObjectName("checkBox_4"); checkBox_4->setChecked(true); gridLayout->addWidget(checkBox_4, 3, 1, 1, 1); @@ -120,17 +120,17 @@ public: void retranslateUi(QWidget *Form) { - Form->setWindowTitle(QApplication::translate("Form", "Export Document", nullptr)); - groupBox->setTitle(QApplication::translate("Form", "Export Options", nullptr)); - radioButton_2->setText(QApplication::translate("Form", "&DocBook", nullptr)); - radioButton->setText(QApplication::translate("Form", "&LaTeX", nullptr)); - checkBox_2->setText(QApplication::translate("Form", "Include p&ictures", nullptr)); - checkBox->setText(QApplication::translate("Form", "&Compress", nullptr)); - radioButton_2_2->setText(QApplication::translate("Form", "&HTML", nullptr)); - radioButton_3->setText(QApplication::translate("Form", "&PostScript", nullptr)); - radioButton_4->setText(QApplication::translate("Form", "PD&F", nullptr)); - checkBox_3->setText(QApplication::translate("Form", "Include &metadata", nullptr)); - checkBox_4->setText(QApplication::translate("Form", "Create inde&x", nullptr)); + Form->setWindowTitle(QCoreApplication::translate("Form", "Export Document", nullptr)); + groupBox->setTitle(QCoreApplication::translate("Form", "Export Options", nullptr)); + radioButton_2->setText(QCoreApplication::translate("Form", "&DocBook", nullptr)); + radioButton->setText(QCoreApplication::translate("Form", "&LaTeX", nullptr)); + checkBox_2->setText(QCoreApplication::translate("Form", "Include p&ictures", nullptr)); + checkBox->setText(QCoreApplication::translate("Form", "&Compress", nullptr)); + radioButton_2_2->setText(QCoreApplication::translate("Form", "&HTML", nullptr)); + radioButton_3->setText(QCoreApplication::translate("Form", "&PostScript", nullptr)); + radioButton_4->setText(QCoreApplication::translate("Form", "PD&F", nullptr)); + checkBox_3->setText(QCoreApplication::translate("Form", "Include &metadata", nullptr)); + checkBox_4->setText(QCoreApplication::translate("Form", "Create inde&x", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/newactiondialog.ui b/tests/auto/tools/uic/baseline/newactiondialog.ui index 802a5cbc01..8e452685a6 100644 --- a/tests/auto/tools/uic/baseline/newactiondialog.ui +++ b/tests/auto/tools/uic/baseline/newactiondialog.ui @@ -1,31 +1,8 @@ <ui version="4.0" > - <comment>********************************************************************* -** -** 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$ -** -*********************************************************************</comment> +<comment> +* Copyright (C) 2016 The Qt Company Ltd. +* SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +</comment> <class>qdesigner_internal::NewActionDialog</class> <widget class="QDialog" name="qdesigner_internal::NewActionDialog" > <property name="geometry" > diff --git a/tests/auto/tools/uic/baseline/newactiondialog.ui.h b/tests/auto/tools/uic/baseline/newactiondialog.ui.h index ca99ab8356..3f1fe13998 100644 --- a/tests/auto/tools/uic/baseline/newactiondialog.ui.h +++ b/tests/auto/tools/uic/baseline/newactiondialog.ui.h @@ -1,37 +1,14 @@ /* -********************************************************************* -** -** 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$ -** -********************************************************************* + +* Copyright (C) 2016 The Qt Company Ltd. +* SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + */ /******************************************************************************** ** Form generated from reading UI file 'newactiondialog.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -40,6 +17,7 @@ #define NEWACTIONDIALOG_H #include <QtCore/QVariant> +#include <QtWidgets/QAbstractButton> #include <QtWidgets/QApplication> #include <QtWidgets/QDialog> #include <QtWidgets/QDialogButtonBox> @@ -76,46 +54,46 @@ public: void setupUi(QDialog *qdesigner_internal__NewActionDialog) { if (qdesigner_internal__NewActionDialog->objectName().isEmpty()) - qdesigner_internal__NewActionDialog->setObjectName(QString::fromUtf8("qdesigner_internal__NewActionDialog")); + qdesigner_internal__NewActionDialog->setObjectName("qdesigner_internal__NewActionDialog"); qdesigner_internal__NewActionDialog->resize(363, 156); verticalLayout = new QVBoxLayout(qdesigner_internal__NewActionDialog); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + verticalLayout->setObjectName("verticalLayout"); formLayout = new QFormLayout(); - formLayout->setObjectName(QString::fromUtf8("formLayout")); + formLayout->setObjectName("formLayout"); label = new QLabel(qdesigner_internal__NewActionDialog); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName("label"); formLayout->setWidget(0, QFormLayout::LabelRole, label); editActionText = new QLineEdit(qdesigner_internal__NewActionDialog); - editActionText->setObjectName(QString::fromUtf8("editActionText")); + editActionText->setObjectName("editActionText"); editActionText->setMinimumSize(QSize(255, 0)); formLayout->setWidget(0, QFormLayout::FieldRole, editActionText); label_3 = new QLabel(qdesigner_internal__NewActionDialog); - label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setObjectName("label_3"); formLayout->setWidget(1, QFormLayout::LabelRole, label_3); editObjectName = new QLineEdit(qdesigner_internal__NewActionDialog); - editObjectName->setObjectName(QString::fromUtf8("editObjectName")); + editObjectName->setObjectName("editObjectName"); formLayout->setWidget(1, QFormLayout::FieldRole, editObjectName); label_2 = new QLabel(qdesigner_internal__NewActionDialog); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName("label_2"); formLayout->setWidget(2, QFormLayout::LabelRole, label_2); horizontalLayout = new QHBoxLayout(); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); + horizontalLayout->setObjectName("horizontalLayout"); iconSelector = new qdesigner_internal::IconSelector(qdesigner_internal__NewActionDialog); - iconSelector->setObjectName(QString::fromUtf8("iconSelector")); + iconSelector->setObjectName("iconSelector"); horizontalLayout->addWidget(iconSelector); - spacerItem = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacerItem = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); horizontalLayout->addItem(spacerItem); @@ -125,44 +103,44 @@ public: verticalLayout->addLayout(formLayout); - verticalSpacer = new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding); + verticalSpacer = new QSpacerItem(0, 0, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Expanding); verticalLayout->addItem(verticalSpacer); line = new QFrame(qdesigner_internal__NewActionDialog); - line->setObjectName(QString::fromUtf8("line")); - line->setFrameShape(QFrame::HLine); - line->setFrameShadow(QFrame::Sunken); + line->setObjectName("line"); + line->setFrameShape(QFrame::Shape::HLine); + line->setFrameShadow(QFrame::Shadow::Sunken); verticalLayout->addWidget(line); buttonBox = new QDialogButtonBox(qdesigner_internal__NewActionDialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName("buttonBox"); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); verticalLayout->addWidget(buttonBox); -#ifndef QT_NO_SHORTCUT +#if QT_CONFIG(shortcut) label->setBuddy(editActionText); label_3->setBuddy(editObjectName); label_2->setBuddy(iconSelector); -#endif // QT_NO_SHORTCUT +#endif // QT_CONFIG(shortcut) QWidget::setTabOrder(editActionText, editObjectName); retranslateUi(qdesigner_internal__NewActionDialog); - QObject::connect(buttonBox, SIGNAL(accepted()), qdesigner_internal__NewActionDialog, SLOT(accept())); - QObject::connect(buttonBox, SIGNAL(rejected()), qdesigner_internal__NewActionDialog, SLOT(reject())); + QObject::connect(buttonBox, &QDialogButtonBox::accepted, qdesigner_internal__NewActionDialog, qOverload<>(&QDialog::accept)); + QObject::connect(buttonBox, &QDialogButtonBox::rejected, qdesigner_internal__NewActionDialog, qOverload<>(&QDialog::reject)); QMetaObject::connectSlotsByName(qdesigner_internal__NewActionDialog); } // setupUi void retranslateUi(QDialog *qdesigner_internal__NewActionDialog) { - qdesigner_internal__NewActionDialog->setWindowTitle(QApplication::translate("qdesigner_internal::NewActionDialog", "New Action...", nullptr)); - label->setText(QApplication::translate("qdesigner_internal::NewActionDialog", "&Text:", nullptr)); - label_3->setText(QApplication::translate("qdesigner_internal::NewActionDialog", "Object &name:", nullptr)); - label_2->setText(QApplication::translate("qdesigner_internal::NewActionDialog", "&Icon:", nullptr)); + qdesigner_internal__NewActionDialog->setWindowTitle(QCoreApplication::translate("qdesigner_internal::NewActionDialog", "New Action...", nullptr)); + label->setText(QCoreApplication::translate("qdesigner_internal::NewActionDialog", "&Text:", nullptr)); + label_3->setText(QCoreApplication::translate("qdesigner_internal::NewActionDialog", "Object &name:", nullptr)); + label_2->setText(QCoreApplication::translate("qdesigner_internal::NewActionDialog", "&Icon:", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/newdynamicpropertydialog.ui.h b/tests/auto/tools/uic/baseline/newdynamicpropertydialog.ui.h index f5fd6f1fa4..e81adac644 100644 --- a/tests/auto/tools/uic/baseline/newdynamicpropertydialog.ui.h +++ b/tests/auto/tools/uic/baseline/newdynamicpropertydialog.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'newdynamicpropertydialog.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -10,6 +10,7 @@ #define NEWDYNAMICPROPERTYDIALOG_H #include <QtCore/QVariant> +#include <QtWidgets/QAbstractButton> #include <QtWidgets/QApplication> #include <QtWidgets/QComboBox> #include <QtWidgets/QDialog> @@ -42,21 +43,21 @@ public: void setupUi(QDialog *qdesigner_internal__NewDynamicPropertyDialog) { if (qdesigner_internal__NewDynamicPropertyDialog->objectName().isEmpty()) - qdesigner_internal__NewDynamicPropertyDialog->setObjectName(QString::fromUtf8("qdesigner_internal__NewDynamicPropertyDialog")); + qdesigner_internal__NewDynamicPropertyDialog->setObjectName("qdesigner_internal__NewDynamicPropertyDialog"); qdesigner_internal__NewDynamicPropertyDialog->resize(340, 118); verticalLayout = new QVBoxLayout(qdesigner_internal__NewDynamicPropertyDialog); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + verticalLayout->setObjectName("verticalLayout"); formLayout = new QFormLayout(); - formLayout->setObjectName(QString::fromUtf8("formLayout")); + formLayout->setObjectName("formLayout"); m_lineEdit = new QLineEdit(qdesigner_internal__NewDynamicPropertyDialog); - m_lineEdit->setObjectName(QString::fromUtf8("m_lineEdit")); + m_lineEdit->setObjectName("m_lineEdit"); m_lineEdit->setMinimumSize(QSize(220, 0)); formLayout->setWidget(0, QFormLayout::FieldRole, m_lineEdit); label = new QLabel(qdesigner_internal__NewDynamicPropertyDialog); - label->setObjectName(QString::fromUtf8("label")); - QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); + label->setObjectName("label"); + QSizePolicy sizePolicy(QSizePolicy::Policy::Preferred, QSizePolicy::Policy::Fixed); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); sizePolicy.setHeightForWidth(label->sizePolicy().hasHeightForWidth()); @@ -65,13 +66,13 @@ public: formLayout->setWidget(0, QFormLayout::LabelRole, label); horizontalLayout = new QHBoxLayout(); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); + horizontalLayout->setObjectName("horizontalLayout"); m_comboBox = new QComboBox(qdesigner_internal__NewDynamicPropertyDialog); - m_comboBox->setObjectName(QString::fromUtf8("m_comboBox")); + m_comboBox->setObjectName("m_comboBox"); horizontalLayout->addWidget(m_comboBox); - horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); horizontalLayout->addItem(horizontalSpacer); @@ -79,7 +80,7 @@ public: formLayout->setLayout(1, QFormLayout::FieldRole, horizontalLayout); label_2 = new QLabel(qdesigner_internal__NewDynamicPropertyDialog); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName("label_2"); sizePolicy.setHeightForWidth(label_2->sizePolicy().hasHeightForWidth()); label_2->setSizePolicy(sizePolicy); @@ -88,12 +89,12 @@ public: verticalLayout->addLayout(formLayout); - spacerItem = new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem = new QSpacerItem(0, 0, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Expanding); verticalLayout->addItem(spacerItem); m_buttonBox = new QDialogButtonBox(qdesigner_internal__NewDynamicPropertyDialog); - m_buttonBox->setObjectName(QString::fromUtf8("m_buttonBox")); + m_buttonBox->setObjectName("m_buttonBox"); m_buttonBox->setOrientation(Qt::Horizontal); m_buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); m_buttonBox->setCenterButtons(false); @@ -108,9 +109,9 @@ public: void retranslateUi(QDialog *qdesigner_internal__NewDynamicPropertyDialog) { - qdesigner_internal__NewDynamicPropertyDialog->setWindowTitle(QApplication::translate("qdesigner_internal::NewDynamicPropertyDialog", "Create Dynamic Property", nullptr)); - label->setText(QApplication::translate("qdesigner_internal::NewDynamicPropertyDialog", "Property Name", nullptr)); - label_2->setText(QApplication::translate("qdesigner_internal::NewDynamicPropertyDialog", "Property Type", nullptr)); + qdesigner_internal__NewDynamicPropertyDialog->setWindowTitle(QCoreApplication::translate("qdesigner_internal::NewDynamicPropertyDialog", "Create Dynamic Property", nullptr)); + label->setText(QCoreApplication::translate("qdesigner_internal::NewDynamicPropertyDialog", "Property Name", nullptr)); + label_2->setText(QCoreApplication::translate("qdesigner_internal::NewDynamicPropertyDialog", "Property Type", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/newform.ui b/tests/auto/tools/uic/baseline/newform.ui index 210c3a4fd4..adcf8693b4 100644 --- a/tests/auto/tools/uic/baseline/newform.ui +++ b/tests/auto/tools/uic/baseline/newform.ui @@ -1,32 +1,8 @@ <ui version="4.0" > - <author></author> - <comment>********************************************************************* -** -** 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$ -** -*********************************************************************</comment> +<comment> +* Copyright (C) 2016 The Qt Company Ltd. +* SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +</comment> <exportmacro></exportmacro> <class>NewForm</class> <widget class="QDialog" name="NewForm" > diff --git a/tests/auto/tools/uic/baseline/newform.ui.h b/tests/auto/tools/uic/baseline/newform.ui.h index 80e70dcf66..95b7279763 100644 --- a/tests/auto/tools/uic/baseline/newform.ui.h +++ b/tests/auto/tools/uic/baseline/newform.ui.h @@ -1,37 +1,14 @@ /* -********************************************************************* -** -** 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$ -** -********************************************************************* + +* Copyright (C) 2016 The Qt Company Ltd. +* SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + */ /******************************************************************************** ** Form generated from reading UI file 'newform.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -40,6 +17,7 @@ #define NEWFORM_H #include <QtCore/QVariant> +#include <QtWidgets/QAbstractButton> #include <QtWidgets/QApplication> #include <QtWidgets/QCheckBox> #include <QtWidgets/QDialog> @@ -67,7 +45,7 @@ public: void setupUi(QDialog *NewForm) { if (NewForm->objectName().isEmpty()) - NewForm->setObjectName(QString::fromUtf8("NewForm")); + NewForm->setObjectName("NewForm"); NewForm->resize(495, 319); vboxLayout = new QVBoxLayout(NewForm); #ifndef Q_OS_MAC @@ -76,15 +54,15 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); hboxLayout = new QHBoxLayout(); #ifndef Q_OS_MAC hboxLayout->setSpacing(6); #endif hboxLayout->setContentsMargins(1, 1, 1, 1); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName("hboxLayout"); treeWidget = new QTreeWidget(NewForm); - treeWidget->setObjectName(QString::fromUtf8("treeWidget")); + treeWidget->setObjectName("treeWidget"); treeWidget->setIconSize(QSize(128, 128)); treeWidget->setRootIsDecorated(false); treeWidget->setColumnCount(1); @@ -92,8 +70,8 @@ public: hboxLayout->addWidget(treeWidget); lblPreview = new QLabel(NewForm); - lblPreview->setObjectName(QString::fromUtf8("lblPreview")); - QSizePolicy sizePolicy(static_cast<QSizePolicy::Policy>(7), static_cast<QSizePolicy::Policy>(5)); + lblPreview->setObjectName("lblPreview"); + QSizePolicy sizePolicy(QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Preferred); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); sizePolicy.setHeightForWidth(lblPreview->sizePolicy().hasHeightForWidth()); @@ -108,19 +86,19 @@ public: vboxLayout->addLayout(hboxLayout); horizontalLine = new QFrame(NewForm); - horizontalLine->setObjectName(QString::fromUtf8("horizontalLine")); + horizontalLine->setObjectName("horizontalLine"); horizontalLine->setFrameShape(QFrame::HLine); horizontalLine->setFrameShadow(QFrame::Sunken); vboxLayout->addWidget(horizontalLine); chkShowOnStartup = new QCheckBox(NewForm); - chkShowOnStartup->setObjectName(QString::fromUtf8("chkShowOnStartup")); + chkShowOnStartup->setObjectName("chkShowOnStartup"); vboxLayout->addWidget(chkShowOnStartup); buttonBox = new QDialogButtonBox(NewForm); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName("buttonBox"); vboxLayout->addWidget(buttonBox); @@ -132,11 +110,11 @@ public: void retranslateUi(QDialog *NewForm) { - NewForm->setWindowTitle(QApplication::translate("NewForm", "New Form", nullptr)); + NewForm->setWindowTitle(QCoreApplication::translate("NewForm", "New Form", nullptr)); QTreeWidgetItem *___qtreewidgetitem = treeWidget->headerItem(); - ___qtreewidgetitem->setText(0, QApplication::translate("NewForm", "0", nullptr)); - lblPreview->setText(QApplication::translate("NewForm", "Choose a template for a preview", nullptr)); - chkShowOnStartup->setText(QApplication::translate("NewForm", "Show this Dialog on Startup", nullptr)); + ___qtreewidgetitem->setText(0, QCoreApplication::translate("NewForm", "0", nullptr)); + lblPreview->setText(QCoreApplication::translate("NewForm", "Choose a template for a preview", nullptr)); + chkShowOnStartup->setText(QCoreApplication::translate("NewForm", "Show this Dialog on Startup", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/orderdialog.ui b/tests/auto/tools/uic/baseline/orderdialog.ui index 71b6bdd7e6..3d0a40956d 100644 --- a/tests/auto/tools/uic/baseline/orderdialog.ui +++ b/tests/auto/tools/uic/baseline/orderdialog.ui @@ -1,31 +1,8 @@ <ui version="4.0" > - <comment>********************************************************************* -** -** 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$ -** -*********************************************************************</comment> +<comment> +* Copyright (C) 2016 The Qt Company Ltd. +* SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +</comment> <class>qdesigner_internal::OrderDialog</class> <widget class="QDialog" name="qdesigner_internal::OrderDialog" > <property name="geometry" > diff --git a/tests/auto/tools/uic/baseline/orderdialog.ui.h b/tests/auto/tools/uic/baseline/orderdialog.ui.h index 0ee08257f4..14916367a6 100644 --- a/tests/auto/tools/uic/baseline/orderdialog.ui.h +++ b/tests/auto/tools/uic/baseline/orderdialog.ui.h @@ -1,37 +1,14 @@ /* -********************************************************************* -** -** 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$ -** -********************************************************************* + +* Copyright (C) 2016 The Qt Company Ltd. +* SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + */ /******************************************************************************** ** Form generated from reading UI file 'orderdialog.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -40,6 +17,7 @@ #define ORDERDIALOG_H #include <QtCore/QVariant> +#include <QtWidgets/QAbstractButton> #include <QtWidgets/QApplication> #include <QtWidgets/QDialog> #include <QtWidgets/QDialogButtonBox> @@ -70,18 +48,18 @@ public: void setupUi(QDialog *qdesigner_internal__OrderDialog) { if (qdesigner_internal__OrderDialog->objectName().isEmpty()) - qdesigner_internal__OrderDialog->setObjectName(QString::fromUtf8("qdesigner_internal__OrderDialog")); + qdesigner_internal__OrderDialog->setObjectName("qdesigner_internal__OrderDialog"); qdesigner_internal__OrderDialog->resize(467, 310); vboxLayout = new QVBoxLayout(qdesigner_internal__OrderDialog); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); groupBox = new QGroupBox(qdesigner_internal__OrderDialog); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName("groupBox"); hboxLayout = new QHBoxLayout(groupBox); hboxLayout->setSpacing(6); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName("hboxLayout"); hboxLayout->setContentsMargins(9, 9, 9, 9); pageList = new QListWidget(groupBox); - pageList->setObjectName(QString::fromUtf8("pageList")); + pageList->setObjectName("pageList"); pageList->setMinimumSize(QSize(344, 0)); pageList->setDragDropMode(QAbstractItemView::InternalMove); pageList->setSelectionMode(QAbstractItemView::ContiguousSelection); @@ -91,19 +69,19 @@ public: vboxLayout1 = new QVBoxLayout(); vboxLayout1->setSpacing(6); - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName("vboxLayout1"); vboxLayout1->setContentsMargins(0, 0, 0, 0); upButton = new QToolButton(groupBox); - upButton->setObjectName(QString::fromUtf8("upButton")); + upButton->setObjectName("upButton"); vboxLayout1->addWidget(upButton); downButton = new QToolButton(groupBox); - downButton->setObjectName(QString::fromUtf8("downButton")); + downButton->setObjectName("downButton"); vboxLayout1->addWidget(downButton); - spacerItem = new QSpacerItem(20, 99, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem = new QSpacerItem(20, 99, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Expanding); vboxLayout1->addItem(spacerItem); @@ -114,7 +92,7 @@ public: vboxLayout->addWidget(groupBox); buttonBox = new QDialogButtonBox(qdesigner_internal__OrderDialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName("buttonBox"); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::Reset); @@ -122,22 +100,22 @@ public: retranslateUi(qdesigner_internal__OrderDialog); - QObject::connect(buttonBox, SIGNAL(accepted()), qdesigner_internal__OrderDialog, SLOT(accept())); - QObject::connect(buttonBox, SIGNAL(rejected()), qdesigner_internal__OrderDialog, SLOT(reject())); + QObject::connect(buttonBox, &QDialogButtonBox::accepted, qdesigner_internal__OrderDialog, qOverload<>(&QDialog::accept)); + QObject::connect(buttonBox, &QDialogButtonBox::rejected, qdesigner_internal__OrderDialog, qOverload<>(&QDialog::reject)); QMetaObject::connectSlotsByName(qdesigner_internal__OrderDialog); } // setupUi void retranslateUi(QDialog *qdesigner_internal__OrderDialog) { - qdesigner_internal__OrderDialog->setWindowTitle(QApplication::translate("qdesigner_internal::OrderDialog", "Change Page Order", nullptr)); - groupBox->setTitle(QApplication::translate("qdesigner_internal::OrderDialog", "Page Order", nullptr)); -#ifndef QT_NO_TOOLTIP - upButton->setToolTip(QApplication::translate("qdesigner_internal::OrderDialog", "Move page up", nullptr)); -#endif // QT_NO_TOOLTIP -#ifndef QT_NO_TOOLTIP - downButton->setToolTip(QApplication::translate("qdesigner_internal::OrderDialog", "Move page down", nullptr)); -#endif // QT_NO_TOOLTIP + qdesigner_internal__OrderDialog->setWindowTitle(QCoreApplication::translate("qdesigner_internal::OrderDialog", "Change Page Order", nullptr)); + groupBox->setTitle(QCoreApplication::translate("qdesigner_internal::OrderDialog", "Page Order", nullptr)); +#if QT_CONFIG(tooltip) + upButton->setToolTip(QCoreApplication::translate("qdesigner_internal::OrderDialog", "Move page up", nullptr)); +#endif // QT_CONFIG(tooltip) +#if QT_CONFIG(tooltip) + downButton->setToolTip(QCoreApplication::translate("qdesigner_internal::OrderDialog", "Move page down", nullptr)); +#endif // QT_CONFIG(tooltip) } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/outputpage.ui b/tests/auto/tools/uic/baseline/outputpage.ui index 755f818085..95129c76fe 100644 --- a/tests/auto/tools/uic/baseline/outputpage.ui +++ b/tests/auto/tools/uic/baseline/outputpage.ui @@ -19,7 +19,7 @@ <enum>Qt::Vertical</enum> </property> <property name="sizeType" > - <enum>QSizePolicy::Fixed</enum> + <enum>QSizePolicy::Policy::Fixed</enum> </property> <property name="sizeHint" > <size> diff --git a/tests/auto/tools/uic/baseline/outputpage.ui.h b/tests/auto/tools/uic/baseline/outputpage.ui.h index 00491bb3d8..ee6d9240ae 100644 --- a/tests/auto/tools/uic/baseline/outputpage.ui.h +++ b/tests/auto/tools/uic/baseline/outputpage.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'outputpage.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -33,17 +33,17 @@ public: void setupUi(QWidget *OutputPage) { if (OutputPage->objectName().isEmpty()) - OutputPage->setObjectName(QString::fromUtf8("OutputPage")); + OutputPage->setObjectName("OutputPage"); OutputPage->resize(417, 242); gridLayout = new QGridLayout(OutputPage); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); - spacerItem = new QSpacerItem(20, 20, QSizePolicy::Minimum, QSizePolicy::Fixed); + gridLayout->setObjectName("gridLayout"); + spacerItem = new QSpacerItem(20, 20, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Fixed); gridLayout->addItem(spacerItem, 0, 1, 1, 1); label = new QLabel(OutputPage); - label->setObjectName(QString::fromUtf8("label")); - QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); + label->setObjectName("label"); + QSizePolicy sizePolicy(QSizePolicy::Policy::Preferred, QSizePolicy::Policy::Preferred); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); sizePolicy.setHeightForWidth(label->sizePolicy().hasHeightForWidth()); @@ -52,8 +52,8 @@ public: gridLayout->addWidget(label, 1, 0, 1, 1); projectLineEdit = new QLineEdit(OutputPage); - projectLineEdit->setObjectName(QString::fromUtf8("projectLineEdit")); - QSizePolicy sizePolicy1(QSizePolicy::Expanding, QSizePolicy::Fixed); + projectLineEdit->setObjectName("projectLineEdit"); + QSizePolicy sizePolicy1(QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Fixed); sizePolicy1.setHorizontalStretch(0); sizePolicy1.setVerticalStretch(0); sizePolicy1.setHeightForWidth(projectLineEdit->sizePolicy().hasHeightForWidth()); @@ -62,20 +62,20 @@ public: gridLayout->addWidget(projectLineEdit, 1, 1, 1, 1); label_2 = new QLabel(OutputPage); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName("label_2"); sizePolicy.setHeightForWidth(label_2->sizePolicy().hasHeightForWidth()); label_2->setSizePolicy(sizePolicy); gridLayout->addWidget(label_2, 2, 0, 1, 1); collectionLineEdit = new QLineEdit(OutputPage); - collectionLineEdit->setObjectName(QString::fromUtf8("collectionLineEdit")); + collectionLineEdit->setObjectName("collectionLineEdit"); sizePolicy1.setHeightForWidth(collectionLineEdit->sizePolicy().hasHeightForWidth()); collectionLineEdit->setSizePolicy(sizePolicy1); gridLayout->addWidget(collectionLineEdit, 2, 1, 1, 1); - spacerItem1 = new QSpacerItem(20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem1 = new QSpacerItem(20, 20, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Expanding); gridLayout->addItem(spacerItem1, 3, 1, 1, 1); @@ -87,9 +87,9 @@ public: void retranslateUi(QWidget *OutputPage) { - OutputPage->setWindowTitle(QApplication::translate("OutputPage", "Form", nullptr)); - label->setText(QApplication::translate("OutputPage", "Project file name:", nullptr)); - label_2->setText(QApplication::translate("OutputPage", "Collection file name:", nullptr)); + OutputPage->setWindowTitle(QCoreApplication::translate("OutputPage", "Form", nullptr)); + label->setText(QCoreApplication::translate("OutputPage", "Project file name:", nullptr)); + label_2->setText(QCoreApplication::translate("OutputPage", "Collection file name:", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/pagefold.ui.h b/tests/auto/tools/uic/baseline/pagefold.ui.h index c1ff03648d..00a8ace49f 100644 --- a/tests/auto/tools/uic/baseline/pagefold.ui.h +++ b/tests/auto/tools/uic/baseline/pagefold.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'pagefold.ui' ** -** Created by: Qt User Interface Compiler version 5.10.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -10,7 +10,8 @@ #define PAGEFOLD_H #include <QtCore/QVariant> -#include <QtWidgets/QAction> +#include <QtGui/QAction> +#include <QtWidgets/QAbstractButton> #include <QtWidgets/QApplication> #include <QtWidgets/QCheckBox> #include <QtWidgets/QComboBox> @@ -67,18 +68,18 @@ public: void setupUi(QMainWindow *MainWindow) { if (MainWindow->objectName().isEmpty()) - MainWindow->setObjectName(QString::fromUtf8("MainWindow")); + MainWindow->setObjectName("MainWindow"); MainWindow->resize(392, 412); exitAction = new QAction(MainWindow); - exitAction->setObjectName(QString::fromUtf8("exitAction")); + exitAction->setObjectName("exitAction"); aboutQtAction = new QAction(MainWindow); - aboutQtAction->setObjectName(QString::fromUtf8("aboutQtAction")); + aboutQtAction->setObjectName("aboutQtAction"); editStyleAction = new QAction(MainWindow); - editStyleAction->setObjectName(QString::fromUtf8("editStyleAction")); + editStyleAction->setObjectName("editStyleAction"); aboutAction = new QAction(MainWindow); - aboutAction->setObjectName(QString::fromUtf8("aboutAction")); + aboutAction->setObjectName("aboutAction"); centralwidget = new QWidget(MainWindow); - centralwidget->setObjectName(QString::fromUtf8("centralwidget")); + centralwidget->setObjectName("centralwidget"); vboxLayout = new QVBoxLayout(centralwidget); #ifndef Q_OS_MAC vboxLayout->setSpacing(6); @@ -86,9 +87,9 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); mainFrame = new QFrame(centralwidget); - mainFrame->setObjectName(QString::fromUtf8("mainFrame")); + mainFrame->setObjectName("mainFrame"); mainFrame->setFrameShape(QFrame::StyledPanel); mainFrame->setFrameShadow(QFrame::Raised); gridLayout = new QGridLayout(mainFrame); @@ -98,72 +99,72 @@ public: #ifndef Q_OS_MAC gridLayout->setContentsMargins(9, 9, 9, 9); #endif - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); nameCombo = new QComboBox(mainFrame); nameCombo->addItem(QString()); nameCombo->addItem(QString()); nameCombo->addItem(QString()); nameCombo->addItem(QString()); - nameCombo->setObjectName(QString::fromUtf8("nameCombo")); + nameCombo->setObjectName("nameCombo"); nameCombo->setEditable(true); gridLayout->addWidget(nameCombo, 0, 1, 1, 3); - spacerItem = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacerItem = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); gridLayout->addItem(spacerItem, 1, 3, 1, 1); femaleRadioButton = new QRadioButton(mainFrame); - femaleRadioButton->setObjectName(QString::fromUtf8("femaleRadioButton")); + femaleRadioButton->setObjectName("femaleRadioButton"); gridLayout->addWidget(femaleRadioButton, 1, 2, 1, 1); genderLabel = new QLabel(mainFrame); - genderLabel->setObjectName(QString::fromUtf8("genderLabel")); + genderLabel->setObjectName("genderLabel"); gridLayout->addWidget(genderLabel, 1, 0, 1, 1); ageLabel = new QLabel(mainFrame); - ageLabel->setObjectName(QString::fromUtf8("ageLabel")); + ageLabel->setObjectName("ageLabel"); gridLayout->addWidget(ageLabel, 2, 0, 1, 1); maleRadioButton = new QRadioButton(mainFrame); - maleRadioButton->setObjectName(QString::fromUtf8("maleRadioButton")); + maleRadioButton->setObjectName("maleRadioButton"); gridLayout->addWidget(maleRadioButton, 1, 1, 1, 1); nameLabel = new QLabel(mainFrame); - nameLabel->setObjectName(QString::fromUtf8("nameLabel")); + nameLabel->setObjectName("nameLabel"); gridLayout->addWidget(nameLabel, 0, 0, 1, 1); passwordLabel = new QLabel(mainFrame); - passwordLabel->setObjectName(QString::fromUtf8("passwordLabel")); + passwordLabel->setObjectName("passwordLabel"); gridLayout->addWidget(passwordLabel, 3, 0, 1, 1); ageSpinBox = new QSpinBox(mainFrame); - ageSpinBox->setObjectName(QString::fromUtf8("ageSpinBox")); + ageSpinBox->setObjectName("ageSpinBox"); ageSpinBox->setMinimum(12); ageSpinBox->setValue(22); gridLayout->addWidget(ageSpinBox, 2, 1, 1, 3); buttonBox = new QDialogButtonBox(mainFrame); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName("buttonBox"); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok); gridLayout->addWidget(buttonBox, 7, 2, 1, 2); agreeCheckBox = new QCheckBox(mainFrame); - agreeCheckBox->setObjectName(QString::fromUtf8("agreeCheckBox")); + agreeCheckBox->setObjectName("agreeCheckBox"); gridLayout->addWidget(agreeCheckBox, 6, 0, 1, 4); passwordEdit = new QLineEdit(mainFrame); - passwordEdit->setObjectName(QString::fromUtf8("passwordEdit")); + passwordEdit->setObjectName("passwordEdit"); passwordEdit->setEchoMode(QLineEdit::Password); gridLayout->addWidget(passwordEdit, 3, 1, 1, 3); @@ -172,12 +173,12 @@ public: new QListWidgetItem(professionList); new QListWidgetItem(professionList); new QListWidgetItem(professionList); - professionList->setObjectName(QString::fromUtf8("professionList")); + professionList->setObjectName("professionList"); gridLayout->addWidget(professionList, 5, 1, 1, 3); label = new QLabel(mainFrame); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName("label"); gridLayout->addWidget(label, 5, 0, 1, 1); @@ -189,12 +190,12 @@ public: countryCombo->addItem(QString()); countryCombo->addItem(QString()); countryCombo->addItem(QString()); - countryCombo->setObjectName(QString::fromUtf8("countryCombo")); + countryCombo->setObjectName("countryCombo"); gridLayout->addWidget(countryCombo, 4, 1, 1, 3); countryLabel = new QLabel(mainFrame); - countryLabel->setObjectName(QString::fromUtf8("countryLabel")); + countryLabel->setObjectName("countryLabel"); gridLayout->addWidget(countryLabel, 4, 0, 1, 1); @@ -203,23 +204,23 @@ public: MainWindow->setCentralWidget(centralwidget); menubar = new QMenuBar(MainWindow); - menubar->setObjectName(QString::fromUtf8("menubar")); + menubar->setObjectName("menubar"); menubar->setGeometry(QRect(0, 0, 392, 25)); menu_File = new QMenu(menubar); - menu_File->setObjectName(QString::fromUtf8("menu_File")); + menu_File->setObjectName("menu_File"); menu_Help = new QMenu(menubar); - menu_Help->setObjectName(QString::fromUtf8("menu_Help")); + menu_Help->setObjectName("menu_Help"); MainWindow->setMenuBar(menubar); statusbar = new QStatusBar(MainWindow); - statusbar->setObjectName(QString::fromUtf8("statusbar")); + statusbar->setObjectName("statusbar"); MainWindow->setStatusBar(statusbar); -#ifndef QT_NO_SHORTCUT +#if QT_CONFIG(shortcut) ageLabel->setBuddy(ageSpinBox); nameLabel->setBuddy(nameCombo); passwordLabel->setBuddy(passwordEdit); label->setBuddy(professionList); countryLabel->setBuddy(professionList); -#endif // QT_NO_SHORTCUT +#endif // QT_CONFIG(shortcut) menubar->addAction(menu_File->menuAction()); menubar->addAction(menu_Help->menuAction()); @@ -242,84 +243,84 @@ public: void retranslateUi(QMainWindow *MainWindow) { - MainWindow->setWindowTitle(QApplication::translate("MainWindow", "MainWindow", nullptr)); - exitAction->setText(QApplication::translate("MainWindow", "&Exit", nullptr)); - aboutQtAction->setText(QApplication::translate("MainWindow", "About Qt", nullptr)); - editStyleAction->setText(QApplication::translate("MainWindow", "Edit &Style", nullptr)); - aboutAction->setText(QApplication::translate("MainWindow", "About", nullptr)); - nameCombo->setItemText(0, QApplication::translate("MainWindow", "Girish", nullptr)); - nameCombo->setItemText(1, QApplication::translate("MainWindow", "Jasmin", nullptr)); - nameCombo->setItemText(2, QApplication::translate("MainWindow", "Simon", nullptr)); - nameCombo->setItemText(3, QApplication::translate("MainWindow", "Zack", nullptr)); - -#ifndef QT_NO_TOOLTIP - nameCombo->setToolTip(QApplication::translate("MainWindow", "Specify your name", nullptr)); -#endif // QT_NO_TOOLTIP - femaleRadioButton->setStyleSheet(QApplication::translate("MainWindow", "Check this if you are female", nullptr)); - femaleRadioButton->setText(QApplication::translate("MainWindow", "&Female", nullptr)); - genderLabel->setText(QApplication::translate("MainWindow", "Gender:", nullptr)); - ageLabel->setText(QApplication::translate("MainWindow", "&Age:", nullptr)); -#ifndef QT_NO_TOOLTIP - maleRadioButton->setToolTip(QApplication::translate("MainWindow", "Check this if you are male", nullptr)); -#endif // QT_NO_TOOLTIP - maleRadioButton->setText(QApplication::translate("MainWindow", "&Male", nullptr)); - nameLabel->setText(QApplication::translate("MainWindow", "&Name:", nullptr)); - passwordLabel->setText(QApplication::translate("MainWindow", "&Password:", nullptr)); -#ifndef QT_NO_TOOLTIP - ageSpinBox->setToolTip(QApplication::translate("MainWindow", "Specify your age", nullptr)); -#endif // QT_NO_TOOLTIP -#ifndef QT_NO_STATUSTIP - ageSpinBox->setStatusTip(QApplication::translate("MainWindow", "Specify your age", nullptr)); -#endif // QT_NO_STATUSTIP -#ifndef QT_NO_TOOLTIP - agreeCheckBox->setToolTip(QApplication::translate("MainWindow", "Please read the LICENSE file before checking", nullptr)); -#endif // QT_NO_TOOLTIP - agreeCheckBox->setText(QApplication::translate("MainWindow", "I &accept the terms and &conditions", nullptr)); -#ifndef QT_NO_TOOLTIP - passwordEdit->setToolTip(QApplication::translate("MainWindow", "Specify your password", nullptr)); -#endif // QT_NO_TOOLTIP -#ifndef QT_NO_STATUSTIP - passwordEdit->setStatusTip(QApplication::translate("MainWindow", "Specify your password", nullptr)); -#endif // QT_NO_STATUSTIP - passwordEdit->setText(QApplication::translate("MainWindow", "Password", nullptr)); + MainWindow->setWindowTitle(QCoreApplication::translate("MainWindow", "MainWindow", nullptr)); + exitAction->setText(QCoreApplication::translate("MainWindow", "&Exit", nullptr)); + aboutQtAction->setText(QCoreApplication::translate("MainWindow", "About Qt", nullptr)); + editStyleAction->setText(QCoreApplication::translate("MainWindow", "Edit &Style", nullptr)); + aboutAction->setText(QCoreApplication::translate("MainWindow", "About", nullptr)); + nameCombo->setItemText(0, QCoreApplication::translate("MainWindow", "Girish", nullptr)); + nameCombo->setItemText(1, QCoreApplication::translate("MainWindow", "Jasmin", nullptr)); + nameCombo->setItemText(2, QCoreApplication::translate("MainWindow", "Simon", nullptr)); + nameCombo->setItemText(3, QCoreApplication::translate("MainWindow", "Zack", nullptr)); + +#if QT_CONFIG(tooltip) + nameCombo->setToolTip(QCoreApplication::translate("MainWindow", "Specify your name", nullptr)); +#endif // QT_CONFIG(tooltip) + femaleRadioButton->setStyleSheet(QCoreApplication::translate("MainWindow", "Check this if you are female", nullptr)); + femaleRadioButton->setText(QCoreApplication::translate("MainWindow", "&Female", nullptr)); + genderLabel->setText(QCoreApplication::translate("MainWindow", "Gender:", nullptr)); + ageLabel->setText(QCoreApplication::translate("MainWindow", "&Age:", nullptr)); +#if QT_CONFIG(tooltip) + maleRadioButton->setToolTip(QCoreApplication::translate("MainWindow", "Check this if you are male", nullptr)); +#endif // QT_CONFIG(tooltip) + maleRadioButton->setText(QCoreApplication::translate("MainWindow", "&Male", nullptr)); + nameLabel->setText(QCoreApplication::translate("MainWindow", "&Name:", nullptr)); + passwordLabel->setText(QCoreApplication::translate("MainWindow", "&Password:", nullptr)); +#if QT_CONFIG(tooltip) + ageSpinBox->setToolTip(QCoreApplication::translate("MainWindow", "Specify your age", nullptr)); +#endif // QT_CONFIG(tooltip) +#if QT_CONFIG(statustip) + ageSpinBox->setStatusTip(QCoreApplication::translate("MainWindow", "Specify your age", nullptr)); +#endif // QT_CONFIG(statustip) +#if QT_CONFIG(tooltip) + agreeCheckBox->setToolTip(QCoreApplication::translate("MainWindow", "Please read the LICENSE file before checking", nullptr)); +#endif // QT_CONFIG(tooltip) + agreeCheckBox->setText(QCoreApplication::translate("MainWindow", "I &accept the terms and &conditions", nullptr)); +#if QT_CONFIG(tooltip) + passwordEdit->setToolTip(QCoreApplication::translate("MainWindow", "Specify your password", nullptr)); +#endif // QT_CONFIG(tooltip) +#if QT_CONFIG(statustip) + passwordEdit->setStatusTip(QCoreApplication::translate("MainWindow", "Specify your password", nullptr)); +#endif // QT_CONFIG(statustip) + passwordEdit->setText(QCoreApplication::translate("MainWindow", "Password", nullptr)); const bool __sortingEnabled = professionList->isSortingEnabled(); professionList->setSortingEnabled(false); QListWidgetItem *___qlistwidgetitem = professionList->item(0); - ___qlistwidgetitem->setText(QApplication::translate("MainWindow", "Developer", nullptr)); + ___qlistwidgetitem->setText(QCoreApplication::translate("MainWindow", "Developer", nullptr)); QListWidgetItem *___qlistwidgetitem1 = professionList->item(1); - ___qlistwidgetitem1->setText(QApplication::translate("MainWindow", "Student", nullptr)); + ___qlistwidgetitem1->setText(QCoreApplication::translate("MainWindow", "Student", nullptr)); QListWidgetItem *___qlistwidgetitem2 = professionList->item(2); - ___qlistwidgetitem2->setText(QApplication::translate("MainWindow", "Fisherman", nullptr)); + ___qlistwidgetitem2->setText(QCoreApplication::translate("MainWindow", "Fisherman", nullptr)); professionList->setSortingEnabled(__sortingEnabled); -#ifndef QT_NO_TOOLTIP - professionList->setToolTip(QApplication::translate("MainWindow", "Select your profession", nullptr)); -#endif // QT_NO_TOOLTIP -#ifndef QT_NO_STATUSTIP - professionList->setStatusTip(QApplication::translate("MainWindow", "Specify your name here", nullptr)); -#endif // QT_NO_STATUSTIP -#ifndef QT_NO_WHATSTHIS - professionList->setWhatsThis(QApplication::translate("MainWindow", "Specify your name here", nullptr)); -#endif // QT_NO_WHATSTHIS - label->setText(QApplication::translate("MainWindow", "Profession:", nullptr)); - countryCombo->setItemText(0, QApplication::translate("MainWindow", "Egypt", nullptr)); - countryCombo->setItemText(1, QApplication::translate("MainWindow", "France", nullptr)); - countryCombo->setItemText(2, QApplication::translate("MainWindow", "Germany", nullptr)); - countryCombo->setItemText(3, QApplication::translate("MainWindow", "India", nullptr)); - countryCombo->setItemText(4, QApplication::translate("MainWindow", "Italy", nullptr)); - countryCombo->setItemText(5, QApplication::translate("MainWindow", "Korea", nullptr)); - countryCombo->setItemText(6, QApplication::translate("MainWindow", "Norway", nullptr)); - -#ifndef QT_NO_TOOLTIP - countryCombo->setToolTip(QApplication::translate("MainWindow", "Specify country of origin", nullptr)); -#endif // QT_NO_TOOLTIP -#ifndef QT_NO_STATUSTIP - countryCombo->setStatusTip(QApplication::translate("MainWindow", "Specify country of origin", nullptr)); -#endif // QT_NO_STATUSTIP - countryLabel->setText(QApplication::translate("MainWindow", "Pro&fession", nullptr)); - menu_File->setTitle(QApplication::translate("MainWindow", "&File", nullptr)); - menu_Help->setTitle(QApplication::translate("MainWindow", "&Help", nullptr)); +#if QT_CONFIG(tooltip) + professionList->setToolTip(QCoreApplication::translate("MainWindow", "Select your profession", nullptr)); +#endif // QT_CONFIG(tooltip) +#if QT_CONFIG(statustip) + professionList->setStatusTip(QCoreApplication::translate("MainWindow", "Specify your name here", nullptr)); +#endif // QT_CONFIG(statustip) +#if QT_CONFIG(whatsthis) + professionList->setWhatsThis(QCoreApplication::translate("MainWindow", "Specify your name here", nullptr)); +#endif // QT_CONFIG(whatsthis) + label->setText(QCoreApplication::translate("MainWindow", "Profession:", nullptr)); + countryCombo->setItemText(0, QCoreApplication::translate("MainWindow", "Egypt", nullptr)); + countryCombo->setItemText(1, QCoreApplication::translate("MainWindow", "France", nullptr)); + countryCombo->setItemText(2, QCoreApplication::translate("MainWindow", "Germany", nullptr)); + countryCombo->setItemText(3, QCoreApplication::translate("MainWindow", "India", nullptr)); + countryCombo->setItemText(4, QCoreApplication::translate("MainWindow", "Italy", nullptr)); + countryCombo->setItemText(5, QCoreApplication::translate("MainWindow", "Korea", nullptr)); + countryCombo->setItemText(6, QCoreApplication::translate("MainWindow", "Norway", nullptr)); + +#if QT_CONFIG(tooltip) + countryCombo->setToolTip(QCoreApplication::translate("MainWindow", "Specify country of origin", nullptr)); +#endif // QT_CONFIG(tooltip) +#if QT_CONFIG(statustip) + countryCombo->setStatusTip(QCoreApplication::translate("MainWindow", "Specify country of origin", nullptr)); +#endif // QT_CONFIG(statustip) + countryLabel->setText(QCoreApplication::translate("MainWindow", "Pro&fession", nullptr)); + menu_File->setTitle(QCoreApplication::translate("MainWindow", "&File", nullptr)); + menu_Help->setTitle(QCoreApplication::translate("MainWindow", "&Help", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/paletteeditor.ui b/tests/auto/tools/uic/baseline/paletteeditor.ui index a4226caa27..62eaaa03ff 100644 --- a/tests/auto/tools/uic/baseline/paletteeditor.ui +++ b/tests/auto/tools/uic/baseline/paletteeditor.ui @@ -1,31 +1,8 @@ <ui version="4.0" > - <comment>********************************************************************* -** -** 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$ -** -*********************************************************************</comment> +<comment> +* Copyright (C) 2016 The Qt Company Ltd. +* SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +</comment> <class>qdesigner_internal::PaletteEditor</class> <widget class="QDialog" name="qdesigner_internal::PaletteEditor" > <property name="geometry" > diff --git a/tests/auto/tools/uic/baseline/paletteeditor.ui.h b/tests/auto/tools/uic/baseline/paletteeditor.ui.h index 0061164960..b0de3d1552 100644 --- a/tests/auto/tools/uic/baseline/paletteeditor.ui.h +++ b/tests/auto/tools/uic/baseline/paletteeditor.ui.h @@ -1,37 +1,14 @@ /* -********************************************************************* -** -** 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$ -** -********************************************************************* + +* Copyright (C) 2016 The Qt Company Ltd. +* SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + */ /******************************************************************************** ** Form generated from reading UI file 'paletteeditor.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -40,6 +17,7 @@ #define PALETTEEDITOR_H #include <QtCore/QVariant> +#include <QtWidgets/QAbstractButton> #include <QtWidgets/QApplication> #include <QtWidgets/QDialog> #include <QtWidgets/QDialogButtonBox> @@ -79,9 +57,9 @@ public: void setupUi(QDialog *qdesigner_internal__PaletteEditor) { if (qdesigner_internal__PaletteEditor->objectName().isEmpty()) - qdesigner_internal__PaletteEditor->setObjectName(QString::fromUtf8("qdesigner_internal__PaletteEditor")); + qdesigner_internal__PaletteEditor->setObjectName("qdesigner_internal__PaletteEditor"); qdesigner_internal__PaletteEditor->resize(365, 409); - QSizePolicy sizePolicy(static_cast<QSizePolicy::Policy>(7), static_cast<QSizePolicy::Policy>(7)); + QSizePolicy sizePolicy(QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Expanding); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); sizePolicy.setHeightForWidth(qdesigner_internal__PaletteEditor->sizePolicy().hasHeightForWidth()); @@ -93,9 +71,9 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); advancedBox = new QGroupBox(qdesigner_internal__PaletteEditor); - advancedBox->setObjectName(QString::fromUtf8("advancedBox")); + advancedBox->setObjectName("advancedBox"); advancedBox->setMinimumSize(QSize(0, 0)); advancedBox->setMaximumSize(QSize(16777215, 16777215)); gridLayout = new QGridLayout(advancedBox); @@ -105,10 +83,10 @@ public: #ifndef Q_OS_MAC gridLayout->setContentsMargins(9, 9, 9, 9); #endif - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); buildButton = new QtColorButton(advancedBox); - buildButton->setObjectName(QString::fromUtf8("buildButton")); - QSizePolicy sizePolicy1(static_cast<QSizePolicy::Policy>(7), static_cast<QSizePolicy::Policy>(13)); + buildButton->setObjectName("buildButton"); + QSizePolicy sizePolicy1(QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Ignored); sizePolicy1.setHorizontalStretch(0); sizePolicy1.setVerticalStretch(0); sizePolicy1.setHeightForWidth(buildButton->sizePolicy().hasHeightForWidth()); @@ -117,24 +95,24 @@ public: gridLayout->addWidget(buildButton, 0, 1, 1, 1); paletteView = new QTreeView(advancedBox); - paletteView->setObjectName(QString::fromUtf8("paletteView")); + paletteView->setObjectName("paletteView"); paletteView->setMinimumSize(QSize(0, 200)); gridLayout->addWidget(paletteView, 1, 0, 1, 4); detailsRadio = new QRadioButton(advancedBox); - detailsRadio->setObjectName(QString::fromUtf8("detailsRadio")); + detailsRadio->setObjectName("detailsRadio"); gridLayout->addWidget(detailsRadio, 0, 3, 1, 1); computeRadio = new QRadioButton(advancedBox); - computeRadio->setObjectName(QString::fromUtf8("computeRadio")); + computeRadio->setObjectName("computeRadio"); computeRadio->setChecked(true); gridLayout->addWidget(computeRadio, 0, 2, 1, 1); label = new QLabel(advancedBox); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName("label"); gridLayout->addWidget(label, 0, 0, 1, 1); @@ -142,8 +120,8 @@ public: vboxLayout->addWidget(advancedBox); GroupBox126 = new QGroupBox(qdesigner_internal__PaletteEditor); - GroupBox126->setObjectName(QString::fromUtf8("GroupBox126")); - QSizePolicy sizePolicy2(static_cast<QSizePolicy::Policy>(5), static_cast<QSizePolicy::Policy>(7)); + GroupBox126->setObjectName("GroupBox126"); + QSizePolicy sizePolicy2(QSizePolicy::Policy::Preferred, QSizePolicy::Policy::Expanding); sizePolicy2.setHorizontalStretch(0); sizePolicy2.setVerticalStretch(0); sizePolicy2.setHeightForWidth(GroupBox126->sizePolicy().hasHeightForWidth()); @@ -153,25 +131,25 @@ public: gridLayout1->setSpacing(6); #endif gridLayout1->setContentsMargins(8, 8, 8, 8); - gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); + gridLayout1->setObjectName("gridLayout1"); disabledRadio = new QRadioButton(GroupBox126); - disabledRadio->setObjectName(QString::fromUtf8("disabledRadio")); + disabledRadio->setObjectName("disabledRadio"); gridLayout1->addWidget(disabledRadio, 0, 2, 1, 1); inactiveRadio = new QRadioButton(GroupBox126); - inactiveRadio->setObjectName(QString::fromUtf8("inactiveRadio")); + inactiveRadio->setObjectName("inactiveRadio"); gridLayout1->addWidget(inactiveRadio, 0, 1, 1, 1); activeRadio = new QRadioButton(GroupBox126); - activeRadio->setObjectName(QString::fromUtf8("activeRadio")); + activeRadio->setObjectName("activeRadio"); activeRadio->setChecked(true); gridLayout1->addWidget(activeRadio, 0, 0, 1, 1); previewFrame = new qdesigner_internal::PreviewFrame(GroupBox126); - previewFrame->setObjectName(QString::fromUtf8("previewFrame")); + previewFrame->setObjectName("previewFrame"); sizePolicy.setHeightForWidth(previewFrame->sizePolicy().hasHeightForWidth()); previewFrame->setSizePolicy(sizePolicy); @@ -181,7 +159,7 @@ public: vboxLayout->addWidget(GroupBox126); buttonBox = new QDialogButtonBox(qdesigner_internal__PaletteEditor); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName("buttonBox"); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok); @@ -189,24 +167,24 @@ public: retranslateUi(qdesigner_internal__PaletteEditor); - QObject::connect(buttonBox, SIGNAL(accepted()), qdesigner_internal__PaletteEditor, SLOT(accept())); - QObject::connect(buttonBox, SIGNAL(rejected()), qdesigner_internal__PaletteEditor, SLOT(reject())); + QObject::connect(buttonBox, &QDialogButtonBox::accepted, qdesigner_internal__PaletteEditor, qOverload<>(&QDialog::accept)); + QObject::connect(buttonBox, &QDialogButtonBox::rejected, qdesigner_internal__PaletteEditor, qOverload<>(&QDialog::reject)); QMetaObject::connectSlotsByName(qdesigner_internal__PaletteEditor); } // setupUi void retranslateUi(QDialog *qdesigner_internal__PaletteEditor) { - qdesigner_internal__PaletteEditor->setWindowTitle(QApplication::translate("qdesigner_internal::PaletteEditor", "Edit Palette", nullptr)); - advancedBox->setTitle(QApplication::translate("qdesigner_internal::PaletteEditor", "Tune Palette", nullptr)); + qdesigner_internal__PaletteEditor->setWindowTitle(QCoreApplication::translate("qdesigner_internal::PaletteEditor", "Edit Palette", nullptr)); + advancedBox->setTitle(QCoreApplication::translate("qdesigner_internal::PaletteEditor", "Tune Palette", nullptr)); buildButton->setText(QString()); - detailsRadio->setText(QApplication::translate("qdesigner_internal::PaletteEditor", "Show Details", nullptr)); - computeRadio->setText(QApplication::translate("qdesigner_internal::PaletteEditor", "Compute Details", nullptr)); - label->setText(QApplication::translate("qdesigner_internal::PaletteEditor", "Quick", nullptr)); - GroupBox126->setTitle(QApplication::translate("qdesigner_internal::PaletteEditor", "Preview", nullptr)); - disabledRadio->setText(QApplication::translate("qdesigner_internal::PaletteEditor", "Disabled", nullptr)); - inactiveRadio->setText(QApplication::translate("qdesigner_internal::PaletteEditor", "Inactive", nullptr)); - activeRadio->setText(QApplication::translate("qdesigner_internal::PaletteEditor", "Active", nullptr)); + detailsRadio->setText(QCoreApplication::translate("qdesigner_internal::PaletteEditor", "Show Details", nullptr)); + computeRadio->setText(QCoreApplication::translate("qdesigner_internal::PaletteEditor", "Compute Details", nullptr)); + label->setText(QCoreApplication::translate("qdesigner_internal::PaletteEditor", "Quick", nullptr)); + GroupBox126->setTitle(QCoreApplication::translate("qdesigner_internal::PaletteEditor", "Preview", nullptr)); + disabledRadio->setText(QCoreApplication::translate("qdesigner_internal::PaletteEditor", "Disabled", nullptr)); + inactiveRadio->setText(QCoreApplication::translate("qdesigner_internal::PaletteEditor", "Inactive", nullptr)); + activeRadio->setText(QCoreApplication::translate("qdesigner_internal::PaletteEditor", "Active", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/passworddialog.ui.h b/tests/auto/tools/uic/baseline/passworddialog.ui.h index 9ab95c4de9..4ff520c355 100644 --- a/tests/auto/tools/uic/baseline/passworddialog.ui.h +++ b/tests/auto/tools/uic/baseline/passworddialog.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'passworddialog.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -10,6 +10,7 @@ #define PASSWORDDIALOG_H #include <QtCore/QVariant> +#include <QtWidgets/QAbstractButton> #include <QtWidgets/QApplication> #include <QtWidgets/QDialog> #include <QtWidgets/QDialogButtonBox> @@ -36,20 +37,20 @@ public: void setupUi(QDialog *PasswordDialog) { if (PasswordDialog->objectName().isEmpty()) - PasswordDialog->setObjectName(QString::fromUtf8("PasswordDialog")); + PasswordDialog->setObjectName("PasswordDialog"); PasswordDialog->resize(399, 148); gridLayout = new QGridLayout(PasswordDialog); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); hboxLayout = new QHBoxLayout(); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName("hboxLayout"); iconLabel = new QLabel(PasswordDialog); - iconLabel->setObjectName(QString::fromUtf8("iconLabel")); + iconLabel->setObjectName("iconLabel"); hboxLayout->addWidget(iconLabel); introLabel = new QLabel(PasswordDialog); - introLabel->setObjectName(QString::fromUtf8("introLabel")); - QSizePolicy sizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); + introLabel->setObjectName("introLabel"); + QSizePolicy sizePolicy(QSizePolicy::Policy::MinimumExpanding, QSizePolicy::Policy::MinimumExpanding); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); sizePolicy.setHeightForWidth(introLabel->sizePolicy().hasHeightForWidth()); @@ -61,28 +62,28 @@ public: gridLayout->addLayout(hboxLayout, 0, 0, 1, 2); label = new QLabel(PasswordDialog); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName("label"); gridLayout->addWidget(label, 1, 0, 1, 1); userNameLineEdit = new QLineEdit(PasswordDialog); - userNameLineEdit->setObjectName(QString::fromUtf8("userNameLineEdit")); + userNameLineEdit->setObjectName("userNameLineEdit"); gridLayout->addWidget(userNameLineEdit, 1, 1, 1, 1); lblPassword = new QLabel(PasswordDialog); - lblPassword->setObjectName(QString::fromUtf8("lblPassword")); + lblPassword->setObjectName("lblPassword"); gridLayout->addWidget(lblPassword, 2, 0, 1, 1); passwordLineEdit = new QLineEdit(PasswordDialog); - passwordLineEdit->setObjectName(QString::fromUtf8("passwordLineEdit")); + passwordLineEdit->setObjectName("passwordLineEdit"); passwordLineEdit->setEchoMode(QLineEdit::Password); gridLayout->addWidget(passwordLineEdit, 2, 1, 1, 1); buttonBox = new QDialogButtonBox(PasswordDialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName("buttonBox"); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); @@ -90,19 +91,19 @@ public: retranslateUi(PasswordDialog); - QObject::connect(buttonBox, SIGNAL(accepted()), PasswordDialog, SLOT(accept())); - QObject::connect(buttonBox, SIGNAL(rejected()), PasswordDialog, SLOT(reject())); + QObject::connect(buttonBox, &QDialogButtonBox::accepted, PasswordDialog, qOverload<>(&QDialog::accept)); + QObject::connect(buttonBox, &QDialogButtonBox::rejected, PasswordDialog, qOverload<>(&QDialog::reject)); QMetaObject::connectSlotsByName(PasswordDialog); } // setupUi void retranslateUi(QDialog *PasswordDialog) { - PasswordDialog->setWindowTitle(QApplication::translate("PasswordDialog", "Authentication Required", nullptr)); - iconLabel->setText(QApplication::translate("PasswordDialog", "DUMMY ICON", nullptr)); - introLabel->setText(QApplication::translate("PasswordDialog", "INTRO TEXT DUMMY", nullptr)); - label->setText(QApplication::translate("PasswordDialog", "Username:", nullptr)); - lblPassword->setText(QApplication::translate("PasswordDialog", "Password:", nullptr)); + PasswordDialog->setWindowTitle(QCoreApplication::translate("PasswordDialog", "Authentication Required", nullptr)); + iconLabel->setText(QCoreApplication::translate("PasswordDialog", "DUMMY ICON", nullptr)); + introLabel->setText(QCoreApplication::translate("PasswordDialog", "INTRO TEXT DUMMY", nullptr)); + label->setText(QCoreApplication::translate("PasswordDialog", "Username:", nullptr)); + lblPassword->setText(QCoreApplication::translate("PasswordDialog", "Password:", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/pathpage.ui b/tests/auto/tools/uic/baseline/pathpage.ui index 89083915dd..06637e6a53 100644 --- a/tests/auto/tools/uic/baseline/pathpage.ui +++ b/tests/auto/tools/uic/baseline/pathpage.ui @@ -35,7 +35,7 @@ <enum>Qt::Vertical</enum> </property> <property name="sizeType" > - <enum>QSizePolicy::Fixed</enum> + <enum>QSizePolicy::Policy::Fixed</enum> </property> <property name="sizeHint" > <size> diff --git a/tests/auto/tools/uic/baseline/pathpage.ui.h b/tests/auto/tools/uic/baseline/pathpage.ui.h index eb151f9550..3e7a8b8622 100644 --- a/tests/auto/tools/uic/baseline/pathpage.ui.h +++ b/tests/auto/tools/uic/baseline/pathpage.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'pathpage.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -38,13 +38,13 @@ public: void setupUi(QWidget *PathPage) { if (PathPage->objectName().isEmpty()) - PathPage->setObjectName(QString::fromUtf8("PathPage")); + PathPage->setObjectName("PathPage"); PathPage->resize(417, 243); gridLayout = new QGridLayout(PathPage); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); label_2 = new QLabel(PathPage); - label_2->setObjectName(QString::fromUtf8("label_2")); - QSizePolicy sizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred); + label_2->setObjectName("label_2"); + QSizePolicy sizePolicy(QSizePolicy::Policy::Maximum, QSizePolicy::Policy::Preferred); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); sizePolicy.setHeightForWidth(label_2->sizePolicy().hasHeightForWidth()); @@ -53,27 +53,27 @@ public: gridLayout->addWidget(label_2, 0, 0, 1, 1); filterLineEdit = new QLineEdit(PathPage); - filterLineEdit->setObjectName(QString::fromUtf8("filterLineEdit")); + filterLineEdit->setObjectName("filterLineEdit"); gridLayout->addWidget(filterLineEdit, 0, 1, 1, 2); - spacerItem = new QSpacerItem(20, 10, QSizePolicy::Minimum, QSizePolicy::Fixed); + spacerItem = new QSpacerItem(20, 10, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Fixed); gridLayout->addItem(spacerItem, 1, 1, 1, 1); label = new QLabel(PathPage); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName("label"); gridLayout->addWidget(label, 2, 0, 1, 3); pathListWidget = new QListWidget(PathPage); - pathListWidget->setObjectName(QString::fromUtf8("pathListWidget")); + pathListWidget->setObjectName("pathListWidget"); gridLayout->addWidget(pathListWidget, 3, 0, 3, 3); addButton = new QPushButton(PathPage); - addButton->setObjectName(QString::fromUtf8("addButton")); - QSizePolicy sizePolicy1(QSizePolicy::Maximum, QSizePolicy::Fixed); + addButton->setObjectName("addButton"); + QSizePolicy sizePolicy1(QSizePolicy::Policy::Maximum, QSizePolicy::Policy::Fixed); sizePolicy1.setHorizontalStretch(0); sizePolicy1.setVerticalStretch(0); sizePolicy1.setHeightForWidth(addButton->sizePolicy().hasHeightForWidth()); @@ -82,17 +82,17 @@ public: gridLayout->addWidget(addButton, 3, 3, 1, 1); removeButton = new QPushButton(PathPage); - removeButton->setObjectName(QString::fromUtf8("removeButton")); + removeButton->setObjectName("removeButton"); sizePolicy1.setHeightForWidth(removeButton->sizePolicy().hasHeightForWidth()); removeButton->setSizePolicy(sizePolicy1); gridLayout->addWidget(removeButton, 4, 3, 1, 1); - spacerItem1 = new QSpacerItem(20, 51, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem1 = new QSpacerItem(20, 51, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Expanding); gridLayout->addItem(spacerItem1, 5, 3, 1, 1); - spacerItem2 = new QSpacerItem(20, 31, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem2 = new QSpacerItem(20, 31, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Expanding); gridLayout->addItem(spacerItem2, 6, 2, 1, 1); @@ -104,11 +104,11 @@ public: void retranslateUi(QWidget *PathPage) { - PathPage->setWindowTitle(QApplication::translate("PathPage", "Form", nullptr)); - label_2->setText(QApplication::translate("PathPage", "File filters:", nullptr)); - label->setText(QApplication::translate("PathPage", "Documentation source file paths:", nullptr)); - addButton->setText(QApplication::translate("PathPage", "Add", nullptr)); - removeButton->setText(QApplication::translate("PathPage", "Remove", nullptr)); + PathPage->setWindowTitle(QCoreApplication::translate("PathPage", "Form", nullptr)); + label_2->setText(QCoreApplication::translate("PathPage", "File filters:", nullptr)); + label->setText(QCoreApplication::translate("PathPage", "Documentation source file paths:", nullptr)); + addButton->setText(QCoreApplication::translate("PathPage", "Add", nullptr)); + removeButton->setText(QCoreApplication::translate("PathPage", "Remove", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/phrasebookbox.ui b/tests/auto/tools/uic/baseline/phrasebookbox.ui index 3377106dc3..a67b8d74a0 100644 --- a/tests/auto/tools/uic/baseline/phrasebookbox.ui +++ b/tests/auto/tools/uic/baseline/phrasebookbox.ui @@ -1,31 +1,8 @@ <ui version="4.0" > - <comment>********************************************************************* -** -** 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$ -** -*********************************************************************</comment> +<comment> +* Copyright (C) 2016 The Qt Company Ltd. +* SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +</comment> <class>PhraseBookBox</class> <widget class="QDialog" name="PhraseBookBox" > <property name="geometry" > @@ -169,7 +146,7 @@ <enum>Qt::Vertical</enum> </property> <property name="sizeType" > - <enum>QSizePolicy::Expanding</enum> + <enum>QSizePolicy::Policy::Expanding</enum> </property> <property name="sizeHint" stdset="0" > <size> diff --git a/tests/auto/tools/uic/baseline/phrasebookbox.ui.h b/tests/auto/tools/uic/baseline/phrasebookbox.ui.h index 27a0fa79ed..d71dfd410d 100644 --- a/tests/auto/tools/uic/baseline/phrasebookbox.ui.h +++ b/tests/auto/tools/uic/baseline/phrasebookbox.ui.h @@ -1,37 +1,14 @@ /* -********************************************************************* -** -** 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$ -** -********************************************************************* + +* Copyright (C) 2016 The Qt Company Ltd. +* SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + */ /******************************************************************************** ** Form generated from reading UI file 'phrasebookbox.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -77,45 +54,45 @@ public: void setupUi(QDialog *PhraseBookBox) { if (PhraseBookBox->objectName().isEmpty()) - PhraseBookBox->setObjectName(QString::fromUtf8("PhraseBookBox")); + PhraseBookBox->setObjectName("PhraseBookBox"); PhraseBookBox->resize(596, 454); unnamed = new QHBoxLayout(PhraseBookBox); unnamed->setSpacing(6); unnamed->setContentsMargins(11, 11, 11, 11); - unnamed->setObjectName(QString::fromUtf8("unnamed")); + unnamed->setObjectName("unnamed"); inputsLayout = new QVBoxLayout(); inputsLayout->setSpacing(6); - inputsLayout->setObjectName(QString::fromUtf8("inputsLayout")); + inputsLayout->setObjectName("inputsLayout"); gridLayout = new QGridLayout(); gridLayout->setSpacing(6); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); target = new QLabel(PhraseBookBox); - target->setObjectName(QString::fromUtf8("target")); + target->setObjectName("target"); gridLayout->addWidget(target, 1, 0, 1, 1); targetLed = new QLineEdit(PhraseBookBox); - targetLed->setObjectName(QString::fromUtf8("targetLed")); + targetLed->setObjectName("targetLed"); gridLayout->addWidget(targetLed, 1, 1, 1, 1); source = new QLabel(PhraseBookBox); - source->setObjectName(QString::fromUtf8("source")); + source->setObjectName("source"); gridLayout->addWidget(source, 0, 0, 1, 1); definitionLed = new QLineEdit(PhraseBookBox); - definitionLed->setObjectName(QString::fromUtf8("definitionLed")); + definitionLed->setObjectName("definitionLed"); gridLayout->addWidget(definitionLed, 2, 1, 1, 1); sourceLed = new QLineEdit(PhraseBookBox); - sourceLed->setObjectName(QString::fromUtf8("sourceLed")); + sourceLed->setObjectName("sourceLed"); gridLayout->addWidget(sourceLed, 0, 1, 1, 1); definition = new QLabel(PhraseBookBox); - definition->setObjectName(QString::fromUtf8("definition")); + definition->setObjectName("definition"); gridLayout->addWidget(definition, 2, 0, 1, 1); @@ -123,7 +100,7 @@ public: inputsLayout->addLayout(gridLayout); phraseList = new QTreeView(PhraseBookBox); - phraseList->setObjectName(QString::fromUtf8("phraseList")); + phraseList->setObjectName("phraseList"); phraseList->setRootIsDecorated(false); phraseList->setUniformRowHeights(true); phraseList->setItemsExpandable(false); @@ -137,39 +114,39 @@ public: buttonLayout = new QVBoxLayout(); buttonLayout->setSpacing(6); - buttonLayout->setObjectName(QString::fromUtf8("buttonLayout")); + buttonLayout->setObjectName("buttonLayout"); newBut = new QPushButton(PhraseBookBox); - newBut->setObjectName(QString::fromUtf8("newBut")); + newBut->setObjectName("newBut"); buttonLayout->addWidget(newBut); removeBut = new QPushButton(PhraseBookBox); - removeBut->setObjectName(QString::fromUtf8("removeBut")); + removeBut->setObjectName("removeBut"); buttonLayout->addWidget(removeBut); saveBut = new QPushButton(PhraseBookBox); - saveBut->setObjectName(QString::fromUtf8("saveBut")); + saveBut->setObjectName("saveBut"); buttonLayout->addWidget(saveBut); closeBut = new QPushButton(PhraseBookBox); - closeBut->setObjectName(QString::fromUtf8("closeBut")); + closeBut->setObjectName("closeBut"); buttonLayout->addWidget(closeBut); - spacer1 = new QSpacerItem(20, 51, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacer1 = new QSpacerItem(20, 51, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Expanding); buttonLayout->addItem(spacer1); unnamed->addLayout(buttonLayout); -#ifndef QT_NO_SHORTCUT +#if QT_CONFIG(shortcut) target->setBuddy(targetLed); source->setBuddy(sourceLed); definition->setBuddy(definitionLed); -#endif // QT_NO_SHORTCUT +#endif // QT_CONFIG(shortcut) QWidget::setTabOrder(sourceLed, targetLed); QWidget::setTabOrder(targetLed, definitionLed); QWidget::setTabOrder(definitionLed, newBut); @@ -184,38 +161,38 @@ public: void retranslateUi(QDialog *PhraseBookBox) { - PhraseBookBox->setWindowTitle(QApplication::translate("PhraseBookBox", "Edit Phrase Book", nullptr)); -#ifndef QT_NO_WHATSTHIS - PhraseBookBox->setWhatsThis(QApplication::translate("PhraseBookBox", "This window allows you to add, modify, or delete phrases in a phrase book.", nullptr)); -#endif // QT_NO_WHATSTHIS - target->setText(QApplication::translate("PhraseBookBox", "&Translation:", nullptr)); -#ifndef QT_NO_WHATSTHIS - targetLed->setWhatsThis(QApplication::translate("PhraseBookBox", "This is the phrase in the target language corresponding to the source phrase.", nullptr)); -#endif // QT_NO_WHATSTHIS - source->setText(QApplication::translate("PhraseBookBox", "S&ource phrase:", nullptr)); -#ifndef QT_NO_WHATSTHIS - definitionLed->setWhatsThis(QApplication::translate("PhraseBookBox", "This is a definition for the source phrase.", nullptr)); -#endif // QT_NO_WHATSTHIS -#ifndef QT_NO_WHATSTHIS - sourceLed->setWhatsThis(QApplication::translate("PhraseBookBox", "This is the phrase in the source language.", nullptr)); -#endif // QT_NO_WHATSTHIS - definition->setText(QApplication::translate("PhraseBookBox", "&Definition:", nullptr)); -#ifndef QT_NO_WHATSTHIS - newBut->setWhatsThis(QApplication::translate("PhraseBookBox", "Click here to add the phrase to the phrase book.", nullptr)); -#endif // QT_NO_WHATSTHIS - newBut->setText(QApplication::translate("PhraseBookBox", "&New Phrase", nullptr)); -#ifndef QT_NO_WHATSTHIS - removeBut->setWhatsThis(QApplication::translate("PhraseBookBox", "Click here to remove the phrase from the phrase book.", nullptr)); -#endif // QT_NO_WHATSTHIS - removeBut->setText(QApplication::translate("PhraseBookBox", "&Remove Phrase", nullptr)); -#ifndef QT_NO_WHATSTHIS - saveBut->setWhatsThis(QApplication::translate("PhraseBookBox", "Click here to save the changes made.", nullptr)); -#endif // QT_NO_WHATSTHIS - saveBut->setText(QApplication::translate("PhraseBookBox", "&Save", nullptr)); -#ifndef QT_NO_WHATSTHIS - closeBut->setWhatsThis(QApplication::translate("PhraseBookBox", "Click here to close this window.", nullptr)); -#endif // QT_NO_WHATSTHIS - closeBut->setText(QApplication::translate("PhraseBookBox", "Close", nullptr)); + PhraseBookBox->setWindowTitle(QCoreApplication::translate("PhraseBookBox", "Edit Phrase Book", nullptr)); +#if QT_CONFIG(whatsthis) + PhraseBookBox->setWhatsThis(QCoreApplication::translate("PhraseBookBox", "This window allows you to add, modify, or delete phrases in a phrase book.", nullptr)); +#endif // QT_CONFIG(whatsthis) + target->setText(QCoreApplication::translate("PhraseBookBox", "&Translation:", nullptr)); +#if QT_CONFIG(whatsthis) + targetLed->setWhatsThis(QCoreApplication::translate("PhraseBookBox", "This is the phrase in the target language corresponding to the source phrase.", nullptr)); +#endif // QT_CONFIG(whatsthis) + source->setText(QCoreApplication::translate("PhraseBookBox", "S&ource phrase:", nullptr)); +#if QT_CONFIG(whatsthis) + definitionLed->setWhatsThis(QCoreApplication::translate("PhraseBookBox", "This is a definition for the source phrase.", nullptr)); +#endif // QT_CONFIG(whatsthis) +#if QT_CONFIG(whatsthis) + sourceLed->setWhatsThis(QCoreApplication::translate("PhraseBookBox", "This is the phrase in the source language.", nullptr)); +#endif // QT_CONFIG(whatsthis) + definition->setText(QCoreApplication::translate("PhraseBookBox", "&Definition:", nullptr)); +#if QT_CONFIG(whatsthis) + newBut->setWhatsThis(QCoreApplication::translate("PhraseBookBox", "Click here to add the phrase to the phrase book.", nullptr)); +#endif // QT_CONFIG(whatsthis) + newBut->setText(QCoreApplication::translate("PhraseBookBox", "&New Phrase", nullptr)); +#if QT_CONFIG(whatsthis) + removeBut->setWhatsThis(QCoreApplication::translate("PhraseBookBox", "Click here to remove the phrase from the phrase book.", nullptr)); +#endif // QT_CONFIG(whatsthis) + removeBut->setText(QCoreApplication::translate("PhraseBookBox", "&Remove Phrase", nullptr)); +#if QT_CONFIG(whatsthis) + saveBut->setWhatsThis(QCoreApplication::translate("PhraseBookBox", "Click here to save the changes made.", nullptr)); +#endif // QT_CONFIG(whatsthis) + saveBut->setText(QCoreApplication::translate("PhraseBookBox", "&Save", nullptr)); +#if QT_CONFIG(whatsthis) + closeBut->setWhatsThis(QCoreApplication::translate("PhraseBookBox", "Click here to close this window.", nullptr)); +#endif // QT_CONFIG(whatsthis) + closeBut->setText(QCoreApplication::translate("PhraseBookBox", "Close", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/pixmapfunction.ui.h b/tests/auto/tools/uic/baseline/pixmapfunction.ui.h index 1644380c15..f7bca4c396 100644 --- a/tests/auto/tools/uic/baseline/pixmapfunction.ui.h +++ b/tests/auto/tools/uic/baseline/pixmapfunction.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'pixmapfunction.ui' ** -** Created by: Qt User Interface Compiler version 5.12.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -29,23 +29,23 @@ public: void setupUi(QWidget *Form) { if (Form->objectName().isEmpty()) - Form->setObjectName(QString::fromUtf8("Form")); + Form->setObjectName("Form"); Form->resize(149, 112); verticalLayout = new QVBoxLayout(Form); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + verticalLayout->setObjectName("verticalLayout"); label = new QLabel(Form); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName("label"); label->setPixmap(QPixmap(pixmapFunction("labelPixmap"))); verticalLayout->addWidget(label); pushButton = new QPushButton(Form); - pushButton->setObjectName(QString::fromUtf8("pushButton")); + pushButton->setObjectName("pushButton"); QIcon icon; - icon.addPixmap(QPixmap(pixmapFunction("buttonIconNormalOff")), QIcon::Normal, QIcon::Off); - icon.addPixmap(QPixmap(pixmapFunction("buttonIconNormalOn")), QIcon::Normal, QIcon::On); - icon.addPixmap(QPixmap(pixmapFunction("buttonIconDisabledOff")), QIcon::Disabled, QIcon::Off); - icon.addPixmap(QPixmap(pixmapFunction("buttonIconDisabledOn")), QIcon::Disabled, QIcon::On); + icon.addPixmap(QPixmap(pixmapFunction("buttonIconNormalOff")), QIcon::Mode::Normal, QIcon::State::Off); + icon.addPixmap(QPixmap(pixmapFunction("buttonIconNormalOn")), QIcon::Mode::Normal, QIcon::State::On); + icon.addPixmap(QPixmap(pixmapFunction("buttonIconDisabledOff")), QIcon::Mode::Disabled, QIcon::State::Off); + icon.addPixmap(QPixmap(pixmapFunction("buttonIconDisabledOn")), QIcon::Mode::Disabled, QIcon::State::On); pushButton->setIcon(icon); verticalLayout->addWidget(pushButton); @@ -58,9 +58,9 @@ public: void retranslateUi(QWidget *Form) { - Form->setWindowTitle(QApplication::translate("Form", "Form", nullptr)); + Form->setWindowTitle(QCoreApplication::translate("Form", "Form", nullptr)); label->setText(QString()); - pushButton->setText(QApplication::translate("Form", "PushButton", nullptr)); + pushButton->setText(QCoreApplication::translate("Form", "PushButton", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/plugindialog.ui b/tests/auto/tools/uic/baseline/plugindialog.ui index 15bb8ade45..7c0a61aad5 100644 --- a/tests/auto/tools/uic/baseline/plugindialog.ui +++ b/tests/auto/tools/uic/baseline/plugindialog.ui @@ -1,31 +1,8 @@ <ui version="4.0" > - <comment>********************************************************************* -** -** 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$ -** -*********************************************************************</comment> +<comment> +* Copyright (C) 2016 The Qt Company Ltd. +* SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +</comment> <class>PluginDialog</class> <widget class="QDialog" name="PluginDialog" > <property name="geometry" > diff --git a/tests/auto/tools/uic/baseline/plugindialog.ui.h b/tests/auto/tools/uic/baseline/plugindialog.ui.h index 3634b8436f..448404e3a1 100644 --- a/tests/auto/tools/uic/baseline/plugindialog.ui.h +++ b/tests/auto/tools/uic/baseline/plugindialog.ui.h @@ -1,37 +1,14 @@ /* -********************************************************************* -** -** 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$ -** -********************************************************************* + +* Copyright (C) 2016 The Qt Company Ltd. +* SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + */ /******************************************************************************** ** Form generated from reading UI file 'plugindialog.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -40,6 +17,7 @@ #define PLUGINDIALOG_H #include <QtCore/QVariant> +#include <QtWidgets/QAbstractButton> #include <QtWidgets/QApplication> #include <QtWidgets/QDialog> #include <QtWidgets/QDialogButtonBox> @@ -64,39 +42,39 @@ public: void setupUi(QDialog *PluginDialog) { if (PluginDialog->objectName().isEmpty()) - PluginDialog->setObjectName(QString::fromUtf8("PluginDialog")); + PluginDialog->setObjectName("PluginDialog"); PluginDialog->resize(401, 331); vboxLayout = new QVBoxLayout(PluginDialog); vboxLayout->setSpacing(6); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); vboxLayout->setContentsMargins(8, 8, 8, 8); label = new QLabel(PluginDialog); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName("label"); label->setWordWrap(true); vboxLayout->addWidget(label); treeWidget = new QTreeWidget(PluginDialog); - treeWidget->setObjectName(QString::fromUtf8("treeWidget")); + treeWidget->setObjectName("treeWidget"); treeWidget->setTextElideMode(Qt::ElideNone); vboxLayout->addWidget(treeWidget); message = new QLabel(PluginDialog); - message->setObjectName(QString::fromUtf8("message")); + message->setObjectName("message"); message->setWordWrap(true); vboxLayout->addWidget(message); hboxLayout = new QHBoxLayout(); hboxLayout->setSpacing(6); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName("hboxLayout"); hboxLayout->setContentsMargins(0, 0, 0, 0); vboxLayout->addLayout(hboxLayout); buttonBox = new QDialogButtonBox(PluginDialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName("buttonBox"); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Close); @@ -104,18 +82,18 @@ public: retranslateUi(PluginDialog); - QObject::connect(buttonBox, SIGNAL(rejected()), PluginDialog, SLOT(reject())); + QObject::connect(buttonBox, &QDialogButtonBox::rejected, PluginDialog, qOverload<>(&QDialog::reject)); QMetaObject::connectSlotsByName(PluginDialog); } // setupUi void retranslateUi(QDialog *PluginDialog) { - PluginDialog->setWindowTitle(QApplication::translate("PluginDialog", "Plugin Information", nullptr)); - label->setText(QApplication::translate("PluginDialog", "TextLabel", nullptr)); + PluginDialog->setWindowTitle(QCoreApplication::translate("PluginDialog", "Plugin Information", nullptr)); + label->setText(QCoreApplication::translate("PluginDialog", "TextLabel", nullptr)); QTreeWidgetItem *___qtreewidgetitem = treeWidget->headerItem(); - ___qtreewidgetitem->setText(0, QApplication::translate("PluginDialog", "1", nullptr)); - message->setText(QApplication::translate("PluginDialog", "TextLabel", nullptr)); + ___qtreewidgetitem->setText(0, QCoreApplication::translate("PluginDialog", "1", nullptr)); + message->setText(QCoreApplication::translate("PluginDialog", "TextLabel", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/preferencesdialog.ui.h b/tests/auto/tools/uic/baseline/preferencesdialog.ui.h index 289e6775b4..a181b99b34 100644 --- a/tests/auto/tools/uic/baseline/preferencesdialog.ui.h +++ b/tests/auto/tools/uic/baseline/preferencesdialog.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'preferencesdialog.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -10,6 +10,7 @@ #define PREFERENCESDIALOG_H #include <QtCore/QVariant> +#include <QtWidgets/QAbstractButton> #include <QtWidgets/QApplication> #include <QtWidgets/QComboBox> #include <QtWidgets/QDialog> @@ -53,21 +54,21 @@ public: void setupUi(QDialog *PreferencesDialog) { if (PreferencesDialog->objectName().isEmpty()) - PreferencesDialog->setObjectName(QString::fromUtf8("PreferencesDialog")); + PreferencesDialog->setObjectName("PreferencesDialog"); PreferencesDialog->resize(455, 359); PreferencesDialog->setModal(true); vboxLayout = new QVBoxLayout(PreferencesDialog); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); hboxLayout = new QHBoxLayout(); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName("hboxLayout"); vboxLayout1 = new QVBoxLayout(); - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName("vboxLayout1"); m_uiModeGroupBox = new QGroupBox(PreferencesDialog); - m_uiModeGroupBox->setObjectName(QString::fromUtf8("m_uiModeGroupBox")); + m_uiModeGroupBox->setObjectName("m_uiModeGroupBox"); vboxLayout2 = new QVBoxLayout(m_uiModeGroupBox); - vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2")); + vboxLayout2->setObjectName("vboxLayout2"); m_uiModeCombo = new QComboBox(m_uiModeGroupBox); - m_uiModeCombo->setObjectName(QString::fromUtf8("m_uiModeCombo")); + m_uiModeCombo->setObjectName("m_uiModeCombo"); vboxLayout2->addWidget(m_uiModeCombo); @@ -75,12 +76,12 @@ public: vboxLayout1->addWidget(m_uiModeGroupBox); m_fontPanel = new FontPanel(PreferencesDialog); - m_fontPanel->setObjectName(QString::fromUtf8("m_fontPanel")); + m_fontPanel->setObjectName("m_fontPanel"); vboxLayout1->addWidget(m_fontPanel); m_previewConfigurationWidget = new qdesigner_internal::PreviewConfigurationWidget(PreferencesDialog); - m_previewConfigurationWidget->setObjectName(QString::fromUtf8("m_previewConfigurationWidget")); + m_previewConfigurationWidget->setObjectName("m_previewConfigurationWidget"); vboxLayout1->addWidget(m_previewConfigurationWidget); @@ -88,27 +89,27 @@ public: hboxLayout->addLayout(vboxLayout1); vboxLayout3 = new QVBoxLayout(); - vboxLayout3->setObjectName(QString::fromUtf8("vboxLayout3")); + vboxLayout3->setObjectName("vboxLayout3"); m_templatePathGroupBox = new QGroupBox(PreferencesDialog); - m_templatePathGroupBox->setObjectName(QString::fromUtf8("m_templatePathGroupBox")); + m_templatePathGroupBox->setObjectName("m_templatePathGroupBox"); gridLayout = new QGridLayout(m_templatePathGroupBox); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); m_templatePathListWidget = new QListWidget(m_templatePathGroupBox); - m_templatePathListWidget->setObjectName(QString::fromUtf8("m_templatePathListWidget")); + m_templatePathListWidget->setObjectName("m_templatePathListWidget"); gridLayout->addWidget(m_templatePathListWidget, 0, 0, 1, 3); m_addTemplatePathButton = new QToolButton(m_templatePathGroupBox); - m_addTemplatePathButton->setObjectName(QString::fromUtf8("m_addTemplatePathButton")); + m_addTemplatePathButton->setObjectName("m_addTemplatePathButton"); gridLayout->addWidget(m_addTemplatePathButton, 1, 0, 1, 1); m_removeTemplatePathButton = new QToolButton(m_templatePathGroupBox); - m_removeTemplatePathButton->setObjectName(QString::fromUtf8("m_removeTemplatePathButton")); + m_removeTemplatePathButton->setObjectName("m_removeTemplatePathButton"); gridLayout->addWidget(m_removeTemplatePathButton, 1, 1, 1, 1); - spacerItem = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacerItem = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); gridLayout->addItem(spacerItem, 1, 2, 1, 1); @@ -116,7 +117,7 @@ public: vboxLayout3->addWidget(m_templatePathGroupBox); m_gridPanel = new qdesigner_internal::GridPanel(PreferencesDialog); - m_gridPanel->setObjectName(QString::fromUtf8("m_gridPanel")); + m_gridPanel->setObjectName("m_gridPanel"); vboxLayout3->addWidget(m_gridPanel); @@ -127,14 +128,14 @@ public: vboxLayout->addLayout(hboxLayout); line = new QFrame(PreferencesDialog); - line->setObjectName(QString::fromUtf8("line")); - line->setFrameShape(QFrame::HLine); - line->setFrameShadow(QFrame::Sunken); + line->setObjectName("line"); + line->setFrameShape(QFrame::Shape::HLine); + line->setFrameShadow(QFrame::Shadow::Sunken); vboxLayout->addWidget(line); m_dialogButtonBox = new QDialogButtonBox(PreferencesDialog); - m_dialogButtonBox->setObjectName(QString::fromUtf8("m_dialogButtonBox")); + m_dialogButtonBox->setObjectName("m_dialogButtonBox"); m_dialogButtonBox->setOrientation(Qt::Horizontal); m_dialogButtonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); @@ -142,19 +143,19 @@ public: retranslateUi(PreferencesDialog); - QObject::connect(m_dialogButtonBox, SIGNAL(accepted()), PreferencesDialog, SLOT(accept())); - QObject::connect(m_dialogButtonBox, SIGNAL(rejected()), PreferencesDialog, SLOT(reject())); + QObject::connect(m_dialogButtonBox, &QDialogButtonBox::accepted, PreferencesDialog, qOverload<>(&QDialog::accept)); + QObject::connect(m_dialogButtonBox, &QDialogButtonBox::rejected, PreferencesDialog, qOverload<>(&QDialog::reject)); QMetaObject::connectSlotsByName(PreferencesDialog); } // setupUi void retranslateUi(QDialog *PreferencesDialog) { - PreferencesDialog->setWindowTitle(QApplication::translate("PreferencesDialog", "Preferences", nullptr)); - m_uiModeGroupBox->setTitle(QApplication::translate("PreferencesDialog", "User Interface Mode", nullptr)); - m_templatePathGroupBox->setTitle(QApplication::translate("PreferencesDialog", "Additional Template Paths", nullptr)); - m_addTemplatePathButton->setText(QApplication::translate("PreferencesDialog", "...", nullptr)); - m_removeTemplatePathButton->setText(QApplication::translate("PreferencesDialog", "...", nullptr)); + PreferencesDialog->setWindowTitle(QCoreApplication::translate("PreferencesDialog", "Preferences", nullptr)); + m_uiModeGroupBox->setTitle(QCoreApplication::translate("PreferencesDialog", "User Interface Mode", nullptr)); + m_templatePathGroupBox->setTitle(QCoreApplication::translate("PreferencesDialog", "Additional Template Paths", nullptr)); + m_addTemplatePathButton->setText(QCoreApplication::translate("PreferencesDialog", "...", nullptr)); + m_removeTemplatePathButton->setText(QCoreApplication::translate("PreferencesDialog", "...", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/previewconfigurationwidget.ui.h b/tests/auto/tools/uic/baseline/previewconfigurationwidget.ui.h index 3c729b9c65..c7e54fde1a 100644 --- a/tests/auto/tools/uic/baseline/previewconfigurationwidget.ui.h +++ b/tests/auto/tools/uic/baseline/previewconfigurationwidget.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'previewconfigurationwidget.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -40,40 +40,40 @@ public: void setupUi(QGroupBox *PreviewConfigurationWidget) { if (PreviewConfigurationWidget->objectName().isEmpty()) - PreviewConfigurationWidget->setObjectName(QString::fromUtf8("PreviewConfigurationWidget")); + PreviewConfigurationWidget->setObjectName("PreviewConfigurationWidget"); PreviewConfigurationWidget->setCheckable(true); formLayout = new QFormLayout(PreviewConfigurationWidget); - formLayout->setObjectName(QString::fromUtf8("formLayout")); + formLayout->setObjectName("formLayout"); m_styleLabel = new QLabel(PreviewConfigurationWidget); - m_styleLabel->setObjectName(QString::fromUtf8("m_styleLabel")); + m_styleLabel->setObjectName("m_styleLabel"); formLayout->setWidget(0, QFormLayout::LabelRole, m_styleLabel); m_styleCombo = new QComboBox(PreviewConfigurationWidget); - m_styleCombo->setObjectName(QString::fromUtf8("m_styleCombo")); + m_styleCombo->setObjectName("m_styleCombo"); formLayout->setWidget(0, QFormLayout::FieldRole, m_styleCombo); m_appStyleSheetLabel = new QLabel(PreviewConfigurationWidget); - m_appStyleSheetLabel->setObjectName(QString::fromUtf8("m_appStyleSheetLabel")); + m_appStyleSheetLabel->setObjectName("m_appStyleSheetLabel"); formLayout->setWidget(1, QFormLayout::LabelRole, m_appStyleSheetLabel); hboxLayout = new QHBoxLayout(); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName("hboxLayout"); m_appStyleSheetLineEdit = new qdesigner_internal::TextPropertyEditor(PreviewConfigurationWidget); - m_appStyleSheetLineEdit->setObjectName(QString::fromUtf8("m_appStyleSheetLineEdit")); + m_appStyleSheetLineEdit->setObjectName("m_appStyleSheetLineEdit"); m_appStyleSheetLineEdit->setMinimumSize(QSize(149, 0)); hboxLayout->addWidget(m_appStyleSheetLineEdit); m_appStyleSheetChangeButton = new QToolButton(PreviewConfigurationWidget); - m_appStyleSheetChangeButton->setObjectName(QString::fromUtf8("m_appStyleSheetChangeButton")); + m_appStyleSheetChangeButton->setObjectName("m_appStyleSheetChangeButton"); hboxLayout->addWidget(m_appStyleSheetChangeButton); m_appStyleSheetClearButton = new QToolButton(PreviewConfigurationWidget); - m_appStyleSheetClearButton->setObjectName(QString::fromUtf8("m_appStyleSheetClearButton")); + m_appStyleSheetClearButton->setObjectName("m_appStyleSheetClearButton"); hboxLayout->addWidget(m_appStyleSheetClearButton); @@ -81,19 +81,19 @@ public: formLayout->setLayout(1, QFormLayout::FieldRole, hboxLayout); m_skinLabel = new QLabel(PreviewConfigurationWidget); - m_skinLabel->setObjectName(QString::fromUtf8("m_skinLabel")); + m_skinLabel->setObjectName("m_skinLabel"); formLayout->setWidget(2, QFormLayout::LabelRole, m_skinLabel); hboxLayout1 = new QHBoxLayout(); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName("hboxLayout1"); m_skinCombo = new QComboBox(PreviewConfigurationWidget); - m_skinCombo->setObjectName(QString::fromUtf8("m_skinCombo")); + m_skinCombo->setObjectName("m_skinCombo"); hboxLayout1->addWidget(m_skinCombo); m_skinRemoveButton = new QToolButton(PreviewConfigurationWidget); - m_skinRemoveButton->setObjectName(QString::fromUtf8("m_skinRemoveButton")); + m_skinRemoveButton->setObjectName("m_skinRemoveButton"); hboxLayout1->addWidget(m_skinRemoveButton); @@ -108,14 +108,14 @@ public: void retranslateUi(QGroupBox *PreviewConfigurationWidget) { - PreviewConfigurationWidget->setWindowTitle(QApplication::translate("PreviewConfigurationWidget", "Form", nullptr)); - PreviewConfigurationWidget->setTitle(QApplication::translate("PreviewConfigurationWidget", "Print/Preview Configuration", nullptr)); - m_styleLabel->setText(QApplication::translate("PreviewConfigurationWidget", "Style", nullptr)); - m_appStyleSheetLabel->setText(QApplication::translate("PreviewConfigurationWidget", "Style sheet", nullptr)); - m_appStyleSheetChangeButton->setText(QApplication::translate("PreviewConfigurationWidget", "...", nullptr)); - m_appStyleSheetClearButton->setText(QApplication::translate("PreviewConfigurationWidget", "...", nullptr)); - m_skinLabel->setText(QApplication::translate("PreviewConfigurationWidget", "Device skin", nullptr)); - m_skinRemoveButton->setText(QApplication::translate("PreviewConfigurationWidget", "...", nullptr)); + PreviewConfigurationWidget->setWindowTitle(QCoreApplication::translate("PreviewConfigurationWidget", "Form", nullptr)); + PreviewConfigurationWidget->setTitle(QCoreApplication::translate("PreviewConfigurationWidget", "Print/Preview Configuration", nullptr)); + m_styleLabel->setText(QCoreApplication::translate("PreviewConfigurationWidget", "Style", nullptr)); + m_appStyleSheetLabel->setText(QCoreApplication::translate("PreviewConfigurationWidget", "Style sheet", nullptr)); + m_appStyleSheetChangeButton->setText(QCoreApplication::translate("PreviewConfigurationWidget", "...", nullptr)); + m_appStyleSheetClearButton->setText(QCoreApplication::translate("PreviewConfigurationWidget", "...", nullptr)); + m_skinLabel->setText(QCoreApplication::translate("PreviewConfigurationWidget", "Device skin", nullptr)); + m_skinRemoveButton->setText(QCoreApplication::translate("PreviewConfigurationWidget", "...", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/previewdialogbase.ui.h b/tests/auto/tools/uic/baseline/previewdialogbase.ui.h index 8d4c0dae9f..6c362bf421 100644 --- a/tests/auto/tools/uic/baseline/previewdialogbase.ui.h +++ b/tests/auto/tools/uic/baseline/previewdialogbase.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'previewdialogbase.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -10,6 +10,7 @@ #define PREVIEWDIALOGBASE_H #include <QtCore/QVariant> +#include <QtWidgets/QAbstractButton> #include <QtWidgets/QApplication> #include <QtWidgets/QComboBox> #include <QtWidgets/QDialog> @@ -45,7 +46,7 @@ public: void setupUi(QDialog *PreviewDialogBase) { if (PreviewDialogBase->objectName().isEmpty()) - PreviewDialogBase->setObjectName(QString::fromUtf8("PreviewDialogBase")); + PreviewDialogBase->setObjectName("PreviewDialogBase"); PreviewDialogBase->resize(733, 479); vboxLayout = new QVBoxLayout(PreviewDialogBase); #ifndef Q_OS_MAC @@ -54,7 +55,7 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); hboxLayout = new QHBoxLayout(); #ifndef Q_OS_MAC hboxLayout->setSpacing(6); @@ -62,15 +63,15 @@ public: #ifndef Q_OS_MAC hboxLayout->setContentsMargins(0, 0, 0, 0); #endif - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName("hboxLayout"); label = new QLabel(PreviewDialogBase); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName("label"); hboxLayout->addWidget(label); paperSizeCombo = new QComboBox(PreviewDialogBase); - paperSizeCombo->setObjectName(QString::fromUtf8("paperSizeCombo")); - QSizePolicy sizePolicy(static_cast<QSizePolicy::Policy>(1), static_cast<QSizePolicy::Policy>(0)); + paperSizeCombo->setObjectName("paperSizeCombo"); + QSizePolicy sizePolicy(QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Fixed); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); sizePolicy.setHeightForWidth(paperSizeCombo->sizePolicy().hasHeightForWidth()); @@ -79,18 +80,18 @@ public: hboxLayout->addWidget(paperSizeCombo); label_2 = new QLabel(PreviewDialogBase); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName("label_2"); hboxLayout->addWidget(label_2); paperOrientationCombo = new QComboBox(PreviewDialogBase); - paperOrientationCombo->setObjectName(QString::fromUtf8("paperOrientationCombo")); + paperOrientationCombo->setObjectName("paperOrientationCombo"); sizePolicy.setHeightForWidth(paperOrientationCombo->sizePolicy().hasHeightForWidth()); paperOrientationCombo->setSizePolicy(sizePolicy); hboxLayout->addWidget(paperOrientationCombo); - spacerItem = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacerItem = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); hboxLayout->addItem(spacerItem); @@ -102,9 +103,9 @@ public: hboxLayout1->setSpacing(6); #endif hboxLayout1->setContentsMargins(0, 0, 0, 0); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName("hboxLayout1"); pageList = new QTreeWidget(PreviewDialogBase); - pageList->setObjectName(QString::fromUtf8("pageList")); + pageList->setObjectName("pageList"); pageList->setIndentation(0); pageList->setRootIsDecorated(false); pageList->setUniformRowHeights(true); @@ -114,8 +115,8 @@ public: hboxLayout1->addWidget(pageList); previewArea = new QScrollArea(PreviewDialogBase); - previewArea->setObjectName(QString::fromUtf8("previewArea")); - QSizePolicy sizePolicy1(static_cast<QSizePolicy::Policy>(5), static_cast<QSizePolicy::Policy>(5)); + previewArea->setObjectName("previewArea"); + QSizePolicy sizePolicy1(QSizePolicy::Policy::Preferred, QSizePolicy::Policy::Preferred); sizePolicy1.setHorizontalStretch(1); sizePolicy1.setVerticalStretch(0); sizePolicy1.setHeightForWidth(previewArea->sizePolicy().hasHeightForWidth()); @@ -131,11 +132,11 @@ public: hboxLayout2->setSpacing(6); #endif hboxLayout2->setContentsMargins(0, 0, 0, 0); - hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2")); + hboxLayout2->setObjectName("hboxLayout2"); progressBar = new QProgressBar(PreviewDialogBase); - progressBar->setObjectName(QString::fromUtf8("progressBar")); + progressBar->setObjectName("progressBar"); progressBar->setEnabled(false); - QSizePolicy sizePolicy2(static_cast<QSizePolicy::Policy>(7), static_cast<QSizePolicy::Policy>(0)); + QSizePolicy sizePolicy2(QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Fixed); sizePolicy2.setHorizontalStretch(1); sizePolicy2.setVerticalStretch(0); sizePolicy2.setHeightForWidth(progressBar->sizePolicy().hasHeightForWidth()); @@ -147,7 +148,7 @@ public: hboxLayout2->addWidget(progressBar); buttonBox = new QDialogButtonBox(PreviewDialogBase); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName("buttonBox"); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok); @@ -156,25 +157,25 @@ public: vboxLayout->addLayout(hboxLayout2); -#ifndef QT_NO_SHORTCUT +#if QT_CONFIG(shortcut) label->setBuddy(paperSizeCombo); label_2->setBuddy(paperOrientationCombo); -#endif // QT_NO_SHORTCUT +#endif // QT_CONFIG(shortcut) retranslateUi(PreviewDialogBase); - QObject::connect(buttonBox, SIGNAL(accepted()), PreviewDialogBase, SLOT(accept())); - QObject::connect(buttonBox, SIGNAL(rejected()), PreviewDialogBase, SLOT(reject())); + QObject::connect(buttonBox, &QDialogButtonBox::accepted, PreviewDialogBase, qOverload<>(&QDialog::accept)); + QObject::connect(buttonBox, &QDialogButtonBox::rejected, PreviewDialogBase, qOverload<>(&QDialog::reject)); QMetaObject::connectSlotsByName(PreviewDialogBase); } // setupUi void retranslateUi(QDialog *PreviewDialogBase) { - PreviewDialogBase->setWindowTitle(QApplication::translate("PreviewDialogBase", "Print Preview", nullptr)); - label->setText(QApplication::translate("PreviewDialogBase", "&Paper Size:", nullptr)); - label_2->setText(QApplication::translate("PreviewDialogBase", "&Orientation:", nullptr)); + PreviewDialogBase->setWindowTitle(QCoreApplication::translate("PreviewDialogBase", "Print Preview", nullptr)); + label->setText(QCoreApplication::translate("PreviewDialogBase", "&Paper Size:", nullptr)); + label_2->setText(QCoreApplication::translate("PreviewDialogBase", "&Orientation:", nullptr)); QTreeWidgetItem *___qtreewidgetitem = pageList->headerItem(); - ___qtreewidgetitem->setText(0, QApplication::translate("PreviewDialogBase", "1", nullptr)); + ___qtreewidgetitem->setText(0, QCoreApplication::translate("PreviewDialogBase", "1", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/previewwidget.ui b/tests/auto/tools/uic/baseline/previewwidget.ui index 9ced05afc8..32af99e797 100644 --- a/tests/auto/tools/uic/baseline/previewwidget.ui +++ b/tests/auto/tools/uic/baseline/previewwidget.ui @@ -1,31 +1,8 @@ <ui version="4.0" > - <comment>********************************************************************* -** -** 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$ -** -*********************************************************************</comment> +<comment> +* Copyright (C) 2016 The Qt Company Ltd. +* SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +</comment> <class>qdesigner_internal::PreviewWidget</class> <widget class="QWidget" name="qdesigner_internal::PreviewWidget" > <property name="geometry" > @@ -130,7 +107,7 @@ <enum>Qt::Vertical</enum> </property> <property name="sizeType" > - <enum>QSizePolicy::Expanding</enum> + <enum>QSizePolicy::Policy::Expanding</enum> </property> <property name="sizeHint" > <size> diff --git a/tests/auto/tools/uic/baseline/previewwidget.ui.h b/tests/auto/tools/uic/baseline/previewwidget.ui.h index 6e359416c8..79d26639ff 100644 --- a/tests/auto/tools/uic/baseline/previewwidget.ui.h +++ b/tests/auto/tools/uic/baseline/previewwidget.ui.h @@ -1,37 +1,14 @@ /* -********************************************************************* -** -** 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$ -** -********************************************************************* + +* Copyright (C) 2016 The Qt Company Ltd. +* SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + */ /******************************************************************************** ** Form generated from reading UI file 'previewwidget.ui' ** -** Created by: Qt User Interface Compiler version 5.10.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -90,9 +67,9 @@ public: void setupUi(QWidget *qdesigner_internal__PreviewWidget) { if (qdesigner_internal__PreviewWidget->objectName().isEmpty()) - qdesigner_internal__PreviewWidget->setObjectName(QString::fromUtf8("qdesigner_internal__PreviewWidget")); + qdesigner_internal__PreviewWidget->setObjectName("qdesigner_internal__PreviewWidget"); qdesigner_internal__PreviewWidget->resize(471, 251); - QSizePolicy sizePolicy(static_cast<QSizePolicy::Policy>(1), static_cast<QSizePolicy::Policy>(1)); + QSizePolicy sizePolicy(QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Minimum); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); sizePolicy.setHeightForWidth(qdesigner_internal__PreviewWidget->sizePolicy().hasHeightForWidth()); @@ -104,7 +81,7 @@ public: #ifndef Q_OS_MAC gridLayout->setContentsMargins(9, 9, 9, 9); #endif - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); vboxLayout = new QVBoxLayout(); #ifndef Q_OS_MAC vboxLayout->setSpacing(6); @@ -112,15 +89,15 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(0, 0, 0, 0); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); LineEdit1 = new QLineEdit(qdesigner_internal__PreviewWidget); - LineEdit1->setObjectName(QString::fromUtf8("LineEdit1")); + LineEdit1->setObjectName("LineEdit1"); vboxLayout->addWidget(LineEdit1); ComboBox1 = new QComboBox(qdesigner_internal__PreviewWidget); ComboBox1->addItem(QString()); - ComboBox1->setObjectName(QString::fromUtf8("ComboBox1")); + ComboBox1->setObjectName("ComboBox1"); vboxLayout->addWidget(ComboBox1); @@ -129,14 +106,14 @@ public: hboxLayout->setSpacing(6); #endif hboxLayout->setContentsMargins(0, 0, 0, 0); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName("hboxLayout"); SpinBox1 = new QSpinBox(qdesigner_internal__PreviewWidget); - SpinBox1->setObjectName(QString::fromUtf8("SpinBox1")); + SpinBox1->setObjectName("SpinBox1"); hboxLayout->addWidget(SpinBox1); PushButton1 = new QPushButton(qdesigner_internal__PreviewWidget); - PushButton1->setObjectName(QString::fromUtf8("PushButton1")); + PushButton1->setObjectName("PushButton1"); hboxLayout->addWidget(PushButton1); @@ -144,19 +121,19 @@ public: vboxLayout->addLayout(hboxLayout); ScrollBar1 = new QScrollBar(qdesigner_internal__PreviewWidget); - ScrollBar1->setObjectName(QString::fromUtf8("ScrollBar1")); + ScrollBar1->setObjectName("ScrollBar1"); ScrollBar1->setOrientation(Qt::Horizontal); vboxLayout->addWidget(ScrollBar1); Slider1 = new QSlider(qdesigner_internal__PreviewWidget); - Slider1->setObjectName(QString::fromUtf8("Slider1")); + Slider1->setObjectName("Slider1"); Slider1->setOrientation(Qt::Horizontal); vboxLayout->addWidget(Slider1); listWidget = new QListWidget(qdesigner_internal__PreviewWidget); - listWidget->setObjectName(QString::fromUtf8("listWidget")); + listWidget->setObjectName("listWidget"); listWidget->setMaximumSize(QSize(32767, 50)); vboxLayout->addWidget(listWidget); @@ -164,18 +141,18 @@ public: gridLayout->addLayout(vboxLayout, 0, 1, 3, 1); - spacerItem = new QSpacerItem(20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem = new QSpacerItem(20, 20, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Expanding); gridLayout->addItem(spacerItem, 3, 0, 1, 2); ProgressBar1 = new QProgressBar(qdesigner_internal__PreviewWidget); - ProgressBar1->setObjectName(QString::fromUtf8("ProgressBar1")); + ProgressBar1->setObjectName("ProgressBar1"); ProgressBar1->setOrientation(Qt::Horizontal); gridLayout->addWidget(ProgressBar1, 2, 0, 1, 1); ButtonGroup2 = new QGroupBox(qdesigner_internal__PreviewWidget); - ButtonGroup2->setObjectName(QString::fromUtf8("ButtonGroup2")); + ButtonGroup2->setObjectName("ButtonGroup2"); vboxLayout1 = new QVBoxLayout(ButtonGroup2); #ifndef Q_OS_MAC vboxLayout1->setSpacing(6); @@ -183,15 +160,15 @@ public: #ifndef Q_OS_MAC vboxLayout1->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName("vboxLayout1"); CheckBox1 = new QCheckBox(ButtonGroup2); - CheckBox1->setObjectName(QString::fromUtf8("CheckBox1")); + CheckBox1->setObjectName("CheckBox1"); CheckBox1->setChecked(true); vboxLayout1->addWidget(CheckBox1); CheckBox2 = new QCheckBox(ButtonGroup2); - CheckBox2->setObjectName(QString::fromUtf8("CheckBox2")); + CheckBox2->setObjectName("CheckBox2"); vboxLayout1->addWidget(CheckBox2); @@ -199,7 +176,7 @@ public: gridLayout->addWidget(ButtonGroup2, 1, 0, 1, 1); ButtonGroup1 = new QGroupBox(qdesigner_internal__PreviewWidget); - ButtonGroup1->setObjectName(QString::fromUtf8("ButtonGroup1")); + ButtonGroup1->setObjectName("ButtonGroup1"); vboxLayout2 = new QVBoxLayout(ButtonGroup1); #ifndef Q_OS_MAC vboxLayout2->setSpacing(6); @@ -207,20 +184,20 @@ public: #ifndef Q_OS_MAC vboxLayout2->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2")); + vboxLayout2->setObjectName("vboxLayout2"); RadioButton1 = new QRadioButton(ButtonGroup1); - RadioButton1->setObjectName(QString::fromUtf8("RadioButton1")); + RadioButton1->setObjectName("RadioButton1"); RadioButton1->setChecked(true); vboxLayout2->addWidget(RadioButton1); RadioButton2 = new QRadioButton(ButtonGroup1); - RadioButton2->setObjectName(QString::fromUtf8("RadioButton2")); + RadioButton2->setObjectName("RadioButton2"); vboxLayout2->addWidget(RadioButton2); RadioButton3 = new QRadioButton(ButtonGroup1); - RadioButton3->setObjectName(QString::fromUtf8("RadioButton3")); + RadioButton3->setObjectName("RadioButton3"); vboxLayout2->addWidget(RadioButton3); @@ -235,18 +212,18 @@ public: void retranslateUi(QWidget *qdesigner_internal__PreviewWidget) { - qdesigner_internal__PreviewWidget->setWindowTitle(QApplication::translate("qdesigner_internal::PreviewWidget", "Preview Window", nullptr)); - LineEdit1->setText(QApplication::translate("qdesigner_internal::PreviewWidget", "LineEdit", nullptr)); - ComboBox1->setItemText(0, QApplication::translate("qdesigner_internal::PreviewWidget", "ComboBox", nullptr)); - - PushButton1->setText(QApplication::translate("qdesigner_internal::PreviewWidget", "PushButton", nullptr)); - ButtonGroup2->setTitle(QApplication::translate("qdesigner_internal::PreviewWidget", "ButtonGroup2", nullptr)); - CheckBox1->setText(QApplication::translate("qdesigner_internal::PreviewWidget", "CheckBox1", nullptr)); - CheckBox2->setText(QApplication::translate("qdesigner_internal::PreviewWidget", "CheckBox2", nullptr)); - ButtonGroup1->setTitle(QApplication::translate("qdesigner_internal::PreviewWidget", "ButtonGroup", nullptr)); - RadioButton1->setText(QApplication::translate("qdesigner_internal::PreviewWidget", "RadioButton1", nullptr)); - RadioButton2->setText(QApplication::translate("qdesigner_internal::PreviewWidget", "RadioButton2", nullptr)); - RadioButton3->setText(QApplication::translate("qdesigner_internal::PreviewWidget", "RadioButton3", nullptr)); + qdesigner_internal__PreviewWidget->setWindowTitle(QCoreApplication::translate("qdesigner_internal::PreviewWidget", "Preview Window", nullptr)); + LineEdit1->setText(QCoreApplication::translate("qdesigner_internal::PreviewWidget", "LineEdit", nullptr)); + ComboBox1->setItemText(0, QCoreApplication::translate("qdesigner_internal::PreviewWidget", "ComboBox", nullptr)); + + PushButton1->setText(QCoreApplication::translate("qdesigner_internal::PreviewWidget", "PushButton", nullptr)); + ButtonGroup2->setTitle(QCoreApplication::translate("qdesigner_internal::PreviewWidget", "ButtonGroup2", nullptr)); + CheckBox1->setText(QCoreApplication::translate("qdesigner_internal::PreviewWidget", "CheckBox1", nullptr)); + CheckBox2->setText(QCoreApplication::translate("qdesigner_internal::PreviewWidget", "CheckBox2", nullptr)); + ButtonGroup1->setTitle(QCoreApplication::translate("qdesigner_internal::PreviewWidget", "ButtonGroup", nullptr)); + RadioButton1->setText(QCoreApplication::translate("qdesigner_internal::PreviewWidget", "RadioButton1", nullptr)); + RadioButton2->setText(QCoreApplication::translate("qdesigner_internal::PreviewWidget", "RadioButton2", nullptr)); + RadioButton3->setText(QCoreApplication::translate("qdesigner_internal::PreviewWidget", "RadioButton3", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/proxy.ui.h b/tests/auto/tools/uic/baseline/proxy.ui.h index a1bc287190..eeaefa3a28 100644 --- a/tests/auto/tools/uic/baseline/proxy.ui.h +++ b/tests/auto/tools/uic/baseline/proxy.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'proxy.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -10,6 +10,7 @@ #define PROXY_H #include <QtCore/QVariant> +#include <QtWidgets/QAbstractButton> #include <QtWidgets/QApplication> #include <QtWidgets/QDialog> #include <QtWidgets/QDialogButtonBox> @@ -34,44 +35,44 @@ public: void setupUi(QDialog *ProxyDialog) { if (ProxyDialog->objectName().isEmpty()) - ProxyDialog->setObjectName(QString::fromUtf8("ProxyDialog")); + ProxyDialog->setObjectName("ProxyDialog"); ProxyDialog->resize(369, 144); gridLayout = new QGridLayout(ProxyDialog); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); iconLabel = new QLabel(ProxyDialog); - iconLabel->setObjectName(QString::fromUtf8("iconLabel")); + iconLabel->setObjectName("iconLabel"); gridLayout->addWidget(iconLabel, 0, 0, 1, 1); introLabel = new QLabel(ProxyDialog); - introLabel->setObjectName(QString::fromUtf8("introLabel")); + introLabel->setObjectName("introLabel"); introLabel->setWordWrap(true); gridLayout->addWidget(introLabel, 0, 1, 1, 2); usernameLabel = new QLabel(ProxyDialog); - usernameLabel->setObjectName(QString::fromUtf8("usernameLabel")); + usernameLabel->setObjectName("usernameLabel"); gridLayout->addWidget(usernameLabel, 1, 0, 1, 2); userNameLineEdit = new QLineEdit(ProxyDialog); - userNameLineEdit->setObjectName(QString::fromUtf8("userNameLineEdit")); + userNameLineEdit->setObjectName("userNameLineEdit"); gridLayout->addWidget(userNameLineEdit, 1, 2, 1, 1); passwordLabel = new QLabel(ProxyDialog); - passwordLabel->setObjectName(QString::fromUtf8("passwordLabel")); + passwordLabel->setObjectName("passwordLabel"); gridLayout->addWidget(passwordLabel, 2, 0, 1, 2); passwordLineEdit = new QLineEdit(ProxyDialog); - passwordLineEdit->setObjectName(QString::fromUtf8("passwordLineEdit")); + passwordLineEdit->setObjectName("passwordLineEdit"); passwordLineEdit->setEchoMode(QLineEdit::Password); gridLayout->addWidget(passwordLineEdit, 2, 2, 1, 1); buttonBox = new QDialogButtonBox(ProxyDialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName("buttonBox"); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); @@ -79,19 +80,19 @@ public: retranslateUi(ProxyDialog); - QObject::connect(buttonBox, SIGNAL(accepted()), ProxyDialog, SLOT(accept())); - QObject::connect(buttonBox, SIGNAL(rejected()), ProxyDialog, SLOT(reject())); + QObject::connect(buttonBox, &QDialogButtonBox::accepted, ProxyDialog, qOverload<>(&QDialog::accept)); + QObject::connect(buttonBox, &QDialogButtonBox::rejected, ProxyDialog, qOverload<>(&QDialog::reject)); QMetaObject::connectSlotsByName(ProxyDialog); } // setupUi void retranslateUi(QDialog *ProxyDialog) { - ProxyDialog->setWindowTitle(QApplication::translate("ProxyDialog", "Proxy Authentication", nullptr)); - iconLabel->setText(QApplication::translate("ProxyDialog", "ICON", nullptr)); - introLabel->setText(QApplication::translate("ProxyDialog", "Connect to proxy", nullptr)); - usernameLabel->setText(QApplication::translate("ProxyDialog", "Username:", nullptr)); - passwordLabel->setText(QApplication::translate("ProxyDialog", "Password:", nullptr)); + ProxyDialog->setWindowTitle(QCoreApplication::translate("ProxyDialog", "Proxy Authentication", nullptr)); + iconLabel->setText(QCoreApplication::translate("ProxyDialog", "ICON", nullptr)); + introLabel->setText(QCoreApplication::translate("ProxyDialog", "Connect to proxy", nullptr)); + usernameLabel->setText(QCoreApplication::translate("ProxyDialog", "Username:", nullptr)); + passwordLabel->setText(QCoreApplication::translate("ProxyDialog", "Password:", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/qfiledialog.ui b/tests/auto/tools/uic/baseline/qfiledialog.ui index 83b7f1524b..56c4cf6e27 100644 --- a/tests/auto/tools/uic/baseline/qfiledialog.ui +++ b/tests/auto/tools/uic/baseline/qfiledialog.ui @@ -1,31 +1,8 @@ <ui version="4.0" > - <comment>********************************************************************* -** -** 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$ -** -*********************************************************************</comment> +<comment> +* Copyright (C) 2016 The Qt Company Ltd. +* SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +</comment> <class>QFileDialog</class> <widget class="QDialog" name="QFileDialog" > <property name="geometry" > diff --git a/tests/auto/tools/uic/baseline/qfiledialog.ui.h b/tests/auto/tools/uic/baseline/qfiledialog.ui.h index 53607db449..2a2afddc54 100644 --- a/tests/auto/tools/uic/baseline/qfiledialog.ui.h +++ b/tests/auto/tools/uic/baseline/qfiledialog.ui.h @@ -1,37 +1,14 @@ /* -********************************************************************* -** -** 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$ -** -********************************************************************* + +* Copyright (C) 2016 The Qt Company Ltd. +* SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + */ /******************************************************************************** ** Form generated from reading UI file 'qfiledialog.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -40,6 +17,7 @@ #define QFILEDIALOG_H #include <QtCore/QVariant> +#include <QtWidgets/QAbstractButton> #include <QtWidgets/QApplication> #include <QtWidgets/QComboBox> #include <QtWidgets/QDialog> @@ -92,21 +70,21 @@ public: void setupUi(QDialog *QFileDialog) { if (QFileDialog->objectName().isEmpty()) - QFileDialog->setObjectName(QString::fromUtf8("QFileDialog")); + QFileDialog->setObjectName("QFileDialog"); QFileDialog->resize(521, 316); QFileDialog->setSizeGripEnabled(true); gridLayout = new QGridLayout(QFileDialog); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); lookInLabel = new QLabel(QFileDialog); - lookInLabel->setObjectName(QString::fromUtf8("lookInLabel")); + lookInLabel->setObjectName("lookInLabel"); gridLayout->addWidget(lookInLabel, 0, 0, 1, 1); hboxLayout = new QHBoxLayout(); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName("hboxLayout"); lookInCombo = new QFileDialogComboBox(QFileDialog); - lookInCombo->setObjectName(QString::fromUtf8("lookInCombo")); - QSizePolicy sizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed); + lookInCombo->setObjectName("lookInCombo"); + QSizePolicy sizePolicy(QSizePolicy::Policy::Ignored, QSizePolicy::Policy::Fixed); sizePolicy.setHorizontalStretch(1); sizePolicy.setVerticalStretch(0); sizePolicy.setHeightForWidth(lookInCombo->sizePolicy().hasHeightForWidth()); @@ -116,32 +94,32 @@ public: hboxLayout->addWidget(lookInCombo); backButton = new QToolButton(QFileDialog); - backButton->setObjectName(QString::fromUtf8("backButton")); + backButton->setObjectName("backButton"); hboxLayout->addWidget(backButton); forwardButton = new QToolButton(QFileDialog); - forwardButton->setObjectName(QString::fromUtf8("forwardButton")); + forwardButton->setObjectName("forwardButton"); hboxLayout->addWidget(forwardButton); toParentButton = new QToolButton(QFileDialog); - toParentButton->setObjectName(QString::fromUtf8("toParentButton")); + toParentButton->setObjectName("toParentButton"); hboxLayout->addWidget(toParentButton); newFolderButton = new QToolButton(QFileDialog); - newFolderButton->setObjectName(QString::fromUtf8("newFolderButton")); + newFolderButton->setObjectName("newFolderButton"); hboxLayout->addWidget(newFolderButton); listModeButton = new QToolButton(QFileDialog); - listModeButton->setObjectName(QString::fromUtf8("listModeButton")); + listModeButton->setObjectName("listModeButton"); hboxLayout->addWidget(listModeButton); detailModeButton = new QToolButton(QFileDialog); - detailModeButton->setObjectName(QString::fromUtf8("detailModeButton")); + detailModeButton->setObjectName("detailModeButton"); hboxLayout->addWidget(detailModeButton); @@ -149,46 +127,46 @@ public: gridLayout->addLayout(hboxLayout, 0, 1, 1, 2); splitter = new QSplitter(QFileDialog); - splitter->setObjectName(QString::fromUtf8("splitter")); - QSizePolicy sizePolicy1(QSizePolicy::Expanding, QSizePolicy::Expanding); + splitter->setObjectName("splitter"); + QSizePolicy sizePolicy1(QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Expanding); sizePolicy1.setHorizontalStretch(0); sizePolicy1.setVerticalStretch(0); sizePolicy1.setHeightForWidth(splitter->sizePolicy().hasHeightForWidth()); splitter->setSizePolicy(sizePolicy1); splitter->setOrientation(Qt::Horizontal); sidebar = new QSidebar(splitter); - sidebar->setObjectName(QString::fromUtf8("sidebar")); + sidebar->setObjectName("sidebar"); splitter->addWidget(sidebar); frame = new QFrame(splitter); - frame->setObjectName(QString::fromUtf8("frame")); + frame->setObjectName("frame"); frame->setFrameShape(QFrame::NoFrame); frame->setFrameShadow(QFrame::Raised); vboxLayout = new QVBoxLayout(frame); vboxLayout->setSpacing(0); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); vboxLayout->setContentsMargins(0, 0, 0, 0); stackedWidget = new QStackedWidget(frame); - stackedWidget->setObjectName(QString::fromUtf8("stackedWidget")); + stackedWidget->setObjectName("stackedWidget"); page = new QWidget(); - page->setObjectName(QString::fromUtf8("page")); + page->setObjectName("page"); vboxLayout1 = new QVBoxLayout(page); vboxLayout1->setSpacing(0); - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName("vboxLayout1"); vboxLayout1->setContentsMargins(0, 0, 0, 0); listView = new QFileDialogListView(page); - listView->setObjectName(QString::fromUtf8("listView")); + listView->setObjectName("listView"); vboxLayout1->addWidget(listView); stackedWidget->addWidget(page); page_2 = new QWidget(); - page_2->setObjectName(QString::fromUtf8("page_2")); + page_2->setObjectName("page_2"); vboxLayout2 = new QVBoxLayout(page_2); vboxLayout2->setSpacing(0); - vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2")); + vboxLayout2->setObjectName("vboxLayout2"); vboxLayout2->setContentsMargins(0, 0, 0, 0); treeView = new QFileDialogTreeView(page_2); - treeView->setObjectName(QString::fromUtf8("treeView")); + treeView->setObjectName("treeView"); vboxLayout2->addWidget(treeView); @@ -201,8 +179,8 @@ public: gridLayout->addWidget(splitter, 1, 0, 1, 3); fileNameLabel = new QLabel(QFileDialog); - fileNameLabel->setObjectName(QString::fromUtf8("fileNameLabel")); - QSizePolicy sizePolicy2(QSizePolicy::Minimum, QSizePolicy::Preferred); + fileNameLabel->setObjectName("fileNameLabel"); + QSizePolicy sizePolicy2(QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Preferred); sizePolicy2.setHorizontalStretch(0); sizePolicy2.setVerticalStretch(0); sizePolicy2.setHeightForWidth(fileNameLabel->sizePolicy().hasHeightForWidth()); @@ -212,8 +190,8 @@ public: gridLayout->addWidget(fileNameLabel, 2, 0, 1, 1); fileNameEdit = new QFileDialogLineEdit(QFileDialog); - fileNameEdit->setObjectName(QString::fromUtf8("fileNameEdit")); - QSizePolicy sizePolicy3(QSizePolicy::Expanding, QSizePolicy::Fixed); + fileNameEdit->setObjectName("fileNameEdit"); + QSizePolicy sizePolicy3(QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Fixed); sizePolicy3.setHorizontalStretch(1); sizePolicy3.setVerticalStretch(0); sizePolicy3.setHeightForWidth(fileNameEdit->sizePolicy().hasHeightForWidth()); @@ -222,15 +200,15 @@ public: gridLayout->addWidget(fileNameEdit, 2, 1, 1, 1); buttonBox = new QDialogButtonBox(QFileDialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName("buttonBox"); buttonBox->setOrientation(Qt::Vertical); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok); gridLayout->addWidget(buttonBox, 2, 2, 2, 1); fileTypeLabel = new QLabel(QFileDialog); - fileTypeLabel->setObjectName(QString::fromUtf8("fileTypeLabel")); - QSizePolicy sizePolicy4(QSizePolicy::Preferred, QSizePolicy::Fixed); + fileTypeLabel->setObjectName("fileTypeLabel"); + QSizePolicy sizePolicy4(QSizePolicy::Policy::Preferred, QSizePolicy::Policy::Fixed); sizePolicy4.setHorizontalStretch(0); sizePolicy4.setVerticalStretch(0); sizePolicy4.setHeightForWidth(fileTypeLabel->sizePolicy().hasHeightForWidth()); @@ -239,8 +217,8 @@ public: gridLayout->addWidget(fileTypeLabel, 3, 0, 1, 1); fileTypeCombo = new QComboBox(QFileDialog); - fileTypeCombo->setObjectName(QString::fromUtf8("fileTypeCombo")); - QSizePolicy sizePolicy5(QSizePolicy::Expanding, QSizePolicy::Fixed); + fileTypeCombo->setObjectName("fileTypeCombo"); + QSizePolicy sizePolicy5(QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Fixed); sizePolicy5.setHorizontalStretch(0); sizePolicy5.setVerticalStretch(0); sizePolicy5.setHeightForWidth(fileTypeCombo->sizePolicy().hasHeightForWidth()); @@ -271,27 +249,27 @@ public: void retranslateUi(QDialog *QFileDialog) { - lookInLabel->setText(QApplication::translate("QFileDialog", "Look in:", nullptr)); -#ifndef QT_NO_TOOLTIP - backButton->setToolTip(QApplication::translate("QFileDialog", "Back", nullptr)); -#endif // QT_NO_TOOLTIP -#ifndef QT_NO_TOOLTIP - forwardButton->setToolTip(QApplication::translate("QFileDialog", "Forward", nullptr)); -#endif // QT_NO_TOOLTIP -#ifndef QT_NO_TOOLTIP - toParentButton->setToolTip(QApplication::translate("QFileDialog", "Parent Directory", nullptr)); -#endif // QT_NO_TOOLTIP -#ifndef QT_NO_TOOLTIP - newFolderButton->setToolTip(QApplication::translate("QFileDialog", "Create New Folder", nullptr)); -#endif // QT_NO_TOOLTIP -#ifndef QT_NO_TOOLTIP - listModeButton->setToolTip(QApplication::translate("QFileDialog", "List View", nullptr)); -#endif // QT_NO_TOOLTIP -#ifndef QT_NO_TOOLTIP - detailModeButton->setToolTip(QApplication::translate("QFileDialog", "Detail View", nullptr)); -#endif // QT_NO_TOOLTIP - fileTypeLabel->setText(QApplication::translate("QFileDialog", "Files of type:", nullptr)); - Q_UNUSED(QFileDialog); + lookInLabel->setText(QCoreApplication::translate("QFileDialog", "Look in:", nullptr)); +#if QT_CONFIG(tooltip) + backButton->setToolTip(QCoreApplication::translate("QFileDialog", "Back", nullptr)); +#endif // QT_CONFIG(tooltip) +#if QT_CONFIG(tooltip) + forwardButton->setToolTip(QCoreApplication::translate("QFileDialog", "Forward", nullptr)); +#endif // QT_CONFIG(tooltip) +#if QT_CONFIG(tooltip) + toParentButton->setToolTip(QCoreApplication::translate("QFileDialog", "Parent Directory", nullptr)); +#endif // QT_CONFIG(tooltip) +#if QT_CONFIG(tooltip) + newFolderButton->setToolTip(QCoreApplication::translate("QFileDialog", "Create New Folder", nullptr)); +#endif // QT_CONFIG(tooltip) +#if QT_CONFIG(tooltip) + listModeButton->setToolTip(QCoreApplication::translate("QFileDialog", "List View", nullptr)); +#endif // QT_CONFIG(tooltip) +#if QT_CONFIG(tooltip) + detailModeButton->setToolTip(QCoreApplication::translate("QFileDialog", "Detail View", nullptr)); +#endif // QT_CONFIG(tooltip) + fileTypeLabel->setText(QCoreApplication::translate("QFileDialog", "Files of type:", nullptr)); + (void)QFileDialog; } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/qoverload.ui b/tests/auto/tools/uic/baseline/qoverload.ui new file mode 100644 index 0000000000..fb9e5294b7 --- /dev/null +++ b/tests/auto/tools/uic/baseline/qoverload.ui @@ -0,0 +1,93 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>MainWindow</class> + <widget class="QMainWindow" name="MainWindow"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>400</width> + <height>300</height> + </rect> + </property> + <property name="windowTitle"> + <string>MainWindow</string> + </property> + <widget class="QWidget" name="centralWidget"> + <layout class="QVBoxLayout" name="verticalLayout"> + <item> + <widget class="QSlider" name="horizontalSlider"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="label"> + <property name="text"> + <string>TextLabel</string> + </property> + </widget> + </item> + <item> + <widget class="QLCDNumber" name="lcdNumber"/> + </item> + </layout> + </widget> + <widget class="QMenuBar" name="menuBar"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>400</width> + <height>29</height> + </rect> + </property> + </widget> + <widget class="QToolBar" name="mainToolBar"> + <attribute name="toolBarArea"> + <enum>TopToolBarArea</enum> + </attribute> + <attribute name="toolBarBreak"> + <bool>false</bool> + </attribute> + </widget> + <widget class="QStatusBar" name="statusBar"/> + </widget> + <layoutdefault spacing="6" margin="11"/> + <resources/> + <connections> + <connection> + <sender>horizontalSlider</sender> + <signal>valueChanged(int)</signal> + <receiver>label</receiver> + <slot>setNum(int)</slot> + <hints> + <hint type="sourcelabel"> + <x>199</x> + <y>67</y> + </hint> + <hint type="destinationlabel"> + <x>199</x> + <y>172</y> + </hint> + </hints> + </connection> + <connection> + <sender>label</sender> + <signal>linkActivated(QString)</signal> + <receiver>lcdNumber</receiver> + <slot>display(QString)</slot> + <hints> + <hint type="sourcelabel"> + <x>199</x> + <y>126</y> + </hint> + <hint type="destinationlabel"> + <x>199</x> + <y>218</y> + </hint> + </hints> + </connection> + </connections> +</ui> diff --git a/tests/auto/tools/uic/baseline/qoverload.ui.h b/tests/auto/tools/uic/baseline/qoverload.ui.h new file mode 100644 index 0000000000..4ab0e37d1f --- /dev/null +++ b/tests/auto/tools/uic/baseline/qoverload.ui.h @@ -0,0 +1,98 @@ +/******************************************************************************** +** Form generated from reading UI file 'qoverload.ui' +** +** Created by: Qt User Interface Compiler version 6.8.0 +** +** WARNING! All changes made in this file will be lost when recompiling UI file! +********************************************************************************/ + +#ifndef QOVERLOAD_H +#define QOVERLOAD_H + +#include <QtCore/QVariant> +#include <QtWidgets/QApplication> +#include <QtWidgets/QLCDNumber> +#include <QtWidgets/QLabel> +#include <QtWidgets/QMainWindow> +#include <QtWidgets/QMenuBar> +#include <QtWidgets/QSlider> +#include <QtWidgets/QStatusBar> +#include <QtWidgets/QToolBar> +#include <QtWidgets/QVBoxLayout> +#include <QtWidgets/QWidget> + +QT_BEGIN_NAMESPACE + +class Ui_MainWindow +{ +public: + QWidget *centralWidget; + QVBoxLayout *verticalLayout; + QSlider *horizontalSlider; + QLabel *label; + QLCDNumber *lcdNumber; + QMenuBar *menuBar; + QToolBar *mainToolBar; + QStatusBar *statusBar; + + void setupUi(QMainWindow *MainWindow) + { + if (MainWindow->objectName().isEmpty()) + MainWindow->setObjectName("MainWindow"); + MainWindow->resize(400, 300); + centralWidget = new QWidget(MainWindow); + centralWidget->setObjectName("centralWidget"); + verticalLayout = new QVBoxLayout(centralWidget); + verticalLayout->setSpacing(6); + verticalLayout->setContentsMargins(11, 11, 11, 11); + verticalLayout->setObjectName("verticalLayout"); + horizontalSlider = new QSlider(centralWidget); + horizontalSlider->setObjectName("horizontalSlider"); + horizontalSlider->setOrientation(Qt::Horizontal); + + verticalLayout->addWidget(horizontalSlider); + + label = new QLabel(centralWidget); + label->setObjectName("label"); + + verticalLayout->addWidget(label); + + lcdNumber = new QLCDNumber(centralWidget); + lcdNumber->setObjectName("lcdNumber"); + + verticalLayout->addWidget(lcdNumber); + + MainWindow->setCentralWidget(centralWidget); + menuBar = new QMenuBar(MainWindow); + menuBar->setObjectName("menuBar"); + menuBar->setGeometry(QRect(0, 0, 400, 29)); + MainWindow->setMenuBar(menuBar); + mainToolBar = new QToolBar(MainWindow); + mainToolBar->setObjectName("mainToolBar"); + MainWindow->addToolBar(Qt::ToolBarArea::TopToolBarArea, mainToolBar); + statusBar = new QStatusBar(MainWindow); + statusBar->setObjectName("statusBar"); + MainWindow->setStatusBar(statusBar); + + retranslateUi(MainWindow); + QObject::connect(horizontalSlider, &QSlider::valueChanged, label, qOverload<int>(&QLabel::setNum)); + QObject::connect(label, &QLabel::linkActivated, lcdNumber, qOverload<const QString&>(&QLCDNumber::display)); + + QMetaObject::connectSlotsByName(MainWindow); + } // setupUi + + void retranslateUi(QMainWindow *MainWindow) + { + MainWindow->setWindowTitle(QCoreApplication::translate("MainWindow", "MainWindow", nullptr)); + label->setText(QCoreApplication::translate("MainWindow", "TextLabel", nullptr)); + } // retranslateUi + +}; + +namespace Ui { + class MainWindow: public Ui_MainWindow {}; +} // namespace Ui + +QT_END_NAMESPACE + +#endif // QOVERLOAD_H diff --git a/tests/auto/tools/uic/baseline/qpagesetupwidget.ui b/tests/auto/tools/uic/baseline/qpagesetupwidget.ui index 960a9dac17..c5e14ef063 100644 --- a/tests/auto/tools/uic/baseline/qpagesetupwidget.ui +++ b/tests/auto/tools/uic/baseline/qpagesetupwidget.ui @@ -239,7 +239,7 @@ <enum>Qt::Horizontal</enum> </property> <property name="sizeType" > - <enum>QSizePolicy::MinimumExpanding</enum> + <enum>QSizePolicy::Policy::MinimumExpanding</enum> </property> <property name="sizeHint" stdset="0" > <size> @@ -286,7 +286,7 @@ <enum>Qt::Horizontal</enum> </property> <property name="sizeType"> - <enum>QSizePolicy::MinimumExpanding</enum> + <enum>QSizePolicy::Policy::MinimumExpanding</enum> </property> <property name="sizeHint" stdset="0"> <size> @@ -318,10 +318,10 @@ <enum>Qt::Horizontal</enum> </property> <property name="sizeType" > - <enum>QSizePolicy::MinimumExpanding</enum> + <enum>QSizePolicy::Policy::MinimumExpanding</enum> </property> <property name="sizeHint" stdset="0"> - <enum>QSizePolicy::MinimumExpanding</enum> + <enum>QSizePolicy::Policy::MinimumExpanding</enum> </property> <property name="sizeHint" stdset="0" > <size> diff --git a/tests/auto/tools/uic/baseline/qpagesetupwidget.ui.h b/tests/auto/tools/uic/baseline/qpagesetupwidget.ui.h index a5379bc468..4f2f4ff0fe 100644 --- a/tests/auto/tools/uic/baseline/qpagesetupwidget.ui.h +++ b/tests/auto/tools/uic/baseline/qpagesetupwidget.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'qpagesetupwidget.ui' ** -** Created by: Qt User Interface Compiler version 5.12.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -76,45 +76,45 @@ public: void setupUi(QWidget *QPageSetupWidget) { if (QPageSetupWidget->objectName().isEmpty()) - QPageSetupWidget->setObjectName(QString::fromUtf8("QPageSetupWidget")); + QPageSetupWidget->setObjectName("QPageSetupWidget"); QPageSetupWidget->resize(416, 515); gridLayout_3 = new QGridLayout(QPageSetupWidget); gridLayout_3->setContentsMargins(0, 0, 0, 0); - gridLayout_3->setObjectName(QString::fromUtf8("gridLayout_3")); + gridLayout_3->setObjectName("gridLayout_3"); groupBox_2 = new QGroupBox(QPageSetupWidget); - groupBox_2->setObjectName(QString::fromUtf8("groupBox_2")); + groupBox_2->setObjectName("groupBox_2"); gridLayout_2 = new QGridLayout(groupBox_2); - gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2")); + gridLayout_2->setObjectName("gridLayout_2"); pageSizeLabel = new QLabel(groupBox_2); - pageSizeLabel->setObjectName(QString::fromUtf8("pageSizeLabel")); + pageSizeLabel->setObjectName("pageSizeLabel"); gridLayout_2->addWidget(pageSizeLabel, 0, 0, 1, 1); pageSizeCombo = new QComboBox(groupBox_2); - pageSizeCombo->setObjectName(QString::fromUtf8("pageSizeCombo")); + pageSizeCombo->setObjectName("pageSizeCombo"); gridLayout_2->addWidget(pageSizeCombo, 0, 1, 1, 1); widthLabel = new QLabel(groupBox_2); - widthLabel->setObjectName(QString::fromUtf8("widthLabel")); + widthLabel->setObjectName("widthLabel"); gridLayout_2->addWidget(widthLabel, 1, 0, 1, 1); horizontalLayout_3 = new QHBoxLayout(); - horizontalLayout_3->setObjectName(QString::fromUtf8("horizontalLayout_3")); + horizontalLayout_3->setObjectName("horizontalLayout_3"); pageWidth = new QDoubleSpinBox(groupBox_2); - pageWidth->setObjectName(QString::fromUtf8("pageWidth")); + pageWidth->setObjectName("pageWidth"); pageWidth->setMaximum(9999.989999999999782); horizontalLayout_3->addWidget(pageWidth); heightLabel = new QLabel(groupBox_2); - heightLabel->setObjectName(QString::fromUtf8("heightLabel")); + heightLabel->setObjectName("heightLabel"); horizontalLayout_3->addWidget(heightLabel); pageHeight = new QDoubleSpinBox(groupBox_2); - pageHeight->setObjectName(QString::fromUtf8("pageHeight")); + pageHeight->setObjectName("pageHeight"); pageHeight->setMaximum(9999.989999999999782); horizontalLayout_3->addWidget(pageHeight); @@ -123,16 +123,16 @@ public: gridLayout_2->addLayout(horizontalLayout_3, 1, 1, 1, 1); paperSourceLabel = new QLabel(groupBox_2); - paperSourceLabel->setObjectName(QString::fromUtf8("paperSourceLabel")); + paperSourceLabel->setObjectName("paperSourceLabel"); gridLayout_2->addWidget(paperSourceLabel, 2, 0, 1, 1); paperSource = new QComboBox(groupBox_2); - paperSource->setObjectName(QString::fromUtf8("paperSource")); + paperSource->setObjectName("paperSource"); gridLayout_2->addWidget(paperSource, 2, 1, 1, 1); - horizontalSpacer_4 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + horizontalSpacer_4 = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); gridLayout_2->addItem(horizontalSpacer_4, 1, 2, 1, 1); @@ -140,13 +140,13 @@ public: gridLayout_3->addWidget(groupBox_2, 1, 0, 1, 2); horizontalLayout_4 = new QHBoxLayout(); - horizontalLayout_4->setObjectName(QString::fromUtf8("horizontalLayout_4")); + horizontalLayout_4->setObjectName("horizontalLayout_4"); unitCombo = new QComboBox(QPageSetupWidget); - unitCombo->setObjectName(QString::fromUtf8("unitCombo")); + unitCombo->setObjectName("unitCombo"); horizontalLayout_4->addWidget(unitCombo); - horizontalSpacer_3 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + horizontalSpacer_3 = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); horizontalLayout_4->addItem(horizontalSpacer_3); @@ -154,36 +154,36 @@ public: gridLayout_3->addLayout(horizontalLayout_4, 0, 0, 1, 2); preview = new QWidget(QPageSetupWidget); - preview->setObjectName(QString::fromUtf8("preview")); + preview->setObjectName("preview"); gridLayout_3->addWidget(preview, 2, 1, 2, 1); groupBox_3 = new QGroupBox(QPageSetupWidget); - groupBox_3->setObjectName(QString::fromUtf8("groupBox_3")); + groupBox_3->setObjectName("groupBox_3"); verticalLayout = new QVBoxLayout(groupBox_3); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + verticalLayout->setObjectName("verticalLayout"); portrait = new QRadioButton(groupBox_3); - portrait->setObjectName(QString::fromUtf8("portrait")); + portrait->setObjectName("portrait"); portrait->setChecked(true); verticalLayout->addWidget(portrait); landscape = new QRadioButton(groupBox_3); - landscape->setObjectName(QString::fromUtf8("landscape")); + landscape->setObjectName("landscape"); verticalLayout->addWidget(landscape); reverseLandscape = new QRadioButton(groupBox_3); - reverseLandscape->setObjectName(QString::fromUtf8("reverseLandscape")); + reverseLandscape->setObjectName("reverseLandscape"); verticalLayout->addWidget(reverseLandscape); reversePortrait = new QRadioButton(groupBox_3); - reversePortrait->setObjectName(QString::fromUtf8("reversePortrait")); + reversePortrait->setObjectName("reversePortrait"); verticalLayout->addWidget(reversePortrait); - verticalSpacer_5 = new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding); + verticalSpacer_5 = new QSpacerItem(0, 0, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Expanding); verticalLayout->addItem(verticalSpacer_5); @@ -191,61 +191,61 @@ public: gridLayout_3->addWidget(groupBox_3, 2, 0, 1, 1); groupBox = new QGroupBox(QPageSetupWidget); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName("groupBox"); horizontalLayout_2 = new QHBoxLayout(groupBox); - horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2")); + horizontalLayout_2->setObjectName("horizontalLayout_2"); gridLayout = new QGridLayout(); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); topMargin = new QDoubleSpinBox(groupBox); - topMargin->setObjectName(QString::fromUtf8("topMargin")); + topMargin->setObjectName("topMargin"); topMargin->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); topMargin->setMaximum(999.990000000000009); gridLayout->addWidget(topMargin, 0, 1, 1, 1); horizontalLayout = new QHBoxLayout(); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); - horizontalSpacer_7 = new QSpacerItem(0, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + horizontalLayout->setObjectName("horizontalLayout"); + horizontalSpacer_7 = new QSpacerItem(0, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); horizontalLayout->addItem(horizontalSpacer_7); leftMargin = new QDoubleSpinBox(groupBox); - leftMargin->setObjectName(QString::fromUtf8("leftMargin")); + leftMargin->setObjectName("leftMargin"); leftMargin->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); leftMargin->setMaximum(999.990000000000009); horizontalLayout->addWidget(leftMargin); - horizontalSpacer = new QSpacerItem(0, 0, QSizePolicy::MinimumExpanding, QSizePolicy::Minimum); + horizontalSpacer = new QSpacerItem(0, 0, QSizePolicy::Policy::MinimumExpanding, QSizePolicy::Policy::Minimum); horizontalLayout->addItem(horizontalSpacer); rightMargin = new QDoubleSpinBox(groupBox); - rightMargin->setObjectName(QString::fromUtf8("rightMargin")); + rightMargin->setObjectName("rightMargin"); rightMargin->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); rightMargin->setMaximum(999.990000000000009); horizontalLayout->addWidget(rightMargin); - horizontalSpacer_8 = new QSpacerItem(0, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + horizontalSpacer_8 = new QSpacerItem(0, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); horizontalLayout->addItem(horizontalSpacer_8); gridLayout->addLayout(horizontalLayout, 1, 0, 1, 3); - horizontalSpacer_2 = new QSpacerItem(0, 20, QSizePolicy::MinimumExpanding, QSizePolicy::Minimum); + horizontalSpacer_2 = new QSpacerItem(0, 20, QSizePolicy::Policy::MinimumExpanding, QSizePolicy::Policy::Minimum); gridLayout->addItem(horizontalSpacer_2, 0, 2, 1, 1); bottomMargin = new QDoubleSpinBox(groupBox); - bottomMargin->setObjectName(QString::fromUtf8("bottomMargin")); + bottomMargin->setObjectName("bottomMargin"); bottomMargin->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); bottomMargin->setMaximum(999.990000000000009); gridLayout->addWidget(bottomMargin, 2, 1, 1, 1); - horizontalSpacer_5 = new QSpacerItem(0, 20, QSizePolicy::MinimumExpanding, QSizePolicy::Minimum); + horizontalSpacer_5 = new QSpacerItem(0, 20, QSizePolicy::Policy::MinimumExpanding, QSizePolicy::Policy::Minimum); gridLayout->addItem(horizontalSpacer_5, 0, 0, 1, 1); @@ -256,46 +256,46 @@ public: gridLayout_3->addWidget(groupBox, 3, 0, 1, 1); pagesPerSheetButtonGroup = new QGroupBox(QPageSetupWidget); - pagesPerSheetButtonGroup->setObjectName(QString::fromUtf8("pagesPerSheetButtonGroup")); + pagesPerSheetButtonGroup->setObjectName("pagesPerSheetButtonGroup"); gridLayout_4 = new QGridLayout(pagesPerSheetButtonGroup); - gridLayout_4->setObjectName(QString::fromUtf8("gridLayout_4")); + gridLayout_4->setObjectName("gridLayout_4"); pagesPerSheetCombo = new QComboBox(pagesPerSheetButtonGroup); - pagesPerSheetCombo->setObjectName(QString::fromUtf8("pagesPerSheetCombo")); + pagesPerSheetCombo->setObjectName("pagesPerSheetCombo"); gridLayout_4->addWidget(pagesPerSheetCombo, 0, 1, 1, 1); - horizontalSpacer_6 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + horizontalSpacer_6 = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); gridLayout_4->addItem(horizontalSpacer_6, 0, 2, 1, 1); label = new QLabel(pagesPerSheetButtonGroup); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName("label"); gridLayout_4->addWidget(label, 1, 0, 1, 1); pagesPerSheetLayoutCombo = new QComboBox(pagesPerSheetButtonGroup); - pagesPerSheetLayoutCombo->setObjectName(QString::fromUtf8("pagesPerSheetLayoutCombo")); + pagesPerSheetLayoutCombo->setObjectName("pagesPerSheetLayoutCombo"); gridLayout_4->addWidget(pagesPerSheetLayoutCombo, 1, 1, 1, 1); label_2 = new QLabel(pagesPerSheetButtonGroup); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName("label_2"); gridLayout_4->addWidget(label_2, 0, 0, 1, 1); gridLayout_3->addWidget(pagesPerSheetButtonGroup, 5, 0, 1, 2); - verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Expanding); gridLayout_3->addItem(verticalSpacer, 6, 0, 1, 1); -#ifndef QT_NO_SHORTCUT +#if QT_CONFIG(shortcut) pageSizeLabel->setBuddy(pageSizeCombo); widthLabel->setBuddy(pageWidth); heightLabel->setBuddy(pageHeight); paperSourceLabel->setBuddy(paperSource); -#endif // QT_NO_SHORTCUT +#endif // QT_CONFIG(shortcut) retranslateUi(QPageSetupWidget); @@ -304,45 +304,45 @@ public: void retranslateUi(QWidget *QPageSetupWidget) { - QPageSetupWidget->setWindowTitle(QApplication::translate("QPageSetupWidget", "Form", nullptr)); - groupBox_2->setTitle(QApplication::translate("QPageSetupWidget", "Paper", nullptr)); - pageSizeLabel->setText(QApplication::translate("QPageSetupWidget", "Page size:", nullptr)); - widthLabel->setText(QApplication::translate("QPageSetupWidget", "Width:", nullptr)); - heightLabel->setText(QApplication::translate("QPageSetupWidget", "Height:", nullptr)); - paperSourceLabel->setText(QApplication::translate("QPageSetupWidget", "Paper source:", nullptr)); - groupBox_3->setTitle(QApplication::translate("QPageSetupWidget", "Orientation", nullptr)); - portrait->setText(QApplication::translate("QPageSetupWidget", "Portrait", nullptr)); - landscape->setText(QApplication::translate("QPageSetupWidget", "Landscape", nullptr)); - reverseLandscape->setText(QApplication::translate("QPageSetupWidget", "Reverse landscape", nullptr)); - reversePortrait->setText(QApplication::translate("QPageSetupWidget", "Reverse portrait", nullptr)); - groupBox->setTitle(QApplication::translate("QPageSetupWidget", "Margins", nullptr)); -#ifndef QT_NO_TOOLTIP - topMargin->setToolTip(QApplication::translate("QPageSetupWidget", "top margin", nullptr)); -#endif // QT_NO_TOOLTIP -#ifndef QT_NO_ACCESSIBILITY - topMargin->setAccessibleName(QApplication::translate("QPageSetupWidget", "top margin", nullptr)); -#endif // QT_NO_ACCESSIBILITY -#ifndef QT_NO_TOOLTIP - leftMargin->setToolTip(QApplication::translate("QPageSetupWidget", "left margin", nullptr)); -#endif // QT_NO_TOOLTIP -#ifndef QT_NO_ACCESSIBILITY - leftMargin->setAccessibleName(QApplication::translate("QPageSetupWidget", "left margin", nullptr)); -#endif // QT_NO_ACCESSIBILITY -#ifndef QT_NO_TOOLTIP - rightMargin->setToolTip(QApplication::translate("QPageSetupWidget", "right margin", nullptr)); -#endif // QT_NO_TOOLTIP -#ifndef QT_NO_ACCESSIBILITY - rightMargin->setAccessibleName(QApplication::translate("QPageSetupWidget", "right margin", nullptr)); -#endif // QT_NO_ACCESSIBILITY -#ifndef QT_NO_TOOLTIP - bottomMargin->setToolTip(QApplication::translate("QPageSetupWidget", "bottom margin", nullptr)); -#endif // QT_NO_TOOLTIP -#ifndef QT_NO_ACCESSIBILITY - bottomMargin->setAccessibleName(QApplication::translate("QPageSetupWidget", "bottom margin", nullptr)); -#endif // QT_NO_ACCESSIBILITY - pagesPerSheetButtonGroup->setTitle(QApplication::translate("QPageSetupWidget", "Page Layout", nullptr)); - label->setText(QApplication::translate("QPageSetupWidget", "Page order:", nullptr)); - label_2->setText(QApplication::translate("QPageSetupWidget", "Pages per sheet:", nullptr)); + QPageSetupWidget->setWindowTitle(QCoreApplication::translate("QPageSetupWidget", "Form", nullptr)); + groupBox_2->setTitle(QCoreApplication::translate("QPageSetupWidget", "Paper", nullptr)); + pageSizeLabel->setText(QCoreApplication::translate("QPageSetupWidget", "Page size:", nullptr)); + widthLabel->setText(QCoreApplication::translate("QPageSetupWidget", "Width:", nullptr)); + heightLabel->setText(QCoreApplication::translate("QPageSetupWidget", "Height:", nullptr)); + paperSourceLabel->setText(QCoreApplication::translate("QPageSetupWidget", "Paper source:", nullptr)); + groupBox_3->setTitle(QCoreApplication::translate("QPageSetupWidget", "Orientation", nullptr)); + portrait->setText(QCoreApplication::translate("QPageSetupWidget", "Portrait", nullptr)); + landscape->setText(QCoreApplication::translate("QPageSetupWidget", "Landscape", nullptr)); + reverseLandscape->setText(QCoreApplication::translate("QPageSetupWidget", "Reverse landscape", nullptr)); + reversePortrait->setText(QCoreApplication::translate("QPageSetupWidget", "Reverse portrait", nullptr)); + groupBox->setTitle(QCoreApplication::translate("QPageSetupWidget", "Margins", nullptr)); +#if QT_CONFIG(tooltip) + topMargin->setToolTip(QCoreApplication::translate("QPageSetupWidget", "top margin", nullptr)); +#endif // QT_CONFIG(tooltip) +#if QT_CONFIG(accessibility) + topMargin->setAccessibleName(QCoreApplication::translate("QPageSetupWidget", "top margin", nullptr)); +#endif // QT_CONFIG(accessibility) +#if QT_CONFIG(tooltip) + leftMargin->setToolTip(QCoreApplication::translate("QPageSetupWidget", "left margin", nullptr)); +#endif // QT_CONFIG(tooltip) +#if QT_CONFIG(accessibility) + leftMargin->setAccessibleName(QCoreApplication::translate("QPageSetupWidget", "left margin", nullptr)); +#endif // QT_CONFIG(accessibility) +#if QT_CONFIG(tooltip) + rightMargin->setToolTip(QCoreApplication::translate("QPageSetupWidget", "right margin", nullptr)); +#endif // QT_CONFIG(tooltip) +#if QT_CONFIG(accessibility) + rightMargin->setAccessibleName(QCoreApplication::translate("QPageSetupWidget", "right margin", nullptr)); +#endif // QT_CONFIG(accessibility) +#if QT_CONFIG(tooltip) + bottomMargin->setToolTip(QCoreApplication::translate("QPageSetupWidget", "bottom margin", nullptr)); +#endif // QT_CONFIG(tooltip) +#if QT_CONFIG(accessibility) + bottomMargin->setAccessibleName(QCoreApplication::translate("QPageSetupWidget", "bottom margin", nullptr)); +#endif // QT_CONFIG(accessibility) + pagesPerSheetButtonGroup->setTitle(QCoreApplication::translate("QPageSetupWidget", "Page Layout", nullptr)); + label->setText(QCoreApplication::translate("QPageSetupWidget", "Page order:", nullptr)); + label_2->setText(QCoreApplication::translate("QPageSetupWidget", "Pages per sheet:", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/qprintpropertieswidget.ui.h b/tests/auto/tools/uic/baseline/qprintpropertieswidget.ui.h index 8626a9fc3c..66e4e1cec8 100644 --- a/tests/auto/tools/uic/baseline/qprintpropertieswidget.ui.h +++ b/tests/auto/tools/uic/baseline/qprintpropertieswidget.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'qprintpropertieswidget.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -36,30 +36,30 @@ public: void setupUi(QWidget *QPrintPropertiesWidget) { if (QPrintPropertiesWidget->objectName().isEmpty()) - QPrintPropertiesWidget->setObjectName(QString::fromUtf8("QPrintPropertiesWidget")); + QPrintPropertiesWidget->setObjectName("QPrintPropertiesWidget"); QPrintPropertiesWidget->resize(396, 288); verticalLayout_4 = new QVBoxLayout(QPrintPropertiesWidget); verticalLayout_4->setContentsMargins(0, 0, 0, 0); - verticalLayout_4->setObjectName(QString::fromUtf8("verticalLayout_4")); + verticalLayout_4->setObjectName("verticalLayout_4"); tabs = new QTabWidget(QPrintPropertiesWidget); - tabs->setObjectName(QString::fromUtf8("tabs")); + tabs->setObjectName("tabs"); tabPage = new QWidget(); - tabPage->setObjectName(QString::fromUtf8("tabPage")); + tabPage->setObjectName("tabPage"); tabPage->setGeometry(QRect(0, 0, 392, 261)); horizontalLayout = new QHBoxLayout(tabPage); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); + horizontalLayout->setObjectName("horizontalLayout"); pageSetup = new QPageSetupWidget(tabPage); - pageSetup->setObjectName(QString::fromUtf8("pageSetup")); + pageSetup->setObjectName("pageSetup"); horizontalLayout->addWidget(pageSetup); tabs->addTab(tabPage, QString()); cupsPropertiesPage = new QWidget(); - cupsPropertiesPage->setObjectName(QString::fromUtf8("cupsPropertiesPage")); + cupsPropertiesPage->setObjectName("cupsPropertiesPage"); horizontalLayout_2 = new QHBoxLayout(cupsPropertiesPage); - horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2")); + horizontalLayout_2->setObjectName("horizontalLayout_2"); treeView = new QTreeView(cupsPropertiesPage); - treeView->setObjectName(QString::fromUtf8("treeView")); + treeView->setObjectName("treeView"); treeView->setAlternatingRowColors(true); horizontalLayout_2->addWidget(treeView); @@ -79,9 +79,9 @@ public: void retranslateUi(QWidget *QPrintPropertiesWidget) { - QPrintPropertiesWidget->setWindowTitle(QApplication::translate("QPrintPropertiesWidget", "Form", nullptr)); - tabs->setTabText(tabs->indexOf(tabPage), QApplication::translate("QPrintPropertiesWidget", "Page", nullptr)); - tabs->setTabText(tabs->indexOf(cupsPropertiesPage), QApplication::translate("QPrintPropertiesWidget", "Advanced", nullptr)); + QPrintPropertiesWidget->setWindowTitle(QCoreApplication::translate("QPrintPropertiesWidget", "Form", nullptr)); + tabs->setTabText(tabs->indexOf(tabPage), QCoreApplication::translate("QPrintPropertiesWidget", "Page", nullptr)); + tabs->setTabText(tabs->indexOf(cupsPropertiesPage), QCoreApplication::translate("QPrintPropertiesWidget", "Advanced", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/qprintsettingsoutput.ui.h b/tests/auto/tools/uic/baseline/qprintsettingsoutput.ui.h index 656b5f9deb..e331bb3a2e 100644 --- a/tests/auto/tools/uic/baseline/qprintsettingsoutput.ui.h +++ b/tests/auto/tools/uic/baseline/qprintsettingsoutput.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'qprintsettingsoutput.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -70,21 +70,21 @@ public: void setupUi(QWidget *QPrintSettingsOutput) { if (QPrintSettingsOutput->objectName().isEmpty()) - QPrintSettingsOutput->setObjectName(QString::fromUtf8("QPrintSettingsOutput")); + QPrintSettingsOutput->setObjectName("QPrintSettingsOutput"); QPrintSettingsOutput->resize(416, 166); horizontalLayout_2 = new QHBoxLayout(QPrintSettingsOutput); horizontalLayout_2->setContentsMargins(0, 0, 0, 0); - horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2")); + horizontalLayout_2->setObjectName("horizontalLayout_2"); tabs = new QTabWidget(QPrintSettingsOutput); - tabs->setObjectName(QString::fromUtf8("tabs")); + tabs->setObjectName("tabs"); copiesTab = new QWidget(); - copiesTab->setObjectName(QString::fromUtf8("copiesTab")); + copiesTab->setObjectName("copiesTab"); copiesTab->setGeometry(QRect(0, 0, 412, 139)); horizontalLayout = new QHBoxLayout(copiesTab); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); + horizontalLayout->setObjectName("horizontalLayout"); gbPrintRange = new QGroupBox(copiesTab); - gbPrintRange->setObjectName(QString::fromUtf8("gbPrintRange")); - QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum); + gbPrintRange->setObjectName("gbPrintRange"); + QSizePolicy sizePolicy(QSizePolicy::Policy::Preferred, QSizePolicy::Policy::Minimum); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); sizePolicy.setHeightForWidth(gbPrintRange->sizePolicy().hasHeightForWidth()); @@ -92,9 +92,9 @@ public: _3 = new QVBoxLayout(gbPrintRange); _3->setSpacing(4); _3->setContentsMargins(6, 6, 6, 6); - _3->setObjectName(QString::fromUtf8("_3")); + _3->setObjectName("_3"); printAll = new QRadioButton(gbPrintRange); - printAll->setObjectName(QString::fromUtf8("printAll")); + printAll->setObjectName("printAll"); printAll->setChecked(true); _3->addWidget(printAll); @@ -104,14 +104,14 @@ public: _4->setSpacing(6); #endif _4->setContentsMargins(0, 0, 0, 0); - _4->setObjectName(QString::fromUtf8("_4")); + _4->setObjectName("_4"); printRange = new QRadioButton(gbPrintRange); - printRange->setObjectName(QString::fromUtf8("printRange")); + printRange->setObjectName("printRange"); _4->addWidget(printRange); from = new QSpinBox(gbPrintRange); - from->setObjectName(QString::fromUtf8("from")); + from->setObjectName("from"); from->setEnabled(false); from->setMinimum(1); from->setMaximum(999); @@ -119,19 +119,19 @@ public: _4->addWidget(from); label_3 = new QLabel(gbPrintRange); - label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setObjectName("label_3"); _4->addWidget(label_3); to = new QSpinBox(gbPrintRange); - to->setObjectName(QString::fromUtf8("to")); + to->setObjectName("to"); to->setEnabled(false); to->setMinimum(1); to->setMaximum(999); _4->addWidget(to); - spacerItem = new QSpacerItem(0, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacerItem = new QSpacerItem(0, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); _4->addItem(spacerItem); @@ -139,11 +139,11 @@ public: _3->addLayout(_4); printSelection = new QRadioButton(gbPrintRange); - printSelection->setObjectName(QString::fromUtf8("printSelection")); + printSelection->setObjectName("printSelection"); _3->addWidget(printSelection); - verticalSpacer = new QSpacerItem(1, 1, QSizePolicy::Minimum, QSizePolicy::Expanding); + verticalSpacer = new QSpacerItem(1, 1, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Expanding); _3->addItem(verticalSpacer); @@ -151,33 +151,33 @@ public: horizontalLayout->addWidget(gbPrintRange); groupBox = new QGroupBox(copiesTab); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName("groupBox"); gridLayout = new QGridLayout(groupBox); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); label = new QLabel(groupBox); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName("label"); gridLayout->addWidget(label, 0, 0, 1, 1); copies = new QSpinBox(groupBox); - copies->setObjectName(QString::fromUtf8("copies")); + copies->setObjectName("copies"); copies->setMinimum(1); copies->setMaximum(999); gridLayout->addWidget(copies, 0, 1, 1, 2); - horizontalSpacer = new QSpacerItem(91, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + horizontalSpacer = new QSpacerItem(91, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); gridLayout->addItem(horizontalSpacer, 0, 3, 1, 1); collate = new QCheckBox(groupBox); - collate->setObjectName(QString::fromUtf8("collate")); + collate->setObjectName("collate"); gridLayout->addWidget(collate, 1, 0, 1, 2); outputIcon = new QLabel(groupBox); - outputIcon->setObjectName(QString::fromUtf8("outputIcon")); - QSizePolicy sizePolicy1(QSizePolicy::Ignored, QSizePolicy::Ignored); + outputIcon->setObjectName("outputIcon"); + QSizePolicy sizePolicy1(QSizePolicy::Policy::Ignored, QSizePolicy::Policy::Ignored); sizePolicy1.setHorizontalStretch(0); sizePolicy1.setVerticalStretch(0); sizePolicy1.setHeightForWidth(outputIcon->sizePolicy().hasHeightForWidth()); @@ -186,11 +186,11 @@ public: gridLayout->addWidget(outputIcon, 1, 2, 2, 2); reverse = new QCheckBox(groupBox); - reverse->setObjectName(QString::fromUtf8("reverse")); + reverse->setObjectName("reverse"); gridLayout->addWidget(reverse, 2, 0, 1, 2); - verticalSpacer_2 = new QSpacerItem(0, 1, QSizePolicy::Minimum, QSizePolicy::Expanding); + verticalSpacer_2 = new QSpacerItem(0, 1, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Expanding); gridLayout->addItem(verticalSpacer_2, 3, 0, 1, 4); @@ -199,30 +199,30 @@ public: tabs->addTab(copiesTab, QString()); optionsTab = new QWidget(); - optionsTab->setObjectName(QString::fromUtf8("optionsTab")); + optionsTab->setObjectName("optionsTab"); optionsTab->setGeometry(QRect(0, 0, 412, 139)); gridLayout_2 = new QGridLayout(optionsTab); - gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2")); + gridLayout_2->setObjectName("gridLayout_2"); colorMode = new QGroupBox(optionsTab); - colorMode->setObjectName(QString::fromUtf8("colorMode")); + colorMode->setObjectName("colorMode"); gridLayout_4 = new QGridLayout(colorMode); - gridLayout_4->setObjectName(QString::fromUtf8("gridLayout_4")); - verticalSpacer_6 = new QSpacerItem(1, 0, QSizePolicy::Minimum, QSizePolicy::Expanding); + gridLayout_4->setObjectName("gridLayout_4"); + verticalSpacer_6 = new QSpacerItem(1, 0, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Expanding); gridLayout_4->addItem(verticalSpacer_6, 2, 0, 1, 1); color = new QRadioButton(colorMode); - color->setObjectName(QString::fromUtf8("color")); + color->setObjectName("color"); gridLayout_4->addWidget(color, 0, 0, 1, 1); colorIcon = new QLabel(colorMode); - colorIcon->setObjectName(QString::fromUtf8("colorIcon")); + colorIcon->setObjectName("colorIcon"); gridLayout_4->addWidget(colorIcon, 0, 1, 3, 1); grayscale = new QRadioButton(colorMode); - grayscale->setObjectName(QString::fromUtf8("grayscale")); + grayscale->setObjectName("grayscale"); gridLayout_4->addWidget(grayscale, 1, 0, 1, 1); @@ -230,26 +230,26 @@ public: gridLayout_2->addWidget(colorMode, 0, 1, 1, 1); duplex = new QGroupBox(optionsTab); - duplex->setObjectName(QString::fromUtf8("duplex")); + duplex->setObjectName("duplex"); verticalLayout = new QVBoxLayout(duplex); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + verticalLayout->setObjectName("verticalLayout"); noDuplex = new QRadioButton(duplex); - noDuplex->setObjectName(QString::fromUtf8("noDuplex")); + noDuplex->setObjectName("noDuplex"); noDuplex->setChecked(true); verticalLayout->addWidget(noDuplex); duplexLong = new QRadioButton(duplex); - duplexLong->setObjectName(QString::fromUtf8("duplexLong")); + duplexLong->setObjectName("duplexLong"); verticalLayout->addWidget(duplexLong); duplexShort = new QRadioButton(duplex); - duplexShort->setObjectName(QString::fromUtf8("duplexShort")); + duplexShort->setObjectName("duplexShort"); verticalLayout->addWidget(duplexShort); - verticalSpacer1 = new QSpacerItem(1, 0, QSizePolicy::Minimum, QSizePolicy::Expanding); + verticalSpacer1 = new QSpacerItem(1, 0, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Expanding); verticalLayout->addItem(verticalSpacer1); @@ -260,13 +260,13 @@ public: horizontalLayout_2->addWidget(tabs); -#ifndef QT_NO_SHORTCUT +#if QT_CONFIG(shortcut) label->setBuddy(copies); -#endif // QT_NO_SHORTCUT +#endif // QT_CONFIG(shortcut) retranslateUi(QPrintSettingsOutput); - QObject::connect(printRange, SIGNAL(toggled(bool)), from, SLOT(setEnabled(bool))); - QObject::connect(printRange, SIGNAL(toggled(bool)), to, SLOT(setEnabled(bool))); + QObject::connect(printRange, &QRadioButton::toggled, from, &QSpinBox::setEnabled); + QObject::connect(printRange, &QRadioButton::toggled, to, &QSpinBox::setEnabled); tabs->setCurrentIndex(0); @@ -276,25 +276,25 @@ public: void retranslateUi(QWidget *QPrintSettingsOutput) { - QPrintSettingsOutput->setWindowTitle(QApplication::translate("QPrintSettingsOutput", "Form", nullptr)); - gbPrintRange->setTitle(QApplication::translate("QPrintSettingsOutput", "Print range", nullptr)); - printAll->setText(QApplication::translate("QPrintSettingsOutput", "Print all", nullptr)); - printRange->setText(QApplication::translate("QPrintSettingsOutput", "Pages from", nullptr)); - label_3->setText(QApplication::translate("QPrintSettingsOutput", "to", nullptr)); - printSelection->setText(QApplication::translate("QPrintSettingsOutput", "Selection", nullptr)); - groupBox->setTitle(QApplication::translate("QPrintSettingsOutput", "Output Settings", nullptr)); - label->setText(QApplication::translate("QPrintSettingsOutput", "Copies:", nullptr)); - collate->setText(QApplication::translate("QPrintSettingsOutput", "Collate", nullptr)); - reverse->setText(QApplication::translate("QPrintSettingsOutput", "Reverse", nullptr)); - tabs->setTabText(tabs->indexOf(copiesTab), QApplication::translate("QPrintSettingsOutput", "Copies", nullptr)); - colorMode->setTitle(QApplication::translate("QPrintSettingsOutput", "Color Mode", nullptr)); - color->setText(QApplication::translate("QPrintSettingsOutput", "Color", nullptr)); - grayscale->setText(QApplication::translate("QPrintSettingsOutput", "Grayscale", nullptr)); - duplex->setTitle(QApplication::translate("QPrintSettingsOutput", "Duplex Printing", nullptr)); - noDuplex->setText(QApplication::translate("QPrintSettingsOutput", "None", nullptr)); - duplexLong->setText(QApplication::translate("QPrintSettingsOutput", "Long side", nullptr)); - duplexShort->setText(QApplication::translate("QPrintSettingsOutput", "Short side", nullptr)); - tabs->setTabText(tabs->indexOf(optionsTab), QApplication::translate("QPrintSettingsOutput", "Options", nullptr)); + QPrintSettingsOutput->setWindowTitle(QCoreApplication::translate("QPrintSettingsOutput", "Form", nullptr)); + gbPrintRange->setTitle(QCoreApplication::translate("QPrintSettingsOutput", "Print range", nullptr)); + printAll->setText(QCoreApplication::translate("QPrintSettingsOutput", "Print all", nullptr)); + printRange->setText(QCoreApplication::translate("QPrintSettingsOutput", "Pages from", nullptr)); + label_3->setText(QCoreApplication::translate("QPrintSettingsOutput", "to", nullptr)); + printSelection->setText(QCoreApplication::translate("QPrintSettingsOutput", "Selection", nullptr)); + groupBox->setTitle(QCoreApplication::translate("QPrintSettingsOutput", "Output Settings", nullptr)); + label->setText(QCoreApplication::translate("QPrintSettingsOutput", "Copies:", nullptr)); + collate->setText(QCoreApplication::translate("QPrintSettingsOutput", "Collate", nullptr)); + reverse->setText(QCoreApplication::translate("QPrintSettingsOutput", "Reverse", nullptr)); + tabs->setTabText(tabs->indexOf(copiesTab), QCoreApplication::translate("QPrintSettingsOutput", "Copies", nullptr)); + colorMode->setTitle(QCoreApplication::translate("QPrintSettingsOutput", "Color Mode", nullptr)); + color->setText(QCoreApplication::translate("QPrintSettingsOutput", "Color", nullptr)); + grayscale->setText(QCoreApplication::translate("QPrintSettingsOutput", "Grayscale", nullptr)); + duplex->setTitle(QCoreApplication::translate("QPrintSettingsOutput", "Duplex Printing", nullptr)); + noDuplex->setText(QCoreApplication::translate("QPrintSettingsOutput", "None", nullptr)); + duplexLong->setText(QCoreApplication::translate("QPrintSettingsOutput", "Long side", nullptr)); + duplexShort->setText(QCoreApplication::translate("QPrintSettingsOutput", "Short side", nullptr)); + tabs->setTabText(tabs->indexOf(optionsTab), QCoreApplication::translate("QPrintSettingsOutput", "Options", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/qprintwidget.ui.h b/tests/auto/tools/uic/baseline/qprintwidget.ui.h index 04b05143c6..7991273172 100644 --- a/tests/auto/tools/uic/baseline/qprintwidget.ui.h +++ b/tests/auto/tools/uic/baseline/qprintwidget.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'qprintwidget.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -46,23 +46,23 @@ public: void setupUi(QWidget *QPrintWidget) { if (QPrintWidget->objectName().isEmpty()) - QPrintWidget->setObjectName(QString::fromUtf8("QPrintWidget")); + QPrintWidget->setObjectName("QPrintWidget"); QPrintWidget->resize(443, 175); horizontalLayout_2 = new QHBoxLayout(QPrintWidget); horizontalLayout_2->setContentsMargins(0, 0, 0, 0); - horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2")); + horizontalLayout_2->setObjectName("horizontalLayout_2"); printerGroup = new QGroupBox(QPrintWidget); - printerGroup->setObjectName(QString::fromUtf8("printerGroup")); + printerGroup->setObjectName("printerGroup"); gridLayout = new QGridLayout(printerGroup); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); label = new QLabel(printerGroup); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName("label"); gridLayout->addWidget(label, 0, 0, 1, 1); printers = new QComboBox(printerGroup); - printers->setObjectName(QString::fromUtf8("printers")); - QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); + printers->setObjectName("printers"); + QSizePolicy sizePolicy(QSizePolicy::Policy::Preferred, QSizePolicy::Policy::Fixed); sizePolicy.setHorizontalStretch(3); sizePolicy.setVerticalStretch(0); sizePolicy.setHeightForWidth(printers->sizePolicy().hasHeightForWidth()); @@ -71,8 +71,8 @@ public: gridLayout->addWidget(printers, 0, 1, 1, 1); properties = new QPushButton(printerGroup); - properties->setObjectName(QString::fromUtf8("properties")); - QSizePolicy sizePolicy1(QSizePolicy::Minimum, QSizePolicy::Fixed); + properties->setObjectName("properties"); + QSizePolicy sizePolicy1(QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Fixed); sizePolicy1.setHorizontalStretch(1); sizePolicy1.setVerticalStretch(0); sizePolicy1.setHeightForWidth(properties->sizePolicy().hasHeightForWidth()); @@ -81,44 +81,44 @@ public: gridLayout->addWidget(properties, 0, 2, 1, 1); label_2 = new QLabel(printerGroup); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName("label_2"); gridLayout->addWidget(label_2, 1, 0, 1, 1); location = new QLabel(printerGroup); - location->setObjectName(QString::fromUtf8("location")); + location->setObjectName("location"); gridLayout->addWidget(location, 1, 1, 1, 1); preview = new QCheckBox(printerGroup); - preview->setObjectName(QString::fromUtf8("preview")); + preview->setObjectName("preview"); gridLayout->addWidget(preview, 1, 2, 1, 1); label_3 = new QLabel(printerGroup); - label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setObjectName("label_3"); gridLayout->addWidget(label_3, 2, 0, 1, 1); type = new QLabel(printerGroup); - type->setObjectName(QString::fromUtf8("type")); + type->setObjectName("type"); gridLayout->addWidget(type, 2, 1, 1, 1); lOutput = new QLabel(printerGroup); - lOutput->setObjectName(QString::fromUtf8("lOutput")); + lOutput->setObjectName("lOutput"); gridLayout->addWidget(lOutput, 3, 0, 1, 1); horizontalLayout = new QHBoxLayout(); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); + horizontalLayout->setObjectName("horizontalLayout"); filename = new QLineEdit(printerGroup); - filename->setObjectName(QString::fromUtf8("filename")); + filename->setObjectName("filename"); horizontalLayout->addWidget(filename); fileBrowser = new QToolButton(printerGroup); - fileBrowser->setObjectName(QString::fromUtf8("fileBrowser")); + fileBrowser->setObjectName("fileBrowser"); horizontalLayout->addWidget(fileBrowser); @@ -128,10 +128,10 @@ public: horizontalLayout_2->addWidget(printerGroup); -#ifndef QT_NO_SHORTCUT +#if QT_CONFIG(shortcut) label->setBuddy(printers); lOutput->setBuddy(filename); -#endif // QT_NO_SHORTCUT +#endif // QT_CONFIG(shortcut) retranslateUi(QPrintWidget); @@ -140,15 +140,15 @@ public: void retranslateUi(QWidget *QPrintWidget) { - QPrintWidget->setWindowTitle(QApplication::translate("QPrintWidget", "Form", nullptr)); - printerGroup->setTitle(QApplication::translate("QPrintWidget", "Printer", nullptr)); - label->setText(QApplication::translate("QPrintWidget", "&Name:", nullptr)); - properties->setText(QApplication::translate("QPrintWidget", "P&roperties", nullptr)); - label_2->setText(QApplication::translate("QPrintWidget", "Location:", nullptr)); - preview->setText(QApplication::translate("QPrintWidget", "Preview", nullptr)); - label_3->setText(QApplication::translate("QPrintWidget", "Type:", nullptr)); - lOutput->setText(QApplication::translate("QPrintWidget", "Output &file:", nullptr)); - fileBrowser->setText(QApplication::translate("QPrintWidget", "...", nullptr)); + QPrintWidget->setWindowTitle(QCoreApplication::translate("QPrintWidget", "Form", nullptr)); + printerGroup->setTitle(QCoreApplication::translate("QPrintWidget", "Printer", nullptr)); + label->setText(QCoreApplication::translate("QPrintWidget", "&Name:", nullptr)); + properties->setText(QCoreApplication::translate("QPrintWidget", "P&roperties", nullptr)); + label_2->setText(QCoreApplication::translate("QPrintWidget", "Location:", nullptr)); + preview->setText(QCoreApplication::translate("QPrintWidget", "Preview", nullptr)); + label_3->setText(QCoreApplication::translate("QPrintWidget", "Type:", nullptr)); + lOutput->setText(QCoreApplication::translate("QPrintWidget", "Output &file:", nullptr)); + fileBrowser->setText(QCoreApplication::translate("QPrintWidget", "...", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/qsqlconnectiondialog.ui b/tests/auto/tools/uic/baseline/qsqlconnectiondialog.ui index 91a8700579..ebf3c821db 100644 --- a/tests/auto/tools/uic/baseline/qsqlconnectiondialog.ui +++ b/tests/auto/tools/uic/baseline/qsqlconnectiondialog.ui @@ -176,7 +176,7 @@ <enum>Qt::Horizontal</enum> </property> <property name="sizeType" > - <enum>QSizePolicy::Expanding</enum> + <enum>QSizePolicy::Policy::Expanding</enum> </property> <property name="sizeHint" > <size> diff --git a/tests/auto/tools/uic/baseline/qsqlconnectiondialog.ui.h b/tests/auto/tools/uic/baseline/qsqlconnectiondialog.ui.h index 2131bc6d9b..0160a5c8bc 100644 --- a/tests/auto/tools/uic/baseline/qsqlconnectiondialog.ui.h +++ b/tests/auto/tools/uic/baseline/qsqlconnectiondialog.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'qsqlconnectiondialog.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -55,44 +55,44 @@ public: void setupUi(QDialog *QSqlConnectionDialogUi) { if (QSqlConnectionDialogUi->objectName().isEmpty()) - QSqlConnectionDialogUi->setObjectName(QString::fromUtf8("QSqlConnectionDialogUi")); + QSqlConnectionDialogUi->setObjectName("QSqlConnectionDialogUi"); QSqlConnectionDialogUi->resize(315, 302); vboxLayout = new QVBoxLayout(QSqlConnectionDialogUi); #ifndef Q_OS_MAC vboxLayout->setSpacing(6); #endif vboxLayout->setContentsMargins(8, 8, 8, 8); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); connGroupBox = new QGroupBox(QSqlConnectionDialogUi); - connGroupBox->setObjectName(QString::fromUtf8("connGroupBox")); + connGroupBox->setObjectName("connGroupBox"); gridLayout = new QGridLayout(connGroupBox); #ifndef Q_OS_MAC gridLayout->setSpacing(6); #endif gridLayout->setContentsMargins(8, 8, 8, 8); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); comboDriver = new QComboBox(connGroupBox); - comboDriver->setObjectName(QString::fromUtf8("comboDriver")); + comboDriver->setObjectName("comboDriver"); gridLayout->addWidget(comboDriver, 0, 1, 1, 1); textLabel4 = new QLabel(connGroupBox); - textLabel4->setObjectName(QString::fromUtf8("textLabel4")); + textLabel4->setObjectName("textLabel4"); gridLayout->addWidget(textLabel4, 2, 0, 1, 1); textLabel2 = new QLabel(connGroupBox); - textLabel2->setObjectName(QString::fromUtf8("textLabel2")); + textLabel2->setObjectName("textLabel2"); gridLayout->addWidget(textLabel2, 0, 0, 1, 1); editDatabase = new QLineEdit(connGroupBox); - editDatabase->setObjectName(QString::fromUtf8("editDatabase")); + editDatabase->setObjectName("editDatabase"); gridLayout->addWidget(editDatabase, 1, 1, 1, 1); portSpinBox = new QSpinBox(connGroupBox); - portSpinBox->setObjectName(QString::fromUtf8("portSpinBox")); + portSpinBox->setObjectName("portSpinBox"); portSpinBox->setMaximum(65535); portSpinBox->setMinimum(-1); portSpinBox->setValue(-1); @@ -100,38 +100,38 @@ public: gridLayout->addWidget(portSpinBox, 5, 1, 1, 1); textLabel3 = new QLabel(connGroupBox); - textLabel3->setObjectName(QString::fromUtf8("textLabel3")); + textLabel3->setObjectName("textLabel3"); gridLayout->addWidget(textLabel3, 1, 0, 1, 1); editPassword = new QLineEdit(connGroupBox); - editPassword->setObjectName(QString::fromUtf8("editPassword")); + editPassword->setObjectName("editPassword"); editPassword->setEchoMode(QLineEdit::Password); gridLayout->addWidget(editPassword, 3, 1, 1, 1); editUsername = new QLineEdit(connGroupBox); - editUsername->setObjectName(QString::fromUtf8("editUsername")); + editUsername->setObjectName("editUsername"); gridLayout->addWidget(editUsername, 2, 1, 1, 1); editHostname = new QLineEdit(connGroupBox); - editHostname->setObjectName(QString::fromUtf8("editHostname")); + editHostname->setObjectName("editHostname"); gridLayout->addWidget(editHostname, 4, 1, 1, 1); textLabel5 = new QLabel(connGroupBox); - textLabel5->setObjectName(QString::fromUtf8("textLabel5")); + textLabel5->setObjectName("textLabel5"); gridLayout->addWidget(textLabel5, 4, 0, 1, 1); textLabel5_2 = new QLabel(connGroupBox); - textLabel5_2->setObjectName(QString::fromUtf8("textLabel5_2")); + textLabel5_2->setObjectName("textLabel5_2"); gridLayout->addWidget(textLabel5_2, 5, 0, 1, 1); textLabel4_2 = new QLabel(connGroupBox); - textLabel4_2->setObjectName(QString::fromUtf8("textLabel4_2")); + textLabel4_2->setObjectName("textLabel4_2"); gridLayout->addWidget(textLabel4_2, 3, 0, 1, 1); @@ -143,13 +143,13 @@ public: hboxLayout->setSpacing(6); #endif hboxLayout->setContentsMargins(0, 0, 0, 0); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); - spacerItem = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + hboxLayout->setObjectName("hboxLayout"); + spacerItem = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); hboxLayout->addItem(spacerItem); dbCheckBox = new QCheckBox(QSqlConnectionDialogUi); - dbCheckBox->setObjectName(QString::fromUtf8("dbCheckBox")); + dbCheckBox->setObjectName("dbCheckBox"); hboxLayout->addWidget(dbCheckBox); @@ -161,32 +161,32 @@ public: hboxLayout1->setSpacing(6); #endif hboxLayout1->setContentsMargins(0, 0, 0, 0); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); - spacerItem1 = new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + hboxLayout1->setObjectName("hboxLayout1"); + spacerItem1 = new QSpacerItem(20, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); hboxLayout1->addItem(spacerItem1); okButton = new QPushButton(QSqlConnectionDialogUi); - okButton->setObjectName(QString::fromUtf8("okButton")); + okButton->setObjectName("okButton"); hboxLayout1->addWidget(okButton); cancelButton = new QPushButton(QSqlConnectionDialogUi); - cancelButton->setObjectName(QString::fromUtf8("cancelButton")); + cancelButton->setObjectName("cancelButton"); hboxLayout1->addWidget(cancelButton); vboxLayout->addLayout(hboxLayout1); -#ifndef QT_NO_SHORTCUT +#if QT_CONFIG(shortcut) textLabel4->setBuddy(editUsername); textLabel2->setBuddy(comboDriver); textLabel3->setBuddy(editDatabase); textLabel5->setBuddy(editHostname); textLabel5_2->setBuddy(portSpinBox); textLabel4_2->setBuddy(editPassword); -#endif // QT_NO_SHORTCUT +#endif // QT_CONFIG(shortcut) QWidget::setTabOrder(comboDriver, editDatabase); QWidget::setTabOrder(editDatabase, editUsername); QWidget::setTabOrder(editUsername, editPassword); @@ -206,18 +206,18 @@ public: void retranslateUi(QDialog *QSqlConnectionDialogUi) { - QSqlConnectionDialogUi->setWindowTitle(QApplication::translate("QSqlConnectionDialogUi", "Connect...", nullptr)); - connGroupBox->setTitle(QApplication::translate("QSqlConnectionDialogUi", "Connection settings", nullptr)); - textLabel4->setText(QApplication::translate("QSqlConnectionDialogUi", "&Username:", nullptr)); - textLabel2->setText(QApplication::translate("QSqlConnectionDialogUi", "D&river", nullptr)); - portSpinBox->setSpecialValueText(QApplication::translate("QSqlConnectionDialogUi", "Default", nullptr)); - textLabel3->setText(QApplication::translate("QSqlConnectionDialogUi", "Database Name:", nullptr)); - textLabel5->setText(QApplication::translate("QSqlConnectionDialogUi", "&Hostname:", nullptr)); - textLabel5_2->setText(QApplication::translate("QSqlConnectionDialogUi", "P&ort:", nullptr)); - textLabel4_2->setText(QApplication::translate("QSqlConnectionDialogUi", "&Password:", nullptr)); - dbCheckBox->setText(QApplication::translate("QSqlConnectionDialogUi", "Us&e predefined in-memory database", nullptr)); - okButton->setText(QApplication::translate("QSqlConnectionDialogUi", "&OK", nullptr)); - cancelButton->setText(QApplication::translate("QSqlConnectionDialogUi", "&Cancel", nullptr)); + QSqlConnectionDialogUi->setWindowTitle(QCoreApplication::translate("QSqlConnectionDialogUi", "Connect...", nullptr)); + connGroupBox->setTitle(QCoreApplication::translate("QSqlConnectionDialogUi", "Connection settings", nullptr)); + textLabel4->setText(QCoreApplication::translate("QSqlConnectionDialogUi", "&Username:", nullptr)); + textLabel2->setText(QCoreApplication::translate("QSqlConnectionDialogUi", "D&river", nullptr)); + portSpinBox->setSpecialValueText(QCoreApplication::translate("QSqlConnectionDialogUi", "Default", nullptr)); + textLabel3->setText(QCoreApplication::translate("QSqlConnectionDialogUi", "Database Name:", nullptr)); + textLabel5->setText(QCoreApplication::translate("QSqlConnectionDialogUi", "&Hostname:", nullptr)); + textLabel5_2->setText(QCoreApplication::translate("QSqlConnectionDialogUi", "P&ort:", nullptr)); + textLabel4_2->setText(QCoreApplication::translate("QSqlConnectionDialogUi", "&Password:", nullptr)); + dbCheckBox->setText(QCoreApplication::translate("QSqlConnectionDialogUi", "Us&e predefined in-memory database", nullptr)); + okButton->setText(QCoreApplication::translate("QSqlConnectionDialogUi", "&OK", nullptr)); + cancelButton->setText(QCoreApplication::translate("QSqlConnectionDialogUi", "&Cancel", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/qtgradientdialog.ui b/tests/auto/tools/uic/baseline/qtgradientdialog.ui index 7ecd3a1a66..bb13c43b57 100644 --- a/tests/auto/tools/uic/baseline/qtgradientdialog.ui +++ b/tests/auto/tools/uic/baseline/qtgradientdialog.ui @@ -1,31 +1,8 @@ <ui version="4.0" > - <comment>********************************************************************* -** -** 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$ -** -*********************************************************************</comment> +<comment> +* Copyright (C) 2016 The Qt Company Ltd. +* SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +</comment> <class>QtGradientDialog</class> <widget class="QDialog" name="QtGradientDialog" > <property name="geometry" > diff --git a/tests/auto/tools/uic/baseline/qtgradientdialog.ui.h b/tests/auto/tools/uic/baseline/qtgradientdialog.ui.h index 805f70e60d..d458a49a79 100644 --- a/tests/auto/tools/uic/baseline/qtgradientdialog.ui.h +++ b/tests/auto/tools/uic/baseline/qtgradientdialog.ui.h @@ -1,37 +1,14 @@ /* -********************************************************************* -** -** 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$ -** -********************************************************************* + +* Copyright (C) 2016 The Qt Company Ltd. +* SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + */ /******************************************************************************** ** Form generated from reading UI file 'qtgradientdialog.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -40,6 +17,7 @@ #define QTGRADIENTDIALOG_H #include <QtCore/QVariant> +#include <QtWidgets/QAbstractButton> #include <QtWidgets/QApplication> #include <QtWidgets/QDialog> #include <QtWidgets/QDialogButtonBox> @@ -58,13 +36,13 @@ public: void setupUi(QDialog *QtGradientDialog) { if (QtGradientDialog->objectName().isEmpty()) - QtGradientDialog->setObjectName(QString::fromUtf8("QtGradientDialog")); + QtGradientDialog->setObjectName("QtGradientDialog"); QtGradientDialog->resize(178, 81); vboxLayout = new QVBoxLayout(QtGradientDialog); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); gradientEditor = new QtGradientEditor(QtGradientDialog); - gradientEditor->setObjectName(QString::fromUtf8("gradientEditor")); - QSizePolicy sizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); + gradientEditor->setObjectName("gradientEditor"); + QSizePolicy sizePolicy(QSizePolicy::Policy::MinimumExpanding, QSizePolicy::Policy::MinimumExpanding); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); sizePolicy.setHeightForWidth(gradientEditor->sizePolicy().hasHeightForWidth()); @@ -73,7 +51,7 @@ public: vboxLayout->addWidget(gradientEditor); buttonBox = new QDialogButtonBox(QtGradientDialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName("buttonBox"); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok); @@ -81,15 +59,15 @@ public: retranslateUi(QtGradientDialog); - QObject::connect(buttonBox, SIGNAL(accepted()), QtGradientDialog, SLOT(accept())); - QObject::connect(buttonBox, SIGNAL(rejected()), QtGradientDialog, SLOT(reject())); + QObject::connect(buttonBox, &QDialogButtonBox::accepted, QtGradientDialog, qOverload<>(&QDialog::accept)); + QObject::connect(buttonBox, &QDialogButtonBox::rejected, QtGradientDialog, qOverload<>(&QDialog::reject)); QMetaObject::connectSlotsByName(QtGradientDialog); } // setupUi void retranslateUi(QDialog *QtGradientDialog) { - QtGradientDialog->setWindowTitle(QApplication::translate("QtGradientDialog", "Edit Gradient", nullptr)); + QtGradientDialog->setWindowTitle(QCoreApplication::translate("QtGradientDialog", "Edit Gradient", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/qtgradienteditor.ui b/tests/auto/tools/uic/baseline/qtgradienteditor.ui index 6ab75f33fa..a8622ec233 100644 --- a/tests/auto/tools/uic/baseline/qtgradienteditor.ui +++ b/tests/auto/tools/uic/baseline/qtgradienteditor.ui @@ -1,31 +1,8 @@ <ui version="4.0" > - <comment>********************************************************************* -** -** 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$ -** -*********************************************************************</comment> +<comment> +* Copyright (C) 2016 The Qt Company Ltd. +* SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +</comment> <class>QtGradientEditor</class> <widget class="QWidget" name="QtGradientEditor" > <property name="geometry" > diff --git a/tests/auto/tools/uic/baseline/qtgradienteditor.ui.h b/tests/auto/tools/uic/baseline/qtgradienteditor.ui.h index 9db07f35ac..e6ef198c6d 100644 --- a/tests/auto/tools/uic/baseline/qtgradienteditor.ui.h +++ b/tests/auto/tools/uic/baseline/qtgradienteditor.ui.h @@ -1,37 +1,14 @@ /* -********************************************************************* -** -** 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$ -** -********************************************************************* + +* Copyright (C) 2016 The Qt Company Ltd. +* SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + */ /******************************************************************************** ** Form generated from reading UI file 'qtgradienteditor.ui' ** -** Created by: Qt User Interface Compiler version 5.12.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -145,12 +122,12 @@ public: void setupUi(QWidget *QtGradientEditor) { if (QtGradientEditor->objectName().isEmpty()) - QtGradientEditor->setObjectName(QString::fromUtf8("QtGradientEditor")); + QtGradientEditor->setObjectName("QtGradientEditor"); QtGradientEditor->resize(364, 518); frame = new QFrame(QtGradientEditor); - frame->setObjectName(QString::fromUtf8("frame")); + frame->setObjectName("frame"); frame->setGeometry(QRect(10, 69, 193, 150)); - QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + QSizePolicy sizePolicy(QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Expanding); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); sizePolicy.setHeightForWidth(frame->sizePolicy().hasHeightForWidth()); @@ -159,91 +136,91 @@ public: frame->setFrameShadow(QFrame::Raised); vboxLayout = new QVBoxLayout(frame); vboxLayout->setSpacing(6); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); vboxLayout->setContentsMargins(0, 0, 0, 0); gradientWidget = new QtGradientWidget(frame); - gradientWidget->setObjectName(QString::fromUtf8("gradientWidget")); + gradientWidget->setObjectName("gradientWidget"); sizePolicy.setHeightForWidth(gradientWidget->sizePolicy().hasHeightForWidth()); gradientWidget->setSizePolicy(sizePolicy); vboxLayout->addWidget(gradientWidget); label1 = new QLabel(QtGradientEditor); - label1->setObjectName(QString::fromUtf8("label1")); + label1->setObjectName("label1"); label1->setGeometry(QRect(209, 69, 64, 23)); spinBox1 = new QDoubleSpinBox(QtGradientEditor); - spinBox1->setObjectName(QString::fromUtf8("spinBox1")); + spinBox1->setObjectName("spinBox1"); spinBox1->setGeometry(QRect(279, 69, 73, 23)); spinBox1->setKeyboardTracking(false); spinBox1->setDecimals(3); spinBox1->setMaximum(1.000000000000000); spinBox1->setSingleStep(0.010000000000000); label2 = new QLabel(QtGradientEditor); - label2->setObjectName(QString::fromUtf8("label2")); + label2->setObjectName("label2"); label2->setGeometry(QRect(209, 99, 64, 23)); spinBox2 = new QDoubleSpinBox(QtGradientEditor); - spinBox2->setObjectName(QString::fromUtf8("spinBox2")); + spinBox2->setObjectName("spinBox2"); spinBox2->setGeometry(QRect(279, 99, 73, 23)); spinBox2->setKeyboardTracking(false); spinBox2->setDecimals(3); spinBox2->setMaximum(1.000000000000000); spinBox2->setSingleStep(0.010000000000000); label3 = new QLabel(QtGradientEditor); - label3->setObjectName(QString::fromUtf8("label3")); + label3->setObjectName("label3"); label3->setGeometry(QRect(209, 129, 64, 23)); spinBox3 = new QDoubleSpinBox(QtGradientEditor); - spinBox3->setObjectName(QString::fromUtf8("spinBox3")); + spinBox3->setObjectName("spinBox3"); spinBox3->setGeometry(QRect(279, 129, 73, 23)); spinBox3->setKeyboardTracking(false); spinBox3->setDecimals(3); spinBox3->setMaximum(1.000000000000000); spinBox3->setSingleStep(0.010000000000000); label4 = new QLabel(QtGradientEditor); - label4->setObjectName(QString::fromUtf8("label4")); + label4->setObjectName("label4"); label4->setGeometry(QRect(209, 159, 64, 23)); spinBox4 = new QDoubleSpinBox(QtGradientEditor); - spinBox4->setObjectName(QString::fromUtf8("spinBox4")); + spinBox4->setObjectName("spinBox4"); spinBox4->setGeometry(QRect(279, 159, 73, 23)); spinBox4->setKeyboardTracking(false); spinBox4->setDecimals(3); spinBox4->setMaximum(1.000000000000000); spinBox4->setSingleStep(0.010000000000000); label5 = new QLabel(QtGradientEditor); - label5->setObjectName(QString::fromUtf8("label5")); + label5->setObjectName("label5"); label5->setGeometry(QRect(209, 189, 64, 23)); spinBox5 = new QDoubleSpinBox(QtGradientEditor); - spinBox5->setObjectName(QString::fromUtf8("spinBox5")); + spinBox5->setObjectName("spinBox5"); spinBox5->setGeometry(QRect(279, 189, 73, 23)); spinBox5->setKeyboardTracking(false); spinBox5->setDecimals(3); spinBox5->setMaximum(1.000000000000000); spinBox5->setSingleStep(0.010000000000000); gradientStopsWidget = new QtGradientStopsWidget(QtGradientEditor); - gradientStopsWidget->setObjectName(QString::fromUtf8("gradientStopsWidget")); + gradientStopsWidget->setObjectName("gradientStopsWidget"); gradientStopsWidget->setGeometry(QRect(10, 225, 193, 67)); zoomLabel = new QLabel(QtGradientEditor); - zoomLabel->setObjectName(QString::fromUtf8("zoomLabel")); + zoomLabel->setObjectName("zoomLabel"); zoomLabel->setGeometry(QRect(209, 231, 64, 23)); zoomAllButton = new QToolButton(QtGradientEditor); - zoomAllButton->setObjectName(QString::fromUtf8("zoomAllButton")); + zoomAllButton->setObjectName("zoomAllButton"); zoomAllButton->setGeometry(QRect(279, 260, 72, 26)); - QSizePolicy sizePolicy1(QSizePolicy::Preferred, QSizePolicy::Fixed); + QSizePolicy sizePolicy1(QSizePolicy::Policy::Preferred, QSizePolicy::Policy::Fixed); sizePolicy1.setHorizontalStretch(0); sizePolicy1.setVerticalStretch(0); sizePolicy1.setHeightForWidth(zoomAllButton->sizePolicy().hasHeightForWidth()); zoomAllButton->setSizePolicy(sizePolicy1); positionLabel = new QLabel(QtGradientEditor); - positionLabel->setObjectName(QString::fromUtf8("positionLabel")); + positionLabel->setObjectName("positionLabel"); positionLabel->setGeometry(QRect(209, 304, 64, 23)); hLabel = new QLabel(QtGradientEditor); - hLabel->setObjectName(QString::fromUtf8("hLabel")); + hLabel->setObjectName("hLabel"); hLabel->setGeometry(QRect(10, 335, 32, 18)); sizePolicy1.setHeightForWidth(hLabel->sizePolicy().hasHeightForWidth()); hLabel->setSizePolicy(sizePolicy1); frame_2 = new QFrame(QtGradientEditor); - frame_2->setObjectName(QString::fromUtf8("frame_2")); + frame_2->setObjectName("frame_2"); frame_2->setGeometry(QRect(48, 333, 155, 23)); - QSizePolicy sizePolicy2(QSizePolicy::Ignored, QSizePolicy::Preferred); + QSizePolicy sizePolicy2(QSizePolicy::Policy::Ignored, QSizePolicy::Policy::Preferred); sizePolicy2.setHorizontalStretch(0); sizePolicy2.setVerticalStretch(0); sizePolicy2.setHeightForWidth(frame_2->sizePolicy().hasHeightForWidth()); @@ -251,11 +228,11 @@ public: frame_2->setFrameShape(QFrame::StyledPanel); frame_2->setFrameShadow(QFrame::Raised); hboxLayout = new QHBoxLayout(frame_2); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName("hboxLayout"); hboxLayout->setContentsMargins(0, 0, 0, 0); hueColorLine = new QtColorLine(frame_2); - hueColorLine->setObjectName(QString::fromUtf8("hueColorLine")); - QSizePolicy sizePolicy3(QSizePolicy::Expanding, QSizePolicy::Preferred); + hueColorLine->setObjectName("hueColorLine"); + QSizePolicy sizePolicy3(QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Preferred); sizePolicy3.setHorizontalStretch(0); sizePolicy3.setVerticalStretch(0); sizePolicy3.setHeightForWidth(hueColorLine->sizePolicy().hasHeightForWidth()); @@ -264,130 +241,130 @@ public: hboxLayout->addWidget(hueColorLine); hueLabel = new QLabel(QtGradientEditor); - hueLabel->setObjectName(QString::fromUtf8("hueLabel")); + hueLabel->setObjectName("hueLabel"); hueLabel->setGeometry(QRect(209, 335, 64, 18)); sizePolicy1.setHeightForWidth(hueLabel->sizePolicy().hasHeightForWidth()); hueLabel->setSizePolicy(sizePolicy1); sLabel = new QLabel(QtGradientEditor); - sLabel->setObjectName(QString::fromUtf8("sLabel")); + sLabel->setObjectName("sLabel"); sLabel->setGeometry(QRect(10, 364, 32, 18)); sizePolicy1.setHeightForWidth(sLabel->sizePolicy().hasHeightForWidth()); sLabel->setSizePolicy(sizePolicy1); frame_5 = new QFrame(QtGradientEditor); - frame_5->setObjectName(QString::fromUtf8("frame_5")); + frame_5->setObjectName("frame_5"); frame_5->setGeometry(QRect(48, 362, 155, 23)); sizePolicy2.setHeightForWidth(frame_5->sizePolicy().hasHeightForWidth()); frame_5->setSizePolicy(sizePolicy2); frame_5->setFrameShape(QFrame::StyledPanel); frame_5->setFrameShadow(QFrame::Raised); hboxLayout1 = new QHBoxLayout(frame_5); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName("hboxLayout1"); hboxLayout1->setContentsMargins(0, 0, 0, 0); saturationColorLine = new QtColorLine(frame_5); - saturationColorLine->setObjectName(QString::fromUtf8("saturationColorLine")); + saturationColorLine->setObjectName("saturationColorLine"); sizePolicy3.setHeightForWidth(saturationColorLine->sizePolicy().hasHeightForWidth()); saturationColorLine->setSizePolicy(sizePolicy3); hboxLayout1->addWidget(saturationColorLine); saturationLabel = new QLabel(QtGradientEditor); - saturationLabel->setObjectName(QString::fromUtf8("saturationLabel")); + saturationLabel->setObjectName("saturationLabel"); saturationLabel->setGeometry(QRect(209, 364, 64, 18)); sizePolicy1.setHeightForWidth(saturationLabel->sizePolicy().hasHeightForWidth()); saturationLabel->setSizePolicy(sizePolicy1); vLabel = new QLabel(QtGradientEditor); - vLabel->setObjectName(QString::fromUtf8("vLabel")); + vLabel->setObjectName("vLabel"); vLabel->setGeometry(QRect(10, 393, 32, 18)); sizePolicy1.setHeightForWidth(vLabel->sizePolicy().hasHeightForWidth()); vLabel->setSizePolicy(sizePolicy1); frame_3 = new QFrame(QtGradientEditor); - frame_3->setObjectName(QString::fromUtf8("frame_3")); + frame_3->setObjectName("frame_3"); frame_3->setGeometry(QRect(48, 391, 155, 23)); sizePolicy2.setHeightForWidth(frame_3->sizePolicy().hasHeightForWidth()); frame_3->setSizePolicy(sizePolicy2); frame_3->setFrameShape(QFrame::StyledPanel); frame_3->setFrameShadow(QFrame::Raised); hboxLayout2 = new QHBoxLayout(frame_3); - hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2")); + hboxLayout2->setObjectName("hboxLayout2"); hboxLayout2->setContentsMargins(0, 0, 0, 0); valueColorLine = new QtColorLine(frame_3); - valueColorLine->setObjectName(QString::fromUtf8("valueColorLine")); + valueColorLine->setObjectName("valueColorLine"); sizePolicy3.setHeightForWidth(valueColorLine->sizePolicy().hasHeightForWidth()); valueColorLine->setSizePolicy(sizePolicy3); hboxLayout2->addWidget(valueColorLine); valueLabel = new QLabel(QtGradientEditor); - valueLabel->setObjectName(QString::fromUtf8("valueLabel")); + valueLabel->setObjectName("valueLabel"); valueLabel->setGeometry(QRect(209, 393, 64, 18)); sizePolicy1.setHeightForWidth(valueLabel->sizePolicy().hasHeightForWidth()); valueLabel->setSizePolicy(sizePolicy1); aLabel = new QLabel(QtGradientEditor); - aLabel->setObjectName(QString::fromUtf8("aLabel")); + aLabel->setObjectName("aLabel"); aLabel->setGeometry(QRect(10, 422, 32, 18)); sizePolicy1.setHeightForWidth(aLabel->sizePolicy().hasHeightForWidth()); aLabel->setSizePolicy(sizePolicy1); frame_4 = new QFrame(QtGradientEditor); - frame_4->setObjectName(QString::fromUtf8("frame_4")); + frame_4->setObjectName("frame_4"); frame_4->setGeometry(QRect(48, 420, 155, 23)); sizePolicy2.setHeightForWidth(frame_4->sizePolicy().hasHeightForWidth()); frame_4->setSizePolicy(sizePolicy2); frame_4->setFrameShape(QFrame::StyledPanel); frame_4->setFrameShadow(QFrame::Raised); hboxLayout3 = new QHBoxLayout(frame_4); - hboxLayout3->setObjectName(QString::fromUtf8("hboxLayout3")); + hboxLayout3->setObjectName("hboxLayout3"); hboxLayout3->setContentsMargins(0, 0, 0, 0); alphaColorLine = new QtColorLine(frame_4); - alphaColorLine->setObjectName(QString::fromUtf8("alphaColorLine")); + alphaColorLine->setObjectName("alphaColorLine"); sizePolicy3.setHeightForWidth(alphaColorLine->sizePolicy().hasHeightForWidth()); alphaColorLine->setSizePolicy(sizePolicy3); hboxLayout3->addWidget(alphaColorLine); alphaLabel = new QLabel(QtGradientEditor); - alphaLabel->setObjectName(QString::fromUtf8("alphaLabel")); + alphaLabel->setObjectName("alphaLabel"); alphaLabel->setGeometry(QRect(209, 422, 64, 18)); sizePolicy1.setHeightForWidth(alphaLabel->sizePolicy().hasHeightForWidth()); alphaLabel->setSizePolicy(sizePolicy1); typeComboBox = new QComboBox(QtGradientEditor); - typeComboBox->setObjectName(QString::fromUtf8("typeComboBox")); + typeComboBox->setObjectName("typeComboBox"); typeComboBox->setGeometry(QRect(10, 40, 79, 22)); spreadComboBox = new QComboBox(QtGradientEditor); - spreadComboBox->setObjectName(QString::fromUtf8("spreadComboBox")); + spreadComboBox->setObjectName("spreadComboBox"); spreadComboBox->setGeometry(QRect(96, 40, 72, 22)); colorLabel = new QLabel(QtGradientEditor); - colorLabel->setObjectName(QString::fromUtf8("colorLabel")); + colorLabel->setObjectName("colorLabel"); colorLabel->setGeometry(QRect(10, 298, 32, 29)); - QSizePolicy sizePolicy4(QSizePolicy::Fixed, QSizePolicy::Preferred); + QSizePolicy sizePolicy4(QSizePolicy::Policy::Fixed, QSizePolicy::Policy::Preferred); sizePolicy4.setHorizontalStretch(0); sizePolicy4.setVerticalStretch(0); sizePolicy4.setHeightForWidth(colorLabel->sizePolicy().hasHeightForWidth()); colorLabel->setSizePolicy(sizePolicy4); colorButton = new QtColorButton(QtGradientEditor); - colorButton->setObjectName(QString::fromUtf8("colorButton")); + colorButton->setObjectName("colorButton"); colorButton->setGeometry(QRect(48, 300, 26, 25)); hsvRadioButton = new QRadioButton(QtGradientEditor); - hsvRadioButton->setObjectName(QString::fromUtf8("hsvRadioButton")); + hsvRadioButton->setObjectName("hsvRadioButton"); hsvRadioButton->setGeometry(QRect(80, 301, 49, 23)); - QSizePolicy sizePolicy5(QSizePolicy::Fixed, QSizePolicy::Fixed); + QSizePolicy sizePolicy5(QSizePolicy::Policy::Fixed, QSizePolicy::Policy::Fixed); sizePolicy5.setHorizontalStretch(0); sizePolicy5.setVerticalStretch(0); sizePolicy5.setHeightForWidth(hsvRadioButton->sizePolicy().hasHeightForWidth()); hsvRadioButton->setSizePolicy(sizePolicy5); hsvRadioButton->setChecked(true); rgbRadioButton = new QRadioButton(QtGradientEditor); - rgbRadioButton->setObjectName(QString::fromUtf8("rgbRadioButton")); + rgbRadioButton->setObjectName("rgbRadioButton"); rgbRadioButton->setGeometry(QRect(135, 301, 49, 23)); sizePolicy5.setHeightForWidth(rgbRadioButton->sizePolicy().hasHeightForWidth()); rgbRadioButton->setSizePolicy(sizePolicy5); positionWidget = new QWidget(QtGradientEditor); - positionWidget->setObjectName(QString::fromUtf8("positionWidget")); + positionWidget->setObjectName("positionWidget"); positionWidget->setGeometry(QRect(279, 304, 73, 23)); vboxLayout1 = new QVBoxLayout(positionWidget); - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName("vboxLayout1"); vboxLayout1->setContentsMargins(0, 0, 0, 0); positionSpinBox = new QDoubleSpinBox(positionWidget); - positionSpinBox->setObjectName(QString::fromUtf8("positionSpinBox")); + positionSpinBox->setObjectName("positionSpinBox"); positionSpinBox->setKeyboardTracking(false); positionSpinBox->setDecimals(3); positionSpinBox->setMinimum(0.000000000000000); @@ -398,65 +375,65 @@ public: vboxLayout1->addWidget(positionSpinBox); hueWidget = new QWidget(QtGradientEditor); - hueWidget->setObjectName(QString::fromUtf8("hueWidget")); + hueWidget->setObjectName("hueWidget"); hueWidget->setGeometry(QRect(279, 333, 73, 23)); vboxLayout2 = new QVBoxLayout(hueWidget); - vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2")); + vboxLayout2->setObjectName("vboxLayout2"); vboxLayout2->setContentsMargins(0, 0, 0, 0); hueSpinBox = new QSpinBox(hueWidget); - hueSpinBox->setObjectName(QString::fromUtf8("hueSpinBox")); + hueSpinBox->setObjectName("hueSpinBox"); hueSpinBox->setKeyboardTracking(false); hueSpinBox->setMaximum(359); vboxLayout2->addWidget(hueSpinBox); saturationWidget = new QWidget(QtGradientEditor); - saturationWidget->setObjectName(QString::fromUtf8("saturationWidget")); + saturationWidget->setObjectName("saturationWidget"); saturationWidget->setGeometry(QRect(279, 362, 73, 23)); vboxLayout3 = new QVBoxLayout(saturationWidget); - vboxLayout3->setObjectName(QString::fromUtf8("vboxLayout3")); + vboxLayout3->setObjectName("vboxLayout3"); vboxLayout3->setContentsMargins(0, 0, 0, 0); saturationSpinBox = new QSpinBox(saturationWidget); - saturationSpinBox->setObjectName(QString::fromUtf8("saturationSpinBox")); + saturationSpinBox->setObjectName("saturationSpinBox"); saturationSpinBox->setKeyboardTracking(false); saturationSpinBox->setMaximum(255); vboxLayout3->addWidget(saturationSpinBox); valueWidget = new QWidget(QtGradientEditor); - valueWidget->setObjectName(QString::fromUtf8("valueWidget")); + valueWidget->setObjectName("valueWidget"); valueWidget->setGeometry(QRect(279, 391, 73, 23)); vboxLayout4 = new QVBoxLayout(valueWidget); - vboxLayout4->setObjectName(QString::fromUtf8("vboxLayout4")); + vboxLayout4->setObjectName("vboxLayout4"); vboxLayout4->setContentsMargins(0, 0, 0, 0); valueSpinBox = new QSpinBox(valueWidget); - valueSpinBox->setObjectName(QString::fromUtf8("valueSpinBox")); + valueSpinBox->setObjectName("valueSpinBox"); valueSpinBox->setKeyboardTracking(false); valueSpinBox->setMaximum(255); vboxLayout4->addWidget(valueSpinBox); alphaWidget = new QWidget(QtGradientEditor); - alphaWidget->setObjectName(QString::fromUtf8("alphaWidget")); + alphaWidget->setObjectName("alphaWidget"); alphaWidget->setGeometry(QRect(279, 420, 73, 23)); vboxLayout5 = new QVBoxLayout(alphaWidget); - vboxLayout5->setObjectName(QString::fromUtf8("vboxLayout5")); + vboxLayout5->setObjectName("vboxLayout5"); vboxLayout5->setContentsMargins(0, 0, 0, 0); alphaSpinBox = new QSpinBox(alphaWidget); - alphaSpinBox->setObjectName(QString::fromUtf8("alphaSpinBox")); + alphaSpinBox->setObjectName("alphaSpinBox"); alphaSpinBox->setKeyboardTracking(false); alphaSpinBox->setMaximum(255); vboxLayout5->addWidget(alphaSpinBox); zoomWidget = new QWidget(QtGradientEditor); - zoomWidget->setObjectName(QString::fromUtf8("zoomWidget")); + zoomWidget->setObjectName("zoomWidget"); zoomWidget->setGeometry(QRect(279, 231, 73, 23)); vboxLayout6 = new QVBoxLayout(zoomWidget); - vboxLayout6->setObjectName(QString::fromUtf8("vboxLayout6")); + vboxLayout6->setObjectName("vboxLayout6"); vboxLayout6->setContentsMargins(0, 0, 0, 0); zoomSpinBox = new QSpinBox(zoomWidget); - zoomSpinBox->setObjectName(QString::fromUtf8("zoomSpinBox")); + zoomSpinBox->setObjectName("zoomSpinBox"); zoomSpinBox->setKeyboardTracking(false); zoomSpinBox->setMinimum(100); zoomSpinBox->setMaximum(10000); @@ -466,60 +443,60 @@ public: vboxLayout6->addWidget(zoomSpinBox); line1Widget = new QWidget(QtGradientEditor); - line1Widget->setObjectName(QString::fromUtf8("line1Widget")); + line1Widget->setObjectName("line1Widget"); line1Widget->setGeometry(QRect(209, 219, 143, 16)); vboxLayout7 = new QVBoxLayout(line1Widget); - vboxLayout7->setObjectName(QString::fromUtf8("vboxLayout7")); + vboxLayout7->setObjectName("vboxLayout7"); vboxLayout7->setContentsMargins(0, 0, 0, 0); line1 = new QFrame(line1Widget); - line1->setObjectName(QString::fromUtf8("line1")); - line1->setFrameShape(QFrame::HLine); - line1->setFrameShadow(QFrame::Sunken); + line1->setObjectName("line1"); + line1->setFrameShape(QFrame::Shape::HLine); + line1->setFrameShadow(QFrame::Shadow::Sunken); vboxLayout7->addWidget(line1); line2Widget = new QWidget(QtGradientEditor); - line2Widget->setObjectName(QString::fromUtf8("line2Widget")); + line2Widget->setObjectName("line2Widget"); line2Widget->setGeometry(QRect(209, 292, 143, 16)); vboxLayout8 = new QVBoxLayout(line2Widget); - vboxLayout8->setObjectName(QString::fromUtf8("vboxLayout8")); + vboxLayout8->setObjectName("vboxLayout8"); vboxLayout8->setContentsMargins(0, 0, 0, 0); line2 = new QFrame(line2Widget); - line2->setObjectName(QString::fromUtf8("line2")); - line2->setFrameShape(QFrame::HLine); - line2->setFrameShadow(QFrame::Sunken); + line2->setObjectName("line2"); + line2->setFrameShape(QFrame::Shape::HLine); + line2->setFrameShadow(QFrame::Shadow::Sunken); vboxLayout8->addWidget(line2); zoomButtonsWidget = new QWidget(QtGradientEditor); - zoomButtonsWidget->setObjectName(QString::fromUtf8("zoomButtonsWidget")); + zoomButtonsWidget->setObjectName("zoomButtonsWidget"); zoomButtonsWidget->setGeometry(QRect(209, 260, 64, 26)); - QSizePolicy sizePolicy6(QSizePolicy::Maximum, QSizePolicy::Preferred); + QSizePolicy sizePolicy6(QSizePolicy::Policy::Maximum, QSizePolicy::Policy::Preferred); sizePolicy6.setHorizontalStretch(0); sizePolicy6.setVerticalStretch(0); sizePolicy6.setHeightForWidth(zoomButtonsWidget->sizePolicy().hasHeightForWidth()); zoomButtonsWidget->setSizePolicy(sizePolicy6); hboxLayout4 = new QHBoxLayout(zoomButtonsWidget); - hboxLayout4->setObjectName(QString::fromUtf8("hboxLayout4")); + hboxLayout4->setObjectName("hboxLayout4"); hboxLayout4->setContentsMargins(0, 0, 0, 0); zoomInButton = new QToolButton(zoomButtonsWidget); - zoomInButton->setObjectName(QString::fromUtf8("zoomInButton")); + zoomInButton->setObjectName("zoomInButton"); hboxLayout4->addWidget(zoomInButton); zoomOutButton = new QToolButton(zoomButtonsWidget); - zoomOutButton->setObjectName(QString::fromUtf8("zoomOutButton")); + zoomOutButton->setObjectName("zoomOutButton"); hboxLayout4->addWidget(zoomOutButton); - spacerItem = new QSpacerItem(0, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacerItem = new QSpacerItem(0, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); hboxLayout4->addItem(spacerItem); detailsButton = new QToolButton(QtGradientEditor); - detailsButton->setObjectName(QString::fromUtf8("detailsButton")); + detailsButton->setObjectName("detailsButton"); detailsButton->setGeometry(QRect(176, 40, 25, 22)); - QSizePolicy sizePolicy7(QSizePolicy::Fixed, QSizePolicy::Ignored); + QSizePolicy sizePolicy7(QSizePolicy::Policy::Fixed, QSizePolicy::Policy::Ignored); sizePolicy7.setHorizontalStretch(0); sizePolicy7.setVerticalStretch(0); sizePolicy7.setHeightForWidth(detailsButton->sizePolicy().hasHeightForWidth()); @@ -527,32 +504,32 @@ public: detailsButton->setCheckable(true); detailsButton->setAutoRaise(true); linearButton = new QToolButton(QtGradientEditor); - linearButton->setObjectName(QString::fromUtf8("linearButton")); + linearButton->setObjectName("linearButton"); linearButton->setGeometry(QRect(10, 10, 30, 26)); linearButton->setCheckable(true); linearButton->setAutoRaise(true); radialButton = new QToolButton(QtGradientEditor); - radialButton->setObjectName(QString::fromUtf8("radialButton")); + radialButton->setObjectName("radialButton"); radialButton->setGeometry(QRect(40, 10, 30, 26)); radialButton->setCheckable(true); radialButton->setAutoRaise(true); conicalButton = new QToolButton(QtGradientEditor); - conicalButton->setObjectName(QString::fromUtf8("conicalButton")); + conicalButton->setObjectName("conicalButton"); conicalButton->setGeometry(QRect(70, 10, 30, 26)); conicalButton->setCheckable(true); conicalButton->setAutoRaise(true); padButton = new QToolButton(QtGradientEditor); - padButton->setObjectName(QString::fromUtf8("padButton")); + padButton->setObjectName("padButton"); padButton->setGeometry(QRect(110, 10, 30, 26)); padButton->setCheckable(true); padButton->setAutoRaise(true); repeatButton = new QToolButton(QtGradientEditor); - repeatButton->setObjectName(QString::fromUtf8("repeatButton")); + repeatButton->setObjectName("repeatButton"); repeatButton->setGeometry(QRect(140, 10, 30, 26)); repeatButton->setCheckable(true); repeatButton->setAutoRaise(true); reflectButton = new QToolButton(QtGradientEditor); - reflectButton->setObjectName(QString::fromUtf8("reflectButton")); + reflectButton->setObjectName("reflectButton"); reflectButton->setGeometry(QRect(170, 10, 30, 26)); reflectButton->setCheckable(true); reflectButton->setAutoRaise(true); @@ -583,119 +560,119 @@ public: void retranslateUi(QWidget *QtGradientEditor) { - QtGradientEditor->setWindowTitle(QApplication::translate("QtGradientEditor", "Form", nullptr)); -#ifndef QT_NO_TOOLTIP - gradientWidget->setToolTip(QApplication::translate("QtGradientEditor", "Gradient Editor", nullptr)); -#endif // QT_NO_TOOLTIP -#ifndef QT_NO_WHATSTHIS - gradientWidget->setWhatsThis(QApplication::translate("QtGradientEditor", "This area shows a preview of the gradient being edited. It also allows you to edit parameters specific to the gradient's type such as start and final point, radius, etc. by drag & drop.", nullptr)); -#endif // QT_NO_WHATSTHIS - label1->setText(QApplication::translate("QtGradientEditor", "1", nullptr)); - label2->setText(QApplication::translate("QtGradientEditor", "2", nullptr)); - label3->setText(QApplication::translate("QtGradientEditor", "3", nullptr)); - label4->setText(QApplication::translate("QtGradientEditor", "4", nullptr)); - label5->setText(QApplication::translate("QtGradientEditor", "5", nullptr)); -#ifndef QT_NO_TOOLTIP - gradientStopsWidget->setToolTip(QApplication::translate("QtGradientEditor", "Gradient Stops Editor", nullptr)); -#endif // QT_NO_TOOLTIP -#ifndef QT_NO_WHATSTHIS - gradientStopsWidget->setWhatsThis(QApplication::translate("QtGradientEditor", "This area allows you to edit gradient stops. Double click on the existing stop handle to duplicate it. Double click outside of the existing stop handles to create a new stop. Drag & drop the handle to reposition it. Use right mouse button to popup context menu with extra actions.", nullptr)); -#endif // QT_NO_WHATSTHIS - zoomLabel->setText(QApplication::translate("QtGradientEditor", "Zoom", nullptr)); -#ifndef QT_NO_TOOLTIP - zoomAllButton->setToolTip(QApplication::translate("QtGradientEditor", "Reset Zoom", nullptr)); -#endif // QT_NO_TOOLTIP - zoomAllButton->setText(QApplication::translate("QtGradientEditor", "Reset Zoom", nullptr)); - positionLabel->setText(QApplication::translate("QtGradientEditor", "Position", nullptr)); -#ifndef QT_NO_TOOLTIP - hLabel->setToolTip(QApplication::translate("QtGradientEditor", "Hue", nullptr)); -#endif // QT_NO_TOOLTIP - hLabel->setText(QApplication::translate("QtGradientEditor", "H", nullptr)); -#ifndef QT_NO_TOOLTIP - hueColorLine->setToolTip(QApplication::translate("QtGradientEditor", "Hue", nullptr)); -#endif // QT_NO_TOOLTIP - hueLabel->setText(QApplication::translate("QtGradientEditor", "Hue", nullptr)); -#ifndef QT_NO_TOOLTIP - sLabel->setToolTip(QApplication::translate("QtGradientEditor", "Saturation", nullptr)); -#endif // QT_NO_TOOLTIP - sLabel->setText(QApplication::translate("QtGradientEditor", "S", nullptr)); -#ifndef QT_NO_TOOLTIP - saturationColorLine->setToolTip(QApplication::translate("QtGradientEditor", "Saturation", nullptr)); -#endif // QT_NO_TOOLTIP - saturationLabel->setText(QApplication::translate("QtGradientEditor", "Sat", nullptr)); -#ifndef QT_NO_TOOLTIP - vLabel->setToolTip(QApplication::translate("QtGradientEditor", "Value", nullptr)); -#endif // QT_NO_TOOLTIP - vLabel->setText(QApplication::translate("QtGradientEditor", "V", nullptr)); -#ifndef QT_NO_TOOLTIP - valueColorLine->setToolTip(QApplication::translate("QtGradientEditor", "Value", nullptr)); -#endif // QT_NO_TOOLTIP - valueLabel->setText(QApplication::translate("QtGradientEditor", "Val", nullptr)); -#ifndef QT_NO_TOOLTIP - aLabel->setToolTip(QApplication::translate("QtGradientEditor", "Alpha", nullptr)); -#endif // QT_NO_TOOLTIP - aLabel->setText(QApplication::translate("QtGradientEditor", "A", nullptr)); -#ifndef QT_NO_TOOLTIP - alphaColorLine->setToolTip(QApplication::translate("QtGradientEditor", "Alpha", nullptr)); -#endif // QT_NO_TOOLTIP - alphaLabel->setText(QApplication::translate("QtGradientEditor", "Alpha", nullptr)); -#ifndef QT_NO_TOOLTIP - typeComboBox->setToolTip(QApplication::translate("QtGradientEditor", "Type", nullptr)); -#endif // QT_NO_TOOLTIP -#ifndef QT_NO_TOOLTIP - spreadComboBox->setToolTip(QApplication::translate("QtGradientEditor", "Spread", nullptr)); -#endif // QT_NO_TOOLTIP - colorLabel->setText(QApplication::translate("QtGradientEditor", "Color", nullptr)); -#ifndef QT_NO_TOOLTIP - colorButton->setToolTip(QApplication::translate("QtGradientEditor", "Current stop's color", nullptr)); -#endif // QT_NO_TOOLTIP + QtGradientEditor->setWindowTitle(QCoreApplication::translate("QtGradientEditor", "Form", nullptr)); +#if QT_CONFIG(tooltip) + gradientWidget->setToolTip(QCoreApplication::translate("QtGradientEditor", "Gradient Editor", nullptr)); +#endif // QT_CONFIG(tooltip) +#if QT_CONFIG(whatsthis) + gradientWidget->setWhatsThis(QCoreApplication::translate("QtGradientEditor", "This area shows a preview of the gradient being edited. It also allows you to edit parameters specific to the gradient's type such as start and final point, radius, etc. by drag & drop.", nullptr)); +#endif // QT_CONFIG(whatsthis) + label1->setText(QCoreApplication::translate("QtGradientEditor", "1", nullptr)); + label2->setText(QCoreApplication::translate("QtGradientEditor", "2", nullptr)); + label3->setText(QCoreApplication::translate("QtGradientEditor", "3", nullptr)); + label4->setText(QCoreApplication::translate("QtGradientEditor", "4", nullptr)); + label5->setText(QCoreApplication::translate("QtGradientEditor", "5", nullptr)); +#if QT_CONFIG(tooltip) + gradientStopsWidget->setToolTip(QCoreApplication::translate("QtGradientEditor", "Gradient Stops Editor", nullptr)); +#endif // QT_CONFIG(tooltip) +#if QT_CONFIG(whatsthis) + gradientStopsWidget->setWhatsThis(QCoreApplication::translate("QtGradientEditor", "This area allows you to edit gradient stops. Double click on the existing stop handle to duplicate it. Double click outside of the existing stop handles to create a new stop. Drag & drop the handle to reposition it. Use right mouse button to popup context menu with extra actions.", nullptr)); +#endif // QT_CONFIG(whatsthis) + zoomLabel->setText(QCoreApplication::translate("QtGradientEditor", "Zoom", nullptr)); +#if QT_CONFIG(tooltip) + zoomAllButton->setToolTip(QCoreApplication::translate("QtGradientEditor", "Reset Zoom", nullptr)); +#endif // QT_CONFIG(tooltip) + zoomAllButton->setText(QCoreApplication::translate("QtGradientEditor", "Reset Zoom", nullptr)); + positionLabel->setText(QCoreApplication::translate("QtGradientEditor", "Position", nullptr)); +#if QT_CONFIG(tooltip) + hLabel->setToolTip(QCoreApplication::translate("QtGradientEditor", "Hue", nullptr)); +#endif // QT_CONFIG(tooltip) + hLabel->setText(QCoreApplication::translate("QtGradientEditor", "H", nullptr)); +#if QT_CONFIG(tooltip) + hueColorLine->setToolTip(QCoreApplication::translate("QtGradientEditor", "Hue", nullptr)); +#endif // QT_CONFIG(tooltip) + hueLabel->setText(QCoreApplication::translate("QtGradientEditor", "Hue", nullptr)); +#if QT_CONFIG(tooltip) + sLabel->setToolTip(QCoreApplication::translate("QtGradientEditor", "Saturation", nullptr)); +#endif // QT_CONFIG(tooltip) + sLabel->setText(QCoreApplication::translate("QtGradientEditor", "S", nullptr)); +#if QT_CONFIG(tooltip) + saturationColorLine->setToolTip(QCoreApplication::translate("QtGradientEditor", "Saturation", nullptr)); +#endif // QT_CONFIG(tooltip) + saturationLabel->setText(QCoreApplication::translate("QtGradientEditor", "Sat", nullptr)); +#if QT_CONFIG(tooltip) + vLabel->setToolTip(QCoreApplication::translate("QtGradientEditor", "Value", nullptr)); +#endif // QT_CONFIG(tooltip) + vLabel->setText(QCoreApplication::translate("QtGradientEditor", "V", nullptr)); +#if QT_CONFIG(tooltip) + valueColorLine->setToolTip(QCoreApplication::translate("QtGradientEditor", "Value", nullptr)); +#endif // QT_CONFIG(tooltip) + valueLabel->setText(QCoreApplication::translate("QtGradientEditor", "Val", nullptr)); +#if QT_CONFIG(tooltip) + aLabel->setToolTip(QCoreApplication::translate("QtGradientEditor", "Alpha", nullptr)); +#endif // QT_CONFIG(tooltip) + aLabel->setText(QCoreApplication::translate("QtGradientEditor", "A", nullptr)); +#if QT_CONFIG(tooltip) + alphaColorLine->setToolTip(QCoreApplication::translate("QtGradientEditor", "Alpha", nullptr)); +#endif // QT_CONFIG(tooltip) + alphaLabel->setText(QCoreApplication::translate("QtGradientEditor", "Alpha", nullptr)); +#if QT_CONFIG(tooltip) + typeComboBox->setToolTip(QCoreApplication::translate("QtGradientEditor", "Type", nullptr)); +#endif // QT_CONFIG(tooltip) +#if QT_CONFIG(tooltip) + spreadComboBox->setToolTip(QCoreApplication::translate("QtGradientEditor", "Spread", nullptr)); +#endif // QT_CONFIG(tooltip) + colorLabel->setText(QCoreApplication::translate("QtGradientEditor", "Color", nullptr)); +#if QT_CONFIG(tooltip) + colorButton->setToolTip(QCoreApplication::translate("QtGradientEditor", "Current stop's color", nullptr)); +#endif // QT_CONFIG(tooltip) colorButton->setText(QString()); -#ifndef QT_NO_TOOLTIP - hsvRadioButton->setToolTip(QApplication::translate("QtGradientEditor", "Show HSV specification", nullptr)); -#endif // QT_NO_TOOLTIP - hsvRadioButton->setText(QApplication::translate("QtGradientEditor", "HSV", nullptr)); -#ifndef QT_NO_TOOLTIP - rgbRadioButton->setToolTip(QApplication::translate("QtGradientEditor", "Show RGB specification", nullptr)); -#endif // QT_NO_TOOLTIP - rgbRadioButton->setText(QApplication::translate("QtGradientEditor", "RGB", nullptr)); -#ifndef QT_NO_TOOLTIP - positionSpinBox->setToolTip(QApplication::translate("QtGradientEditor", "Current stop's position", nullptr)); -#endif // QT_NO_TOOLTIP - zoomSpinBox->setSuffix(QApplication::translate("QtGradientEditor", "%", nullptr)); -#ifndef QT_NO_TOOLTIP - zoomInButton->setToolTip(QApplication::translate("QtGradientEditor", "Zoom In", nullptr)); -#endif // QT_NO_TOOLTIP -#ifndef QT_NO_TOOLTIP - zoomOutButton->setToolTip(QApplication::translate("QtGradientEditor", "Zoom Out", nullptr)); -#endif // QT_NO_TOOLTIP -#ifndef QT_NO_TOOLTIP - detailsButton->setToolTip(QApplication::translate("QtGradientEditor", "Toggle details extension", nullptr)); -#endif // QT_NO_TOOLTIP - detailsButton->setText(QApplication::translate("QtGradientEditor", ">", nullptr)); -#ifndef QT_NO_TOOLTIP - linearButton->setToolTip(QApplication::translate("QtGradientEditor", "Linear Type", nullptr)); -#endif // QT_NO_TOOLTIP - linearButton->setText(QApplication::translate("QtGradientEditor", "...", nullptr)); -#ifndef QT_NO_TOOLTIP - radialButton->setToolTip(QApplication::translate("QtGradientEditor", "Radial Type", nullptr)); -#endif // QT_NO_TOOLTIP - radialButton->setText(QApplication::translate("QtGradientEditor", "...", nullptr)); -#ifndef QT_NO_TOOLTIP - conicalButton->setToolTip(QApplication::translate("QtGradientEditor", "Conical Type", nullptr)); -#endif // QT_NO_TOOLTIP - conicalButton->setText(QApplication::translate("QtGradientEditor", "...", nullptr)); -#ifndef QT_NO_TOOLTIP - padButton->setToolTip(QApplication::translate("QtGradientEditor", "Pad Spread", nullptr)); -#endif // QT_NO_TOOLTIP - padButton->setText(QApplication::translate("QtGradientEditor", "...", nullptr)); -#ifndef QT_NO_TOOLTIP - repeatButton->setToolTip(QApplication::translate("QtGradientEditor", "Repeat Spread", nullptr)); -#endif // QT_NO_TOOLTIP - repeatButton->setText(QApplication::translate("QtGradientEditor", "...", nullptr)); -#ifndef QT_NO_TOOLTIP - reflectButton->setToolTip(QApplication::translate("QtGradientEditor", "Reflect Spread", nullptr)); -#endif // QT_NO_TOOLTIP - reflectButton->setText(QApplication::translate("QtGradientEditor", "...", nullptr)); +#if QT_CONFIG(tooltip) + hsvRadioButton->setToolTip(QCoreApplication::translate("QtGradientEditor", "Show HSV specification", nullptr)); +#endif // QT_CONFIG(tooltip) + hsvRadioButton->setText(QCoreApplication::translate("QtGradientEditor", "HSV", nullptr)); +#if QT_CONFIG(tooltip) + rgbRadioButton->setToolTip(QCoreApplication::translate("QtGradientEditor", "Show RGB specification", nullptr)); +#endif // QT_CONFIG(tooltip) + rgbRadioButton->setText(QCoreApplication::translate("QtGradientEditor", "RGB", nullptr)); +#if QT_CONFIG(tooltip) + positionSpinBox->setToolTip(QCoreApplication::translate("QtGradientEditor", "Current stop's position", nullptr)); +#endif // QT_CONFIG(tooltip) + zoomSpinBox->setSuffix(QCoreApplication::translate("QtGradientEditor", "%", nullptr)); +#if QT_CONFIG(tooltip) + zoomInButton->setToolTip(QCoreApplication::translate("QtGradientEditor", "Zoom In", nullptr)); +#endif // QT_CONFIG(tooltip) +#if QT_CONFIG(tooltip) + zoomOutButton->setToolTip(QCoreApplication::translate("QtGradientEditor", "Zoom Out", nullptr)); +#endif // QT_CONFIG(tooltip) +#if QT_CONFIG(tooltip) + detailsButton->setToolTip(QCoreApplication::translate("QtGradientEditor", "Toggle details extension", nullptr)); +#endif // QT_CONFIG(tooltip) + detailsButton->setText(QCoreApplication::translate("QtGradientEditor", ">", nullptr)); +#if QT_CONFIG(tooltip) + linearButton->setToolTip(QCoreApplication::translate("QtGradientEditor", "Linear Type", nullptr)); +#endif // QT_CONFIG(tooltip) + linearButton->setText(QCoreApplication::translate("QtGradientEditor", "...", nullptr)); +#if QT_CONFIG(tooltip) + radialButton->setToolTip(QCoreApplication::translate("QtGradientEditor", "Radial Type", nullptr)); +#endif // QT_CONFIG(tooltip) + radialButton->setText(QCoreApplication::translate("QtGradientEditor", "...", nullptr)); +#if QT_CONFIG(tooltip) + conicalButton->setToolTip(QCoreApplication::translate("QtGradientEditor", "Conical Type", nullptr)); +#endif // QT_CONFIG(tooltip) + conicalButton->setText(QCoreApplication::translate("QtGradientEditor", "...", nullptr)); +#if QT_CONFIG(tooltip) + padButton->setToolTip(QCoreApplication::translate("QtGradientEditor", "Pad Spread", nullptr)); +#endif // QT_CONFIG(tooltip) + padButton->setText(QCoreApplication::translate("QtGradientEditor", "...", nullptr)); +#if QT_CONFIG(tooltip) + repeatButton->setToolTip(QCoreApplication::translate("QtGradientEditor", "Repeat Spread", nullptr)); +#endif // QT_CONFIG(tooltip) + repeatButton->setText(QCoreApplication::translate("QtGradientEditor", "...", nullptr)); +#if QT_CONFIG(tooltip) + reflectButton->setToolTip(QCoreApplication::translate("QtGradientEditor", "Reflect Spread", nullptr)); +#endif // QT_CONFIG(tooltip) + reflectButton->setText(QCoreApplication::translate("QtGradientEditor", "...", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/qtgradientview.ui.h b/tests/auto/tools/uic/baseline/qtgradientview.ui.h index aa3c03b02f..f4860d7dcf 100644 --- a/tests/auto/tools/uic/baseline/qtgradientview.ui.h +++ b/tests/auto/tools/uic/baseline/qtgradientview.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'qtgradientview.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -35,16 +35,16 @@ public: void setupUi(QWidget *QtGradientView) { if (QtGradientView->objectName().isEmpty()) - QtGradientView->setObjectName(QString::fromUtf8("QtGradientView")); + QtGradientView->setObjectName("QtGradientView"); QtGradientView->resize(484, 228); vboxLayout = new QVBoxLayout(QtGradientView); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); vboxLayout->setContentsMargins(0, 0, 0, 0); hboxLayout = new QHBoxLayout(); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName("hboxLayout"); newButton = new QToolButton(QtGradientView); - newButton->setObjectName(QString::fromUtf8("newButton")); - QSizePolicy sizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); + newButton->setObjectName("newButton"); + QSizePolicy sizePolicy(QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Minimum); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); sizePolicy.setHeightForWidth(newButton->sizePolicy().hasHeightForWidth()); @@ -55,7 +55,7 @@ public: hboxLayout->addWidget(newButton); editButton = new QToolButton(QtGradientView); - editButton->setObjectName(QString::fromUtf8("editButton")); + editButton->setObjectName("editButton"); sizePolicy.setHeightForWidth(editButton->sizePolicy().hasHeightForWidth()); editButton->setSizePolicy(sizePolicy); editButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); @@ -64,7 +64,7 @@ public: hboxLayout->addWidget(editButton); renameButton = new QToolButton(QtGradientView); - renameButton->setObjectName(QString::fromUtf8("renameButton")); + renameButton->setObjectName("renameButton"); sizePolicy.setHeightForWidth(renameButton->sizePolicy().hasHeightForWidth()); renameButton->setSizePolicy(sizePolicy); renameButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); @@ -73,7 +73,7 @@ public: hboxLayout->addWidget(renameButton); removeButton = new QToolButton(QtGradientView); - removeButton->setObjectName(QString::fromUtf8("removeButton")); + removeButton->setObjectName("removeButton"); sizePolicy.setHeightForWidth(removeButton->sizePolicy().hasHeightForWidth()); removeButton->setSizePolicy(sizePolicy); removeButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); @@ -81,7 +81,7 @@ public: hboxLayout->addWidget(removeButton); - spacerItem = new QSpacerItem(71, 26, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacerItem = new QSpacerItem(71, 26, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); hboxLayout->addItem(spacerItem); @@ -89,7 +89,7 @@ public: vboxLayout->addLayout(hboxLayout); listWidget = new QListWidget(QtGradientView); - listWidget->setObjectName(QString::fromUtf8("listWidget")); + listWidget->setObjectName("listWidget"); vboxLayout->addWidget(listWidget); @@ -105,11 +105,11 @@ public: void retranslateUi(QWidget *QtGradientView) { - QtGradientView->setWindowTitle(QApplication::translate("QtGradientView", "Gradient View", nullptr)); - newButton->setText(QApplication::translate("QtGradientView", "New...", nullptr)); - editButton->setText(QApplication::translate("QtGradientView", "Edit...", nullptr)); - renameButton->setText(QApplication::translate("QtGradientView", "Rename", nullptr)); - removeButton->setText(QApplication::translate("QtGradientView", "Remove", nullptr)); + QtGradientView->setWindowTitle(QCoreApplication::translate("QtGradientView", "Gradient View", nullptr)); + newButton->setText(QCoreApplication::translate("QtGradientView", "New...", nullptr)); + editButton->setText(QCoreApplication::translate("QtGradientView", "Edit...", nullptr)); + renameButton->setText(QCoreApplication::translate("QtGradientView", "Rename", nullptr)); + removeButton->setText(QCoreApplication::translate("QtGradientView", "Remove", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/qtgradientviewdialog.ui b/tests/auto/tools/uic/baseline/qtgradientviewdialog.ui index 95fb05f1ee..5d5ceb50b6 100644 --- a/tests/auto/tools/uic/baseline/qtgradientviewdialog.ui +++ b/tests/auto/tools/uic/baseline/qtgradientviewdialog.ui @@ -1,31 +1,8 @@ <ui version="4.0" > - <comment>********************************************************************* -** -** 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$ -** -*********************************************************************</comment> +<comment> +* Copyright (C) 2016 The Qt Company Ltd. +* SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +</comment> <class>QtGradientViewDialog</class> <widget class="QDialog" name="QtGradientViewDialog" > <property name="geometry" > diff --git a/tests/auto/tools/uic/baseline/qtgradientviewdialog.ui.h b/tests/auto/tools/uic/baseline/qtgradientviewdialog.ui.h index e6d98ed4f0..07c27f2752 100644 --- a/tests/auto/tools/uic/baseline/qtgradientviewdialog.ui.h +++ b/tests/auto/tools/uic/baseline/qtgradientviewdialog.ui.h @@ -1,37 +1,14 @@ /* -********************************************************************* -** -** 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$ -** -********************************************************************* + +* Copyright (C) 2016 The Qt Company Ltd. +* SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + */ /******************************************************************************** ** Form generated from reading UI file 'qtgradientviewdialog.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -40,6 +17,7 @@ #define QTGRADIENTVIEWDIALOG_H #include <QtCore/QVariant> +#include <QtWidgets/QAbstractButton> #include <QtWidgets/QApplication> #include <QtWidgets/QDialog> #include <QtWidgets/QDialogButtonBox> @@ -58,13 +36,13 @@ public: void setupUi(QDialog *QtGradientViewDialog) { if (QtGradientViewDialog->objectName().isEmpty()) - QtGradientViewDialog->setObjectName(QString::fromUtf8("QtGradientViewDialog")); + QtGradientViewDialog->setObjectName("QtGradientViewDialog"); QtGradientViewDialog->resize(178, 72); vboxLayout = new QVBoxLayout(QtGradientViewDialog); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); gradientView = new QtGradientView(QtGradientViewDialog); - gradientView->setObjectName(QString::fromUtf8("gradientView")); - QSizePolicy sizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); + gradientView->setObjectName("gradientView"); + QSizePolicy sizePolicy(QSizePolicy::Policy::MinimumExpanding, QSizePolicy::Policy::MinimumExpanding); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); sizePolicy.setHeightForWidth(gradientView->sizePolicy().hasHeightForWidth()); @@ -73,7 +51,7 @@ public: vboxLayout->addWidget(gradientView); buttonBox = new QDialogButtonBox(QtGradientViewDialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName("buttonBox"); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); @@ -81,15 +59,15 @@ public: retranslateUi(QtGradientViewDialog); - QObject::connect(buttonBox, SIGNAL(accepted()), QtGradientViewDialog, SLOT(accept())); - QObject::connect(buttonBox, SIGNAL(rejected()), QtGradientViewDialog, SLOT(reject())); + QObject::connect(buttonBox, &QDialogButtonBox::accepted, QtGradientViewDialog, qOverload<>(&QDialog::accept)); + QObject::connect(buttonBox, &QDialogButtonBox::rejected, QtGradientViewDialog, qOverload<>(&QDialog::reject)); QMetaObject::connectSlotsByName(QtGradientViewDialog); } // setupUi void retranslateUi(QDialog *QtGradientViewDialog) { - QtGradientViewDialog->setWindowTitle(QApplication::translate("QtGradientViewDialog", "Select Gradient", nullptr)); + QtGradientViewDialog->setWindowTitle(QCoreApplication::translate("QtGradientViewDialog", "Select Gradient", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/qtresourceeditordialog.ui b/tests/auto/tools/uic/baseline/qtresourceeditordialog.ui index 2205da4d50..80c8b0a3b2 100644 --- a/tests/auto/tools/uic/baseline/qtresourceeditordialog.ui +++ b/tests/auto/tools/uic/baseline/qtresourceeditordialog.ui @@ -59,7 +59,7 @@ <enum>Qt::Horizontal</enum> </property> <property name="sizeType" > - <enum>QSizePolicy::Ignored</enum> + <enum>QSizePolicy::Policy::Ignored</enum> </property> <property name="sizeHint" > <size> diff --git a/tests/auto/tools/uic/baseline/qtresourceeditordialog.ui.h b/tests/auto/tools/uic/baseline/qtresourceeditordialog.ui.h index 6a8c9c7172..86aab34880 100644 --- a/tests/auto/tools/uic/baseline/qtresourceeditordialog.ui.h +++ b/tests/auto/tools/uic/baseline/qtresourceeditordialog.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'qtresourceeditordialog.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -10,6 +10,7 @@ #define QTRESOURCEEDITORDIALOG_H #include <QtCore/QVariant> +#include <QtWidgets/QAbstractButton> #include <QtWidgets/QApplication> #include <QtWidgets/QDialog> #include <QtWidgets/QDialogButtonBox> @@ -49,21 +50,21 @@ public: void setupUi(QDialog *QtResourceEditorDialog) { if (QtResourceEditorDialog->objectName().isEmpty()) - QtResourceEditorDialog->setObjectName(QString::fromUtf8("QtResourceEditorDialog")); + QtResourceEditorDialog->setObjectName("QtResourceEditorDialog"); QtResourceEditorDialog->resize(469, 317); verticalLayout = new QVBoxLayout(QtResourceEditorDialog); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + verticalLayout->setObjectName("verticalLayout"); splitter = new QSplitter(QtResourceEditorDialog); - splitter->setObjectName(QString::fromUtf8("splitter")); + splitter->setObjectName("splitter"); splitter->setOrientation(Qt::Horizontal); layoutWidget = new QWidget(splitter); - layoutWidget->setObjectName(QString::fromUtf8("layoutWidget")); + layoutWidget->setObjectName("layoutWidget"); gridLayout = new QGridLayout(layoutWidget); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); gridLayout->setContentsMargins(0, 0, 0, 0); qrcFileList = new QListWidget(layoutWidget); - qrcFileList->setObjectName(QString::fromUtf8("qrcFileList")); - QSizePolicy sizePolicy(QSizePolicy::Ignored, QSizePolicy::Expanding); + qrcFileList->setObjectName("qrcFileList"); + QSizePolicy sizePolicy(QSizePolicy::Policy::Ignored, QSizePolicy::Policy::Expanding); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); sizePolicy.setHeightForWidth(qrcFileList->sizePolicy().hasHeightForWidth()); @@ -72,51 +73,51 @@ public: gridLayout->addWidget(qrcFileList, 0, 0, 1, 4); newQrcButton = new QToolButton(layoutWidget); - newQrcButton->setObjectName(QString::fromUtf8("newQrcButton")); + newQrcButton->setObjectName("newQrcButton"); gridLayout->addWidget(newQrcButton, 1, 0, 1, 1); removeQrcButton = new QToolButton(layoutWidget); - removeQrcButton->setObjectName(QString::fromUtf8("removeQrcButton")); + removeQrcButton->setObjectName("removeQrcButton"); gridLayout->addWidget(removeQrcButton, 1, 2, 1, 1); - spacerItem = new QSpacerItem(21, 20, QSizePolicy::Ignored, QSizePolicy::Minimum); + spacerItem = new QSpacerItem(21, 20, QSizePolicy::Policy::Ignored, QSizePolicy::Policy::Minimum); gridLayout->addItem(spacerItem, 1, 3, 1, 1); importQrcButton = new QToolButton(layoutWidget); - importQrcButton->setObjectName(QString::fromUtf8("importQrcButton")); + importQrcButton->setObjectName("importQrcButton"); gridLayout->addWidget(importQrcButton, 1, 1, 1, 1); splitter->addWidget(layoutWidget); widget = new QWidget(splitter); - widget->setObjectName(QString::fromUtf8("widget")); + widget->setObjectName("widget"); gridLayout1 = new QGridLayout(widget); - gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); + gridLayout1->setObjectName("gridLayout1"); gridLayout1->setContentsMargins(0, 0, 0, 0); resourceTreeView = new QTreeView(widget); - resourceTreeView->setObjectName(QString::fromUtf8("resourceTreeView")); + resourceTreeView->setObjectName("resourceTreeView"); gridLayout1->addWidget(resourceTreeView, 0, 0, 1, 4); newResourceButton = new QToolButton(widget); - newResourceButton->setObjectName(QString::fromUtf8("newResourceButton")); + newResourceButton->setObjectName("newResourceButton"); gridLayout1->addWidget(newResourceButton, 1, 0, 1, 1); addResourceButton = new QToolButton(widget); - addResourceButton->setObjectName(QString::fromUtf8("addResourceButton")); + addResourceButton->setObjectName("addResourceButton"); gridLayout1->addWidget(addResourceButton, 1, 1, 1, 1); removeResourceButton = new QToolButton(widget); - removeResourceButton->setObjectName(QString::fromUtf8("removeResourceButton")); + removeResourceButton->setObjectName("removeResourceButton"); gridLayout1->addWidget(removeResourceButton, 1, 2, 1, 1); - horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); gridLayout1->addItem(horizontalSpacer, 1, 3, 1, 1); @@ -125,7 +126,7 @@ public: verticalLayout->addWidget(splitter); buttonBox = new QDialogButtonBox(QtResourceEditorDialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName("buttonBox"); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); @@ -133,33 +134,33 @@ public: retranslateUi(QtResourceEditorDialog); - QObject::connect(buttonBox, SIGNAL(accepted()), QtResourceEditorDialog, SLOT(accept())); - QObject::connect(buttonBox, SIGNAL(rejected()), QtResourceEditorDialog, SLOT(reject())); + QObject::connect(buttonBox, &QDialogButtonBox::accepted, QtResourceEditorDialog, qOverload<>(&QDialog::accept)); + QObject::connect(buttonBox, &QDialogButtonBox::rejected, QtResourceEditorDialog, qOverload<>(&QDialog::reject)); QMetaObject::connectSlotsByName(QtResourceEditorDialog); } // setupUi void retranslateUi(QDialog *QtResourceEditorDialog) { - QtResourceEditorDialog->setWindowTitle(QApplication::translate("QtResourceEditorDialog", "Dialog", nullptr)); -#ifndef QT_NO_TOOLTIP - newQrcButton->setToolTip(QApplication::translate("QtResourceEditorDialog", "New File", nullptr)); -#endif // QT_NO_TOOLTIP - newQrcButton->setText(QApplication::translate("QtResourceEditorDialog", "N", nullptr)); -#ifndef QT_NO_TOOLTIP - removeQrcButton->setToolTip(QApplication::translate("QtResourceEditorDialog", "Remove File", nullptr)); -#endif // QT_NO_TOOLTIP - removeQrcButton->setText(QApplication::translate("QtResourceEditorDialog", "R", nullptr)); - importQrcButton->setText(QApplication::translate("QtResourceEditorDialog", "I", nullptr)); -#ifndef QT_NO_TOOLTIP - newResourceButton->setToolTip(QApplication::translate("QtResourceEditorDialog", "New Resource", nullptr)); -#endif // QT_NO_TOOLTIP - newResourceButton->setText(QApplication::translate("QtResourceEditorDialog", "N", nullptr)); - addResourceButton->setText(QApplication::translate("QtResourceEditorDialog", "A", nullptr)); -#ifndef QT_NO_TOOLTIP - removeResourceButton->setToolTip(QApplication::translate("QtResourceEditorDialog", "Remove Resource or File", nullptr)); -#endif // QT_NO_TOOLTIP - removeResourceButton->setText(QApplication::translate("QtResourceEditorDialog", "R", nullptr)); + QtResourceEditorDialog->setWindowTitle(QCoreApplication::translate("QtResourceEditorDialog", "Dialog", nullptr)); +#if QT_CONFIG(tooltip) + newQrcButton->setToolTip(QCoreApplication::translate("QtResourceEditorDialog", "New File", nullptr)); +#endif // QT_CONFIG(tooltip) + newQrcButton->setText(QCoreApplication::translate("QtResourceEditorDialog", "N", nullptr)); +#if QT_CONFIG(tooltip) + removeQrcButton->setToolTip(QCoreApplication::translate("QtResourceEditorDialog", "Remove File", nullptr)); +#endif // QT_CONFIG(tooltip) + removeQrcButton->setText(QCoreApplication::translate("QtResourceEditorDialog", "R", nullptr)); + importQrcButton->setText(QCoreApplication::translate("QtResourceEditorDialog", "I", nullptr)); +#if QT_CONFIG(tooltip) + newResourceButton->setToolTip(QCoreApplication::translate("QtResourceEditorDialog", "New Resource", nullptr)); +#endif // QT_CONFIG(tooltip) + newResourceButton->setText(QCoreApplication::translate("QtResourceEditorDialog", "N", nullptr)); + addResourceButton->setText(QCoreApplication::translate("QtResourceEditorDialog", "A", nullptr)); +#if QT_CONFIG(tooltip) + removeResourceButton->setToolTip(QCoreApplication::translate("QtResourceEditorDialog", "Remove Resource or File", nullptr)); +#endif // QT_CONFIG(tooltip) + removeResourceButton->setText(QCoreApplication::translate("QtResourceEditorDialog", "R", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/qttoolbardialog.ui.h b/tests/auto/tools/uic/baseline/qttoolbardialog.ui.h index e893386d9b..75f85c497c 100644 --- a/tests/auto/tools/uic/baseline/qttoolbardialog.ui.h +++ b/tests/auto/tools/uic/baseline/qttoolbardialog.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'qttoolbardialog.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -10,6 +10,7 @@ #define QTTOOLBARDIALOG_H #include <QtCore/QVariant> +#include <QtWidgets/QAbstractButton> #include <QtWidgets/QApplication> #include <QtWidgets/QDialog> #include <QtWidgets/QDialogButtonBox> @@ -50,21 +51,21 @@ public: void setupUi(QDialog *QtToolBarDialog) { if (QtToolBarDialog->objectName().isEmpty()) - QtToolBarDialog->setObjectName(QString::fromUtf8("QtToolBarDialog")); + QtToolBarDialog->setObjectName("QtToolBarDialog"); QtToolBarDialog->resize(583, 508); gridLayout = new QGridLayout(QtToolBarDialog); #ifndef Q_OS_MAC gridLayout->setSpacing(6); #endif gridLayout->setContentsMargins(8, 8, 8, 8); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); actionTree = new QTreeWidget(QtToolBarDialog); - actionTree->setObjectName(QString::fromUtf8("actionTree")); + actionTree->setObjectName("actionTree"); gridLayout->addWidget(actionTree, 1, 0, 3, 1); label = new QLabel(QtToolBarDialog); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName("label"); gridLayout->addWidget(label, 0, 0, 1, 1); @@ -73,24 +74,24 @@ public: hboxLayout->setSpacing(6); #endif hboxLayout->setContentsMargins(0, 0, 0, 0); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName("hboxLayout"); label_2 = new QLabel(QtToolBarDialog); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName("label_2"); hboxLayout->addWidget(label_2); newButton = new QToolButton(QtToolBarDialog); - newButton->setObjectName(QString::fromUtf8("newButton")); + newButton->setObjectName("newButton"); hboxLayout->addWidget(newButton); removeButton = new QToolButton(QtToolBarDialog); - removeButton->setObjectName(QString::fromUtf8("removeButton")); + removeButton->setObjectName("removeButton"); hboxLayout->addWidget(removeButton); renameButton = new QToolButton(QtToolBarDialog); - renameButton->setObjectName(QString::fromUtf8("renameButton")); + renameButton->setObjectName("renameButton"); hboxLayout->addWidget(renameButton); @@ -102,10 +103,10 @@ public: vboxLayout->setSpacing(6); #endif vboxLayout->setContentsMargins(0, 0, 0, 0); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); upButton = new QToolButton(QtToolBarDialog); - upButton->setObjectName(QString::fromUtf8("upButton")); - QSizePolicy sizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); + upButton->setObjectName("upButton"); + QSizePolicy sizePolicy(QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Fixed); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); sizePolicy.setHeightForWidth(upButton->sizePolicy().hasHeightForWidth()); @@ -114,27 +115,27 @@ public: vboxLayout->addWidget(upButton); leftButton = new QToolButton(QtToolBarDialog); - leftButton->setObjectName(QString::fromUtf8("leftButton")); + leftButton->setObjectName("leftButton"); sizePolicy.setHeightForWidth(leftButton->sizePolicy().hasHeightForWidth()); leftButton->setSizePolicy(sizePolicy); vboxLayout->addWidget(leftButton); rightButton = new QToolButton(QtToolBarDialog); - rightButton->setObjectName(QString::fromUtf8("rightButton")); + rightButton->setObjectName("rightButton"); sizePolicy.setHeightForWidth(rightButton->sizePolicy().hasHeightForWidth()); rightButton->setSizePolicy(sizePolicy); vboxLayout->addWidget(rightButton); downButton = new QToolButton(QtToolBarDialog); - downButton->setObjectName(QString::fromUtf8("downButton")); + downButton->setObjectName("downButton"); sizePolicy.setHeightForWidth(downButton->sizePolicy().hasHeightForWidth()); downButton->setSizePolicy(sizePolicy); vboxLayout->addWidget(downButton); - spacerItem = new QSpacerItem(29, 16, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem = new QSpacerItem(29, 16, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Expanding); vboxLayout->addItem(spacerItem); @@ -142,22 +143,22 @@ public: gridLayout->addLayout(vboxLayout, 3, 1, 1, 1); currentToolBarList = new QListWidget(QtToolBarDialog); - currentToolBarList->setObjectName(QString::fromUtf8("currentToolBarList")); + currentToolBarList->setObjectName("currentToolBarList"); gridLayout->addWidget(currentToolBarList, 3, 2, 1, 1); label_3 = new QLabel(QtToolBarDialog); - label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setObjectName("label_3"); gridLayout->addWidget(label_3, 2, 1, 1, 2); toolBarList = new QListWidget(QtToolBarDialog); - toolBarList->setObjectName(QString::fromUtf8("toolBarList")); + toolBarList->setObjectName("toolBarList"); gridLayout->addWidget(toolBarList, 1, 1, 1, 2); buttonBox = new QDialogButtonBox(QtToolBarDialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName("buttonBox"); buttonBox->setStandardButtons(QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::RestoreDefaults); gridLayout->addWidget(buttonBox, 5, 0, 1, 3); @@ -178,40 +179,40 @@ public: void retranslateUi(QDialog *QtToolBarDialog) { - QtToolBarDialog->setWindowTitle(QApplication::translate("QtToolBarDialog", "Customize Toolbars", nullptr)); + QtToolBarDialog->setWindowTitle(QCoreApplication::translate("QtToolBarDialog", "Customize Toolbars", nullptr)); QTreeWidgetItem *___qtreewidgetitem = actionTree->headerItem(); - ___qtreewidgetitem->setText(0, QApplication::translate("QtToolBarDialog", "1", nullptr)); - label->setText(QApplication::translate("QtToolBarDialog", "Actions", nullptr)); - label_2->setText(QApplication::translate("QtToolBarDialog", "Toolbars", nullptr)); -#ifndef QT_NO_TOOLTIP - newButton->setToolTip(QApplication::translate("QtToolBarDialog", "Add new toolbar", nullptr)); -#endif // QT_NO_TOOLTIP - newButton->setText(QApplication::translate("QtToolBarDialog", "New", nullptr)); -#ifndef QT_NO_TOOLTIP - removeButton->setToolTip(QApplication::translate("QtToolBarDialog", "Remove selected toolbar", nullptr)); -#endif // QT_NO_TOOLTIP - removeButton->setText(QApplication::translate("QtToolBarDialog", "Remove", nullptr)); -#ifndef QT_NO_TOOLTIP - renameButton->setToolTip(QApplication::translate("QtToolBarDialog", "Rename toolbar", nullptr)); -#endif // QT_NO_TOOLTIP - renameButton->setText(QApplication::translate("QtToolBarDialog", "Rename", nullptr)); -#ifndef QT_NO_TOOLTIP - upButton->setToolTip(QApplication::translate("QtToolBarDialog", "Move action up", nullptr)); -#endif // QT_NO_TOOLTIP - upButton->setText(QApplication::translate("QtToolBarDialog", "Up", nullptr)); -#ifndef QT_NO_TOOLTIP - leftButton->setToolTip(QApplication::translate("QtToolBarDialog", "Remove action from toolbar", nullptr)); -#endif // QT_NO_TOOLTIP - leftButton->setText(QApplication::translate("QtToolBarDialog", "<-", nullptr)); -#ifndef QT_NO_TOOLTIP - rightButton->setToolTip(QApplication::translate("QtToolBarDialog", "Add action to toolbar", nullptr)); -#endif // QT_NO_TOOLTIP - rightButton->setText(QApplication::translate("QtToolBarDialog", "->", nullptr)); -#ifndef QT_NO_TOOLTIP - downButton->setToolTip(QApplication::translate("QtToolBarDialog", "Move action down", nullptr)); -#endif // QT_NO_TOOLTIP - downButton->setText(QApplication::translate("QtToolBarDialog", "Down", nullptr)); - label_3->setText(QApplication::translate("QtToolBarDialog", "Current Toolbar Actions", nullptr)); + ___qtreewidgetitem->setText(0, QCoreApplication::translate("QtToolBarDialog", "1", nullptr)); + label->setText(QCoreApplication::translate("QtToolBarDialog", "Actions", nullptr)); + label_2->setText(QCoreApplication::translate("QtToolBarDialog", "Toolbars", nullptr)); +#if QT_CONFIG(tooltip) + newButton->setToolTip(QCoreApplication::translate("QtToolBarDialog", "Add new toolbar", nullptr)); +#endif // QT_CONFIG(tooltip) + newButton->setText(QCoreApplication::translate("QtToolBarDialog", "New", nullptr)); +#if QT_CONFIG(tooltip) + removeButton->setToolTip(QCoreApplication::translate("QtToolBarDialog", "Remove selected toolbar", nullptr)); +#endif // QT_CONFIG(tooltip) + removeButton->setText(QCoreApplication::translate("QtToolBarDialog", "Remove", nullptr)); +#if QT_CONFIG(tooltip) + renameButton->setToolTip(QCoreApplication::translate("QtToolBarDialog", "Rename toolbar", nullptr)); +#endif // QT_CONFIG(tooltip) + renameButton->setText(QCoreApplication::translate("QtToolBarDialog", "Rename", nullptr)); +#if QT_CONFIG(tooltip) + upButton->setToolTip(QCoreApplication::translate("QtToolBarDialog", "Move action up", nullptr)); +#endif // QT_CONFIG(tooltip) + upButton->setText(QCoreApplication::translate("QtToolBarDialog", "Up", nullptr)); +#if QT_CONFIG(tooltip) + leftButton->setToolTip(QCoreApplication::translate("QtToolBarDialog", "Remove action from toolbar", nullptr)); +#endif // QT_CONFIG(tooltip) + leftButton->setText(QCoreApplication::translate("QtToolBarDialog", "<-", nullptr)); +#if QT_CONFIG(tooltip) + rightButton->setToolTip(QCoreApplication::translate("QtToolBarDialog", "Add action to toolbar", nullptr)); +#endif // QT_CONFIG(tooltip) + rightButton->setText(QCoreApplication::translate("QtToolBarDialog", "->", nullptr)); +#if QT_CONFIG(tooltip) + downButton->setToolTip(QCoreApplication::translate("QtToolBarDialog", "Move action down", nullptr)); +#endif // QT_CONFIG(tooltip) + downButton->setText(QCoreApplication::translate("QtToolBarDialog", "Down", nullptr)); + label_3->setText(QCoreApplication::translate("QtToolBarDialog", "Current Toolbar Actions", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/qttrid.ui b/tests/auto/tools/uic/baseline/qttrid.ui index 1cfc7f5400..44ba1a3c58 100644 --- a/tests/auto/tools/uic/baseline/qttrid.ui +++ b/tests/auto/tools/uic/baseline/qttrid.ui @@ -50,7 +50,7 @@ <enum>Qt::Vertical</enum> </property> <property name="sizeType" > - <enum>QSizePolicy::Fixed</enum> + <enum>QSizePolicy::Policy::Fixed</enum> </property> <property name="sizeHint" > <size> diff --git a/tests/auto/tools/uic/baseline/qttrid.ui.h b/tests/auto/tools/uic/baseline/qttrid.ui.h index 890ffc7789..ba8219685f 100644 --- a/tests/auto/tools/uic/baseline/qttrid.ui.h +++ b/tests/auto/tools/uic/baseline/qttrid.ui.h @@ -10,8 +10,8 @@ #define QTTRID_H #include <QtCore/QVariant> +#include <QtGui/QAction> #include <QtGui/QIcon> -#include <QtWidgets/QAction> #include <QtWidgets/QApplication> #include <QtWidgets/QCheckBox> #include <QtWidgets/QGridLayout> @@ -67,61 +67,61 @@ public: void setupUi(QMainWindow *RemoteControlClass) { if (RemoteControlClass->objectName().isEmpty()) - RemoteControlClass->setObjectName(QString::fromUtf8("RemoteControlClass")); + RemoteControlClass->setObjectName("RemoteControlClass"); RemoteControlClass->resize(344, 364); actionQuit = new QAction(RemoteControlClass); - actionQuit->setObjectName(QString::fromUtf8("actionQuit")); + actionQuit->setObjectName("actionQuit"); centralWidget = new QWidget(RemoteControlClass); - centralWidget->setObjectName(QString::fromUtf8("centralWidget")); + centralWidget->setObjectName("centralWidget"); gridLayout = new QGridLayout(centralWidget); gridLayout->setSpacing(6); gridLayout->setContentsMargins(11, 11, 11, 11); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); label = new QLabel(centralWidget); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName("label"); gridLayout->addWidget(label, 0, 0, 1, 1); startUrlLineEdit = new QLineEdit(centralWidget); - startUrlLineEdit->setObjectName(QString::fromUtf8("startUrlLineEdit")); + startUrlLineEdit->setObjectName("startUrlLineEdit"); gridLayout->addWidget(startUrlLineEdit, 0, 1, 1, 2); launchButton = new QPushButton(centralWidget); - launchButton->setObjectName(QString::fromUtf8("launchButton")); + launchButton->setObjectName("launchButton"); gridLayout->addWidget(launchButton, 1, 1, 1, 1); - spacerItem = new QSpacerItem(101, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacerItem = new QSpacerItem(101, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); gridLayout->addItem(spacerItem, 1, 2, 1, 1); - spacerItem1 = new QSpacerItem(113, 16, QSizePolicy::Minimum, QSizePolicy::Fixed); + spacerItem1 = new QSpacerItem(113, 16, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Fixed); gridLayout->addItem(spacerItem1, 2, 1, 1, 1); actionGroupBox = new QGroupBox(centralWidget); - actionGroupBox->setObjectName(QString::fromUtf8("actionGroupBox")); + actionGroupBox->setObjectName("actionGroupBox"); actionGroupBox->setEnabled(false); gridLayout1 = new QGridLayout(actionGroupBox); gridLayout1->setSpacing(6); gridLayout1->setContentsMargins(11, 11, 11, 11); - gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); + gridLayout1->setObjectName("gridLayout1"); label_2 = new QLabel(actionGroupBox); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName("label_2"); gridLayout1->addWidget(label_2, 0, 0, 1, 1); hboxLayout = new QHBoxLayout(); hboxLayout->setSpacing(0); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName("hboxLayout"); indexLineEdit = new QLineEdit(actionGroupBox); - indexLineEdit->setObjectName(QString::fromUtf8("indexLineEdit")); + indexLineEdit->setObjectName("indexLineEdit"); hboxLayout->addWidget(indexLineEdit); indexButton = new QToolButton(actionGroupBox); - indexButton->setObjectName(QString::fromUtf8("indexButton")); + indexButton->setObjectName("indexButton"); const QIcon icon = QIcon(QString::fromUtf8(":/remotecontrol/enter.png")); indexButton->setIcon(icon); @@ -131,20 +131,20 @@ public: gridLayout1->addLayout(hboxLayout, 0, 1, 1, 2); label_4 = new QLabel(actionGroupBox); - label_4->setObjectName(QString::fromUtf8("label_4")); + label_4->setObjectName("label_4"); gridLayout1->addWidget(label_4, 1, 0, 1, 1); hboxLayout1 = new QHBoxLayout(); hboxLayout1->setSpacing(0); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName("hboxLayout1"); identifierLineEdit = new QLineEdit(actionGroupBox); - identifierLineEdit->setObjectName(QString::fromUtf8("identifierLineEdit")); + identifierLineEdit->setObjectName("identifierLineEdit"); hboxLayout1->addWidget(identifierLineEdit); identifierButton = new QToolButton(actionGroupBox); - identifierButton->setObjectName(QString::fromUtf8("identifierButton")); + identifierButton->setObjectName("identifierButton"); identifierButton->setIcon(icon); hboxLayout1->addWidget(identifierButton); @@ -153,20 +153,20 @@ public: gridLayout1->addLayout(hboxLayout1, 1, 1, 1, 2); label_3 = new QLabel(actionGroupBox); - label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setObjectName("label_3"); gridLayout1->addWidget(label_3, 2, 0, 1, 1); hboxLayout2 = new QHBoxLayout(); hboxLayout2->setSpacing(0); - hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2")); + hboxLayout2->setObjectName("hboxLayout2"); urlLineEdit = new QLineEdit(actionGroupBox); - urlLineEdit->setObjectName(QString::fromUtf8("urlLineEdit")); + urlLineEdit->setObjectName("urlLineEdit"); hboxLayout2->addWidget(urlLineEdit); urlButton = new QToolButton(actionGroupBox); - urlButton->setObjectName(QString::fromUtf8("urlButton")); + urlButton->setObjectName("urlButton"); urlButton->setIcon(icon); hboxLayout2->addWidget(urlButton); @@ -175,26 +175,26 @@ public: gridLayout1->addLayout(hboxLayout2, 2, 1, 1, 2); syncContentsButton = new QPushButton(actionGroupBox); - syncContentsButton->setObjectName(QString::fromUtf8("syncContentsButton")); + syncContentsButton->setObjectName("syncContentsButton"); gridLayout1->addWidget(syncContentsButton, 3, 1, 1, 1); - spacerItem2 = new QSpacerItem(81, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacerItem2 = new QSpacerItem(81, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); gridLayout1->addItem(spacerItem2, 3, 2, 1, 1); contentsCheckBox = new QCheckBox(actionGroupBox); - contentsCheckBox->setObjectName(QString::fromUtf8("contentsCheckBox")); + contentsCheckBox->setObjectName("contentsCheckBox"); gridLayout1->addWidget(contentsCheckBox, 4, 0, 1, 3); indexCheckBox = new QCheckBox(actionGroupBox); - indexCheckBox->setObjectName(QString::fromUtf8("indexCheckBox")); + indexCheckBox->setObjectName("indexCheckBox"); gridLayout1->addWidget(indexCheckBox, 5, 0, 1, 1); bookmarksCheckBox = new QCheckBox(actionGroupBox); - bookmarksCheckBox->setObjectName(QString::fromUtf8("bookmarksCheckBox")); + bookmarksCheckBox->setObjectName("bookmarksCheckBox"); gridLayout1->addWidget(bookmarksCheckBox, 6, 0, 1, 3); @@ -203,13 +203,13 @@ public: RemoteControlClass->setCentralWidget(centralWidget); menuBar = new QMenuBar(RemoteControlClass); - menuBar->setObjectName(QString::fromUtf8("menuBar")); + menuBar->setObjectName("menuBar"); menuBar->setGeometry(QRect(0, 0, 344, 21)); menuFile = new QMenu(menuBar); - menuFile->setObjectName(QString::fromUtf8("menuFile")); + menuFile->setObjectName("menuFile"); RemoteControlClass->setMenuBar(menuBar); statusBar = new QStatusBar(RemoteControlClass); - statusBar->setObjectName(QString::fromUtf8("statusBar")); + statusBar->setObjectName("statusBar"); RemoteControlClass->setStatusBar(statusBar); menuBar->addAction(menuFile->menuAction()); diff --git a/tests/auto/tools/uic/baseline/querywidget.ui.h b/tests/auto/tools/uic/baseline/querywidget.ui.h index 81516722d5..83ac4e1da9 100644 --- a/tests/auto/tools/uic/baseline/querywidget.ui.h +++ b/tests/auto/tools/uic/baseline/querywidget.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'querywidget.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -46,13 +46,13 @@ public: void setupUi(QMainWindow *QueryWidget) { if (QueryWidget->objectName().isEmpty()) - QueryWidget->setObjectName(QString::fromUtf8("QueryWidget")); + QueryWidget->setObjectName("QueryWidget"); QueryWidget->resize(545, 531); centralwidget = new QWidget(QueryWidget); - centralwidget->setObjectName(QString::fromUtf8("centralwidget")); + centralwidget->setObjectName("centralwidget"); centralwidget->setGeometry(QRect(0, 29, 545, 480)); verticalLayout = new QVBoxLayout(centralwidget); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + verticalLayout->setObjectName("verticalLayout"); vboxLayout = new QVBoxLayout(); #ifndef Q_OS_MAC vboxLayout->setSpacing(6); @@ -60,12 +60,12 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(0, 0, 0, 0); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); inputGroupBox = new QGroupBox(centralwidget); - inputGroupBox->setObjectName(QString::fromUtf8("inputGroupBox")); + inputGroupBox->setObjectName("inputGroupBox"); inputGroupBox->setMinimumSize(QSize(550, 120)); verticalLayout_4 = new QVBoxLayout(inputGroupBox); - verticalLayout_4->setObjectName(QString::fromUtf8("verticalLayout_4")); + verticalLayout_4->setObjectName("verticalLayout_4"); _2 = new QVBoxLayout(); #ifndef Q_OS_MAC _2->setSpacing(6); @@ -73,9 +73,9 @@ public: #ifndef Q_OS_MAC _2->setContentsMargins(0, 0, 0, 0); #endif - _2->setObjectName(QString::fromUtf8("_2")); + _2->setObjectName("_2"); inputTextEdit = new QTextEdit(inputGroupBox); - inputTextEdit->setObjectName(QString::fromUtf8("inputTextEdit")); + inputTextEdit->setObjectName("inputTextEdit"); _2->addWidget(inputTextEdit); @@ -86,17 +86,17 @@ public: vboxLayout->addWidget(inputGroupBox); queryGroupBox = new QGroupBox(centralwidget); - queryGroupBox->setObjectName(QString::fromUtf8("queryGroupBox")); + queryGroupBox->setObjectName("queryGroupBox"); queryGroupBox->setMinimumSize(QSize(550, 120)); verticalLayout_5 = new QVBoxLayout(queryGroupBox); - verticalLayout_5->setObjectName(QString::fromUtf8("verticalLayout_5")); + verticalLayout_5->setObjectName("verticalLayout_5"); defaultQueries = new QComboBox(queryGroupBox); - defaultQueries->setObjectName(QString::fromUtf8("defaultQueries")); + defaultQueries->setObjectName("defaultQueries"); verticalLayout_5->addWidget(defaultQueries); queryTextEdit = new QTextEdit(queryGroupBox); - queryTextEdit->setObjectName(QString::fromUtf8("queryTextEdit")); + queryTextEdit->setObjectName("queryTextEdit"); queryTextEdit->setMinimumSize(QSize(400, 60)); queryTextEdit->setReadOnly(true); queryTextEdit->setAcceptRichText(false); @@ -107,10 +107,10 @@ public: vboxLayout->addWidget(queryGroupBox); outputGroupBox = new QGroupBox(centralwidget); - outputGroupBox->setObjectName(QString::fromUtf8("outputGroupBox")); + outputGroupBox->setObjectName("outputGroupBox"); outputGroupBox->setMinimumSize(QSize(550, 120)); verticalLayout_6 = new QVBoxLayout(outputGroupBox); - verticalLayout_6->setObjectName(QString::fromUtf8("verticalLayout_6")); + verticalLayout_6->setObjectName("verticalLayout_6"); _3 = new QVBoxLayout(); #ifndef Q_OS_MAC _3->setSpacing(6); @@ -118,9 +118,9 @@ public: #ifndef Q_OS_MAC _3->setContentsMargins(0, 0, 0, 0); #endif - _3->setObjectName(QString::fromUtf8("_3")); + _3->setObjectName("_3"); outputTextEdit = new QTextEdit(outputGroupBox); - outputTextEdit->setObjectName(QString::fromUtf8("outputTextEdit")); + outputTextEdit->setObjectName("outputTextEdit"); outputTextEdit->setMinimumSize(QSize(500, 80)); outputTextEdit->setReadOnly(true); outputTextEdit->setAcceptRichText(false); @@ -138,11 +138,11 @@ public: QueryWidget->setCentralWidget(centralwidget); menubar = new QMenuBar(QueryWidget); - menubar->setObjectName(QString::fromUtf8("menubar")); + menubar->setObjectName("menubar"); menubar->setGeometry(QRect(0, 0, 545, 29)); QueryWidget->setMenuBar(menubar); statusbar = new QStatusBar(QueryWidget); - statusbar->setObjectName(QString::fromUtf8("statusbar")); + statusbar->setObjectName("statusbar"); statusbar->setGeometry(QRect(0, 509, 545, 22)); QueryWidget->setStatusBar(statusbar); @@ -153,10 +153,10 @@ public: void retranslateUi(QMainWindow *QueryWidget) { - QueryWidget->setWindowTitle(QApplication::translate("QueryWidget", "Recipes XQuery Example", nullptr)); - inputGroupBox->setTitle(QApplication::translate("QueryWidget", "Input Document", nullptr)); - queryGroupBox->setTitle(QApplication::translate("QueryWidget", "Select your query:", nullptr)); - outputGroupBox->setTitle(QApplication::translate("QueryWidget", "Output Document", nullptr)); + QueryWidget->setWindowTitle(QCoreApplication::translate("QueryWidget", "Recipes XQuery Example", nullptr)); + inputGroupBox->setTitle(QCoreApplication::translate("QueryWidget", "Input Document", nullptr)); + queryGroupBox->setTitle(QCoreApplication::translate("QueryWidget", "Select your query:", nullptr)); + outputGroupBox->setTitle(QCoreApplication::translate("QueryWidget", "Output Document", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/remotecontrol.ui b/tests/auto/tools/uic/baseline/remotecontrol.ui index 1cfc7f5400..44ba1a3c58 100644 --- a/tests/auto/tools/uic/baseline/remotecontrol.ui +++ b/tests/auto/tools/uic/baseline/remotecontrol.ui @@ -50,7 +50,7 @@ <enum>Qt::Vertical</enum> </property> <property name="sizeType" > - <enum>QSizePolicy::Fixed</enum> + <enum>QSizePolicy::Policy::Fixed</enum> </property> <property name="sizeHint" > <size> diff --git a/tests/auto/tools/uic/baseline/remotecontrol.ui.h b/tests/auto/tools/uic/baseline/remotecontrol.ui.h index 5893ff42af..0dcf1832dd 100644 --- a/tests/auto/tools/uic/baseline/remotecontrol.ui.h +++ b/tests/auto/tools/uic/baseline/remotecontrol.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'remotecontrol.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -10,8 +10,8 @@ #define REMOTECONTROL_H #include <QtCore/QVariant> +#include <QtGui/QAction> #include <QtGui/QIcon> -#include <QtWidgets/QAction> #include <QtWidgets/QApplication> #include <QtWidgets/QCheckBox> #include <QtWidgets/QGridLayout> @@ -67,61 +67,61 @@ public: void setupUi(QMainWindow *RemoteControlClass) { if (RemoteControlClass->objectName().isEmpty()) - RemoteControlClass->setObjectName(QString::fromUtf8("RemoteControlClass")); + RemoteControlClass->setObjectName("RemoteControlClass"); RemoteControlClass->resize(344, 364); actionQuit = new QAction(RemoteControlClass); - actionQuit->setObjectName(QString::fromUtf8("actionQuit")); + actionQuit->setObjectName("actionQuit"); centralWidget = new QWidget(RemoteControlClass); - centralWidget->setObjectName(QString::fromUtf8("centralWidget")); + centralWidget->setObjectName("centralWidget"); gridLayout = new QGridLayout(centralWidget); gridLayout->setSpacing(6); gridLayout->setContentsMargins(11, 11, 11, 11); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); label = new QLabel(centralWidget); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName("label"); gridLayout->addWidget(label, 0, 0, 1, 1); startUrlLineEdit = new QLineEdit(centralWidget); - startUrlLineEdit->setObjectName(QString::fromUtf8("startUrlLineEdit")); + startUrlLineEdit->setObjectName("startUrlLineEdit"); gridLayout->addWidget(startUrlLineEdit, 0, 1, 1, 2); launchButton = new QPushButton(centralWidget); - launchButton->setObjectName(QString::fromUtf8("launchButton")); + launchButton->setObjectName("launchButton"); gridLayout->addWidget(launchButton, 1, 1, 1, 1); - spacerItem = new QSpacerItem(101, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacerItem = new QSpacerItem(101, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); gridLayout->addItem(spacerItem, 1, 2, 1, 1); - spacerItem1 = new QSpacerItem(113, 16, QSizePolicy::Minimum, QSizePolicy::Fixed); + spacerItem1 = new QSpacerItem(113, 16, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Fixed); gridLayout->addItem(spacerItem1, 2, 1, 1, 1); actionGroupBox = new QGroupBox(centralWidget); - actionGroupBox->setObjectName(QString::fromUtf8("actionGroupBox")); + actionGroupBox->setObjectName("actionGroupBox"); actionGroupBox->setEnabled(false); gridLayout1 = new QGridLayout(actionGroupBox); gridLayout1->setSpacing(6); gridLayout1->setContentsMargins(11, 11, 11, 11); - gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); + gridLayout1->setObjectName("gridLayout1"); label_2 = new QLabel(actionGroupBox); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName("label_2"); gridLayout1->addWidget(label_2, 0, 0, 1, 1); hboxLayout = new QHBoxLayout(); hboxLayout->setSpacing(0); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName("hboxLayout"); indexLineEdit = new QLineEdit(actionGroupBox); - indexLineEdit->setObjectName(QString::fromUtf8("indexLineEdit")); + indexLineEdit->setObjectName("indexLineEdit"); hboxLayout->addWidget(indexLineEdit); indexButton = new QToolButton(actionGroupBox); - indexButton->setObjectName(QString::fromUtf8("indexButton")); + indexButton->setObjectName("indexButton"); const QIcon icon = QIcon(QString::fromUtf8(":/remotecontrol/enter.png")); indexButton->setIcon(icon); @@ -131,20 +131,20 @@ public: gridLayout1->addLayout(hboxLayout, 0, 1, 1, 2); label_4 = new QLabel(actionGroupBox); - label_4->setObjectName(QString::fromUtf8("label_4")); + label_4->setObjectName("label_4"); gridLayout1->addWidget(label_4, 1, 0, 1, 1); hboxLayout1 = new QHBoxLayout(); hboxLayout1->setSpacing(0); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName("hboxLayout1"); identifierLineEdit = new QLineEdit(actionGroupBox); - identifierLineEdit->setObjectName(QString::fromUtf8("identifierLineEdit")); + identifierLineEdit->setObjectName("identifierLineEdit"); hboxLayout1->addWidget(identifierLineEdit); identifierButton = new QToolButton(actionGroupBox); - identifierButton->setObjectName(QString::fromUtf8("identifierButton")); + identifierButton->setObjectName("identifierButton"); identifierButton->setIcon(icon); hboxLayout1->addWidget(identifierButton); @@ -153,20 +153,20 @@ public: gridLayout1->addLayout(hboxLayout1, 1, 1, 1, 2); label_3 = new QLabel(actionGroupBox); - label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setObjectName("label_3"); gridLayout1->addWidget(label_3, 2, 0, 1, 1); hboxLayout2 = new QHBoxLayout(); hboxLayout2->setSpacing(0); - hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2")); + hboxLayout2->setObjectName("hboxLayout2"); urlLineEdit = new QLineEdit(actionGroupBox); - urlLineEdit->setObjectName(QString::fromUtf8("urlLineEdit")); + urlLineEdit->setObjectName("urlLineEdit"); hboxLayout2->addWidget(urlLineEdit); urlButton = new QToolButton(actionGroupBox); - urlButton->setObjectName(QString::fromUtf8("urlButton")); + urlButton->setObjectName("urlButton"); urlButton->setIcon(icon); hboxLayout2->addWidget(urlButton); @@ -175,26 +175,26 @@ public: gridLayout1->addLayout(hboxLayout2, 2, 1, 1, 2); syncContentsButton = new QPushButton(actionGroupBox); - syncContentsButton->setObjectName(QString::fromUtf8("syncContentsButton")); + syncContentsButton->setObjectName("syncContentsButton"); gridLayout1->addWidget(syncContentsButton, 3, 1, 1, 1); - spacerItem2 = new QSpacerItem(81, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacerItem2 = new QSpacerItem(81, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); gridLayout1->addItem(spacerItem2, 3, 2, 1, 1); contentsCheckBox = new QCheckBox(actionGroupBox); - contentsCheckBox->setObjectName(QString::fromUtf8("contentsCheckBox")); + contentsCheckBox->setObjectName("contentsCheckBox"); gridLayout1->addWidget(contentsCheckBox, 4, 0, 1, 3); indexCheckBox = new QCheckBox(actionGroupBox); - indexCheckBox->setObjectName(QString::fromUtf8("indexCheckBox")); + indexCheckBox->setObjectName("indexCheckBox"); gridLayout1->addWidget(indexCheckBox, 5, 0, 1, 1); bookmarksCheckBox = new QCheckBox(actionGroupBox); - bookmarksCheckBox->setObjectName(QString::fromUtf8("bookmarksCheckBox")); + bookmarksCheckBox->setObjectName("bookmarksCheckBox"); gridLayout1->addWidget(bookmarksCheckBox, 6, 0, 1, 3); @@ -203,13 +203,13 @@ public: RemoteControlClass->setCentralWidget(centralWidget); menuBar = new QMenuBar(RemoteControlClass); - menuBar->setObjectName(QString::fromUtf8("menuBar")); + menuBar->setObjectName("menuBar"); menuBar->setGeometry(QRect(0, 0, 344, 21)); menuFile = new QMenu(menuBar); - menuFile->setObjectName(QString::fromUtf8("menuFile")); + menuFile->setObjectName("menuFile"); RemoteControlClass->setMenuBar(menuBar); statusBar = new QStatusBar(RemoteControlClass); - statusBar->setObjectName(QString::fromUtf8("statusBar")); + statusBar->setObjectName("statusBar"); RemoteControlClass->setStatusBar(statusBar); menuBar->addAction(menuFile->menuAction()); @@ -222,22 +222,22 @@ public: void retranslateUi(QMainWindow *RemoteControlClass) { - RemoteControlClass->setWindowTitle(QApplication::translate("RemoteControlClass", "RemoteControl", nullptr)); - actionQuit->setText(QApplication::translate("RemoteControlClass", "Quit", nullptr)); - label->setText(QApplication::translate("RemoteControlClass", "Start URL:", nullptr)); - launchButton->setText(QApplication::translate("RemoteControlClass", "Launch Qt HelpViewer", nullptr)); - actionGroupBox->setTitle(QApplication::translate("RemoteControlClass", "Actions", nullptr)); - label_2->setText(QApplication::translate("RemoteControlClass", "Search in Index:", nullptr)); + RemoteControlClass->setWindowTitle(QCoreApplication::translate("RemoteControlClass", "RemoteControl", nullptr)); + actionQuit->setText(QCoreApplication::translate("RemoteControlClass", "Quit", nullptr)); + label->setText(QCoreApplication::translate("RemoteControlClass", "Start URL:", nullptr)); + launchButton->setText(QCoreApplication::translate("RemoteControlClass", "Launch Qt HelpViewer", nullptr)); + actionGroupBox->setTitle(QCoreApplication::translate("RemoteControlClass", "Actions", nullptr)); + label_2->setText(QCoreApplication::translate("RemoteControlClass", "Search in Index:", nullptr)); indexButton->setText(QString()); - label_4->setText(QApplication::translate("RemoteControlClass", "Identifier:", nullptr)); + label_4->setText(QCoreApplication::translate("RemoteControlClass", "Identifier:", nullptr)); identifierButton->setText(QString()); - label_3->setText(QApplication::translate("RemoteControlClass", "Show URL:", nullptr)); + label_3->setText(QCoreApplication::translate("RemoteControlClass", "Show URL:", nullptr)); urlButton->setText(QString()); - syncContentsButton->setText(QApplication::translate("RemoteControlClass", "Sync Contents", nullptr)); - contentsCheckBox->setText(QApplication::translate("RemoteControlClass", "Show Contents", nullptr)); - indexCheckBox->setText(QApplication::translate("RemoteControlClass", "Show Index", nullptr)); - bookmarksCheckBox->setText(QApplication::translate("RemoteControlClass", "Show Bookmarks", nullptr)); - menuFile->setTitle(QApplication::translate("RemoteControlClass", "File", nullptr)); + syncContentsButton->setText(QCoreApplication::translate("RemoteControlClass", "Sync Contents", nullptr)); + contentsCheckBox->setText(QCoreApplication::translate("RemoteControlClass", "Show Contents", nullptr)); + indexCheckBox->setText(QCoreApplication::translate("RemoteControlClass", "Show Index", nullptr)); + bookmarksCheckBox->setText(QCoreApplication::translate("RemoteControlClass", "Show Bookmarks", nullptr)); + menuFile->setTitle(QCoreApplication::translate("RemoteControlClass", "File", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/repaintslot.ui b/tests/auto/tools/uic/baseline/repaintslot.ui new file mode 100644 index 0000000000..3ef042bf59 --- /dev/null +++ b/tests/auto/tools/uic/baseline/repaintslot.ui @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>Widget</class> + <widget class="QWidget" name="Widget"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>800</width> + <height>600</height> + </rect> + </property> + <property name="windowTitle"> + <string>Widget</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout"> + <item> + <widget class="QSlider" name="verticalSlider"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + </widget> + </item> + </layout> + </widget> + <resources/> + <connections> + <connection> + <sender>verticalSlider</sender> + <signal>valueChanged(int)</signal> + <receiver>Widget</receiver> + <slot>repaint()</slot> + <hints> + <hint type="sourcelabel"> + <x>16</x> + <y>140</y> + </hint> + <hint type="destinationlabel"> + <x>131</x> + <y>149</y> + </hint> + </hints> + </connection> + </connections> +</ui> diff --git a/tests/auto/tools/uic/baseline/repaintslot.ui.h b/tests/auto/tools/uic/baseline/repaintslot.ui.h new file mode 100644 index 0000000000..15ffd5aba6 --- /dev/null +++ b/tests/auto/tools/uic/baseline/repaintslot.ui.h @@ -0,0 +1,59 @@ +/******************************************************************************** +** Form generated from reading UI file 'repaintslot.ui' +** +** Created by: Qt User Interface Compiler version 6.0.0 +** +** WARNING! All changes made in this file will be lost when recompiling UI file! +********************************************************************************/ + +#ifndef REPAINTSLOT_H +#define REPAINTSLOT_H + +#include <QtCore/QVariant> +#include <QtWidgets/QApplication> +#include <QtWidgets/QSlider> +#include <QtWidgets/QVBoxLayout> +#include <QtWidgets/QWidget> + +QT_BEGIN_NAMESPACE + +class Ui_Widget +{ +public: + QVBoxLayout *verticalLayout; + QSlider *verticalSlider; + + void setupUi(QWidget *Widget) + { + if (Widget->objectName().isEmpty()) + Widget->setObjectName("Widget"); + Widget->resize(800, 600); + verticalLayout = new QVBoxLayout(Widget); + verticalLayout->setObjectName("verticalLayout"); + verticalSlider = new QSlider(Widget); + verticalSlider->setObjectName("verticalSlider"); + verticalSlider->setOrientation(Qt::Vertical); + + verticalLayout->addWidget(verticalSlider); + + + retranslateUi(Widget); + QObject::connect(verticalSlider, &QSlider::valueChanged, Widget, qOverload<>(&QWidget::repaint)); + + QMetaObject::connectSlotsByName(Widget); + } // setupUi + + void retranslateUi(QWidget *Widget) + { + Widget->setWindowTitle(QCoreApplication::translate("Widget", "Widget", nullptr)); + } // retranslateUi + +}; + +namespace Ui { + class Widget: public Ui_Widget {}; +} // namespace Ui + +QT_END_NAMESPACE + +#endif // REPAINTSLOT_H diff --git a/tests/auto/tools/uic/baseline/saveformastemplate.ui b/tests/auto/tools/uic/baseline/saveformastemplate.ui index c9df65fcd2..917302796b 100644 --- a/tests/auto/tools/uic/baseline/saveformastemplate.ui +++ b/tests/auto/tools/uic/baseline/saveformastemplate.ui @@ -1,31 +1,8 @@ <ui version="4.0" > - <comment>********************************************************************* -** -** 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$ -** -*********************************************************************</comment> +<comment> +* Copyright (C) 2016 The Qt Company Ltd. +* SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +</comment> <class>SaveFormAsTemplate</class> <widget class="QDialog" name="SaveFormAsTemplate" > <property name="windowTitle" > diff --git a/tests/auto/tools/uic/baseline/saveformastemplate.ui.h b/tests/auto/tools/uic/baseline/saveformastemplate.ui.h index 9ef6eedb4c..7f2c46aa47 100644 --- a/tests/auto/tools/uic/baseline/saveformastemplate.ui.h +++ b/tests/auto/tools/uic/baseline/saveformastemplate.ui.h @@ -1,37 +1,14 @@ /* -********************************************************************* -** -** 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$ -** -********************************************************************* + +* Copyright (C) 2016 The Qt Company Ltd. +* SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + */ /******************************************************************************** ** Form generated from reading UI file 'saveformastemplate.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -40,6 +17,7 @@ #define SAVEFORMASTEMPLATE_H #include <QtCore/QVariant> +#include <QtWidgets/QAbstractButton> #include <QtWidgets/QApplication> #include <QtWidgets/QComboBox> #include <QtWidgets/QDialog> @@ -67,13 +45,13 @@ public: void setupUi(QDialog *SaveFormAsTemplate) { if (SaveFormAsTemplate->objectName().isEmpty()) - SaveFormAsTemplate->setObjectName(QString::fromUtf8("SaveFormAsTemplate")); + SaveFormAsTemplate->setObjectName("SaveFormAsTemplate"); vboxLayout = new QVBoxLayout(SaveFormAsTemplate); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); formLayout = new QFormLayout(); - formLayout->setObjectName(QString::fromUtf8("formLayout")); + formLayout->setObjectName("formLayout"); label = new QLabel(SaveFormAsTemplate); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName("label"); label->setFrameShape(QFrame::NoFrame); label->setFrameShadow(QFrame::Plain); label->setTextFormat(Qt::AutoText); @@ -81,14 +59,14 @@ public: formLayout->setWidget(0, QFormLayout::LabelRole, label); templateNameEdit = new QLineEdit(SaveFormAsTemplate); - templateNameEdit->setObjectName(QString::fromUtf8("templateNameEdit")); + templateNameEdit->setObjectName("templateNameEdit"); templateNameEdit->setMinimumSize(QSize(222, 0)); templateNameEdit->setEchoMode(QLineEdit::Normal); formLayout->setWidget(0, QFormLayout::FieldRole, templateNameEdit); label_2 = new QLabel(SaveFormAsTemplate); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName("label_2"); label_2->setFrameShape(QFrame::NoFrame); label_2->setFrameShadow(QFrame::Plain); label_2->setTextFormat(Qt::AutoText); @@ -96,7 +74,7 @@ public: formLayout->setWidget(1, QFormLayout::LabelRole, label_2); categoryCombo = new QComboBox(SaveFormAsTemplate); - categoryCombo->setObjectName(QString::fromUtf8("categoryCombo")); + categoryCombo->setObjectName("categoryCombo"); formLayout->setWidget(1, QFormLayout::FieldRole, categoryCombo); @@ -104,37 +82,37 @@ public: vboxLayout->addLayout(formLayout); horizontalLine = new QFrame(SaveFormAsTemplate); - horizontalLine->setObjectName(QString::fromUtf8("horizontalLine")); + horizontalLine->setObjectName("horizontalLine"); horizontalLine->setFrameShape(QFrame::HLine); horizontalLine->setFrameShadow(QFrame::Sunken); vboxLayout->addWidget(horizontalLine); buttonBox = new QDialogButtonBox(SaveFormAsTemplate); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName("buttonBox"); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); vboxLayout->addWidget(buttonBox); -#ifndef QT_NO_SHORTCUT +#if QT_CONFIG(shortcut) label->setBuddy(templateNameEdit); label_2->setBuddy(categoryCombo); -#endif // QT_NO_SHORTCUT +#endif // QT_CONFIG(shortcut) retranslateUi(SaveFormAsTemplate); - QObject::connect(buttonBox, SIGNAL(accepted()), SaveFormAsTemplate, SLOT(accept())); - QObject::connect(buttonBox, SIGNAL(rejected()), SaveFormAsTemplate, SLOT(reject())); + QObject::connect(buttonBox, &QDialogButtonBox::accepted, SaveFormAsTemplate, qOverload<>(&QDialog::accept)); + QObject::connect(buttonBox, &QDialogButtonBox::rejected, SaveFormAsTemplate, qOverload<>(&QDialog::reject)); QMetaObject::connectSlotsByName(SaveFormAsTemplate); } // setupUi void retranslateUi(QDialog *SaveFormAsTemplate) { - SaveFormAsTemplate->setWindowTitle(QApplication::translate("SaveFormAsTemplate", "Save Form As Template", nullptr)); - label->setText(QApplication::translate("SaveFormAsTemplate", "&Name:", nullptr)); + SaveFormAsTemplate->setWindowTitle(QCoreApplication::translate("SaveFormAsTemplate", "Save Form As Template", nullptr)); + label->setText(QCoreApplication::translate("SaveFormAsTemplate", "&Name:", nullptr)); templateNameEdit->setText(QString()); - label_2->setText(QApplication::translate("SaveFormAsTemplate", "&Category:", nullptr)); + label_2->setText(QCoreApplication::translate("SaveFormAsTemplate", "&Category:", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/settings.ui.h b/tests/auto/tools/uic/baseline/settings.ui.h index cc680c8033..e929770b52 100644 --- a/tests/auto/tools/uic/baseline/settings.ui.h +++ b/tests/auto/tools/uic/baseline/settings.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'settings.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -10,6 +10,7 @@ #define SETTINGS_H #include <QtCore/QVariant> +#include <QtWidgets/QAbstractButton> #include <QtWidgets/QApplication> #include <QtWidgets/QComboBox> #include <QtWidgets/QDialog> @@ -47,15 +48,15 @@ public: void setupUi(QDialog *Dialog) { if (Dialog->objectName().isEmpty()) - Dialog->setObjectName(QString::fromUtf8("Dialog")); + Dialog->setObjectName("Dialog"); Dialog->resize(392, 176); verticalLayout = new QVBoxLayout(Dialog); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + verticalLayout->setObjectName("verticalLayout"); hboxLayout = new QHBoxLayout(); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName("hboxLayout"); label = new QLabel(Dialog); - label->setObjectName(QString::fromUtf8("label")); - QSizePolicy sizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred); + label->setObjectName("label"); + QSizePolicy sizePolicy(QSizePolicy::Policy::Maximum, QSizePolicy::Policy::Preferred); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); sizePolicy.setHeightForWidth(label->sizePolicy().hasHeightForWidth()); @@ -66,8 +67,8 @@ public: hboxLayout->addWidget(label); deviceCombo = new QComboBox(Dialog); - deviceCombo->setObjectName(QString::fromUtf8("deviceCombo")); - QSizePolicy sizePolicy1(QSizePolicy::Minimum, QSizePolicy::Fixed); + deviceCombo->setObjectName("deviceCombo"); + QSizePolicy sizePolicy1(QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Fixed); sizePolicy1.setHorizontalStretch(0); sizePolicy1.setVerticalStretch(0); sizePolicy1.setHeightForWidth(deviceCombo->sizePolicy().hasHeightForWidth()); @@ -79,9 +80,9 @@ public: verticalLayout->addLayout(hboxLayout); hboxLayout1 = new QHBoxLayout(); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName("hboxLayout1"); label_6 = new QLabel(Dialog); - label_6->setObjectName(QString::fromUtf8("label_6")); + label_6->setObjectName("label_6"); sizePolicy.setHeightForWidth(label_6->sizePolicy().hasHeightForWidth()); label_6->setSizePolicy(sizePolicy); label_6->setMinimumSize(QSize(90, 0)); @@ -90,7 +91,7 @@ public: hboxLayout1->addWidget(label_6); audioEffectsCombo = new QComboBox(Dialog); - audioEffectsCombo->setObjectName(QString::fromUtf8("audioEffectsCombo")); + audioEffectsCombo->setObjectName("audioEffectsCombo"); sizePolicy1.setHeightForWidth(audioEffectsCombo->sizePolicy().hasHeightForWidth()); audioEffectsCombo->setSizePolicy(sizePolicy1); @@ -100,9 +101,9 @@ public: verticalLayout->addLayout(hboxLayout1); hboxLayout2 = new QHBoxLayout(); - hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2")); + hboxLayout2->setObjectName("hboxLayout2"); crossFadeLabel = new QLabel(Dialog); - crossFadeLabel->setObjectName(QString::fromUtf8("crossFadeLabel")); + crossFadeLabel->setObjectName("crossFadeLabel"); sizePolicy.setHeightForWidth(crossFadeLabel->sizePolicy().hasHeightForWidth()); crossFadeLabel->setSizePolicy(sizePolicy); crossFadeLabel->setMinimumSize(QSize(90, 0)); @@ -111,9 +112,9 @@ public: hboxLayout2->addWidget(crossFadeLabel); vboxLayout = new QVBoxLayout(); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); crossFadeSlider = new QSlider(Dialog); - crossFadeSlider->setObjectName(QString::fromUtf8("crossFadeSlider")); + crossFadeSlider->setObjectName("crossFadeSlider"); sizePolicy1.setHeightForWidth(crossFadeSlider->sizePolicy().hasHeightForWidth()); crossFadeSlider->setSizePolicy(sizePolicy1); crossFadeSlider->setMinimum(-20); @@ -127,31 +128,31 @@ public: vboxLayout->addWidget(crossFadeSlider); hboxLayout3 = new QHBoxLayout(); - hboxLayout3->setObjectName(QString::fromUtf8("hboxLayout3")); + hboxLayout3->setObjectName("hboxLayout3"); label_3 = new QLabel(Dialog); - label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setObjectName("label_3"); QFont font; font.setPointSize(9); label_3->setFont(font); hboxLayout3->addWidget(label_3); - spacerItem = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacerItem = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); hboxLayout3->addItem(spacerItem); label_5 = new QLabel(Dialog); - label_5->setObjectName(QString::fromUtf8("label_5")); + label_5->setObjectName("label_5"); label_5->setFont(font); hboxLayout3->addWidget(label_5); - spacerItem1 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacerItem1 = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); hboxLayout3->addItem(spacerItem1); label_4 = new QLabel(Dialog); - label_4->setObjectName(QString::fromUtf8("label_4")); + label_4->setObjectName("label_4"); label_4->setFont(font); hboxLayout3->addWidget(label_4); @@ -166,7 +167,7 @@ public: verticalLayout->addLayout(hboxLayout2); buttonBox = new QDialogButtonBox(Dialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName("buttonBox"); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); @@ -174,21 +175,21 @@ public: retranslateUi(Dialog); - QObject::connect(buttonBox, SIGNAL(accepted()), Dialog, SLOT(accept())); - QObject::connect(buttonBox, SIGNAL(rejected()), Dialog, SLOT(reject())); + QObject::connect(buttonBox, &QDialogButtonBox::accepted, Dialog, qOverload<>(&QDialog::accept)); + QObject::connect(buttonBox, &QDialogButtonBox::rejected, Dialog, qOverload<>(&QDialog::reject)); QMetaObject::connectSlotsByName(Dialog); } // setupUi void retranslateUi(QDialog *Dialog) { - Dialog->setWindowTitle(QApplication::translate("Dialog", "Dialog", nullptr)); - label->setText(QApplication::translate("Dialog", "Audio device:", nullptr)); - label_6->setText(QApplication::translate("Dialog", "Audio effect:", nullptr)); - crossFadeLabel->setText(QApplication::translate("Dialog", "Cross fade:", nullptr)); - label_3->setText(QApplication::translate("Dialog", "-10 Sec", nullptr)); - label_5->setText(QApplication::translate("Dialog", "0", nullptr)); - label_4->setText(QApplication::translate("Dialog", "10 Sec", nullptr)); + Dialog->setWindowTitle(QCoreApplication::translate("Dialog", "Dialog", nullptr)); + label->setText(QCoreApplication::translate("Dialog", "Audio device:", nullptr)); + label_6->setText(QCoreApplication::translate("Dialog", "Audio effect:", nullptr)); + crossFadeLabel->setText(QCoreApplication::translate("Dialog", "Cross fade:", nullptr)); + label_3->setText(QCoreApplication::translate("Dialog", "-10 Sec", nullptr)); + label_5->setText(QCoreApplication::translate("Dialog", "0", nullptr)); + label_4->setText(QCoreApplication::translate("Dialog", "10 Sec", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/signalslotdialog.ui.h b/tests/auto/tools/uic/baseline/signalslotdialog.ui.h index 5833a25a8b..1fff9dd064 100644 --- a/tests/auto/tools/uic/baseline/signalslotdialog.ui.h +++ b/tests/auto/tools/uic/baseline/signalslotdialog.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'signalslotdialog.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -10,6 +10,7 @@ #define SIGNALSLOTDIALOG_H #include <QtCore/QVariant> +#include <QtWidgets/QAbstractButton> #include <QtWidgets/QApplication> #include <QtWidgets/QDialog> #include <QtWidgets/QDialogButtonBox> @@ -45,37 +46,37 @@ public: void setupUi(QDialog *SignalSlotDialogClass) { if (SignalSlotDialogClass->objectName().isEmpty()) - SignalSlotDialogClass->setObjectName(QString::fromUtf8("SignalSlotDialogClass")); + SignalSlotDialogClass->setObjectName("SignalSlotDialogClass"); SignalSlotDialogClass->resize(617, 535); vboxLayout = new QVBoxLayout(SignalSlotDialogClass); vboxLayout->setSpacing(6); vboxLayout->setContentsMargins(11, 11, 11, 11); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); slotGroupBox = new QGroupBox(SignalSlotDialogClass); - slotGroupBox->setObjectName(QString::fromUtf8("slotGroupBox")); + slotGroupBox->setObjectName("slotGroupBox"); vboxLayout1 = new QVBoxLayout(slotGroupBox); vboxLayout1->setSpacing(6); vboxLayout1->setContentsMargins(11, 11, 11, 11); - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName("vboxLayout1"); slotListView = new QListView(slotGroupBox); - slotListView->setObjectName(QString::fromUtf8("slotListView")); + slotListView->setObjectName("slotListView"); vboxLayout1->addWidget(slotListView); hboxLayout = new QHBoxLayout(); hboxLayout->setSpacing(6); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName("hboxLayout"); addSlotButton = new QToolButton(slotGroupBox); - addSlotButton->setObjectName(QString::fromUtf8("addSlotButton")); + addSlotButton->setObjectName("addSlotButton"); hboxLayout->addWidget(addSlotButton); removeSlotButton = new QToolButton(slotGroupBox); - removeSlotButton->setObjectName(QString::fromUtf8("removeSlotButton")); + removeSlotButton->setObjectName("removeSlotButton"); hboxLayout->addWidget(removeSlotButton); - spacerItem = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacerItem = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); hboxLayout->addItem(spacerItem); @@ -86,30 +87,30 @@ public: vboxLayout->addWidget(slotGroupBox); signalGroupBox = new QGroupBox(SignalSlotDialogClass); - signalGroupBox->setObjectName(QString::fromUtf8("signalGroupBox")); + signalGroupBox->setObjectName("signalGroupBox"); vboxLayout2 = new QVBoxLayout(signalGroupBox); vboxLayout2->setSpacing(6); vboxLayout2->setContentsMargins(11, 11, 11, 11); - vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2")); + vboxLayout2->setObjectName("vboxLayout2"); signalListView = new QListView(signalGroupBox); - signalListView->setObjectName(QString::fromUtf8("signalListView")); + signalListView->setObjectName("signalListView"); vboxLayout2->addWidget(signalListView); hboxLayout1 = new QHBoxLayout(); hboxLayout1->setSpacing(6); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName("hboxLayout1"); addSignalButton = new QToolButton(signalGroupBox); - addSignalButton->setObjectName(QString::fromUtf8("addSignalButton")); + addSignalButton->setObjectName("addSignalButton"); hboxLayout1->addWidget(addSignalButton); removeSignalButton = new QToolButton(signalGroupBox); - removeSignalButton->setObjectName(QString::fromUtf8("removeSignalButton")); + removeSignalButton->setObjectName("removeSignalButton"); hboxLayout1->addWidget(removeSignalButton); - spacerItem1 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacerItem1 = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); hboxLayout1->addItem(spacerItem1); @@ -120,7 +121,7 @@ public: vboxLayout->addWidget(signalGroupBox); buttonBox = new QDialogButtonBox(SignalSlotDialogClass); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName("buttonBox"); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); vboxLayout->addWidget(buttonBox); @@ -133,25 +134,25 @@ public: void retranslateUi(QDialog *SignalSlotDialogClass) { - SignalSlotDialogClass->setWindowTitle(QApplication::translate("SignalSlotDialogClass", "Signals and slots", nullptr)); - slotGroupBox->setTitle(QApplication::translate("SignalSlotDialogClass", "Slots", nullptr)); -#ifndef QT_NO_TOOLTIP - addSlotButton->setToolTip(QApplication::translate("SignalSlotDialogClass", "Add", nullptr)); -#endif // QT_NO_TOOLTIP - addSlotButton->setText(QApplication::translate("SignalSlotDialogClass", "...", nullptr)); -#ifndef QT_NO_TOOLTIP - removeSlotButton->setToolTip(QApplication::translate("SignalSlotDialogClass", "Delete", nullptr)); -#endif // QT_NO_TOOLTIP - removeSlotButton->setText(QApplication::translate("SignalSlotDialogClass", "...", nullptr)); - signalGroupBox->setTitle(QApplication::translate("SignalSlotDialogClass", "Signals", nullptr)); -#ifndef QT_NO_TOOLTIP - addSignalButton->setToolTip(QApplication::translate("SignalSlotDialogClass", "Add", nullptr)); -#endif // QT_NO_TOOLTIP - addSignalButton->setText(QApplication::translate("SignalSlotDialogClass", "...", nullptr)); -#ifndef QT_NO_TOOLTIP - removeSignalButton->setToolTip(QApplication::translate("SignalSlotDialogClass", "Delete", nullptr)); -#endif // QT_NO_TOOLTIP - removeSignalButton->setText(QApplication::translate("SignalSlotDialogClass", "...", nullptr)); + SignalSlotDialogClass->setWindowTitle(QCoreApplication::translate("SignalSlotDialogClass", "Signals and slots", nullptr)); + slotGroupBox->setTitle(QCoreApplication::translate("SignalSlotDialogClass", "Slots", nullptr)); +#if QT_CONFIG(tooltip) + addSlotButton->setToolTip(QCoreApplication::translate("SignalSlotDialogClass", "Add", nullptr)); +#endif // QT_CONFIG(tooltip) + addSlotButton->setText(QCoreApplication::translate("SignalSlotDialogClass", "...", nullptr)); +#if QT_CONFIG(tooltip) + removeSlotButton->setToolTip(QCoreApplication::translate("SignalSlotDialogClass", "Delete", nullptr)); +#endif // QT_CONFIG(tooltip) + removeSlotButton->setText(QCoreApplication::translate("SignalSlotDialogClass", "...", nullptr)); + signalGroupBox->setTitle(QCoreApplication::translate("SignalSlotDialogClass", "Signals", nullptr)); +#if QT_CONFIG(tooltip) + addSignalButton->setToolTip(QCoreApplication::translate("SignalSlotDialogClass", "Add", nullptr)); +#endif // QT_CONFIG(tooltip) + addSignalButton->setText(QCoreApplication::translate("SignalSlotDialogClass", "...", nullptr)); +#if QT_CONFIG(tooltip) + removeSignalButton->setToolTip(QCoreApplication::translate("SignalSlotDialogClass", "Delete", nullptr)); +#endif // QT_CONFIG(tooltip) + removeSignalButton->setText(QCoreApplication::translate("SignalSlotDialogClass", "...", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/sslclient.ui.h b/tests/auto/tools/uic/baseline/sslclient.ui.h index 382889648e..9cd5c2a55f 100644 --- a/tests/auto/tools/uic/baseline/sslclient.ui.h +++ b/tests/auto/tools/uic/baseline/sslclient.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'sslclient.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -48,29 +48,29 @@ public: void setupUi(QWidget *Form) { if (Form->objectName().isEmpty()) - Form->setObjectName(QString::fromUtf8("Form")); + Form->setObjectName("Form"); Form->resize(343, 320); vboxLayout = new QVBoxLayout(Form); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); gridLayout = new QGridLayout(); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); hostNameLabel = new QLabel(Form); - hostNameLabel->setObjectName(QString::fromUtf8("hostNameLabel")); + hostNameLabel->setObjectName("hostNameLabel"); gridLayout->addWidget(hostNameLabel, 0, 0, 1, 1); hostNameEdit = new QLineEdit(Form); - hostNameEdit->setObjectName(QString::fromUtf8("hostNameEdit")); + hostNameEdit->setObjectName("hostNameEdit"); gridLayout->addWidget(hostNameEdit, 0, 1, 1, 1); portLabel = new QLabel(Form); - portLabel->setObjectName(QString::fromUtf8("portLabel")); + portLabel->setObjectName("portLabel"); gridLayout->addWidget(portLabel, 1, 0, 1, 1); portBox = new QSpinBox(Form); - portBox->setObjectName(QString::fromUtf8("portBox")); + portBox->setObjectName("portBox"); portBox->setMinimum(1); portBox->setMaximum(65535); portBox->setValue(993); @@ -81,25 +81,25 @@ public: vboxLayout->addLayout(gridLayout); connectButton = new QPushButton(Form); - connectButton->setObjectName(QString::fromUtf8("connectButton")); + connectButton->setObjectName("connectButton"); connectButton->setEnabled(true); vboxLayout->addWidget(connectButton); sessionBox = new QGroupBox(Form); - sessionBox->setObjectName(QString::fromUtf8("sessionBox")); + sessionBox->setObjectName("sessionBox"); sessionBox->setEnabled(false); vboxLayout1 = new QVBoxLayout(sessionBox); - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName("vboxLayout1"); hboxLayout = new QHBoxLayout(); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName("hboxLayout"); cipherText = new QLabel(sessionBox); - cipherText->setObjectName(QString::fromUtf8("cipherText")); + cipherText->setObjectName("cipherText"); hboxLayout->addWidget(cipherText); cipherLabel = new QLabel(sessionBox); - cipherLabel->setObjectName(QString::fromUtf8("cipherLabel")); + cipherLabel->setObjectName("cipherLabel"); cipherLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); hboxLayout->addWidget(cipherLabel); @@ -108,7 +108,7 @@ public: vboxLayout1->addLayout(hboxLayout); sessionOutput = new QTextEdit(sessionBox); - sessionOutput->setObjectName(QString::fromUtf8("sessionOutput")); + sessionOutput->setObjectName("sessionOutput"); sessionOutput->setEnabled(false); sessionOutput->setFocusPolicy(Qt::NoFocus); sessionOutput->setReadOnly(true); @@ -116,20 +116,20 @@ public: vboxLayout1->addWidget(sessionOutput); hboxLayout1 = new QHBoxLayout(); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName("hboxLayout1"); sessionInputLabel = new QLabel(sessionBox); - sessionInputLabel->setObjectName(QString::fromUtf8("sessionInputLabel")); + sessionInputLabel->setObjectName("sessionInputLabel"); hboxLayout1->addWidget(sessionInputLabel); sessionInput = new QLineEdit(sessionBox); - sessionInput->setObjectName(QString::fromUtf8("sessionInput")); + sessionInput->setObjectName("sessionInput"); sessionInput->setEnabled(false); hboxLayout1->addWidget(sessionInput); sendButton = new QPushButton(sessionBox); - sendButton->setObjectName(QString::fromUtf8("sendButton")); + sendButton->setObjectName("sendButton"); sendButton->setEnabled(false); sendButton->setFocusPolicy(Qt::TabFocus); @@ -143,8 +143,8 @@ public: retranslateUi(Form); - QObject::connect(hostNameEdit, SIGNAL(returnPressed()), connectButton, SLOT(animateClick())); - QObject::connect(sessionInput, SIGNAL(returnPressed()), sendButton, SLOT(animateClick())); + QObject::connect(hostNameEdit, &QLineEdit::returnPressed, connectButton, qOverload<>(&QPushButton::animateClick)); + QObject::connect(sessionInput, &QLineEdit::returnPressed, sendButton, qOverload<>(&QPushButton::animateClick)); connectButton->setDefault(true); sendButton->setDefault(true); @@ -155,20 +155,20 @@ public: void retranslateUi(QWidget *Form) { - Form->setWindowTitle(QApplication::translate("Form", "Secure Socket Client", nullptr)); - hostNameLabel->setText(QApplication::translate("Form", "Host name:", nullptr)); - hostNameEdit->setText(QApplication::translate("Form", "imap.example.com", nullptr)); - portLabel->setText(QApplication::translate("Form", "Port:", nullptr)); - connectButton->setText(QApplication::translate("Form", "Connect to host", nullptr)); - sessionBox->setTitle(QApplication::translate("Form", "Active session", nullptr)); - cipherText->setText(QApplication::translate("Form", "Cryptographic Cipher:", nullptr)); - cipherLabel->setText(QApplication::translate("Form", "<none>", nullptr)); - sessionOutput->setHtml(QApplication::translate("Form", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n" + Form->setWindowTitle(QCoreApplication::translate("Form", "Secure Socket Client", nullptr)); + hostNameLabel->setText(QCoreApplication::translate("Form", "Host name:", nullptr)); + hostNameEdit->setText(QCoreApplication::translate("Form", "imap.example.com", nullptr)); + portLabel->setText(QCoreApplication::translate("Form", "Port:", nullptr)); + connectButton->setText(QCoreApplication::translate("Form", "Connect to host", nullptr)); + sessionBox->setTitle(QCoreApplication::translate("Form", "Active session", nullptr)); + cipherText->setText(QCoreApplication::translate("Form", "Cryptographic Cipher:", nullptr)); + cipherLabel->setText(QCoreApplication::translate("Form", "<none>", nullptr)); + sessionOutput->setHtml(QCoreApplication::translate("Form", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n" "p, li { white-space: pre-wrap; }\n" "</style></head><body style=\" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;\">\n" "<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"></p></body></html>", nullptr)); - sessionInputLabel->setText(QApplication::translate("Form", "Input:", nullptr)); - sendButton->setText(QApplication::translate("Form", "&Send", nullptr)); + sessionInputLabel->setText(QCoreApplication::translate("Form", "Input:", nullptr)); + sendButton->setText(QCoreApplication::translate("Form", "&Send", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/sslerrors.ui.h b/tests/auto/tools/uic/baseline/sslerrors.ui.h index 04f21ded43..bc6071d962 100644 --- a/tests/auto/tools/uic/baseline/sslerrors.ui.h +++ b/tests/auto/tools/uic/baseline/sslerrors.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'sslerrors.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -36,40 +36,40 @@ public: void setupUi(QDialog *SslErrors) { if (SslErrors->objectName().isEmpty()) - SslErrors->setObjectName(QString::fromUtf8("SslErrors")); + SslErrors->setObjectName("SslErrors"); SslErrors->resize(371, 216); vboxLayout = new QVBoxLayout(SslErrors); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); label = new QLabel(SslErrors); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName("label"); label->setWordWrap(true); vboxLayout->addWidget(label); sslErrorList = new QListWidget(SslErrors); - sslErrorList->setObjectName(QString::fromUtf8("sslErrorList")); + sslErrorList->setObjectName("sslErrorList"); vboxLayout->addWidget(sslErrorList); hboxLayout = new QHBoxLayout(); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName("hboxLayout"); certificateChainButton = new QPushButton(SslErrors); - certificateChainButton->setObjectName(QString::fromUtf8("certificateChainButton")); + certificateChainButton->setObjectName("certificateChainButton"); certificateChainButton->setAutoDefault(false); hboxLayout->addWidget(certificateChainButton); - spacerItem = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacerItem = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); hboxLayout->addItem(spacerItem); pushButton = new QPushButton(SslErrors); - pushButton->setObjectName(QString::fromUtf8("pushButton")); + pushButton->setObjectName("pushButton"); hboxLayout->addWidget(pushButton); pushButton_2 = new QPushButton(SslErrors); - pushButton_2->setObjectName(QString::fromUtf8("pushButton_2")); + pushButton_2->setObjectName("pushButton_2"); hboxLayout->addWidget(pushButton_2); @@ -78,22 +78,22 @@ public: retranslateUi(SslErrors); - QObject::connect(pushButton, SIGNAL(clicked()), SslErrors, SLOT(accept())); - QObject::connect(pushButton_2, SIGNAL(clicked()), SslErrors, SLOT(reject())); + QObject::connect(pushButton, &QPushButton::clicked, SslErrors, qOverload<>(&QDialog::accept)); + QObject::connect(pushButton_2, &QPushButton::clicked, SslErrors, qOverload<>(&QDialog::reject)); QMetaObject::connectSlotsByName(SslErrors); } // setupUi void retranslateUi(QDialog *SslErrors) { - SslErrors->setWindowTitle(QApplication::translate("SslErrors", "Unable To Validate The Connection", nullptr)); - label->setText(QApplication::translate("SslErrors", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n" + SslErrors->setWindowTitle(QCoreApplication::translate("SslErrors", "Unable To Validate The Connection", nullptr)); + label->setText(QCoreApplication::translate("SslErrors", "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n" "p, li { white-space: pre-wrap; }\n" "</style></head><body style=\" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;\">\n" "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:600; color:#ff0000;\">Warning</span><span style=\" color:#ff0000;\">:</span><span style=\" color:#000000;\"> One or more errors with this connection prevent validating the authenticity of the host you are connecting to. Please review the following list of errors, and click </span><span style=\" color:#000000;\">Ignore</span><span style=\" color:#000000;\"> to continue, or </span><span style=\" color:#000000;\">Cancel</span><span style=\" color:#000000;\"> to abort the connection.</span></p></body></html>", nullptr)); - certificateChainButton->setText(QApplication::translate("SslErrors", "View Certificate Chain", nullptr)); - pushButton->setText(QApplication::translate("SslErrors", "Ignore", nullptr)); - pushButton_2->setText(QApplication::translate("SslErrors", "Cancel", nullptr)); + certificateChainButton->setText(QCoreApplication::translate("SslErrors", "View Certificate Chain", nullptr)); + pushButton->setText(QCoreApplication::translate("SslErrors", "Ignore", nullptr)); + pushButton_2->setText(QCoreApplication::translate("SslErrors", "Cancel", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/statistics.ui b/tests/auto/tools/uic/baseline/statistics.ui index 7ab68ef373..18755bd1cf 100644 --- a/tests/auto/tools/uic/baseline/statistics.ui +++ b/tests/auto/tools/uic/baseline/statistics.ui @@ -1,32 +1,9 @@ <ui version="4.0" stdsetdef="1" > - <class>Statistics</class> - <comment>********************************************************************* -** -** 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$ -** -*********************************************************************</comment> +<class>Statistics</class> +<comment> +* Copyright (C) 2016 The Qt Company Ltd. +* SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +</comment> <widget class="QDialog" name="Statistics" > <property name="objectName" > <string notr="true" >linguist_stats</string> diff --git a/tests/auto/tools/uic/baseline/statistics.ui.h b/tests/auto/tools/uic/baseline/statistics.ui.h index 0b508836f2..a37782b4d6 100644 --- a/tests/auto/tools/uic/baseline/statistics.ui.h +++ b/tests/auto/tools/uic/baseline/statistics.ui.h @@ -1,37 +1,14 @@ /* -********************************************************************* -** -** 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$ -** -********************************************************************* + +* Copyright (C) 2016 The Qt Company Ltd. +* SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + */ /******************************************************************************** ** Form generated from reading UI file 'statistics.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -76,28 +53,28 @@ public: void setupUi(QDialog *Statistics) { if (Statistics->objectName().isEmpty()) - Statistics->setObjectName(QString::fromUtf8("Statistics")); + Statistics->setObjectName("Statistics"); Statistics->setObjectName(QString::fromUtf8("linguist_stats")); Statistics->resize(336, 164); gridLayout = new QGridLayout(Statistics); gridLayout->setSpacing(6); gridLayout->setContentsMargins(11, 11, 11, 11); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); gridLayout->setObjectName(QString::fromUtf8("unnamed")); hboxLayout = new QHBoxLayout(); hboxLayout->setSpacing(6); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName("hboxLayout"); hboxLayout->setObjectName(QString::fromUtf8("unnamed")); - spacer4_2 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacer4_2 = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); hboxLayout->addItem(spacer4_2); closeBtn = new QPushButton(Statistics); - closeBtn->setObjectName(QString::fromUtf8("closeBtn")); + closeBtn->setObjectName("closeBtn"); hboxLayout->addWidget(closeBtn); - spacer4 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacer4 = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); hboxLayout->addItem(spacer4); @@ -105,66 +82,66 @@ public: gridLayout->addLayout(hboxLayout, 1, 0, 1, 1); frame4 = new QFrame(Statistics); - frame4->setObjectName(QString::fromUtf8("frame4")); + frame4->setObjectName("frame4"); frame4->setFrameShape(QFrame::StyledPanel); frame4->setFrameShadow(QFrame::Raised); gridLayout1 = new QGridLayout(frame4); gridLayout1->setSpacing(6); gridLayout1->setContentsMargins(11, 11, 11, 11); - gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); + gridLayout1->setObjectName("gridLayout1"); gridLayout1->setObjectName(QString::fromUtf8("unnamed")); textLabel4 = new QLabel(frame4); - textLabel4->setObjectName(QString::fromUtf8("textLabel4")); + textLabel4->setObjectName("textLabel4"); gridLayout1->addWidget(textLabel4, 0, 2, 1, 1); textLabel5 = new QLabel(frame4); - textLabel5->setObjectName(QString::fromUtf8("textLabel5")); + textLabel5->setObjectName("textLabel5"); gridLayout1->addWidget(textLabel5, 0, 1, 1, 1); untrWords = new QLabel(frame4); - untrWords->setObjectName(QString::fromUtf8("untrWords")); + untrWords->setObjectName("untrWords"); gridLayout1->addWidget(untrWords, 1, 1, 1, 1); trWords = new QLabel(frame4); - trWords->setObjectName(QString::fromUtf8("trWords")); + trWords->setObjectName("trWords"); gridLayout1->addWidget(trWords, 1, 2, 1, 1); textLabel1 = new QLabel(frame4); - textLabel1->setObjectName(QString::fromUtf8("textLabel1")); + textLabel1->setObjectName("textLabel1"); gridLayout1->addWidget(textLabel1, 1, 0, 1, 1); trChars = new QLabel(frame4); - trChars->setObjectName(QString::fromUtf8("trChars")); + trChars->setObjectName("trChars"); gridLayout1->addWidget(trChars, 2, 2, 1, 1); untrChars = new QLabel(frame4); - untrChars->setObjectName(QString::fromUtf8("untrChars")); + untrChars->setObjectName("untrChars"); gridLayout1->addWidget(untrChars, 2, 1, 1, 1); textLabel3 = new QLabel(frame4); - textLabel3->setObjectName(QString::fromUtf8("textLabel3")); + textLabel3->setObjectName("textLabel3"); gridLayout1->addWidget(textLabel3, 2, 0, 1, 1); textLabel6 = new QLabel(frame4); - textLabel6->setObjectName(QString::fromUtf8("textLabel6")); + textLabel6->setObjectName("textLabel6"); gridLayout1->addWidget(textLabel6, 3, 0, 1, 1); trCharsSpc = new QLabel(frame4); - trCharsSpc->setObjectName(QString::fromUtf8("trCharsSpc")); + trCharsSpc->setObjectName("trCharsSpc"); gridLayout1->addWidget(trCharsSpc, 3, 2, 1, 1); untrCharsSpc = new QLabel(frame4); - untrCharsSpc->setObjectName(QString::fromUtf8("untrCharsSpc")); + untrCharsSpc->setObjectName("untrCharsSpc"); gridLayout1->addWidget(untrCharsSpc, 3, 1, 1, 1); @@ -179,19 +156,19 @@ public: void retranslateUi(QDialog *Statistics) { - Statistics->setWindowTitle(QApplication::translate("Statistics", "Statistics", nullptr)); - closeBtn->setText(QApplication::translate("Statistics", "&Close", nullptr)); - textLabel4->setText(QApplication::translate("Statistics", "Translation", nullptr)); - textLabel5->setText(QApplication::translate("Statistics", "Source", nullptr)); - untrWords->setText(QApplication::translate("Statistics", "0", nullptr)); - trWords->setText(QApplication::translate("Statistics", "0", nullptr)); - textLabel1->setText(QApplication::translate("Statistics", "Words:", nullptr)); - trChars->setText(QApplication::translate("Statistics", "0", nullptr)); - untrChars->setText(QApplication::translate("Statistics", "0", nullptr)); - textLabel3->setText(QApplication::translate("Statistics", "Characters:", nullptr)); - textLabel6->setText(QApplication::translate("Statistics", "Characters (with spaces):", nullptr)); - trCharsSpc->setText(QApplication::translate("Statistics", "0", nullptr)); - untrCharsSpc->setText(QApplication::translate("Statistics", "0", nullptr)); + Statistics->setWindowTitle(QCoreApplication::translate("Statistics", "Statistics", nullptr)); + closeBtn->setText(QCoreApplication::translate("Statistics", "&Close", nullptr)); + textLabel4->setText(QCoreApplication::translate("Statistics", "Translation", nullptr)); + textLabel5->setText(QCoreApplication::translate("Statistics", "Source", nullptr)); + untrWords->setText(QCoreApplication::translate("Statistics", "0", nullptr)); + trWords->setText(QCoreApplication::translate("Statistics", "0", nullptr)); + textLabel1->setText(QCoreApplication::translate("Statistics", "Words:", nullptr)); + trChars->setText(QCoreApplication::translate("Statistics", "0", nullptr)); + untrChars->setText(QCoreApplication::translate("Statistics", "0", nullptr)); + textLabel3->setText(QCoreApplication::translate("Statistics", "Characters:", nullptr)); + textLabel6->setText(QCoreApplication::translate("Statistics", "Characters (with spaces):", nullptr)); + trCharsSpc->setText(QCoreApplication::translate("Statistics", "0", nullptr)); + untrCharsSpc->setText(QCoreApplication::translate("Statistics", "0", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/stringlisteditor.ui b/tests/auto/tools/uic/baseline/stringlisteditor.ui index 64846d0149..2e9b856351 100644 --- a/tests/auto/tools/uic/baseline/stringlisteditor.ui +++ b/tests/auto/tools/uic/baseline/stringlisteditor.ui @@ -1,31 +1,8 @@ <ui version="4.0" > - <comment>********************************************************************* -** -** 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$ -** -*********************************************************************</comment> +<comment> +* Copyright (C) 2016 The Qt Company Ltd. +* SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +</comment> <class>qdesigner_internal::Dialog</class> <widget class="QDialog" name="qdesigner_internal::Dialog" > <property name="geometry" > diff --git a/tests/auto/tools/uic/baseline/stringlisteditor.ui.h b/tests/auto/tools/uic/baseline/stringlisteditor.ui.h index fd78ce91c1..3fa713b19c 100644 --- a/tests/auto/tools/uic/baseline/stringlisteditor.ui.h +++ b/tests/auto/tools/uic/baseline/stringlisteditor.ui.h @@ -1,37 +1,14 @@ /* -********************************************************************* -** -** 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$ -** -********************************************************************* + +* Copyright (C) 2016 The Qt Company Ltd. +* SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + */ /******************************************************************************** ** Form generated from reading UI file 'stringlisteditor.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -40,6 +17,7 @@ #define STRINGLISTEDITOR_H #include <QtCore/QVariant> +#include <QtWidgets/QAbstractButton> #include <QtWidgets/QApplication> #include <QtWidgets/QDialog> #include <QtWidgets/QDialogButtonBox> @@ -82,7 +60,7 @@ public: void setupUi(QDialog *qdesigner_internal__Dialog) { if (qdesigner_internal__Dialog->objectName().isEmpty()) - qdesigner_internal__Dialog->setObjectName(QString::fromUtf8("qdesigner_internal__Dialog")); + qdesigner_internal__Dialog->setObjectName("qdesigner_internal__Dialog"); qdesigner_internal__Dialog->resize(400, 300); vboxLayout = new QVBoxLayout(qdesigner_internal__Dialog); #ifndef Q_OS_MAC @@ -91,9 +69,9 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); groupBox = new QGroupBox(qdesigner_internal__Dialog); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName("groupBox"); gridLayout = new QGridLayout(groupBox); #ifndef Q_OS_MAC gridLayout->setSpacing(6); @@ -101,7 +79,7 @@ public: #ifndef Q_OS_MAC gridLayout->setContentsMargins(9, 9, 9, 9); #endif - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); vboxLayout1 = new QVBoxLayout(); #ifndef Q_OS_MAC vboxLayout1->setSpacing(6); @@ -109,7 +87,7 @@ public: #ifndef Q_OS_MAC vboxLayout1->setContentsMargins(0, 0, 0, 0); #endif - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName("vboxLayout1"); hboxLayout = new QHBoxLayout(); #ifndef Q_OS_MAC hboxLayout->setSpacing(6); @@ -117,20 +95,20 @@ public: #ifndef Q_OS_MAC hboxLayout->setContentsMargins(0, 0, 0, 0); #endif - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName("hboxLayout"); newButton = new QToolButton(groupBox); - newButton->setObjectName(QString::fromUtf8("newButton")); + newButton->setObjectName("newButton"); newButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); hboxLayout->addWidget(newButton); deleteButton = new QToolButton(groupBox); - deleteButton->setObjectName(QString::fromUtf8("deleteButton")); + deleteButton->setObjectName("deleteButton"); deleteButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); hboxLayout->addWidget(deleteButton); - spacerItem = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacerItem = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); hboxLayout->addItem(spacerItem); @@ -142,14 +120,14 @@ public: hboxLayout1->setSpacing(6); #endif hboxLayout1->setContentsMargins(0, 0, 0, 0); - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName("hboxLayout1"); label = new QLabel(groupBox); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName("label"); hboxLayout1->addWidget(label); valueEdit = new QLineEdit(groupBox); - valueEdit->setObjectName(QString::fromUtf8("valueEdit")); + valueEdit->setObjectName("valueEdit"); hboxLayout1->addWidget(valueEdit); @@ -164,22 +142,22 @@ public: vboxLayout2->setSpacing(6); #endif vboxLayout2->setContentsMargins(0, 0, 0, 0); - vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2")); - spacerItem1 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + vboxLayout2->setObjectName("vboxLayout2"); + spacerItem1 = new QSpacerItem(20, 40, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Expanding); vboxLayout2->addItem(spacerItem1); upButton = new QToolButton(groupBox); - upButton->setObjectName(QString::fromUtf8("upButton")); + upButton->setObjectName("upButton"); vboxLayout2->addWidget(upButton); downButton = new QToolButton(groupBox); - downButton->setObjectName(QString::fromUtf8("downButton")); + downButton->setObjectName("downButton"); vboxLayout2->addWidget(downButton); - spacerItem2 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem2 = new QSpacerItem(20, 40, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Expanding); vboxLayout2->addItem(spacerItem2); @@ -187,7 +165,7 @@ public: gridLayout->addLayout(vboxLayout2, 0, 1, 1, 1); listView = new QListView(groupBox); - listView->setObjectName(QString::fromUtf8("listView")); + listView->setObjectName("listView"); gridLayout->addWidget(listView, 0, 0, 1, 1); @@ -195,44 +173,44 @@ public: vboxLayout->addWidget(groupBox); buttonBox = new QDialogButtonBox(qdesigner_internal__Dialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName("buttonBox"); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok); vboxLayout->addWidget(buttonBox); -#ifndef QT_NO_SHORTCUT +#if QT_CONFIG(shortcut) label->setBuddy(valueEdit); -#endif // QT_NO_SHORTCUT +#endif // QT_CONFIG(shortcut) retranslateUi(qdesigner_internal__Dialog); - QObject::connect(buttonBox, SIGNAL(accepted()), qdesigner_internal__Dialog, SLOT(accept())); - QObject::connect(buttonBox, SIGNAL(rejected()), qdesigner_internal__Dialog, SLOT(reject())); + QObject::connect(buttonBox, &QDialogButtonBox::accepted, qdesigner_internal__Dialog, qOverload<>(&QDialog::accept)); + QObject::connect(buttonBox, &QDialogButtonBox::rejected, qdesigner_internal__Dialog, qOverload<>(&QDialog::reject)); QMetaObject::connectSlotsByName(qdesigner_internal__Dialog); } // setupUi void retranslateUi(QDialog *qdesigner_internal__Dialog) { - qdesigner_internal__Dialog->setWindowTitle(QApplication::translate("qdesigner_internal::Dialog", "Dialog", nullptr)); - groupBox->setTitle(QApplication::translate("qdesigner_internal::Dialog", "StringList", nullptr)); -#ifndef QT_NO_TOOLTIP - newButton->setToolTip(QApplication::translate("qdesigner_internal::Dialog", "New String", nullptr)); -#endif // QT_NO_TOOLTIP - newButton->setText(QApplication::translate("qdesigner_internal::Dialog", "&New", nullptr)); -#ifndef QT_NO_TOOLTIP - deleteButton->setToolTip(QApplication::translate("qdesigner_internal::Dialog", "Delete String", nullptr)); -#endif // QT_NO_TOOLTIP - deleteButton->setText(QApplication::translate("qdesigner_internal::Dialog", "&Delete", nullptr)); - label->setText(QApplication::translate("qdesigner_internal::Dialog", "&Value:", nullptr)); -#ifndef QT_NO_TOOLTIP - upButton->setToolTip(QApplication::translate("qdesigner_internal::Dialog", "Move String Up", nullptr)); -#endif // QT_NO_TOOLTIP - upButton->setText(QApplication::translate("qdesigner_internal::Dialog", "Up", nullptr)); -#ifndef QT_NO_TOOLTIP - downButton->setToolTip(QApplication::translate("qdesigner_internal::Dialog", "Move String Down", nullptr)); -#endif // QT_NO_TOOLTIP - downButton->setText(QApplication::translate("qdesigner_internal::Dialog", "Down", nullptr)); + qdesigner_internal__Dialog->setWindowTitle(QCoreApplication::translate("qdesigner_internal::Dialog", "Dialog", nullptr)); + groupBox->setTitle(QCoreApplication::translate("qdesigner_internal::Dialog", "StringList", nullptr)); +#if QT_CONFIG(tooltip) + newButton->setToolTip(QCoreApplication::translate("qdesigner_internal::Dialog", "New String", nullptr)); +#endif // QT_CONFIG(tooltip) + newButton->setText(QCoreApplication::translate("qdesigner_internal::Dialog", "&New", nullptr)); +#if QT_CONFIG(tooltip) + deleteButton->setToolTip(QCoreApplication::translate("qdesigner_internal::Dialog", "Delete String", nullptr)); +#endif // QT_CONFIG(tooltip) + deleteButton->setText(QCoreApplication::translate("qdesigner_internal::Dialog", "&Delete", nullptr)); + label->setText(QCoreApplication::translate("qdesigner_internal::Dialog", "&Value:", nullptr)); +#if QT_CONFIG(tooltip) + upButton->setToolTip(QCoreApplication::translate("qdesigner_internal::Dialog", "Move String Up", nullptr)); +#endif // QT_CONFIG(tooltip) + upButton->setText(QCoreApplication::translate("qdesigner_internal::Dialog", "Up", nullptr)); +#if QT_CONFIG(tooltip) + downButton->setToolTip(QCoreApplication::translate("qdesigner_internal::Dialog", "Move String Down", nullptr)); +#endif // QT_CONFIG(tooltip) + downButton->setText(QCoreApplication::translate("qdesigner_internal::Dialog", "Down", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/stylesheeteditor.ui b/tests/auto/tools/uic/baseline/stylesheeteditor.ui index 34cd7f6d04..42581ef8d3 100644 --- a/tests/auto/tools/uic/baseline/stylesheeteditor.ui +++ b/tests/auto/tools/uic/baseline/stylesheeteditor.ui @@ -25,7 +25,7 @@ <enum>Qt::Horizontal</enum> </property> <property name="sizeType" > - <enum>QSizePolicy::MinimumExpanding</enum> + <enum>QSizePolicy::Policy::MinimumExpanding</enum> </property> <property name="sizeHint" > <size> @@ -41,7 +41,7 @@ <enum>Qt::Horizontal</enum> </property> <property name="sizeType" > - <enum>QSizePolicy::MinimumExpanding</enum> + <enum>QSizePolicy::Policy::MinimumExpanding</enum> </property> <property name="sizeHint" > <size> @@ -76,7 +76,7 @@ <enum>Qt::Horizontal</enum> </property> <property name="sizeType" > - <enum>QSizePolicy::Fixed</enum> + <enum>QSizePolicy::Policy::Fixed</enum> </property> <property name="sizeHint" > <size> diff --git a/tests/auto/tools/uic/baseline/stylesheeteditor.ui.h b/tests/auto/tools/uic/baseline/stylesheeteditor.ui.h index 5ae254ebab..3a031ed609 100644 --- a/tests/auto/tools/uic/baseline/stylesheeteditor.ui.h +++ b/tests/auto/tools/uic/baseline/stylesheeteditor.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'stylesheeteditor.ui' ** -** Created by: Qt User Interface Compiler version 5.10.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -41,7 +41,7 @@ public: void setupUi(QWidget *StyleSheetEditor) { if (StyleSheetEditor->objectName().isEmpty()) - StyleSheetEditor->setObjectName(QString::fromUtf8("StyleSheetEditor")); + StyleSheetEditor->setObjectName("StyleSheetEditor"); StyleSheetEditor->resize(445, 289); gridLayout = new QGridLayout(StyleSheetEditor); #ifndef Q_OS_MAC @@ -50,12 +50,12 @@ public: #ifndef Q_OS_MAC gridLayout->setContentsMargins(9, 9, 9, 9); #endif - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); - spacerItem = new QSpacerItem(32, 20, QSizePolicy::MinimumExpanding, QSizePolicy::Minimum); + gridLayout->setObjectName("gridLayout"); + spacerItem = new QSpacerItem(32, 20, QSizePolicy::Policy::MinimumExpanding, QSizePolicy::Policy::Minimum); gridLayout->addItem(spacerItem, 0, 6, 1, 1); - spacerItem1 = new QSpacerItem(32, 20, QSizePolicy::MinimumExpanding, QSizePolicy::Minimum); + spacerItem1 = new QSpacerItem(32, 20, QSizePolicy::Policy::MinimumExpanding, QSizePolicy::Policy::Minimum); gridLayout->addItem(spacerItem1, 0, 0, 1, 1); @@ -63,17 +63,17 @@ public: styleSheetCombo->addItem(QString()); styleSheetCombo->addItem(QString()); styleSheetCombo->addItem(QString()); - styleSheetCombo->setObjectName(QString::fromUtf8("styleSheetCombo")); + styleSheetCombo->setObjectName("styleSheetCombo"); gridLayout->addWidget(styleSheetCombo, 0, 5, 1, 1); - spacerItem2 = new QSpacerItem(10, 16, QSizePolicy::Fixed, QSizePolicy::Minimum); + spacerItem2 = new QSpacerItem(10, 16, QSizePolicy::Policy::Fixed, QSizePolicy::Policy::Minimum); gridLayout->addItem(spacerItem2, 0, 3, 1, 1); styleCombo = new QComboBox(StyleSheetEditor); - styleCombo->setObjectName(QString::fromUtf8("styleCombo")); - QSizePolicy sizePolicy(static_cast<QSizePolicy::Policy>(5), static_cast<QSizePolicy::Policy>(0)); + styleCombo->setObjectName("styleCombo"); + QSizePolicy sizePolicy(QSizePolicy::Policy::Preferred, QSizePolicy::Policy::Fixed); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); sizePolicy.setHeightForWidth(styleCombo->sizePolicy().hasHeightForWidth()); @@ -82,8 +82,8 @@ public: gridLayout->addWidget(styleCombo, 0, 2, 1, 1); label_7 = new QLabel(StyleSheetEditor); - label_7->setObjectName(QString::fromUtf8("label_7")); - QSizePolicy sizePolicy1(static_cast<QSizePolicy::Policy>(0), static_cast<QSizePolicy::Policy>(5)); + label_7->setObjectName("label_7"); + QSizePolicy sizePolicy1(QSizePolicy::Policy::Fixed, QSizePolicy::Policy::Preferred); sizePolicy1.setHorizontalStretch(0); sizePolicy1.setVerticalStretch(0); sizePolicy1.setHeightForWidth(label_7->sizePolicy().hasHeightForWidth()); @@ -96,13 +96,13 @@ public: hboxLayout->setSpacing(6); #endif hboxLayout->setContentsMargins(0, 0, 0, 0); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); - spacerItem3 = new QSpacerItem(321, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + hboxLayout->setObjectName("hboxLayout"); + spacerItem3 = new QSpacerItem(321, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); hboxLayout->addItem(spacerItem3); applyButton = new QPushButton(StyleSheetEditor); - applyButton->setObjectName(QString::fromUtf8("applyButton")); + applyButton->setObjectName("applyButton"); applyButton->setEnabled(false); hboxLayout->addWidget(applyButton); @@ -111,12 +111,12 @@ public: gridLayout->addLayout(hboxLayout, 2, 0, 1, 7); styleTextEdit = new QTextEdit(StyleSheetEditor); - styleTextEdit->setObjectName(QString::fromUtf8("styleTextEdit")); + styleTextEdit->setObjectName("styleTextEdit"); gridLayout->addWidget(styleTextEdit, 1, 0, 1, 7); label_8 = new QLabel(StyleSheetEditor); - label_8->setObjectName(QString::fromUtf8("label_8")); + label_8->setObjectName("label_8"); sizePolicy1.setHeightForWidth(label_8->sizePolicy().hasHeightForWidth()); label_8->setSizePolicy(sizePolicy1); @@ -130,14 +130,14 @@ public: void retranslateUi(QWidget *StyleSheetEditor) { - StyleSheetEditor->setWindowTitle(QApplication::translate("StyleSheetEditor", "Style Editor", nullptr)); - styleSheetCombo->setItemText(0, QApplication::translate("StyleSheetEditor", "Default", nullptr)); - styleSheetCombo->setItemText(1, QApplication::translate("StyleSheetEditor", "Coffee", nullptr)); - styleSheetCombo->setItemText(2, QApplication::translate("StyleSheetEditor", "Pagefold", nullptr)); - - label_7->setText(QApplication::translate("StyleSheetEditor", "Style:", nullptr)); - applyButton->setText(QApplication::translate("StyleSheetEditor", "&Apply", nullptr)); - label_8->setText(QApplication::translate("StyleSheetEditor", "Style Sheet:", nullptr)); + StyleSheetEditor->setWindowTitle(QCoreApplication::translate("StyleSheetEditor", "Style Editor", nullptr)); + styleSheetCombo->setItemText(0, QCoreApplication::translate("StyleSheetEditor", "Default", nullptr)); + styleSheetCombo->setItemText(1, QCoreApplication::translate("StyleSheetEditor", "Coffee", nullptr)); + styleSheetCombo->setItemText(2, QCoreApplication::translate("StyleSheetEditor", "Pagefold", nullptr)); + + label_7->setText(QCoreApplication::translate("StyleSheetEditor", "Style:", nullptr)); + applyButton->setText(QCoreApplication::translate("StyleSheetEditor", "&Apply", nullptr)); + label_8->setText(QCoreApplication::translate("StyleSheetEditor", "Style Sheet:", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/tabbedbrowser.ui b/tests/auto/tools/uic/baseline/tabbedbrowser.ui index e3682e62ef..a8b1ff7c78 100644 --- a/tests/auto/tools/uic/baseline/tabbedbrowser.ui +++ b/tests/auto/tools/uic/baseline/tabbedbrowser.ui @@ -1,32 +1,8 @@ <ui version="4.0" > - <author></author> - <comment>********************************************************************* -** -** 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$ -** -*********************************************************************</comment> +<comment> +* Copyright (C) 2016 The Qt Company Ltd. +* SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +</comment> <exportmacro></exportmacro> <class>TabbedBrowser</class> <widget class="QWidget" name="TabbedBrowser" > diff --git a/tests/auto/tools/uic/baseline/tabbedbrowser.ui.h b/tests/auto/tools/uic/baseline/tabbedbrowser.ui.h index 09b230f5df..638c4d8111 100644 --- a/tests/auto/tools/uic/baseline/tabbedbrowser.ui.h +++ b/tests/auto/tools/uic/baseline/tabbedbrowser.ui.h @@ -1,37 +1,14 @@ /* -********************************************************************* -** -** 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$ -** -********************************************************************* + +* Copyright (C) 2016 The Qt Company Ltd. +* SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + */ /******************************************************************************** ** Form generated from reading UI file 'tabbedbrowser.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -77,28 +54,28 @@ public: void setupUi(QWidget *TabbedBrowser) { if (TabbedBrowser->objectName().isEmpty()) - TabbedBrowser->setObjectName(QString::fromUtf8("TabbedBrowser")); + TabbedBrowser->setObjectName("TabbedBrowser"); TabbedBrowser->resize(710, 664); vboxLayout = new QVBoxLayout(TabbedBrowser); vboxLayout->setSpacing(0); vboxLayout->setContentsMargins(0, 0, 0, 0); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); tab = new QTabWidget(TabbedBrowser); - tab->setObjectName(QString::fromUtf8("tab")); + tab->setObjectName("tab"); frontpage = new QWidget(); - frontpage->setObjectName(QString::fromUtf8("frontpage")); + frontpage->setObjectName("frontpage"); gridLayout = new QGridLayout(frontpage); #ifndef Q_OS_MAC gridLayout->setSpacing(6); #endif gridLayout->setContentsMargins(8, 8, 8, 8); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); tab->addTab(frontpage, QString()); vboxLayout->addWidget(tab); frameFind = new QFrame(TabbedBrowser); - frameFind->setObjectName(QString::fromUtf8("frameFind")); + frameFind->setObjectName("frameFind"); frameFind->setFrameShape(QFrame::StyledPanel); frameFind->setFrameShadow(QFrame::Raised); hboxLayout = new QHBoxLayout(frameFind); @@ -106,9 +83,9 @@ public: hboxLayout->setSpacing(6); #endif hboxLayout->setContentsMargins(0, 0, 0, 0); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName("hboxLayout"); toolClose = new QToolButton(frameFind); - toolClose->setObjectName(QString::fromUtf8("toolClose")); + toolClose->setObjectName("toolClose"); const QIcon icon = QIcon(QString::fromUtf8(":/qt-project.org/assistant/images/close.png")); toolClose->setIcon(icon); toolClose->setAutoRaise(true); @@ -116,8 +93,8 @@ public: hboxLayout->addWidget(toolClose); editFind = new QLineEdit(frameFind); - editFind->setObjectName(QString::fromUtf8("editFind")); - QSizePolicy sizePolicy(static_cast<QSizePolicy::Policy>(0), static_cast<QSizePolicy::Policy>(0)); + editFind->setObjectName("editFind"); + QSizePolicy sizePolicy(QSizePolicy::Policy::Fixed, QSizePolicy::Policy::Fixed); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); sizePolicy.setHeightForWidth(editFind->sizePolicy().hasHeightForWidth()); @@ -127,7 +104,7 @@ public: hboxLayout->addWidget(editFind); toolPrevious = new QToolButton(frameFind); - toolPrevious->setObjectName(QString::fromUtf8("toolPrevious")); + toolPrevious->setObjectName("toolPrevious"); const QIcon icon1 = QIcon(QString::fromUtf8(":/qt-project.org/assistant/images/win/previous.png")); toolPrevious->setIcon(icon1); toolPrevious->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); @@ -136,7 +113,7 @@ public: hboxLayout->addWidget(toolPrevious); toolNext = new QToolButton(frameFind); - toolNext->setObjectName(QString::fromUtf8("toolNext")); + toolNext->setObjectName("toolNext"); toolNext->setMinimumSize(QSize(0, 0)); const QIcon icon2 = QIcon(QString::fromUtf8(":/qt-project.org/assistant/images/win/next.png")); toolNext->setIcon(icon2); @@ -147,17 +124,17 @@ public: hboxLayout->addWidget(toolNext); checkCase = new QCheckBox(frameFind); - checkCase->setObjectName(QString::fromUtf8("checkCase")); + checkCase->setObjectName("checkCase"); hboxLayout->addWidget(checkCase); checkWholeWords = new QCheckBox(frameFind); - checkWholeWords->setObjectName(QString::fromUtf8("checkWholeWords")); + checkWholeWords->setObjectName("checkWholeWords"); hboxLayout->addWidget(checkWholeWords); labelWrapped = new QLabel(frameFind); - labelWrapped->setObjectName(QString::fromUtf8("labelWrapped")); + labelWrapped->setObjectName("labelWrapped"); labelWrapped->setMinimumSize(QSize(0, 20)); labelWrapped->setMaximumSize(QSize(105, 20)); labelWrapped->setTextFormat(Qt::RichText); @@ -166,7 +143,7 @@ public: hboxLayout->addWidget(labelWrapped); - spacerItem = new QSpacerItem(81, 21, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacerItem = new QSpacerItem(81, 21, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); hboxLayout->addItem(spacerItem); @@ -181,14 +158,14 @@ public: void retranslateUi(QWidget *TabbedBrowser) { - TabbedBrowser->setWindowTitle(QApplication::translate("TabbedBrowser", "TabbedBrowser", nullptr)); - tab->setTabText(tab->indexOf(frontpage), QApplication::translate("TabbedBrowser", "Untitled", nullptr)); + TabbedBrowser->setWindowTitle(QCoreApplication::translate("TabbedBrowser", "TabbedBrowser", nullptr)); + tab->setTabText(tab->indexOf(frontpage), QCoreApplication::translate("TabbedBrowser", "Untitled", nullptr)); toolClose->setText(QString()); - toolPrevious->setText(QApplication::translate("TabbedBrowser", "Previous", nullptr)); - toolNext->setText(QApplication::translate("TabbedBrowser", "Next", nullptr)); - checkCase->setText(QApplication::translate("TabbedBrowser", "Case Sensitive", nullptr)); - checkWholeWords->setText(QApplication::translate("TabbedBrowser", "Whole words", nullptr)); - labelWrapped->setText(QApplication::translate("TabbedBrowser", "<img src=\":/qt-project.org/assistant/images/wrap.png\"> Search wrapped", nullptr)); + toolPrevious->setText(QCoreApplication::translate("TabbedBrowser", "Previous", nullptr)); + toolNext->setText(QCoreApplication::translate("TabbedBrowser", "Next", nullptr)); + checkCase->setText(QCoreApplication::translate("TabbedBrowser", "Case Sensitive", nullptr)); + checkWholeWords->setText(QCoreApplication::translate("TabbedBrowser", "Whole words", nullptr)); + labelWrapped->setText(QCoreApplication::translate("TabbedBrowser", "<img src=\":/qt-project.org/assistant/images/wrap.png\"> Search wrapped", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/tablewidgeteditor.ui b/tests/auto/tools/uic/baseline/tablewidgeteditor.ui index a49dd66a90..8e173d5085 100644 --- a/tests/auto/tools/uic/baseline/tablewidgeteditor.ui +++ b/tests/auto/tools/uic/baseline/tablewidgeteditor.ui @@ -1,31 +1,8 @@ <ui version="4.0" > - <comment>********************************************************************* -** -** 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$ -** -*********************************************************************</comment> +<comment> +* Copyright (C) 2016 The Qt Company Ltd. +* SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +</comment> <class>qdesigner_internal::TableWidgetEditor</class> <widget class="QDialog" name="qdesigner_internal::TableWidgetEditor" > <property name="geometry" > diff --git a/tests/auto/tools/uic/baseline/tablewidgeteditor.ui.h b/tests/auto/tools/uic/baseline/tablewidgeteditor.ui.h index e3ba00095e..fa2c627f17 100644 --- a/tests/auto/tools/uic/baseline/tablewidgeteditor.ui.h +++ b/tests/auto/tools/uic/baseline/tablewidgeteditor.ui.h @@ -1,37 +1,14 @@ /* -********************************************************************* -** -** 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$ -** -********************************************************************* + +* Copyright (C) 2016 The Qt Company Ltd. +* SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + */ /******************************************************************************** ** Form generated from reading UI file 'tablewidgeteditor.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -40,6 +17,7 @@ #define TABLEWIDGETEDITOR_H #include <QtCore/QVariant> +#include <QtWidgets/QAbstractButton> #include <QtWidgets/QApplication> #include <QtWidgets/QDialog> #include <QtWidgets/QDialogButtonBox> @@ -104,32 +82,32 @@ public: void setupUi(QDialog *qdesigner_internal__TableWidgetEditor) { if (qdesigner_internal__TableWidgetEditor->objectName().isEmpty()) - qdesigner_internal__TableWidgetEditor->setObjectName(QString::fromUtf8("qdesigner_internal__TableWidgetEditor")); + qdesigner_internal__TableWidgetEditor->setObjectName("qdesigner_internal__TableWidgetEditor"); qdesigner_internal__TableWidgetEditor->resize(591, 455); gridLayout_4 = new QGridLayout(qdesigner_internal__TableWidgetEditor); - gridLayout_4->setObjectName(QString::fromUtf8("gridLayout_4")); + gridLayout_4->setObjectName("gridLayout_4"); itemsBox = new QGroupBox(qdesigner_internal__TableWidgetEditor); - itemsBox->setObjectName(QString::fromUtf8("itemsBox")); + itemsBox->setObjectName("itemsBox"); gridLayout = new QGridLayout(itemsBox); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); tableWidget = new QTableWidget(itemsBox); - tableWidget->setObjectName(QString::fromUtf8("tableWidget")); + tableWidget->setObjectName("tableWidget"); gridLayout->addWidget(tableWidget, 0, 0, 1, 1); horizontalLayout_5 = new QHBoxLayout(); - horizontalLayout_5->setObjectName(QString::fromUtf8("horizontalLayout_5")); + horizontalLayout_5->setObjectName("horizontalLayout_5"); label_3 = new QLabel(itemsBox); - label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setObjectName("label_3"); horizontalLayout_5->addWidget(label_3); itemIconSelector = new qdesigner_internal::IconSelector(itemsBox); - itemIconSelector->setObjectName(QString::fromUtf8("itemIconSelector")); + itemIconSelector->setObjectName("itemIconSelector"); horizontalLayout_5->addWidget(itemIconSelector); - horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); horizontalLayout_5->addItem(horizontalSpacer); @@ -140,29 +118,29 @@ public: gridLayout_4->addWidget(itemsBox, 0, 0, 1, 1); buttonBox = new QDialogButtonBox(qdesigner_internal__TableWidgetEditor); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName("buttonBox"); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); gridLayout_4->addWidget(buttonBox, 1, 0, 1, 2); widget = new QWidget(qdesigner_internal__TableWidgetEditor); - widget->setObjectName(QString::fromUtf8("widget")); - QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred); + widget->setObjectName("widget"); + QSizePolicy sizePolicy(QSizePolicy::Policy::Fixed, QSizePolicy::Policy::Preferred); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); sizePolicy.setHeightForWidth(widget->sizePolicy().hasHeightForWidth()); widget->setSizePolicy(sizePolicy); verticalLayout = new QVBoxLayout(widget); verticalLayout->setContentsMargins(0, 0, 0, 0); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + verticalLayout->setObjectName("verticalLayout"); columnsBox = new QGroupBox(widget); - columnsBox->setObjectName(QString::fromUtf8("columnsBox")); + columnsBox->setObjectName("columnsBox"); gridLayout_2 = new QGridLayout(columnsBox); - gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2")); + gridLayout_2->setObjectName("gridLayout_2"); columnsListWidget = new QListWidget(columnsBox); - columnsListWidget->setObjectName(QString::fromUtf8("columnsListWidget")); - QSizePolicy sizePolicy1(QSizePolicy::Ignored, QSizePolicy::Expanding); + columnsListWidget->setObjectName("columnsListWidget"); + QSizePolicy sizePolicy1(QSizePolicy::Policy::Ignored, QSizePolicy::Policy::Expanding); sizePolicy1.setHorizontalStretch(0); sizePolicy1.setVerticalStretch(0); sizePolicy1.setHeightForWidth(columnsListWidget->sizePolicy().hasHeightForWidth()); @@ -172,28 +150,28 @@ public: gridLayout_2->addWidget(columnsListWidget, 0, 0, 1, 1); horizontalLayout_3 = new QHBoxLayout(); - horizontalLayout_3->setObjectName(QString::fromUtf8("horizontalLayout_3")); + horizontalLayout_3->setObjectName("horizontalLayout_3"); newColumnButton = new QToolButton(columnsBox); - newColumnButton->setObjectName(QString::fromUtf8("newColumnButton")); + newColumnButton->setObjectName("newColumnButton"); horizontalLayout_3->addWidget(newColumnButton); deleteColumnButton = new QToolButton(columnsBox); - deleteColumnButton->setObjectName(QString::fromUtf8("deleteColumnButton")); + deleteColumnButton->setObjectName("deleteColumnButton"); horizontalLayout_3->addWidget(deleteColumnButton); - spacerItem = new QSpacerItem(0, 23, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacerItem = new QSpacerItem(0, 23, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); horizontalLayout_3->addItem(spacerItem); moveColumnUpButton = new QToolButton(columnsBox); - moveColumnUpButton->setObjectName(QString::fromUtf8("moveColumnUpButton")); + moveColumnUpButton->setObjectName("moveColumnUpButton"); horizontalLayout_3->addWidget(moveColumnUpButton); moveColumnDownButton = new QToolButton(columnsBox); - moveColumnDownButton->setObjectName(QString::fromUtf8("moveColumnDownButton")); + moveColumnDownButton->setObjectName("moveColumnDownButton"); horizontalLayout_3->addWidget(moveColumnDownButton); @@ -201,18 +179,18 @@ public: gridLayout_2->addLayout(horizontalLayout_3, 1, 0, 1, 1); horizontalLayout_2 = new QHBoxLayout(); - horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2")); + horizontalLayout_2->setObjectName("horizontalLayout_2"); label = new QLabel(columnsBox); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName("label"); horizontalLayout_2->addWidget(label); columnIconSelector = new qdesigner_internal::IconSelector(columnsBox); - columnIconSelector->setObjectName(QString::fromUtf8("columnIconSelector")); + columnIconSelector->setObjectName("columnIconSelector"); horizontalLayout_2->addWidget(columnIconSelector); - spacerItem1 = new QSpacerItem(0, 21, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacerItem1 = new QSpacerItem(0, 21, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); horizontalLayout_2->addItem(spacerItem1); @@ -223,11 +201,11 @@ public: verticalLayout->addWidget(columnsBox); rowsBox = new QGroupBox(widget); - rowsBox->setObjectName(QString::fromUtf8("rowsBox")); + rowsBox->setObjectName("rowsBox"); gridLayout_3 = new QGridLayout(rowsBox); - gridLayout_3->setObjectName(QString::fromUtf8("gridLayout_3")); + gridLayout_3->setObjectName("gridLayout_3"); rowsListWidget = new QListWidget(rowsBox); - rowsListWidget->setObjectName(QString::fromUtf8("rowsListWidget")); + rowsListWidget->setObjectName("rowsListWidget"); sizePolicy1.setHeightForWidth(rowsListWidget->sizePolicy().hasHeightForWidth()); rowsListWidget->setSizePolicy(sizePolicy1); rowsListWidget->setFocusPolicy(Qt::TabFocus); @@ -235,28 +213,28 @@ public: gridLayout_3->addWidget(rowsListWidget, 0, 0, 1, 1); horizontalLayout_4 = new QHBoxLayout(); - horizontalLayout_4->setObjectName(QString::fromUtf8("horizontalLayout_4")); + horizontalLayout_4->setObjectName("horizontalLayout_4"); newRowButton = new QToolButton(rowsBox); - newRowButton->setObjectName(QString::fromUtf8("newRowButton")); + newRowButton->setObjectName("newRowButton"); horizontalLayout_4->addWidget(newRowButton); deleteRowButton = new QToolButton(rowsBox); - deleteRowButton->setObjectName(QString::fromUtf8("deleteRowButton")); + deleteRowButton->setObjectName("deleteRowButton"); horizontalLayout_4->addWidget(deleteRowButton); - spacerItem2 = new QSpacerItem(0, 23, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacerItem2 = new QSpacerItem(0, 23, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); horizontalLayout_4->addItem(spacerItem2); moveRowUpButton = new QToolButton(rowsBox); - moveRowUpButton->setObjectName(QString::fromUtf8("moveRowUpButton")); + moveRowUpButton->setObjectName("moveRowUpButton"); horizontalLayout_4->addWidget(moveRowUpButton); moveRowDownButton = new QToolButton(rowsBox); - moveRowDownButton->setObjectName(QString::fromUtf8("moveRowDownButton")); + moveRowDownButton->setObjectName("moveRowDownButton"); horizontalLayout_4->addWidget(moveRowDownButton); @@ -264,18 +242,18 @@ public: gridLayout_3->addLayout(horizontalLayout_4, 1, 0, 1, 1); horizontalLayout = new QHBoxLayout(); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); + horizontalLayout->setObjectName("horizontalLayout"); label_2 = new QLabel(rowsBox); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName("label_2"); horizontalLayout->addWidget(label_2); rowIconSelector = new qdesigner_internal::IconSelector(rowsBox); - rowIconSelector->setObjectName(QString::fromUtf8("rowIconSelector")); + rowIconSelector->setObjectName("rowIconSelector"); horizontalLayout->addWidget(rowIconSelector); - spacerItem3 = new QSpacerItem(0, 21, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacerItem3 = new QSpacerItem(0, 21, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); horizontalLayout->addItem(spacerItem3); @@ -303,62 +281,62 @@ public: QWidget::setTabOrder(moveRowUpButton, moveRowDownButton); retranslateUi(qdesigner_internal__TableWidgetEditor); - QObject::connect(buttonBox, SIGNAL(accepted()), qdesigner_internal__TableWidgetEditor, SLOT(accept())); - QObject::connect(buttonBox, SIGNAL(rejected()), qdesigner_internal__TableWidgetEditor, SLOT(reject())); + QObject::connect(buttonBox, &QDialogButtonBox::accepted, qdesigner_internal__TableWidgetEditor, qOverload<>(&QDialog::accept)); + QObject::connect(buttonBox, &QDialogButtonBox::rejected, qdesigner_internal__TableWidgetEditor, qOverload<>(&QDialog::reject)); QMetaObject::connectSlotsByName(qdesigner_internal__TableWidgetEditor); } // setupUi void retranslateUi(QDialog *qdesigner_internal__TableWidgetEditor) { - qdesigner_internal__TableWidgetEditor->setWindowTitle(QApplication::translate("qdesigner_internal::TableWidgetEditor", "Edit Table Widget", nullptr)); - itemsBox->setTitle(QApplication::translate("qdesigner_internal::TableWidgetEditor", "Table Items", nullptr)); -#ifndef QT_NO_TOOLTIP - tableWidget->setToolTip(QApplication::translate("qdesigner_internal::TableWidgetEditor", "Table Items", nullptr)); -#endif // QT_NO_TOOLTIP - label_3->setText(QApplication::translate("qdesigner_internal::TableWidgetEditor", "Icon", nullptr)); - columnsBox->setTitle(QApplication::translate("qdesigner_internal::TableWidgetEditor", "Columns", nullptr)); -#ifndef QT_NO_TOOLTIP - columnsListWidget->setToolTip(QApplication::translate("qdesigner_internal::TableWidgetEditor", "Table Columns", nullptr)); -#endif // QT_NO_TOOLTIP -#ifndef QT_NO_TOOLTIP - newColumnButton->setToolTip(QApplication::translate("qdesigner_internal::TableWidgetEditor", "New Column", nullptr)); -#endif // QT_NO_TOOLTIP - newColumnButton->setText(QApplication::translate("qdesigner_internal::TableWidgetEditor", "New", nullptr)); -#ifndef QT_NO_TOOLTIP - deleteColumnButton->setToolTip(QApplication::translate("qdesigner_internal::TableWidgetEditor", "Delete Column", nullptr)); -#endif // QT_NO_TOOLTIP - deleteColumnButton->setText(QApplication::translate("qdesigner_internal::TableWidgetEditor", "Delete", nullptr)); -#ifndef QT_NO_TOOLTIP - moveColumnUpButton->setToolTip(QApplication::translate("qdesigner_internal::TableWidgetEditor", "Move Column Up", nullptr)); -#endif // QT_NO_TOOLTIP - moveColumnUpButton->setText(QApplication::translate("qdesigner_internal::TableWidgetEditor", "U", nullptr)); -#ifndef QT_NO_TOOLTIP - moveColumnDownButton->setToolTip(QApplication::translate("qdesigner_internal::TableWidgetEditor", "Move Column Down", nullptr)); -#endif // QT_NO_TOOLTIP - moveColumnDownButton->setText(QApplication::translate("qdesigner_internal::TableWidgetEditor", "D", nullptr)); - label->setText(QApplication::translate("qdesigner_internal::TableWidgetEditor", "Icon", nullptr)); - rowsBox->setTitle(QApplication::translate("qdesigner_internal::TableWidgetEditor", "Rows", nullptr)); -#ifndef QT_NO_TOOLTIP - rowsListWidget->setToolTip(QApplication::translate("qdesigner_internal::TableWidgetEditor", "Table Rows", nullptr)); -#endif // QT_NO_TOOLTIP -#ifndef QT_NO_TOOLTIP - newRowButton->setToolTip(QApplication::translate("qdesigner_internal::TableWidgetEditor", "New Row", nullptr)); -#endif // QT_NO_TOOLTIP - newRowButton->setText(QApplication::translate("qdesigner_internal::TableWidgetEditor", "New", nullptr)); -#ifndef QT_NO_TOOLTIP - deleteRowButton->setToolTip(QApplication::translate("qdesigner_internal::TableWidgetEditor", "Delete Row", nullptr)); -#endif // QT_NO_TOOLTIP - deleteRowButton->setText(QApplication::translate("qdesigner_internal::TableWidgetEditor", "Delete", nullptr)); -#ifndef QT_NO_TOOLTIP - moveRowUpButton->setToolTip(QApplication::translate("qdesigner_internal::TableWidgetEditor", "Move Row Up", nullptr)); -#endif // QT_NO_TOOLTIP - moveRowUpButton->setText(QApplication::translate("qdesigner_internal::TableWidgetEditor", "U", nullptr)); -#ifndef QT_NO_TOOLTIP - moveRowDownButton->setToolTip(QApplication::translate("qdesigner_internal::TableWidgetEditor", "Move Row Down", nullptr)); -#endif // QT_NO_TOOLTIP - moveRowDownButton->setText(QApplication::translate("qdesigner_internal::TableWidgetEditor", "D", nullptr)); - label_2->setText(QApplication::translate("qdesigner_internal::TableWidgetEditor", "Icon", nullptr)); + qdesigner_internal__TableWidgetEditor->setWindowTitle(QCoreApplication::translate("qdesigner_internal::TableWidgetEditor", "Edit Table Widget", nullptr)); + itemsBox->setTitle(QCoreApplication::translate("qdesigner_internal::TableWidgetEditor", "Table Items", nullptr)); +#if QT_CONFIG(tooltip) + tableWidget->setToolTip(QCoreApplication::translate("qdesigner_internal::TableWidgetEditor", "Table Items", nullptr)); +#endif // QT_CONFIG(tooltip) + label_3->setText(QCoreApplication::translate("qdesigner_internal::TableWidgetEditor", "Icon", nullptr)); + columnsBox->setTitle(QCoreApplication::translate("qdesigner_internal::TableWidgetEditor", "Columns", nullptr)); +#if QT_CONFIG(tooltip) + columnsListWidget->setToolTip(QCoreApplication::translate("qdesigner_internal::TableWidgetEditor", "Table Columns", nullptr)); +#endif // QT_CONFIG(tooltip) +#if QT_CONFIG(tooltip) + newColumnButton->setToolTip(QCoreApplication::translate("qdesigner_internal::TableWidgetEditor", "New Column", nullptr)); +#endif // QT_CONFIG(tooltip) + newColumnButton->setText(QCoreApplication::translate("qdesigner_internal::TableWidgetEditor", "New", nullptr)); +#if QT_CONFIG(tooltip) + deleteColumnButton->setToolTip(QCoreApplication::translate("qdesigner_internal::TableWidgetEditor", "Delete Column", nullptr)); +#endif // QT_CONFIG(tooltip) + deleteColumnButton->setText(QCoreApplication::translate("qdesigner_internal::TableWidgetEditor", "Delete", nullptr)); +#if QT_CONFIG(tooltip) + moveColumnUpButton->setToolTip(QCoreApplication::translate("qdesigner_internal::TableWidgetEditor", "Move Column Up", nullptr)); +#endif // QT_CONFIG(tooltip) + moveColumnUpButton->setText(QCoreApplication::translate("qdesigner_internal::TableWidgetEditor", "U", nullptr)); +#if QT_CONFIG(tooltip) + moveColumnDownButton->setToolTip(QCoreApplication::translate("qdesigner_internal::TableWidgetEditor", "Move Column Down", nullptr)); +#endif // QT_CONFIG(tooltip) + moveColumnDownButton->setText(QCoreApplication::translate("qdesigner_internal::TableWidgetEditor", "D", nullptr)); + label->setText(QCoreApplication::translate("qdesigner_internal::TableWidgetEditor", "Icon", nullptr)); + rowsBox->setTitle(QCoreApplication::translate("qdesigner_internal::TableWidgetEditor", "Rows", nullptr)); +#if QT_CONFIG(tooltip) + rowsListWidget->setToolTip(QCoreApplication::translate("qdesigner_internal::TableWidgetEditor", "Table Rows", nullptr)); +#endif // QT_CONFIG(tooltip) +#if QT_CONFIG(tooltip) + newRowButton->setToolTip(QCoreApplication::translate("qdesigner_internal::TableWidgetEditor", "New Row", nullptr)); +#endif // QT_CONFIG(tooltip) + newRowButton->setText(QCoreApplication::translate("qdesigner_internal::TableWidgetEditor", "New", nullptr)); +#if QT_CONFIG(tooltip) + deleteRowButton->setToolTip(QCoreApplication::translate("qdesigner_internal::TableWidgetEditor", "Delete Row", nullptr)); +#endif // QT_CONFIG(tooltip) + deleteRowButton->setText(QCoreApplication::translate("qdesigner_internal::TableWidgetEditor", "Delete", nullptr)); +#if QT_CONFIG(tooltip) + moveRowUpButton->setToolTip(QCoreApplication::translate("qdesigner_internal::TableWidgetEditor", "Move Row Up", nullptr)); +#endif // QT_CONFIG(tooltip) + moveRowUpButton->setText(QCoreApplication::translate("qdesigner_internal::TableWidgetEditor", "U", nullptr)); +#if QT_CONFIG(tooltip) + moveRowDownButton->setToolTip(QCoreApplication::translate("qdesigner_internal::TableWidgetEditor", "Move Row Down", nullptr)); +#endif // QT_CONFIG(tooltip) + moveRowDownButton->setText(QCoreApplication::translate("qdesigner_internal::TableWidgetEditor", "D", nullptr)); + label_2->setText(QCoreApplication::translate("qdesigner_internal::TableWidgetEditor", "Icon", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/tetrixwindow.ui.h b/tests/auto/tools/uic/baseline/tetrixwindow.ui.h index dc1033ce3a..3f5ac396b1 100644 --- a/tests/auto/tools/uic/baseline/tetrixwindow.ui.h +++ b/tests/auto/tools/uic/baseline/tetrixwindow.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'tetrixwindow.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -42,7 +42,7 @@ public: void setupUi(QWidget *TetrixWindow) { if (TetrixWindow->objectName().isEmpty()) - TetrixWindow->setObjectName(QString::fromUtf8("TetrixWindow")); + TetrixWindow->setObjectName("TetrixWindow"); TetrixWindow->resize(537, 475); vboxLayout = new QVBoxLayout(TetrixWindow); #ifndef Q_OS_MAC @@ -51,7 +51,7 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); gridLayout = new QGridLayout(); #ifndef Q_OS_MAC gridLayout->setSpacing(6); @@ -59,39 +59,39 @@ public: #ifndef Q_OS_MAC gridLayout->setContentsMargins(0, 0, 0, 0); #endif - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); startButton = new QPushButton(TetrixWindow); - startButton->setObjectName(QString::fromUtf8("startButton")); + startButton->setObjectName("startButton"); startButton->setFocusPolicy(Qt::NoFocus); gridLayout->addWidget(startButton, 4, 0, 1, 1); linesLcd = new QLCDNumber(TetrixWindow); - linesLcd->setObjectName(QString::fromUtf8("linesLcd")); + linesLcd->setObjectName("linesLcd"); linesLcd->setSegmentStyle(QLCDNumber::Filled); gridLayout->addWidget(linesLcd, 3, 2, 1, 1); linesRemovedLabel = new QLabel(TetrixWindow); - linesRemovedLabel->setObjectName(QString::fromUtf8("linesRemovedLabel")); + linesRemovedLabel->setObjectName("linesRemovedLabel"); linesRemovedLabel->setAlignment(Qt::AlignBottom|Qt::AlignHCenter); gridLayout->addWidget(linesRemovedLabel, 2, 2, 1, 1); pauseButton = new QPushButton(TetrixWindow); - pauseButton->setObjectName(QString::fromUtf8("pauseButton")); + pauseButton->setObjectName("pauseButton"); pauseButton->setFocusPolicy(Qt::NoFocus); gridLayout->addWidget(pauseButton, 5, 2, 1, 1); scoreLcd = new QLCDNumber(TetrixWindow); - scoreLcd->setObjectName(QString::fromUtf8("scoreLcd")); + scoreLcd->setObjectName("scoreLcd"); scoreLcd->setSegmentStyle(QLCDNumber::Filled); gridLayout->addWidget(scoreLcd, 1, 2, 1, 1); board = new TetrixBoard(TetrixWindow); - board->setObjectName(QString::fromUtf8("board")); + board->setObjectName("board"); board->setFocusPolicy(Qt::StrongFocus); board->setFrameShape(QFrame::Panel); board->setFrameShadow(QFrame::Sunken); @@ -99,31 +99,31 @@ public: gridLayout->addWidget(board, 0, 1, 6, 1); levelLabel = new QLabel(TetrixWindow); - levelLabel->setObjectName(QString::fromUtf8("levelLabel")); + levelLabel->setObjectName("levelLabel"); levelLabel->setAlignment(Qt::AlignBottom|Qt::AlignHCenter); gridLayout->addWidget(levelLabel, 2, 0, 1, 1); nextLabel = new QLabel(TetrixWindow); - nextLabel->setObjectName(QString::fromUtf8("nextLabel")); + nextLabel->setObjectName("nextLabel"); nextLabel->setAlignment(Qt::AlignBottom|Qt::AlignHCenter); gridLayout->addWidget(nextLabel, 0, 0, 1, 1); levelLcd = new QLCDNumber(TetrixWindow); - levelLcd->setObjectName(QString::fromUtf8("levelLcd")); + levelLcd->setObjectName("levelLcd"); levelLcd->setSegmentStyle(QLCDNumber::Filled); gridLayout->addWidget(levelLcd, 3, 0, 1, 1); scoreLabel = new QLabel(TetrixWindow); - scoreLabel->setObjectName(QString::fromUtf8("scoreLabel")); + scoreLabel->setObjectName("scoreLabel"); scoreLabel->setAlignment(Qt::AlignBottom|Qt::AlignHCenter); gridLayout->addWidget(scoreLabel, 0, 2, 1, 1); nextPieceLabel = new QLabel(TetrixWindow); - nextPieceLabel->setObjectName(QString::fromUtf8("nextPieceLabel")); + nextPieceLabel->setObjectName("nextPieceLabel"); nextPieceLabel->setFrameShape(QFrame::Box); nextPieceLabel->setFrameShadow(QFrame::Raised); nextPieceLabel->setAlignment(Qt::AlignCenter); @@ -131,7 +131,7 @@ public: gridLayout->addWidget(nextPieceLabel, 1, 0, 1, 1); quitButton = new QPushButton(TetrixWindow); - quitButton->setObjectName(QString::fromUtf8("quitButton")); + quitButton->setObjectName("quitButton"); quitButton->setFocusPolicy(Qt::NoFocus); gridLayout->addWidget(quitButton, 4, 2, 1, 1); @@ -147,15 +147,15 @@ public: void retranslateUi(QWidget *TetrixWindow) { - TetrixWindow->setWindowTitle(QApplication::translate("TetrixWindow", "Tetrix", nullptr)); - startButton->setText(QApplication::translate("TetrixWindow", "&Start", nullptr)); - linesRemovedLabel->setText(QApplication::translate("TetrixWindow", "LINES REMOVED", nullptr)); - pauseButton->setText(QApplication::translate("TetrixWindow", "&Pause", nullptr)); - levelLabel->setText(QApplication::translate("TetrixWindow", "LEVEL", nullptr)); - nextLabel->setText(QApplication::translate("TetrixWindow", "NEXT", nullptr)); - scoreLabel->setText(QApplication::translate("TetrixWindow", "SCORE", nullptr)); + TetrixWindow->setWindowTitle(QCoreApplication::translate("TetrixWindow", "Tetrix", nullptr)); + startButton->setText(QCoreApplication::translate("TetrixWindow", "&Start", nullptr)); + linesRemovedLabel->setText(QCoreApplication::translate("TetrixWindow", "LINES REMOVED", nullptr)); + pauseButton->setText(QCoreApplication::translate("TetrixWindow", "&Pause", nullptr)); + levelLabel->setText(QCoreApplication::translate("TetrixWindow", "LEVEL", nullptr)); + nextLabel->setText(QCoreApplication::translate("TetrixWindow", "NEXT", nullptr)); + scoreLabel->setText(QCoreApplication::translate("TetrixWindow", "SCORE", nullptr)); nextPieceLabel->setText(QString()); - quitButton->setText(QApplication::translate("TetrixWindow", "&Quit", nullptr)); + quitButton->setText(QCoreApplication::translate("TetrixWindow", "&Quit", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/textfinder.ui.h b/tests/auto/tools/uic/baseline/textfinder.ui.h index 2f6bfebf98..61c36ae960 100644 --- a/tests/auto/tools/uic/baseline/textfinder.ui.h +++ b/tests/auto/tools/uic/baseline/textfinder.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'textfinder.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -36,7 +36,7 @@ public: void setupUi(QWidget *Form) { if (Form->objectName().isEmpty()) - Form->setObjectName(QString::fromUtf8("Form")); + Form->setObjectName("Form"); Form->resize(378, 158); vboxLayout = new QVBoxLayout(Form); #ifndef Q_OS_MAC @@ -45,7 +45,7 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); gridLayout = new QGridLayout(); #ifndef Q_OS_MAC gridLayout->setSpacing(6); @@ -53,19 +53,19 @@ public: #ifndef Q_OS_MAC gridLayout->setContentsMargins(0, 0, 0, 0); #endif - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); lineEdit = new QLineEdit(Form); - lineEdit->setObjectName(QString::fromUtf8("lineEdit")); + lineEdit->setObjectName("lineEdit"); gridLayout->addWidget(lineEdit, 0, 1, 1, 1); searchLabel = new QLabel(Form); - searchLabel->setObjectName(QString::fromUtf8("searchLabel")); + searchLabel->setObjectName("searchLabel"); gridLayout->addWidget(searchLabel, 0, 0, 1, 1); findButton = new QPushButton(Form); - findButton->setObjectName(QString::fromUtf8("findButton")); + findButton->setObjectName("findButton"); gridLayout->addWidget(findButton, 0, 2, 1, 1); @@ -73,29 +73,29 @@ public: vboxLayout->addLayout(gridLayout); textEdit = new QTextEdit(Form); - textEdit->setObjectName(QString::fromUtf8("textEdit")); + textEdit->setObjectName("textEdit"); vboxLayout->addWidget(textEdit); - spacerItem = new QSpacerItem(20, 16, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem = new QSpacerItem(20, 16, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Expanding); vboxLayout->addItem(spacerItem); -#ifndef QT_NO_SHORTCUT +#if QT_CONFIG(shortcut) searchLabel->setBuddy(lineEdit); -#endif // QT_NO_SHORTCUT +#endif // QT_CONFIG(shortcut) retranslateUi(Form); - QObject::connect(lineEdit, SIGNAL(returnPressed()), findButton, SLOT(animateClick())); + QObject::connect(lineEdit, &QLineEdit::returnPressed, findButton, qOverload<>(&QPushButton::animateClick)); QMetaObject::connectSlotsByName(Form); } // setupUi void retranslateUi(QWidget *Form) { - Form->setWindowTitle(QApplication::translate("Form", "Find Text", nullptr)); - searchLabel->setText(QApplication::translate("Form", "&Keyword:", nullptr)); - findButton->setText(QApplication::translate("Form", "&Find", nullptr)); + Form->setWindowTitle(QCoreApplication::translate("Form", "Find Text", nullptr)); + searchLabel->setText(QCoreApplication::translate("Form", "&Keyword:", nullptr)); + findButton->setText(QCoreApplication::translate("Form", "&Find", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/topicchooser.ui.h b/tests/auto/tools/uic/baseline/topicchooser.ui.h index 90ec485e39..049de00250 100644 --- a/tests/auto/tools/uic/baseline/topicchooser.ui.h +++ b/tests/auto/tools/uic/baseline/topicchooser.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'topicchooser.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -37,7 +37,7 @@ public: void setupUi(QDialog *TopicChooser) { if (TopicChooser->objectName().isEmpty()) - TopicChooser->setObjectName(QString::fromUtf8("TopicChooser")); + TopicChooser->setObjectName("TopicChooser"); TopicChooser->resize(391, 223); TopicChooser->setSizeGripEnabled(true); vboxLayout = new QVBoxLayout(TopicChooser); @@ -45,40 +45,40 @@ public: vboxLayout->setSpacing(6); #endif vboxLayout->setContentsMargins(11, 11, 11, 11); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); vboxLayout->setObjectName(QString::fromUtf8("unnamed")); label = new QLabel(TopicChooser); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName("label"); vboxLayout->addWidget(label); listWidget = new QListWidget(TopicChooser); - listWidget->setObjectName(QString::fromUtf8("listWidget")); + listWidget->setObjectName("listWidget"); vboxLayout->addWidget(listWidget); Layout16 = new QWidget(TopicChooser); - Layout16->setObjectName(QString::fromUtf8("Layout16")); + Layout16->setObjectName("Layout16"); hboxLayout = new QHBoxLayout(Layout16); #ifndef Q_OS_MAC hboxLayout->setSpacing(6); #endif hboxLayout->setContentsMargins(0, 0, 0, 0); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName("hboxLayout"); hboxLayout->setObjectName(QString::fromUtf8("unnamed")); hboxLayout->setContentsMargins(0, 0, 0, 0); - Horizontal_Spacing2 = new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + Horizontal_Spacing2 = new QSpacerItem(20, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); hboxLayout->addItem(Horizontal_Spacing2); buttonDisplay = new QPushButton(Layout16); - buttonDisplay->setObjectName(QString::fromUtf8("buttonDisplay")); + buttonDisplay->setObjectName("buttonDisplay"); buttonDisplay->setAutoDefault(true); hboxLayout->addWidget(buttonDisplay); buttonCancel = new QPushButton(Layout16); - buttonCancel->setObjectName(QString::fromUtf8("buttonCancel")); + buttonCancel->setObjectName("buttonCancel"); buttonCancel->setAutoDefault(true); hboxLayout->addWidget(buttonCancel); @@ -86,9 +86,9 @@ public: vboxLayout->addWidget(Layout16); -#ifndef QT_NO_SHORTCUT +#if QT_CONFIG(shortcut) label->setBuddy(listWidget); -#endif // QT_NO_SHORTCUT +#endif // QT_CONFIG(shortcut) retranslateUi(TopicChooser); @@ -100,10 +100,10 @@ public: void retranslateUi(QDialog *TopicChooser) { - TopicChooser->setWindowTitle(QApplication::translate("TopicChooser", "Choose Topic", nullptr)); - label->setText(QApplication::translate("TopicChooser", "&Topics", nullptr)); - buttonDisplay->setText(QApplication::translate("TopicChooser", "&Display", nullptr)); - buttonCancel->setText(QApplication::translate("TopicChooser", "&Close", nullptr)); + TopicChooser->setWindowTitle(QCoreApplication::translate("TopicChooser", "Choose Topic", nullptr)); + label->setText(QCoreApplication::translate("TopicChooser", "&Topics", nullptr)); + buttonDisplay->setText(QCoreApplication::translate("TopicChooser", "&Display", nullptr)); + buttonCancel->setText(QCoreApplication::translate("TopicChooser", "&Close", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/translatedialog.ui b/tests/auto/tools/uic/baseline/translatedialog.ui index 42da3591d8..197c3c4d0e 100644 --- a/tests/auto/tools/uic/baseline/translatedialog.ui +++ b/tests/auto/tools/uic/baseline/translatedialog.ui @@ -1,31 +1,8 @@ <ui version="4.0" > - <comment>********************************************************************* -** -** 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$ -** -*********************************************************************</comment> +<comment> +* Copyright (C) 2016 The Qt Company Ltd. +* SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +</comment> <class>TranslateDialog</class> <widget class="QDialog" name="TranslateDialog" > <property name="geometry" > @@ -241,7 +218,7 @@ <enum>Qt::Vertical</enum> </property> <property name="sizeType" > - <enum>QSizePolicy::Expanding</enum> + <enum>QSizePolicy::Policy::Expanding</enum> </property> <property name="sizeHint" > <size> diff --git a/tests/auto/tools/uic/baseline/translatedialog.ui.h b/tests/auto/tools/uic/baseline/translatedialog.ui.h index 5bea11f9f2..cbc103ef6e 100644 --- a/tests/auto/tools/uic/baseline/translatedialog.ui.h +++ b/tests/auto/tools/uic/baseline/translatedialog.ui.h @@ -1,37 +1,14 @@ /* -********************************************************************* -** -** 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$ -** -********************************************************************* + +* Copyright (C) 2016 The Qt Company Ltd. +* SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + */ /******************************************************************************** ** Form generated from reading UI file 'translatedialog.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -79,9 +56,9 @@ public: void setupUi(QDialog *TranslateDialog) { if (TranslateDialog->objectName().isEmpty()) - TranslateDialog->setObjectName(QString::fromUtf8("TranslateDialog")); + TranslateDialog->setObjectName("TranslateDialog"); TranslateDialog->resize(407, 145); - QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum); + QSizePolicy sizePolicy(QSizePolicy::Policy::Preferred, QSizePolicy::Policy::Maximum); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); sizePolicy.setHeightForWidth(TranslateDialog->sizePolicy().hasHeightForWidth()); @@ -89,35 +66,35 @@ public: hboxLayout = new QHBoxLayout(TranslateDialog); hboxLayout->setSpacing(6); hboxLayout->setContentsMargins(11, 11, 11, 11); - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName("hboxLayout"); hboxLayout->setContentsMargins(9, 9, 9, 9); vboxLayout = new QVBoxLayout(); vboxLayout->setSpacing(6); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); vboxLayout->setContentsMargins(0, 0, 0, 0); gridLayout = new QGridLayout(); gridLayout->setSpacing(6); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); gridLayout->setHorizontalSpacing(6); gridLayout->setVerticalSpacing(6); gridLayout->setContentsMargins(0, 0, 0, 0); ledTranslateTo = new QLineEdit(TranslateDialog); - ledTranslateTo->setObjectName(QString::fromUtf8("ledTranslateTo")); + ledTranslateTo->setObjectName("ledTranslateTo"); gridLayout->addWidget(ledTranslateTo, 1, 1, 1, 1); findWhat = new QLabel(TranslateDialog); - findWhat->setObjectName(QString::fromUtf8("findWhat")); + findWhat->setObjectName("findWhat"); gridLayout->addWidget(findWhat, 0, 0, 1, 1); translateTo = new QLabel(TranslateDialog); - translateTo->setObjectName(QString::fromUtf8("translateTo")); + translateTo->setObjectName("translateTo"); gridLayout->addWidget(translateTo, 1, 0, 1, 1); ledFindWhat = new QLineEdit(TranslateDialog); - ledFindWhat->setObjectName(QString::fromUtf8("ledFindWhat")); + ledFindWhat->setObjectName("ledFindWhat"); gridLayout->addWidget(ledFindWhat, 0, 1, 1, 1); @@ -125,22 +102,22 @@ public: vboxLayout->addLayout(gridLayout); groupBox = new QGroupBox(TranslateDialog); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName("groupBox"); vboxLayout1 = new QVBoxLayout(groupBox); vboxLayout1->setSpacing(6); vboxLayout1->setContentsMargins(11, 11, 11, 11); - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName("vboxLayout1"); ckMatchCase = new QCheckBox(groupBox); - ckMatchCase->setObjectName(QString::fromUtf8("ckMatchCase")); + ckMatchCase->setObjectName("ckMatchCase"); vboxLayout1->addWidget(ckMatchCase); ckMarkFinished = new QCheckBox(groupBox); - ckMarkFinished->setObjectName(QString::fromUtf8("ckMarkFinished")); + ckMarkFinished->setObjectName("ckMarkFinished"); vboxLayout1->addWidget(ckMarkFinished); - spacerItem = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem = new QSpacerItem(20, 40, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Expanding); vboxLayout1->addItem(spacerItem); @@ -152,40 +129,40 @@ public: vboxLayout2 = new QVBoxLayout(); vboxLayout2->setSpacing(6); - vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2")); + vboxLayout2->setObjectName("vboxLayout2"); vboxLayout2->setContentsMargins(0, 0, 0, 0); findNxt = new QPushButton(TranslateDialog); - findNxt->setObjectName(QString::fromUtf8("findNxt")); + findNxt->setObjectName("findNxt"); findNxt->setFlat(false); vboxLayout2->addWidget(findNxt); translate = new QPushButton(TranslateDialog); - translate->setObjectName(QString::fromUtf8("translate")); + translate->setObjectName("translate"); vboxLayout2->addWidget(translate); translateAll = new QPushButton(TranslateDialog); - translateAll->setObjectName(QString::fromUtf8("translateAll")); + translateAll->setObjectName("translateAll"); vboxLayout2->addWidget(translateAll); cancel = new QPushButton(TranslateDialog); - cancel->setObjectName(QString::fromUtf8("cancel")); + cancel->setObjectName("cancel"); vboxLayout2->addWidget(cancel); - spacerItem1 = new QSpacerItem(20, 51, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem1 = new QSpacerItem(20, 51, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Expanding); vboxLayout2->addItem(spacerItem1); hboxLayout->addLayout(vboxLayout2); -#ifndef QT_NO_SHORTCUT +#if QT_CONFIG(shortcut) findWhat->setBuddy(ledFindWhat); translateTo->setBuddy(ledTranslateTo); -#endif // QT_NO_SHORTCUT +#endif // QT_CONFIG(shortcut) QWidget::setTabOrder(ledFindWhat, ledTranslateTo); QWidget::setTabOrder(ledTranslateTo, findNxt); QWidget::setTabOrder(findNxt, translate); @@ -195,7 +172,7 @@ public: QWidget::setTabOrder(ckMatchCase, ckMarkFinished); retranslateUi(TranslateDialog); - QObject::connect(cancel, SIGNAL(clicked()), TranslateDialog, SLOT(reject())); + QObject::connect(cancel, &QPushButton::clicked, TranslateDialog, qOverload<>(&QDialog::reject)); findNxt->setDefault(true); @@ -205,34 +182,34 @@ public: void retranslateUi(QDialog *TranslateDialog) { - TranslateDialog->setWindowTitle(QApplication::translate("TranslateDialog", "Qt Linguist", nullptr)); -#ifndef QT_NO_WHATSTHIS - TranslateDialog->setWhatsThis(QApplication::translate("TranslateDialog", "This window allows you to search for some text in the translation source file.", nullptr)); -#endif // QT_NO_WHATSTHIS -#ifndef QT_NO_WHATSTHIS - ledTranslateTo->setWhatsThis(QApplication::translate("TranslateDialog", "Type in the text to search for.", nullptr)); -#endif // QT_NO_WHATSTHIS - findWhat->setText(QApplication::translate("TranslateDialog", "Find &source text:", nullptr)); - translateTo->setText(QApplication::translate("TranslateDialog", "&Translate to:", nullptr)); -#ifndef QT_NO_WHATSTHIS - ledFindWhat->setWhatsThis(QApplication::translate("TranslateDialog", "Type in the text to search for.", nullptr)); -#endif // QT_NO_WHATSTHIS - groupBox->setTitle(QApplication::translate("TranslateDialog", "Search options", nullptr)); -#ifndef QT_NO_WHATSTHIS - ckMatchCase->setWhatsThis(QApplication::translate("TranslateDialog", "Texts such as 'TeX' and 'tex' are considered as different when checked.", nullptr)); -#endif // QT_NO_WHATSTHIS - ckMatchCase->setText(QApplication::translate("TranslateDialog", "Match &case", nullptr)); - ckMarkFinished->setText(QApplication::translate("TranslateDialog", "Mark new translation as &finished", nullptr)); -#ifndef QT_NO_WHATSTHIS - findNxt->setWhatsThis(QApplication::translate("TranslateDialog", "Click here to find the next occurrence of the text you typed in.", nullptr)); -#endif // QT_NO_WHATSTHIS - findNxt->setText(QApplication::translate("TranslateDialog", "Find Next", nullptr)); - translate->setText(QApplication::translate("TranslateDialog", "Translate", nullptr)); - translateAll->setText(QApplication::translate("TranslateDialog", "Translate All", nullptr)); -#ifndef QT_NO_WHATSTHIS - cancel->setWhatsThis(QApplication::translate("TranslateDialog", "Click here to close this window.", nullptr)); -#endif // QT_NO_WHATSTHIS - cancel->setText(QApplication::translate("TranslateDialog", "Cancel", nullptr)); + TranslateDialog->setWindowTitle(QCoreApplication::translate("TranslateDialog", "Qt Linguist", nullptr)); +#if QT_CONFIG(whatsthis) + TranslateDialog->setWhatsThis(QCoreApplication::translate("TranslateDialog", "This window allows you to search for some text in the translation source file.", nullptr)); +#endif // QT_CONFIG(whatsthis) +#if QT_CONFIG(whatsthis) + ledTranslateTo->setWhatsThis(QCoreApplication::translate("TranslateDialog", "Type in the text to search for.", nullptr)); +#endif // QT_CONFIG(whatsthis) + findWhat->setText(QCoreApplication::translate("TranslateDialog", "Find &source text:", nullptr)); + translateTo->setText(QCoreApplication::translate("TranslateDialog", "&Translate to:", nullptr)); +#if QT_CONFIG(whatsthis) + ledFindWhat->setWhatsThis(QCoreApplication::translate("TranslateDialog", "Type in the text to search for.", nullptr)); +#endif // QT_CONFIG(whatsthis) + groupBox->setTitle(QCoreApplication::translate("TranslateDialog", "Search options", nullptr)); +#if QT_CONFIG(whatsthis) + ckMatchCase->setWhatsThis(QCoreApplication::translate("TranslateDialog", "Texts such as 'TeX' and 'tex' are considered as different when checked.", nullptr)); +#endif // QT_CONFIG(whatsthis) + ckMatchCase->setText(QCoreApplication::translate("TranslateDialog", "Match &case", nullptr)); + ckMarkFinished->setText(QCoreApplication::translate("TranslateDialog", "Mark new translation as &finished", nullptr)); +#if QT_CONFIG(whatsthis) + findNxt->setWhatsThis(QCoreApplication::translate("TranslateDialog", "Click here to find the next occurrence of the text you typed in.", nullptr)); +#endif // QT_CONFIG(whatsthis) + findNxt->setText(QCoreApplication::translate("TranslateDialog", "Find Next", nullptr)); + translate->setText(QCoreApplication::translate("TranslateDialog", "Translate", nullptr)); + translateAll->setText(QCoreApplication::translate("TranslateDialog", "Translate All", nullptr)); +#if QT_CONFIG(whatsthis) + cancel->setWhatsThis(QCoreApplication::translate("TranslateDialog", "Click here to close this window.", nullptr)); +#endif // QT_CONFIG(whatsthis) + cancel->setText(QCoreApplication::translate("TranslateDialog", "Cancel", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/translation/Dialog_without_Buttons_tr.h b/tests/auto/tools/uic/baseline/translation/Dialog_without_Buttons_tr.h index eea7b7335d..de16310b07 100644 --- a/tests/auto/tools/uic/baseline/translation/Dialog_without_Buttons_tr.h +++ b/tests/auto/tools/uic/baseline/translation/Dialog_without_Buttons_tr.h @@ -23,7 +23,7 @@ public: void setupUi(QDialog *Dialog) { if (Dialog->objectName().isEmpty()) - Dialog->setObjectName(QString::fromUtf8("Dialog")); + Dialog->setObjectName("Dialog"); Dialog->resize(400, 300); retranslateUi(Dialog); diff --git a/tests/auto/tools/uic/baseline/translationsettings.ui.h b/tests/auto/tools/uic/baseline/translationsettings.ui.h index 764e3a85b6..5111fc3944 100644 --- a/tests/auto/tools/uic/baseline/translationsettings.ui.h +++ b/tests/auto/tools/uic/baseline/translationsettings.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'translationsettings.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -10,6 +10,7 @@ #define TRANSLATIONSETTINGS_H #include <QtCore/QVariant> +#include <QtWidgets/QAbstractButton> #include <QtWidgets/QApplication> #include <QtWidgets/QComboBox> #include <QtWidgets/QDialog> @@ -36,7 +37,7 @@ public: void setupUi(QDialog *TranslationSettings) { if (TranslationSettings->objectName().isEmpty()) - TranslationSettings->setObjectName(QString::fromUtf8("TranslationSettings")); + TranslationSettings->setObjectName("TranslationSettings"); TranslationSettings->resize(346, 125); vboxLayout = new QVBoxLayout(TranslationSettings); #ifndef Q_OS_MAC @@ -45,9 +46,9 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); groupBox = new QGroupBox(TranslationSettings); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName("groupBox"); gridLayout = new QGridLayout(groupBox); #ifndef Q_OS_MAC gridLayout->setSpacing(6); @@ -55,24 +56,24 @@ public: #ifndef Q_OS_MAC gridLayout->setContentsMargins(9, 9, 9, 9); #endif - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); cbLanguageList = new QComboBox(groupBox); - cbLanguageList->setObjectName(QString::fromUtf8("cbLanguageList")); + cbLanguageList->setObjectName("cbLanguageList"); gridLayout->addWidget(cbLanguageList, 0, 1, 1, 1); label = new QLabel(groupBox); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName("label"); gridLayout->addWidget(label, 0, 0, 1, 1); cbCountryList = new QComboBox(groupBox); - cbCountryList->setObjectName(QString::fromUtf8("cbCountryList")); + cbCountryList->setObjectName("cbCountryList"); gridLayout->addWidget(cbCountryList, 1, 1, 1, 1); lblCountry = new QLabel(groupBox); - lblCountry->setObjectName(QString::fromUtf8("lblCountry")); + lblCountry->setObjectName("lblCountry"); gridLayout->addWidget(lblCountry, 1, 0, 1, 1); @@ -80,29 +81,29 @@ public: vboxLayout->addWidget(groupBox); buttonBox = new QDialogButtonBox(TranslationSettings); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName("buttonBox"); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok); vboxLayout->addWidget(buttonBox); -#ifndef QT_NO_SHORTCUT +#if QT_CONFIG(shortcut) label->setBuddy(cbLanguageList); -#endif // QT_NO_SHORTCUT +#endif // QT_CONFIG(shortcut) retranslateUi(TranslationSettings); - QObject::connect(buttonBox, SIGNAL(accepted()), TranslationSettings, SLOT(accept())); - QObject::connect(buttonBox, SIGNAL(rejected()), TranslationSettings, SLOT(reject())); + QObject::connect(buttonBox, &QDialogButtonBox::accepted, TranslationSettings, qOverload<>(&QDialog::accept)); + QObject::connect(buttonBox, &QDialogButtonBox::rejected, TranslationSettings, qOverload<>(&QDialog::reject)); QMetaObject::connectSlotsByName(TranslationSettings); } // setupUi void retranslateUi(QDialog *TranslationSettings) { - TranslationSettings->setWindowTitle(QApplication::translate("TranslationSettings", "Qt Linguist - Translation file settings", nullptr)); - groupBox->setTitle(QApplication::translate("TranslationSettings", "Target language", nullptr)); - label->setText(QApplication::translate("TranslationSettings", "Language", nullptr)); - lblCountry->setText(QApplication::translate("TranslationSettings", "Country/Region", nullptr)); + TranslationSettings->setWindowTitle(QCoreApplication::translate("TranslationSettings", "Qt Linguist - Translation file settings", nullptr)); + groupBox->setTitle(QCoreApplication::translate("TranslationSettings", "Target language", nullptr)); + label->setText(QCoreApplication::translate("TranslationSettings", "Language", nullptr)); + lblCountry->setText(QCoreApplication::translate("TranslationSettings", "Country/Region", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/treewidgeteditor.ui b/tests/auto/tools/uic/baseline/treewidgeteditor.ui index a49c0206da..4d59f67b99 100644 --- a/tests/auto/tools/uic/baseline/treewidgeteditor.ui +++ b/tests/auto/tools/uic/baseline/treewidgeteditor.ui @@ -1,31 +1,8 @@ <ui version="4.0" > - <comment>********************************************************************* -** -** 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$ -** -*********************************************************************</comment> +<comment> +* Copyright (C) 2016 The Qt Company Ltd. +* SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +</comment> <class>qdesigner_internal::TreeWidgetEditor</class> <widget class="QDialog" name="qdesigner_internal::TreeWidgetEditor" > <property name="geometry" > diff --git a/tests/auto/tools/uic/baseline/treewidgeteditor.ui.h b/tests/auto/tools/uic/baseline/treewidgeteditor.ui.h index d432195648..2a49223c02 100644 --- a/tests/auto/tools/uic/baseline/treewidgeteditor.ui.h +++ b/tests/auto/tools/uic/baseline/treewidgeteditor.ui.h @@ -1,37 +1,14 @@ /* -********************************************************************* -** -** 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$ -** -********************************************************************* + +* Copyright (C) 2016 The Qt Company Ltd. +* SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + */ /******************************************************************************** ** Form generated from reading UI file 'treewidgeteditor.ui' ** -** Created by: Qt User Interface Compiler version 5.0.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -40,6 +17,7 @@ #define TREEWIDGETEDITOR_H #include <QtCore/QVariant> +#include <QtWidgets/QAbstractButton> #include <QtWidgets/QApplication> #include <QtWidgets/QDialog> #include <QtWidgets/QDialogButtonBox> @@ -96,58 +74,58 @@ public: void setupUi(QDialog *qdesigner_internal__TreeWidgetEditor) { if (qdesigner_internal__TreeWidgetEditor->objectName().isEmpty()) - qdesigner_internal__TreeWidgetEditor->setObjectName(QString::fromUtf8("qdesigner_internal__TreeWidgetEditor")); + qdesigner_internal__TreeWidgetEditor->setObjectName("qdesigner_internal__TreeWidgetEditor"); qdesigner_internal__TreeWidgetEditor->resize(619, 321); gridLayout_3 = new QGridLayout(qdesigner_internal__TreeWidgetEditor); - gridLayout_3->setObjectName(QString::fromUtf8("gridLayout_3")); + gridLayout_3->setObjectName("gridLayout_3"); itemsBox = new QGroupBox(qdesigner_internal__TreeWidgetEditor); - itemsBox->setObjectName(QString::fromUtf8("itemsBox")); + itemsBox->setObjectName("itemsBox"); gridLayout = new QGridLayout(itemsBox); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); treeWidget = new QTreeWidget(itemsBox); - treeWidget->setObjectName(QString::fromUtf8("treeWidget")); + treeWidget->setObjectName("treeWidget"); treeWidget->setFocusPolicy(Qt::TabFocus); gridLayout->addWidget(treeWidget, 0, 0, 1, 1); horizontalLayout_4 = new QHBoxLayout(); - horizontalLayout_4->setObjectName(QString::fromUtf8("horizontalLayout_4")); + horizontalLayout_4->setObjectName("horizontalLayout_4"); newItemButton = new QToolButton(itemsBox); - newItemButton->setObjectName(QString::fromUtf8("newItemButton")); + newItemButton->setObjectName("newItemButton"); horizontalLayout_4->addWidget(newItemButton); newSubItemButton = new QToolButton(itemsBox); - newSubItemButton->setObjectName(QString::fromUtf8("newSubItemButton")); + newSubItemButton->setObjectName("newSubItemButton"); horizontalLayout_4->addWidget(newSubItemButton); deleteItemButton = new QToolButton(itemsBox); - deleteItemButton->setObjectName(QString::fromUtf8("deleteItemButton")); + deleteItemButton->setObjectName("deleteItemButton"); horizontalLayout_4->addWidget(deleteItemButton); - spacerItem = new QSpacerItem(28, 23, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacerItem = new QSpacerItem(28, 23, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); horizontalLayout_4->addItem(spacerItem); moveItemLeftButton = new QToolButton(itemsBox); - moveItemLeftButton->setObjectName(QString::fromUtf8("moveItemLeftButton")); + moveItemLeftButton->setObjectName("moveItemLeftButton"); horizontalLayout_4->addWidget(moveItemLeftButton); moveItemRightButton = new QToolButton(itemsBox); - moveItemRightButton->setObjectName(QString::fromUtf8("moveItemRightButton")); + moveItemRightButton->setObjectName("moveItemRightButton"); horizontalLayout_4->addWidget(moveItemRightButton); moveItemUpButton = new QToolButton(itemsBox); - moveItemUpButton->setObjectName(QString::fromUtf8("moveItemUpButton")); + moveItemUpButton->setObjectName("moveItemUpButton"); horizontalLayout_4->addWidget(moveItemUpButton); moveItemDownButton = new QToolButton(itemsBox); - moveItemDownButton->setObjectName(QString::fromUtf8("moveItemDownButton")); + moveItemDownButton->setObjectName("moveItemDownButton"); horizontalLayout_4->addWidget(moveItemDownButton); @@ -155,18 +133,18 @@ public: gridLayout->addLayout(horizontalLayout_4, 1, 0, 1, 1); horizontalLayout_2 = new QHBoxLayout(); - horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2")); + horizontalLayout_2->setObjectName("horizontalLayout_2"); label_2 = new QLabel(itemsBox); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName("label_2"); horizontalLayout_2->addWidget(label_2); itemIconSelector = new qdesigner_internal::IconSelector(itemsBox); - itemIconSelector->setObjectName(QString::fromUtf8("itemIconSelector")); + itemIconSelector->setObjectName("itemIconSelector"); horizontalLayout_2->addWidget(itemIconSelector); - horizontalSpacer = new QSpacerItem(288, 21, QSizePolicy::Expanding, QSizePolicy::Minimum); + horizontalSpacer = new QSpacerItem(288, 21, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); horizontalLayout_2->addItem(horizontalSpacer); @@ -177,17 +155,17 @@ public: gridLayout_3->addWidget(itemsBox, 0, 0, 1, 1); columnsBox = new QGroupBox(qdesigner_internal__TreeWidgetEditor); - columnsBox->setObjectName(QString::fromUtf8("columnsBox")); - QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred); + columnsBox->setObjectName("columnsBox"); + QSizePolicy sizePolicy(QSizePolicy::Policy::Fixed, QSizePolicy::Policy::Preferred); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); sizePolicy.setHeightForWidth(columnsBox->sizePolicy().hasHeightForWidth()); columnsBox->setSizePolicy(sizePolicy); gridLayout_2 = new QGridLayout(columnsBox); - gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2")); + gridLayout_2->setObjectName("gridLayout_2"); listWidget = new QListWidget(columnsBox); - listWidget->setObjectName(QString::fromUtf8("listWidget")); - QSizePolicy sizePolicy1(QSizePolicy::Ignored, QSizePolicy::Expanding); + listWidget->setObjectName("listWidget"); + QSizePolicy sizePolicy1(QSizePolicy::Policy::Ignored, QSizePolicy::Policy::Expanding); sizePolicy1.setHorizontalStretch(0); sizePolicy1.setVerticalStretch(0); sizePolicy1.setHeightForWidth(listWidget->sizePolicy().hasHeightForWidth()); @@ -197,28 +175,28 @@ public: gridLayout_2->addWidget(listWidget, 0, 0, 1, 1); horizontalLayout_3 = new QHBoxLayout(); - horizontalLayout_3->setObjectName(QString::fromUtf8("horizontalLayout_3")); + horizontalLayout_3->setObjectName("horizontalLayout_3"); newColumnButton = new QToolButton(columnsBox); - newColumnButton->setObjectName(QString::fromUtf8("newColumnButton")); + newColumnButton->setObjectName("newColumnButton"); horizontalLayout_3->addWidget(newColumnButton); deleteColumnButton = new QToolButton(columnsBox); - deleteColumnButton->setObjectName(QString::fromUtf8("deleteColumnButton")); + deleteColumnButton->setObjectName("deleteColumnButton"); horizontalLayout_3->addWidget(deleteColumnButton); - spacerItem1 = new QSpacerItem(13, 23, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacerItem1 = new QSpacerItem(13, 23, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); horizontalLayout_3->addItem(spacerItem1); moveColumnUpButton = new QToolButton(columnsBox); - moveColumnUpButton->setObjectName(QString::fromUtf8("moveColumnUpButton")); + moveColumnUpButton->setObjectName("moveColumnUpButton"); horizontalLayout_3->addWidget(moveColumnUpButton); moveColumnDownButton = new QToolButton(columnsBox); - moveColumnDownButton->setObjectName(QString::fromUtf8("moveColumnDownButton")); + moveColumnDownButton->setObjectName("moveColumnDownButton"); horizontalLayout_3->addWidget(moveColumnDownButton); @@ -226,18 +204,18 @@ public: gridLayout_2->addLayout(horizontalLayout_3, 1, 0, 1, 1); horizontalLayout = new QHBoxLayout(); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); + horizontalLayout->setObjectName("horizontalLayout"); label = new QLabel(columnsBox); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName("label"); horizontalLayout->addWidget(label); columnIconSelector = new qdesigner_internal::IconSelector(columnsBox); - columnIconSelector->setObjectName(QString::fromUtf8("columnIconSelector")); + columnIconSelector->setObjectName("columnIconSelector"); horizontalLayout->addWidget(columnIconSelector); - spacerItem2 = new QSpacerItem(0, 10, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacerItem2 = new QSpacerItem(0, 10, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); horizontalLayout->addItem(spacerItem2); @@ -248,7 +226,7 @@ public: gridLayout_3->addWidget(columnsBox, 0, 1, 1, 1); buttonBox = new QDialogButtonBox(qdesigner_internal__TreeWidgetEditor); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName("buttonBox"); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); @@ -268,71 +246,71 @@ public: QWidget::setTabOrder(moveColumnUpButton, moveColumnDownButton); retranslateUi(qdesigner_internal__TreeWidgetEditor); - QObject::connect(buttonBox, SIGNAL(accepted()), qdesigner_internal__TreeWidgetEditor, SLOT(accept())); - QObject::connect(buttonBox, SIGNAL(rejected()), qdesigner_internal__TreeWidgetEditor, SLOT(reject())); + QObject::connect(buttonBox, &QDialogButtonBox::accepted, qdesigner_internal__TreeWidgetEditor, qOverload<>(&QDialog::accept)); + QObject::connect(buttonBox, &QDialogButtonBox::rejected, qdesigner_internal__TreeWidgetEditor, qOverload<>(&QDialog::reject)); QMetaObject::connectSlotsByName(qdesigner_internal__TreeWidgetEditor); } // setupUi void retranslateUi(QDialog *qdesigner_internal__TreeWidgetEditor) { - qdesigner_internal__TreeWidgetEditor->setWindowTitle(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "Edit Tree Widget", nullptr)); - itemsBox->setTitle(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "Tree Items", nullptr)); + qdesigner_internal__TreeWidgetEditor->setWindowTitle(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "Edit Tree Widget", nullptr)); + itemsBox->setTitle(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "Tree Items", nullptr)); QTreeWidgetItem *___qtreewidgetitem = treeWidget->headerItem(); - ___qtreewidgetitem->setText(0, QApplication::translate("qdesigner_internal::TreeWidgetEditor", "1", nullptr)); -#ifndef QT_NO_TOOLTIP - treeWidget->setToolTip(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "Tree Items", nullptr)); -#endif // QT_NO_TOOLTIP -#ifndef QT_NO_TOOLTIP - newItemButton->setToolTip(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "New Item", nullptr)); -#endif // QT_NO_TOOLTIP - newItemButton->setText(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "&New", nullptr)); -#ifndef QT_NO_TOOLTIP - newSubItemButton->setToolTip(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "New Subitem", nullptr)); -#endif // QT_NO_TOOLTIP - newSubItemButton->setText(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "New &Subitem", nullptr)); -#ifndef QT_NO_TOOLTIP - deleteItemButton->setToolTip(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "Delete Item", nullptr)); -#endif // QT_NO_TOOLTIP - deleteItemButton->setText(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "&Delete", nullptr)); -#ifndef QT_NO_TOOLTIP - moveItemLeftButton->setToolTip(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "Move Item Left (before Parent Item)", nullptr)); -#endif // QT_NO_TOOLTIP - moveItemLeftButton->setText(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "L", nullptr)); -#ifndef QT_NO_TOOLTIP - moveItemRightButton->setToolTip(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "Move Item Right (as a First Subitem of the Next Sibling Item)", nullptr)); -#endif // QT_NO_TOOLTIP - moveItemRightButton->setText(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "R", nullptr)); -#ifndef QT_NO_TOOLTIP - moveItemUpButton->setToolTip(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "Move Item Up", nullptr)); -#endif // QT_NO_TOOLTIP - moveItemUpButton->setText(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "U", nullptr)); -#ifndef QT_NO_TOOLTIP - moveItemDownButton->setToolTip(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "Move Item Down", nullptr)); -#endif // QT_NO_TOOLTIP - moveItemDownButton->setText(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "D", nullptr)); - label_2->setText(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "Icon", nullptr)); - columnsBox->setTitle(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "Columns", nullptr)); -#ifndef QT_NO_TOOLTIP - listWidget->setToolTip(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "Tree Columns", nullptr)); -#endif // QT_NO_TOOLTIP -#ifndef QT_NO_TOOLTIP - newColumnButton->setToolTip(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "New Column", nullptr)); -#endif // QT_NO_TOOLTIP - newColumnButton->setText(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "New", nullptr)); -#ifndef QT_NO_TOOLTIP - deleteColumnButton->setToolTip(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "Delete Column", nullptr)); -#endif // QT_NO_TOOLTIP - deleteColumnButton->setText(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "Delete", nullptr)); -#ifndef QT_NO_TOOLTIP - moveColumnUpButton->setToolTip(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "Move Column Up", nullptr)); -#endif // QT_NO_TOOLTIP - moveColumnUpButton->setText(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "U", nullptr)); -#ifndef QT_NO_TOOLTIP - moveColumnDownButton->setToolTip(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "Move Column Down", nullptr)); -#endif // QT_NO_TOOLTIP - moveColumnDownButton->setText(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "D", nullptr)); - label->setText(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "Icon", nullptr)); + ___qtreewidgetitem->setText(0, QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "1", nullptr)); +#if QT_CONFIG(tooltip) + treeWidget->setToolTip(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "Tree Items", nullptr)); +#endif // QT_CONFIG(tooltip) +#if QT_CONFIG(tooltip) + newItemButton->setToolTip(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "New Item", nullptr)); +#endif // QT_CONFIG(tooltip) + newItemButton->setText(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "&New", nullptr)); +#if QT_CONFIG(tooltip) + newSubItemButton->setToolTip(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "New Subitem", nullptr)); +#endif // QT_CONFIG(tooltip) + newSubItemButton->setText(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "New &Subitem", nullptr)); +#if QT_CONFIG(tooltip) + deleteItemButton->setToolTip(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "Delete Item", nullptr)); +#endif // QT_CONFIG(tooltip) + deleteItemButton->setText(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "&Delete", nullptr)); +#if QT_CONFIG(tooltip) + moveItemLeftButton->setToolTip(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "Move Item Left (before Parent Item)", nullptr)); +#endif // QT_CONFIG(tooltip) + moveItemLeftButton->setText(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "L", nullptr)); +#if QT_CONFIG(tooltip) + moveItemRightButton->setToolTip(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "Move Item Right (as a First Subitem of the Next Sibling Item)", nullptr)); +#endif // QT_CONFIG(tooltip) + moveItemRightButton->setText(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "R", nullptr)); +#if QT_CONFIG(tooltip) + moveItemUpButton->setToolTip(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "Move Item Up", nullptr)); +#endif // QT_CONFIG(tooltip) + moveItemUpButton->setText(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "U", nullptr)); +#if QT_CONFIG(tooltip) + moveItemDownButton->setToolTip(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "Move Item Down", nullptr)); +#endif // QT_CONFIG(tooltip) + moveItemDownButton->setText(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "D", nullptr)); + label_2->setText(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "Icon", nullptr)); + columnsBox->setTitle(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "Columns", nullptr)); +#if QT_CONFIG(tooltip) + listWidget->setToolTip(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "Tree Columns", nullptr)); +#endif // QT_CONFIG(tooltip) +#if QT_CONFIG(tooltip) + newColumnButton->setToolTip(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "New Column", nullptr)); +#endif // QT_CONFIG(tooltip) + newColumnButton->setText(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "New", nullptr)); +#if QT_CONFIG(tooltip) + deleteColumnButton->setToolTip(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "Delete Column", nullptr)); +#endif // QT_CONFIG(tooltip) + deleteColumnButton->setText(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "Delete", nullptr)); +#if QT_CONFIG(tooltip) + moveColumnUpButton->setToolTip(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "Move Column Up", nullptr)); +#endif // QT_CONFIG(tooltip) + moveColumnUpButton->setText(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "U", nullptr)); +#if QT_CONFIG(tooltip) + moveColumnDownButton->setToolTip(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "Move Column Down", nullptr)); +#endif // QT_CONFIG(tooltip) + moveColumnDownButton->setText(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "D", nullptr)); + label->setText(QCoreApplication::translate("qdesigner_internal::TreeWidgetEditor", "Icon", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/trpreviewtool.ui b/tests/auto/tools/uic/baseline/trpreviewtool.ui index aa7c1c8048..00c414924c 100644 --- a/tests/auto/tools/uic/baseline/trpreviewtool.ui +++ b/tests/auto/tools/uic/baseline/trpreviewtool.ui @@ -1,32 +1,8 @@ <ui version="4.0" > - <author></author> - <comment>********************************************************************* -** -** 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$ -** -*********************************************************************</comment> +<comment> +* Copyright (C) 2016 The Qt Company Ltd. +* SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +</comment> <exportmacro></exportmacro> <class>TrPreviewToolClass</class> <widget class="QMainWindow" name="TrPreviewToolClass" > diff --git a/tests/auto/tools/uic/baseline/trpreviewtool.ui.h b/tests/auto/tools/uic/baseline/trpreviewtool.ui.h index 3fbf125a1f..f66e8fbbb1 100644 --- a/tests/auto/tools/uic/baseline/trpreviewtool.ui.h +++ b/tests/auto/tools/uic/baseline/trpreviewtool.ui.h @@ -1,37 +1,14 @@ /* -********************************************************************* -** -** 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$ -** -********************************************************************* + +* Copyright (C) 2016 The Qt Company Ltd. +* SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + */ /******************************************************************************** ** Form generated from reading UI file 'trpreviewtool.ui' ** -** Created by: Qt User Interface Compiler version 5.9.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -40,7 +17,7 @@ #define TRPREVIEWTOOL_H #include <QtCore/QVariant> -#include <QtWidgets/QAction> +#include <QtGui/QAction> #include <QtWidgets/QApplication> #include <QtWidgets/QDockWidget> #include <QtWidgets/QListView> @@ -79,58 +56,58 @@ public: void setupUi(QMainWindow *TrPreviewToolClass) { if (TrPreviewToolClass->objectName().isEmpty()) - TrPreviewToolClass->setObjectName(QString::fromUtf8("TrPreviewToolClass")); + TrPreviewToolClass->setObjectName("TrPreviewToolClass"); TrPreviewToolClass->resize(593, 466); actionOpenForm = new QAction(TrPreviewToolClass); - actionOpenForm->setObjectName(QString::fromUtf8("actionOpenForm")); + actionOpenForm->setObjectName("actionOpenForm"); const QIcon icon = QIcon(QString::fromUtf8(":/images/open_form.png")); actionOpenForm->setIcon(icon); actionLoadTranslation = new QAction(TrPreviewToolClass); - actionLoadTranslation->setObjectName(QString::fromUtf8("actionLoadTranslation")); + actionLoadTranslation->setObjectName("actionLoadTranslation"); const QIcon icon1 = QIcon(QString::fromUtf8(":/images/load_translation.png")); actionLoadTranslation->setIcon(icon1); actionReloadTranslations = new QAction(TrPreviewToolClass); - actionReloadTranslations->setObjectName(QString::fromUtf8("actionReloadTranslations")); + actionReloadTranslations->setObjectName("actionReloadTranslations"); const QIcon icon2 = QIcon(QString::fromUtf8(":/images/reload_translations.png")); actionReloadTranslations->setIcon(icon2); actionClose = new QAction(TrPreviewToolClass); - actionClose->setObjectName(QString::fromUtf8("actionClose")); + actionClose->setObjectName("actionClose"); actionAbout = new QAction(TrPreviewToolClass); - actionAbout->setObjectName(QString::fromUtf8("actionAbout")); + actionAbout->setObjectName("actionAbout"); actionAbout_Qt = new QAction(TrPreviewToolClass); - actionAbout_Qt->setObjectName(QString::fromUtf8("actionAbout_Qt")); + actionAbout_Qt->setObjectName("actionAbout_Qt"); centralWidget = new QWidget(TrPreviewToolClass); - centralWidget->setObjectName(QString::fromUtf8("centralWidget")); + centralWidget->setObjectName("centralWidget"); TrPreviewToolClass->setCentralWidget(centralWidget); menuBar = new QMenuBar(TrPreviewToolClass); - menuBar->setObjectName(QString::fromUtf8("menuBar")); + menuBar->setObjectName("menuBar"); menuBar->setGeometry(QRect(0, 0, 593, 21)); menuView = new QMenu(menuBar); - menuView->setObjectName(QString::fromUtf8("menuView")); + menuView->setObjectName("menuView"); menuViewViews = new QMenu(menuView); - menuViewViews->setObjectName(QString::fromUtf8("menuViewViews")); + menuViewViews->setObjectName("menuViewViews"); menuHelp = new QMenu(menuBar); - menuHelp->setObjectName(QString::fromUtf8("menuHelp")); + menuHelp->setObjectName("menuHelp"); menuFile = new QMenu(menuBar); - menuFile->setObjectName(QString::fromUtf8("menuFile")); + menuFile->setObjectName("menuFile"); TrPreviewToolClass->setMenuBar(menuBar); mainToolBar = new QToolBar(TrPreviewToolClass); - mainToolBar->setObjectName(QString::fromUtf8("mainToolBar")); + mainToolBar->setObjectName("mainToolBar"); mainToolBar->setOrientation(Qt::Horizontal); - TrPreviewToolClass->addToolBar(static_cast<Qt::ToolBarArea>(4), mainToolBar); + TrPreviewToolClass->addToolBar(Qt::ToolBarArea::TopToolBarArea, mainToolBar); statusBar = new QStatusBar(TrPreviewToolClass); - statusBar->setObjectName(QString::fromUtf8("statusBar")); + statusBar->setObjectName("statusBar"); TrPreviewToolClass->setStatusBar(statusBar); dwForms = new QDockWidget(TrPreviewToolClass); - dwForms->setObjectName(QString::fromUtf8("dwForms")); + dwForms->setObjectName("dwForms"); dockWidgetContents = new QWidget(); - dockWidgetContents->setObjectName(QString::fromUtf8("dockWidgetContents")); + dockWidgetContents->setObjectName("dockWidgetContents"); vboxLayout = new QVBoxLayout(dockWidgetContents); vboxLayout->setSpacing(0); vboxLayout->setContentsMargins(0, 0, 0, 0); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); viewForms = new QListView(dockWidgetContents); - viewForms->setObjectName(QString::fromUtf8("viewForms")); + viewForms->setObjectName("viewForms"); viewForms->setEditTriggers(QAbstractItemView::NoEditTriggers); viewForms->setAlternatingRowColors(true); viewForms->setUniformItemSizes(true); @@ -138,7 +115,7 @@ public: vboxLayout->addWidget(viewForms); dwForms->setWidget(dockWidgetContents); - TrPreviewToolClass->addDockWidget(static_cast<Qt::DockWidgetArea>(1), dwForms); + TrPreviewToolClass->addDockWidget(Qt::DockWidgetArea::LeftDockWidgetArea, dwForms); menuBar->addAction(menuFile->menuAction()); menuBar->addAction(menuView->menuAction()); @@ -162,21 +139,21 @@ public: void retranslateUi(QMainWindow *TrPreviewToolClass) { - TrPreviewToolClass->setWindowTitle(QApplication::translate("TrPreviewToolClass", "Qt Translation Preview Tool", nullptr)); - actionOpenForm->setText(QApplication::translate("TrPreviewToolClass", "&Open Form...", nullptr)); - actionLoadTranslation->setText(QApplication::translate("TrPreviewToolClass", "&Load Translation...", nullptr)); - actionReloadTranslations->setText(QApplication::translate("TrPreviewToolClass", "&Reload Translations", nullptr)); -#ifndef QT_NO_SHORTCUT - actionReloadTranslations->setShortcut(QApplication::translate("TrPreviewToolClass", "F5", nullptr)); -#endif // QT_NO_SHORTCUT - actionClose->setText(QApplication::translate("TrPreviewToolClass", "&Close", nullptr)); - actionAbout->setText(QApplication::translate("TrPreviewToolClass", "About", nullptr)); - actionAbout_Qt->setText(QApplication::translate("TrPreviewToolClass", "About Qt", nullptr)); - menuView->setTitle(QApplication::translate("TrPreviewToolClass", "&View", nullptr)); - menuViewViews->setTitle(QApplication::translate("TrPreviewToolClass", "&Views", nullptr)); - menuHelp->setTitle(QApplication::translate("TrPreviewToolClass", "&Help", nullptr)); - menuFile->setTitle(QApplication::translate("TrPreviewToolClass", "&File", nullptr)); - dwForms->setWindowTitle(QApplication::translate("TrPreviewToolClass", "Forms", nullptr)); + TrPreviewToolClass->setWindowTitle(QCoreApplication::translate("TrPreviewToolClass", "Qt Translation Preview Tool", nullptr)); + actionOpenForm->setText(QCoreApplication::translate("TrPreviewToolClass", "&Open Form...", nullptr)); + actionLoadTranslation->setText(QCoreApplication::translate("TrPreviewToolClass", "&Load Translation...", nullptr)); + actionReloadTranslations->setText(QCoreApplication::translate("TrPreviewToolClass", "&Reload Translations", nullptr)); +#if QT_CONFIG(shortcut) + actionReloadTranslations->setShortcut(QCoreApplication::translate("TrPreviewToolClass", "F5", nullptr)); +#endif // QT_CONFIG(shortcut) + actionClose->setText(QCoreApplication::translate("TrPreviewToolClass", "&Close", nullptr)); + actionAbout->setText(QCoreApplication::translate("TrPreviewToolClass", "About", nullptr)); + actionAbout_Qt->setText(QCoreApplication::translate("TrPreviewToolClass", "About Qt", nullptr)); + menuView->setTitle(QCoreApplication::translate("TrPreviewToolClass", "&View", nullptr)); + menuViewViews->setTitle(QCoreApplication::translate("TrPreviewToolClass", "&Views", nullptr)); + menuHelp->setTitle(QCoreApplication::translate("TrPreviewToolClass", "&Help", nullptr)); + menuFile->setTitle(QCoreApplication::translate("TrPreviewToolClass", "&File", nullptr)); + dwForms->setWindowTitle(QCoreApplication::translate("TrPreviewToolClass", "Forms", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/validators.ui b/tests/auto/tools/uic/baseline/validators.ui index f05b96fbe0..21c8353a48 100644 --- a/tests/auto/tools/uic/baseline/validators.ui +++ b/tests/auto/tools/uic/baseline/validators.ui @@ -179,7 +179,7 @@ <enum>Qt::Vertical</enum> </property> <property name="sizeType" > - <enum>QSizePolicy::Fixed</enum> + <enum>QSizePolicy::Policy::Fixed</enum> </property> <property name="sizeHint" > <size> @@ -370,7 +370,7 @@ <enum>Qt::Vertical</enum> </property> <property name="sizeType" > - <enum>QSizePolicy::Fixed</enum> + <enum>QSizePolicy::Policy::Fixed</enum> </property> <property name="sizeHint" > <size> diff --git a/tests/auto/tools/uic/baseline/validators.ui.h b/tests/auto/tools/uic/baseline/validators.ui.h index d0ae777f65..9ecc36ac00 100644 --- a/tests/auto/tools/uic/baseline/validators.ui.h +++ b/tests/auto/tools/uic/baseline/validators.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'validators.ui' ** -** Created by: Qt User Interface Compiler version 5.12.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -76,7 +76,7 @@ public: void setupUi(QWidget *ValidatorsForm) { if (ValidatorsForm->objectName().isEmpty()) - ValidatorsForm->setObjectName(QString::fromUtf8("ValidatorsForm")); + ValidatorsForm->setObjectName("ValidatorsForm"); ValidatorsForm->resize(526, 668); vboxLayout = new QVBoxLayout(ValidatorsForm); #ifndef Q_OS_MAC @@ -85,7 +85,7 @@ public: #ifndef Q_OS_MAC vboxLayout->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); hboxLayout = new QHBoxLayout(); #ifndef Q_OS_MAC hboxLayout->setSpacing(6); @@ -93,13 +93,13 @@ public: #ifndef Q_OS_MAC hboxLayout->setContentsMargins(0, 0, 0, 0); #endif - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + hboxLayout->setObjectName("hboxLayout"); localeSelector = new LocaleSelector(ValidatorsForm); - localeSelector->setObjectName(QString::fromUtf8("localeSelector")); + localeSelector->setObjectName("localeSelector"); hboxLayout->addWidget(localeSelector); - spacerItem = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacerItem = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); hboxLayout->addItem(spacerItem); @@ -107,7 +107,7 @@ public: vboxLayout->addLayout(hboxLayout); groupBox = new QGroupBox(ValidatorsForm); - groupBox->setObjectName(QString::fromUtf8("groupBox")); + groupBox->setObjectName("groupBox"); vboxLayout1 = new QVBoxLayout(groupBox); #ifndef Q_OS_MAC vboxLayout1->setSpacing(6); @@ -115,7 +115,7 @@ public: #ifndef Q_OS_MAC vboxLayout1->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout1->setObjectName("vboxLayout1"); hboxLayout1 = new QHBoxLayout(); #ifndef Q_OS_MAC hboxLayout1->setSpacing(6); @@ -123,7 +123,7 @@ public: #ifndef Q_OS_MAC hboxLayout1->setContentsMargins(0, 0, 0, 0); #endif - hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + hboxLayout1->setObjectName("hboxLayout1"); gridLayout = new QGridLayout(); #ifndef Q_OS_MAC gridLayout->setSpacing(6); @@ -131,16 +131,16 @@ public: #ifndef Q_OS_MAC gridLayout->setContentsMargins(0, 0, 0, 0); #endif - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); label = new QLabel(groupBox); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName("label"); label->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); gridLayout->addWidget(label, 0, 0, 1, 1); minVal = new QSpinBox(groupBox); - minVal->setObjectName(QString::fromUtf8("minVal")); - QSizePolicy sizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); + minVal->setObjectName("minVal"); + QSizePolicy sizePolicy(QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Fixed); sizePolicy.setHorizontalStretch(1); sizePolicy.setVerticalStretch(0); sizePolicy.setHeightForWidth(minVal->sizePolicy().hasHeightForWidth()); @@ -151,13 +151,13 @@ public: gridLayout->addWidget(minVal, 0, 1, 1, 1); label_2 = new QLabel(groupBox); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName("label_2"); label_2->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); gridLayout->addWidget(label_2, 1, 0, 1, 1); maxVal = new QSpinBox(groupBox); - maxVal->setObjectName(QString::fromUtf8("maxVal")); + maxVal->setObjectName("maxVal"); sizePolicy.setHeightForWidth(maxVal->sizePolicy().hasHeightForWidth()); maxVal->setSizePolicy(sizePolicy); maxVal->setMinimum(-1000000); @@ -170,7 +170,7 @@ public: hboxLayout1->addLayout(gridLayout); frame = new QFrame(groupBox); - frame->setObjectName(QString::fromUtf8("frame")); + frame->setObjectName("frame"); frame->setFrameShape(QFrame::StyledPanel); frame->setFrameShadow(QFrame::Sunken); vboxLayout2 = new QVBoxLayout(frame); @@ -180,10 +180,10 @@ public: #ifndef Q_OS_MAC vboxLayout2->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2")); + vboxLayout2->setObjectName("vboxLayout2"); ledWidget = new LEDWidget(frame); - ledWidget->setObjectName(QString::fromUtf8("ledWidget")); - QSizePolicy sizePolicy1(QSizePolicy::Preferred, QSizePolicy::Fixed); + ledWidget->setObjectName("ledWidget"); + QSizePolicy sizePolicy1(QSizePolicy::Policy::Preferred, QSizePolicy::Policy::Fixed); sizePolicy1.setHorizontalStretch(0); sizePolicy1.setVerticalStretch(0); sizePolicy1.setHeightForWidth(ledWidget->sizePolicy().hasHeightForWidth()); @@ -194,7 +194,7 @@ public: vboxLayout2->addWidget(ledWidget); label_7 = new QLabel(frame); - label_7->setObjectName(QString::fromUtf8("label_7")); + label_7->setObjectName("label_7"); vboxLayout2->addWidget(label_7); @@ -204,12 +204,12 @@ public: vboxLayout1->addLayout(hboxLayout1); - spacerItem1 = new QSpacerItem(20, 20, QSizePolicy::Minimum, QSizePolicy::Fixed); + spacerItem1 = new QSpacerItem(20, 20, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Fixed); vboxLayout1->addItem(spacerItem1); editor = new QLineEdit(groupBox); - editor->setObjectName(QString::fromUtf8("editor")); + editor->setObjectName("editor"); vboxLayout1->addWidget(editor); @@ -217,7 +217,7 @@ public: vboxLayout->addWidget(groupBox); groupBox_2 = new QGroupBox(ValidatorsForm); - groupBox_2->setObjectName(QString::fromUtf8("groupBox_2")); + groupBox_2->setObjectName("groupBox_2"); vboxLayout3 = new QVBoxLayout(groupBox_2); #ifndef Q_OS_MAC vboxLayout3->setSpacing(6); @@ -225,7 +225,7 @@ public: #ifndef Q_OS_MAC vboxLayout3->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout3->setObjectName(QString::fromUtf8("vboxLayout3")); + vboxLayout3->setObjectName("vboxLayout3"); hboxLayout2 = new QHBoxLayout(); #ifndef Q_OS_MAC hboxLayout2->setSpacing(6); @@ -233,7 +233,7 @@ public: #ifndef Q_OS_MAC hboxLayout2->setContentsMargins(0, 0, 0, 0); #endif - hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2")); + hboxLayout2->setObjectName("hboxLayout2"); gridLayout1 = new QGridLayout(); #ifndef Q_OS_MAC gridLayout1->setSpacing(6); @@ -241,15 +241,15 @@ public: #ifndef Q_OS_MAC gridLayout1->setContentsMargins(0, 0, 0, 0); #endif - gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); + gridLayout1->setObjectName("gridLayout1"); label_3 = new QLabel(groupBox_2); - label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setObjectName("label_3"); label_3->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); gridLayout1->addWidget(label_3, 0, 0, 1, 1); doubleMinVal = new QDoubleSpinBox(groupBox_2); - doubleMinVal->setObjectName(QString::fromUtf8("doubleMinVal")); + doubleMinVal->setObjectName("doubleMinVal"); sizePolicy.setHeightForWidth(doubleMinVal->sizePolicy().hasHeightForWidth()); doubleMinVal->setSizePolicy(sizePolicy); doubleMinVal->setMinimum(-100000.000000000000000); @@ -259,7 +259,7 @@ public: gridLayout1->addWidget(doubleMinVal, 0, 1, 1, 1); label_5 = new QLabel(groupBox_2); - label_5->setObjectName(QString::fromUtf8("label_5")); + label_5->setObjectName("label_5"); label_5->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); gridLayout1->addWidget(label_5, 0, 2, 1, 1); @@ -267,18 +267,18 @@ public: doubleFormat = new QComboBox(groupBox_2); doubleFormat->addItem(QString()); doubleFormat->addItem(QString()); - doubleFormat->setObjectName(QString::fromUtf8("doubleFormat")); + doubleFormat->setObjectName("doubleFormat"); gridLayout1->addWidget(doubleFormat, 0, 3, 1, 1); label_4 = new QLabel(groupBox_2); - label_4->setObjectName(QString::fromUtf8("label_4")); + label_4->setObjectName("label_4"); label_4->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); gridLayout1->addWidget(label_4, 1, 0, 1, 1); doubleMaxVal = new QDoubleSpinBox(groupBox_2); - doubleMaxVal->setObjectName(QString::fromUtf8("doubleMaxVal")); + doubleMaxVal->setObjectName("doubleMaxVal"); sizePolicy.setHeightForWidth(doubleMaxVal->sizePolicy().hasHeightForWidth()); doubleMaxVal->setSizePolicy(sizePolicy); doubleMaxVal->setMinimum(-100000.000000000000000); @@ -288,13 +288,13 @@ public: gridLayout1->addWidget(doubleMaxVal, 1, 1, 1, 1); label_6 = new QLabel(groupBox_2); - label_6->setObjectName(QString::fromUtf8("label_6")); + label_6->setObjectName("label_6"); label_6->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); gridLayout1->addWidget(label_6, 1, 2, 1, 1); doubleDecimals = new QSpinBox(groupBox_2); - doubleDecimals->setObjectName(QString::fromUtf8("doubleDecimals")); + doubleDecimals->setObjectName("doubleDecimals"); doubleDecimals->setValue(2); gridLayout1->addWidget(doubleDecimals, 1, 3, 1, 1); @@ -303,7 +303,7 @@ public: hboxLayout2->addLayout(gridLayout1); frame_2 = new QFrame(groupBox_2); - frame_2->setObjectName(QString::fromUtf8("frame_2")); + frame_2->setObjectName("frame_2"); frame_2->setFrameShape(QFrame::StyledPanel); frame_2->setFrameShadow(QFrame::Sunken); vboxLayout4 = new QVBoxLayout(frame_2); @@ -313,16 +313,16 @@ public: #ifndef Q_OS_MAC vboxLayout4->setContentsMargins(9, 9, 9, 9); #endif - vboxLayout4->setObjectName(QString::fromUtf8("vboxLayout4")); + vboxLayout4->setObjectName("vboxLayout4"); doubleLedWidget = new LEDWidget(frame_2); - doubleLedWidget->setObjectName(QString::fromUtf8("doubleLedWidget")); + doubleLedWidget->setObjectName("doubleLedWidget"); doubleLedWidget->setPixmap(QPixmap(QString::fromUtf8(":/ledoff.png"))); doubleLedWidget->setAlignment(Qt::AlignCenter); vboxLayout4->addWidget(doubleLedWidget); label_8 = new QLabel(frame_2); - label_8->setObjectName(QString::fromUtf8("label_8")); + label_8->setObjectName("label_8"); vboxLayout4->addWidget(label_8); @@ -332,19 +332,19 @@ public: vboxLayout3->addLayout(hboxLayout2); - spacerItem2 = new QSpacerItem(20, 20, QSizePolicy::Minimum, QSizePolicy::Fixed); + spacerItem2 = new QSpacerItem(20, 20, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Fixed); vboxLayout3->addItem(spacerItem2); doubleEditor = new QLineEdit(groupBox_2); - doubleEditor->setObjectName(QString::fromUtf8("doubleEditor")); + doubleEditor->setObjectName("doubleEditor"); vboxLayout3->addWidget(doubleEditor); vboxLayout->addWidget(groupBox_2); - spacerItem3 = new QSpacerItem(20, 111, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem3 = new QSpacerItem(20, 111, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Expanding); vboxLayout->addItem(spacerItem3); @@ -353,13 +353,13 @@ public: hboxLayout3->setSpacing(6); #endif hboxLayout3->setContentsMargins(0, 0, 0, 0); - hboxLayout3->setObjectName(QString::fromUtf8("hboxLayout3")); - spacerItem4 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + hboxLayout3->setObjectName("hboxLayout3"); + spacerItem4 = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); hboxLayout3->addItem(spacerItem4); pushButton = new QPushButton(ValidatorsForm); - pushButton->setObjectName(QString::fromUtf8("pushButton")); + pushButton->setObjectName("pushButton"); hboxLayout3->addWidget(pushButton); @@ -368,29 +368,29 @@ public: retranslateUi(ValidatorsForm); - QObject::connect(pushButton, SIGNAL(clicked()), ValidatorsForm, SLOT(close())); + QObject::connect(pushButton, &QPushButton::clicked, ValidatorsForm, qOverload<>(&QWidget::close)); QMetaObject::connectSlotsByName(ValidatorsForm); } // setupUi void retranslateUi(QWidget *ValidatorsForm) { - ValidatorsForm->setWindowTitle(QApplication::translate("ValidatorsForm", "Form", nullptr)); - groupBox->setTitle(QApplication::translate("ValidatorsForm", "QIntValidator", nullptr)); - label->setText(QApplication::translate("ValidatorsForm", "Min:", nullptr)); - label_2->setText(QApplication::translate("ValidatorsForm", "Max:", nullptr)); - label_7->setText(QApplication::translate("ValidatorsForm", "editingFinished()", nullptr)); - groupBox_2->setTitle(QApplication::translate("ValidatorsForm", "QDoubleValidator", nullptr)); - label_3->setText(QApplication::translate("ValidatorsForm", "Min:", nullptr)); - label_5->setText(QApplication::translate("ValidatorsForm", "Format:", nullptr)); - doubleFormat->setItemText(0, QApplication::translate("ValidatorsForm", "Standard", nullptr)); - doubleFormat->setItemText(1, QApplication::translate("ValidatorsForm", "Scientific", nullptr)); - - label_4->setText(QApplication::translate("ValidatorsForm", "Max:", nullptr)); - label_6->setText(QApplication::translate("ValidatorsForm", "Decimals:", nullptr)); + ValidatorsForm->setWindowTitle(QCoreApplication::translate("ValidatorsForm", "Form", nullptr)); + groupBox->setTitle(QCoreApplication::translate("ValidatorsForm", "QIntValidator", nullptr)); + label->setText(QCoreApplication::translate("ValidatorsForm", "Min:", nullptr)); + label_2->setText(QCoreApplication::translate("ValidatorsForm", "Max:", nullptr)); + label_7->setText(QCoreApplication::translate("ValidatorsForm", "editingFinished()", nullptr)); + groupBox_2->setTitle(QCoreApplication::translate("ValidatorsForm", "QDoubleValidator", nullptr)); + label_3->setText(QCoreApplication::translate("ValidatorsForm", "Min:", nullptr)); + label_5->setText(QCoreApplication::translate("ValidatorsForm", "Format:", nullptr)); + doubleFormat->setItemText(0, QCoreApplication::translate("ValidatorsForm", "Standard", nullptr)); + doubleFormat->setItemText(1, QCoreApplication::translate("ValidatorsForm", "Scientific", nullptr)); + + label_4->setText(QCoreApplication::translate("ValidatorsForm", "Max:", nullptr)); + label_6->setText(QCoreApplication::translate("ValidatorsForm", "Decimals:", nullptr)); doubleLedWidget->setText(QString()); - label_8->setText(QApplication::translate("ValidatorsForm", "editingFinished()", nullptr)); - pushButton->setText(QApplication::translate("ValidatorsForm", "Quit", nullptr)); + label_8->setText(QCoreApplication::translate("ValidatorsForm", "editingFinished()", nullptr)); + pushButton->setText(QCoreApplication::translate("ValidatorsForm", "Quit", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/wateringconfigdialog.ui b/tests/auto/tools/uic/baseline/wateringconfigdialog.ui index a7f5349d78..9bbe74631e 100644 --- a/tests/auto/tools/uic/baseline/wateringconfigdialog.ui +++ b/tests/auto/tools/uic/baseline/wateringconfigdialog.ui @@ -68,7 +68,7 @@ <enum>Qt::Vertical</enum> </property> <property name="sizeType" > - <enum>QSizePolicy::Fixed</enum> + <enum>QSizePolicy::Policy::Fixed</enum> </property> <property name="sizeHint" > <size> @@ -98,7 +98,7 @@ <enum>Qt::Horizontal</enum> </property> <property name="sizeType" > - <enum>QSizePolicy::Fixed</enum> + <enum>QSizePolicy::Policy::Fixed</enum> </property> <property name="sizeHint" > <size> @@ -156,7 +156,7 @@ <enum>Qt::Horizontal</enum> </property> <property name="sizeType" > - <enum>QSizePolicy::Fixed</enum> + <enum>QSizePolicy::Policy::Fixed</enum> </property> <property name="sizeHint" > <size> @@ -201,7 +201,7 @@ <enum>Qt::Vertical</enum> </property> <property name="sizeType" > - <enum>QSizePolicy::Fixed</enum> + <enum>QSizePolicy::Policy::Fixed</enum> </property> <property name="sizeHint" > <size> @@ -298,7 +298,7 @@ <enum>Qt::Vertical</enum> </property> <property name="sizeType" > - <enum>QSizePolicy::Fixed</enum> + <enum>QSizePolicy::Policy::Fixed</enum> </property> <property name="sizeHint" > <size> diff --git a/tests/auto/tools/uic/baseline/wateringconfigdialog.ui.h b/tests/auto/tools/uic/baseline/wateringconfigdialog.ui.h index d6f7ff5526..ee7f7333fc 100644 --- a/tests/auto/tools/uic/baseline/wateringconfigdialog.ui.h +++ b/tests/auto/tools/uic/baseline/wateringconfigdialog.ui.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'wateringconfigdialog.ui' ** -** Created by: Qt User Interface Compiler version 5.10.0 +** Created by: Qt User Interface Compiler version 6.0.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -10,6 +10,7 @@ #define WATERINGCONFIGDIALOG_H #include <QtCore/QVariant> +#include <QtWidgets/QAbstractButton> #include <QtWidgets/QApplication> #include <QtWidgets/QCheckBox> #include <QtWidgets/QComboBox> @@ -64,14 +65,14 @@ public: void setupUi(QDialog *WateringConfigDialog) { if (WateringConfigDialog->objectName().isEmpty()) - WateringConfigDialog->setObjectName(QString::fromUtf8("WateringConfigDialog")); + WateringConfigDialog->setObjectName("WateringConfigDialog"); WateringConfigDialog->resize(334, 550); vboxLayout = new QVBoxLayout(WateringConfigDialog); - vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + vboxLayout->setObjectName("vboxLayout"); gridLayout = new QGridLayout(); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout->setObjectName("gridLayout"); label_3 = new QLabel(WateringConfigDialog); - label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setObjectName("label_3"); gridLayout->addWidget(label_3, 0, 0, 1, 1); @@ -82,8 +83,8 @@ public: plantComboBox->addItem(QString()); plantComboBox->addItem(QString()); plantComboBox->addItem(QString()); - plantComboBox->setObjectName(QString::fromUtf8("plantComboBox")); - QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); + plantComboBox->setObjectName("plantComboBox"); + QSizePolicy sizePolicy(QSizePolicy::Policy::Preferred, QSizePolicy::Policy::Fixed); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); sizePolicy.setHeightForWidth(plantComboBox->sizePolicy().hasHeightForWidth()); @@ -91,26 +92,26 @@ public: gridLayout->addWidget(plantComboBox, 0, 1, 1, 3); - spacerItem = new QSpacerItem(67, 16, QSizePolicy::Minimum, QSizePolicy::Fixed); + spacerItem = new QSpacerItem(67, 16, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Fixed); gridLayout->addItem(spacerItem, 1, 0, 1, 1); label_2 = new QLabel(WateringConfigDialog); - label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setObjectName("label_2"); gridLayout->addWidget(label_2, 2, 0, 1, 1); temperatureCheckBox = new QCheckBox(WateringConfigDialog); - temperatureCheckBox->setObjectName(QString::fromUtf8("temperatureCheckBox")); + temperatureCheckBox->setObjectName("temperatureCheckBox"); gridLayout->addWidget(temperatureCheckBox, 3, 1, 1, 3); - spacerItem1 = new QSpacerItem(16, 20, QSizePolicy::Fixed, QSizePolicy::Minimum); + spacerItem1 = new QSpacerItem(16, 20, QSizePolicy::Policy::Fixed, QSizePolicy::Policy::Minimum); gridLayout->addItem(spacerItem1, 4, 1, 1, 1); temperatureSpinBox = new QSpinBox(WateringConfigDialog); - temperatureSpinBox->setObjectName(QString::fromUtf8("temperatureSpinBox")); + temperatureSpinBox->setObjectName("temperatureSpinBox"); temperatureSpinBox->setEnabled(false); temperatureSpinBox->setMinimum(10); temperatureSpinBox->setMaximum(60); @@ -118,51 +119,51 @@ public: gridLayout->addWidget(temperatureSpinBox, 4, 2, 1, 1); - spacerItem2 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacerItem2 = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); gridLayout->addItem(spacerItem2, 4, 3, 1, 1); rainCheckBox = new QCheckBox(WateringConfigDialog); - rainCheckBox->setObjectName(QString::fromUtf8("rainCheckBox")); + rainCheckBox->setObjectName("rainCheckBox"); gridLayout->addWidget(rainCheckBox, 5, 1, 1, 3); - spacerItem3 = new QSpacerItem(16, 20, QSizePolicy::Fixed, QSizePolicy::Minimum); + spacerItem3 = new QSpacerItem(16, 20, QSizePolicy::Policy::Fixed, QSizePolicy::Policy::Minimum); gridLayout->addItem(spacerItem3, 6, 1, 1, 1); rainSpinBox = new QSpinBox(WateringConfigDialog); - rainSpinBox->setObjectName(QString::fromUtf8("rainSpinBox")); + rainSpinBox->setObjectName("rainSpinBox"); rainSpinBox->setEnabled(false); rainSpinBox->setMinimum(1); gridLayout->addWidget(rainSpinBox, 6, 2, 1, 1); - spacerItem4 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacerItem4 = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); gridLayout->addItem(spacerItem4, 6, 3, 1, 1); - spacerItem5 = new QSpacerItem(20, 20, QSizePolicy::Minimum, QSizePolicy::Fixed); + spacerItem5 = new QSpacerItem(20, 20, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Fixed); gridLayout->addItem(spacerItem5, 7, 2, 1, 1); label = new QLabel(WateringConfigDialog); - label->setObjectName(QString::fromUtf8("label")); + label->setObjectName("label"); gridLayout->addWidget(label, 8, 0, 1, 1); startTimeEdit = new QTimeEdit(WateringConfigDialog); - startTimeEdit->setObjectName(QString::fromUtf8("startTimeEdit")); + startTimeEdit->setObjectName("startTimeEdit"); gridLayout->addWidget(startTimeEdit, 8, 1, 1, 3); label_4 = new QLabel(WateringConfigDialog); - label_4->setObjectName(QString::fromUtf8("label_4")); + label_4->setObjectName("label_4"); gridLayout->addWidget(label_4, 9, 0, 1, 1); amountSpinBox = new QSpinBox(WateringConfigDialog); - amountSpinBox->setObjectName(QString::fromUtf8("amountSpinBox")); + amountSpinBox->setObjectName("amountSpinBox"); amountSpinBox->setMinimum(100); amountSpinBox->setMaximum(10000); amountSpinBox->setSingleStep(100); @@ -171,7 +172,7 @@ public: gridLayout->addWidget(amountSpinBox, 9, 1, 1, 3); label_5 = new QLabel(WateringConfigDialog); - label_5->setObjectName(QString::fromUtf8("label_5")); + label_5->setObjectName("label_5"); gridLayout->addWidget(label_5, 10, 0, 1, 1); @@ -180,25 +181,25 @@ public: sourceComboBox->addItem(QString()); sourceComboBox->addItem(QString()); sourceComboBox->addItem(QString()); - sourceComboBox->setObjectName(QString::fromUtf8("sourceComboBox")); + sourceComboBox->setObjectName("sourceComboBox"); gridLayout->addWidget(sourceComboBox, 10, 1, 1, 3); label_6 = new QLabel(WateringConfigDialog); - label_6->setObjectName(QString::fromUtf8("label_6")); + label_6->setObjectName("label_6"); gridLayout->addWidget(label_6, 11, 0, 1, 1); filterCheckBox = new QCheckBox(WateringConfigDialog); - filterCheckBox->setObjectName(QString::fromUtf8("filterCheckBox")); + filterCheckBox->setObjectName("filterCheckBox"); gridLayout->addWidget(filterCheckBox, 11, 1, 1, 2); - spacerItem6 = new QSpacerItem(20, 10, QSizePolicy::Minimum, QSizePolicy::Fixed); + spacerItem6 = new QSpacerItem(20, 10, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Fixed); gridLayout->addItem(spacerItem6, 12, 0, 1, 1); - spacerItem7 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacerItem7 = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); gridLayout->addItem(spacerItem7, 4, 4, 1, 1); @@ -206,18 +207,18 @@ public: vboxLayout->addLayout(gridLayout); gridLayout1 = new QGridLayout(); - gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); - spacerItem8 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + gridLayout1->setObjectName("gridLayout1"); + spacerItem8 = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); gridLayout1->addItem(spacerItem8, 0, 1, 1, 1); helpBrowser = new HelpBrowser(WateringConfigDialog); - helpBrowser->setObjectName(QString::fromUtf8("helpBrowser")); + helpBrowser->setObjectName("helpBrowser"); gridLayout1->addWidget(helpBrowser, 1, 0, 1, 2); helpLabel = new QLabel(WateringConfigDialog); - helpLabel->setObjectName(QString::fromUtf8("helpLabel")); + helpLabel->setObjectName("helpLabel"); gridLayout1->addWidget(helpLabel, 0, 0, 1, 1); @@ -225,14 +226,14 @@ public: vboxLayout->addLayout(gridLayout1); line = new QFrame(WateringConfigDialog); - line->setObjectName(QString::fromUtf8("line")); - line->setFrameShape(QFrame::HLine); - line->setFrameShadow(QFrame::Sunken); + line->setObjectName("line"); + line->setFrameShape(QFrame::Shape::HLine); + line->setFrameShadow(QFrame::Shadow::Sunken); vboxLayout->addWidget(line); buttonBox = new QDialogButtonBox(WateringConfigDialog); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setObjectName("buttonBox"); buttonBox->setOrientation(Qt::Horizontal); buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok); @@ -240,44 +241,44 @@ public: retranslateUi(WateringConfigDialog); - QObject::connect(buttonBox, SIGNAL(accepted()), WateringConfigDialog, SLOT(accept())); - QObject::connect(buttonBox, SIGNAL(rejected()), WateringConfigDialog, SLOT(reject())); - QObject::connect(temperatureCheckBox, SIGNAL(toggled(bool)), temperatureSpinBox, SLOT(setEnabled(bool))); - QObject::connect(rainCheckBox, SIGNAL(toggled(bool)), rainSpinBox, SLOT(setEnabled(bool))); + QObject::connect(buttonBox, &QDialogButtonBox::accepted, WateringConfigDialog, qOverload<>(&QDialog::accept)); + QObject::connect(buttonBox, &QDialogButtonBox::rejected, WateringConfigDialog, qOverload<>(&QDialog::reject)); + QObject::connect(temperatureCheckBox, &QCheckBox::toggled, temperatureSpinBox, &QSpinBox::setEnabled); + QObject::connect(rainCheckBox, &QCheckBox::toggled, rainSpinBox, &QSpinBox::setEnabled); QMetaObject::connectSlotsByName(WateringConfigDialog); } // setupUi void retranslateUi(QDialog *WateringConfigDialog) { - WateringConfigDialog->setWindowTitle(QApplication::translate("WateringConfigDialog", "Watering Configuration", nullptr)); - label_3->setText(QApplication::translate("WateringConfigDialog", "Plant:", nullptr)); - plantComboBox->setItemText(0, QApplication::translate("WateringConfigDialog", "Squash", nullptr)); - plantComboBox->setItemText(1, QApplication::translate("WateringConfigDialog", "Bean", nullptr)); - plantComboBox->setItemText(2, QApplication::translate("WateringConfigDialog", "Carrot", nullptr)); - plantComboBox->setItemText(3, QApplication::translate("WateringConfigDialog", "Strawberry", nullptr)); - plantComboBox->setItemText(4, QApplication::translate("WateringConfigDialog", "Raspberry", nullptr)); - plantComboBox->setItemText(5, QApplication::translate("WateringConfigDialog", "Blueberry", nullptr)); - - label_2->setText(QApplication::translate("WateringConfigDialog", "Water when:", nullptr)); - temperatureCheckBox->setText(QApplication::translate("WateringConfigDialog", "Temperature is higher than:", nullptr)); + WateringConfigDialog->setWindowTitle(QCoreApplication::translate("WateringConfigDialog", "Watering Configuration", nullptr)); + label_3->setText(QCoreApplication::translate("WateringConfigDialog", "Plant:", nullptr)); + plantComboBox->setItemText(0, QCoreApplication::translate("WateringConfigDialog", "Squash", nullptr)); + plantComboBox->setItemText(1, QCoreApplication::translate("WateringConfigDialog", "Bean", nullptr)); + plantComboBox->setItemText(2, QCoreApplication::translate("WateringConfigDialog", "Carrot", nullptr)); + plantComboBox->setItemText(3, QCoreApplication::translate("WateringConfigDialog", "Strawberry", nullptr)); + plantComboBox->setItemText(4, QCoreApplication::translate("WateringConfigDialog", "Raspberry", nullptr)); + plantComboBox->setItemText(5, QCoreApplication::translate("WateringConfigDialog", "Blueberry", nullptr)); + + label_2->setText(QCoreApplication::translate("WateringConfigDialog", "Water when:", nullptr)); + temperatureCheckBox->setText(QCoreApplication::translate("WateringConfigDialog", "Temperature is higher than:", nullptr)); temperatureSpinBox->setSpecialValueText(QString()); - temperatureSpinBox->setSuffix(QApplication::translate("WateringConfigDialog", "C", nullptr)); - rainCheckBox->setText(QApplication::translate("WateringConfigDialog", "Rain less than:", nullptr)); + temperatureSpinBox->setSuffix(QCoreApplication::translate("WateringConfigDialog", "C", nullptr)); + rainCheckBox->setText(QCoreApplication::translate("WateringConfigDialog", "Rain less than:", nullptr)); rainSpinBox->setSpecialValueText(QString()); - rainSpinBox->setSuffix(QApplication::translate("WateringConfigDialog", "mm", nullptr)); - label->setText(QApplication::translate("WateringConfigDialog", "Starting Time:", nullptr)); - label_4->setText(QApplication::translate("WateringConfigDialog", "Amount:", nullptr)); - amountSpinBox->setSuffix(QApplication::translate("WateringConfigDialog", "l", nullptr)); - label_5->setText(QApplication::translate("WateringConfigDialog", "Source:", nullptr)); - sourceComboBox->setItemText(0, QApplication::translate("WateringConfigDialog", "Foundain", nullptr)); - sourceComboBox->setItemText(1, QApplication::translate("WateringConfigDialog", "River", nullptr)); - sourceComboBox->setItemText(2, QApplication::translate("WateringConfigDialog", "Lake", nullptr)); - sourceComboBox->setItemText(3, QApplication::translate("WateringConfigDialog", "Public Water System", nullptr)); - - label_6->setText(QApplication::translate("WateringConfigDialog", "Filter:", nullptr)); + rainSpinBox->setSuffix(QCoreApplication::translate("WateringConfigDialog", "mm", nullptr)); + label->setText(QCoreApplication::translate("WateringConfigDialog", "Starting Time:", nullptr)); + label_4->setText(QCoreApplication::translate("WateringConfigDialog", "Amount:", nullptr)); + amountSpinBox->setSuffix(QCoreApplication::translate("WateringConfigDialog", "l", nullptr)); + label_5->setText(QCoreApplication::translate("WateringConfigDialog", "Source:", nullptr)); + sourceComboBox->setItemText(0, QCoreApplication::translate("WateringConfigDialog", "Foundain", nullptr)); + sourceComboBox->setItemText(1, QCoreApplication::translate("WateringConfigDialog", "River", nullptr)); + sourceComboBox->setItemText(2, QCoreApplication::translate("WateringConfigDialog", "Lake", nullptr)); + sourceComboBox->setItemText(3, QCoreApplication::translate("WateringConfigDialog", "Public Water System", nullptr)); + + label_6->setText(QCoreApplication::translate("WateringConfigDialog", "Filter:", nullptr)); filterCheckBox->setText(QString()); - helpLabel->setText(QApplication::translate("WateringConfigDialog", "<a href=\"test\">Show Details</a>", nullptr)); + helpLabel->setText(QCoreApplication::translate("WateringConfigDialog", "<a href=\"test\">Show Details</a>", nullptr)); } // retranslateUi }; diff --git a/tests/auto/tools/uic/baseline/window.ui b/tests/auto/tools/uic/baseline/window.ui new file mode 100644 index 0000000000..2b0dd5c141 --- /dev/null +++ b/tests/auto/tools/uic/baseline/window.ui @@ -0,0 +1,250 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Tests that custom slots on the form use string-based connections. Source: svggenerator --> +<ui version="4.0"> + <class>Window</class> + <widget class="QWidget" name="Window"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>339</width> + <height>353</height> + </rect> + </property> + <property name="windowTitle"> + <string>SVG Generator</string> + </property> + <layout class="QGridLayout" name="gridLayout_2"> + <property name="sizeConstraint"> + <enum>QLayout::SetFixedSize</enum> + </property> + <item row="0" column="0"> + <spacer name="horizontalSpacer_2"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item row="0" column="1"> + <widget class="DisplayWidget" name="displayWidget" native="true"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>200</horstretch> + <verstretch>200</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>200</width> + <height>200</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>200</width> + <height>200</height> + </size> + </property> + </widget> + </item> + <item row="0" column="2"> + <spacer name="horizontalSpacer_3"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item row="1" column="0" colspan="3"> + <layout class="QGridLayout" name="gridLayout"> + <item row="0" column="0"> + <widget class="QLabel" name="label"> + <property name="text"> + <string>&Shape:</string> + </property> + <property name="buddy"> + <cstring>shapeComboBox</cstring> + </property> + </widget> + </item> + <item row="0" column="1"> + <widget class="QComboBox" name="shapeComboBox"> + <item> + <property name="text"> + <string>House</string> + </property> + </item> + <item> + <property name="text"> + <string>Car</string> + </property> + </item> + </widget> + </item> + <item row="1" column="0"> + <widget class="QLabel" name="label_2"> + <property name="text"> + <string>&Color:</string> + </property> + <property name="buddy"> + <cstring>colorButton</cstring> + </property> + </widget> + </item> + <item row="1" column="1"> + <widget class="QToolButton" name="colorButton"> + <property name="text"> + <string>Choose Color...</string> + </property> + </widget> + </item> + <item row="2" column="0"> + <widget class="QLabel" name="label_3"> + <property name="text"> + <string>&Background:</string> + </property> + <property name="buddy"> + <cstring>shapeComboBox_2</cstring> + </property> + </widget> + </item> + <item row="2" column="1"> + <widget class="QComboBox" name="shapeComboBox_2"> + <item> + <property name="text"> + <string>Sky</string> + </property> + </item> + <item> + <property name="text"> + <string>Trees</string> + </property> + </item> + <item> + <property name="text"> + <string>Road</string> + </property> + </item> + </widget> + </item> + </layout> + </item> + <item row="2" column="0" colspan="3"> + <layout class="QHBoxLayout" name="horizontalLayout"> + <item> + <spacer name="horizontalSpacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QToolButton" name="toolButton_2"> + <property name="text"> + <string>Save &As...</string> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + <customwidgets> + <customwidget> + <class>DisplayWidget</class> + <extends>QWidget</extends> + <header>displaywidget.h</header> + <container>1</container> + </customwidget> + </customwidgets> + <resources/> + <connections> + <connection> + <sender>shapeComboBox</sender> + <signal>currentIndexChanged(int)</signal> + <receiver>Window</receiver> + <slot>updateShape(int)</slot> + <hints> + <hint type="sourcelabel"> + <x>288</x> + <y>232</y> + </hint> + <hint type="destinationlabel"> + <x>336</x> + <y>234</y> + </hint> + </hints> + </connection> + <connection> + <sender>colorButton</sender> + <signal>clicked()</signal> + <receiver>Window</receiver> + <slot>updateColor()</slot> + <hints> + <hint type="sourcelabel"> + <x>301</x> + <y>262</y> + </hint> + <hint type="destinationlabel"> + <x>337</x> + <y>267</y> + </hint> + </hints> + </connection> + <connection> + <sender>shapeComboBox_2</sender> + <signal>currentIndexChanged(int)</signal> + <receiver>Window</receiver> + <slot>updateBackground(int)</slot> + <hints> + <hint type="sourcelabel"> + <x>306</x> + <y>299</y> + </hint> + <hint type="destinationlabel"> + <x>337</x> + <y>311</y> + </hint> + </hints> + </connection> + <connection> + <sender>toolButton_2</sender> + <signal>clicked()</signal> + <receiver>Window</receiver> + <slot>saveSvg()</slot> + <hints> + <hint type="sourcelabel"> + <x>298</x> + <y>336</y> + </hint> + <hint type="destinationlabel"> + <x>307</x> + <y>348</y> + </hint> + </hints> + </connection> + </connections> + <slots> + <slot>updateBackground(int)</slot> + <slot>updateColor()</slot> + <slot>updateShape(int)</slot> + <slot>saveSvg()</slot> + </slots> +</ui> diff --git a/tests/auto/tools/uic/baseline/window.ui.h b/tests/auto/tools/uic/baseline/window.ui.h new file mode 100644 index 0000000000..1faa787e49 --- /dev/null +++ b/tests/auto/tools/uic/baseline/window.ui.h @@ -0,0 +1,165 @@ +/******************************************************************************** +** Form generated from reading UI file 'window.ui' +** +** Created by: Qt User Interface Compiler version 6.0.0 +** +** WARNING! All changes made in this file will be lost when recompiling UI file! +********************************************************************************/ + +#ifndef WINDOW_H +#define WINDOW_H + +#include <QtCore/QVariant> +#include <QtWidgets/QApplication> +#include <QtWidgets/QComboBox> +#include <QtWidgets/QGridLayout> +#include <QtWidgets/QHBoxLayout> +#include <QtWidgets/QLabel> +#include <QtWidgets/QSpacerItem> +#include <QtWidgets/QToolButton> +#include <QtWidgets/QWidget> +#include "displaywidget.h" + +QT_BEGIN_NAMESPACE + +class Ui_Window +{ +public: + QGridLayout *gridLayout_2; + QSpacerItem *horizontalSpacer_2; + DisplayWidget *displayWidget; + QSpacerItem *horizontalSpacer_3; + QGridLayout *gridLayout; + QLabel *label; + QComboBox *shapeComboBox; + QLabel *label_2; + QToolButton *colorButton; + QLabel *label_3; + QComboBox *shapeComboBox_2; + QHBoxLayout *horizontalLayout; + QSpacerItem *horizontalSpacer; + QToolButton *toolButton_2; + + void setupUi(QWidget *Window) + { + if (Window->objectName().isEmpty()) + Window->setObjectName("Window"); + Window->resize(339, 353); + gridLayout_2 = new QGridLayout(Window); + gridLayout_2->setObjectName("gridLayout_2"); + gridLayout_2->setSizeConstraint(QLayout::SetFixedSize); + horizontalSpacer_2 = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); + + gridLayout_2->addItem(horizontalSpacer_2, 0, 0, 1, 1); + + displayWidget = new DisplayWidget(Window); + displayWidget->setObjectName("displayWidget"); + QSizePolicy sizePolicy(QSizePolicy::Policy::Fixed, QSizePolicy::Policy::Fixed); + sizePolicy.setHorizontalStretch(200); + sizePolicy.setVerticalStretch(200); + sizePolicy.setHeightForWidth(displayWidget->sizePolicy().hasHeightForWidth()); + displayWidget->setSizePolicy(sizePolicy); + displayWidget->setMinimumSize(QSize(200, 200)); + displayWidget->setMaximumSize(QSize(200, 200)); + + gridLayout_2->addWidget(displayWidget, 0, 1, 1, 1); + + horizontalSpacer_3 = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); + + gridLayout_2->addItem(horizontalSpacer_3, 0, 2, 1, 1); + + gridLayout = new QGridLayout(); + gridLayout->setObjectName("gridLayout"); + label = new QLabel(Window); + label->setObjectName("label"); + + gridLayout->addWidget(label, 0, 0, 1, 1); + + shapeComboBox = new QComboBox(Window); + shapeComboBox->addItem(QString()); + shapeComboBox->addItem(QString()); + shapeComboBox->setObjectName("shapeComboBox"); + + gridLayout->addWidget(shapeComboBox, 0, 1, 1, 1); + + label_2 = new QLabel(Window); + label_2->setObjectName("label_2"); + + gridLayout->addWidget(label_2, 1, 0, 1, 1); + + colorButton = new QToolButton(Window); + colorButton->setObjectName("colorButton"); + + gridLayout->addWidget(colorButton, 1, 1, 1, 1); + + label_3 = new QLabel(Window); + label_3->setObjectName("label_3"); + + gridLayout->addWidget(label_3, 2, 0, 1, 1); + + shapeComboBox_2 = new QComboBox(Window); + shapeComboBox_2->addItem(QString()); + shapeComboBox_2->addItem(QString()); + shapeComboBox_2->addItem(QString()); + shapeComboBox_2->setObjectName("shapeComboBox_2"); + + gridLayout->addWidget(shapeComboBox_2, 2, 1, 1, 1); + + + gridLayout_2->addLayout(gridLayout, 1, 0, 1, 3); + + horizontalLayout = new QHBoxLayout(); + horizontalLayout->setObjectName("horizontalLayout"); + horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); + + horizontalLayout->addItem(horizontalSpacer); + + toolButton_2 = new QToolButton(Window); + toolButton_2->setObjectName("toolButton_2"); + + horizontalLayout->addWidget(toolButton_2); + + + gridLayout_2->addLayout(horizontalLayout, 2, 0, 1, 3); + +#if QT_CONFIG(shortcut) + label->setBuddy(shapeComboBox); + label_2->setBuddy(colorButton); + label_3->setBuddy(shapeComboBox_2); +#endif // QT_CONFIG(shortcut) + + retranslateUi(Window); + QObject::connect(shapeComboBox, SIGNAL(currentIndexChanged(int)), Window, SLOT(updateShape(int))); + QObject::connect(colorButton, SIGNAL(clicked()), Window, SLOT(updateColor())); + QObject::connect(shapeComboBox_2, SIGNAL(currentIndexChanged(int)), Window, SLOT(updateBackground(int))); + QObject::connect(toolButton_2, SIGNAL(clicked()), Window, SLOT(saveSvg())); + + QMetaObject::connectSlotsByName(Window); + } // setupUi + + void retranslateUi(QWidget *Window) + { + Window->setWindowTitle(QCoreApplication::translate("Window", "SVG Generator", nullptr)); + label->setText(QCoreApplication::translate("Window", "&Shape:", nullptr)); + shapeComboBox->setItemText(0, QCoreApplication::translate("Window", "House", nullptr)); + shapeComboBox->setItemText(1, QCoreApplication::translate("Window", "Car", nullptr)); + + label_2->setText(QCoreApplication::translate("Window", "&Color:", nullptr)); + colorButton->setText(QCoreApplication::translate("Window", "Choose Color...", nullptr)); + label_3->setText(QCoreApplication::translate("Window", "&Background:", nullptr)); + shapeComboBox_2->setItemText(0, QCoreApplication::translate("Window", "Sky", nullptr)); + shapeComboBox_2->setItemText(1, QCoreApplication::translate("Window", "Trees", nullptr)); + shapeComboBox_2->setItemText(2, QCoreApplication::translate("Window", "Road", nullptr)); + + toolButton_2->setText(QCoreApplication::translate("Window", "Save &As...", nullptr)); + } // retranslateUi + +}; + +namespace Ui { + class Window: public Ui_Window {}; +} // namespace Ui + +QT_END_NAMESPACE + +#endif // WINDOW_H diff --git a/tests/auto/tools/uic/tst_uic.cpp b/tests/auto/tools/uic/tst_uic.cpp index 85668c96d4..a15b8928a1 100644 --- a/tests/auto/tools/uic/tst_uic.cpp +++ b/tests/auto/tools/uic/tst_uic.cpp @@ -1,47 +1,49 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QtCore/QDir> #include <QtCore/QString> -#include <QtTest/QtTest> +#include <QTest> #include <QtCore/QProcess> #include <QtCore/QByteArray> #include <QtCore/QLibraryInfo> #include <QtCore/QTemporaryDir> #include <QtCore/QRegularExpression> #include <QtCore/QStandardPaths> +#include <QtCore/QList> + +#include <cstdio> + +static const char keepEnvVar[] = "UIC_KEEP_GENERATED_FILES"; +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 uiFileName; + QString baseLineFileName; + QString generatedFileName; + Flags flags; +}; + +Q_DECLARE_OPERATORS_FOR_FLAGS(TestEntry::Flags) class tst_uic : public QObject { Q_OBJECT public: + using TestEntries = QList<TestEntry>; + tst_uic(); private Q_SLOTS: @@ -58,18 +60,28 @@ private Q_SLOTS: void compare(); void compare_data() const; + void pythonCompile(); + void pythonCompile_data() const; + void runCompare(); private: + void populateTestEntries(); + const QString m_command; QString m_baseline; QTemporaryDir m_generated; + TestEntries m_testEntries; QRegularExpression m_versionRegexp; + 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("\\*\\* Created by: Qt User Interface Compiler version \\d{1,2}\\.\\d{1,2}\\.\\d{1,2}")) + : m_command(QLibraryInfo::path(QLibraryInfo::LibraryExecutablesPath) + QLatin1String("/uic")) + , m_versionRegexp(QLatin1String(versionRegexp)) { } @@ -80,6 +92,34 @@ static QByteArray msgProcessStartFailed(const QString &command, const QString &w return result.toLocal8Bit(); } +// Locate Python and check whether Qt for Python is installed +static QString locatePython(QTemporaryDir &generatedDir) +{ + QString python = QStandardPaths::findExecutable(QLatin1String("python")); + if (python.isEmpty()) { + qWarning("Cannot locate python, skipping tests"); + return QString(); + } + QFile importTestFile(generatedDir.filePath(QLatin1String("import_test.py"))); + if (!importTestFile.open(QIODevice::WriteOnly| QIODevice::Text)) + return QString(); + importTestFile.write("import PySide"); + importTestFile.write(QByteArray::number(QT_VERSION_MAJOR)); + importTestFile.write(".QtCore\n"); + importTestFile.close(); + QProcess process; + process.start(python, {importTestFile.fileName()}); + if (!process.waitForStarted() || !process.waitForFinished()) + return QString(); + if (process.exitStatus() != QProcess::NormalExit || process.exitCode() != 0) { + const QString stdErr = QString::fromLocal8Bit(process.readAllStandardError()).simplified(); + qWarning("PySide6 is not installed (%s)", qPrintable(stdErr)); + return QString(); + } + importTestFile.remove(); + return python; +} + void tst_uic::initTestCase() { QVERIFY2(m_generated.isValid(), qPrintable(m_generated.errorString())); @@ -100,17 +140,60 @@ void tst_uic::initTestCase() arg(QDir::currentPath()); if (!outLines.empty()) msg += outLines.front(); + populateTestEntries(); + QVERIFY(!m_testEntries.isEmpty()); qDebug("%s", qPrintable(msg)); + + m_python = locatePython(m_generated); +} + +void tst_uic::populateTestEntries() +{ + const QString generatedPrefix = m_generated.path() + QLatin1Char('/'); + QDir baseline(m_baseline); + const QString baseLinePrefix = baseline.path() + QLatin1Char('/'); + const QFileInfoList baselineFiles = + baseline.entryInfoList(QStringList(QString::fromLatin1("*.ui")), QDir::Files); + m_testEntries.reserve(baselineFiles.size()); + for (const QFileInfo &baselineFile : baselineFiles) { + const QString baseName = baselineFile.baseName(); + 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); + } + } } +static const char helpFormat[] = R"( +Note: The environment variable '%s' can be set to keep the temporary files +for error analysis. +The environment variable '%s' can be set to redirect the diff output to +stderr.)"; + void tst_uic::cleanupTestCase() { - static const char envVar[] = "UIC_KEEP_GENERATED_FILES"; - if (qgetenv(envVar).isEmpty()) { - qDebug("Note: The environment variable '%s' can be set to keep the temporary files for error analysis.", envVar); - } else { + if (qEnvironmentVariableIsSet(keepEnvVar)) { m_generated.setAutoRemove(false); qDebug("Keeping generated files in '%s'", qPrintable(QDir::toNativeSeparators(m_generated.path()))); + } else { + qDebug(helpFormat, keepEnvVar, diffToStderrEnvVar); } } @@ -152,7 +235,7 @@ void tst_uic::run() QVERIFY(process.waitForFinished()); QCOMPARE(process.exitStatus(), QProcess::NormalExit); QCOMPARE(process.exitCode(), 0); - QCOMPARE(QFileInfo(generatedFile).exists(), true); + QVERIFY(QFileInfo::exists(generatedFile)); } void tst_uic::run_data() const @@ -161,22 +244,14 @@ void tst_uic::run_data() const QTest::addColumn<QString>("generatedFile"); QTest::addColumn<QStringList>("options"); - QDir generated(m_generated.path()); - QDir baseline(m_baseline); - const QFileInfoList baselineFiles = baseline.entryInfoList(QStringList("*.ui"), QDir::Files); - foreach (const QFileInfo &baselineFile, baselineFiles) { - const QString generatedFile = generated.absolutePath() - + QLatin1Char('/') + baselineFile.fileName() - + QLatin1String(".h"); - + for (const TestEntry &te : m_testEntries) { QStringList options; - if (baselineFile.fileName() == QLatin1String("qttrid.ui")) - options << QStringList(QLatin1String("-idbased")); - - QTest::newRow(qPrintable(baselineFile.baseName())) - << baselineFile.absoluteFilePath() - << generatedFile - << options; + 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; } } @@ -212,6 +287,16 @@ static QByteArray msgCannotReadFile(const QFile &file) return result.toLocal8Bit(); } +static void outputDiff(const QString &diff) +{ + // Use patch -p3 < diff to apply the obtained diff output in the baseline directory. + static const bool diffToStderr = qEnvironmentVariableIsSet(diffToStderrEnvVar); + if (diffToStderr) + std::fputs(qPrintable(diff), stderr); + else + qWarning("Difference:\n%s", qPrintable(diff)); +} + void tst_uic::compare() { QFETCH(QString, originalFile); @@ -233,7 +318,7 @@ void tst_uic::compare() if (generatedFileContents != originalFileContents) { const QString diff = generateDiff(originalFile, generatedFile); if (!diff.isEmpty()) - qWarning().noquote().nospace() << "Difference:\n" << diff; + outputDiff(diff); } QCOMPARE(generatedFileContents, originalFileContents); @@ -244,15 +329,9 @@ void tst_uic::compare_data() const QTest::addColumn<QString>("originalFile"); QTest::addColumn<QString>("generatedFile"); - QDir generated(m_generated.path()); - QDir baseline(m_baseline); - const QFileInfoList baselineFiles = baseline.entryInfoList(QStringList("*.h"), QDir::Files); - foreach (const QFileInfo &baselineFile, baselineFiles) { - const QString generatedFile = generated.absolutePath() - + QLatin1Char('/') + baselineFile.fileName(); - QTest::newRow(qPrintable(baselineFile.baseName())) - << baselineFile.absoluteFilePath() - << generatedFile; + for (const TestEntry &te : m_testEntries) { + QTest::newRow(te.name.constData()) << te.baseLineFileName + << te.generatedFileName; } } @@ -260,7 +339,7 @@ void tst_uic::runTranslation() { QProcess process; - QDir baseline(m_baseline); + const QDir baseline(m_baseline); QDir generated(m_generated.path()); generated.mkdir(QLatin1String("translation")); @@ -274,7 +353,7 @@ void tst_uic::runTranslation() QVERIFY(process.waitForFinished()); QCOMPARE(process.exitStatus(), QProcess::NormalExit); QCOMPARE(process.exitCode(), 0); - QCOMPARE(QFileInfo(generatedFile).exists(), true); + QVERIFY(QFileInfo::exists(generatedFile)); } @@ -301,11 +380,78 @@ void tst_uic::runCompare() if (generatedFileContents != originalFileContents) { const QString diff = generateDiff(originalFile, generatedFile); if (!diff.isEmpty()) - qWarning().noquote().nospace() << "Difference:\n" << diff; + outputDiff(diff); } QCOMPARE(generatedFileContents, originalFileContents); } +// Let uic generate Python code and verify that it is syntactically +// correct by compiling it into .pyc. This test is executed only +// when python with an installed Qt for Python is detected (see locatePython()). + +static inline QByteArray msgCompilePythonFailed(const QByteArray &error) +{ + // If there is a line with blanks and caret indicating an error in the line + // above, insert the cursor into the offending line and remove the caret. + QByteArrayList lines = error.trimmed().split('\n'); + for (int i = lines.size() - 1; i > 0; --i) { + const auto &line = lines.at(i); + const int caret = line.indexOf('^'); + if (caret == 0 || (caret > 0 && line.at(caret - 1) == ' ')) { + lines.removeAt(i); + lines[i - 1].insert(caret, '|'); + break; + } + } + return lines.join('\n'); +} + +// Test Python code generation by compiling the file +void tst_uic::pythonCompile_data() const +{ + QTest::addColumn<QString>("originalFile"); + QTest::addColumn<QString>("generatedFile"); + + const int size = m_python.isEmpty() + ? qMin(1, m_testEntries.size()) : m_testEntries.size(); + for (int i = 0; i < size; ++i) { + const TestEntry &te = m_testEntries.at(i); + if (!te.flags.testFlag(TestEntry::DontTestPythonCompile)) { + QTest::newRow(te.name.constData()) + << te.uiFileName + << te.generatedFileName; + } + } +} + +void tst_uic::pythonCompile() +{ + QFETCH(QString, originalFile); + QFETCH(QString, generatedFile); + if (m_python.isEmpty()) + QSKIP("Python was not found"); + + QStringList uicArguments{QLatin1String("-g"), QLatin1String("python"), + originalFile, QLatin1String("-o"), generatedFile}; + QProcess process; + process.setWorkingDirectory(m_generated.path()); + process.start(m_command, uicArguments); + QVERIFY2(process.waitForStarted(), msgProcessStartFailed(m_command, process.errorString())); + QVERIFY(process.waitForFinished()); + QCOMPARE(process.exitStatus(), QProcess::NormalExit); + QCOMPARE(process.exitCode(), 0); + QVERIFY(QFileInfo::exists(generatedFile)); + + // Test Python code generation by compiling the file + QStringList compileArguments{QLatin1String("-m"), QLatin1String("py_compile"), generatedFile}; + process.start(m_python, compileArguments); + QVERIFY2(process.waitForStarted(), msgProcessStartFailed(m_command, process.errorString())); + QVERIFY(process.waitForFinished()); + const bool compiled = process.exitStatus() == QProcess::NormalExit + && process.exitCode() == 0; + QVERIFY2(compiled, msgCompilePythonFailed(process.readAllStandardError()).constData()); +} + QTEST_MAIN(tst_uic) #include "tst_uic.moc" diff --git a/tests/auto/tools/uic/uic.pro b/tests/auto/tools/uic/uic.pro deleted file mode 100644 index 3d8b7f85cd..0000000000 --- a/tests/auto/tools/uic/uic.pro +++ /dev/null @@ -1,6 +0,0 @@ -CONFIG += testcase - -QT = core testlib -SOURCES += tst_uic.cpp -TARGET = tst_uic - diff --git a/tests/auto/tools/windeployqt/CMakeLists.txt b/tests/auto/tools/windeployqt/CMakeLists.txt new file mode 100644 index 0000000000..9ac0051053 --- /dev/null +++ b/tests/auto/tools/windeployqt/CMakeLists.txt @@ -0,0 +1,11 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_windeployqt LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + +add_subdirectory(testapp) +add_subdirectory(test) diff --git a/tests/auto/tools/windeployqt/test/CMakeLists.txt b/tests/auto/tools/windeployqt/test/CMakeLists.txt new file mode 100644 index 0000000000..1ba62d5850 --- /dev/null +++ b/tests/auto/tools/windeployqt/test/CMakeLists.txt @@ -0,0 +1,12 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + +##################################################################### +## tst_windeployqt Test: +##################################################################### + +qt_internal_add_test(tst_windeployqt + OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../" + SOURCES + ../tst_windeployqt.cpp +) diff --git a/tests/auto/tools/windeployqt/testapp/CMakeLists.txt b/tests/auto/tools/windeployqt/testapp/CMakeLists.txt new file mode 100644 index 0000000000..ce94cd6464 --- /dev/null +++ b/tests/auto/tools/windeployqt/testapp/CMakeLists.txt @@ -0,0 +1,20 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + +##################################################################### +## testapp Binary: +##################################################################### + +qt_internal_add_executable(windeploy_testapp + GUI + OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/" + SOURCES + main.cpp + LIBRARIES + Qt::Gui +) + +set_target_properties(windeploy_testapp + PROPERTIES + OUTPUT_NAME testapp +) diff --git a/tests/auto/tools/windeployqt/testapp/main.cpp b/tests/auto/tools/windeployqt/testapp/main.cpp new file mode 100644 index 0000000000..775fe19827 --- /dev/null +++ b/tests/auto/tools/windeployqt/testapp/main.cpp @@ -0,0 +1,21 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#include <QGuiApplication> +#include <QRasterWindow> +#include <QScreen> +#include <QTimer> + +// Simple test application just to verify that it comes up properly + +int main(int argc, char ** argv) +{ + QGuiApplication app(argc, argv); + QRasterWindow w; + w.setTitle("windeployqt test application"); + const QRect availableGeometry = QGuiApplication::primaryScreen()->availableGeometry(); + w.resize(availableGeometry.size() / 4); + w.show(); + QTimer::singleShot(200, &w, &QCoreApplication::quit); + return app.exec(); +} diff --git a/tests/auto/tools/windeployqt/tst_windeployqt.cpp b/tests/auto/tools/windeployqt/tst_windeployqt.cpp new file mode 100644 index 0000000000..0daf287807 --- /dev/null +++ b/tests/auto/tools/windeployqt/tst_windeployqt.cpp @@ -0,0 +1,156 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#include <QtCore/QDebug> +#include <QtCore/QDir> +#include <QtCore/QFile> +#include <QtCore/QFileInfo> +#include <QtCore/QLibraryInfo> +#include <QtCore/QProcess> +#include <QtCore/QProcessEnvironment> +#include <QtCore/QStandardPaths> +#include <QtCore/QTextStream> +#include <QtTest/QtTest> + +static const QString msgProcessError(const QProcess &process, const QString &what, + const QByteArray &stdOut = QByteArray(), + const QByteArray &stdErr = QByteArray()) +{ + QString result; + QTextStream str(&result); + str << what << ": \"" << process.program() << ' ' + << process.arguments().join(QLatin1Char(' ')) << "\": " << process.errorString(); + if (!stdOut.isEmpty()) + str << "\nStandard output:\n" << stdOut; + if (!stdErr.isEmpty()) + str << "\nStandard error:\n" << stdErr; + return result; +} + +static bool runProcess(const QString &binary, + const QStringList &arguments, + QString *errorMessage, + const QString &workingDir = QString(), + const QProcessEnvironment &env = QProcessEnvironment(), + int timeOut = 5000, + QByteArray *stdOutIn = nullptr, QByteArray *stdErrIn = nullptr) +{ + QProcess process; + if (!env.isEmpty()) + process.setProcessEnvironment(env); + if (!workingDir.isEmpty()) + process.setWorkingDirectory(workingDir); + qDebug().noquote().nospace() << "Running: " << QDir::toNativeSeparators(binary) + << ' ' << arguments.join(QLatin1Char(' ')); + process.start(binary, arguments, QIODevice::ReadOnly); + if (!process.waitForStarted()) { + *errorMessage = msgProcessError(process, "Failed to start"); + return false; + } + if (!process.waitForFinished(timeOut)) { + *errorMessage = msgProcessError(process, "Timed out"); + process.terminate(); + if (!process.waitForFinished(300)) + process.kill(); + return false; + } + const QByteArray stdOut = process.readAllStandardOutput(); + const QByteArray stdErr = process.readAllStandardError(); + if (stdOutIn) + *stdOutIn = stdOut; + if (stdErrIn) + *stdErrIn = stdErr; + if (process.exitStatus() != QProcess::NormalExit) { + *errorMessage = msgProcessError(process, "Crashed", stdOut, stdErr); + return false; + } + if (process.exitCode() != QProcess::NormalExit) { + *errorMessage = msgProcessError(process, "Exit code " + QString::number(process.exitCode()), + stdOut, stdErr); + return false; + } + return true; +} + +class tst_windeployqt : public QObject +{ + Q_OBJECT +private slots: + void initTestCase(); + void help(); + void deploy(); + +private: + QString m_windeployqtBinary; + QString m_testApp; + QString m_testAppBinary; +}; + +void tst_windeployqt::initTestCase() +{ + m_windeployqtBinary = QStandardPaths::findExecutable("windeployqt"); + QVERIFY(!m_windeployqtBinary.isEmpty()); + m_testApp = QFINDTESTDATA("testapp"); + QVERIFY(!m_testApp.isEmpty()); + const QFileInfo testAppBinary(m_testApp + QLatin1String("/testapp.exe")); + QVERIFY2(testAppBinary.isFile(), qPrintable(testAppBinary.absoluteFilePath())); + m_testAppBinary = testAppBinary.absoluteFilePath(); +} + +void tst_windeployqt::help() +{ + QString errorMessage; + QByteArray stdOut; + QByteArray stdErr; + QVERIFY2(runProcess(m_windeployqtBinary, QStringList("--help"), &errorMessage, + QString(), QProcessEnvironment(), 5000, &stdOut, &stdErr), + qPrintable(errorMessage)); + QVERIFY2(!stdOut.isEmpty(), stdErr); +} + +// deploy(): Deploys the test application and launches it with Qt removed from the environment +// to verify it runs stand-alone. + +void tst_windeployqt::deploy() +{ + QString errorMessage; + // Deploy application + QStringList deployArguments; + deployArguments << QLatin1String("--no-translations") << QDir::toNativeSeparators(m_testAppBinary); + QVERIFY2(runProcess(m_windeployqtBinary, deployArguments, &errorMessage, QString(), QProcessEnvironment(), 20000), + qPrintable(errorMessage)); + + // Create environment with Qt and all "lib" paths removed. + const QString qtBinDir = QDir::toNativeSeparators(QLibraryInfo::path(QLibraryInfo::BinariesPath)); + QProcessEnvironment env = QProcessEnvironment::systemEnvironment(); + const QString pathKey = QLatin1String("PATH"); + const QChar pathSeparator(QLatin1Char(';')); // ### fixme: Qt 5.6: QDir::listSeparator() + const QString origPath = env.value(pathKey); + QString newPath; + const QStringList pathElements = origPath.split(pathSeparator, Qt::SkipEmptyParts); + for (const QString &pathElement : pathElements) { + if (pathElement.compare(qtBinDir, Qt::CaseInsensitive) + && !pathElement.contains(QLatin1String("\\lib"), Qt::CaseInsensitive)) { + if (!newPath.isEmpty()) + newPath.append(pathSeparator); + newPath.append(pathElement); + } + } + if (newPath == origPath) + qWarning() << "Unable to remove Qt from PATH"; + env.insert(pathKey, newPath); + + // Create qt.conf to enforce usage of local plugins + QFile qtConf(QFileInfo(m_testAppBinary).absolutePath() + QLatin1String("/qt.conf")); + QVERIFY2(qtConf.open(QIODevice::WriteOnly | QIODevice::Text), + qPrintable(qtConf.fileName() + QLatin1String(": ") + qtConf.errorString())); + QVERIFY(qtConf.write("[Paths]\nPrefix = .\n")); + qtConf.close(); + + // Verify that application still runs + QVERIFY2(runProcess(m_testAppBinary, QStringList(), &errorMessage, QString(), env, 10000), + qPrintable(errorMessage)); +} + +QTEST_MAIN(tst_windeployqt) +#include "tst_windeployqt.moc" |