diff options
author | Itay Grudev <itay@grudev.com> | 2015-06-09 17:29:20 +0300 |
---|---|---|
committer | Itay Grudev <itay@grudev.com> | 2015-06-09 17:29:20 +0300 |
commit | 219383657a4eaf967401984858ebb5c8efa5822d (patch) | |
tree | 331e317ddb31667f1fe6503a8454c477e5ced441 /singleapplication.h | |
parent | Fixed race condition #3! Library version 2.1; Explained implementation in README (diff) | |
download | singleapplication-219383657a4eaf967401984858ebb5c8efa5822d.tar.xz |
QApplication inherit macro
Diffstat (limited to 'singleapplication.h')
-rw-r--r-- | singleapplication.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/singleapplication.h b/singleapplication.h index 669f878..3766d61 100644 --- a/singleapplication.h +++ b/singleapplication.h @@ -1,7 +1,12 @@ #ifndef SINGLE_APPLICATION_H #define SINGLE_APPLICATION_H -#include <QApplication> +// Change this to inherit from QGuiApplication or QCoreApplication +#define QAPPLICATION_CLASS QApplication + +#define QUOTE(C) #C +#define INCLUDE_FILE(C) QUOTE(C) +#include INCLUDE_FILE(QAPPLICATION_CLASS) class SingleApplicationPrivate; @@ -9,7 +14,7 @@ class SingleApplicationPrivate; * @brief The SingleApplication class handles multipe instances of the same Application * @see QApplication */ -class SingleApplication : public QApplication +class SingleApplication : public QAPPLICATION_CLASS { Q_OBJECT public: |