diff options
author | Ken Moore <ken@ixsystems.com> | 2017-09-21 15:23:09 -0400 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2017-09-21 15:23:09 -0400 |
commit | ca75f41432756e1a2796c046787474514277012e (patch) | |
tree | cf626aeb12a3f714675e8bee1bdc3cba53dc96d6 | |
parent | Make sure we don't run the checkUserFiles() function a second time (diff) | |
download | lumina-ca75f41432756e1a2796c046787474514277012e.tar.gz lumina-ca75f41432756e1a2796c046787474514277012e.tar.bz2 lumina-ca75f41432756e1a2796c046787474514277012e.zip |
Oops - need to make sure that status function does not access any global QApplication instance.
-rw-r--r-- | src-qt5/core/libLumina/LDesktopUtils.cpp | 4 | ||||
-rw-r--r-- | src-qt5/core/libLumina/LDesktopUtils.h | 2 | ||||
-rw-r--r-- | src-qt5/core/lumina-desktop/LSession.cpp | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src-qt5/core/libLumina/LDesktopUtils.cpp b/src-qt5/core/libLumina/LDesktopUtils.cpp index 9b7ee6d0..6c0543c0 100644 --- a/src-qt5/core/libLumina/LDesktopUtils.cpp +++ b/src-qt5/core/libLumina/LDesktopUtils.cpp @@ -456,12 +456,12 @@ void LDesktopUtils::LoadSystemDefaults(bool skipOS){ } -bool LDesktopUtils::checkUserFiles(QString lastversion){ +bool LDesktopUtils::checkUserFiles(QString lastversion, QString currentversion){ //internal version conversion examples: // [1.0.0 -> 1000000], [1.2.3 -> 1002003], [0.6.1 -> 6001] //returns true if something changed int oldversion = LDesktopUtils::VersionStringToNumber(lastversion); - int nversion = LDesktopUtils::VersionStringToNumber(QApplication::applicationVersion()); + int nversion = LDesktopUtils::VersionStringToNumber(currentversion); bool newversion = ( oldversion < nversion ); //increasing version number bool newrelease = ( lastversion.contains("-devel", Qt::CaseInsensitive) && QApplication::applicationVersion().contains("-release", Qt::CaseInsensitive) ); //Moving from devel to release diff --git a/src-qt5/core/libLumina/LDesktopUtils.h b/src-qt5/core/libLumina/LDesktopUtils.h index a9b44c67..b0ce6ba5 100644 --- a/src-qt5/core/libLumina/LDesktopUtils.h +++ b/src-qt5/core/libLumina/LDesktopUtils.h @@ -43,7 +43,7 @@ public: //Load the default setup for the system static void LoadSystemDefaults(bool skipOS = false); - static bool checkUserFiles(QString lastversion); //returns true if something changed + static bool checkUserFiles(QString lastversion, QString currentversion); //returns true if something changed static int VersionStringToNumber(QString version); //convert the lumina version string to a number for comparisons //Migrating desktop settings from one ID to another diff --git a/src-qt5/core/lumina-desktop/LSession.cpp b/src-qt5/core/lumina-desktop/LSession.cpp index feb3c95c..99b20194 100644 --- a/src-qt5/core/lumina-desktop/LSession.cpp +++ b/src-qt5/core/lumina-desktop/LSession.cpp @@ -389,7 +389,7 @@ void LSession::checkUserFiles(){ // [1.0.0 -> 1000000], [1.2.3 -> 1002003], [0.6.1 -> 6001] QSettings sset("lumina-desktop", "sessionsettings"); QString OVS = sset.value("DesktopVersion","0").toString(); //Old Version String - bool changed = LDesktopUtils::checkUserFiles(OVS); + bool changed = LDesktopUtils::checkUserFiles(OVS, LDesktopUtils::LuminaDesktopVersion()); if(changed){ //Save the current version of the session to the settings file (for next time) sset.setValue("DesktopVersion", LDesktopUtils::LuminaDesktopVersion()); |