forked from qt-creator/qt-creator
Allow not only a colon as a keyword-text divider in todos.
This makes possible to scan such things as doxygen \todo, @todo entries where colons cannot be added after a keyword. Change-Id: I13c757294c94a1f4758e7dc9634a79ea6e91c68f Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
This commit is contained in:
committed by
Eike Ziller
parent
b6b2441e55
commit
9fe784115a
@@ -35,6 +35,7 @@
|
||||
#include "keyword.h"
|
||||
#include "ui_keyworddialog.h"
|
||||
#include "constants.h"
|
||||
#include "lineparser.h"
|
||||
|
||||
#include <QColorDialog>
|
||||
|
||||
@@ -124,7 +125,7 @@ void KeywordDialog::setupColorWidgets(const QColor &color)
|
||||
bool KeywordDialog::canAccept()
|
||||
{
|
||||
if (!isKeywordNameCorrect()) {
|
||||
showError(tr("Keyword cannot be empty, contain spaces or colons."));
|
||||
showError(tr("Keyword cannot be empty, contain spaces, colons, slashes or asterisks."));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -146,7 +147,7 @@ bool KeywordDialog::isKeywordNameCorrect()
|
||||
return false;
|
||||
|
||||
for (int i = 0; i < name.size(); ++i)
|
||||
if (name.at(i).isSpace() || name.at(i) == QLatin1Char(':'))
|
||||
if (LineParser::isKeywordSeparator(name.at(i)))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user