forked from qt-creator/qt-creator
Qnx: Use a bit of LayoutBuilder in QnxDeployLibrariesDialog
Less user code. Change-Id: Ief2ad4c57a082752551db7db7d0020dd1775c7a1 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -13,6 +13,7 @@
|
|||||||
#include <remotelinux/genericdirectuploadservice.h>
|
#include <remotelinux/genericdirectuploadservice.h>
|
||||||
|
|
||||||
#include <utils/algorithm.h>
|
#include <utils/algorithm.h>
|
||||||
|
#include <utils/layoutbuilder.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
|
|
||||||
#include <QComboBox>
|
#include <QComboBox>
|
||||||
@@ -70,28 +71,17 @@ QnxDeployQtLibrariesDialog::QnxDeployQtLibrariesDialog(const IDevice::ConstPtr &
|
|||||||
m_uploadService = new GenericDirectUploadService(this);
|
m_uploadService = new GenericDirectUploadService(this);
|
||||||
m_uploadService->setDevice(m_device);
|
m_uploadService->setDevice(m_device);
|
||||||
|
|
||||||
auto horizontalLayout = new QHBoxLayout();
|
using namespace Layouting;
|
||||||
horizontalLayout->addWidget(m_qtLibraryCombo);
|
|
||||||
horizontalLayout->addWidget(m_deployButton);
|
|
||||||
|
|
||||||
auto horizontalLayout_3 = new QHBoxLayout();
|
Column {
|
||||||
horizontalLayout_3->setSpacing(0);
|
Form {
|
||||||
horizontalLayout_3->addWidget(m_basePathLabel);
|
Tr::tr("Qt library to deploy:"), m_qtLibraryCombo, m_deployButton, br,
|
||||||
horizontalLayout_3->addWidget(m_remoteDirectory);
|
Tr::tr("Remote directory:"), m_basePathLabel, m_remoteDirectory, br
|
||||||
|
},
|
||||||
auto formLayout = new QFormLayout();
|
m_deployProgress,
|
||||||
formLayout->addRow(Tr::tr("Qt library to deploy:"), horizontalLayout);
|
m_deployLogWindow,
|
||||||
formLayout->addRow(Tr::tr("Remote directory:"), horizontalLayout_3);
|
Row { st, m_closeButton }
|
||||||
|
}.attachTo(this);
|
||||||
auto horizontalLayout_2 = new QHBoxLayout();
|
|
||||||
horizontalLayout_2->addItem(new QSpacerItem(218, 20, QSizePolicy::Expanding, QSizePolicy::Minimum));
|
|
||||||
horizontalLayout_2->addWidget(m_closeButton);
|
|
||||||
|
|
||||||
auto verticalLayout = new QVBoxLayout(this);
|
|
||||||
verticalLayout->addLayout(formLayout);
|
|
||||||
verticalLayout->addWidget(m_deployProgress);
|
|
||||||
verticalLayout->addWidget(m_deployLogWindow);
|
|
||||||
verticalLayout->addLayout(horizontalLayout_2);
|
|
||||||
|
|
||||||
connect(m_uploadService, &AbstractRemoteLinuxDeployService::progressMessage,
|
connect(m_uploadService, &AbstractRemoteLinuxDeployService::progressMessage,
|
||||||
this, &QnxDeployQtLibrariesDialog::updateProgress);
|
this, &QnxDeployQtLibrariesDialog::updateProgress);
|
||||||
|
|||||||
Reference in New Issue
Block a user