mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-10 07:22:47 -07:00
parent
7377974731
commit
bc937d38a2
8 changed files with 55 additions and 41 deletions
|
@ -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))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue