mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2026-06-05 15:34:39 -04:00
Create the splash screen before assigning the application name
Even though the splash screen does not have a title it seems to interfere with JTAlert which enumerates window titles to identify WSJT-X instances. I'm not sure why this is necessary, but if it helps it should be benign. Ensure that the splash screen is hidden before any message boxes are shown, this is essential at startup if there is a stale lock file or rig control error. Be far less aggressive about bringing the splash screen to the top of the application window stack. This may cause the splash screen to be obscured on some platforms. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7025 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
+14
-5
@@ -871,7 +871,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
|
||||
|
||||
void MainWindow::splash_done ()
|
||||
{
|
||||
m_splash->close ();
|
||||
m_splash && m_splash->close ();
|
||||
}
|
||||
|
||||
void MainWindow::on_the_minute ()
|
||||
@@ -1321,10 +1321,16 @@ void MainWindow::fastSink(qint64 frames)
|
||||
}
|
||||
|
||||
void MainWindow::showSoundInError(const QString& errorMsg)
|
||||
{MessageBox::critical_message (this, tr ("Error in Sound Input"), errorMsg);}
|
||||
{
|
||||
if (m_splash && m_splash->isVisible ()) m_splash->hide ();
|
||||
MessageBox::critical_message (this, tr ("Error in Sound Input"), errorMsg);
|
||||
}
|
||||
|
||||
void MainWindow::showSoundOutError(const QString& errorMsg)
|
||||
{MessageBox::critical_message (this, tr ("Error in Sound Output"), errorMsg);}
|
||||
{
|
||||
if (m_splash && m_splash->isVisible ()) m_splash->hide ();
|
||||
MessageBox::critical_message (this, tr ("Error in Sound Output"), errorMsg);
|
||||
}
|
||||
|
||||
void MainWindow::showStatusMessage(const QString& statusMsg)
|
||||
{statusBar()->showMessage(statusMsg);}
|
||||
@@ -1613,6 +1619,7 @@ void MainWindow::statusChanged()
|
||||
<< ui->rptSpinBox->value() << ";" << m_modeTx << endl;
|
||||
f.close();
|
||||
} else {
|
||||
if (m_splash && m_splash->isVisible ()) m_splash->hide ();
|
||||
MessageBox::warning_message (this, tr ("Status File Error")
|
||||
, tr ("Cannot open \"%1\" for writing: %2")
|
||||
.arg (f.fileName ()).arg (f.errorString ()));
|
||||
@@ -1756,6 +1763,7 @@ void MainWindow::subProcessFailed (QProcess * process, int exit_code, QProcess::
|
||||
if (argument.contains (' ')) argument = '"' + argument + '"';
|
||||
arguments << argument;
|
||||
}
|
||||
if (m_splash && m_splash->isVisible ()) m_splash->hide ();
|
||||
MessageBox::critical_message (this, tr ("Subprocess Error")
|
||||
, tr ("Subprocess failed with exit code %1")
|
||||
.arg (exit_code)
|
||||
@@ -1777,6 +1785,7 @@ void MainWindow::subProcessError (QProcess * process, QProcess::ProcessError)
|
||||
if (argument.contains (' ')) argument = '"' + argument + '"';
|
||||
arguments << argument;
|
||||
}
|
||||
if (m_splash && m_splash->isVisible ()) m_splash->hide ();
|
||||
MessageBox::critical_message (this, tr ("Subprocess error")
|
||||
, tr ("Running: %1\n%2")
|
||||
.arg (process->program () + ' ' + arguments.join (' '))
|
||||
@@ -2563,8 +2572,6 @@ void MainWindow::guiUpdate()
|
||||
double txDuration;
|
||||
QString rt;
|
||||
|
||||
if (m_splash && m_splash->isVisible ()) m_splash->raise ();
|
||||
|
||||
if(m_TRperiod==0) m_TRperiod=60;
|
||||
txDuration=0.0;
|
||||
if(m_modeTx=="JT4") txDuration=1.0 + 207.0*2520/11025.0; // JT4
|
||||
@@ -4870,6 +4877,7 @@ void MainWindow::rigFailure (QString const& reason)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_splash && m_splash->isVisible ()) m_splash->hide ();
|
||||
m_rigErrorMessageBox.setDetailedText (reason);
|
||||
|
||||
// don't call slot functions directly to avoid recursion
|
||||
@@ -5382,6 +5390,7 @@ void MainWindow::postWSPRDecode (bool is_new, QStringList parts)
|
||||
|
||||
void MainWindow::networkError (QString const& e)
|
||||
{
|
||||
if (m_splash && m_splash->isVisible ()) m_splash->hide ();
|
||||
if (MessageBox::Retry == MessageBox::warning_message (this, tr ("Network Error")
|
||||
, tr ("Error: %1\nUDP server %2:%3")
|
||||
.arg (e)
|
||||
|
||||
Reference in New Issue
Block a user