Replaced deprecated QRegExp by QRegularExpression

This commit is contained in:
thunder2 2025-07-21 00:37:10 +02:00
parent f0286740f4
commit 13b294838b
8 changed files with 26 additions and 18 deletions

View file

@ -27,7 +27,7 @@
#include <QFileOpenEvent>
#include <QLocale>
#include <QLocalSocket>
#include <QRegExp>
#include <QRegularExpression>
#include <QSharedMemory>
#include <QShortcut>
#include <QString>
@ -311,8 +311,8 @@ void RsApplication::customizeDateFormat()
QLocale locale = QLocale(); // set to default locale
/* get long date format without weekday */
options.dateformat = locale.dateFormat(QLocale::LongFormat);
options.dateformat.replace(QRegExp("^dddd,*[^ ]* *('[^']+' )*"), "");
options.dateformat.replace(QRegExp(",* *dddd"), "");
options.dateformat.replace(QRegularExpression("^dddd,*[^ ]* *('[^']+' )*"), "");
options.dateformat.replace(QRegularExpression(",* *dddd"), "");
options.dateformat = options.dateformat.trimmed();
}