summaryrefslogtreecommitdiff
blob: 9ac0aeef0d2aead8541e693b0bde1314e2efb58f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
commit e883f236c476830fec2306b6b4ad90ec27f643a1
Author: Mario Kicherer <kicherer@kit.edu>
Date:   Fri Jun 26 11:34:21 2015 +0200

    fix crash after kpart selection dialog

diff --git a/src/kpartsplugin.cpp b/src/kpartsplugin.cpp
index a9ee9df..56c4aa4 100644
--- a/src/kpartsplugin.cpp
+++ b/src/kpartsplugin.cpp
@@ -120,8 +120,8 @@ public:
         dlg.exec();
         rememberChoice = dlg.checkBoxRemember->checkState() == Qt::Checked;
         /// fetch first (and only) selected item in list
-        QList<QListWidgetItem *>::ConstIterator it(dlg.listWidget->selectedItems().constBegin());
-        return (*it)->text();
+        QList<QListWidgetItem *> it(dlg.listWidget->selectedItems());
+        return it.at(0)->text();
     }
 
 };