mirror of
https://github.com/tnodir/fort
synced 2024-11-15 13:06:36 +00:00
UI: AutoUpdateManager: Installer will be started only from UI
This commit is contained in:
parent
a545d1ba71
commit
8dcd489fb2
@ -99,7 +99,7 @@ bool AutoUpdateManager::runInstaller()
|
|||||||
|
|
||||||
if (!settings->hasService()) {
|
if (!settings->hasService()) {
|
||||||
args << "/AUTORUN";
|
args << "/AUTORUN";
|
||||||
} else if (settings->isService()) {
|
} else {
|
||||||
emit restartClients();
|
emit restartClients();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,6 +9,13 @@ AutoUpdateManagerRpc::AutoUpdateManagerRpc(const QString &cachePath, QObject *pa
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AutoUpdateManagerRpc::setUp()
|
||||||
|
{
|
||||||
|
AutoUpdateManager::setUp();
|
||||||
|
|
||||||
|
setupClientSignals();
|
||||||
|
}
|
||||||
|
|
||||||
bool AutoUpdateManagerRpc::processServerCommand(const ProcessCommandArgs &p,
|
bool AutoUpdateManagerRpc::processServerCommand(const ProcessCommandArgs &p,
|
||||||
QVariantList & /*resArgs*/, bool & /*ok*/, bool & /*isSendResult*/)
|
QVariantList & /*resArgs*/, bool & /*ok*/, bool & /*isSendResult*/)
|
||||||
{
|
{
|
||||||
@ -29,5 +36,13 @@ void AutoUpdateManagerRpc::setupServerSignals(RpcManager *rpcManager)
|
|||||||
auto autoUpdateManager = IoC<AutoUpdateManager>();
|
auto autoUpdateManager = IoC<AutoUpdateManager>();
|
||||||
|
|
||||||
connect(autoUpdateManager, &AutoUpdateManager::restartClients, rpcManager,
|
connect(autoUpdateManager, &AutoUpdateManager::restartClients, rpcManager,
|
||||||
[&] { rpcManager->invokeOnClients(Control::Rpc_AutoUpdateManager_restartClients); });
|
[=] { rpcManager->invokeOnClients(Control::Rpc_AutoUpdateManager_restartClients); });
|
||||||
|
}
|
||||||
|
|
||||||
|
void AutoUpdateManagerRpc::setupClientSignals()
|
||||||
|
{
|
||||||
|
auto rpcManager = IoCDependency<RpcManager>();
|
||||||
|
|
||||||
|
connect(this, &AutoUpdateManager::restartClients, rpcManager,
|
||||||
|
[=] { rpcManager->invokeOnServer(Control::Rpc_AutoUpdateManager_restartClients); });
|
||||||
}
|
}
|
||||||
|
@ -14,10 +14,15 @@ class AutoUpdateManagerRpc : public AutoUpdateManager
|
|||||||
public:
|
public:
|
||||||
explicit AutoUpdateManagerRpc(const QString &cachePath, QObject *parent = nullptr);
|
explicit AutoUpdateManagerRpc(const QString &cachePath, QObject *parent = nullptr);
|
||||||
|
|
||||||
|
void setUp() override;
|
||||||
|
|
||||||
static bool processServerCommand(
|
static bool processServerCommand(
|
||||||
const ProcessCommandArgs &p, QVariantList &resArgs, bool &ok, bool &isSendResult);
|
const ProcessCommandArgs &p, QVariantList &resArgs, bool &ok, bool &isSendResult);
|
||||||
|
|
||||||
static void setupServerSignals(RpcManager *rpcManager);
|
static void setupServerSignals(RpcManager *rpcManager);
|
||||||
|
|
||||||
|
private:
|
||||||
|
void setupClientSignals();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // AUTOUPDATEMANAGERRPC_H
|
#endif // AUTOUPDATEMANAGERRPC_H
|
||||||
|
Loading…
Reference in New Issue
Block a user