@@ -289,6 +289,7 @@ void MainWindow::connectSlots()
289289 connect (&m_coreProcess, &CoreProcess::processStateChanged, this , &MainWindow::coreProcessStateChanged);
290290 connect (&m_coreProcess, &CoreProcess::connectionStateChanged, this , &MainWindow::coreConnectionStateChanged);
291291 connect (&m_coreProcess, &CoreProcess::secureSocket, this , &MainWindow::secureSocket);
292+ connect (&m_coreProcess, &CoreProcess::daemonIpcClientConnectFailed, this , &MainWindow::daemonIpcClientConnectFailed);
292293
293294 connect (m_actionAbout, &QAction::triggered, this , &MainWindow::openAboutDialog);
294295 connect (m_actionClearSettings, &QAction::triggered, this , &MainWindow::clearSettings);
@@ -365,6 +366,21 @@ void MainWindow::firstShown()
365366 // hacky and fragile, so maybe there's a better approach.
366367 const auto kCriticalDialogDelay = 100 ;
367368 QTimer::singleShot (kCriticalDialogDelay , this , &messages::raiseCriticalDialog);
369+
370+ if (!Settings::value (Settings::Gui::AutoUpdateCheck).isValid ()) {
371+ showAndActivate ();
372+ Settings::setValue (Settings::Gui::AutoUpdateCheck, messages::showUpdateCheckOption (this ));
373+ }
374+
375+ if (Settings::value (Settings::Gui::AutoUpdateCheck).toBool ()) {
376+ m_versionChecker.checkLatest ();
377+ } else {
378+ qDebug () << " update check disabled" ;
379+ }
380+
381+ if (Settings::value (Settings::Core::StartedBefore).toBool ()) {
382+ m_coreProcess.start ();
383+ }
368384}
369385
370386void MainWindow::settingsChanged (const QString &key)
@@ -603,24 +619,6 @@ void MainWindow::serverConnectionConfigureClient(const QString &clientName)
603619
604620void MainWindow::open ()
605621{
606-
607- if (!Settings::value (Settings::Gui::AutoUpdateCheck).isValid ()) {
608- showAndActivate ();
609- Settings::setValue (Settings::Gui::AutoUpdateCheck, messages::showUpdateCheckOption (this ));
610- }
611-
612- if (Settings::value (Settings::Gui::AutoUpdateCheck).toBool ()) {
613- m_versionChecker.checkLatest ();
614- } else {
615- qDebug () << " update check disabled" ;
616- }
617-
618- m_coreProcess.applyLogLevel ();
619-
620- if (Settings::value (Settings::Core::StartedBefore).toBool ()) {
621- m_coreProcess.start ();
622- }
623-
624622 Settings::value (Settings::Gui::Autohide).toBool () ? hide () : showAndActivate ();
625623}
626624
@@ -1137,3 +1135,10 @@ bool MainWindow::regenerateLocalFingerprints()
11371135 updateLocalFingerprint ();
11381136 return true ;
11391137}
1138+
1139+ void MainWindow::daemonIpcClientConnectFailed ()
1140+ {
1141+ if (deskflow::gui::messages::showDaemonOffline (this )) {
1142+ m_coreProcess.retryDaemon ();
1143+ }
1144+ }
0 commit comments