From b77b5cc5be5d7ca00c6bf6c4b83585cbbf3d91fd Mon Sep 17 00:00:00 2001 From: Sergio Ahumada Date: Thu, 6 Sep 2012 10:54:50 +0200 Subject: Revert "Use true and false in preference to TRUE and FALSE" Even though I really think the change was the right thing to do, it seems like Windows people don't like this change because of some Windows Data Types specific rules. This reverts parts of the commit 56d5c909af6473be64a1ae487b45bd444a9a8553. Change-Id: I2c67d9b1bab36fc63937ef386aef56d2a4472a04 Reviewed-by: Friedemann Kleint --- src/network/socket/qlocalserver_win.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/network/socket/qlocalserver_win.cpp') diff --git a/src/network/socket/qlocalserver_win.cpp b/src/network/socket/qlocalserver_win.cpp index ba879f4eb0..3304c6c6a0 100644 --- a/src/network/socket/qlocalserver_win.cpp +++ b/src/network/socket/qlocalserver_win.cpp @@ -69,7 +69,7 @@ bool QLocalServerPrivate::addListener() SECURITY_ATTRIBUTES sa; sa.nLength = sizeof(SECURITY_ATTRIBUTES); - sa.bInheritHandle = false; //non inheritable handle, same as default + sa.bInheritHandle = FALSE; //non inheritable handle, same as default sa.lpSecurityDescriptor = 0; //default security descriptor QScopedPointer pSD; @@ -166,9 +166,9 @@ bool QLocalServerPrivate::addListener() return false; } } - SetSecurityDescriptorOwner(pSD.data(), pTokenUser->User.Sid, false); - SetSecurityDescriptorGroup(pSD.data(), pTokenGroup->PrimaryGroup, false); - if (!SetSecurityDescriptorDacl(pSD.data(), false, acl, false)) { + SetSecurityDescriptorOwner(pSD.data(), pTokenUser->User.Sid, FALSE); + SetSecurityDescriptorGroup(pSD.data(), pTokenGroup->PrimaryGroup, FALSE); + if (!SetSecurityDescriptorDacl(pSD.data(), TRUE, acl, FALSE)) { setError(QLatin1String("QLocalServerPrivate::addListener")); FreeSid(worldSID); return false; @@ -252,7 +252,7 @@ bool QLocalServerPrivate::listen(const QString &name) // Use only one event for all listeners of one socket. // The idea is that listener events are rare, so polling all listeners once in a while is // cheap compared to waiting for N additional events in each iteration of the main loop. - eventHandle = CreateEvent(NULL, true, false, NULL); + eventHandle = CreateEvent(NULL, TRUE, FALSE, NULL); connectionEventNotifier = new QWinEventNotifier(eventHandle , q); q->connect(connectionEventNotifier, SIGNAL(activated(HANDLE)), q, SLOT(_q_onNewConnection())); @@ -282,7 +282,7 @@ void QLocalServerPrivate::_q_onNewConnection() for (int i = 0; i < listeners.size(); ) { HANDLE handle = listeners[i].handle; if (listeners[i].connected - || GetOverlappedResult(handle, &listeners[i].overlapped, &dummy, false)) + || GetOverlappedResult(handle, &listeners[i].overlapped, &dummy, FALSE)) { listeners.removeAt(i); -- cgit v1.2.3