summaryrefslogtreecommitdiff
path: root/Source/WebKit/qt/Api/qwebsettings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit/qt/Api/qwebsettings.cpp')
-rw-r--r--Source/WebKit/qt/Api/qwebsettings.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/Source/WebKit/qt/Api/qwebsettings.cpp b/Source/WebKit/qt/Api/qwebsettings.cpp
index b77b1c4ee..ebecc7f5d 100644
--- a/Source/WebKit/qt/Api/qwebsettings.cpp
+++ b/Source/WebKit/qt/Api/qwebsettings.cpp
@@ -670,14 +670,18 @@ void QWebSettings::setIconDatabasePath(const QString& path)
WebCore::IconDatabase::delayDatabaseCleanup();
+ WebCore::IconDatabaseBase& db = WebCore::iconDatabase();
+
if (!path.isEmpty()) {
- WebCore::iconDatabase().setEnabled(true);
+ db.setEnabled(true);
+ if (db.isOpen())
+ db.close();
QFileInfo info(path);
if (info.isDir() && info.isWritable())
- WebCore::iconDatabase().open(path, WebCore::IconDatabase::defaultDatabaseFilename());
+ db.open(path, WebCore::IconDatabase::defaultDatabaseFilename());
} else {
- WebCore::iconDatabase().setEnabled(false);
- WebCore::iconDatabase().close();
+ db.setEnabled(false);
+ db.close();
}
}