aboutsummaryrefslogtreecommitdiff
path: root/src/webengine/webprofilemanager.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/webengine/webprofilemanager.h')
-rw-r--r--src/webengine/webprofilemanager.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/webengine/webprofilemanager.h b/src/webengine/webprofilemanager.h
index 91dcaf8..a356506 100644
--- a/src/webengine/webprofilemanager.h
+++ b/src/webengine/webprofilemanager.h
@@ -41,10 +41,11 @@ public:
}
if(!profiles.contains(default_id)) {
- Profile profile;
- profile.settings = WebProfile::load(QString(), search, homepage, newtab);
- profile.ptr = WebProfile::load(default_id, profile.settings, true);
- profiles[default_id] = profile;
+ auto *settings = WebProfile::load(QString(), search, homepage, newtab);
+ profiles[default_id] = Profile{
+ .settings = settings,
+ .ptr = WebProfile::load(default_id, settings, true),
+ };
}
WebProfile::setDefaultProfile(profiles[default_id].ptr);
}
@@ -73,7 +74,7 @@ public:
}
if(profile != nullptr && settings != nullptr) {
- profiles[id] = Profile{ profile, settings, false };
+ profiles[id] = Profile{ settings, profile, false };
}
}
@@ -101,8 +102,8 @@ private:
set_typestate(consumed) void consume() {}
struct Profile {
- WebProfile *ptr = nullptr;
QSettings *settings = nullptr;
+ WebProfile *ptr = nullptr;
bool selfDestruct = false;
};