summaryrefslogtreecommitdiff
path: root/examples/echoserver/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/echoserver/main.cpp')
-rw-r--r--examples/echoserver/main.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/examples/echoserver/main.cpp b/examples/echoserver/main.cpp
index b424666..def405f 100644
--- a/examples/echoserver/main.cpp
+++ b/examples/echoserver/main.cpp
@@ -44,9 +44,8 @@
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
- EchoServer server(1234);
-
- Q_UNUSED(server);
+ EchoServer *server = new EchoServer(1234);
+ QObject::connect(server, SIGNAL(closed()), &a, SLOT(quit()));
return a.exec();
}