summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles/qdrawutil.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/styles/qdrawutil.cpp')
-rw-r--r--src/widgets/styles/qdrawutil.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/widgets/styles/qdrawutil.cpp b/src/widgets/styles/qdrawutil.cpp
index 2a4d392413..d50f04bbb8 100644
--- a/src/widgets/styles/qdrawutil.cpp
+++ b/src/widgets/styles/qdrawutil.cpp
@@ -87,7 +87,7 @@ void qDrawShadeLine(QPainter *p, int x1, int y1, int x2, int y2,
const QPalette &pal, bool sunken,
int lineWidth, int midLineWidth)
{
- if (!(p && lineWidth >= 0 && midLineWidth >= 0)) {
+ if (Q_UNLIKELY(!p || lineWidth < 0 || midLineWidth < 0)) {
qWarning("qDrawShadeLine: Invalid parameters");
return;
}
@@ -203,7 +203,7 @@ void qDrawShadeRect(QPainter *p, int x, int y, int w, int h,
{
if (w == 0 || h == 0)
return;
- if (! (w > 0 && h > 0 && lineWidth >= 0 && midLineWidth >= 0)) {
+ if (Q_UNLIKELY(w < 0 || h < 0 || lineWidth < 0 || midLineWidth < 0)) {
qWarning("qDrawShadeRect: Invalid parameters");
return;
}
@@ -303,7 +303,7 @@ void qDrawShadePanel(QPainter *p, int x, int y, int w, int h,
{
if (w == 0 || h == 0)
return;
- if (!(w > 0 && h > 0 && lineWidth >= 0)) {
+ if (Q_UNLIKELY(w < 0 || h < 0 || lineWidth < 0)) {
qWarning("qDrawShadePanel: Invalid parameters");
}
QColor shade = pal.dark().color();
@@ -509,7 +509,7 @@ void qDrawPlainRect(QPainter *p, int x, int y, int w, int h, const QColor &c,
{
if (w == 0 || h == 0)
return;
- if (!(w > 0 && h > 0 && lineWidth >= 0)) {
+ if (Q_UNLIKELY(w < 0 || h < 0 || lineWidth < 0)) {
qWarning("qDrawPlainRect: Invalid parameters");
}
QPen oldPen = p->pen();