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:
Jake Petroules
2017-06-15 15:42:33 -07:00
parent c95c1857df
commit 829bf2b9e6
8 changed files with 26 additions and 177 deletions

View File

@@ -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"

View File

@@ -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

View File

@@ -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>

View File

@@ -33,6 +33,7 @@
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <projectexplorer/kit.h> #include <projectexplorer/kit.h>
#include <projectexplorer/kitmanager.h> #include <projectexplorer/kitmanager.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <utils/algorithm.h> #include <utils/algorithm.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
@@ -67,12 +68,12 @@ QbsProfilesSettingsPage::QbsProfilesSettingsPage(QObject *parent)
, m_useQtcSettingsDirPersistent(QbsProjectManagerSettings::useCreatorSettingsDirForQbs()) , m_useQtcSettingsDirPersistent(QbsProjectManagerSettings::useCreatorSettingsDirForQbs())
{ {
setId("AA.QbsProfiles"); setId("Y.QbsProfiles");
setDisplayName(QCoreApplication::translate("QbsProjectManager", "Profiles")); setDisplayName(QCoreApplication::translate("QbsProjectManager", "Qbs"));
setCategory(Constants::QBS_SETTINGS_CATEGORY); setCategory(ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_CATEGORY);
setDisplayCategory(QCoreApplication::translate("QbsProjectManager", setDisplayCategory(QCoreApplication::translate("ProjectExplorer",
Constants::QBS_SETTINGS_TR_CATEGORY)); ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_TR_CATEGORY));
setCategoryIcon(Utils::Icon(Constants::QBS_SETTINGS_CATEGORY_ICON)); setCategoryIcon(Utils::Icon(ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_CATEGORY_ICON));
} }
QWidget *QbsProfilesSettingsPage::widget() QWidget *QbsProfilesSettingsPage::widget()
@@ -105,6 +106,7 @@ QbsProfilesSettingsWidget::QbsProfilesSettingsWidget(QWidget *parent)
m_model.setEditable(false); m_model.setEditable(false);
m_ui.setupUi(this); m_ui.setupUi(this);
m_ui.settingsDirCheckBox->setChecked(QbsProjectManagerSettings::useCreatorSettingsDirForQbs()); m_ui.settingsDirCheckBox->setChecked(QbsProjectManagerSettings::useCreatorSettingsDirForQbs());
m_ui.versionValueLabel->setText(qbs::LanguageInfo::qbsVersion());
connect(ProjectExplorer::KitManager::instance(), &ProjectExplorer::KitManager::kitsChanged, connect(ProjectExplorer::KitManager::instance(), &ProjectExplorer::KitManager::kitsChanged,
this, &QbsProfilesSettingsWidget::refreshKitsList); this, &QbsProfilesSettingsWidget::refreshKitsList);
connect(m_ui.settingsDirCheckBox, &QCheckBox::stateChanged, [this]() { connect(m_ui.settingsDirCheckBox, &QCheckBox::stateChanged, [this]() {

View File

@@ -23,14 +23,14 @@
</item> </item>
<item> <item>
<layout class="QFormLayout" name="formLayout"> <layout class="QFormLayout" name="formLayout">
<item row="0" column="0"> <item row="1" column="0">
<widget class="QLabel" name="kitLabel"> <widget class="QLabel" name="kitLabel">
<property name="text"> <property name="text">
<string>Kit:</string> <string>Kit:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1"> <item row="1" column="1">
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<item> <item>
<widget class="QComboBox" name="kitsComboBox"/> <widget class="QComboBox" name="kitsComboBox"/>
@@ -50,20 +50,34 @@
</item> </item>
</layout> </layout>
</item> </item>
<item row="1" column="0"> <item row="2" column="0">
<widget class="QLabel" name="profileKeyLabel"> <widget class="QLabel" name="profileKeyLabel">
<property name="text"> <property name="text">
<string>Associated profile:</string> <string>Associated profile:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="1"> <item row="2" column="1">
<widget class="QLabel" name="profileValueLabel"> <widget class="QLabel" name="profileValueLabel">
<property name="text"> <property name="text">
<string/> <string/>
</property> </property>
</widget> </widget>
</item> </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> </layout>
</item> </item>
<item> <item>

View File

@@ -27,7 +27,6 @@ HEADERS = \
qbsbuildstep.h \ qbsbuildstep.h \
qbscleanstep.h \ qbscleanstep.h \
qbsdeployconfigurationfactory.h \ qbsdeployconfigurationfactory.h \
qbsinfopage.h \
qbskitinformation.h \ qbskitinformation.h \
qbsinstallstep.h \ qbsinstallstep.h \
qbslogsink.h \ qbslogsink.h \
@@ -55,7 +54,6 @@ SOURCES = \
qbsbuildstep.cpp \ qbsbuildstep.cpp \
qbscleanstep.cpp \ qbscleanstep.cpp \
qbsdeployconfigurationfactory.cpp \ qbsdeployconfigurationfactory.cpp \
qbsinfopage.cpp \
qbsinstallstep.cpp \ qbsinstallstep.cpp \
qbskitinformation.cpp \ qbskitinformation.cpp \
qbslogsink.cpp \ qbslogsink.cpp \
@@ -76,7 +74,6 @@ FORMS = \
customqbspropertiesdialog.ui \ customqbspropertiesdialog.ui \
qbsbuildstepconfigwidget.ui \ qbsbuildstepconfigwidget.ui \
qbscleanstepconfigwidget.ui \ qbscleanstepconfigwidget.ui \
qbsinfowidget.ui \
qbsinstallstepconfigwidget.ui \ qbsinstallstepconfigwidget.ui \
qbsprofilessettingswidget.ui qbsprofilessettingswidget.ui

View File

@@ -78,9 +78,6 @@ QtcPlugin {
"qbscleanstepconfigwidget.ui", "qbscleanstepconfigwidget.ui",
"qbsdeployconfigurationfactory.cpp", "qbsdeployconfigurationfactory.cpp",
"qbsdeployconfigurationfactory.h", "qbsdeployconfigurationfactory.h",
"qbsinfopage.cpp",
"qbsinfopage.h",
"qbsinfowidget.ui",
"qbsinstallstep.cpp", "qbsinstallstep.cpp",
"qbsinstallstep.h", "qbsinstallstep.h",
"qbsinstallstepconfigwidget.ui", "qbsinstallstepconfigwidget.ui",

View File

@@ -29,7 +29,6 @@
#include "qbsbuildstep.h" #include "qbsbuildstep.h"
#include "qbscleanstep.h" #include "qbscleanstep.h"
#include "qbsdeployconfigurationfactory.h" #include "qbsdeployconfigurationfactory.h"
#include "qbsinfopage.h"
#include "qbsinstallstep.h" #include "qbsinstallstep.h"
#include "qbskitinformation.h" #include "qbskitinformation.h"
#include "qbsnodes.h" #include "qbsnodes.h"
@@ -105,7 +104,6 @@ bool QbsProjectManagerPlugin::initialize(const QStringList &arguments, QString *
addAutoReleasedObject(new QbsDeployConfigurationFactory); addAutoReleasedObject(new QbsDeployConfigurationFactory);
addAutoReleasedObject(new QbsRunConfigurationFactory); addAutoReleasedObject(new QbsRunConfigurationFactory);
addAutoReleasedObject(new QbsProfilesSettingsPage); addAutoReleasedObject(new QbsProfilesSettingsPage);
addAutoReleasedObject(new QbsInfoPage);
//menus //menus
// Build Menu: // Build Menu: