Prevent some more dialogs from blocking a quick system shutdown.

This commit is contained in:
LoRd_MuldeR 2011-12-27 13:51:01 +01:00
parent d5a4aa72e3
commit db587fe228
8 changed files with 16 additions and 16 deletions

View File

@ -2854,17 +2854,17 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/Global.cpp" line="914"/> <location filename="../../src/Global.cpp" line="918"/>
<source>Executable &apos;%1&apos; requires Qt v%2, but found Qt v%3.</source> <source>Executable &apos;%1&apos; requires Qt v%2, but found Qt v%3.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/Global.cpp" line="919"/> <location filename="../../src/Global.cpp" line="923"/>
<source>Executable &apos;%1&apos; was built for Qt &apos;%2&apos;, but found Qt &apos;%3&apos;.</source> <source>Executable &apos;%1&apos; was built for Qt &apos;%2&apos;, but found Qt &apos;%3&apos;.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/Global.cpp" line="928"/> <location filename="../../src/Global.cpp" line="932"/>
<source>Executable &apos;%1&apos; requires Windows 2000 or later.</source> <source>Executable &apos;%1&apos; requires Windows 2000 or later.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>

View File

@ -2854,17 +2854,17 @@
<translation type="unfinished">Plik wykonywalny &apos;%1&apos; nie działa w trybie kompatybilności z Windows.</translation> <translation type="unfinished">Plik wykonywalny &apos;%1&apos; nie działa w trybie kompatybilności z Windows.</translation>
</message> </message>
<message> <message>
<location filename="../../src/Global.cpp" line="914"/> <location filename="../../src/Global.cpp" line="918"/>
<source>Executable &apos;%1&apos; requires Qt v%2, but found Qt v%3.</source> <source>Executable &apos;%1&apos; requires Qt v%2, but found Qt v%3.</source>
<translation type="unfinished">Plik wykonywalny &apos;%1&apos; wymaga Qt v%2, znaleziono jednak Qt v%3.</translation> <translation type="unfinished">Plik wykonywalny &apos;%1&apos; wymaga Qt v%2, znaleziono jednak Qt v%3.</translation>
</message> </message>
<message> <message>
<location filename="../../src/Global.cpp" line="919"/> <location filename="../../src/Global.cpp" line="923"/>
<source>Executable &apos;%1&apos; was built for Qt &apos;%2&apos;, but found Qt &apos;%3&apos;.</source> <source>Executable &apos;%1&apos; was built for Qt &apos;%2&apos;, but found Qt &apos;%3&apos;.</source>
<translation type="unfinished">Plik wykonywalny &quot;%1&quot; został skompilowany dla Qt &quot;%2&quot;, znaleziono &quot;%3&quot;.</translation> <translation type="unfinished">Plik wykonywalny &quot;%1&quot; został skompilowany dla Qt &quot;%2&quot;, znaleziono &quot;%3&quot;.</translation>
</message> </message>
<message> <message>
<location filename="../../src/Global.cpp" line="928"/> <location filename="../../src/Global.cpp" line="932"/>
<source>Executable &apos;%1&apos; requires Windows 2000 or later.</source> <source>Executable &apos;%1&apos; requires Windows 2000 or later.</source>
<translation type="unfinished">Plik wykonywalny &apos;%1&apos; wymaga do uruchomienia Windows 2000 lub nowszego.</translation> <translation type="unfinished">Plik wykonywalny &apos;%1&apos; wymaga do uruchomienia Windows 2000 lub nowszego.</translation>
</message> </message>

View File

@ -30,7 +30,7 @@
#define VER_LAMEXP_MINOR_LO 4 #define VER_LAMEXP_MINOR_LO 4
#define VER_LAMEXP_TYPE Alpha #define VER_LAMEXP_TYPE Alpha
#define VER_LAMEXP_PATCH 12 #define VER_LAMEXP_PATCH 12
#define VER_LAMEXP_BUILD 852 #define VER_LAMEXP_BUILD 853
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Tool versions (minimum expected versions!) // Tool versions (minimum expected versions!)

View File

@ -794,7 +794,7 @@ void MainWindow::dropEvent(QDropEvent *event)
*/ */
void MainWindow::closeEvent(QCloseEvent *event) void MainWindow::closeEvent(QCloseEvent *event)
{ {
if(m_banner->isVisible() || m_delayedFileTimer->isActive()) if((m_banner->isVisible() || m_delayedFileTimer->isActive()) && !lamexp_session_ending())
{ {
MessageBeep(MB_ICONEXCLAMATION); MessageBeep(MB_ICONEXCLAMATION);
event->ignore(); event->ignore();

View File

@ -149,7 +149,7 @@ void SplashScreen::keyReleaseEvent(QKeyEvent *event)
void SplashScreen::closeEvent(QCloseEvent *event) void SplashScreen::closeEvent(QCloseEvent *event)
{ {
if(!m_canClose) event->ignore(); if(!m_canClose && !lamexp_session_ending()) event->ignore();
} }
bool SplashScreen::winEvent(MSG *message, long *result) bool SplashScreen::winEvent(MSG *message, long *result)

View File

@ -270,7 +270,7 @@ void UpdateDialog::showEvent(QShowEvent *event)
void UpdateDialog::closeEvent(QCloseEvent *event) void UpdateDialog::closeEvent(QCloseEvent *event)
{ {
if(!closeButton->isEnabled()) if(!closeButton->isEnabled() && !lamexp_session_ending())
{ {
event->ignore(); event->ignore();
} }

View File

@ -152,7 +152,7 @@ void WorkingBanner::keyReleaseEvent(QKeyEvent *event)
void WorkingBanner::closeEvent(QCloseEvent *event) void WorkingBanner::closeEvent(QCloseEvent *event)
{ {
if(!m_canClose) event->ignore(); if(!m_canClose && !lamexp_session_ending()) event->ignore();
} }
bool WorkingBanner::winEvent(MSG *message, long *result) bool WorkingBanner::winEvent(MSG *message, long *result)

View File

@ -175,7 +175,7 @@ void ProcessThread::processFile()
//------------------------------------ //------------------------------------
//Update audio properties after decode //Update audio properties after decode
//------------------------------------ //------------------------------------
if(bSuccess && IS_WAVE(m_audioFile)) if(bSuccess && !m_aborted && IS_WAVE(m_audioFile))
{ {
if(m_encoder->supportedSamplerates() || m_encoder->supportedBitdepths() || m_encoder->supportedChannelCount()) if(m_encoder->supportedSamplerates() || m_encoder->supportedBitdepths() || m_encoder->supportedChannelCount())
{ {
@ -206,7 +206,7 @@ void ProcessThread::processFile()
//----------------------- //-----------------------
if(bSuccess) if(bSuccess)
{ {
while(!m_filters.isEmpty()) while(!m_filters.isEmpty() && !m_aborted)
{ {
QString tempFile = generateTempFileName(); QString tempFile = generateTempFileName();
AbstractFilter *poFilter = m_filters.takeFirst(); AbstractFilter *poFilter = m_filters.takeFirst();
@ -228,14 +228,14 @@ void ProcessThread::processFile()
//----------------- //-----------------
//Encode audio file //Encode audio file
//----------------- //-----------------
if(bSuccess) if(bSuccess && !m_aborted)
{ {
m_currentStep = EncodingStep; m_currentStep = EncodingStep;
bSuccess = m_encoder->encode(sourceFile, m_audioFile, outFileName, &m_aborted); bSuccess = m_encoder->encode(sourceFile, m_audioFile, outFileName, &m_aborted);
} }
//Make sure output file exists //Make sure output file exists
if(bSuccess) if(bSuccess && !m_aborted)
{ {
QFileInfo fileInfo(outFileName); QFileInfo fileInfo(outFileName);
bSuccess = fileInfo.exists() && fileInfo.isFile() && (fileInfo.size() > 0); bSuccess = fileInfo.exists() && fileInfo.isFile() && (fileInfo.size() > 0);
@ -244,7 +244,7 @@ void ProcessThread::processFile()
QThread::msleep(500); QThread::msleep(500);
//Report result //Report result
emit processStateChanged(m_jobId, (bSuccess ? tr("Done.") : (m_aborted ? tr("Aborted!") : tr("Failed!"))), (bSuccess ? ProgressModel::JobComplete : ProgressModel::JobFailed)); emit processStateChanged(m_jobId, (m_aborted ? tr("Aborted!") : (bSuccess ? tr("Done.") : tr("Failed!"))), ((bSuccess && !m_aborted) ? ProgressModel::JobComplete : ProgressModel::JobFailed));
emit processStateFinished(m_jobId, outFileName, bSuccess); emit processStateFinished(m_jobId, outFileName, bSuccess);
qDebug("Process thread is done."); qDebug("Process thread is done.");