summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/io/qfsfileengine_win.cpp4
-rw-r--r--src/corelib/io/qprocess_win.cpp16
-rw-r--r--src/corelib/io/qsettings.cpp2
-rw-r--r--src/corelib/io/qstandardpaths_win.cpp20
-rw-r--r--src/corelib/io/qwindowspipewriter.cpp6
-rw-r--r--src/corelib/io/qwinoverlappedionotifier.cpp2
-rw-r--r--src/corelib/kernel/qeventdispatcher_win.cpp2
-rw-r--r--src/corelib/thread/qmutex_win.cpp2
-rw-r--r--src/corelib/thread/qthread_win.cpp2
-rw-r--r--src/corelib/thread/qwaitcondition_win.cpp2
10 files changed, 29 insertions, 29 deletions
diff --git a/src/corelib/io/qfsfileengine_win.cpp b/src/corelib/io/qfsfileengine_win.cpp
index e80365f5c8..c975bd1dce 100644
--- a/src/corelib/io/qfsfileengine_win.cpp
+++ b/src/corelib/io/qfsfileengine_win.cpp
@@ -121,7 +121,7 @@ bool QFSFileEnginePrivate::nativeOpen(QIODevice::OpenMode openMode)
if (openMode & QIODevice::WriteOnly)
accessRights |= GENERIC_WRITE;
- SECURITY_ATTRIBUTES securityAtts = { sizeof(SECURITY_ATTRIBUTES), NULL, FALSE };
+ SECURITY_ATTRIBUTES securityAtts = { sizeof(SECURITY_ATTRIBUTES), NULL, false };
// WriteOnly can create files, ReadOnly cannot.
DWORD creationDisp = (openMode & QIODevice::WriteOnly) ? OPEN_ALWAYS : OPEN_EXISTING;
@@ -639,7 +639,7 @@ bool QFSFileEngine::link(const QString &newName)
IPersistFile *ppf;
hres = psl->QueryInterface(IID_IPersistFile, (void **)&ppf);
if (SUCCEEDED(hres)) {
- hres = ppf->Save((wchar_t*)linkName.utf16(), TRUE);
+ hres = ppf->Save((wchar_t*)linkName.utf16(), true);
if (SUCCEEDED(hres))
ret = true;
ppf->Release();
diff --git a/src/corelib/io/qprocess_win.cpp b/src/corelib/io/qprocess_win.cpp
index f4469d670c..36346b6be7 100644
--- a/src/corelib/io/qprocess_win.cpp
+++ b/src/corelib/io/qprocess_win.cpp
@@ -135,7 +135,7 @@ static void duplicateStdWriteChannel(Q_PIPE *pipe, DWORD nStdHandle)
HANDLE hStdWriteChannel = GetStdHandle(nStdHandle);
HANDLE hCurrentProcess = GetCurrentProcess();
DuplicateHandle(hCurrentProcess, hStdWriteChannel, hCurrentProcess,
- &pipe[1], 0, TRUE, DUPLICATE_SAME_ACCESS);
+ &pipe[1], 0, true, DUPLICATE_SAME_ACCESS);
}
/*
@@ -149,7 +149,7 @@ bool QProcessPrivate::createChannel(Channel &channel)
if (&channel == &stderrChannel && processChannelMode == QProcess::MergedChannels) {
return DuplicateHandle(GetCurrentProcess(), stdoutChannel.pipe[1], GetCurrentProcess(),
- &stderrChannel.pipe[1], 0, TRUE, DUPLICATE_SAME_ACCESS);
+ &stderrChannel.pipe[1], 0, true, DUPLICATE_SAME_ACCESS);
}
if (channel.type == Channel::Normal) {
@@ -182,7 +182,7 @@ bool QProcessPrivate::createChannel(Channel &channel)
return true;
} else if (channel.type == Channel::Redirect) {
// we're redirecting the channel to/from a file
- SECURITY_ATTRIBUTES secAtt = { sizeof(SECURITY_ATTRIBUTES), NULL, TRUE };
+ SECURITY_ATTRIBUTES secAtt = { sizeof(SECURITY_ATTRIBUTES), NULL, true };
if (&channel == &stdinChannel) {
// try to open in read-only mode
@@ -244,7 +244,7 @@ bool QProcessPrivate::createChannel(Channel &channel)
HANDLE tmpHandle = source->pipe[1];
if (!DuplicateHandle(GetCurrentProcess(), tmpHandle,
GetCurrentProcess(), &source->pipe[1],
- 0, TRUE, DUPLICATE_SAME_ACCESS))
+ 0, true, DUPLICATE_SAME_ACCESS))
return false;
CloseHandle(tmpHandle);
@@ -270,7 +270,7 @@ bool QProcessPrivate::createChannel(Channel &channel)
HANDLE tmpHandle = sink->pipe[0];
if (!DuplicateHandle(GetCurrentProcess(), tmpHandle,
GetCurrentProcess(), &sink->pipe[0],
- 0, TRUE, DUPLICATE_SAME_ACCESS))
+ 0, true, DUPLICATE_SAME_ACCESS))
return false;
CloseHandle(tmpHandle);
@@ -484,7 +484,7 @@ void QProcessPrivate::startProcess()
stdinChannel.pipe[0], stdoutChannel.pipe[1], stderrChannel.pipe[1]
};
success = CreateProcess(0, (wchar_t*)args.utf16(),
- 0, 0, TRUE, dwCreationFlags,
+ 0, 0, true, dwCreationFlags,
environment.isEmpty() ? 0 : envlist.data(),
workingDirectory.isEmpty() ? 0 : (wchar_t*)QDir::toNativeSeparators(workingDirectory).utf16(),
&startupInfo, pid);
@@ -585,7 +585,7 @@ static BOOL QT_WIN_CALLBACK qt_terminateApp(HWND hwnd, LPARAM procId)
if (currentProcId == (DWORD)procId)
PostMessage(hwnd, WM_CLOSE, 0, 0);
- return TRUE;
+ return true;
}
void QProcessPrivate::terminateProcess()
@@ -853,7 +853,7 @@ bool QProcessPrivate::startDetached(const QString &program, const QStringList &a
0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
success = CreateProcess(0, (wchar_t*)args.utf16(),
- 0, 0, FALSE, CREATE_UNICODE_ENVIRONMENT | CREATE_NEW_CONSOLE, 0,
+ 0, 0, false, CREATE_UNICODE_ENVIRONMENT | CREATE_NEW_CONSOLE, 0,
workingDir.isEmpty() ? 0 : (wchar_t*)workingDir.utf16(),
&startupInfo, &pinfo);
diff --git a/src/corelib/io/qsettings.cpp b/src/corelib/io/qsettings.cpp
index 8d5f95c1d1..2420a0a1ca 100644
--- a/src/corelib/io/qsettings.cpp
+++ b/src/corelib/io/qsettings.cpp
@@ -1032,7 +1032,7 @@ static QString windowsConfigPath(int type)
GetSpecialFolderPath SHGetSpecialFolderPath = (GetSpecialFolderPath)library.resolve("SHGetSpecialFolderPathW");
if (SHGetSpecialFolderPath) {
wchar_t path[MAX_PATH];
- SHGetSpecialFolderPath(0, path, type, FALSE);
+ SHGetSpecialFolderPath(0, path, type, false);
result = QString::fromWCharArray(path);
}
diff --git a/src/corelib/io/qstandardpaths_win.cpp b/src/corelib/io/qstandardpaths_win.cpp
index f918e02880..53d328b664 100644
--- a/src/corelib/io/qstandardpaths_win.cpp
+++ b/src/corelib/io/qstandardpaths_win.cpp
@@ -100,9 +100,9 @@ QString QStandardPaths::writableLocation(StandardLocation type)
case DataLocation:
case GenericDataLocation:
#if defined Q_OS_WINCE
- if (SHGetSpecialFolderPath(0, path, CSIDL_APPDATA, FALSE))
+ if (SHGetSpecialFolderPath(0, path, CSIDL_APPDATA, false))
#else
- if (SHGetSpecialFolderPath(0, path, CSIDL_LOCAL_APPDATA, FALSE))
+ if (SHGetSpecialFolderPath(0, path, CSIDL_LOCAL_APPDATA, false))
#endif
result = convertCharArray(path);
if (isTestModeEnabled())
@@ -116,38 +116,38 @@ QString QStandardPaths::writableLocation(StandardLocation type)
break;
case DesktopLocation:
- if (SHGetSpecialFolderPath(0, path, CSIDL_DESKTOPDIRECTORY, FALSE))
+ if (SHGetSpecialFolderPath(0, path, CSIDL_DESKTOPDIRECTORY, false))
result = convertCharArray(path);
break;
case DownloadLocation: // TODO implement with SHGetKnownFolderPath(FOLDERID_Downloads) (starting from Vista)
case DocumentsLocation:
- if (SHGetSpecialFolderPath(0, path, CSIDL_PERSONAL, FALSE))
+ if (SHGetSpecialFolderPath(0, path, CSIDL_PERSONAL, false))
result = convertCharArray(path);
break;
case FontsLocation:
- if (SHGetSpecialFolderPath(0, path, CSIDL_FONTS, FALSE))
+ if (SHGetSpecialFolderPath(0, path, CSIDL_FONTS, false))
result = convertCharArray(path);
break;
case ApplicationsLocation:
- if (SHGetSpecialFolderPath(0, path, CSIDL_PROGRAMS, FALSE))
+ if (SHGetSpecialFolderPath(0, path, CSIDL_PROGRAMS, false))
result = convertCharArray(path);
break;
case MusicLocation:
- if (SHGetSpecialFolderPath(0, path, CSIDL_MYMUSIC, FALSE))
+ if (SHGetSpecialFolderPath(0, path, CSIDL_MYMUSIC, false))
result = convertCharArray(path);
break;
case MoviesLocation:
- if (SHGetSpecialFolderPath(0, path, CSIDL_MYVIDEO, FALSE))
+ if (SHGetSpecialFolderPath(0, path, CSIDL_MYVIDEO, false))
result = convertCharArray(path);
break;
case PicturesLocation:
- if (SHGetSpecialFolderPath(0, path, CSIDL_MYPICTURES, FALSE))
+ if (SHGetSpecialFolderPath(0, path, CSIDL_MYPICTURES, false))
result = convertCharArray(path);
break;
@@ -186,7 +186,7 @@ QStringList QStandardPaths::standardLocations(StandardLocation type)
case ConfigLocation: // same as DataLocation, on Windows
case DataLocation:
case GenericDataLocation:
- if (SHGetSpecialFolderPath(0, path, CSIDL_COMMON_APPDATA, FALSE)) {
+ if (SHGetSpecialFolderPath(0, path, CSIDL_COMMON_APPDATA, false)) {
QString result = convertCharArray(path);
if (type != GenericDataLocation) {
if (!QCoreApplication::organizationName().isEmpty())
diff --git a/src/corelib/io/qwindowspipewriter.cpp b/src/corelib/io/qwindowspipewriter.cpp
index aa3745237b..a7ed002b1e 100644
--- a/src/corelib/io/qwindowspipewriter.cpp
+++ b/src/corelib/io/qwindowspipewriter.cpp
@@ -54,7 +54,7 @@ QWindowsPipeWriter::QWindowsPipeWriter(HANDLE pipe, QObject * parent)
{
#if !defined(Q_OS_WINCE) || (_WIN32_WCE >= 0x600)
DuplicateHandle(GetCurrentProcess(), pipe, GetCurrentProcess(),
- &writePipe, 0, FALSE, DUPLICATE_SAME_ACCESS);
+ &writePipe, 0, false, DUPLICATE_SAME_ACCESS);
#else
Q_UNUSED(pipe);
writePipe = GetCurrentProcess();
@@ -103,7 +103,7 @@ void QWindowsPipeWriter::run()
{
OVERLAPPED overl;
memset(&overl, 0, sizeof overl);
- overl.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
+ overl.hEvent = CreateEvent(NULL, true, false, NULL);
forever {
lock.lock();
while(data.isEmpty() && (!quitNow)) {
@@ -138,7 +138,7 @@ void QWindowsPipeWriter::run()
}
#ifndef Q_OS_WINCE
if (GetLastError() == ERROR_IO_PENDING) {
- if (!GetOverlappedResult(writePipe, &overl, &written, TRUE)) {
+ if (!GetOverlappedResult(writePipe, &overl, &written, true)) {
CloseHandle(overl.hEvent);
return;
}
diff --git a/src/corelib/io/qwinoverlappedionotifier.cpp b/src/corelib/io/qwinoverlappedionotifier.cpp
index 65f85a2d16..3ffc20ebf1 100644
--- a/src/corelib/io/qwinoverlappedionotifier.cpp
+++ b/src/corelib/io/qwinoverlappedionotifier.cpp
@@ -168,7 +168,7 @@ QWinOverlappedIoNotifier::QWinOverlappedIoNotifier(QObject *parent)
lastNumberOfBytes(0),
lastErrorCode(ERROR_SUCCESS)
{
- hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
+ hEvent = CreateEvent(NULL, true, false, NULL);
connect(this, &QWinOverlappedIoNotifier::_q_notify,
this, &QWinOverlappedIoNotifier::_q_notified, Qt::QueuedConnection);
}
diff --git a/src/corelib/kernel/qeventdispatcher_win.cpp b/src/corelib/kernel/qeventdispatcher_win.cpp
index da8a468f88..c2b37357c7 100644
--- a/src/corelib/kernel/qeventdispatcher_win.cpp
+++ b/src/corelib/kernel/qeventdispatcher_win.cpp
@@ -1001,7 +1001,7 @@ void QEventDispatcherWin32::activateEventNotifiers()
//### this could break if events are removed/added in the activation
for (int i=0; i<d->winEventNotifierList.count(); i++) {
#if !defined(Q_OS_WINCE)
- if (WaitForSingleObjectEx(d->winEventNotifierList.at(i)->handle(), 0, TRUE) == WAIT_OBJECT_0)
+ if (WaitForSingleObjectEx(d->winEventNotifierList.at(i)->handle(), 0, true) == WAIT_OBJECT_0)
d->activateEventNotifier(d->winEventNotifierList.at(i));
#else
if (WaitForSingleObject(d->winEventNotifierList.at(i)->handle(), 0) == WAIT_OBJECT_0)
diff --git a/src/corelib/thread/qmutex_win.cpp b/src/corelib/thread/qmutex_win.cpp
index 0e06c6a26e..b0008af750 100644
--- a/src/corelib/thread/qmutex_win.cpp
+++ b/src/corelib/thread/qmutex_win.cpp
@@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE
QMutexPrivate::QMutexPrivate()
{
- event = CreateEvent(0, FALSE, FALSE, 0);
+ event = CreateEvent(0, false, false, 0);
if (!event)
qWarning("QMutexData::QMutexData: Cannot create event");
}
diff --git a/src/corelib/thread/qthread_win.cpp b/src/corelib/thread/qthread_win.cpp
index fb9ebf20b8..c0c30bae8f 100644
--- a/src/corelib/thread/qthread_win.cpp
+++ b/src/corelib/thread/qthread_win.cpp
@@ -127,7 +127,7 @@ QThreadData *QThreadData::current()
GetCurrentProcess(),
&realHandle,
0,
- FALSE,
+ false,
DUPLICATE_SAME_ACCESS);
#else
realHandle = (HANDLE)GetCurrentThreadId();
diff --git a/src/corelib/thread/qwaitcondition_win.cpp b/src/corelib/thread/qwaitcondition_win.cpp
index 3528d6a0ff..94878736bb 100644
--- a/src/corelib/thread/qwaitcondition_win.cpp
+++ b/src/corelib/thread/qwaitcondition_win.cpp
@@ -64,7 +64,7 @@ class QWaitConditionEvent
public:
inline QWaitConditionEvent() : priority(0), wokenUp(false)
{
- event = CreateEvent(NULL, TRUE, FALSE, NULL);
+ event = CreateEvent(NULL, true, false, NULL);
}
inline ~QWaitConditionEvent() { CloseHandle(event); }
int priority;