summaryrefslogtreecommitdiffstats
path: root/examples/draganddrop
diff options
context:
space:
mode:
authorartoka <arto.katajasalo@digia.com>2011-11-01 12:47:20 (GMT)
committerCasper van Donderen <casper.vandonderen@nokia.com>2011-11-01 13:11:01 (GMT)
commit7a9574558b303ddf75d17399da08889b5c80fa36 (patch)
tree707a44af4405f6f3eb6cf5198f2cdf0701c2dbef /examples/draganddrop
parentd6a389e9a49694f407bd117bb0167f4011645232 (diff)
downloadQt-7a9574558b303ddf75d17399da08889b5c80fa36.zip
Qt-7a9574558b303ddf75d17399da08889b5c80fa36.tar.gz
Qt-7a9574558b303ddf75d17399da08889b5c80fa36.tar.bz2
Fridge magnet example code snippet error
Documentation states that QTextStream::readLine() is used but the example uses ">>" operator. Changed the example to use readLine()-method. Task-number: QTBUG-7678 Merge-request: 2698 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Diffstat (limited to 'examples/draganddrop')
-rw-r--r--examples/draganddrop/fridgemagnets/dragwidget.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/draganddrop/fridgemagnets/dragwidget.cpp b/examples/draganddrop/fridgemagnets/dragwidget.cpp
index 19abfb6..447f7ac 100644
--- a/examples/draganddrop/fridgemagnets/dragwidget.cpp
+++ b/examples/draganddrop/fridgemagnets/dragwidget.cpp
@@ -58,7 +58,7 @@ DragWidget::DragWidget(QWidget *parent)
while (!inputStream.atEnd()) {
QString word;
- inputStream >> word;
+ word = inputStream.readLine();
if (!word.isEmpty()) {
DragLabel *wordLabel = new DragLabel(word, this);
wordLabel->move(x, y);