diff options
10 files changed, 82 insertions, 38 deletions
diff --git a/installerbuilder/libinstaller/component.h b/installerbuilder/libinstaller/component.h index 192ffecf0..90a059b6f 100644 --- a/installerbuilder/libinstaller/component.h +++ b/installerbuilder/libinstaller/component.h @@ -26,6 +26,7 @@ #ifndef COMPONENT_H #define COMPONENT_H +#include "constants.h" #include "component_p.h" #include "qinstallerglobal.h" diff --git a/installerbuilder/libinstaller/constants.h b/installerbuilder/libinstaller/constants.h new file mode 100644 index 000000000..621a2340f --- /dev/null +++ b/installerbuilder/libinstaller/constants.h @@ -0,0 +1,70 @@ +/************************************************************************** +** +** This file is part of Qt SDK** +** +** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).* +** +** Contact: Nokia Corporation qt-info@nokia.com** +** +** GNU Lesser General Public License Usage +** +** 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 are unsure which license is appropriate for your use, please contact +** (qt-info@nokia.com). +** +**************************************************************************/ +#ifndef CONSTANTS_H +#define CONSTANTS_H + +#include <QtCore/QString> + +namespace QInstaller { + +// constants used throughout several classes +static const QLatin1String scTrue("true"); +static const QLatin1String scFalse("false"); + +static const QLatin1String scName("Name"); +static const QLatin1String scVersion("Version"); +static const QLatin1String scReplaces("Replaces"); +static const QLatin1String scImportant("Important"); +static const QLatin1String scTargetDir("TargetDir"); +static const QLatin1String scReleaseDate("ReleaseDate"); +static const QLatin1String scDescription("Description"); +static const QLatin1String scDisplayName("DisplayName"); +static const QLatin1String scDependencies("Dependencies"); +static const QLatin1String scNewComponent("NewComponent"); +static const QLatin1String scRepositories("Repositories"); +static const QLatin1String scCompressedSize("CompressedSize"); +static const QLatin1String scInstalledVersion("InstalledVersion"); +static const QLatin1String scUncompressedSize("UncompressedSize"); +static const QLatin1String scRequiresAdminRights("RequiresAdminRights"); + +// constants used throughout the components class +static const QLatin1String scVirtual("Virtual"); +static const QLatin1String scInstallPriority("InstallPriority"); +static const QLatin1String scSortingPriority("SortingPriority"); + +// constants used throughout the settings and package manager core class +static const QLatin1String scTitle("Title"); +static const QLatin1String scPublisher("Publisher"); +static const QLatin1String scRunProgram("RunProgram"); +static const QLatin1String scStartMenuDir("StartMenuDir"); +static const QLatin1String scRemoveTargetDir("RemoveTargetDir"); +static const QLatin1String scMaintenanceTitle("MaintenanceTitle"); +static const QLatin1String scRunProgramDescription("RunProgramDescription"); +static const QLatin1String scTargetConfigurationFile("TargetConfigurationFile"); + +} + +#endif // CONSTANTS_H diff --git a/installerbuilder/libinstaller/getrepositorymetainfojob.cpp b/installerbuilder/libinstaller/getrepositorymetainfojob.cpp index 5455f1b2c..0e626a882 100644 --- a/installerbuilder/libinstaller/getrepositorymetainfojob.cpp +++ b/installerbuilder/libinstaller/getrepositorymetainfojob.cpp @@ -32,6 +32,7 @@ **************************************************************************/ #include "getrepositorymetainfojob.h" +#include "constants.h" #include "common/errors.h" #include "common/utils.h" #include "cryptosignatureverifier.h" diff --git a/installerbuilder/libinstaller/libinstaller.pro b/installerbuilder/libinstaller/libinstaller.pro index b4a2bd440..ffe818c37 100644 --- a/installerbuilder/libinstaller/libinstaller.pro +++ b/installerbuilder/libinstaller/libinstaller.pro @@ -93,7 +93,8 @@ HEADERS += $$PWD/packagemanagercore.h \ registerdefaultdebuggeroperation.h \ updatecreatorsettingsfrom21to22operation.h \ qprocesswrapper.h \ - qsettingswrapper.h + qsettingswrapper.h \ + constants.h SOURCES += $$PWD/packagemanagercore.cpp \ $$PWD/packagemanagercore_p.cpp \ diff --git a/installerbuilder/libinstaller/qinstallerglobal.h b/installerbuilder/libinstaller/qinstallerglobal.h index 12e51625d..e7a088779 100644 --- a/installerbuilder/libinstaller/qinstallerglobal.h +++ b/installerbuilder/libinstaller/qinstallerglobal.h @@ -32,8 +32,6 @@ #include <KDUpdater/UpdateOperation> #include <KDUpdater/PackagesInfo> -#include <QtCore/QString> - QT_BEGIN_NAMESPACE class QScriptContext; class QScriptEngine; @@ -75,41 +73,6 @@ QScriptValue qInstallerComponentByName(QScriptContext *context, QScriptEngine *e QScriptValue qDesktopServicesOpenUrl(QScriptContext *context, QScriptEngine *engine); QScriptValue qDesktopServicesDisplayName(QScriptContext *context, QScriptEngine *engine); QScriptValue qDesktopServicesStorageLocation(QScriptContext *context, QScriptEngine *engine); - -// constants used throughout several classes -static const QLatin1String scTrue("true"); -static const QLatin1String scFalse("false"); - -static const QLatin1String scName("Name"); -static const QLatin1String scVersion("Version"); -static const QLatin1String scReplaces("Replaces"); -static const QLatin1String scImportant("Important"); -static const QLatin1String scTargetDir("TargetDir"); -static const QLatin1String scReleaseDate("ReleaseDate"); -static const QLatin1String scDescription("Description"); -static const QLatin1String scDisplayName("DisplayName"); -static const QLatin1String scDependencies("Dependencies"); -static const QLatin1String scNewComponent("NewComponent"); -static const QLatin1String scRepositories("Repositories"); -static const QLatin1String scCompressedSize("CompressedSize"); -static const QLatin1String scInstalledVersion("InstalledVersion"); -static const QLatin1String scUncompressedSize("UncompressedSize"); -static const QLatin1String scRequiresAdminRights("RequiresAdminRights"); - -// constants used throughout the components class -static const QLatin1String scVirtual("Virtual"); -static const QLatin1String scInstallPriority("InstallPriority"); -static const QLatin1String scSortingPriority("SortingPriority"); - -// constants used throughout the settings and package manager core class -static const QLatin1String scTitle("Title"); -static const QLatin1String scPublisher("Publisher"); -static const QLatin1String scRunProgram("RunProgram"); -static const QLatin1String scStartMenuDir("StartMenuDir"); -static const QLatin1String scRemoveTargetDir("RemoveTargetDir"); -static const QLatin1String scMaintenanceTitle("MaintenanceTitle"); -static const QLatin1String scRunProgramDescription("RunProgramDescription"); -static const QLatin1String scTargetConfigurationFile("TargetConfigurationFile"); } #endif // QINSTALLER_GLOBAL_H diff --git a/installerbuilder/libinstaller/registerdefaultdebuggeroperation.cpp b/installerbuilder/libinstaller/registerdefaultdebuggeroperation.cpp index 5affc8688..33f6839ea 100644 --- a/installerbuilder/libinstaller/registerdefaultdebuggeroperation.cpp +++ b/installerbuilder/libinstaller/registerdefaultdebuggeroperation.cpp @@ -31,6 +31,8 @@ ** **************************************************************************/ #include "registerdefaultdebuggeroperation.h" + +#include "constants.h" #include "persistentsettings.h" #include "packagemanagercore.h" #include "qtcreator_constants.h" diff --git a/installerbuilder/libinstaller/registerqtv2operation.cpp b/installerbuilder/libinstaller/registerqtv2operation.cpp index 201a92fe2..5626a3e38 100644 --- a/installerbuilder/libinstaller/registerqtv2operation.cpp +++ b/installerbuilder/libinstaller/registerqtv2operation.cpp @@ -31,6 +31,8 @@ ** **************************************************************************/ #include "registerqtv2operation.h" + +#include "constants.h" #include "packagemanagercore.h" #include "qtcreator_constants.h" diff --git a/installerbuilder/libinstaller/registertoolchainoperation.cpp b/installerbuilder/libinstaller/registertoolchainoperation.cpp index a7b100d40..e2b4f908f 100644 --- a/installerbuilder/libinstaller/registertoolchainoperation.cpp +++ b/installerbuilder/libinstaller/registertoolchainoperation.cpp @@ -32,6 +32,7 @@ **************************************************************************/ #include "registertoolchainoperation.h" +#include "constants.h" #include "persistentsettings.h" #include "packagemanagercore.h" #include "qtcreator_constants.h" diff --git a/installerbuilder/libinstaller/settings.h b/installerbuilder/libinstaller/settings.h index 95fe2eec6..23c28521f 100644 --- a/installerbuilder/libinstaller/settings.h +++ b/installerbuilder/libinstaller/settings.h @@ -26,6 +26,7 @@ #ifndef SETTINGS_H #define SETTINGS_H +#include "constants.h" #include "installer_global.h" #include <QtCore/QCoreApplication> diff --git a/installerbuilder/libinstaller/updatecreatorsettingsfrom21to22operation.cpp b/installerbuilder/libinstaller/updatecreatorsettingsfrom21to22operation.cpp index a3514f866..db3c797f1 100644 --- a/installerbuilder/libinstaller/updatecreatorsettingsfrom21to22operation.cpp +++ b/installerbuilder/libinstaller/updatecreatorsettingsfrom21to22operation.cpp @@ -31,6 +31,8 @@ ** **************************************************************************/ #include "updatecreatorsettingsfrom21to22operation.h" + +#include "constants.h" #include "registerdefaultdebuggeroperation.h" #include "registertoolchainoperation.h" #include "qtcreatorpersistentsettings.h" |