diff options
author | BogDan Vatra <bogdan@kde.org> | 2013-07-23 14:13:26 +0300 |
---|---|---|
committer | BogDan Vatra <bogdan@kde.org> | 2013-08-19 15:28:57 +0200 |
commit | 92a5402f657c40832db4efd95bddb88a4f1933d3 (patch) | |
tree | 7f3e52e12629d2ac0ed3df95cd2161c5b837cfc1 /src/plugins | |
parent | 8a28b2f042818f3c2560f5cbd308abfaa8e552df (diff) | |
download | qt-creator-92a5402f657c40832db4efd95bddb88a4f1933d3.tar.gz |
Make QBS setings constants accessible for other plugins.
Change-Id: I7e66136d2b75a932b981713ccc27e3e69fd44baa
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/qbsprojectmanager/defaultpropertyprovider.cpp | 24 | ||||
-rw-r--r-- | src/plugins/qbsprojectmanager/qbsconstants.h | 61 | ||||
-rw-r--r-- | src/plugins/qbsprojectmanager/qbsprojectmanager.pro | 3 |
3 files changed, 65 insertions, 23 deletions
diff --git a/src/plugins/qbsprojectmanager/defaultpropertyprovider.cpp b/src/plugins/qbsprojectmanager/defaultpropertyprovider.cpp index 201bd1af3f..9557a99756 100644 --- a/src/plugins/qbsprojectmanager/defaultpropertyprovider.cpp +++ b/src/plugins/qbsprojectmanager/defaultpropertyprovider.cpp @@ -28,6 +28,7 @@ ****************************************************************************/ #include "defaultpropertyprovider.h" +#include "qbsconstants.h" #include <projectexplorer/kit.h> #include <projectexplorer/kitinformation.h> @@ -38,29 +39,8 @@ #include <QFileInfo> -// Qt related settings: -const char QTCORE_BINPATH[] = "Qt.core.binPath"; -const char QTCORE_BUILDVARIANT[] = "Qt.core.buildVariant"; -const char QTCORE_DOCPATH[] = "Qt.core.docPath"; -const char QTCORE_INCPATH[] = "Qt.core.incPath"; -const char QTCORE_LIBPATH[] = "Qt.core.libPath"; -const char QTCORE_VERSION[] = "Qt.core.version"; -const char QTCORE_NAMESPACE[] = "Qt.core.namespace"; -const char QTCORE_LIBINFIX[] = "Qt.core.libInfix"; -const char QTCORE_MKSPEC[] = "Qt.core.mkspecPath"; -const char QTCORE_FRAMEWORKBUILD[] = "Qt.core.frameworkBuild"; - - -// Toolchain related settings: -const char QBS_TARGETOS[] = "qbs.targetOS"; -const char QBS_SYSROOT[] = "qbs.sysroot"; -const char QBS_ARCHITECTURE[] = "qbs.architecture"; -const char QBS_ENDIANNESS[] = "qbs.endianness"; -const char QBS_TOOLCHAIN[] = "qbs.toolchain"; -const char CPP_TOOLCHAINPATH[] = "cpp.toolchainInstallPath"; -const char CPP_COMPILERNAME[] = "cpp.compilerName"; - namespace QbsProjectManager { +using namespace Constants; QVariantMap DefaultPropertyProvider::properties(const ProjectExplorer::Kit *k, const QVariantMap &defaultData) const { diff --git a/src/plugins/qbsprojectmanager/qbsconstants.h b/src/plugins/qbsprojectmanager/qbsconstants.h new file mode 100644 index 0000000000..c5d08d0f1f --- /dev/null +++ b/src/plugins/qbsprojectmanager/qbsconstants.h @@ -0,0 +1,61 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of Qt Creator. +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** 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, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +****************************************************************************/ + +#ifndef QBSCONSTANTS_H +#define QBSCONSTANTS_H + +namespace QbsProjectManager { +namespace Constants { + +// Qt related settings: +const char QTCORE_BINPATH[] = "Qt.core.binPath"; +const char QTCORE_BUILDVARIANT[] = "Qt.core.buildVariant"; +const char QTCORE_DOCPATH[] = "Qt.core.docPath"; +const char QTCORE_INCPATH[] = "Qt.core.incPath"; +const char QTCORE_LIBPATH[] = "Qt.core.libPath"; +const char QTCORE_VERSION[] = "Qt.core.version"; +const char QTCORE_NAMESPACE[] = "Qt.core.namespace"; +const char QTCORE_LIBINFIX[] = "Qt.core.libInfix"; +const char QTCORE_MKSPEC[] = "Qt.core.mkspecPath"; +const char QTCORE_FRAMEWORKBUILD[] = "Qt.core.frameworkBuild"; + + +// Toolchain related settings: +const char QBS_TARGETOS[] = "qbs.targetOS"; +const char QBS_SYSROOT[] = "qbs.sysroot"; +const char QBS_ARCHITECTURE[] = "qbs.architecture"; +const char QBS_ENDIANNESS[] = "qbs.endianness"; +const char QBS_TOOLCHAIN[] = "qbs.toolchain"; +const char CPP_TOOLCHAINPATH[] = "cpp.toolchainInstallPath"; +const char CPP_COMPILERNAME[] = "cpp.compilerName"; + +} // namespace Constants +} // namespace QbsProjectManager + +#endif // QBSCONSTANTS_H diff --git a/src/plugins/qbsprojectmanager/qbsprojectmanager.pro b/src/plugins/qbsprojectmanager/qbsprojectmanager.pro index 1a907b1685..b8e653a1df 100644 --- a/src/plugins/qbsprojectmanager/qbsprojectmanager.pro +++ b/src/plugins/qbsprojectmanager/qbsprojectmanager.pro @@ -33,7 +33,8 @@ HEADERS = \ qbsprojectmanagerplugin.h \ qbspropertylineedit.h \ qbsrunconfiguration.h \ - qbsstep.h + qbsstep.h \ + qbsconstants.h SOURCES = \ defaultpropertyprovider.cpp \ |