summaryrefslogtreecommitdiffstats
path: root/examples/serialport/enumerator
diff options
context:
space:
mode:
authorDenis Shienkov <denis.shienkov@gmail.com>2016-06-09 21:39:49 +0300
committerDenis Shienkov <denis.shienkov@gmail.com>2016-06-15 14:35:47 +0000
commitbfc1ed24bd2ebc94b3e0c5bd17d860fe251e2b30 (patch)
treeb88a5197acc53faba367ab2219bb438da87c7d07 /examples/serialport/enumerator
parent2430d5a36656ff4bc01b42f76d82e053608ad2eb (diff)
Use auto in more cases
Change-Id: Id4fd74d4d45b28ddc60de6308386728a0eda8bb7 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
Diffstat (limited to 'examples/serialport/enumerator')
-rw-r--r--examples/serialport/enumerator/main.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/serialport/enumerator/main.cpp b/examples/serialport/enumerator/main.cpp
index fa925daf..d7622a20 100644
--- a/examples/serialport/enumerator/main.cpp
+++ b/examples/serialport/enumerator/main.cpp
@@ -62,7 +62,7 @@ int main(int argc, char *argv[])
{
QApplication a(argc, argv);
- QVBoxLayout *layout = new QVBoxLayout;
+ auto layout = new QVBoxLayout;
const auto infos = QSerialPortInfo::availablePorts();
for (const QSerialPortInfo &info : infos) {
@@ -75,11 +75,11 @@ int main(int argc, char *argv[])
+ QObject::tr("Product Identifier: ") + (info.hasProductIdentifier() ? QString::number(info.productIdentifier(), 16) : QString()) + "\n"
+ QObject::tr("Busy: ") + (info.isBusy() ? QObject::tr("Yes") : QObject::tr("No")) + "\n";
- QLabel *label = new QLabel(s);
+ auto label = new QLabel(s);
layout->addWidget(label);
}
- QWidget *workPage = new QWidget;
+ auto workPage = new QWidget;
workPage->setLayout(layout);
QScrollArea area;