Fix for build on drone.io.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2015-10-08 20:45:26 +03:00
parent 7676959bdb
commit 64e07c405a
3 changed files with 16 additions and 5 deletions

View File

@ -1722,7 +1722,11 @@ void TMainWindow::InitWindow()
ui->actionReadOnly->setEnabled(true);
ui->actionSaveAs->setEnabled(true);
ui->lineEditName->setValidator( new QRegularExpressionValidator(QRegularExpression(NameRegExp())) );
#if QT_VERSION > QT_VERSION_CHECK(5, 1, 0)
ui->lineEditName->setValidator( new QRegularExpressionValidator(QRegularExpression(NameRegExp()), this));
#else
ui->lineEditName->setValidator( new QRegExpValidator(QRegExp(NameRegExp()), this));
#endif
connect(ui->toolButtonRemove, &QToolButton::clicked, this, &TMainWindow::Remove);
connect(ui->toolButtonUp, &QToolButton::clicked, this, &TMainWindow::MoveUp);

View File

@ -80,7 +80,11 @@ DialogIncrements::DialogIncrements(VContainer *data, VPattern *doc, QWidget *par
connect(this->doc, &VPattern::FullUpdateFromFile, this, &DialogIncrements::FullUpdateFromFile);
ui->tabWidget->setCurrentIndex(0);
ui->lineEditName->setValidator( new QRegularExpressionValidator(QRegularExpression(NameRegExp())));
#if QT_VERSION > QT_VERSION_CHECK(5, 1, 0)
ui->lineEditName->setValidator( new QRegularExpressionValidator(QRegularExpression(NameRegExp()), this));
#else
ui->lineEditName->setValidator( new QRegExpValidator(QRegExp(NameRegExp()), this));
#endif
connect(ui->tableWidgetIncrement, &QTableWidget::itemSelectionChanged, this,
&DialogIncrements::ShowIncrementDetails);

View File

@ -69,9 +69,12 @@ DialogSaveLayout::DialogSaveLayout(int count, const QString &fileName, QWidget *
SCASSERT(bOk != nullptr);
bOk->setEnabled(false);
QRegularExpressionValidator *validator = new QRegularExpressionValidator(QRegularExpression(baseFilenameRegExp),
this);
ui->lineEditFileName->setValidator(validator);
#if QT_VERSION > QT_VERSION_CHECK(5, 1, 0)
ui->lineEditFileName->setValidator( new QRegularExpressionValidator(QRegularExpression(baseFilenameRegExp), this));
#else
ui->lineEditFileName->setValidator( new QRegExpValidator(QRegExp(baseFilenameRegExp), this));
#endif
const QString mask = fileName+QLatin1Literal("_");
if (VApplication::CheckGUI())
{