mirror of
https://invent.kde.org/system/dolphin
synced 2024-11-05 18:47:12 +00:00
avoid a potential stall: QComboBox::maxCount() -> QComboBox::count()
This commit is contained in:
parent
277ec25250
commit
574cd6de32
1 changed files with 4 additions and 4 deletions
|
@ -766,21 +766,21 @@ void FolderView::createConfigurationInterface(KConfigDialog *parent)
|
||||||
uiDisplay.numLinesEdit->setValue(m_numTextLines);
|
uiDisplay.numLinesEdit->setValue(m_numTextLines);
|
||||||
uiDisplay.colorButton->setColor(textColor());
|
uiDisplay.colorButton->setColor(textColor());
|
||||||
|
|
||||||
for (int i = 0; i < uiDisplay.sortCombo->maxCount(); i++) {
|
for (int i = 0; i < uiDisplay.sortCombo->count(); i++) {
|
||||||
if (m_sortColumn == uiDisplay.sortCombo->itemData(i).toInt()) {
|
if (m_sortColumn == uiDisplay.sortCombo->itemData(i).toInt()) {
|
||||||
uiDisplay.sortCombo->setCurrentIndex(i);
|
uiDisplay.sortCombo->setCurrentIndex(i);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < uiDisplay.flowCombo->maxCount(); i++) {
|
for (int i = 0; i < uiDisplay.flowCombo->count(); i++) {
|
||||||
if (m_flow == uiDisplay.flowCombo->itemData(i).value<IconView::Flow>()) {
|
if (m_flow == uiDisplay.flowCombo->itemData(i).value<IconView::Flow>()) {
|
||||||
uiDisplay.flowCombo->setCurrentIndex(i);
|
uiDisplay.flowCombo->setCurrentIndex(i);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < uiFilter.filterCombo->maxCount(); i++) {
|
for (int i = 0; i < uiFilter.filterCombo->count(); i++) {
|
||||||
if (m_filterType == uiFilter.filterCombo->itemData(i).value<ProxyModel::FilterMode>()) {
|
if (m_filterType == uiFilter.filterCombo->itemData(i).value<ProxyModel::FilterMode>()) {
|
||||||
uiFilter.filterCombo->setCurrentIndex(i);
|
uiFilter.filterCombo->setCurrentIndex(i);
|
||||||
break;
|
break;
|
||||||
|
@ -1969,7 +1969,7 @@ void FolderView::indexesMoved(const QModelIndexList &indexes)
|
||||||
emit configNeedsSaving();
|
emit configNeedsSaving();
|
||||||
|
|
||||||
if (isUserConfiguring()) {
|
if (isUserConfiguring()) {
|
||||||
for (int i = 0; i < uiDisplay.sortCombo->maxCount(); i++) {
|
for (int i = 0; i < uiDisplay.sortCombo->count(); i++) {
|
||||||
if (m_sortColumn == uiDisplay.sortCombo->itemData(i).toInt()) {
|
if (m_sortColumn == uiDisplay.sortCombo->itemData(i).toInt()) {
|
||||||
uiDisplay.sortCombo->setCurrentIndex(i);
|
uiDisplay.sortCombo->setCurrentIndex(i);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue