mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-10 23:07:59 +00:00
Turn static variable into class member
This commit is contained in:
parent
ca9f5a18d4
commit
7eaaa8f92a
@ -43,7 +43,6 @@
|
|||||||
#include <sys/resource.h>
|
#include <sys/resource.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <QAtomicInt>
|
|
||||||
#include <QByteArray>
|
#include <QByteArray>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QLibraryInfo>
|
#include <QLibraryInfo>
|
||||||
@ -808,8 +807,7 @@ void Application::applyMemoryWorkingSetLimit()
|
|||||||
void Application::cleanup()
|
void Application::cleanup()
|
||||||
{
|
{
|
||||||
// cleanup() can be called multiple times during shutdown. We only need it once.
|
// cleanup() can be called multiple times during shutdown. We only need it once.
|
||||||
static QAtomicInt alreadyDone;
|
if (!m_isCleanupRun.testAndSetAcquire(0, 1))
|
||||||
if (!alreadyDone.testAndSetAcquire(0, 1))
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#ifndef DISABLE_GUI
|
#ifndef DISABLE_GUI
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QtGlobal>
|
#include <QtGlobal>
|
||||||
|
#include <QAtomicInt>
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
#include <QPointer>
|
#include <QPointer>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
@ -145,6 +146,7 @@ private:
|
|||||||
|
|
||||||
ApplicationInstanceManager *m_instanceManager = nullptr;
|
ApplicationInstanceManager *m_instanceManager = nullptr;
|
||||||
bool m_running = false;
|
bool m_running = false;
|
||||||
|
QAtomicInt m_isCleanupRun;
|
||||||
ShutdownDialogAction m_shutdownAct;
|
ShutdownDialogAction m_shutdownAct;
|
||||||
QBtCommandLineParameters m_commandLineArgs;
|
QBtCommandLineParameters m_commandLineArgs;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user