Use if >= in version detection instead of a switch case.
This commit is contained in:
parent
270f70f872
commit
47d8e30eb4
|
@ -34,18 +34,14 @@ NotifyWidget::NotifyWidget(int pos, const SnoreNotifier *parent) :
|
|||
|
||||
QString font = qApp->font().family();
|
||||
#ifdef Q_OS_WIN
|
||||
switch (QSysInfo::windowsVersion()) {
|
||||
case QSysInfo::WV_WINDOWS8:
|
||||
if(QSysInfo::windowsVersion() >= QSysInfo::WV_WINDOWS8 ) {
|
||||
font = QLatin1String("Segoe UI Symbol");
|
||||
break;
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5,5,0)
|
||||
case QSysInfo::WV_10_0:
|
||||
font = QLatin1String("Segoe UI Emoji");
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
qt_noop();
|
||||
}
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5,5,0)
|
||||
if(QSysInfo::windowsVersion() >= QSysInfo::WV_WINDOWS10) {
|
||||
font = QLatin1String("Segoe UI Emoji");
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
rootContext()->setContextProperty(QLatin1String("snoreFont"), font);
|
||||
setSource(QUrl::fromEncoded("qrc:/notification.qml"));
|
||||
|
|
Loading…
Reference in New Issue