diff options
author | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2018-12-04 17:44:20 +0100 |
---|---|---|
committer | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2018-12-10 18:38:56 +0000 |
commit | b688c7e99a8def9db836d1d6ab7388ae14a5d5b0 (patch) | |
tree | 85e7e18af6672087ecde71db3602a61e0c795fc3 /examples/widgets/draganddrop | |
parent | 8576354b885b345e3546f0ee5040980476487167 (diff) |
DropSite example: fix documentation
The DropSite documentation mentioned the foreach keyword which was
removed some times ago in the code. Therefore also remove the
corresponding documentation snippet.
Change-Id: Id9dd3f01dbdd37eeda43fabe12b60ef9e0b32d10
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'examples/widgets/draganddrop')
-rw-r--r-- | examples/widgets/draganddrop/dropsite/dropsitewindow.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/widgets/draganddrop/dropsite/dropsitewindow.cpp b/examples/widgets/draganddrop/dropsite/dropsitewindow.cpp index 28a42ee614..2dae83bb22 100644 --- a/examples/widgets/draganddrop/dropsite/dropsitewindow.cpp +++ b/examples/widgets/draganddrop/dropsite/dropsitewindow.cpp @@ -113,7 +113,8 @@ void DropSiteWindow::updateFormatsTable(const QMimeData *mimeData) //! [updateFormatsTable() part1] //! [updateFormatsTable() part2] - for (const QString &format : mimeData->formats()) { + const QStringList formats = mimeData->formats(); + for (const QString &format : formats) { QTableWidgetItem *formatItem = new QTableWidgetItem(format); formatItem->setFlags(Qt::ItemIsEnabled); formatItem->setTextAlignment(Qt::AlignTop | Qt::AlignLeft); |