diff options
author | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2010-11-19 14:53:29 +0200 |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2010-11-19 15:35:00 +0200 |
commit | 4b380543cc973d575a3ed0c77918adbe5b6133f0 (patch) | |
tree | d7f618d55549f46a9b9bbb974d2ee7ad7a838183 /tools/shared | |
parent | 45ffd89f55a7769c66f6cf15e54994a264012f05 (diff) | |
download | qt4-tools-4b380543cc973d575a3ed0c77918adbe5b6133f0.tar.gz |
Fixed namespace issues related to epocroot.cpp
Task-number: QTBUG-15393
Reviewed-by: axis
Diffstat (limited to 'tools/shared')
-rw-r--r-- | tools/shared/symbian/epocroot.cpp | 17 | ||||
-rw-r--r-- | tools/shared/symbian/epocroot.pri | 4 | ||||
-rw-r--r-- | tools/shared/symbian/epocroot_p.h (renamed from tools/shared/symbian/epocroot.h) | 24 | ||||
-rw-r--r-- | tools/shared/windows/registry.cpp | 7 | ||||
-rw-r--r-- | tools/shared/windows/registry_p.h (renamed from tools/shared/windows/registry.h) | 24 |
5 files changed, 56 insertions, 20 deletions
diff --git a/tools/shared/symbian/epocroot.cpp b/tools/shared/symbian/epocroot.cpp index 9d7d4654cb..eabae98276 100644 --- a/tools/shared/symbian/epocroot.cpp +++ b/tools/shared/symbian/epocroot.cpp @@ -39,13 +39,13 @@ ** ****************************************************************************/ -#include <iostream> - #include <QtCore/qdir.h> #include <QtCore/qxmlstream.h> -#include "epocroot.h" -#include "../windows/registry.h" +#include "epocroot_p.h" +#include "../windows/registry_p.h" + +QT_BEGIN_NAMESPACE // Registry key under which the location of the Symbian devices.xml file is // stored. @@ -64,20 +64,20 @@ // Stored as a static value in order to avoid unnecessary re-evaluation. static QString epocRootValue; -QString getDevicesXmlPath() +static QString getDevicesXmlPath() { // Note that the following call will return a null string on platforms other // than Windows. If support is required on other platforms for devices.xml, // an alternative mechanism for retrieving the location of this file will // be required. - return readRegistryKey(SYMBIAN_SDKS_REG_HANDLE, QLatin1String(SYMBIAN_SDKS_REG_SUBKEY)); + return qt_readRegistryKey(SYMBIAN_SDKS_REG_HANDLE, QLatin1String(SYMBIAN_SDKS_REG_SUBKEY)); } /** * Checks whether epocRootValue points to an existent directory. * If not, epocRootValue is set to an empty string and an error message is printed. */ -void checkEpocRootExists(const QString &source) +static void checkEpocRootExists(const QString &source) { if (!epocRootValue.isEmpty()) { QDir dir(epocRootValue); @@ -104,7 +104,7 @@ static void fixEpocRoot(QString &path) /** * Determine the epoc root for the currently active SDK. */ -QString epocRoot() +QString qt_epocRoot() { if (epocRootValue.isEmpty()) { // 1. If environment variable EPOCROOT is set and points to an existent @@ -219,3 +219,4 @@ QString epocRoot() return epocRootValue; } +QT_END_NAMESPACE diff --git a/tools/shared/symbian/epocroot.pri b/tools/shared/symbian/epocroot.pri index 117836e73c..f0f0dab535 100644 --- a/tools/shared/symbian/epocroot.pri +++ b/tools/shared/symbian/epocroot.pri @@ -1,8 +1,8 @@ # Epocroot resolving is only required for tools, so omit it from all mobile/embedded builds !symbian:!wince*:!embedded { HEADERS += \ - $$QT_SOURCE_TREE/tools/shared/symbian/epocroot.h \ - $$QT_SOURCE_TREE/tools/shared/windows/registry.h + $$QT_SOURCE_TREE/tools/shared/symbian/epocroot_p.h \ + $$QT_SOURCE_TREE/tools/shared/windows/registry_p.h SOURCES += \ $$QT_SOURCE_TREE/tools/shared/symbian/epocroot.cpp \ $$QT_SOURCE_TREE/tools/shared/windows/registry.cpp diff --git a/tools/shared/symbian/epocroot.h b/tools/shared/symbian/epocroot_p.h index 9846485aab..c97b5938b6 100644 --- a/tools/shared/symbian/epocroot.h +++ b/tools/shared/symbian/epocroot_p.h @@ -39,11 +39,24 @@ ** ****************************************************************************/ -#ifndef SYMBIAN_EPOCROOT_H -#define SYMBIAN_EPOCROOT_H +#ifndef QT_SYMBIAN_EPOCROOT_H +#define QT_SYMBIAN_EPOCROOT_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// #include <QtCore/qstring.h> +QT_BEGIN_NAMESPACE + /** * Determine the epoc root for the currently active SDK. * @@ -62,6 +75,9 @@ * Any return value other than the empty string therefore is guaranteed to * point to an existent directory. */ -QString epocRoot(); +QString qt_epocRoot(); + +QT_END_NAMESPACE + +#endif // QT_SYMBIAN_EPOCROOT_H -#endif // EPOCROOT_H diff --git a/tools/shared/windows/registry.cpp b/tools/shared/windows/registry.cpp index 2373839a5b..48e9ae6af9 100644 --- a/tools/shared/windows/registry.cpp +++ b/tools/shared/windows/registry.cpp @@ -40,7 +40,9 @@ ****************************************************************************/ #include <QtCore/qstringlist.h> -#include "registry.h" +#include "registry_p.h" + +QT_BEGIN_NAMESPACE #ifdef Q_OS_WIN32 /*! @@ -80,7 +82,7 @@ static QString keyName(const QString &rKey) } #endif -QString readRegistryKey(HKEY parentHandle, const QString &rSubkey) +QString qt_readRegistryKey(HKEY parentHandle, const QString &rSubkey) { QString result; @@ -160,4 +162,5 @@ QString readRegistryKey(HKEY parentHandle, const QString &rSubkey) return result; } +QT_END_NAMESPACE diff --git a/tools/shared/windows/registry.h b/tools/shared/windows/registry_p.h index 3896527cb2..4aae5f93e3 100644 --- a/tools/shared/windows/registry.h +++ b/tools/shared/windows/registry_p.h @@ -39,8 +39,21 @@ ** ****************************************************************************/ -#ifndef WINDOWS_REGISTRY_H -#define WINDOWS_REGISTRY_H +#ifndef QT_WINDOWS_REGISTRY_H +#define QT_WINDOWS_REGISTRY_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +QT_BEGIN_NAMESPACE #include <QtCore/qglobal.h> @@ -59,6 +72,9 @@ * if this code is compiled for a platform other than Windows), a null * string is returned. */ -QString readRegistryKey(HKEY parentHandle, const QString &rSubkey); +QString qt_readRegistryKey(HKEY parentHandle, const QString &rSubkey); + +QT_END_NAMESPACE + +#endif // QT_WINDOWS_REGISTRY_H -#endif // WINDOWS_REGISTRY_H |