summaryrefslogtreecommitdiffstats
path: root/examples/network/fortuneserver/main.cpp
diff options
context:
space:
mode:
authorTimur Pocheptsov <timur.pocheptsov@qt.io>2017-09-27 12:32:34 +0200
committerTimur Pocheptsov <timur.pocheptsov@qt.io>2017-09-28 14:07:26 +0000
commit0f5c4ba7cbd628a29d3e84219834c20c29cd6741 (patch)
tree4d7d8eff06a2990641a555e134cea0cc4d16791c /examples/network/fortuneserver/main.cpp
parent9e268185bbb39285ee087868f9d904d7c9f6fe61 (diff)
QtNetwork (examples) - update the fortune server example
Unlike client, this needs a bit more changes: - remove redundant (and outdated) stdlib.h includes - use QRandomGenerator (instead of qsrand/qrand pair) - replace QStringList with QVector<QString> - Q_NULLPTR->nullptr, ExplicitType * -> auto - fix some weird indentation Task-number: QTBUG-60628 Change-Id: I12eed12711b1e622407bd8ecd1afdf56a2cf2097 Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'examples/network/fortuneserver/main.cpp')
-rw-r--r--examples/network/fortuneserver/main.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/examples/network/fortuneserver/main.cpp b/examples/network/fortuneserver/main.cpp
index 12137d647c..a64fcb26dc 100644
--- a/examples/network/fortuneserver/main.cpp
+++ b/examples/network/fortuneserver/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.
@@ -49,18 +49,14 @@
****************************************************************************/
#include <QApplication>
-#include <QtCore>
-
-#include <stdlib.h>
#include "server.h"
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
- QGuiApplication::setApplicationDisplayName(Server::tr("Fortune Server"));
+ QApplication::setApplicationDisplayName(Server::tr("Fortune Server"));
Server server;
server.show();
- qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));
return app.exec();
}