diff options
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoanativeinterface.mm | 3 | ||||
-rw-r--r-- | src/widgets/dialogs/qwizard.cpp | 2 | ||||
-rw-r--r-- | tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp | 19 |
3 files changed, 13 insertions, 11 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoanativeinterface.mm b/src/plugins/platforms/cocoa/qcocoanativeinterface.mm index 7979e430ac..9bd19dd07c 100644 --- a/src/plugins/platforms/cocoa/qcocoanativeinterface.mm +++ b/src/plugins/platforms/cocoa/qcocoanativeinterface.mm @@ -177,6 +177,9 @@ void *QCocoaNativeInterface::NSPrintInfoForPrintEngine(QPrintEngine *printEngine QPixmap QCocoaNativeInterface::defaultBackgroundPixmapForQWizard() { + // Note: starting with macOS 10.14, the KeyboardSetupAssistant app bundle no + // longer contains the "Background.png" image. This function then returns a + // null pixmap. const int ExpectedImageWidth = 242; const int ExpectedImageHeight = 414; QCFType<CFArrayRef> urls = LSCopyApplicationURLsForBundleIdentifier( diff --git a/src/widgets/dialogs/qwizard.cpp b/src/widgets/dialogs/qwizard.cpp index 21e1ff2778..f19a4e99af 100644 --- a/src/widgets/dialogs/qwizard.cpp +++ b/src/widgets/dialogs/qwizard.cpp @@ -2890,7 +2890,7 @@ void QWizard::setPixmap(WizardPixmap which, const QPixmap &pixmap) Returns the pixmap set for role \a which. By default, the only pixmap that is set is the BackgroundPixmap on - \macos. + \macos version 10.13 and earlier. \sa QWizardPage::pixmap(), {Elements of a Wizard Page} */ diff --git a/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp b/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp index 63f6e67a3e..da75e64d1e 100644 --- a/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp +++ b/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp @@ -417,20 +417,19 @@ void tst_QWizard::setPixmap() QVERIFY(wizard.pixmap(QWizard::BannerPixmap).isNull()); QVERIFY(wizard.pixmap(QWizard::LogoPixmap).isNull()); QVERIFY(wizard.pixmap(QWizard::WatermarkPixmap).isNull()); -#ifdef Q_OS_OSX - QVERIFY(!wizard.pixmap(QWizard::BackgroundPixmap).isNull()); -#else - QVERIFY(wizard.pixmap(QWizard::BackgroundPixmap).isNull()); -#endif + if (QSysInfo::macVersion() <= Q_MV_OSX(10, 13)) + QVERIFY(!wizard.pixmap(QWizard::BackgroundPixmap).isNull()); + else + QVERIFY(wizard.pixmap(QWizard::BackgroundPixmap).isNull()); QVERIFY(page->pixmap(QWizard::BannerPixmap).isNull()); QVERIFY(page->pixmap(QWizard::LogoPixmap).isNull()); QVERIFY(page->pixmap(QWizard::WatermarkPixmap).isNull()); -#ifdef Q_OS_OSX - QVERIFY(!wizard.pixmap(QWizard::BackgroundPixmap).isNull()); -#else - QVERIFY(page->pixmap(QWizard::BackgroundPixmap).isNull()); -#endif + if (QSysInfo::macVersion() <= Q_MV_OSX(10, 13)) + QVERIFY(!wizard.pixmap(QWizard::BackgroundPixmap).isNull()); + else + QVERIFY(page->pixmap(QWizard::BackgroundPixmap).isNull()); + wizard.setPixmap(QWizard::BannerPixmap, p1); wizard.setPixmap(QWizard::LogoPixmap, p2); wizard.setPixmap(QWizard::WatermarkPixmap, p3); |