Skip to content
Snippets Groups Projects
Commit 40548df8 authored by Tobias Hunger's avatar Tobias Hunger
Browse files

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.
parent 3e9eb325
No related branches found
No related tags found
No related merge requests found
...@@ -67,16 +67,27 @@ S60ProjectChecker::reportIssues(const QString &proFile, const QtVersion *version ...@@ -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()), "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)); 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 defined (Q_OS_WIN)
if (projectPath.at(1) == QChar(':') && projectPath.at(0).toUpper() >= QChar('A') && projectPath.at(0).toUpper() <= QChar('Z')) if (projectPath.at(1) == QChar(':') && projectPath.at(0).toUpper() >= QChar('A') && projectPath.at(0).toUpper() <= QChar('Z'))
projectPath = projectPath.mid(2); projectPath = projectPath.mid(2);
#endif #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, results.append(Task(Task::Warning,
QCoreApplication::translate("ProjectExplorer::Internal::S60ProjectChecker", 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)); QString(), -1, ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM));
} }
return results; return results;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment