From 9435202034cafb05ffc11aed48ff57536bce73f7 Mon Sep 17 00:00:00 2001 From: isanae <14251494+isanae@users.noreply.github.com> Date: Wed, 22 Jul 2020 23:27:01 -0400 Subject: removed flags from SingleInstance because there's only one left refactoring in main.cpp: - moved stuff to loglist.cpp and moapplication.cpp - split main() into a few functions --- src/singleinstance.h | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) (limited to 'src/singleinstance.h') diff --git a/src/singleinstance.h b/src/singleinstance.h index d500a056..5f6c3633 100644 --- a/src/singleinstance.h +++ b/src/singleinstance.h @@ -36,19 +36,9 @@ class SingleInstance : public QObject Q_OBJECT public: - enum Flag - { - NoFlags = 0x00, - - // if another instance is running, run this one disconnected from the - // shared memory - AllowMultiple = 0x01 - }; - - using Flags = QFlags; - - - explicit SingleInstance(Flags flags, QObject *parent = 0); + // `allowMultiple`: if another instance is running, run this one + // disconnected from the shared memory + explicit SingleInstance(bool allowMultiple, QObject *parent = 0); /** * @return true if this instance's job is to forward data to the primary @@ -97,6 +87,4 @@ private: }; -Q_DECLARE_OPERATORS_FOR_FLAGS(SingleInstance::Flags); - #endif // SINGLEINSTANCE_H -- cgit v1.3.1