summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qmake/generators/symbian/initprojectdeploy_symbian.cpp12
-rw-r--r--qmake/generators/symbian/symbiancommon.cpp4
-rw-r--r--qmake/generators/symbian/symmake.cpp10
-rw-r--r--qmake/generators/symbian/symmake_abld.cpp4
-rw-r--r--qmake/generators/symbian/symmake_sbsv2.cpp8
-rw-r--r--qmake/generators/win32/msvc_vcproj.cpp6
-rw-r--r--qmake/project.cpp4
-rw-r--r--qmake/qmake.pri4
-rw-r--r--src/corelib/global/qlibraryinfo.cpp4
-rw-r--r--tools/configure/configure.pro4
-rw-r--r--tools/configure/environment.cpp10
-rw-r--r--tools/shared/symbian/epocroot.cpp17
-rw-r--r--tools/shared/symbian/epocroot.pri4
-rw-r--r--tools/shared/symbian/epocroot_p.h (renamed from tools/shared/symbian/epocroot.h)24
-rw-r--r--tools/shared/windows/registry.cpp7
-rw-r--r--tools/shared/windows/registry_p.h (renamed from tools/shared/windows/registry.h)24
16 files changed, 91 insertions, 55 deletions
diff --git a/qmake/generators/symbian/initprojectdeploy_symbian.cpp b/qmake/generators/symbian/initprojectdeploy_symbian.cpp
index 22a4a82..81236d4 100644
--- a/qmake/generators/symbian/initprojectdeploy_symbian.cpp
+++ b/qmake/generators/symbian/initprojectdeploy_symbian.cpp
@@ -47,7 +47,7 @@
#include <qdebug.h>
// Included from tools/shared
-#include <symbian/epocroot.h>
+#include <symbian/epocroot_p.h>
#define SYSBIN_DIR "/sys/bin"
#define HW_Z_DIR "epoc32/data/z"
@@ -75,7 +75,7 @@ static bool isPlugin(const QFileInfo& info, const QString& devicePath)
&& (devicePath.size() < 8
|| (0 != devicePath.compare(QLatin1String(SYSBIN_DIR), Qt::CaseInsensitive)
&& 0 != devicePath.mid(1).compare(QLatin1String(":" SYSBIN_DIR), Qt::CaseInsensitive)
- && 0 != devicePath.compare(epocRoot() + QLatin1String(HW_Z_DIR SYSBIN_DIR))))) {
+ && 0 != devicePath.compare(qt_epocRoot() + QLatin1String(HW_Z_DIR SYSBIN_DIR))))) {
return true;
} else {
return false;
@@ -182,7 +182,7 @@ void initProjectDeploySymbian(QMakeProject* project,
QString deploymentDrive;
if (0 == platform.compare(QLatin1String(ROM_DEPLOYMENT_PLATFORM))) {
- deploymentDrive = epocRoot() + HW_Z_DIR;
+ deploymentDrive = qt_epocRoot() + HW_Z_DIR;
} else {
deploymentDrive = targetPathHasDriveLetter ? targetPath.left(2) : QLatin1String("c:");
}
@@ -225,9 +225,9 @@ void initProjectDeploySymbian(QMakeProject* project,
} else {
if (0 == platform.compare(QLatin1String(EMULATOR_DEPLOYMENT_PLATFORM))) {
if (devicePathHasDriveLetter) {
- devicePath = epocRoot() + "epoc32/winscw/" + devicePath.remove(1, 1);
+ devicePath = qt_epocRoot() + "epoc32/winscw/" + devicePath.remove(1, 1);
} else {
- devicePath = epocRoot() + "epoc32/winscw/c" + devicePath;
+ devicePath = qt_epocRoot() + "epoc32/winscw/c" + devicePath;
}
} else {
if (devicePathHasDriveLetter
@@ -278,7 +278,7 @@ void initProjectDeploySymbian(QMakeProject* project,
// Executables and libraries are deployed to \sys\bin
QFileInfo targetPath;
if (epocBuild)
- targetPath.setFile(epocRoot() + "epoc32/release/" + platform + "/" + build + "/");
+ targetPath.setFile(qt_epocRoot() + "epoc32/release/" + platform + "/" + build + "/");
else
targetPath.setFile(info.path() + QDir::separator());
if(devicePathHasDriveLetter) {
diff --git a/qmake/generators/symbian/symbiancommon.cpp b/qmake/generators/symbian/symbiancommon.cpp
index 2244a98..602bcc2 100644
--- a/qmake/generators/symbian/symbiancommon.cpp
+++ b/qmake/generators/symbian/symbiancommon.cpp
@@ -44,7 +44,7 @@
#include <qxmlstream.h>
// Included from tools/shared
-#include <symbian/epocroot.h>
+#include <symbian/epocroot_p.h>
#define RESOURCE_DIRECTORY_RESOURCE "\\\\resource\\\\apps\\\\"
@@ -417,7 +417,7 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile,
QString zDir;
remoteTestPath = QString("!:\\private\\%1").arg(privateDirUid);
if (epocBuild)
- zDir = epocRoot() + QLatin1String("epoc32/data/z");
+ zDir = qt_epocRoot() + QLatin1String("epoc32/data/z");
DeploymentList depList;
initProjectDeploySymbian(project, depList, remoteTestPath, true, epocBuild, "$(PLATFORM)", "$(TARGET)", generatedDirs, generatedFiles);
diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp
index e1426ab..7bebd56 100644
--- a/qmake/generators/symbian/symmake.cpp
+++ b/qmake/generators/symbian/symmake.cpp
@@ -50,7 +50,7 @@
#include <qdebug.h>
// Included from tools/shared
-#include <symbian/epocroot.h>
+#include <symbian/epocroot_p.h>
#define RESOURCE_DIRECTORY_MMP "/resource/apps"
#define REGISTRATION_RESOURCE_DIRECTORY_HW "/private/10003a3f/import/apps"
@@ -87,10 +87,10 @@ QString SymbianMakefileGenerator::fixPathForMmp(const QString& origPath, const Q
{
static QString epocRootStr;
if (epocRootStr.isEmpty()) {
- epocRootStr = epocRoot();
+ epocRootStr = qt_epocRoot();
QFileInfo efi(epocRootStr);
if (!efi.exists() || epocRootStr.isEmpty()) {
- fprintf(stderr, "Unable to resolve epocRoot '%s' to real dir on current drive, defaulting to '/' for mmp paths\n", qPrintable(epocRoot()));
+ fprintf(stderr, "Unable to resolve epocRoot '%s' to real dir on current drive, defaulting to '/' for mmp paths\n", qPrintable(qt_epocRoot()));
epocRootStr = "/";
} else {
epocRootStr = efi.absoluteFilePath();
@@ -122,7 +122,7 @@ QString SymbianMakefileGenerator::absolutizePath(const QString& origPath)
// Prepend epocroot to any paths beginning with "/epoc32/"
QString resultPath = QDir::fromNativeSeparators(origPath);
if (resultPath.startsWith("/epoc32/", Qt::CaseInsensitive))
- resultPath = QDir::fromNativeSeparators(epocRoot()) + resultPath.mid(1);
+ resultPath = QDir::fromNativeSeparators(qt_epocRoot()) + resultPath.mid(1);
QFileInfo fi(fileInfo(resultPath));
@@ -719,7 +719,7 @@ void SymbianMakefileGenerator::writeMmpFileLibraryPart(QTextStream& t)
// Hacky way to find out what kind of library it is. Check the
// ARMV5 build directory for library type. We default to shared
// library, since that is more common.
- QString udebStaticLibLocation(epocRoot());
+ QString udebStaticLibLocation(qt_epocRoot());
QString urelStaticLibLocation(udebStaticLibLocation);
udebStaticLibLocation += QString("epoc32/release/armv5/udeb/%1.lib").arg(lib);
urelStaticLibLocation += QString("epoc32/release/armv5/urel/%1.lib").arg(lib);
diff --git a/qmake/generators/symbian/symmake_abld.cpp b/qmake/generators/symbian/symmake_abld.cpp
index 7059a52..cd64325 100644
--- a/qmake/generators/symbian/symmake_abld.cpp
+++ b/qmake/generators/symbian/symmake_abld.cpp
@@ -49,7 +49,7 @@
#include <qdebug.h>
// Included from tools/shared
-#include <symbian/epocroot.h>
+#include <symbian/epocroot_p.h>
#define DO_NOTHING_TARGET "do_nothing"
#define CREATE_TEMPS_TARGET "create_temps"
@@ -431,7 +431,7 @@ bool SymbianAbldMakefileGenerator::writeDeploymentTargets(QTextStream &t, bool i
else
t << WINSCW_DEPLOYMENT_TARGET ":" << endl;
- QString remoteTestPath = epocRoot()
+ QString remoteTestPath = qt_epocRoot()
+ QDir::toNativeSeparators(QLatin1String(isRom ? "epoc32/data/z/private/"
: "epoc32/winscw/c/private/"))
+ privateDirUid;
diff --git a/qmake/generators/symbian/symmake_sbsv2.cpp b/qmake/generators/symbian/symmake_sbsv2.cpp
index b3f8ba2..f4a6132 100644
--- a/qmake/generators/symbian/symmake_sbsv2.cpp
+++ b/qmake/generators/symbian/symmake_sbsv2.cpp
@@ -49,7 +49,7 @@
#include <qdebug.h>
// Included from tools/shared
-#include <symbian/epocroot.h>
+#include <symbian/epocroot_p.h>
SymbianSbsv2MakefileGenerator::SymbianSbsv2MakefileGenerator() : SymbianMakefileGenerator() { }
SymbianSbsv2MakefileGenerator::~SymbianSbsv2MakefileGenerator() { }
@@ -82,7 +82,7 @@ void SymbianSbsv2MakefileGenerator::exportFlm()
QDir sourceDir = QDir(QLibraryInfo::location(QLibraryInfo::PrefixPath) + FLM_SOURCE_DIR);
QFileInfoList sourceInfos = sourceDir.entryInfoList(QDir::Files);
- QDir destDir(epocRoot() + FLM_DEST_DIR);
+ QDir destDir(qt_epocRoot() + FLM_DEST_DIR);
if (!destDir.exists()) {
if (destDir.mkpath(destDir.absolutePath()))
generatedDirs << destDir.absolutePath();
@@ -630,7 +630,7 @@ void SymbianSbsv2MakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t
t << endl;
// Write deployment rules
- QString remoteTestPath = epocRoot() + QLatin1String("epoc32/winscw/c/private/") + privateDirUid;
+ QString remoteTestPath = qt_epocRoot() + QLatin1String("epoc32/winscw/c/private/") + privateDirUid;
DeploymentList depList;
//write emulator deployment
@@ -641,7 +641,7 @@ void SymbianSbsv2MakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t
t << "#endif" << endl;
//write ROM deployment
- remoteTestPath = epocRoot() + QLatin1String("epoc32/data/z/private/") + privateDirUid;
+ remoteTestPath = qt_epocRoot() + QLatin1String("epoc32/data/z/private/") + privateDirUid;
depList.clear();
initProjectDeploySymbian(project, depList, remoteTestPath, false, true,
QLatin1String(ROM_DEPLOYMENT_PLATFORM), QString(), generatedDirs, generatedFiles);
diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp
index a8ff306..6f27515 100644
--- a/qmake/generators/win32/msvc_vcproj.cpp
+++ b/qmake/generators/win32/msvc_vcproj.cpp
@@ -67,7 +67,7 @@ QT_END_NAMESPACE
#ifdef Q_OS_WIN32
#include <qt_windows.h>
-#include <windows/registry.h>
+#include <windows/registry_p.h>
QT_BEGIN_NAMESPACE
@@ -119,7 +119,7 @@ DotNET which_dotnet_version()
int installed = 0;
int i = 0;
for(; dotNetCombo[i].version; ++i) {
- QString path = readRegistryKey(HKEY_LOCAL_MACHINE, dotNetCombo[i].regKey);
+ QString path = qt_readRegistryKey(HKEY_LOCAL_MACHINE, dotNetCombo[i].regKey);
if(!path.isEmpty()) {
++installed;
current_version = dotNetCombo[i].version;
@@ -136,7 +136,7 @@ DotNET which_dotnet_version()
i = installed = 0;
for(; dotNetCombo[i].version; ++i) {
- QString productPath = readRegistryKey(HKEY_LOCAL_MACHINE, dotNetCombo[i].regKey).toLower();
+ QString productPath = qt_readRegistryKey(HKEY_LOCAL_MACHINE, dotNetCombo[i].regKey).toLower();
if (productPath.isEmpty())
continue;
QStringList::iterator it;
diff --git a/qmake/project.cpp b/qmake/project.cpp
index fe08b7b..2586c57 100644
--- a/qmake/project.cpp
+++ b/qmake/project.cpp
@@ -64,7 +64,7 @@
#include <stdlib.h>
// Included from tools/shared
-#include <symbian/epocroot.h>
+#include <symbian/epocroot_p.h>
#ifdef Q_OS_WIN32
#define QT_POPEN _popen
@@ -3118,7 +3118,7 @@ QStringList &QMakeProject::values(const QString &_var, QMap<QString, QStringList
false));
} else if (var == QLatin1String("EPOCROOT")) {
if (place[var].isEmpty())
- place[var] = QStringList(epocRoot());
+ place[var] = QStringList(qt_epocRoot());
}
#if defined(Q_OS_WIN32) && defined(Q_CC_MSVC)
else if(var.startsWith(QLatin1String("QMAKE_TARGET."))) {
diff --git a/qmake/qmake.pri b/qmake/qmake.pri
index 7cf94cb..8f46a2e 100644
--- a/qmake/qmake.pri
+++ b/qmake/qmake.pri
@@ -36,8 +36,8 @@ HEADERS += project.h property.h generators/makefile.h \
generators/symbian/symmake_abld.h \
generators/symbian/symmake_sbsv2.h \
generators/symbian/initprojectdeploy_symbian.h \
- windows/registry.h \
- symbian/epocroot.h
+ windows/registry_p.h \
+ symbian/epocroot_p.h
contains(QT_EDITION, OpenSource) {
DEFINES += QMAKE_OPENSOURCE_EDITION
diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
index acacf7c..898b860 100644
--- a/src/corelib/global/qlibraryinfo.cpp
+++ b/src/corelib/global/qlibraryinfo.cpp
@@ -63,7 +63,7 @@ QT_END_NAMESPACE
#endif
#ifdef QLIBRARYINFO_EPOCROOT
-# include "symbian/epocroot.h"
+# include "symbian/epocroot_p.h"
#endif
#include "qconfig.cpp"
@@ -442,7 +442,7 @@ QLibraryInfo::location(LibraryLocation loc)
// $${EPOCROOT} is a special case, resolve it similarly to qmake.
QRegExp epocrootMatcher(QLatin1String("\\$\\$\\{EPOCROOT\\}"));
if ((rep = epocrootMatcher.indexIn(ret)) != -1)
- ret.replace(rep, epocrootMatcher.matchedLength(), epocRoot());
+ ret.replace(rep, epocrootMatcher.matchedLength(), qt_epocRoot());
#endif
config->endGroup();
diff --git a/tools/configure/configure.pro b/tools/configure/configure.pro
index 810f006..0a49fbe 100644
--- a/tools/configure/configure.pro
+++ b/tools/configure/configure.pro
@@ -63,8 +63,8 @@ HEADERS = configureapp.h environment.h tools.h\
$$QT_SOURCE_TREE/src/corelib/tools/qunicodetables_p.h \
$$QT_SOURCE_TREE/src/corelib/xml/qxmlstream.h \
$$QT_SOURCE_TREE/src/corelib/xml/qxmlutils_p.h \
- $$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 = main.cpp configureapp.cpp environment.cpp tools.cpp \
diff --git a/tools/configure/environment.cpp b/tools/configure/environment.cpp
index 03fd0cc..1866ef4 100644
--- a/tools/configure/environment.cpp
+++ b/tools/configure/environment.cpp
@@ -60,8 +60,8 @@ using namespace std;
#include <qt_windows.h>
#endif
-#include <symbian/epocroot.h> // from tools/shared
-#include <windows/registry.h> // from tools/shared
+#include <symbian/epocroot_p.h> // from tools/shared
+#include <windows/registry_p.h> // from tools/shared
QT_BEGIN_NAMESPACE
@@ -163,7 +163,7 @@ Compiler Environment::detectCompiler()
QString paths = qgetenv("PATH");
QStringList pathlist = paths.toLower().split(";");
for(int i = 0; compiler_info[i].compiler; ++i) {
- QString productPath = readRegistryKey(HKEY_LOCAL_MACHINE, compiler_info[i].regKey).toLower();
+ QString productPath = qt_readRegistryKey(HKEY_LOCAL_MACHINE, compiler_info[i].regKey).toLower();
if (productPath.length()) {
QStringList::iterator it;
for(it = pathlist.begin(); it != pathlist.end(); ++it) {
@@ -466,8 +466,8 @@ bool Environment::rmdir(const QString &name)
QString Environment::symbianEpocRoot()
{
- // Call function defined in tools/shared/symbian/epocroot.h
- return ::epocRoot();
+ // Call function defined in tools/shared/symbian/epocroot_p.h
+ return ::qt_epocRoot();
}
QT_END_NAMESPACE
diff --git a/tools/shared/symbian/epocroot.cpp b/tools/shared/symbian/epocroot.cpp
index 9d7d465..eabae98 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 117836e..f0f0dab 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 9846485..c97b593 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 2373839..48e9ae6 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 3896527..4aae5f9 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