summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorSergio Ahumada <sergio.ahumada@nokia.com>2012-09-04 19:39:07 +0200
committerQt by Nokia <qt-info@nokia.com>2012-09-05 03:03:05 +0200
commit56d5c909af6473be64a1ae487b45bd444a9a8553 (patch)
treed3032f82ce180b58791d7fcefba5e90f1d00a943 /src/plugins
parent10ed50002c2ad6f4caaa7b922af5a9f1d3d91f52 (diff)
Use true and false in preference to TRUE and FALSE
The TRUE and FALSE macros are obsolete and should be replaced with true and false (all lower case) respectively. Change-Id: Iee352e8173500683e6319be0abbf5bacf29016e0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/imageformats/ico/qicohandler.cpp4
-rw-r--r--src/plugins/platforms/windows/qwindowsglcontext.cpp14
-rw-r--r--src/plugins/platforms/windows/qwindowskeymapper.cpp4
-rw-r--r--src/plugins/platforms/windows/qwindowsscreen.cpp6
-rw-r--r--src/plugins/platforms/windows/qwindowsservices.cpp2
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.cpp10
-rw-r--r--src/plugins/platforms/xcb/qglxintegration.cpp4
7 files changed, 22 insertions, 22 deletions
diff --git a/src/plugins/imageformats/ico/qicohandler.cpp b/src/plugins/imageformats/ico/qicohandler.cpp
index a475656fe7..421b9b5dd0 100644
--- a/src/plugins/imageformats/ico/qicohandler.cpp
+++ b/src/plugins/imageformats/ico/qicohandler.cpp
@@ -364,11 +364,11 @@ bool ICOReader::readBMPHeader(quint32 imageOffset, BMP_INFOHDR * header)
if (iod) {
if (iod->seek(startpos + imageOffset)) {
if (readBMPInfoHeader(iod, header)) {
- return TRUE;
+ return true;
}
}
}
- return FALSE;
+ return false;
}
void ICOReader::findColorInfo(QImage & image)
diff --git a/src/plugins/platforms/windows/qwindowsglcontext.cpp b/src/plugins/platforms/windows/qwindowsglcontext.cpp
index dcc3725708..576aa920b4 100644
--- a/src/plugins/platforms/windows/qwindowsglcontext.cpp
+++ b/src/plugins/platforms/windows/qwindowsglcontext.cpp
@@ -377,9 +377,9 @@ static int choosePixelFormat(HDC hdc,
iAttributes[i++] = testFlag(additional.formatFlags, QWindowsGLDirectRendering) ?
WGL_FULL_ACCELERATION_ARB : WGL_NO_ACCELERATION_ARB;
iAttributes[i++] = WGL_SUPPORT_OPENGL_ARB;
- iAttributes[i++] = TRUE;
+ iAttributes[i++] = true;
iAttributes[i++] = WGL_DRAW_TO_WINDOW_ARB;
- iAttributes[i++] = TRUE;
+ iAttributes[i++] = true;
iAttributes[i++] = WGL_COLOR_BITS_ARB;
iAttributes[i++] = 24;
switch (format.swapBehavior()) {
@@ -387,17 +387,17 @@ static int choosePixelFormat(HDC hdc,
break;
case QSurfaceFormat::SingleBuffer:
iAttributes[i++] = WGL_DOUBLE_BUFFER_ARB;
- iAttributes[i++] = FALSE;
+ iAttributes[i++] = false;
break;
case QSurfaceFormat::DoubleBuffer:
case QSurfaceFormat::TripleBuffer:
iAttributes[i++] = WGL_DOUBLE_BUFFER_ARB;
- iAttributes[i++] = TRUE;
+ iAttributes[i++] = true;
break;
}
if (format.stereo()) {
iAttributes[i++] = WGL_STEREO_ARB;
- iAttributes[i++] = TRUE;
+ iAttributes[i++] = true;
}
if (format.depthBufferSize() >= 0) {
iAttributes[i++] = WGL_DEPTH_BITS_ARB;
@@ -435,13 +435,13 @@ static int choosePixelFormat(HDC hdc,
int samplesValuePosition = 0;
if (sampleBuffersRequested) {
iAttributes[i++] = WGL_SAMPLE_BUFFERS_ARB;
- iAttributes[i++] = TRUE;
+ iAttributes[i++] = true;
iAttributes[i++] = WGL_SAMPLES_ARB;
samplesValuePosition = i;
iAttributes[i++] = format.samples();
} else if (samples == 0 || samples == 1 ) {
iAttributes[i++] = WGL_SAMPLE_BUFFERS_ARB;
- iAttributes[i++] = FALSE;
+ iAttributes[i++] = false;
}
// If sample buffer request cannot be satisfied, reduce request.
int pixelFormat = 0;
diff --git a/src/plugins/platforms/windows/qwindowskeymapper.cpp b/src/plugins/platforms/windows/qwindowskeymapper.cpp
index 044d31e972..633773de00 100644
--- a/src/plugins/platforms/windows/qwindowskeymapper.cpp
+++ b/src/plugins/platforms/windows/qwindowskeymapper.cpp
@@ -697,7 +697,7 @@ static void showSystemMenu(QWindow* w)
{
QWindow *topLevel = QWindowsWindow::topLevelOf(w);
HWND topLevelHwnd = QWindowsWindow::handleOf(topLevel);
- HMENU menu = GetSystemMenu(topLevelHwnd, FALSE);
+ HMENU menu = GetSystemMenu(topLevelHwnd, false);
if (!menu)
return; // no menu for this window
@@ -722,7 +722,7 @@ static void showSystemMenu(QWindow* w)
closeItem.cbSize = sizeof(MENUITEMINFO);
closeItem.fMask = MIIM_STATE;
closeItem.fState = MFS_DEFAULT;
- SetMenuItemInfo(menu, SC_CLOSE, FALSE, &closeItem);
+ SetMenuItemInfo(menu, SC_CLOSE, false, &closeItem);
#undef enabled
#undef disabled
diff --git a/src/plugins/platforms/windows/qwindowsscreen.cpp b/src/plugins/platforms/windows/qwindowsscreen.cpp
index d843236695..16cd4b49dd 100644
--- a/src/plugins/platforms/windows/qwindowsscreen.cpp
+++ b/src/plugins/platforms/windows/qwindowsscreen.cpp
@@ -93,8 +93,8 @@ BOOL QT_WIN_CALLBACK monitorEnumCallback(HMONITOR hMonitor, HDC, LPRECT, LPARAM
MONITORINFOEX info;
memset(&info, 0, sizeof(MONITORINFOEX));
info.cbSize = sizeof(MONITORINFOEX);
- if (GetMonitorInfo(hMonitor, &info) == FALSE)
- return TRUE;
+ if (GetMonitorInfo(hMonitor, &info) == false)
+ return true;
WindowsScreenDataList *result = reinterpret_cast<WindowsScreenDataList *>(p);
QWindowsScreenData data;
@@ -131,7 +131,7 @@ BOOL QT_WIN_CALLBACK monitorEnumCallback(HMONITOR hMonitor, HDC, LPRECT, LPARAM
data.flags |= QWindowsScreenData::PrimaryScreen;
data.name = QString::fromWCharArray(info.szDevice);
result->append(data);
- return TRUE;
+ return true;
}
static inline WindowsScreenDataList monitorData()
diff --git a/src/plugins/platforms/windows/qwindowsservices.cpp b/src/plugins/platforms/windows/qwindowsservices.cpp
index a2688a1d61..f06c7f2655 100644
--- a/src/plugins/platforms/windows/qwindowsservices.cpp
+++ b/src/plugins/platforms/windows/qwindowsservices.cpp
@@ -138,7 +138,7 @@ static inline bool launchMail(const QUrl &url)
STARTUPINFO si;
ZeroMemory(&si, sizeof(si));
si.cb = sizeof(si);
- if (!CreateProcess(NULL, (wchar_t*)command.utf16(), NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)) {
+ if (!CreateProcess(NULL, (wchar_t*)command.utf16(), NULL, NULL, false, 0, NULL, NULL, &si, &pi)) {
qErrnoWarning("Unable to launch '%s'", qPrintable(command));
return false;
}
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp
index b43032dc1a..7ffd0de58c 100644
--- a/src/plugins/platforms/windows/qwindowswindow.cpp
+++ b/src/plugins/platforms/windows/qwindowswindow.cpp
@@ -511,7 +511,7 @@ void WindowCreationData::initialize(HWND hwnd, bool frameChange, qreal opacityLe
SetWindowPos(hwnd, HWND_BOTTOM, 0, 0, 0, 0, swpFlags);
}
if (flags & (Qt::CustomizeWindowHint|Qt::WindowTitleHint)) {
- HMENU systemMenu = GetSystemMenu(hwnd, FALSE);
+ HMENU systemMenu = GetSystemMenu(hwnd, false);
if (flags & Qt::WindowCloseButtonHint)
EnableMenuItem(systemMenu, SC_CLOSE, MF_BYCOMMAND|MF_ENABLED);
else
@@ -557,7 +557,7 @@ QMargins QWindowsGeometryHint::frame(DWORD style, DWORD exStyle)
#ifndef Q_OS_WINCE
style &= ~(WS_OVERLAPPED); // Not permitted, see docs.
#endif
- if (!AdjustWindowRectEx(&rect, style, FALSE, exStyle))
+ if (!AdjustWindowRectEx(&rect, style, false, exStyle))
qErrnoWarning("%s: AdjustWindowRectEx failed", __FUNCTION__);
const QMargins result(qAbs(rect.left), qAbs(rect.top),
qAbs(rect.right), qAbs(rect.bottom));
@@ -869,7 +869,7 @@ void QWindowsWindow::show_sys() const
// maximizing the widget, and then remove the maximize button afterwards.
if (flags & Qt::WindowTitleHint &&
!(flags & (Qt::WindowMinMaxButtonsHint | Qt::FramelessWindowHint))) {
- fakedMaximize = TRUE;
+ fakedMaximize = true;
setStyle(style() | WS_MAXIMIZEBOX);
}
}
@@ -1107,7 +1107,7 @@ bool QWindowsWindow::handleWmPaint(HWND hwnd, UINT message,
WPARAM, LPARAM)
{
// Ignore invalid update bounding rectangles
- if (!GetUpdateRect(m_data.hwnd, 0, FALSE))
+ if (!GetUpdateRect(m_data.hwnd, 0, false))
return false;
if (message == WM_ERASEBKGND) // Backing store - ignored.
return true;
@@ -1537,7 +1537,7 @@ static inline DWORD cornerToWinOrientation(Qt::Corner corner)
bool QWindowsWindow::startSystemResize(const QPoint &, Qt::Corner corner)
{
- if (!GetSystemMenu(m_data.hwnd, FALSE))
+ if (!GetSystemMenu(m_data.hwnd, false))
return false;
ReleaseCapture();
diff --git a/src/plugins/platforms/xcb/qglxintegration.cpp b/src/plugins/platforms/xcb/qglxintegration.cpp
index 36ab6786a9..fb11226e22 100644
--- a/src/plugins/platforms/xcb/qglxintegration.cpp
+++ b/src/plugins/platforms/xcb/qglxintegration.cpp
@@ -120,10 +120,10 @@ QGLXContext::QGLXContext(QXcbScreen *screen, const QSurfaceFormat &format, QPlat
// Could not create a context using glXCreateContextAttribsARB, falling back to glXCreateNewContext.
if (!m_context) {
- m_context = glXCreateNewContext(DISPLAY_FROM_XCB(screen), config, GLX_RGBA_TYPE, m_shareContext, TRUE);
+ m_context = glXCreateNewContext(DISPLAY_FROM_XCB(screen), config, GLX_RGBA_TYPE, m_shareContext, true);
if (!m_context && m_shareContext) {
// re-try without a shared glx context
- m_context = glXCreateNewContext(DISPLAY_FROM_XCB(screen), config, GLX_RGBA_TYPE, 0, TRUE);
+ m_context = glXCreateNewContext(DISPLAY_FROM_XCB(screen), config, GLX_RGBA_TYPE, 0, true);
if (m_context)
m_shareContext = 0;
}