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
PIM
KOrganizer
Commits
45cde898
Commit
45cde898
authored
Oct 13, 2022
by
Laurent Montel
Browse files
Truncate qstring
parent
928d1a8b
Pipeline
#246791
passed with stage
in 10 minutes and 7 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/actionmanager.cpp
View file @
45cde898
...
...
@@ -1596,7 +1596,12 @@ void ActionManager::updateUndoRedoActions()
if
(
history
->
undoAvailable
())
{
mUndoAction
->
setEnabled
(
true
);
mUndoAction
->
setText
(
i18n
(
"Undo: %1"
,
history
->
nextUndoDescription
()));
QString
nextUndoDescription
=
history
->
nextUndoDescription
();
if
(
nextUndoDescription
.
length
()
>
30
)
{
nextUndoDescription
.
truncate
(
30
);
nextUndoDescription
+=
QStringLiteral
(
"..."
);
}
mUndoAction
->
setText
(
i18n
(
"Undo: %1"
,
nextUndoDescription
));
}
else
{
mUndoAction
->
setEnabled
(
false
);
mUndoAction
->
setText
(
i18n
(
"Undo"
));
...
...
@@ -1604,7 +1609,12 @@ void ActionManager::updateUndoRedoActions()
if
(
history
->
redoAvailable
())
{
mRedoAction
->
setEnabled
(
true
);
mRedoAction
->
setText
(
i18n
(
"Redo: %1"
,
history
->
nextRedoDescription
()));
QString
nextRedoDescription
=
history
->
nextRedoDescription
();
if
(
nextRedoDescription
.
length
()
>
30
)
{
nextRedoDescription
.
truncate
(
30
);
nextRedoDescription
+=
QStringLiteral
(
"..."
);
}
mRedoAction
->
setText
(
i18n
(
"Redo: %1"
,
nextRedoDescription
));
}
else
{
mRedoAction
->
setEnabled
(
false
);
mRedoAction
->
setText
(
i18n
(
"Redo"
));
...
...
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