diff options
author | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2017-09-27 12:32:34 +0200 |
---|---|---|
committer | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2017-09-28 14:07:26 +0000 |
commit | 0f5c4ba7cbd628a29d3e84219834c20c29cd6741 (patch) | |
tree | 4d7d8eff06a2990641a555e134cea0cc4d16791c /examples/network/fortuneserver/main.cpp | |
parent | 9e268185bbb39285ee087868f9d904d7c9f6fe61 (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.cpp | 8 |
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(); } |