diff --git a/.github/workflows/build-cmake.yml b/.github/workflows/build-cmake.yml index 86bb6ca..82a432c 100644 --- a/.github/workflows/build-cmake.yml +++ b/.github/workflows/build-cmake.yml @@ -16,7 +16,7 @@ jobs: - uses: actions/checkout@v2 - name: Install Qt - uses: jurplel/install-qt-action@v2 + uses: jurplel/install-qt-action@v2.9.0 with: version: ${{ matrix.qt_version }} 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(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(timeout - time.elapsed()) ); socket->flush(); return result; }