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
Plasma
Plasma SDK
Commits
a421f566
Commit
a421f566
authored
May 14, 2022
by
Volker Krause
Browse files
Port away from QRegExp
parent
bed3b367
Pipeline
#176593
passed with stage
in 1 minute
Changes
2
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
engineexplorer/engineexplorer.cpp
View file @
a421f566
...
...
@@ -383,9 +383,14 @@ QString EngineExplorer::convertToString(const QVariant &value)
QRectF
rectF
=
value
.
toRectF
();
return
QString
(
"<x:%1, y:%2, w:%3, h:%4>"
).
arg
(
rectF
.
x
()).
arg
(
rectF
.
y
()).
arg
(
rectF
.
width
()).
arg
(
rectF
.
height
());
}
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
case
QVariant
::
RegExp
:
{
return
QString
(
"%1"
).
arg
(
value
.
toRegExp
().
pattern
());
}
#endif
case
QVariant
::
RegularExpression
:
{
return
value
.
toRegularExpression
().
pattern
();
}
case
QVariant
::
Region
:
{
QRect
region
=
value
.
value
<
QRegion
>
().
boundingRect
();
return
QString
(
"<x:%1, y:%2, w:%3, h:%4>"
).
arg
(
region
.
x
()).
arg
(
region
.
y
()).
arg
(
region
.
width
()).
arg
(
region
.
height
());
...
...
themeexplorer/src/thememodel.cpp
View file @
a421f566
...
...
@@ -49,7 +49,7 @@ bool IconsParserHandler::startElement(const QString &namespaceURI, const QString
const
QString
id
=
atts
.
value
(
"id"
);
// qWarning() << "Start Element:"<<id;
if
(
!
id
.
isEmpty
()
&&
!
id
.
contains
(
QReg
Exp
(
"
\\
d
\\
d$"
))
&&
id
!=
"base"
&&
!
id
.
contains
(
"layer"
))
{
if
(
!
id
.
isEmpty
()
&&
!
id
.
contains
(
QReg
ularExpression
(
"
\\
d
\\
d$"
))
&&
id
!=
"base"
&&
!
id
.
contains
(
"layer"
))
{
m_ids
<<
id
;
}
if
(
id
.
endsWith
(
QLatin1String
(
"-center"
))
&&
!
id
.
contains
(
"hint-"
))
{
...
...
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