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
Graphics
KolourPaint
Commits
74ab690b
Commit
74ab690b
authored
Oct 06, 2022
by
Kai Uwe Broulik
🍇
Browse files
Port ZoomLevelFromString from QRegExp
It's gone in Qt 6.
parent
ed849d6e
Pipeline
#242752
passed with stage
in 7 minutes and 36 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
mainWindow/kpMainWindow_View_Zoom.cpp
View file @
74ab690b
...
...
@@ -31,6 +31,7 @@
#include
"kpMainWindowPrivate.h"
#include
"kpLogCategories.h"
#include
<QRegularExpression>
#include
<QScrollBar>
#include
<KSelectAction>
...
...
@@ -61,7 +62,7 @@ static int ZoomLevelFromString (const QString &stringIn)
// 1. kdelibs adds accelerators to actions' text directly
// 2. ',' is automatically added to change "1000%" to "1,000%"
QString
string
=
stringIn
;
string
.
remove
(
QReg
Exp
(
"[^0-9]"
));
string
.
remove
(
QReg
ularExpression
(
QStringLiteral
(
"[^0-9]"
))
)
;
#if DEBUG_KP_MAIN_WINDOW
qCDebug
(
kpLogMainWindow
)
<<
"
\t
without non-digits='"
<<
string
<<
"'"
;
#endif
...
...
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