Format singleapplication sources

This commit is contained in:
Jonas Kvinge
2020-10-04 02:18:10 +02:00
parent 51f2383a07
commit 28d0cc8795
8 changed files with 97 additions and 134 deletions

View File

@@ -51,7 +51,7 @@ class SingleCoreApplication : public QCoreApplication {
typedef QCoreApplication app_t;
public:
public:
/**
* @brief Mode of operation of SingleCoreApplication.
* Whether the block should be user-wide or system-wide and whether the
@@ -63,11 +63,11 @@ public:
* @enum
*/
enum Mode {
User = 1 << 0,
System = 1 << 1,
SecondaryNotification = 1 << 2,
ExcludeAppVersion = 1 << 3,
ExcludeAppPath = 1 << 4
User = 1 << 0,
System = 1 << 1,
SecondaryNotification = 1 << 2,
ExcludeAppVersion = 1 << 3,
ExcludeAppPath = 1 << 4
};
Q_DECLARE_FLAGS(Options, Mode)
@@ -91,7 +91,7 @@ public:
* Usually 4*timeout would be the worst case (fail) scenario.
* @see See the corresponding QAPPLICATION_CLASS constructor for reference
*/
explicit SingleCoreApplication( int &argc, char *argv[], bool allowSecondary = false, Options options = Mode::User, int timeout = 1000 );
explicit SingleCoreApplication(int &argc, char *argv[], bool allowSecondary = false, Options options = Mode::User, int timeout = 1000);
~SingleCoreApplication() override;
/**
@@ -125,17 +125,17 @@ public:
* @note sendMessage() will return false if invoked from the primary
* instance.
*/
bool sendMessage( QByteArray message, int timeout = 1000 );
bool sendMessage(QByteArray message, int timeout = 1000);
signals:
void instanceStarted();
void receivedMessage( quint32 instanceId, QByteArray message );
void receivedMessage(quint32 instanceId, QByteArray message);
private:
private:
SingleCoreApplicationPrivate *d_ptr;
Q_DECLARE_PRIVATE(SingleCoreApplication)
};
Q_DECLARE_OPERATORS_FOR_FLAGS(SingleCoreApplication::Options)
#endif // SINGLECOREAPPLICATION_H
#endif // SINGLECOREAPPLICATION_H