diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-05-19 13:58:24 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-05-20 08:26:52 +0200 |
commit | 55b91dc4714d36d457fbfa32bc6b412415362430 (patch) | |
tree | 743eecbb2dd41f98fb9ecd0f4d29eea023524960 /tools | |
parent | 463299b8c9b8f2ce28126aa8180f7103112d1947 (diff) |
Fix deprecated/removed code
- Port away from QDesktopWidget
- Use QFontMetrics::horizontalAdvance() instead of width()
Pick-to: 5.15
Change-Id: I5d721fa574356a27e414545d6b9b2d28d400080b
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/testcon/main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testcon/main.cpp b/tools/testcon/main.cpp index 7c2ca07..e1b5c29 100644 --- a/tools/testcon/main.cpp +++ b/tools/testcon/main.cpp @@ -29,11 +29,11 @@ #include "mainwindow.h" #include <QApplication> +#include <QScreen> #include <QAxFactory> #include <QCommandLineParser> #include <QCommandLineOption> #include <QDebug> -#include <QDesktopWidget> QAXFACTORY_BEGIN( "{4a43e44d-9d1d-47e5-a1e5-58fe6f7be0a4}", // type library ID @@ -104,7 +104,7 @@ int main( int argc, char **argv ) if (parser.isSet(scriptOption)) mw.loadScript(parser.value(scriptOption)); - const QRect availableGeometry = QApplication::desktop()->availableGeometry(&mw); + const QRect availableGeometry = mw.screen()->availableGeometry(); mw.resize(availableGeometry.size() * 2 / 3); mw.show(); |