Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++

Qt6: Use QRegularExpression instead of QRegExp

Halla Rempt5b415ee48017
diff --git a/libs/widgetutils/kis_double_parse_unit_spin_box.cpp b/libs/widgetutils/kis_double_parse_unit_spin_box.cpp
index 7ffcb289db..1006768dba 100644
--- a/libs/widgetutils/kis_double_parse_unit_spin_box.cpp
+++ b/libs/widgetutils/kis_double_parse_unit_spin_box.cpp
@@ -13,7 +13,7 @@
#include <QMenu>
#include <QAction>
#include <QtMath>
-#include <QRegExp>
+#include <QRegularExpression>
#include <QString>
#include <QActionGroup>
@@ -384,7 +384,7 @@ QString KisDoubleParseUnitSpinBox::detectUnit()
{
QString str = veryCleanText().trimmed(); //text with the new unit but not the old one.
- QRegExp regexp ("([ ]*[a-zA-Z]+[ ]*)$"); // Letters or spaces at end
+ QRegularExpression regexp ("([ ]*[a-zA-Z]+[ ]*)$"); // Letters or spaces at end
int res = str.indexOf( regexp );
if (res > -1) {