From 2bba8353cad42cc4e02fd73ce32564b92b7aedbe Mon Sep 17 00:00:00 2001
From: Tobias Hunger <tobias.hunger@nokia.com>
Date: Mon, 19 Apr 2010 11:52:19 +0200
Subject: [PATCH] Do not warn on ':' in symbian project names

 ... if it is part of the drive letter only.
---
 src/plugins/qt4projectmanager/qmakestep.cpp | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/plugins/qt4projectmanager/qmakestep.cpp b/src/plugins/qt4projectmanager/qmakestep.cpp
index 94ce7fc43ed..aa45f076c83 100644
--- a/src/plugins/qt4projectmanager/qmakestep.cpp
+++ b/src/plugins/qt4projectmanager/qmakestep.cpp
@@ -207,7 +207,7 @@ void QMakeStep::run(QFutureInterface<bool> &fi)
             return;
         }
 #endif
-        // Report en error if EPOC root is not set:
+        // Report an error if EPOC root is not set:
         if (epocRootDir.isEmpty() || !QDir(epocRootDir).exists()) {
             addTask(Task(Task::Error,
                          tr("The Symbian SDK was not found for Qt version %1.").arg(qtVersion->displayName()),
@@ -223,7 +223,12 @@ void QMakeStep::run(QFutureInterface<bool> &fi)
             return;
         }
         // Warn of strange characters in project name:
-        if (projectDir.contains(QRegExp("[^a-zA-Z0-9./]"))) {
+        QString projectPath = projectDir;
+#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./]"))) {
             addTask(Task(Task::Warning,
                          tr("The Symbian toolchain does not handle special characters in a project path well."),
                          QString(), -1, ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM));
-- 
GitLab