mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-14 02:27:09 -07:00
Use unmodified QtSingleApplication on Windows.
Get running application instance PID without QtSingleApplication modification.
This commit is contained in:
parent
e52a8fb0b0
commit
2dd473eb28
7 changed files with 47 additions and 89 deletions
|
@ -35,23 +35,24 @@
|
|||
|
||||
#ifndef DISABLE_GUI
|
||||
#include "sessionapplication.h"
|
||||
typedef SessionApplication BaseApplication;
|
||||
#else
|
||||
#include "qtsinglecoreapplication.h"
|
||||
typedef QtSingleCoreApplication BaseApplication;
|
||||
#endif
|
||||
|
||||
class Application
|
||||
#ifndef DISABLE_GUI
|
||||
: public SessionApplication
|
||||
#else
|
||||
: public QtSingleCoreApplication
|
||||
#endif
|
||||
class Application : public BaseApplication
|
||||
{
|
||||
public:
|
||||
Application(const QString &id, int &argc, char **argv);
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
bool isRunning();
|
||||
#endif
|
||||
|
||||
private:
|
||||
QTranslator qtTranslator_;
|
||||
QTranslator translator_;
|
||||
QTranslator m_qtTranslator;
|
||||
QTranslator m_translator;
|
||||
|
||||
void initializeTranslation();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue