Allow to set "working set limit" on non-Windows OS

PR #16874.
This commit is contained in:
Chocobo1
2022-04-16 11:36:58 +08:00
committed by GitHub
parent 7377974731
commit bc937d38a2
8 changed files with 55 additions and 41 deletions

View File

@@ -113,10 +113,8 @@ public:
int fileLoggerAgeType() const override;
void setFileLoggerAgeType(int value) override;
#ifdef Q_OS_WIN
int memoryWorkingSetLimit() const override;
void setMemoryWorkingSetLimit(int size) override;
#endif
#ifndef DISABLE_GUI
QPointer<MainWindow> mainWindow() override;
@@ -137,9 +135,7 @@ private:
void processParams(const QStringList &params);
void runExternalProgram(const BitTorrent::Torrent *torrent) const;
void sendNotificationEmail(const BitTorrent::Torrent *torrent);
#ifdef Q_OS_WIN
void applyMemoryWorkingSetLimit();
#endif
#ifndef DISABLE_GUI
#ifdef Q_OS_MACOS
@@ -166,9 +162,7 @@ private:
SettingValue<int> m_storeFileLoggerAge;
SettingValue<int> m_storeFileLoggerAgeType;
SettingValue<Path> m_storeFileLoggerPath;
#ifdef Q_OS_WIN
SettingValue<int> m_storeMemoryWorkingSetLimit;
#endif
#ifndef DISABLE_GUI
QPointer<MainWindow> m_window;