forked from qt-creator/qt-creator
Todo: Replace QRegExp by QRegularExpression
Task-number: QTCREATORBUG-24098 Change-Id: I30d06f78106760ca3ad434b3f89603fd7bab2d71 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -41,7 +41,7 @@
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
|
||||
#include <QRegExp>
|
||||
#include <QRegularExpression>
|
||||
#include <QTimer>
|
||||
|
||||
using namespace ProjectExplorer;
|
||||
@@ -131,8 +131,8 @@ void TodoItemsProvider::setItemsListWithinStartupProject()
|
||||
if (filePaths.contains(filePath)) {
|
||||
bool skip = false;
|
||||
for (const QVariant &pattern : settings[Constants::EXCLUDES_LIST_KEY].toList()) {
|
||||
QRegExp re(pattern.toString());
|
||||
if (re.indexIn(filePath.toString()) != -1) {
|
||||
QRegularExpression re(pattern.toString());
|
||||
if (filePath.toString().indexOf(re) != -1) {
|
||||
skip = true;
|
||||
break;
|
||||
}
|
||||
|
@@ -95,7 +95,7 @@ void TodoProjectSettingsWidget::saveSettings()
|
||||
|
||||
void TodoProjectSettingsWidget::prepareItem(QListWidgetItem *item) const
|
||||
{
|
||||
if (QRegExp(item->text()).isValid())
|
||||
if (QRegularExpression(item->text()).isValid())
|
||||
item->setForeground(QBrush(ui->excludedPatternsList->palette().color(QPalette::Active, QPalette::Text)));
|
||||
else
|
||||
item->setForeground(QBrush(Qt::red));
|
||||
|
Reference in New Issue
Block a user