Changeset View
Changeset View
Standalone View
Standalone View
src/khistorycombobox.cpp
Show First 20 Lines • Show All 425 Lines • ▼ Show 20 Line(s) | 424 | if (count() > 0) { | |||
---|---|---|---|---|---|
426 | clear(); | 426 | clear(); | ||
427 | insertItems(items); | 427 | insertItems(items); | ||
428 | } | 428 | } | ||
429 | } | 429 | } | ||
430 | 430 | | |||
431 | void KHistoryComboBox::insertItems(const QStringList &items) | 431 | void KHistoryComboBox::insertItems(const QStringList &items) | ||
432 | { | 432 | { | ||
433 | Q_D(KHistoryComboBox); | 433 | Q_D(KHistoryComboBox); | ||
434 | QStringList::ConstIterator it = items.constBegin(); | | |||
435 | const QStringList::ConstIterator itEnd = items.constEnd(); | | |||
436 | 434 | | |||
437 | while (it != itEnd) { | 435 | for (const QString item : items) { | ||
mlaurent: Missing & here no ? | |||||
438 | const QString item = *it; | 436 | if (item.isEmpty()) { | ||
439 | if (!item.isEmpty()) { // only insert non-empty items | 437 | continue; | ||
440 | if (d->pixmapProvider) | | |||
441 | addItem(d->pixmapProvider->pixmapFor(item, iconSize().height()), | | |||
442 | item); | | |||
443 | else { | | |||
444 | addItem(item); | | |||
445 | } | 438 | } | ||
439 | | ||||
440 | if (d->pixmapProvider) { | ||||
441 | addItem(d->pixmapProvider->pixmapFor(item, iconSize().height()), item); | ||||
442 | } else { | ||||
443 | addItem(item); | ||||
446 | } | 444 | } | ||
447 | ++it; | | |||
448 | } | 445 | } | ||
449 | } | 446 | } | ||
450 | 447 | | |||
451 | void KHistoryComboBoxPrivate::_k_clear() | 448 | void KHistoryComboBoxPrivate::_k_clear() | ||
452 | { | 449 | { | ||
453 | Q_Q(KHistoryComboBox); | 450 | Q_Q(KHistoryComboBox); | ||
454 | q->clearHistory(); | 451 | q->clearHistory(); | ||
455 | emit q->cleared(); | 452 | emit q->cleared(); | ||
▲ Show 20 Lines • Show All 46 Lines • Show Last 20 Lines |
Missing & here no ?