From c3a4d3608245c5614fcaf95bbe37f2300bbac4cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Thu, 12 Sep 2019 12:03:17 +0200 Subject: High-DPI: Remove usages of Qt::AA_UseHighDpiPixmaps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove usages of Qt::AA_UseHighDpiPixmaps from examples/. This flag is now on by default, and can't be disabled. Task-number: QTBUG-83092 Change-Id: Ie28622f816da2fe28d4ab272d45ea20bd051d5f3 Reviewed-by: Tor Arne Vestbø Reviewed-by: Friedemann Kleint --- examples/widgets/widgets/icons/main.cpp | 6 ------ examples/widgets/widgets/icons/mainwindow.cpp | 10 ---------- examples/widgets/widgets/icons/mainwindow.h | 1 - 3 files changed, 17 deletions(-) (limited to 'examples/widgets/widgets/icons') diff --git a/examples/widgets/widgets/icons/main.cpp b/examples/widgets/widgets/icons/main.cpp index 632795c18c..aff2d2013e 100644 --- a/examples/widgets/widgets/icons/main.cpp +++ b/examples/widgets/widgets/icons/main.cpp @@ -64,15 +64,9 @@ int main(int argc, char *argv[]) commandLineParser.setSingleDashWordOptionMode(QCommandLineParser::ParseAsLongOptions); commandLineParser.addHelpOption(); commandLineParser.addVersionOption(); - QCommandLineOption noHighDpiPixmapOption("no-highdpi-pixmaps", - "Disable High DPI image loading (Qt::AA_UseHighDpiPixmaps)"); - commandLineParser.addOption(noHighDpiPixmapOption); commandLineParser.addPositionalArgument(MainWindow::tr("[file]"), MainWindow::tr("Icon file(s) to open.")); commandLineParser.process(QCoreApplication::arguments()); - if (!commandLineParser.isSet(noHighDpiPixmapOption)) - QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); - MainWindow mainWin; if (!commandLineParser.positionalArguments().isEmpty()) mainWin.loadImages(commandLineParser.positionalArguments()); diff --git a/examples/widgets/widgets/icons/mainwindow.cpp b/examples/widgets/widgets/icons/mainwindow.cpp index aa5ed852fd..bd14bff518 100644 --- a/examples/widgets/widgets/icons/mainwindow.cpp +++ b/examples/widgets/widgets/icons/mainwindow.cpp @@ -320,12 +320,6 @@ void MainWindow::loadImages(const QStringList &fileNames) } } -void MainWindow::useHighDpiPixmapsChanged(int checkState) -{ - QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, checkState == Qt::Checked); - changeIcon(); -} - //! [20] void MainWindow::removeAllImages() { @@ -444,10 +438,6 @@ QWidget *MainWindow::createHighDpiIconSizeGroupBox() screenNameLabel = new QLabel(highDpiGroupBox); layout->addRow(tr("Screen:"), screenNameLabel); layout->addRow(tr("Device pixel ratio:"), devicePixelRatioLabel); - QCheckBox *highDpiPixmapsCheckBox = new QCheckBox(QLatin1String("Qt::AA_UseHighDpiPixmaps")); - highDpiPixmapsCheckBox->setChecked(QCoreApplication::testAttribute(Qt::AA_UseHighDpiPixmaps)); - connect(highDpiPixmapsCheckBox, &QCheckBox::stateChanged, this, &MainWindow::useHighDpiPixmapsChanged); - layout->addRow(highDpiPixmapsCheckBox); return highDpiGroupBox; } diff --git a/examples/widgets/widgets/icons/mainwindow.h b/examples/widgets/widgets/icons/mainwindow.h index 9250711ecc..cd77dae8e8 100644 --- a/examples/widgets/widgets/icons/mainwindow.h +++ b/examples/widgets/widgets/icons/mainwindow.h @@ -88,7 +88,6 @@ private slots: void addSampleImages(); void addOtherImages(); void removeAllImages(); - void useHighDpiPixmapsChanged(int checkState); void screenChanged(); private: -- cgit v1.2.3