summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2016-02-05 11:18:01 +0100
committerMarc Mutz <marc.mutz@kdab.com>2016-02-05 13:35:35 +0000
commit426f97762b3912516fd825771f11005c0aa18ea6 (patch)
treee0d77ca5241d91876d55bfe3f6d028a0d8f63e09 /examples
parentb191c85420574f2aba287fd68d9d66bd3c618b88 (diff)
downloadqtivi-426f97762b3912516fd825771f11005c0aa18ea6.tar.gz
climate_widget: inline pointless setupUI() function
This function is only called from the contstructor. It also doesn't set up the UI, that's what ui->setupUi() does. Most certainly, the function has no business being public. Change-Id: I32737a9865ad561447ffa3fd7a7780a7fbd38a1b Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/vehiclefunctions/climate_widget/mainwindow.cpp15
-rw-r--r--examples/vehiclefunctions/climate_widget/mainwindow.h2
2 files changed, 5 insertions, 12 deletions
diff --git a/examples/vehiclefunctions/climate_widget/mainwindow.cpp b/examples/vehiclefunctions/climate_widget/mainwindow.cpp
index 93771bb..a96fcf8 100644
--- a/examples/vehiclefunctions/climate_widget/mainwindow.cpp
+++ b/examples/vehiclefunctions/climate_widget/mainwindow.cpp
@@ -53,19 +53,9 @@ MainWindow::MainWindow(QWidget *parent) :
if (!m_climateControl->isValid())
QMessageBox::critical(this, tr("Auto Discovery Failed !"), tr("No Climate Backend available"));
-
- setupUI();
//![1]
-}
-
-MainWindow::~MainWindow()
-{
- delete ui;
-}
//![2]
-void MainWindow::setupUI()
-{
//Air Flow Direction
setupFlowDirectionRadioButtons(m_climateControl->airflowDirection());
setupFlowDirectionAttribute(m_climateControl->airflowDirectionAttribute());
@@ -108,6 +98,11 @@ void MainWindow::setupUI()
}
//![2]
+MainWindow::~MainWindow()
+{
+ delete ui;
+}
+
void MainWindow::onAirRecirculationAttributeChanged(const QtIVIPropertyAttribute<bool> & attribute)
{
ui->cb_airRecirculation->setEnabled(attribute.isAvailable());
diff --git a/examples/vehiclefunctions/climate_widget/mainwindow.h b/examples/vehiclefunctions/climate_widget/mainwindow.h
index 940c1cb..6cfd39d 100644
--- a/examples/vehiclefunctions/climate_widget/mainwindow.h
+++ b/examples/vehiclefunctions/climate_widget/mainwindow.h
@@ -50,8 +50,6 @@ public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
- void setupUI();
-
private slots:
void onAirRecirculationAttributeChanged(const QtIVIPropertyAttribute<bool> &attribute);
void onHeaterAttributeChanged(const QtIVIPropertyAttribute<bool> &attribute);