aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/browser.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/browser.cpp b/src/browser.cpp
index 09fc2c8..42cde5e 100644
--- a/src/browser.cpp
+++ b/src/browser.cpp
@@ -195,12 +195,11 @@ void Browser::setup(QVector<QPluginLoader *> plugins)
const QString id = conf.value<QString>("profile.default").value();
auto *profile = m_profileManager->profile(id);
if(profile == nullptr) {
- spdlog::error("Unknown default profile!");
- //profile = qobject_cast<WebProfile *>(loadProfile(id).second);
- } else {
- spdlog::info("Default profile\t{}{}\t{}", qUtf8Printable(id), profile->isOffTheRecord() ? "*" : "", qUtf8Printable(profile->name()));
- WebProfile::setDefaultProfile(profile);
+ spdlog::error("Unknown default profile, conjuring one up...");
+ profile = m_profileManager->add("default", QString(), true);
}
+ spdlog::info("Default profile\t{}{}\t{}", qUtf8Printable(id), profile->isOffTheRecord() ? "*" : "", qUtf8Printable(profile->name()));
+ WebProfile::setDefaultProfile(profile);
}
// bookmarks