Changeset View
Changeset View
Standalone View
Standalone View
src/settings/ProfileSettings.cpp
Show First 20 Lines • Show All 290 Lines • ▼ Show 20 Line(s) | |||||
291 | void ProfileSettings::createProfile() | 291 | void ProfileSettings::createProfile() | ||
292 | { | 292 | { | ||
293 | // setup a temporary profile which is a clone of the selected profile | 293 | // setup a temporary profile which is a clone of the selected profile | ||
294 | // or the default if no profile is selected | 294 | // or the default if no profile is selected | ||
295 | Profile::Ptr sourceProfile = currentProfile() ? currentProfile() : ProfileManager::instance()->defaultProfile(); | 295 | Profile::Ptr sourceProfile = currentProfile() ? currentProfile() : ProfileManager::instance()->defaultProfile(); | ||
296 | 296 | | |||
297 | Q_ASSERT(sourceProfile); | 297 | Q_ASSERT(sourceProfile); | ||
298 | 298 | | |||
299 | Profile::Ptr newProfile = Profile::Ptr(new Profile(ProfileManager::instance()->fallbackProfile())); | 299 | auto newProfile = Profile::Ptr(new Profile(ProfileManager::instance()->fallbackProfile())); | ||
300 | newProfile->clone(sourceProfile, true); | 300 | newProfile->clone(sourceProfile, true); | ||
301 | newProfile->setProperty(Profile::Name, i18nc("@item This will be used as part of the file name", "New Profile")); | 301 | newProfile->setProperty(Profile::Name, i18nc("@item This will be used as part of the file name", "New Profile")); | ||
302 | newProfile->setProperty(Profile::UntranslatedName, QStringLiteral("New Profile")); | 302 | newProfile->setProperty(Profile::UntranslatedName, QStringLiteral("New Profile")); | ||
303 | newProfile->setProperty(Profile::MenuIndex, QStringLiteral("0")); | 303 | newProfile->setProperty(Profile::MenuIndex, QStringLiteral("0")); | ||
304 | 304 | | |||
305 | EditProfileDialog dialog(this); | 305 | EditProfileDialog dialog(this); | ||
306 | dialog.setProfile(newProfile); | 306 | dialog.setProfile(newProfile); | ||
307 | dialog.selectProfileName(); | 307 | dialog.selectProfileName(); | ||
▲ Show 20 Lines • Show All 196 Lines • Show Last 20 Lines |