diff options
-rw-r--r-- | src-qt5/core/lumina-desktop/BootSplash.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src-qt5/core/lumina-desktop/BootSplash.cpp b/src-qt5/core/lumina-desktop/BootSplash.cpp index 7ad0e4e7..1095d5e5 100644 --- a/src-qt5/core/lumina-desktop/BootSplash.cpp +++ b/src-qt5/core/lumina-desktop/BootSplash.cpp @@ -18,7 +18,11 @@ BootSplash::BootSplash() : QWidget(0, Qt::SplashScreen | Qt::X11BypassWindowMana } void BootSplash::generateTipOfTheDay(){ - bool disablequotes = sessionsettings.value("DisableQuotes").toBool(false); + QSettings sessionsettings("lumina-desktop","sessionsettings"); + bool disablequotes = false; + if(sessionsettings.contains("DisableQuotes")){ + disablequotes = sessionsettings.value("DisableQuotes").toBool(); + } if (disablequotes){ ui->label_welcome->setText(""); return; } //Try to find a system-defined message of the day for lumina @@ -38,8 +42,6 @@ void BootSplash::generateTipOfTheDay(){ tip = LUtils::readFile(sysMOTD).join("\n"); }else{ - QSettings sessionsettings("lumina-desktop","sessionsettings"); - int index = qrand()%46; //Make sure this number matches the length of the case below (max value +1) switch(index){ case 0: |