summaryrefslogtreecommitdiffstats
path: root/examples/network/googlesuggest/main.cpp
diff options
context:
space:
mode:
authorTimur Pocheptsov <timur.pocheptsov@qt.io>2017-09-29 13:57:43 +0200
committerTimur Pocheptsov <timur.pocheptsov@qt.io>2017-10-05 03:45:26 +0000
commitaeee3be166aff737990fe2cade05bff7b39dfebc (patch)
treed1e5a2085bd0df3cd204a4b0121e5178f1a61862 /examples/network/googlesuggest/main.cpp
parent5b4cf7af6a492b6ef5b7c718b346b38ddad4c990 (diff)
QtNetwork (examples) - update googlesuggest example
Mainly cosmetic - nullptr, explicit, QVector<QString> etc. Plus: do not leak SearchBox. Task-number: QTBUG-60628 Change-Id: I4c538ced64a469fbe4627f44d2d883e6dcd2362e Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'examples/network/googlesuggest/main.cpp')
-rw-r--r--examples/network/googlesuggest/main.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/network/googlesuggest/main.cpp b/examples/network/googlesuggest/main.cpp
index 9de966d7a5..ab819c5502 100644
--- a/examples/network/googlesuggest/main.cpp
+++ b/examples/network/googlesuggest/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
@@ -55,7 +55,7 @@
int main(int argc, char * argv[])
{
QApplication app(argc, argv);
- SearchBox *searchEdit = new SearchBox;
- searchEdit->show();
+ SearchBox searchEdit;
+ searchEdit.show();
return app.exec();
}