mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 09:32:12 +01:00
NavigationBar: Correctly filter invalid layout ids
This commit is contained in:
parent
1f9599aac7
commit
23f84abc3b
|
@ -510,6 +510,7 @@ void NavigationBar::loadSettings()
|
||||||
settings.endGroup();
|
settings.endGroup();
|
||||||
|
|
||||||
m_layoutIds.removeDuplicates();
|
m_layoutIds.removeDuplicates();
|
||||||
|
m_layoutIds.removeAll(QString());
|
||||||
if (!m_layoutIds.contains(QSL("locationbar"))) {
|
if (!m_layoutIds.contains(QSL("locationbar"))) {
|
||||||
m_layoutIds.append(QSL("locationbar"));
|
m_layoutIds.append(QSL("locationbar"));
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,7 +55,12 @@ void NavigationBarConfigDialog::loadSettings()
|
||||||
|
|
||||||
ui->currentItems->clear();
|
ui->currentItems->clear();
|
||||||
for (const QString &id : qAsConst(m_navigationBar->m_layoutIds)) {
|
for (const QString &id : qAsConst(m_navigationBar->m_layoutIds)) {
|
||||||
ui->currentItems->addItem(createItem(m_navigationBar->m_widgets.value(id)));
|
NavigationBar::WidgetData data = m_navigationBar->m_widgets.value(id);
|
||||||
|
if (data.id.isEmpty()) {
|
||||||
|
data.id = id;
|
||||||
|
data.name = id;
|
||||||
|
}
|
||||||
|
ui->currentItems->addItem(createItem(data));
|
||||||
}
|
}
|
||||||
|
|
||||||
ui->availableItems->clear();
|
ui->availableItems->clear();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user