summaryrefslogtreecommitdiffstats
path: root/src/widgets
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/widgets
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/widgets')
-rw-r--r--src/widgets/dialogs/qfiledialog.cpp2
-rw-r--r--src/widgets/dialogs/qmessagebox.cpp2
-rw-r--r--src/widgets/styles/qgtkstyle.cpp18
3 files changed, 11 insertions, 11 deletions
diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp
index 25d6a8ca95..d0014035a3 100644
--- a/src/widgets/dialogs/qfiledialog.cpp
+++ b/src/widgets/dialogs/qfiledialog.cpp
@@ -1403,7 +1403,7 @@ int QFileDialogPrivate::maxNameLength(const QString &path)
#elif defined(Q_OS_WIN)
DWORD maxLength;
const QString drive = path.left(3);
- if (::GetVolumeInformation(reinterpret_cast<const wchar_t *>(drive.utf16()), NULL, 0, NULL, &maxLength, NULL, NULL, 0) == FALSE)
+ if (::GetVolumeInformation(reinterpret_cast<const wchar_t *>(drive.utf16()), NULL, 0, NULL, &maxLength, NULL, NULL, 0) == false)
return -1;
return maxLength;
#else
diff --git a/src/widgets/dialogs/qmessagebox.cpp b/src/widgets/dialogs/qmessagebox.cpp
index e43b464e5f..5c3dcb1f70 100644
--- a/src/widgets/dialogs/qmessagebox.cpp
+++ b/src/widgets/dialogs/qmessagebox.cpp
@@ -77,7 +77,7 @@ HMENU qt_getWindowsSystemMenu(const QWidget *w)
{
if (QWindow *window = QApplicationPrivate::windowForWidget(w))
if (void *handle = QGuiApplication::platformNativeInterface()->nativeResourceForWindow("handle", window))
- return GetSystemMenu(reinterpret_cast<HWND>(handle), FALSE);
+ return GetSystemMenu(reinterpret_cast<HWND>(handle), false);
return 0;
}
#endif
diff --git a/src/widgets/styles/qgtkstyle.cpp b/src/widgets/styles/qgtkstyle.cpp
index 4f9bd03c4a..a71fd9a45b 100644
--- a/src/widgets/styles/qgtkstyle.cpp
+++ b/src/widgets/styles/qgtkstyle.cpp
@@ -799,7 +799,7 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element,
type = GTK_ARROW_DOWN;
gtkPainter.paintArrow(gtkTreeHeader, "button", option->rect.adjusted(1, 1, -1, -1), type, state,
- GTK_SHADOW_NONE, FALSE, style);
+ GTK_SHADOW_NONE, false, style);
}
break;
@@ -965,7 +965,7 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element,
GdkColor color = fromQColor(arrowColor);
d->gtk_widget_modify_fg (gtkArrow, state, &color);
gtkPainter.paintArrow(gtkArrow, "button", arrowRect,
- type, state, shadow, FALSE, gtkArrow->style,
+ type, state, shadow, false, gtkArrow->style,
QString::number(arrowColor.rgba(), 16));
// Passing NULL will revert the color change
d->gtk_widget_modify_fg (gtkArrow, state, NULL);
@@ -1009,7 +1009,7 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element,
"focus-line-width", &focus_line_width, NULL);
// See https://bugzilla.mozilla.org/show_bug.cgi?id=405421 for info about this hack
- g_object_set_data(G_OBJECT(gtkEntry), "transparent-bg-hint", GINT_TO_POINTER(TRUE));
+ g_object_set_data(G_OBJECT(gtkEntry), "transparent-bg-hint", GINT_TO_POINTER(true));
if (!interior_focus && option->state & State_HasFocus)
rect.adjust(focus_line_width, focus_line_width, -focus_line_width, -focus_line_width);
@@ -1571,7 +1571,7 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom
if (gtkArrow) {
gtkCachedPainter.setClipRect(option->rect);
gtkCachedPainter.paintArrow( gtkArrow, "arrow", arrowRect,
- GTK_ARROW_DOWN, state, GTK_SHADOW_NONE, TRUE,
+ GTK_ARROW_DOWN, state, GTK_SHADOW_NONE, true,
style, arrowPath.toString() + QString::number(option->direction));
}
}
@@ -1787,7 +1787,7 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom
gtkPainter.paintArrow( scrollbarWidget, horizontal ? "hscrollbar" : "vscrollbar", scrollBarAddLine.adjusted(4, 4, -4, -4),
horizontal ? (reverse ? GTK_ARROW_LEFT : GTK_ARROW_RIGHT) :
- GTK_ARROW_DOWN, state, GTK_SHADOW_NONE, FALSE, style);
+ GTK_ARROW_DOWN, state, GTK_SHADOW_NONE, false, style);
}
if (scrollBar->subControls & SC_ScrollBarSubLine) {
@@ -1813,7 +1813,7 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom
gtkPainter.paintArrow(scrollbarWidget, horizontal ? "hscrollbar" : "vscrollbar", scrollBarSubLine.adjusted(4, 4, -4, -4),
horizontal ? (reverse ? GTK_ARROW_RIGHT : GTK_ARROW_LEFT) :
- GTK_ARROW_UP, state, GTK_SHADOW_NONE, FALSE, style);
+ GTK_ARROW_UP, state, GTK_SHADOW_NONE, false, style);
}
}
break;
@@ -1957,7 +1957,7 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom
state = GTK_STATE_INSENSITIVE;
gtkPainter.paintArrow( gtkSpinButton, "spinbutton", arrowRect, GTK_ARROW_UP, state,
- GTK_SHADOW_NONE, FALSE, style);
+ GTK_SHADOW_NONE, false, style);
arrowRect.moveCenter(downRect.center());
@@ -1965,7 +1965,7 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom
state = GTK_STATE_INSENSITIVE;
gtkPainter.paintArrow( gtkSpinButton, "spinbutton", arrowRect, GTK_ARROW_DOWN, state,
- GTK_SHADOW_NONE, FALSE, style);
+ GTK_SHADOW_NONE, false, style);
}
}
break;
@@ -2863,7 +2863,7 @@ void QGtkStyle::drawControl(ControlElement element,
GtkStateType state = enabled ? (act ? GTK_STATE_PRELIGHT: GTK_STATE_NORMAL) : GTK_STATE_INSENSITIVE;
GtkShadowType shadowType = (state == GTK_STATE_PRELIGHT) ? GTK_SHADOW_OUT : GTK_SHADOW_IN;
gtkPainter.paintArrow(gtkMenuItem, "menuitem", vSubMenuRect, QApplication::isRightToLeft() ? GTK_ARROW_LEFT : GTK_ARROW_RIGHT, state,
- shadowType, FALSE, style);
+ shadowType, false, style);
}
}
painter->restore();