mirror of
https://github.com/tnodir/fort
synced 2024-11-15 09:25:40 +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()) {
|
||||
args << "/AUTORUN";
|
||||
} else if (settings->isService()) {
|
||||
} else {
|
||||
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,
|
||||
QVariantList & /*resArgs*/, bool & /*ok*/, bool & /*isSendResult*/)
|
||||
{
|
||||
@ -29,5 +36,13 @@ void AutoUpdateManagerRpc::setupServerSignals(RpcManager *rpcManager)
|
||||
auto autoUpdateManager = IoC<AutoUpdateManager>();
|
||||
|
||||
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:
|
||||
explicit AutoUpdateManagerRpc(const QString &cachePath, QObject *parent = nullptr);
|
||||
|
||||
void setUp() override;
|
||||
|
||||
static bool processServerCommand(
|
||||
const ProcessCommandArgs &p, QVariantList &resArgs, bool &ok, bool &isSendResult);
|
||||
|
||||
static void setupServerSignals(RpcManager *rpcManager);
|
||||
|
||||
private:
|
||||
void setupClientSignals();
|
||||
};
|
||||
|
||||
#endif // AUTOUPDATEMANAGERRPC_H
|
||||
|
Loading…
Reference in New Issue
Block a user