mirror of
https://github.com/debauchee/barrier.git
synced 2024-12-20 01:11:37 +03:00
fixed: gui doesn't connect to service on first load.
This commit is contained in:
parent
259f363f13
commit
aec76ce083
@ -78,14 +78,6 @@ MainWindow::MainWindow(QSettings& settings, AppConfig& appConfig) :
|
|||||||
|
|
||||||
m_SetupWizard = new SetupWizard(*this, false);
|
m_SetupWizard = new SetupWizard(*this, false);
|
||||||
connect(m_SetupWizard, SIGNAL(finished(int)), this, SLOT(refreshStartButton()));
|
connect(m_SetupWizard, SIGNAL(finished(int)), this, SLOT(refreshStartButton()));
|
||||||
|
|
||||||
if (appConfig.processMode() == Service)
|
|
||||||
{
|
|
||||||
connect(&m_IpcClient, SIGNAL(readLogLine(const QString&)), this, SLOT(appendLogRaw(const QString&)));
|
|
||||||
connect(&m_IpcClient, SIGNAL(errorMessage(const QString&)), this, SLOT(appendLogError(const QString&)));
|
|
||||||
connect(&m_IpcClient, SIGNAL(infoMessage(const QString&)), this, SLOT(appendLogInfo(const QString&)));
|
|
||||||
m_IpcClient.connectToHost();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MainWindow::~MainWindow()
|
MainWindow::~MainWindow()
|
||||||
@ -99,8 +91,19 @@ void MainWindow::start(bool firstRun)
|
|||||||
{
|
{
|
||||||
refreshStartButton();
|
refreshStartButton();
|
||||||
|
|
||||||
if (!firstRun && appConfig().autoConnect() && appConfig().processMode() == Desktop)
|
if (appConfig().processMode() == Service)
|
||||||
|
{
|
||||||
|
connect(&m_IpcClient, SIGNAL(readLogLine(const QString&)), this, SLOT(appendLogRaw(const QString&)));
|
||||||
|
connect(&m_IpcClient, SIGNAL(errorMessage(const QString&)), this, SLOT(appendLogError(const QString&)));
|
||||||
|
connect(&m_IpcClient, SIGNAL(infoMessage(const QString&)), this, SLOT(appendLogInfo(const QString&)));
|
||||||
|
m_IpcClient.connectToHost();
|
||||||
startSynergy();
|
startSynergy();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (appConfig().processMode() == Desktop && !firstRun && appConfig().autoConnect())
|
||||||
|
{
|
||||||
|
startSynergy();
|
||||||
|
}
|
||||||
|
|
||||||
createTrayIcon();
|
createTrayIcon();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user