summaryrefslogtreecommitdiffstats
path: root/examples/widgets/dialogs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/widgets/dialogs')
-rw-r--r--examples/widgets/dialogs/classwizard/CMakeLists.txt2
-rw-r--r--examples/widgets/dialogs/extension/CMakeLists.txt2
-rw-r--r--examples/widgets/dialogs/findfiles/CMakeLists.txt2
-rw-r--r--examples/widgets/dialogs/licensewizard/CMakeLists.txt2
-rw-r--r--examples/widgets/dialogs/standarddialogs/CMakeLists.txt2
-rw-r--r--examples/widgets/dialogs/standarddialogs/main.cpp15
-rw-r--r--examples/widgets/dialogs/tabdialog/CMakeLists.txt2
-rw-r--r--examples/widgets/dialogs/trivialwizard/CMakeLists.txt2
8 files changed, 15 insertions, 14 deletions
diff --git a/examples/widgets/dialogs/classwizard/CMakeLists.txt b/examples/widgets/dialogs/classwizard/CMakeLists.txt
index 5134db62be..b45c5bbc15 100644
--- a/examples/widgets/dialogs/classwizard/CMakeLists.txt
+++ b/examples/widgets/dialogs/classwizard/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from classwizard.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(classwizard LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/dialogs/extension/CMakeLists.txt b/examples/widgets/dialogs/extension/CMakeLists.txt
index 37d75d2cc1..be555e6a10 100644
--- a/examples/widgets/dialogs/extension/CMakeLists.txt
+++ b/examples/widgets/dialogs/extension/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from extension.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(extension LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/dialogs/findfiles/CMakeLists.txt b/examples/widgets/dialogs/findfiles/CMakeLists.txt
index 1d60d743f2..cf183d29e2 100644
--- a/examples/widgets/dialogs/findfiles/CMakeLists.txt
+++ b/examples/widgets/dialogs/findfiles/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from findfiles.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(findfiles LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/dialogs/licensewizard/CMakeLists.txt b/examples/widgets/dialogs/licensewizard/CMakeLists.txt
index df0b205cab..7fc7ac65fa 100644
--- a/examples/widgets/dialogs/licensewizard/CMakeLists.txt
+++ b/examples/widgets/dialogs/licensewizard/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from licensewizard.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(licensewizard LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/dialogs/standarddialogs/CMakeLists.txt b/examples/widgets/dialogs/standarddialogs/CMakeLists.txt
index b42e3a81c7..9cb52e22dd 100644
--- a/examples/widgets/dialogs/standarddialogs/CMakeLists.txt
+++ b/examples/widgets/dialogs/standarddialogs/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from standarddialogs.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(standarddialogs LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/dialogs/standarddialogs/main.cpp b/examples/widgets/dialogs/standarddialogs/main.cpp
index 3892c02f9d..7e7a5ce95b 100644
--- a/examples/widgets/dialogs/standarddialogs/main.cpp
+++ b/examples/widgets/dialogs/standarddialogs/main.cpp
@@ -60,16 +60,17 @@
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
- QGuiApplication::setApplicationDisplayName(Dialog::tr("Standard Dialogs"));
-#ifndef QT_NO_TRANSLATION
- QString translatorFileName = QLatin1String("qtbase_");
- translatorFileName += QLocale::system().name();
- QTranslator *translator = new QTranslator(&app);
- if (translator->load(translatorFileName, QLibraryInfo::path(QLibraryInfo::TranslationsPath)))
- app.installTranslator(translator);
+#if QT_CONFIG(translation)
+ QTranslator translator;
+ if (translator.load(QLocale::system(), u"qtbase"_qs, u"_"_qs,
+ QLibraryInfo::path(QLibraryInfo::TranslationsPath))) {
+ app.installTranslator(&translator);
+ }
#endif
+ QGuiApplication::setApplicationDisplayName(Dialog::tr("Standard Dialogs"));
+
Dialog dialog;
if (!QGuiApplication::styleHints()->showIsFullScreen() && !QGuiApplication::styleHints()->showIsMaximized()) {
const QRect availableGeometry = dialog.screen()->availableGeometry();
diff --git a/examples/widgets/dialogs/tabdialog/CMakeLists.txt b/examples/widgets/dialogs/tabdialog/CMakeLists.txt
index 8e8ad4213a..b61a8ef89c 100644
--- a/examples/widgets/dialogs/tabdialog/CMakeLists.txt
+++ b/examples/widgets/dialogs/tabdialog/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from tabdialog.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(tabdialog LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/dialogs/trivialwizard/CMakeLists.txt b/examples/widgets/dialogs/trivialwizard/CMakeLists.txt
index 4c67d8cdb6..d57cbd59c3 100644
--- a/examples/widgets/dialogs/trivialwizard/CMakeLists.txt
+++ b/examples/widgets/dialogs/trivialwizard/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from trivialwizard.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(trivialwizard LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)