Tools: Apply pre-commit autoformatting
This commit is contained in:
@@ -31,7 +31,8 @@
|
||||
#include <qvalidator.h>
|
||||
|
||||
RegExpDialog::RegExpDialog(QWidget* parent)
|
||||
: QDialog(parent), ui(new Ui_RegExpDialog())
|
||||
: QDialog(parent),
|
||||
ui(new Ui_RegExpDialog())
|
||||
{
|
||||
ui->setupUi(this);
|
||||
rxhilighter = new RegExpSyntaxHighlighter(ui->textEdit1);
|
||||
@@ -39,22 +40,17 @@ RegExpDialog::RegExpDialog(QWidget* parent)
|
||||
validator = new QRegularExpressionValidator(this);
|
||||
ui->lineEdit->setValidator(validator);
|
||||
|
||||
connect(ui->lineEditRegExp, &QLineEdit::textChanged,
|
||||
this, &RegExpDialog::performRegExp);
|
||||
connect(ui->caseInsensitiveOption, &QCheckBox::toggled,
|
||||
this, &RegExpDialog::performRegExp);
|
||||
connect(ui->invertedGreedinessOption, &QCheckBox::toggled,
|
||||
this, &RegExpDialog::performRegExp);
|
||||
connect(ui->dotMatchesEverythingOption, &QCheckBox::toggled,
|
||||
this, &RegExpDialog::performRegExp);
|
||||
connect(ui->multilineOption, &QCheckBox::toggled,
|
||||
this, &RegExpDialog::performRegExp);
|
||||
connect(ui->extendedPatternSyntaxOption, &QCheckBox::toggled,
|
||||
this, &RegExpDialog::performRegExp);
|
||||
connect(ui->dontCaptureOption, &QCheckBox::toggled,
|
||||
this, &RegExpDialog::performRegExp);
|
||||
connect(ui->useUnicodePropertiesOption, &QCheckBox::toggled,
|
||||
this, &RegExpDialog::performRegExp);
|
||||
connect(ui->lineEditRegExp, &QLineEdit::textChanged, this, &RegExpDialog::performRegExp);
|
||||
connect(ui->caseInsensitiveOption, &QCheckBox::toggled, this, &RegExpDialog::performRegExp);
|
||||
connect(ui->invertedGreedinessOption, &QCheckBox::toggled, this, &RegExpDialog::performRegExp);
|
||||
connect(
|
||||
ui->dotMatchesEverythingOption, &QCheckBox::toggled, this, &RegExpDialog::performRegExp);
|
||||
connect(ui->multilineOption, &QCheckBox::toggled, this, &RegExpDialog::performRegExp);
|
||||
connect(
|
||||
ui->extendedPatternSyntaxOption, &QCheckBox::toggled, this, &RegExpDialog::performRegExp);
|
||||
connect(ui->dontCaptureOption, &QCheckBox::toggled, this, &RegExpDialog::performRegExp);
|
||||
connect(
|
||||
ui->useUnicodePropertiesOption, &QCheckBox::toggled, this, &RegExpDialog::performRegExp);
|
||||
}
|
||||
|
||||
RegExpDialog::~RegExpDialog()
|
||||
@@ -105,7 +101,7 @@ void RegExpDialog::performRegExp()
|
||||
ui->textLabel4->setText(rx.errorString());
|
||||
if (!rx.isValid()) {
|
||||
rxhilighter->resethighlight();
|
||||
return; // invalid expression
|
||||
return;// invalid expression
|
||||
}
|
||||
|
||||
rxhilighter->highlightMatchedText(rx);
|
||||
@@ -120,16 +116,14 @@ void RegExpDialog::about()
|
||||
|
||||
// -------------------------------------------------------------
|
||||
|
||||
RegExpSyntaxHighlighter::RegExpSyntaxHighlighter (QTextEdit * textEdit)
|
||||
: QSyntaxHighlighter(textEdit)
|
||||
{
|
||||
}
|
||||
RegExpSyntaxHighlighter::RegExpSyntaxHighlighter(QTextEdit* textEdit)
|
||||
: QSyntaxHighlighter(textEdit)
|
||||
{}
|
||||
|
||||
RegExpSyntaxHighlighter::~RegExpSyntaxHighlighter()
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
void RegExpSyntaxHighlighter::highlightBlock (const QString & text)
|
||||
void RegExpSyntaxHighlighter::highlightBlock(const QString& text)
|
||||
{
|
||||
QTextCharFormat regFormat;
|
||||
regFormat.setForeground(Qt::black);
|
||||
@@ -137,7 +131,7 @@ void RegExpSyntaxHighlighter::highlightBlock (const QString & text)
|
||||
setFormat(0, text.length(), regFormat);
|
||||
|
||||
if (regexp.pattern().isEmpty())
|
||||
return; // empty regular expression
|
||||
return;// empty regular expression
|
||||
|
||||
int pos = 0;
|
||||
int last = -1;
|
||||
|
||||
Reference in New Issue
Block a user