[users] Remove duplicated constant (a regexp)

This commit is contained in:
Adriaan de Groot 2024-04-02 23:32:53 +02:00
parent fbde737802
commit b950f0f6d4

View File

@ -444,8 +444,6 @@ makeHostnameSuggestion( const QString& templateString, const QStringList& fullNa
QString hostnameSuggestion = d.expand( templateString );
// RegExp for valid hostnames; if the suggestion produces a valid name, return it
static const QRegularExpression HOSTNAME_RX( "^[a-zA-Z0-9][-a-zA-Z0-9_]*$" );
return hostnameSuggestion.indexOf( HOSTNAME_RX ) != -1 ? hostnameSuggestion : QString();
}