Skip to content

Commit

Permalink
Updated our copy of QtSingleApplication.
Browse files Browse the repository at this point in the history
  • Loading branch information
agarny committed Oct 30, 2017
2 parents f91bca7 + af12f76 commit 4e51783
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,11 @@ ENDIF()

ADD_DEFINITIONS(-DQT_DEPRECATED_WARNINGS)

# Make sure that Unicode is defined
# Note: at least needed for QtSingleApplication on Windows...

ADD_DEFINITIONS(-DUNICODE)

# Let OpenCOR know about some of the options with which it was built

IF(USE_PREBUILT_QTWEBKIT_PACKAGE)
Expand Down
2 changes: 1 addition & 1 deletion scripts/traviscilinuxinstall
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ RUN apt -y -qq update

RUN apt -y install software-properties-common

RUN apt-add-repository -y ppa:beineri/opt-qt591-xenial
RUN apt-add-repository -y ppa:beineri/opt-qt592-xenial

RUN apt -y -qq update
RUN apt -y -qq install cmake g++-5 git libgl1-mesa-dev libglu1-mesa-dev ninja-build
Expand Down
10 changes: 1 addition & 9 deletions src/3rdparty/QtSingleApplication/src/qtlocalpeer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@
#include <QTime>

#if defined(Q_OS_WIN)
//---OPENCOR--- BEGIN
#define UNICODE
//---OPENCOR--- END
#include <QLibrary>
#include <qt_windows.h>
typedef BOOL(WINAPI*PProcessIdToSessionId)(DWORD,DWORD*);
Expand Down Expand Up @@ -180,12 +177,7 @@ void QtLocalPeer::receiveConnection()
return;

while (true) {
/*---OPENCOR---
if (socket->state() == QAbstractSocket::UnconnectedState) {
*/
//---OPENCOR--- BEGIN
if (int(socket->state()) == QAbstractSocket::UnconnectedState) {
//---OPENCOR--- END
if (socket->state() == QLocalSocket::UnconnectedState) {
qWarning("QtLocalPeer: Peer disconnected");
delete socket;
return;
Expand Down

0 comments on commit 4e51783

Please sign in to comment.