diff options
author | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2012-11-26 20:44:02 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@digia.com> | 2012-11-30 11:07:02 +0100 |
commit | ac229fd317f3f60a02ff20d894464761c36666a7 (patch) | |
tree | 037a50cc3973c122d6052a21b14ff19f05918e46 /src/plugins/tasklist | |
parent | 5df4732f35eb5233dc842c64dce1f35ca0a9fdea (diff) | |
download | qt-creator-ac229fd317f3f60a02ff20d894464761c36666a7.tar.gz |
TaskList: Compile with QT_NO_CAST_FROM_ASCII
Change-Id: I63b440e0c59bb7bfa2c4fec5877dc873c09344ab
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Diffstat (limited to 'src/plugins/tasklist')
-rw-r--r-- | src/plugins/tasklist/tasklist.pro | 2 | ||||
-rw-r--r-- | src/plugins/tasklist/tasklist.qbs | 2 | ||||
-rw-r--r-- | src/plugins/tasklist/tasklistplugin.cpp | 20 |
3 files changed, 14 insertions, 10 deletions
diff --git a/src/plugins/tasklist/tasklist.pro b/src/plugins/tasklist/tasklist.pro index 9c35d6aea9..be8cebc23a 100644 --- a/src/plugins/tasklist/tasklist.pro +++ b/src/plugins/tasklist/tasklist.pro @@ -5,6 +5,8 @@ include(../../qtcreatorplugin.pri) include(../../plugins/coreplugin/coreplugin.pri) include(../../plugins/projectexplorer/projectexplorer.pri) +DEFINES += QT_NO_CAST_FROM_ASCII + HEADERS += tasklistplugin.h \ tasklist_export.h \ tasklistconstants.h \ diff --git a/src/plugins/tasklist/tasklist.qbs b/src/plugins/tasklist/tasklist.qbs index 9a92e0493e..d428621359 100644 --- a/src/plugins/tasklist/tasklist.qbs +++ b/src/plugins/tasklist/tasklist.qbs @@ -5,12 +5,14 @@ import "../QtcPlugin.qbs" as QtcPlugin QtcPlugin { name: "TaskList" + Depends { name: "cpp" } Depends { name: "Qt.widgets" } Depends { name: "Core" } Depends { name: "ProjectExplorer" } Depends { name: "Find" } Depends { name: "Locator" } Depends { name: "TextEditor" } + cpp.defines: base.concat(["QT_NO_CAST_FROM_ASCII"]) files: [ "TaskList.mimetypes.xml", diff --git a/src/plugins/tasklist/tasklistplugin.cpp b/src/plugins/tasklist/tasklistplugin.cpp index 8a3506190d..5eaf0c3a83 100644 --- a/src/plugins/tasklist/tasklistplugin.cpp +++ b/src/plugins/tasklist/tasklistplugin.cpp @@ -112,7 +112,7 @@ public: file = QDir::fromNativeSeparators(file); QFileInfo fi(file); if (fi.isRelative() && context) { - QString fullPath = context->projectDirectory() + '/' + file; + QString fullPath = context->projectDirectory() + QLatin1Char('/') + file; fi.setFile(fullPath); file = fi.absoluteFilePath(); } @@ -130,29 +130,29 @@ public: { QStringList result; QString line = QString::fromUtf8(raw.constData()); - if (line.startsWith(QChar('#'))) + if (line.startsWith(QLatin1Char('#'))) return result; - return line.split(QChar('\t')); + return line.split(QLatin1Char('\t')); } QString unescape(const QString &input) const { QString result; for (int i = 0; i < input.count(); ++i) { - if (input.at(i) == QChar('\\')) { + if (input.at(i) == QLatin1Char('\\')) { if (i == input.count() - 1) continue; - if (input.at(i + 1) == QChar('n')) { - result.append(QChar('\n')); + if (input.at(i + 1) == QLatin1Char('n')) { + result.append(QLatin1Char('\n')); ++i; continue; - } else if (input.at(i + 1) == QChar('t')) { - result.append(QChar('\t')); + } else if (input.at(i + 1) == QLatin1Char('t')) { + result.append(QLatin1Char('\t')); ++i; continue; - } else if (input.at(i + 1) == QChar('\\')) { - result.append(QChar('\\')); + } else if (input.at(i + 1) == QLatin1Char('\\')) { + result.append(QLatin1Char('\\')); ++i; continue; } |