Commit c61e282b authored by Nathan Sprangers's avatar Nathan Sprangers Committed by Kurt Hindenburg
Browse files

Fix string assignment; initialize member var

Avoid referencing an empty string
Initialize _isDefault

Prior commit:
ce18a9c8
parent 49ccf099
Pipeline #86827 passed with stage
in 1 minute and 49 seconds
......@@ -64,6 +64,7 @@ EditProfileDialog::EditProfileDialog(QWidget *parent)
, _advancedUi(nullptr)
, _tempProfile(nullptr)
, _profile(nullptr)
, _isDefault(false)
, _previewedProperties(QHash<int, QVariant>())
, _delayedPreviewProperties(QHash<int, QVariant>())
, _delayedPreviewTimer(new QTimer(this))
......@@ -479,11 +480,11 @@ void EditProfileDialog::setupGeneralPage(const Profile::Ptr &profile)
_isDefault = profile == ProfileManager::instance()->defaultProfile();
_generalUi->setAsDefaultButton->setChecked(_isDefault);
QString appName = QCoreApplication::applicationName();
if (appName == QStringLiteral("konsole")) {
_generalUi->setAsDefaultButton->setText(i18n("Default profile"));
} else {
appName[0] = appName[0].toUpper();
if (!appName.isEmpty() && appName != QLatin1String("konsole")) {
appName[0] = appName.at(0).toUpper();
_generalUi->setAsDefaultButton->setText(i18n("Default profile for new terminal sessions in %1", appName));
} else {
_generalUi->setAsDefaultButton->setText(i18n("Default profile"));
}
// signals and slots
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment