From 1374f3b0d90358a5c710765cec60c04233fb4282 Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Tue, 5 Oct 2010 12:01:14 +0200 Subject: [PATCH] Symbian: Fix header pathes to work for c++ engine Task-number: QTCREATORBUG-2604 Reviewed-by: Alessandro Portale Reviewed-by: Pawel Polanski --- .../qt4projectmanager/qt-s60/s60devices.cpp | 58 +++++++--------------- 1 file changed, 17 insertions(+), 41 deletions(-) diff --git a/src/plugins/qt4projectmanager/qt-s60/s60devices.cpp b/src/plugins/qt4projectmanager/qt-s60/s60devices.cpp index 3631c3bf57..4d1445195a 100644 --- a/src/plugins/qt4projectmanager/qt-s60/s60devices.cpp +++ b/src/plugins/qt4projectmanager/qt-s60/s60devices.cpp @@ -517,50 +517,26 @@ bool S60ToolChainMixin::equals(const S60ToolChainMixin &rhs) const && m_device.name == rhs.m_device.name; } +static const char *epocHeaderPathsC[] = { + "include", "mkspecs/common/symbian", "epoc32/include", + "epoc32/include/osextensions/stdapis", "epoc32/include/osextensions/stdapis/sys", + "epoc32/include/stdapis", "epoc32/include/stdapis/sys", + "epoc32/include/osextensions/stdapis/stlport", "epoc32/include/stdapis/stlport", + "epoc32/include/oem", "epoc32/include/middleware", "epoc32/include/domain/middleware", + "epoc32/include/osextensions", "epoc32/include/domain/osextensions", + "epoc32/include/domain/osextensions/loc", "epoc32/include/domain/middleware/loc", + "epoc32/include/domain/osextensions/loc/sc", "epoc32/include/domain/middleware/loc/sc" +}; + QList S60ToolChainMixin::epocHeaderPaths() const { QList rc; - const QString epocRootPath(S60Devices::cleanedRootPath(m_device.epocRoot)); - - rc << ProjectExplorer::HeaderPath(epocRootPath, - ProjectExplorer::HeaderPath::GlobalHeaderPath) - << ProjectExplorer::HeaderPath(epocRootPath + QLatin1String("include"), - ProjectExplorer::HeaderPath::GlobalHeaderPath) - << ProjectExplorer::HeaderPath(epocRootPath + QLatin1String("mkspecs/common/symbian"), - ProjectExplorer::HeaderPath::GlobalHeaderPath) - << ProjectExplorer::HeaderPath(epocRootPath + QLatin1String("epoc32/include"), - ProjectExplorer::HeaderPath::GlobalHeaderPath) - << ProjectExplorer::HeaderPath(epocRootPath + QLatin1String("epoc32/include/osextensions/stdapis"), - ProjectExplorer::HeaderPath::GlobalHeaderPath) - << ProjectExplorer::HeaderPath(epocRootPath + QLatin1String("epoc32/include/osextensions/stdapis/sys"), - ProjectExplorer::HeaderPath::GlobalHeaderPath) - << ProjectExplorer::HeaderPath(epocRootPath + QLatin1String("epoc32/include/stdapis"), - ProjectExplorer::HeaderPath::GlobalHeaderPath) - << ProjectExplorer::HeaderPath(epocRootPath + QLatin1String("epoc32/include/stdapis/sys"), - ProjectExplorer::HeaderPath::GlobalHeaderPath) - << ProjectExplorer::HeaderPath(epocRootPath + QLatin1String("epoc32/include/osextensions/stdapis/stlport"), - ProjectExplorer::HeaderPath::GlobalHeaderPath) - << ProjectExplorer::HeaderPath(epocRootPath + QLatin1String("epoc32/include/stdapis/stlport"), - ProjectExplorer::HeaderPath::GlobalHeaderPath) - << ProjectExplorer::HeaderPath(epocRootPath + QLatin1String("epoc32/include/oem"), - ProjectExplorer::HeaderPath::GlobalHeaderPath) - << ProjectExplorer::HeaderPath(epocRootPath + QLatin1String("epoc32/include/middleware"), - ProjectExplorer::HeaderPath::GlobalHeaderPath) - << ProjectExplorer::HeaderPath(epocRootPath + QLatin1String("epoc32/include/domain/middleware"), - ProjectExplorer::HeaderPath::GlobalHeaderPath) - << ProjectExplorer::HeaderPath(epocRootPath + QLatin1String("epoc32/include/osextensions"), - ProjectExplorer::HeaderPath::GlobalHeaderPath) - << ProjectExplorer::HeaderPath(epocRootPath + QLatin1String("epoc32/include/domain/osextensions"), - ProjectExplorer::HeaderPath::GlobalHeaderPath) - << ProjectExplorer::HeaderPath(epocRootPath + QLatin1String("epoc32/include/domain/osextensions/loc"), - ProjectExplorer::HeaderPath::GlobalHeaderPath) - << ProjectExplorer::HeaderPath(epocRootPath + QLatin1String("epoc32/include/domain/middleware/loc"), - ProjectExplorer::HeaderPath::GlobalHeaderPath) - << ProjectExplorer::HeaderPath(epocRootPath + QLatin1String("epoc32/include/domain/osextensions/loc/sc"), - ProjectExplorer::HeaderPath::GlobalHeaderPath) - << ProjectExplorer::HeaderPath(epocRootPath + QLatin1String("epoc32/include/domain/middleware/loc/sc"), - ProjectExplorer::HeaderPath::GlobalHeaderPath); + QString root = m_device.epocRoot + QLatin1Char('/'); + const int count = sizeof(epocHeaderPathsC) / sizeof(const char *); + for (int i = 0; i < count; ++i) + rc << ProjectExplorer::HeaderPath(root + QLatin1String(epocHeaderPathsC[i]), + ProjectExplorer::HeaderPath::GlobalHeaderPath); return rc; } @@ -582,7 +558,7 @@ void S60ToolChainMixin::addEpocToEnvironment(Utils::Environment *env) const } static const char *gnuPocHeaderPathsC[] = { - "epoc32/include", "epoc32/include/variant", "epoc32/include/stdapis", + "epoc32/include", "epoc32/include/variant", "epoc32/include/stdapis", "epoc32/include/stdapis/stlport" }; QList S60ToolChainMixin::gnuPocHeaderPaths() const -- 2.11.0