ADS: Make it compile with current Qt dev

Change-Id: Ibea7545b443341da5d079900edcc32439a47c12f
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
hjk
2020-06-19 09:12:02 +02:00
parent 03838decb9
commit c6b9a03b39
6 changed files with 28 additions and 8 deletions

View File

@@ -40,6 +40,7 @@
#include <utils/algorithm.h>
#include <QInputDialog>
#include <QRegularExpression>
#include <QValidator>
namespace ADS {
@@ -64,9 +65,9 @@ QValidator::State WorkspaceValidator::validate(QString &input, int &pos) const
{
Q_UNUSED(pos)
static QRegExp rx("[a-zA-Z0-9 ()\\-]*");
static const QRegularExpression rx("^[a-zA-Z0-9 ()\\-]*$");
if (!rx.exactMatch(input))
if (!rx.match(input).hasMatch())
return QValidator::Invalid;
if (m_workspaces.contains(input))