mirror of
https://github.com/tnodir/fort
synced 2024-11-15 05:36:09 +00:00
UI: AppInfoManager: Use "noCache" flag
This commit is contained in:
parent
112e6c77f1
commit
adf095e831
@ -98,7 +98,8 @@ inline void setupClientServices(IocContainer *ioc, const FortSettings *settings)
|
|||||||
ioc->setService<AskPendingManager>(new AskPendingManagerRpc());
|
ioc->setService<AskPendingManager>(new AskPendingManagerRpc());
|
||||||
ioc->setService<AutoUpdateManager>(new AutoUpdateManagerRpc(settings->cachePath()));
|
ioc->setService<AutoUpdateManager>(new AutoUpdateManagerRpc(settings->cachePath()));
|
||||||
ioc->setService<DriverManager>(new DriverManagerRpc());
|
ioc->setService<DriverManager>(new DriverManagerRpc());
|
||||||
ioc->setService<AppInfoManager>(new AppInfoManagerRpc(settings->cacheFilePath()));
|
ioc->setService<AppInfoManager>(
|
||||||
|
new AppInfoManagerRpc(settings->cacheFilePath(), settings->noCache()));
|
||||||
ioc->setService<LogManager>(new LogManagerRpc());
|
ioc->setService<LogManager>(new LogManagerRpc());
|
||||||
ioc->setService<ServiceInfoManager>(new ServiceInfoManagerRpc());
|
ioc->setService<ServiceInfoManager>(new ServiceInfoManagerRpc());
|
||||||
ioc->setService<TaskManager>(new TaskManagerRpc());
|
ioc->setService<TaskManager>(new TaskManagerRpc());
|
||||||
|
@ -50,7 +50,7 @@ QString FortSettings::statBlockFilePath() const
|
|||||||
|
|
||||||
QString FortSettings::cacheFilePath() const
|
QString FortSettings::cacheFilePath() const
|
||||||
{
|
{
|
||||||
return noCache() && !hasService() ? ":memory:" : cachePath() + "appinfo.db";
|
return noCache() ? ":memory:" : cachePath() + "appinfo.db";
|
||||||
}
|
}
|
||||||
|
|
||||||
QString FortSettings::passwordUnlockedTillText() const
|
QString FortSettings::passwordUnlockedTillText() const
|
||||||
|
@ -5,8 +5,9 @@
|
|||||||
#include <rpc/rpcmanager.h>
|
#include <rpc/rpcmanager.h>
|
||||||
#include <util/ioc/ioccontainer.h>
|
#include <util/ioc/ioccontainer.h>
|
||||||
|
|
||||||
AppInfoManagerRpc::AppInfoManagerRpc(const QString &filePath, QObject *parent) :
|
AppInfoManagerRpc::AppInfoManagerRpc(const QString &filePath, bool noCache, QObject *parent) :
|
||||||
AppInfoManager(filePath, parent, SqliteDb::OpenDefaultReadOnly)
|
AppInfoManager(filePath, parent,
|
||||||
|
(noCache ? SqliteDb::OpenDefaultReadWrite : SqliteDb::OpenDefaultReadOnly))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ class AppInfoManagerRpc : public AppInfoManager
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit AppInfoManagerRpc(const QString &filePath, QObject *parent = nullptr);
|
explicit AppInfoManagerRpc(const QString &filePath, bool noCache, QObject *parent = nullptr);
|
||||||
|
|
||||||
static bool processServerCommand(
|
static bool processServerCommand(
|
||||||
const ProcessCommandArgs &p, QVariantList &resArgs, bool &ok, bool &isSendResult);
|
const ProcessCommandArgs &p, QVariantList &resArgs, bool &ok, bool &isSendResult);
|
||||||
|
Loading…
Reference in New Issue
Block a user