summaryrefslogtreecommitdiffstats
path: root/examples/graphicsview/diagramscene/mainwindow.cpp
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@nokia.com>2010-08-19 10:04:39 (GMT)
committerPaul Olav Tvete <paul.tvete@nokia.com>2010-08-19 10:04:39 (GMT)
commita226143eeda6771efc4f0df6955351336735cb60 (patch)
treea279f87d74f5929e36fe6a3aa5e4f4d843b32458 /examples/graphicsview/diagramscene/mainwindow.cpp
parentc02ad51733d0a2885ddb39cb7e3b09355ab97213 (diff)
parentffbce9839f8be5c2f21cc66b617dbeb0a47af269 (diff)
downloadQt-a226143eeda6771efc4f0df6955351336735cb60.zip
Qt-a226143eeda6771efc4f0df6955351336735cb60.tar.gz
Qt-a226143eeda6771efc4f0df6955351336735cb60.tar.bz2
Merge remote branch 'qt/master' into lighthouse-master
Diffstat (limited to 'examples/graphicsview/diagramscene/mainwindow.cpp')
-rw-r--r--examples/graphicsview/diagramscene/mainwindow.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/graphicsview/diagramscene/mainwindow.cpp b/examples/graphicsview/diagramscene/mainwindow.cpp
index f09c552..e4fe633 100644
--- a/examples/graphicsview/diagramscene/mainwindow.cpp
+++ b/examples/graphicsview/diagramscene/mainwindow.cpp
@@ -224,7 +224,7 @@ void MainWindow::textColorChanged()
textAction = qobject_cast<QAction *>(sender());
fontColorToolButton->setIcon(createColorToolButtonIcon(
":/images/textpointer.png",
- qVariantValue<QColor>(textAction->data())));
+ qvariant_cast<QColor>(textAction->data())));
textButtonTriggered();
}
//! [12]
@@ -235,7 +235,7 @@ void MainWindow::itemColorChanged()
fillAction = qobject_cast<QAction *>(sender());
fillColorToolButton->setIcon(createColorToolButtonIcon(
":/images/floodfill.png",
- qVariantValue<QColor>(fillAction->data())));
+ qvariant_cast<QColor>(fillAction->data())));
fillButtonTriggered();
}
//! [13]
@@ -246,7 +246,7 @@ void MainWindow::lineColorChanged()
lineAction = qobject_cast<QAction *>(sender());
lineColorToolButton->setIcon(createColorToolButtonIcon(
":/images/linecolor.png",
- qVariantValue<QColor>(lineAction->data())));
+ qvariant_cast<QColor>(lineAction->data())));
lineButtonTriggered();
}
//! [14]
@@ -254,21 +254,21 @@ void MainWindow::lineColorChanged()
//! [15]
void MainWindow::textButtonTriggered()
{
- scene->setTextColor(qVariantValue<QColor>(textAction->data()));
+ scene->setTextColor(qvariant_cast<QColor>(textAction->data()));
}
//! [15]
//! [16]
void MainWindow::fillButtonTriggered()
{
- scene->setItemColor(qVariantValue<QColor>(fillAction->data()));
+ scene->setItemColor(qvariant_cast<QColor>(fillAction->data()));
}
//! [16]
//! [17]
void MainWindow::lineButtonTriggered()
{
- scene->setLineColor(qVariantValue<QColor>(lineAction->data()));
+ scene->setLineColor(qvariant_cast<QColor>(lineAction->data()));
}
//! [17]