forked from qt-creator/qt-creator
ProjectExplorer: Remove unused DesktopDeviceConfigurationWidget
Change-Id: If5717a7acb8aae555370245879afc398d5a05f61 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -45,7 +45,6 @@ add_qtc_plugin(ProjectExplorer
|
|||||||
deploymentdataview.cpp deploymentdataview.h deploymentdataview.ui
|
deploymentdataview.cpp deploymentdataview.h deploymentdataview.ui
|
||||||
desktoprunconfiguration.cpp desktoprunconfiguration.h
|
desktoprunconfiguration.cpp desktoprunconfiguration.h
|
||||||
devicesupport/desktopdevice.cpp devicesupport/desktopdevice.h
|
devicesupport/desktopdevice.cpp devicesupport/desktopdevice.h
|
||||||
devicesupport/desktopdeviceconfigurationwidget.cpp devicesupport/desktopdeviceconfigurationwidget.h devicesupport/desktopdeviceconfigurationwidget.ui
|
|
||||||
devicesupport/desktopdevicefactory.cpp devicesupport/desktopdevicefactory.h
|
devicesupport/desktopdevicefactory.cpp devicesupport/desktopdevicefactory.h
|
||||||
devicesupport/desktopdeviceprocess.cpp devicesupport/desktopdeviceprocess.h
|
devicesupport/desktopdeviceprocess.cpp devicesupport/desktopdeviceprocess.h
|
||||||
devicesupport/desktopprocesssignaloperation.cpp devicesupport/desktopprocesssignaloperation.h
|
devicesupport/desktopprocesssignaloperation.cpp devicesupport/desktopprocesssignaloperation.h
|
||||||
|
@@ -27,7 +27,6 @@
|
|||||||
#include "desktopdeviceprocess.h"
|
#include "desktopdeviceprocess.h"
|
||||||
#include "deviceprocesslist.h"
|
#include "deviceprocesslist.h"
|
||||||
#include "localprocesslist.h"
|
#include "localprocesslist.h"
|
||||||
#include "desktopdeviceconfigurationwidget.h"
|
|
||||||
#include "desktopprocesssignaloperation.h"
|
#include "desktopprocesssignaloperation.h"
|
||||||
|
|
||||||
#include <coreplugin/fileutils.h>
|
#include <coreplugin/fileutils.h>
|
||||||
|
@@ -1,86 +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 "desktopdeviceconfigurationwidget.h"
|
|
||||||
#include "ui_desktopdeviceconfigurationwidget.h"
|
|
||||||
#include <projectexplorer/projectexplorerconstants.h>
|
|
||||||
|
|
||||||
#include <utils/utilsicons.h>
|
|
||||||
#include <utils/portlist.h>
|
|
||||||
#include <utils/qtcassert.h>
|
|
||||||
|
|
||||||
#include <QRegExpValidator>
|
|
||||||
|
|
||||||
using namespace ProjectExplorer::Constants;
|
|
||||||
|
|
||||||
namespace ProjectExplorer {
|
|
||||||
|
|
||||||
DesktopDeviceConfigurationWidget::DesktopDeviceConfigurationWidget(const IDevice::Ptr &device,
|
|
||||||
QWidget *parent) :
|
|
||||||
IDeviceWidget(device, parent),
|
|
||||||
m_ui(new Ui::DesktopDeviceConfigurationWidget)
|
|
||||||
{
|
|
||||||
m_ui->setupUi(this);
|
|
||||||
connect(m_ui->freePortsLineEdit, &QLineEdit::textChanged,
|
|
||||||
this, &DesktopDeviceConfigurationWidget::updateFreePorts);
|
|
||||||
|
|
||||||
initGui();
|
|
||||||
}
|
|
||||||
|
|
||||||
DesktopDeviceConfigurationWidget::~DesktopDeviceConfigurationWidget()
|
|
||||||
{
|
|
||||||
delete m_ui;
|
|
||||||
}
|
|
||||||
|
|
||||||
void DesktopDeviceConfigurationWidget::updateDeviceFromUi()
|
|
||||||
{
|
|
||||||
updateFreePorts();
|
|
||||||
}
|
|
||||||
|
|
||||||
void DesktopDeviceConfigurationWidget::updateFreePorts()
|
|
||||||
{
|
|
||||||
device()->setFreePorts(Utils::PortList::fromString(m_ui->freePortsLineEdit->text()));
|
|
||||||
m_ui->portsWarningLabel->setVisible(!device()->freePorts().hasMore());
|
|
||||||
}
|
|
||||||
|
|
||||||
void DesktopDeviceConfigurationWidget::initGui()
|
|
||||||
{
|
|
||||||
QTC_CHECK(device()->machineType() == IDevice::Hardware);
|
|
||||||
m_ui->machineTypeValueLabel->setText(tr("Physical Device"));
|
|
||||||
m_ui->freePortsLineEdit->setPlaceholderText(
|
|
||||||
QString::fromLatin1("eg: %1-%2").arg(DESKTOP_PORT_START).arg(DESKTOP_PORT_END));
|
|
||||||
m_ui->portsWarningLabel->setPixmap(Utils::Icons::WARNING.pixmap());
|
|
||||||
m_ui->portsWarningLabel->setToolTip(QLatin1String("<font color=\"red\">")
|
|
||||||
+ tr("You will need at least one port for QML debugging.")
|
|
||||||
+ QLatin1String("</font>"));
|
|
||||||
QRegExpValidator * const portsValidator
|
|
||||||
= new QRegExpValidator(QRegExp(Utils::PortList::regularExpression()), this);
|
|
||||||
m_ui->freePortsLineEdit->setValidator(portsValidator);
|
|
||||||
|
|
||||||
m_ui->freePortsLineEdit->setText(device()->freePorts().toString());
|
|
||||||
updateFreePorts();
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace ProjectExplorer
|
|
@@ -1,51 +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 "idevicewidget.h"
|
|
||||||
|
|
||||||
namespace ProjectExplorer {
|
|
||||||
namespace Ui { class DesktopDeviceConfigurationWidget; }
|
|
||||||
|
|
||||||
class DesktopDeviceConfigurationWidget : public IDeviceWidget
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
explicit DesktopDeviceConfigurationWidget(const IDevice::Ptr &device, QWidget *parent = nullptr);
|
|
||||||
~DesktopDeviceConfigurationWidget() override;
|
|
||||||
|
|
||||||
void updateDeviceFromUi() override;
|
|
||||||
|
|
||||||
private:
|
|
||||||
void updateFreePorts();
|
|
||||||
|
|
||||||
void initGui();
|
|
||||||
|
|
||||||
private:
|
|
||||||
Ui::DesktopDeviceConfigurationWidget *m_ui;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace ProjectExplorer
|
|
@@ -1,69 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>ProjectExplorer::DesktopDeviceConfigurationWidget</class>
|
|
||||||
<widget class="QWidget" name="ProjectExplorer::DesktopDeviceConfigurationWidget">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>437</width>
|
|
||||||
<height>265</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<layout class="QFormLayout" name="formLayout">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="machineTypeLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Machine type:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QLabel" name="machineTypeValueLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>TextLabel</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="freePortsLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Free ports:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="freePortsLineEdit"/>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="portsWarningLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<resources/>
|
|
||||||
<connections/>
|
|
||||||
</ui>
|
|
@@ -135,7 +135,6 @@ HEADERS += projectexplorer.h \
|
|||||||
devicesupport/sshdeviceprocess.h \
|
devicesupport/sshdeviceprocess.h \
|
||||||
devicesupport/sshdeviceprocesslist.h \
|
devicesupport/sshdeviceprocesslist.h \
|
||||||
devicesupport/sshsettingspage.h \
|
devicesupport/sshsettingspage.h \
|
||||||
devicesupport/desktopdeviceconfigurationwidget.h \
|
|
||||||
devicesupport/desktopprocesssignaloperation.h \
|
devicesupport/desktopprocesssignaloperation.h \
|
||||||
deploymentdata.h \
|
deploymentdata.h \
|
||||||
deploymentdatamodel.h \
|
deploymentdatamodel.h \
|
||||||
@@ -283,7 +282,6 @@ SOURCES += projectexplorer.cpp \
|
|||||||
devicesupport/sshdeviceprocess.cpp \
|
devicesupport/sshdeviceprocess.cpp \
|
||||||
devicesupport/sshdeviceprocesslist.cpp \
|
devicesupport/sshdeviceprocesslist.cpp \
|
||||||
devicesupport/sshsettingspage.cpp \
|
devicesupport/sshsettingspage.cpp \
|
||||||
devicesupport/desktopdeviceconfigurationwidget.cpp \
|
|
||||||
devicesupport/desktopprocesssignaloperation.cpp \
|
devicesupport/desktopprocesssignaloperation.cpp \
|
||||||
deployablefile.cpp \
|
deployablefile.cpp \
|
||||||
deploymentdata.cpp \
|
deploymentdata.cpp \
|
||||||
@@ -322,7 +320,6 @@ FORMS += \
|
|||||||
devicesupport/devicefactoryselectiondialog.ui \
|
devicesupport/devicefactoryselectiondialog.ui \
|
||||||
devicesupport/devicesettingswidget.ui \
|
devicesupport/devicesettingswidget.ui \
|
||||||
devicesupport/devicetestdialog.ui \
|
devicesupport/devicetestdialog.ui \
|
||||||
devicesupport/desktopdeviceconfigurationwidget.ui \
|
|
||||||
customparserconfigdialog.ui \
|
customparserconfigdialog.ui \
|
||||||
makestep.ui
|
makestep.ui
|
||||||
|
|
||||||
|
@@ -227,8 +227,7 @@ Project {
|
|||||||
"sshdeviceprocess.cpp", "sshdeviceprocess.h",
|
"sshdeviceprocess.cpp", "sshdeviceprocess.h",
|
||||||
"sshdeviceprocesslist.cpp", "sshdeviceprocesslist.h",
|
"sshdeviceprocesslist.cpp", "sshdeviceprocesslist.h",
|
||||||
"sshsettingspage.cpp", "sshsettingspage.h",
|
"sshsettingspage.cpp", "sshsettingspage.h",
|
||||||
"desktopprocesssignaloperation.cpp", "desktopprocesssignaloperation.h",
|
"desktopprocesssignaloperation.cpp", "desktopprocesssignaloperation.h"
|
||||||
"desktopdeviceconfigurationwidget.cpp", "desktopdeviceconfigurationwidget.h", "desktopdeviceconfigurationwidget.ui"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user