mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-14 19:12:11 +01:00
[ThemeManager] Fixed crash on saving settings when theme is unavailable.
This commit is contained in:
parent
c313b2d961
commit
b05ddc12db
|
@ -161,9 +161,14 @@ ThemeManager::Theme ThemeManager::parseTheme(const QString &path, const QString
|
||||||
|
|
||||||
void ThemeManager::save()
|
void ThemeManager::save()
|
||||||
{
|
{
|
||||||
|
QListWidgetItem* currentItem = ui->listWidget->currentItem();
|
||||||
|
if (!currentItem) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Settings settings;
|
Settings settings;
|
||||||
settings.beginGroup("Themes");
|
settings.beginGroup("Themes");
|
||||||
settings.setValue("activeTheme", ui->listWidget->currentItem()->data(Qt::UserRole));
|
settings.setValue("activeTheme", currentItem->data(Qt::UserRole));
|
||||||
settings.endGroup();
|
settings.endGroup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user