From a956ae47d1b1110a90304b950dbdfc379695d2a5 Mon Sep 17 00:00:00 2001 From: Jedidiah Buck McCready Date: Sun, 3 Dec 2017 09:04:02 -0800 Subject: removed c style casts and eliminated all clang warnings, ... (#38) * removed c style casts and eliminated all clang warnings, fixed instanceId reading from only one byte in deserialization of message, cleaned up serialization code using QDataStream, changed connection type to use quint8 enum rather than char * renamed SingleAppConnectionType to ConnectionType, added initialization values to all ConnectionType enum cases --- singleapplication_p.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'singleapplication_p.h') diff --git a/singleapplication_p.h b/singleapplication_p.h index 856b33d..a990a53 100644 --- a/singleapplication_p.h +++ b/singleapplication_p.h @@ -46,6 +46,12 @@ struct InstancesInfo { class SingleApplicationPrivate : public QObject { Q_OBJECT public: + enum ConnectionType : quint8 { + InvalidConnection = 0, + NewInstance = 1, + SecondaryInstance = 2, + Reconnect = 3 + }; Q_DECLARE_PUBLIC(SingleApplication) SingleApplicationPrivate( SingleApplication *q_ptr ); @@ -54,7 +60,7 @@ public: void genBlockServerName( int msecs ); void startPrimary( bool resetMemory ); void startSecondary(); - void connectToPrimary( int msecs, char connectionType ); + void connectToPrimary(int msecs, ConnectionType connectionType ); qint64 primaryPid(); #ifdef Q_OS_UNIX -- cgit v1.2.1