Initial cleanup of the Todo-plugin.

- Compile with QT_NO_CAST_FROM_ASCII, fix
  single character strings
- Remove special character from constants.h,
  fix constant names
- Fix tr() errors.
- Clean include directives
- struct -> class (coding style)

Change-Id: Id6108a03312bdecc6df3015b5a12653c95390647
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
This commit is contained in:
Friedemann Kleint
2012-02-24 09:43:52 +01:00
parent 085bf393a5
commit f8499fd45b
24 changed files with 114 additions and 70 deletions

View File

@@ -98,7 +98,8 @@ void CppTodoItemsScanner::processDocument(CPlusPlus::Document::Ptr doc)
// Process every line of the comment
// TODO: Do not create QStringList, just iterate through a string tracking line endings.
QStringList commentLines = QString::fromUtf8(source).split("\n", QString::SkipEmptyParts);
const QStringList commentLines =
QString::fromUtf8(source).split(QLatin1Char('\n'), QString::SkipEmptyParts);
unsigned lineNumber = 0;
translationUnit->getPosition(token.begin(), &lineNumber);
for (int j = 0; j < commentLines.count(); ++j) {