forked from qt-creator/qt-creator
ProjectExplorer: Do not pass invalid regex to match
Change-Id: I9917c9fa7a79132c253269efde90976e18f9b805 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -278,7 +278,8 @@ bool CustomParserConfigDialog::checkPattern(QLineEdit *pattern, const QString &o
|
|||||||
pattern->setPalette(palette);
|
pattern->setPalette(palette);
|
||||||
pattern->setToolTip(rx.isValid() ? QString() : rx.errorString());
|
pattern->setToolTip(rx.isValid() ? QString() : rx.errorString());
|
||||||
|
|
||||||
*match = rx.match(outputText);
|
if (rx.isValid())
|
||||||
|
*match = rx.match(outputText);
|
||||||
if (rx.pattern().isEmpty() || !rx.isValid() || !match->hasMatch()) {
|
if (rx.pattern().isEmpty() || !rx.isValid() || !match->hasMatch()) {
|
||||||
*errorMessage = QString::fromLatin1("<font color=\"%1\">%2 ").arg(
|
*errorMessage = QString::fromLatin1("<font color=\"%1\">%2 ").arg(
|
||||||
Utils::creatorTheme()->color(Utils::Theme::TextColorError).name(),
|
Utils::creatorTheme()->color(Utils::Theme::TextColorError).name(),
|
||||||
|
Reference in New Issue
Block a user