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: include QRegExp explicitly and fix usage

Halla Rempteea3555e70d0
diff --git a/libs/widgets/KoUnitDoubleSpinBox.cpp b/libs/widgets/KoUnitDoubleSpinBox.cpp
index c66aa4bdb9..bb981ba78b 100644
--- a/libs/widgets/KoUnitDoubleSpinBox.cpp
+++ b/libs/widgets/KoUnitDoubleSpinBox.cpp
@@ -10,6 +10,8 @@
#include <KoUnit.h>
+#include <QRegExp>
+
#include <WidgetsDebug.h>
#include <klocalizedstring.h>
@@ -61,7 +63,7 @@ QValidator::State KoUnitDoubleSpinBox::validate(QString &input, int &pos) const
#endif
QRegExp regexp ("([ a-zA-Z]+)$"); // Letters or spaces at end
- const int res = input.indexOf( regexp );
+ const int res = regexp.indexIn(input);
if ( res == -1 )
{