mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-20 13:23:34 -07:00
fix: make appcontroller member variables static
This commit is contained in:
parent
d99d27e2df
commit
95e6ac1550
2 changed files with 30 additions and 24 deletions
|
@ -90,9 +90,14 @@ const QString KEY_FILE_METADATA_LAST_MODIFICATION_DATE = u"last_modification_dat
|
|||
const int CLIENT_DATA_FILE_MAX_SIZE = 1024 * 1024;
|
||||
const QString CLIENT_DATA_FILE_NAME = u"web_data.json"_s;
|
||||
|
||||
Path AppController::m_clientDataFilePath;
|
||||
QJsonObject AppController::m_clientData;
|
||||
|
||||
AppController::AppController(IApplication *app, QObject *parent)
|
||||
: APIController(app, parent)
|
||||
{
|
||||
if (m_clientDataFilePath.isEmpty())
|
||||
{
|
||||
m_clientDataFilePath = specialFolderLocation(SpecialFolder::Data) / Path(CLIENT_DATA_FILE_NAME);
|
||||
if (m_clientDataFilePath.exists())
|
||||
{
|
||||
|
@ -121,6 +126,7 @@ AppController::AppController(IApplication *app, QObject *parent)
|
|||
|
||||
m_clientData = jsonDoc.object();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void AppController::webapiVersionAction()
|
||||
|
|
|
@ -62,6 +62,6 @@ private slots:
|
|||
void networkInterfaceAddressListAction();
|
||||
|
||||
private:
|
||||
Path m_clientDataFilePath;
|
||||
QJsonObject m_clientData;
|
||||
static Path m_clientDataFilePath;
|
||||
static QJsonObject m_clientData;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue