Changeset View
Changeset View
Standalone View
Standalone View
krusader/Synchronizer/feedtolistboxdialog.cpp
Show First 20 Lines • Show All 57 Lines • ▼ Show 20 Line(s) | 49 | { | |||
---|---|---|---|---|---|
58 | 58 | | |||
59 | int selectedNum = 0; | 59 | int selectedNum = 0; | ||
60 | int itemNum = 0; | 60 | int itemNum = 0; | ||
61 | int leftExistingNum = 0; | 61 | int leftExistingNum = 0; | ||
62 | int rightExistingNum = 0; | 62 | int rightExistingNum = 0; | ||
63 | 63 | | |||
64 | QTreeWidgetItemIterator it(syncList); | 64 | QTreeWidgetItemIterator it(syncList); | ||
65 | while (*it) { | 65 | while (*it) { | ||
66 | auto *item = (SynchronizerGUI::SyncViewItem *) * it; | 66 | auto *item = dynamic_cast<SynchronizerGUI::SyncViewItem *>( * it); | ||
67 | SynchronizerFileItem *syncItem = item->synchronizerItemRef(); | 67 | SynchronizerFileItem *syncItem = item->synchronizerItemRef(); | ||
68 | 68 | | |||
69 | if (syncItem && syncItem->isMarked()) { | 69 | if (syncItem && syncItem->isMarked()) { | ||
70 | if (item->isSelected() || syncItem->task() != TT_EQUALS || equalAllowed) { | 70 | if (item->isSelected() || syncItem->task() != TT_EQUALS || equalAllowed) { | ||
71 | itemNum++; | 71 | itemNum++; | ||
72 | if (item->isSelected()) | 72 | if (item->isSelected()) | ||
73 | selectedNum++; | 73 | selectedNum++; | ||
74 | 74 | | |||
▲ Show 20 Lines • Show All 89 Lines • ▼ Show 20 Line(s) | |||||
164 | { | 164 | { | ||
165 | int side = sideCombo->currentIndex(); | 165 | int side = sideCombo->currentIndex(); | ||
166 | bool selected = cbSelected->isChecked(); | 166 | bool selected = cbSelected->isChecked(); | ||
167 | QString name = lineEdit->text(); | 167 | QString name = lineEdit->text(); | ||
168 | QList<QUrl> urlList; | 168 | QList<QUrl> urlList; | ||
169 | 169 | | |||
170 | QTreeWidgetItemIterator it(syncList); | 170 | QTreeWidgetItemIterator it(syncList); | ||
171 | for (;*it; it++) { | 171 | for (;*it; it++) { | ||
172 | auto *item = (SynchronizerGUI::SyncViewItem *) * it; | 172 | auto *item = dynamic_cast<SynchronizerGUI::SyncViewItem *>( * it); | ||
173 | SynchronizerFileItem *syncItem = item->synchronizerItemRef(); | 173 | SynchronizerFileItem *syncItem = item->synchronizerItemRef(); | ||
174 | 174 | | |||
175 | if (!syncItem || !syncItem->isMarked()) | 175 | if (!syncItem || !syncItem->isMarked()) | ||
176 | continue; | 176 | continue; | ||
177 | if (selected && !item->isSelected()) | 177 | if (selected && !item->isSelected()) | ||
178 | continue; | 178 | continue; | ||
179 | if (!equalAllowed && syncItem->task() == TT_EQUALS && (!selected || !item->isSelected())) | 179 | if (!equalAllowed && syncItem->task() == TT_EQUALS && (!selected || !item->isSelected())) | ||
180 | continue; | 180 | continue; | ||
Show All 26 Lines |