summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/ios/qiosscreen.mm
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/ios/qiosscreen.mm')
-rw-r--r--src/plugins/platforms/ios/qiosscreen.mm12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/plugins/platforms/ios/qiosscreen.mm b/src/plugins/platforms/ios/qiosscreen.mm
index 80636ab9c6..c7dbe43124 100644
--- a/src/plugins/platforms/ios/qiosscreen.mm
+++ b/src/plugins/platforms/ios/qiosscreen.mm
@@ -213,10 +213,12 @@ static QIOSScreen* qtPlatformScreenFor(UIScreen *uiScreen)
{
[super traitCollectionDidChange:previousTraitCollection];
- if (self.screen == UIScreen.mainScreen) {
- if (previousTraitCollection.userInterfaceStyle != self.traitCollection.userInterfaceStyle) {
- QIOSTheme::initializeSystemPalette();
- QWindowSystemInterface::handleThemeChange<QWindowSystemInterface::SynchronousDelivery>(nullptr);
+ if (@available(iOS 12, *)) {
+ if (self.screen == UIScreen.mainScreen) {
+ if (previousTraitCollection.userInterfaceStyle != self.traitCollection.userInterfaceStyle) {
+ QIOSTheme::initializeSystemPalette();
+ QWindowSystemInterface::handleThemeChange<QWindowSystemInterface::SynchronousDelivery>(nullptr);
+ }
}
}
}
@@ -243,7 +245,7 @@ static QString deviceModelIdentifier()
char value[size];
sysctlbyname(key, &value, &size, NULL, 0);
- return QString::fromLatin1(value);
+ return QString::fromLatin1(QByteArrayView(value, qsizetype(size)));
#endif
}