From 7a9574558b303ddf75d17399da08889b5c80fa36 Mon Sep 17 00:00:00 2001 From: artoka Date: Tue, 1 Nov 2011 13:47:20 +0100 Subject: 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 --- examples/draganddrop/fridgemagnets/dragwidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit v0.12