diff options
author | Tobias Hunger <tobias.hunger@nokia.com> | 2010-11-23 13:06:55 +0100 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@nokia.com> | 2010-11-23 13:06:55 +0100 |
commit | 40548df8f8b12ec7b4145a268872cf1ceb41e698 (patch) | |
tree | 8ea5a77a870f52655fbf7dfde7c22718c01730be /src | |
parent | 3e9eb325a81254af0528522eab84d89905e226ce (diff) | |
download | qt-creator-40548df8f8b12ec7b4145a268872cf1ceb41e698.tar.gz |
Symbian: Improve warnings on project setup
* Warn on spaces in the project path
* Warn on special characters in the project name only
This should stop warnings from appearing when trying to run the Qt demos
on symbian.
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/qt4projectmanager/qt-s60/s60projectchecker.cpp | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60projectchecker.cpp b/src/plugins/qt4projectmanager/qt-s60/s60projectchecker.cpp index 4716a981f6..a16b4458db 100644 --- a/src/plugins/qt4projectmanager/qt-s60/s60projectchecker.cpp +++ b/src/plugins/qt4projectmanager/qt-s60/s60projectchecker.cpp @@ -67,16 +67,27 @@ S60ProjectChecker::reportIssues(const QString &proFile, const QtVersion *version "The \"Open C/C++ plugin\" is not installed in the Symbian SDK or the Symbian SDK path is misconfigured for Qt version %1.").arg(version->displayName()), QString(), -1, ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)); } - // Warn of strange characters in project name: - QString projectPath = proFile; + + // Warn of strange characters in project name and path: + const QString projectName = proFile.mid(proFile.lastIndexOf(QLatin1Char('/')) + 1); + QString projectPath = proFile.left(proFile.lastIndexOf(QLatin1Char('/'))); #if defined (Q_OS_WIN) if (projectPath.at(1) == QChar(':') && projectPath.at(0).toUpper() >= QChar('A') && projectPath.at(0).toUpper() <= QChar('Z')) projectPath = projectPath.mid(2); #endif - if (projectPath.contains(QRegExp("[^a-zA-Z0-9./]"))) { + if (projectPath.contains(QLatin1Char(' '))) { + results.append(Task(Task::Warning, + QCoreApplication::translate("ProjectExplorer::Internal::S60ProjectChecker", + "The Symbian toolchain does not handle spaces " + "in the project path '%1'.").arg(projectPath), + QString(), -1, ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)); + } + if (projectName.contains(QRegExp("[^a-zA-Z0-9.]"))) { results.append(Task(Task::Warning, QCoreApplication::translate("ProjectExplorer::Internal::S60ProjectChecker", - "The Symbian toolchain does not handle special characters in a project path well."), + "The Symbian toolchain does not handle special " + "characters in the project name '%1' well.") + .arg(projectName), QString(), -1, ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)); } return results; |