OSDN Git Service

Bump version.
[lamexp/LameXP.git] / src / Dialog_SplashScreen.cpp
index 9f30ba5..7905cea 100644 (file)
@@ -1,12 +1,12 @@
 ///////////////////////////////////////////////////////////////////////////////
 // LameXP - Audio Encoder Front-End
-// Copyright (C) 2004-2017 LoRd_MuldeR <MuldeR2@GMX.de>
+// Copyright (C) 2004-2020 LoRd_MuldeR <MuldeR2@GMX.de>
 //
 // This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
+// it under the terms of the GNU GENERAL PUBLIC LICENSE as published by
 // the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version, but always including the *additional*
-// restrictions defined in the "License.txt" file.
+// (at your option) any later version; always including the non-optional
+// LAMEXP GNU GENERAL PUBLIC LICENSE ADDENDUM. See "License.txt" file!
 //
 // This program is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 //Setup taskbar indicator
 #define SET_TASKBAR_STATE(WIDGET,FLAG) do \
 { \
-       if((WIDGET)->m_taskBarFlag != (FLAG)) \
+       const int _oldFlag = (WIDGET)->m_taskBarFlag.fetchAndStoreOrdered((FLAG) ? 1 : 0); \
+       if(_oldFlag != ((FLAG) ? 1 : 0)) \
        { \
-               if((WIDGET)->m_taskbar->setTaskbarState((FLAG) ? MUtils::Taskbar7::TASKBAR_STATE_INTERMEDIATE : MUtils::Taskbar7::TASKBAR_STATE_NONE)) \
-               { \
-                       (WIDGET)->m_taskBarFlag = (FLAG); \
-               } \
+               (WIDGET)->m_taskbar->setTaskbarState((FLAG) ? MUtils::Taskbar7::TASKBAR_STATE_INTERMEDIATE : MUtils::Taskbar7::TASKBAR_STATE_NONE); \
        } \
 } \
 while(0)
@@ -96,10 +94,8 @@ SplashScreen::SplashScreen(QWidget *parent)
        m_working->start();
 
        //Init status
-       m_canClose = false;
        m_status = STATUS_FADE_IN;
        m_fadeValue = 0;
-       m_taskBarFlag = false;
 }
 
 ////////////////////////////////////////////////////////////
@@ -165,7 +161,7 @@ void SplashScreen::showSplash(QThread *thread)
        QApplication::restoreOverrideCursor();
 
        //Hide splash
-       splashScreen->m_canClose = true;
+       splashScreen->m_canClose.ref();
        splashScreen->close();
 }