Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Konsole
Commits
c61e282b
Commit
c61e282b
authored
Oct 07, 2021
by
Nathan Sprangers
Committed by
Kurt Hindenburg
Oct 07, 2021
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
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
src/widgets/EditProfileDialog.cpp
View file @
c61e282b
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment