summaryrefslogtreecommitdiffstats
path: root/doc/example/application/exampleapp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'doc/example/application/exampleapp.cpp')
-rw-r--r--doc/example/application/exampleapp.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/doc/example/application/exampleapp.cpp b/doc/example/application/exampleapp.cpp
index 97bae09..527bdd5 100644
--- a/doc/example/application/exampleapp.cpp
+++ b/doc/example/application/exampleapp.cpp
@@ -44,6 +44,7 @@
#include <QDebug>
#include <QtGui/QLineEdit>
#include <QtGui/QHBoxLayout>
+#include <QtNetwork/QHostAddress>
#include <QtSimulator/connection.h>
#include <QtSimulator/version.h>
#include <QtSimulator/connectionworker.h>
@@ -56,6 +57,7 @@ ExampleApp::ExampleApp(QWidget *parent)
, mConnection(new Connection(Connection::Client, "example", Version(1,0,0,0)))
{
mWorker = mConnection->connectToServer();
+ mWorker->setParent(this);
mWorker->addReceiver(this);
QHBoxLayout *layout = new QHBoxLayout(this);
@@ -66,11 +68,6 @@ ExampleApp::ExampleApp(QWidget *parent)
}
//! [2]
-ExampleApp::~ExampleApp()
-{
- delete mWorker;
-}
-
//! [0]
void ExampleApp::showText(const QString &text)
{