diff options
author | Itay Grudev <itay+github.com@grudev.com> | 2020-10-15 09:22:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-15 09:22:43 +0100 |
commit | 5d837262f42a446719754fd8ea6f1373b2bc0fd0 (patch) | |
tree | 277fd39efafbd15f9f03c86612d672d2c89aa066 /singleapplication_p.cpp | |
parent | Merge pull request #112 from iakov/patch-1 (diff) | |
parent | Update install-qt-action (diff) | |
download | singleapplication-5d837262f42a446719754fd8ea6f1373b2bc0fd0.tar.xz |
Merge pull request #113 from Shatur95/fix-conversion-warning
Fix conversion from int to quint32
Diffstat (limited to 'singleapplication_p.cpp')
-rw-r--r-- | singleapplication_p.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/singleapplication_p.cpp b/singleapplication_p.cpp index 7a98116..bb154bf 100644 --- a/singleapplication_p.cpp +++ b/singleapplication_p.cpp @@ -70,7 +70,7 @@ SingleApplicationPrivate::SingleApplicationPrivate( SingleApplication *q_ptr ) server = nullptr; socket = nullptr; memory = nullptr; - instanceNumber = -1; + instanceNumber = 0; } SingleApplicationPrivate::~SingleApplicationPrivate() @@ -233,7 +233,7 @@ bool SingleApplicationPrivate::connectToPrimary( int timeout, ConnectionType con socket->connectToServer( blockServerName ); if( socket->state() == QLocalSocket::ConnectingState ){ - socket->waitForConnected( timeout - time.elapsed() ); + socket->waitForConnected( static_cast<int>(timeout - time.elapsed()) ); } // If connected break out of the loop @@ -269,7 +269,7 @@ bool SingleApplicationPrivate::connectToPrimary( int timeout, ConnectionType con socket->write( header ); socket->write( initMsg ); - bool result = socket->waitForBytesWritten( timeout - time.elapsed() ); + bool result = socket->waitForBytesWritten( static_cast<int>(timeout - time.elapsed()) ); socket->flush(); return result; } |