mirror of
https://github.com/debauchee/barrier.git
synced 2024-12-19 00:41:49 +03:00
Stopped old process before start a new one #4908
This commit is contained in:
parent
e472e47815
commit
d70c19b099
@ -451,19 +451,13 @@ void MainWindow::checkFingerprint(const QString& line)
|
||||
.arg(fingerprint),
|
||||
QMessageBox::Yes | QMessageBox::No);
|
||||
|
||||
stopSynergy();
|
||||
|
||||
if (fingerprintReply == QMessageBox::Yes) {
|
||||
// restart core process after trusting fingerprint.
|
||||
Fingerprint::trustedServers().trust(fingerprint);
|
||||
startSynergy();
|
||||
}
|
||||
else {
|
||||
// on all platforms, the core process will stop if the
|
||||
// fingerprint is not trusted, so technically the stop
|
||||
// isn't really needed. however on windows, the core
|
||||
// process will keep trying (and failing) unless we
|
||||
// tell it to stop.
|
||||
stopSynergy();
|
||||
}
|
||||
}
|
||||
|
||||
bool MainWindow::autoHide()
|
||||
@ -483,6 +477,12 @@ QString MainWindow::getTimeStamp()
|
||||
return '[' + current.toString(Qt::ISODate) + ']';
|
||||
}
|
||||
|
||||
void MainWindow::restartSynergy()
|
||||
{
|
||||
stopSynergy();
|
||||
startSynergy();
|
||||
}
|
||||
|
||||
void MainWindow::clearLog()
|
||||
{
|
||||
m_pLogOutput->clear();
|
||||
@ -1072,7 +1072,7 @@ void MainWindow::autoAddScreen(const QString name)
|
||||
}
|
||||
}
|
||||
else {
|
||||
startSynergy();
|
||||
restartSynergy();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1097,8 +1097,7 @@ void MainWindow::on_m_pActionWizard_triggered()
|
||||
|
||||
void MainWindow::on_m_pButtonApply_clicked()
|
||||
{
|
||||
stopSynergy();
|
||||
startSynergy();
|
||||
restartSynergy();
|
||||
}
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
@ -1282,7 +1281,7 @@ void MainWindow::updateEdition()
|
||||
void MainWindow::on_m_pComboServerList_currentIndexChanged(QString )
|
||||
{
|
||||
if (m_pComboServerList->count() != 0) {
|
||||
startSynergy();
|
||||
restartSynergy();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -178,6 +178,7 @@ class MainWindow : public QMainWindow, public Ui::MainWindowBase
|
||||
void checkFingerprint(const QString& line);
|
||||
bool autoHide();
|
||||
QString getTimeStamp();
|
||||
void restartSynergy();
|
||||
|
||||
private:
|
||||
QSettings& m_Settings;
|
||||
|
Loading…
Reference in New Issue
Block a user