summaryrefslogtreecommitdiffstats
path: root/examples/xmlpatterns
diff options
context:
space:
mode:
Diffstat (limited to 'examples/xmlpatterns')
-rw-r--r--examples/xmlpatterns/trafficinfo/mainwindow.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/xmlpatterns/trafficinfo/mainwindow.cpp b/examples/xmlpatterns/trafficinfo/mainwindow.cpp
index 943055a03d..105ede414f 100644
--- a/examples/xmlpatterns/trafficinfo/mainwindow.cpp
+++ b/examples/xmlpatterns/trafficinfo/mainwindow.cpp
@@ -111,7 +111,9 @@ void MainWindow::mousePressEvent(QMouseEvent *event)
void MainWindow::paintEvent(QPaintEvent*)
{
- QLinearGradient gradient(QPoint(width()/2, 0), QPoint(width()/2, height()));
+ const QPoint start(width()/2, 0);
+ const QPoint finalStop(width()/2, height());
+ QLinearGradient gradient(start, finalStop);
const QColor qtGreen(102, 176, 54);
gradient.setColorAt(0, qtGreen.dark());
gradient.setColorAt(0.5, qtGreen);