You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/www-plugins/kpartsplugin/files/kpartsplugin-20120723-segfa...

22 lines
747 B

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();
}
};