From 4b380543cc973d575a3ed0c77918adbe5b6133f0 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Fri, 19 Nov 2010 14:53:29 +0200 Subject: Fixed namespace issues related to epocroot.cpp Task-number: QTBUG-15393 Reviewed-by: axis --- .../symbian/initprojectdeploy_symbian.cpp | 12 ++-- qmake/generators/symbian/symbiancommon.cpp | 4 +- qmake/generators/symbian/symmake.cpp | 10 +-- qmake/generators/symbian/symmake_abld.cpp | 4 +- qmake/generators/symbian/symmake_sbsv2.cpp | 8 +-- qmake/generators/win32/msvc_vcproj.cpp | 6 +- qmake/project.cpp | 4 +- qmake/qmake.pri | 4 +- src/corelib/global/qlibraryinfo.cpp | 4 +- tools/configure/configure.pro | 4 +- tools/configure/environment.cpp | 10 +-- tools/shared/symbian/epocroot.cpp | 17 ++--- tools/shared/symbian/epocroot.h | 67 ----------------- tools/shared/symbian/epocroot.pri | 4 +- tools/shared/symbian/epocroot_p.h | 83 ++++++++++++++++++++++ tools/shared/windows/registry.cpp | 7 +- tools/shared/windows/registry.h | 64 ----------------- tools/shared/windows/registry_p.h | 80 +++++++++++++++++++++ 18 files changed, 214 insertions(+), 178 deletions(-) delete mode 100644 tools/shared/symbian/epocroot.h create mode 100644 tools/shared/symbian/epocroot_p.h delete mode 100644 tools/shared/windows/registry.h create mode 100644 tools/shared/windows/registry_p.h 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 // Included from tools/shared -#include +#include #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 // Included from tools/shared -#include +#include #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 // Included from tools/shared -#include +#include #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 // Included from tools/shared -#include +#include #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 // Included from tools/shared -#include +#include 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 -#include +#include 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 // Included from tools/shared -#include +#include #ifdef Q_OS_WIN32 #define QT_POPEN _popen @@ -3118,7 +3118,7 @@ QStringList &QMakeProject::values(const QString &_var, QMapendGroup(); 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 #endif -#include // from tools/shared -#include // from tools/shared +#include // from tools/shared +#include // 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 - #include #include -#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.h b/tools/shared/symbian/epocroot.h deleted file mode 100644 index 9846485..0000000 --- a/tools/shared/symbian/epocroot.h +++ /dev/null @@ -1,67 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the qmake application of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef SYMBIAN_EPOCROOT_H -#define SYMBIAN_EPOCROOT_H - -#include - -/** - * Determine the epoc root for the currently active SDK. - * - * The algorithm used is as follows: - * 1. If environment variable EPOCROOT is set and points to an existent - * directory, this is returned. - * 2. The location of devices.xml is specified by a registry key. If this - * file exists, it is parsed. - * 3. If the EPOCDEVICE environment variable is set and a corresponding - * entry is found in devices.xml, and its epocroot value points to an - * existent directory, it is returned. - * 4. If a device element marked as default is found in devices.xml and its - * epocroot value points to an existent directory, this is returned. - * 5. An empty string is returned. - * - * Any return value other than the empty string therefore is guaranteed to - * point to an existent directory. - */ -QString epocRoot(); - -#endif // EPOCROOT_H 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_p.h b/tools/shared/symbian/epocroot_p.h new file mode 100644 index 0000000..c97b593 --- /dev/null +++ b/tools/shared/symbian/epocroot_p.h @@ -0,0 +1,83 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the qmake application of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#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 + +QT_BEGIN_NAMESPACE + +/** + * Determine the epoc root for the currently active SDK. + * + * The algorithm used is as follows: + * 1. If environment variable EPOCROOT is set and points to an existent + * directory, this is returned. + * 2. The location of devices.xml is specified by a registry key. If this + * file exists, it is parsed. + * 3. If the EPOCDEVICE environment variable is set and a corresponding + * entry is found in devices.xml, and its epocroot value points to an + * existent directory, it is returned. + * 4. If a device element marked as default is found in devices.xml and its + * epocroot value points to an existent directory, this is returned. + * 5. An empty string is returned. + * + * Any return value other than the empty string therefore is guaranteed to + * point to an existent directory. + */ +QString qt_epocRoot(); + +QT_END_NAMESPACE + +#endif // QT_SYMBIAN_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 -#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.h deleted file mode 100644 index 3896527..0000000 --- a/tools/shared/windows/registry.h +++ /dev/null @@ -1,64 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the qmake application of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef WINDOWS_REGISTRY_H -#define WINDOWS_REGISTRY_H - -#include - -#ifdef Q_OS_WIN32 - #include -#else - typedef void* HKEY; -#endif - -#include - -/** - * Read a value from the Windows registry. - * - * If the key is not found, or the registry cannot be accessed (for example - * if this code is compiled for a platform other than Windows), a null - * string is returned. - */ -QString readRegistryKey(HKEY parentHandle, const QString &rSubkey); - -#endif // WINDOWS_REGISTRY_H diff --git a/tools/shared/windows/registry_p.h b/tools/shared/windows/registry_p.h new file mode 100644 index 0000000..4aae5f9 --- /dev/null +++ b/tools/shared/windows/registry_p.h @@ -0,0 +1,80 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the qmake application of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#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 + +#ifdef Q_OS_WIN32 + #include +#else + typedef void* HKEY; +#endif + +#include + +/** + * Read a value from the Windows registry. + * + * If the key is not found, or the registry cannot be accessed (for example + * if this code is compiled for a platform other than Windows), a null + * string is returned. + */ +QString qt_readRegistryKey(HKEY parentHandle, const QString &rSubkey); + +QT_END_NAMESPACE + +#endif // QT_WINDOWS_REGISTRY_H + -- cgit v0.12