summaryrefslogtreecommitdiff
path: root/user/pcmanfm-qt/pcmanfm-qt-0.11.3-const-iterator-fixes.patch
blob: b52ce1a9fce8d656d4c731a92ed887bd426eaccd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
diff -Nurd pcmanfm-qt-0.11.3/pcmanfm/mainwindow.cpp pcmanfm-qt-0.11.3.new/pcmanfm/mainwindow.cpp
--- pcmanfm-qt-0.11.3/pcmanfm/mainwindow.cpp	2017-01-14 02:13:45.000000000 +0000
+++ pcmanfm-qt-0.11.3.new/pcmanfm/mainwindow.cpp	2017-10-12 20:44:25.731044585 +0000
@@ -970,8 +970,8 @@
 void MainWindow::onBookmarksChanged(FmBookmarks* bookmarks, MainWindow* pThis) {
   // delete existing items
   QList<QAction*> actions = pThis->ui.menu_Bookmarks->actions();
-  QList<QAction*>::const_iterator it = actions.begin();
-  QList<QAction*>::const_iterator last_it = actions.end() - 2;
+  QList<QAction*>::const_iterator it = actions.constBegin();
+  QList<QAction*>::const_iterator last_it = actions.constEnd() - 2;
 
   while(it != last_it) {
     QAction* action = *it;
diff -Nurd pcmanfm-qt-0.11.3/pcmanfm/preferencesdialog.cpp pcmanfm-qt-0.11.3.new/pcmanfm/preferencesdialog.cpp
--- pcmanfm-qt-0.11.3/pcmanfm/preferencesdialog.cpp	2017-01-14 02:13:45.000000000 +0000
+++ pcmanfm-qt-0.11.3.new/pcmanfm/preferencesdialog.cpp	2017-10-12 20:45:17.324377059 +0000
@@ -90,7 +90,7 @@
 
     iconThemes.remove("hicolor"); // remove hicolor, which is only a fallback
     QHash<QString, QString>::const_iterator it;
-    for(it = iconThemes.begin(); it != iconThemes.end(); ++it) {
+    for(it = iconThemes.constBegin(); it != iconThemes.constEnd(); ++it) {
       ui.iconTheme->addItem(it.value(), it.key());
     }
     ui.iconTheme->model()->sort(0); // sort the list of icon theme names