From 7f8edfb41c41a0008048b51b2e870994878c4fcd Mon Sep 17 00:00:00 2001 From: Daniel Teske <daniel.teske@digia.com> Date: Wed, 2 Oct 2013 12:02:29 +0200 Subject: [PATCH] AndroidPlugin: Remove dependency on qbs plugin Task-number: QTCREATORBUG-10288 Change-Id: I2328076a7b5179e4d63becb616433627270089c4 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> --- src/plugins/android/android.pro | 8 -- src/plugins/android/android.qbs | 15 ---- src/plugins/android/android_dependencies.pri | 4 - src/plugins/android/androidplugin.cpp | 3 - .../android/androidqbspropertyprovider.cpp | 80 ------------------- .../android/androidqbspropertyprovider.h | 48 ----------- 6 files changed, 158 deletions(-) delete mode 100644 src/plugins/android/androidqbspropertyprovider.cpp delete mode 100644 src/plugins/android/androidqbspropertyprovider.h diff --git a/src/plugins/android/android.pro b/src/plugins/android/android.pro index 31a3a81a359..93df5b12456 100644 --- a/src/plugins/android/android.pro +++ b/src/plugins/android/android.pro @@ -102,13 +102,5 @@ FORMS += \ androiddevicedialog.ui \ androiddeployqtwidget.ui -exists(../../shared/qbs/qbs.pro) { - HEADERS += \ - androidqbspropertyprovider.h - SOURCES += \ - androidqbspropertyprovider.cpp - DEFINES += HAVE_QBS -} - RESOURCES = android.qrc DEFINES += ANDROID_LIBRARY diff --git a/src/plugins/android/android.qbs b/src/plugins/android/android.qbs index a5756505b6d..4f539107187 100644 --- a/src/plugins/android/android.qbs +++ b/src/plugins/android/android.qbs @@ -8,10 +8,6 @@ QtcPlugin { Depends { name: "Core" } Depends { name: "ProjectExplorer" } Depends { name: "Qt4ProjectManager" } - Depends { - name: "QbsProjectManager" - condition: project.buildQbsProjectManager - } Depends { name: "Debugger" } Depends { name: "QmlDebug" } Depends { name: "QtSupport" } @@ -23,8 +19,6 @@ QtcPlugin { property bool enable: false pluginspecreplacements: ({"ANDROID_EXPERIMENTAL_STR": (enable ? "false": "true")}) - cpp.defines: base.concat(project.buildQbsProjectManager ? ['HAVE_QBS'] : []) - files: [ "addnewavddialog.ui", "android.qrc", @@ -119,13 +113,4 @@ QtcPlugin { "javaparser.cpp", "javaparser.h", ] - - Group { - name: "Qbs Support" - condition: project.buildQbsProjectManager - files: [ - "androidqbspropertyprovider.cpp", - "androidqbspropertyprovider.h", - ] - } } diff --git a/src/plugins/android/android_dependencies.pri b/src/plugins/android/android_dependencies.pri index c21226f6f27..18c797bc2a3 100644 --- a/src/plugins/android/android_dependencies.pri +++ b/src/plugins/android/android_dependencies.pri @@ -10,7 +10,3 @@ QTC_PLUGIN_DEPENDS += \ QTC_LIB_DEPENDS += \ utils - -exists(../../shared/qbs/qbs.pro): \ - QTC_PLUGIN_DEPENDS += \ - qbsprojectmanager diff --git a/src/plugins/android/androidplugin.cpp b/src/plugins/android/androidplugin.cpp index 8017773e68d..d9b897f6998 100644 --- a/src/plugins/android/androidplugin.cpp +++ b/src/plugins/android/androidplugin.cpp @@ -104,9 +104,6 @@ bool AndroidPlugin::initialize(const QStringList &arguments, QString *errorMessa connect(ProjectExplorer::DeviceManager::instance(), SIGNAL(devicesLoaded()), this, SLOT(updateDevice())); -#ifdef HAVE_QBS - addAutoReleasedObject(new Internal::AndroidQBSPropertyProvider); -#endif return true; } diff --git a/src/plugins/android/androidqbspropertyprovider.cpp b/src/plugins/android/androidqbspropertyprovider.cpp deleted file mode 100644 index b5a05d51133..00000000000 --- a/src/plugins/android/androidqbspropertyprovider.cpp +++ /dev/null @@ -1,80 +0,0 @@ -/************************************************************************** -** -** Copyright (c) 2013 BogDan Vatra <bog_dan_ro@yahoo.com> -** 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. -** -****************************************************************************/ - -#include "androidqbspropertyprovider.h" - -#include "androidconfigurations.h" -#include "androidconstants.h" -#include "androidgdbserverkitinformation.h" -#include "androidtoolchain.h" - -#include <qbsprojectmanager/qbsconstants.h> - -namespace Android { -namespace Internal { - -// QBS Android specific settings: -const QLatin1String CPP_ANDROID_SDK_PATH("cpp.androidSdkPath"); -const QLatin1String CPP_ANDROID_NDK_PATH("cpp.androidNdkPath"); -const QLatin1String CPP_ANDROID_TOOLCHAIN_VERSION("cpp.androidToolchainVersion"); -const QLatin1String CPP_ANDROID_TOOLCHAIN_HOST("cpp.androidToolchainHost"); -const QLatin1String CPP_ANDROID_TOOLCHAIN_PREFIX("cpp.androidToolchainPrefix"); -const QLatin1String CPP_ANDROID_GDBSERVER("cpp.androidGdbServer"); - -bool AndroidQBSPropertyProvider::canHandle(const ProjectExplorer::Kit *kit) const -{ - return AndroidGdbServerKitInformation::isAndroidKit(kit); -} - -QVariantMap AndroidQBSPropertyProvider::properties(const ProjectExplorer::Kit *kit, const QVariantMap &defaultData) const -{ - Q_ASSERT(AndroidGdbServerKitInformation::isAndroidKit(kit)); - - QVariantMap qbsProperties = defaultData; - QStringList targetOSs(defaultData[QLatin1String(QbsProjectManager::Constants::QBS_TARGETOS)].toStringList()); - if (!targetOSs.contains(QLatin1String("android"))) - qbsProperties[QLatin1String(QbsProjectManager::Constants::QBS_TARGETOS)] = QStringList() << QLatin1String("android") - << targetOSs; - - const AndroidConfig &config = AndroidConfigurations::instance().config(); - AndroidToolChain *tc = static_cast<AndroidToolChain*>(ProjectExplorer::ToolChainKitInformation::toolChain(kit)); - qbsProperties[CPP_ANDROID_SDK_PATH] = config.sdkLocation.toString(); - qbsProperties[CPP_ANDROID_NDK_PATH] = config.ndkLocation.toString(); - qbsProperties[CPP_ANDROID_TOOLCHAIN_VERSION] = tc->ndkToolChainVersion(); - qbsProperties[CPP_ANDROID_TOOLCHAIN_HOST] = config.toolchainHost; - qbsProperties[CPP_ANDROID_TOOLCHAIN_PREFIX] = AndroidConfigurations::toolchainPrefix(tc->targetAbi().architecture()); - qbsProperties[CPP_ANDROID_GDBSERVER] = tc->suggestedGdbServer().toString(); - // TODO: Find a way to extract ANDROID_ARCHITECTURE from Qt mkspec -// qbsProperties[QbsProjectManager::Constants::QBS_ARCHITECTURE] = ... - - return qbsProperties; -} - -} // namespace Internal -} // namespace Android diff --git a/src/plugins/android/androidqbspropertyprovider.h b/src/plugins/android/androidqbspropertyprovider.h deleted file mode 100644 index cebd6386657..00000000000 --- a/src/plugins/android/androidqbspropertyprovider.h +++ /dev/null @@ -1,48 +0,0 @@ -/************************************************************************** -** -** Copyright (c) 2013 BogDan Vatra <bog_dan_ro@yahoo.com> -** 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 ANDROIDQBSPROPERTYPROVIDER_H -#define ANDROIDQBSPROPERTYPROVIDER_H - -#include <qbsprojectmanager/propertyprovider.h> - -namespace Android { -namespace Internal { - -class AndroidQBSPropertyProvider : public QbsProjectManager::PropertyProvider -{ -public: - virtual bool canHandle(const ProjectExplorer::Kit *kit) const; - virtual QVariantMap properties(const ProjectExplorer::Kit *kit, const QVariantMap &defaultData) const; -}; - -} // namespace Internal -} // namespace Android - -#endif // ANDROIDQBSPROPERTYPROVIDER_H -- GitLab