aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-desktop
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2018-11-05 09:18:20 -0500
committerKen Moore <ken@ixsystems.com>2018-11-05 09:18:20 -0500
commit288ce6ee13b0a08107f4a7ed317c592d83989146 (patch)
treeb7538bdcf6be297829e39385061f912a038c9f47 /src-qt5/core/lumina-desktop
parentCleanup a little bit of the startup quote fetching system. (diff)
downloadlumina-288ce6ee13b0a08107f4a7ed317c592d83989146.tar.gz
lumina-288ce6ee13b0a08107f4a7ed317c592d83989146.tar.bz2
lumina-288ce6ee13b0a08107f4a7ed317c592d83989146.zip
Fix a compilation error with loading the default quotes option.
Closes #632
Diffstat (limited to 'src-qt5/core/lumina-desktop')
-rw-r--r--src-qt5/core/lumina-desktop/BootSplash.cpp8
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:
bgstack15