Commit 12e974db authored by dt's avatar dt
Browse files

Session Manager: Session names are file names, prevent some special chars

Task-Nr: QTCREATORBUG-2276
parent d79b3a15
......@@ -57,6 +57,14 @@ SessionValidator::SessionValidator(QObject *parent, QStringList sessions)
QValidator::State SessionValidator::validate(QString &input, int &pos) const
{
Q_UNUSED(pos)
if (input.contains('/')
|| input.contains(':')
|| input.contains('\\')
|| input.contains('?')
|| input.contains('*'))
return QValidator::Invalid;
if (m_sessions.contains(input))
return QValidator::Intermediate;
else
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment