Commit 74ab690b authored by Kai Uwe Broulik's avatar 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
......@@ -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 (QRegExp ("[^0-9]"));
string.remove(QRegularExpression(QStringLiteral("[^0-9]")));
#if DEBUG_KP_MAIN_WINDOW
qCDebug(kpLogMainWindow) << "\twithout non-digits='" << string << "'";
#endif
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment