forked from qt-creator/qt-creator
Qbs: move both Qbs settings pages into a single page in Build & Run
Now all build system settings (qmake, CMake, Qbs) are in the same place. Change-Id: I006168de6ebb1a93b141e81f00788fa7097ab6fd Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -1,76 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** 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 The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "qbsinfopage.h"
|
||||
#include "ui_qbsinfowidget.h"
|
||||
|
||||
#include "qbsprojectmanagerconstants.h"
|
||||
|
||||
#include <qbs.h>
|
||||
|
||||
namespace QbsProjectManager {
|
||||
namespace Internal {
|
||||
|
||||
class QbsInfoWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
QbsInfoWidget(QWidget *parent = 0) : QWidget(parent)
|
||||
{
|
||||
m_ui.setupUi(this);
|
||||
m_ui.versionValueLabel->setText(qbs::LanguageInfo::qbsVersion());
|
||||
}
|
||||
|
||||
Ui::QbsInfoWidget m_ui;
|
||||
};
|
||||
|
||||
|
||||
QbsInfoPage::QbsInfoPage(QObject *parent) : Core::IOptionsPage(parent), m_widget(nullptr)
|
||||
{
|
||||
setId("AB.QbsInfo");
|
||||
setDisplayName(QCoreApplication::translate("QbsProjectManager", "Version Info"));
|
||||
setCategory(Constants::QBS_SETTINGS_CATEGORY);
|
||||
setDisplayCategory(QCoreApplication::translate("QbsProjectManager",
|
||||
Constants::QBS_SETTINGS_TR_CATEGORY));
|
||||
setCategoryIcon(Utils::Icon(Constants::QBS_SETTINGS_CATEGORY_ICON));
|
||||
}
|
||||
|
||||
QWidget *QbsInfoPage::widget()
|
||||
{
|
||||
if (!m_widget)
|
||||
m_widget = new QbsInfoWidget;
|
||||
return m_widget;
|
||||
}
|
||||
|
||||
void QbsInfoPage::finish()
|
||||
{
|
||||
delete m_widget;
|
||||
m_widget = nullptr;
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace QbsProjectManager
|
||||
|
||||
#include "qbsinfopage.moc"
|
@@ -1,48 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** 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 The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <coreplugin/dialogs/ioptionspage.h>
|
||||
|
||||
namespace QbsProjectManager {
|
||||
namespace Internal {
|
||||
class QbsInfoWidget;
|
||||
|
||||
class QbsInfoPage : public Core::IOptionsPage
|
||||
{
|
||||
public:
|
||||
QbsInfoPage(QObject *parent = nullptr);
|
||||
|
||||
private:
|
||||
QWidget *widget() override;
|
||||
void apply() override { };
|
||||
void finish() override;
|
||||
|
||||
QbsInfoWidget *m_widget;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace QbsProjectManager
|
@@ -1,35 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>QbsProjectManager::Internal::QbsInfoWidget</class>
|
||||
<widget class="QWidget" name="QbsProjectManager::Internal::QbsInfoWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>229</width>
|
||||
<height>40</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="versionKeyLabel">
|
||||
<property name="text">
|
||||
<string>Qbs version:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="versionValueLabel">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
@@ -33,6 +33,7 @@
|
||||
#include <coreplugin/icore.h>
|
||||
#include <projectexplorer/kit.h>
|
||||
#include <projectexplorer/kitmanager.h>
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
@@ -67,12 +68,12 @@ QbsProfilesSettingsPage::QbsProfilesSettingsPage(QObject *parent)
|
||||
, m_useQtcSettingsDirPersistent(QbsProjectManagerSettings::useCreatorSettingsDirForQbs())
|
||||
|
||||
{
|
||||
setId("AA.QbsProfiles");
|
||||
setDisplayName(QCoreApplication::translate("QbsProjectManager", "Profiles"));
|
||||
setCategory(Constants::QBS_SETTINGS_CATEGORY);
|
||||
setDisplayCategory(QCoreApplication::translate("QbsProjectManager",
|
||||
Constants::QBS_SETTINGS_TR_CATEGORY));
|
||||
setCategoryIcon(Utils::Icon(Constants::QBS_SETTINGS_CATEGORY_ICON));
|
||||
setId("Y.QbsProfiles");
|
||||
setDisplayName(QCoreApplication::translate("QbsProjectManager", "Qbs"));
|
||||
setCategory(ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_CATEGORY);
|
||||
setDisplayCategory(QCoreApplication::translate("ProjectExplorer",
|
||||
ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_TR_CATEGORY));
|
||||
setCategoryIcon(Utils::Icon(ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_CATEGORY_ICON));
|
||||
}
|
||||
|
||||
QWidget *QbsProfilesSettingsPage::widget()
|
||||
@@ -105,6 +106,7 @@ QbsProfilesSettingsWidget::QbsProfilesSettingsWidget(QWidget *parent)
|
||||
m_model.setEditable(false);
|
||||
m_ui.setupUi(this);
|
||||
m_ui.settingsDirCheckBox->setChecked(QbsProjectManagerSettings::useCreatorSettingsDirForQbs());
|
||||
m_ui.versionValueLabel->setText(qbs::LanguageInfo::qbsVersion());
|
||||
connect(ProjectExplorer::KitManager::instance(), &ProjectExplorer::KitManager::kitsChanged,
|
||||
this, &QbsProfilesSettingsWidget::refreshKitsList);
|
||||
connect(m_ui.settingsDirCheckBox, &QCheckBox::stateChanged, [this]() {
|
||||
|
@@ -23,14 +23,14 @@
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<item row="0" column="0">
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="kitLabel">
|
||||
<property name="text">
|
||||
<string>Kit:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<item row="1" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QComboBox" name="kitsComboBox"/>
|
||||
@@ -50,20 +50,34 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="profileKeyLabel">
|
||||
<property name="text">
|
||||
<string>Associated profile:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<item row="2" column="1">
|
||||
<widget class="QLabel" name="profileValueLabel">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="versionKeyLabel">
|
||||
<property name="text">
|
||||
<string>Qbs version:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="versionValueLabel">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
|
@@ -27,7 +27,6 @@ HEADERS = \
|
||||
qbsbuildstep.h \
|
||||
qbscleanstep.h \
|
||||
qbsdeployconfigurationfactory.h \
|
||||
qbsinfopage.h \
|
||||
qbskitinformation.h \
|
||||
qbsinstallstep.h \
|
||||
qbslogsink.h \
|
||||
@@ -55,7 +54,6 @@ SOURCES = \
|
||||
qbsbuildstep.cpp \
|
||||
qbscleanstep.cpp \
|
||||
qbsdeployconfigurationfactory.cpp \
|
||||
qbsinfopage.cpp \
|
||||
qbsinstallstep.cpp \
|
||||
qbskitinformation.cpp \
|
||||
qbslogsink.cpp \
|
||||
@@ -76,7 +74,6 @@ FORMS = \
|
||||
customqbspropertiesdialog.ui \
|
||||
qbsbuildstepconfigwidget.ui \
|
||||
qbscleanstepconfigwidget.ui \
|
||||
qbsinfowidget.ui \
|
||||
qbsinstallstepconfigwidget.ui \
|
||||
qbsprofilessettingswidget.ui
|
||||
|
||||
|
@@ -78,9 +78,6 @@ QtcPlugin {
|
||||
"qbscleanstepconfigwidget.ui",
|
||||
"qbsdeployconfigurationfactory.cpp",
|
||||
"qbsdeployconfigurationfactory.h",
|
||||
"qbsinfopage.cpp",
|
||||
"qbsinfopage.h",
|
||||
"qbsinfowidget.ui",
|
||||
"qbsinstallstep.cpp",
|
||||
"qbsinstallstep.h",
|
||||
"qbsinstallstepconfigwidget.ui",
|
||||
|
@@ -29,7 +29,6 @@
|
||||
#include "qbsbuildstep.h"
|
||||
#include "qbscleanstep.h"
|
||||
#include "qbsdeployconfigurationfactory.h"
|
||||
#include "qbsinfopage.h"
|
||||
#include "qbsinstallstep.h"
|
||||
#include "qbskitinformation.h"
|
||||
#include "qbsnodes.h"
|
||||
@@ -105,7 +104,6 @@ bool QbsProjectManagerPlugin::initialize(const QStringList &arguments, QString *
|
||||
addAutoReleasedObject(new QbsDeployConfigurationFactory);
|
||||
addAutoReleasedObject(new QbsRunConfigurationFactory);
|
||||
addAutoReleasedObject(new QbsProfilesSettingsPage);
|
||||
addAutoReleasedObject(new QbsInfoPage);
|
||||
|
||||
//menus
|
||||
// Build Menu:
|
||||
|
Reference in New Issue
Block a user