mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-22 08:27:24 -06:00
Add QBT_APP_64BIT define
Now we use QT_POINTER_SIZE to detect CPU bitness, it has the advantage of applicable to all CPU architectures not limiting to x86 arch.
This commit is contained in:
@@ -48,11 +48,7 @@ public:
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
||||
// Title
|
||||
#if defined(__x86_64__) || defined(_M_X64)
|
||||
labelName->setText("<b><h2>qBittorrent " QBT_VERSION " (64-bit)</h2></b>");
|
||||
#else
|
||||
labelName->setText("<b><h2>qBittorrent " QBT_VERSION " (32-bit)</h2></b>");
|
||||
#endif
|
||||
labelName->setText(QString("<b><h2>qBittorrent " QBT_VERSION " (%1-bit)</h2></b>").arg(QT_POINTER_SIZE * 8));
|
||||
|
||||
logo->setPixmap(Utils::Gui::scaledPixmapSvg(":/icons/skin/qbittorrent-tray.svg", this, 32));
|
||||
|
||||
|
||||
@@ -325,7 +325,7 @@ void AdvancedSettings::loadAdvancedSettings()
|
||||
// Checking Memory Usage
|
||||
spinBoxCheckingMemUsage.setMinimum(1);
|
||||
// When build as 32bit binary, set the maximum value lower to prevent crashes.
|
||||
#if (QT_POINTER_SIZE == 8)
|
||||
#ifdef QBT_APP_64BIT
|
||||
spinBoxCheckingMemUsage.setMaximum(1024);
|
||||
#else
|
||||
// Allocate at most 128MiB out of the remaining 512MiB (see the cache part below)
|
||||
@@ -339,7 +339,7 @@ void AdvancedSettings::loadAdvancedSettings()
|
||||
spinBoxCache.setMinimum(-1);
|
||||
// When build as 32bit binary, set the maximum at less than 2GB to prevent crashes.
|
||||
// These macros may not be available on compilers other than MSVC and GCC
|
||||
#if defined(__x86_64__) || defined(_M_X64)
|
||||
#ifdef QBT_APP_64BIT
|
||||
spinBoxCache.setMaximum(4096);
|
||||
#else
|
||||
// allocate 1536MiB and leave 512MiB to the rest of program data in RAM
|
||||
|
||||
Reference in New Issue
Block a user