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 <utils/algorithm.h>
|
||||||
|
|
||||||
#include <QRegExp>
|
#include <QRegularExpression>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
|
||||||
using namespace ProjectExplorer;
|
using namespace ProjectExplorer;
|
||||||
@@ -131,8 +131,8 @@ void TodoItemsProvider::setItemsListWithinStartupProject()
|
|||||||
if (filePaths.contains(filePath)) {
|
if (filePaths.contains(filePath)) {
|
||||||
bool skip = false;
|
bool skip = false;
|
||||||
for (const QVariant &pattern : settings[Constants::EXCLUDES_LIST_KEY].toList()) {
|
for (const QVariant &pattern : settings[Constants::EXCLUDES_LIST_KEY].toList()) {
|
||||||
QRegExp re(pattern.toString());
|
QRegularExpression re(pattern.toString());
|
||||||
if (re.indexIn(filePath.toString()) != -1) {
|
if (filePath.toString().indexOf(re) != -1) {
|
||||||
skip = true;
|
skip = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@@ -95,7 +95,7 @@ void TodoProjectSettingsWidget::saveSettings()
|
|||||||
|
|
||||||
void TodoProjectSettingsWidget::prepareItem(QListWidgetItem *item) const
|
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)));
|
item->setForeground(QBrush(ui->excludedPatternsList->palette().color(QPalette::Active, QPalette::Text)));
|
||||||
else
|
else
|
||||||
item->setForeground(QBrush(Qt::red));
|
item->setForeground(QBrush(Qt::red));
|
||||||
|
Reference in New Issue
Block a user