mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-31 20:58:07 -06:00
@@ -45,6 +45,7 @@
|
||||
|
||||
#include "base/bittorrent/session.h"
|
||||
#include "base/global.h"
|
||||
#include "base/interfaces/iapplication.h"
|
||||
#include "base/net/portforwarder.h"
|
||||
#include "base/net/proxyconfigurationmanager.h"
|
||||
#include "base/path.h"
|
||||
@@ -285,6 +286,8 @@ void AppController::preferencesAction()
|
||||
|
||||
// Advanced settings
|
||||
// qBitorrent preferences
|
||||
// Physical memory (RAM) usage limit
|
||||
data[u"memory_working_set_limit"_qs] = dynamic_cast<IApplication *>(QCoreApplication::instance())->memoryWorkingSetLimit();
|
||||
// Current network interface
|
||||
data[u"current_network_interface"_qs] = session->networkInterface();
|
||||
// Current network interface address
|
||||
@@ -738,6 +741,9 @@ void AppController::setPreferencesAction()
|
||||
|
||||
// Advanced settings
|
||||
// qBittorrent preferences
|
||||
// Physical memory (RAM) usage limit
|
||||
if (hasKey(u"memory_working_set_limit"_qs))
|
||||
dynamic_cast<IApplication *>(QCoreApplication::instance())->setMemoryWorkingSetLimit(it.value().toInt());
|
||||
// Current network interface
|
||||
if (hasKey(u"current_network_interface"_qs))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user