From aaca93be3d8f153dce3ae98d4d4787463f3210cf Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Thu, 7 Jun 2018 12:34:16 +0200 Subject: Don't copy profiles into profile manager plugin --- src/browser.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src') diff --git a/src/browser.cpp b/src/browser.cpp index 2985dd3..11feac0 100644 --- a/src/browser.cpp +++ b/src/browser.cpp @@ -123,9 +123,7 @@ void Browser::setup(const QString &defaultProfile) auto *profileEditor = qobject_cast(p.instance.get()); Q_ASSERT_X(profileEditor != nullptr, "Browser::setup", "profile interface cast failed"); - for(auto i = m_profiles.constBegin(); i != m_profiles.constEnd(); ++i) { - profileEditor->addProfile(i.key(), qobject_cast(i.value())); - } + profileEditor->setProfiles(&m_profiles); } auto *plugin = qobject_cast(p.instance.get()); -- cgit v1.2.1