From b688c7e99a8def9db836d1d6ab7388ae14a5d5b0 Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Tue, 4 Dec 2018 17:44:20 +0100 Subject: 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 Reviewed-by: Friedemann Kleint --- examples/widgets/draganddrop/dropsite/dropsitewindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'examples/widgets/draganddrop') 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); -- cgit v1.2.3