diff options
author | Mårten Nordheim <[email protected]> | 2023-05-16 12:58:47 +0200 |
---|---|---|
committer | Mårten Nordheim <[email protected]> | 2023-05-31 12:55:54 +0200 |
commit | c437c33f290e44ddd3d793554730f42dca483d2e (patch) | |
tree | d7768d60dfcfb659f5f3c7b04d80020ae96085fc | |
parent | 39cdf431f034121353e51768b4d1fec8b0dd35dc (diff) |
Network chat: update includes
Prefer own headers, avoid full-module includes
Task-number: QTBUG-108873
Change-Id: I4282d4aab5fd66c64fc27cd130b223d33069d80f
Reviewed-by: Konrad Kujawa <[email protected]>
Reviewed-by: Timur Pocheptsov <[email protected]>
-rw-r--r-- | examples/network/network-chat/chatdialog.cpp | 8 | ||||
-rw-r--r-- | examples/network/network-chat/client.cpp | 4 | ||||
-rw-r--r-- | examples/network/network-chat/client.h | 4 | ||||
-rw-r--r-- | examples/network/network-chat/connection.cpp | 2 | ||||
-rw-r--r-- | examples/network/network-chat/main.cpp | 4 | ||||
-rw-r--r-- | examples/network/network-chat/peermanager.cpp | 4 | ||||
-rw-r--r-- | examples/network/network-chat/server.cpp | 2 |
7 files changed, 14 insertions, 14 deletions
diff --git a/examples/network/network-chat/chatdialog.cpp b/examples/network/network-chat/chatdialog.cpp index 7cf2c9fd4e3..55c98fed0c9 100644 --- a/examples/network/network-chat/chatdialog.cpp +++ b/examples/network/network-chat/chatdialog.cpp @@ -1,10 +1,14 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause -#include <QtWidgets> - #include "chatdialog.h" +#include <QTimer> +#include <QScrollBar> +#include <QLineEdit> +#include <QTextTable> +#include <QMessageBox> + ChatDialog::ChatDialog(QWidget *parent) : QDialog(parent) { diff --git a/examples/network/network-chat/client.cpp b/examples/network/network-chat/client.cpp index bbce358ce27..8107d5cca21 100644 --- a/examples/network/network-chat/client.cpp +++ b/examples/network/network-chat/client.cpp @@ -1,12 +1,12 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause -#include <QtNetwork> - #include "client.h" #include "connection.h" #include "peermanager.h" +#include <QHostInfo> + Client::Client() { peerManager = new PeerManager(this); diff --git a/examples/network/network-chat/client.h b/examples/network/network-chat/client.h index 5d55bf53d39..55abd84c9e6 100644 --- a/examples/network/network-chat/client.h +++ b/examples/network/network-chat/client.h @@ -4,12 +4,12 @@ #ifndef CLIENT_H #define CLIENT_H +#include "server.h" + #include <QAbstractSocket> #include <QHash> #include <QHostAddress> -#include "server.h" - class PeerManager; class Client : public QObject diff --git a/examples/network/network-chat/connection.cpp b/examples/network/network-chat/connection.cpp index d89266a53ce..e993338fef7 100644 --- a/examples/network/network-chat/connection.cpp +++ b/examples/network/network-chat/connection.cpp @@ -4,7 +4,7 @@ #include "connection.h" -#include <QtNetwork> +#include <QTimerEvent> static const int TransferTimeout = 30 * 1000; static const int PongTimeout = 60 * 1000; diff --git a/examples/network/network-chat/main.cpp b/examples/network/network-chat/main.cpp index bc6c4ef6366..5d679d284bd 100644 --- a/examples/network/network-chat/main.cpp +++ b/examples/network/network-chat/main.cpp @@ -1,11 +1,9 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause -#include <QApplication> - #include "chatdialog.h" -#include <QtCore/QSettings> +#include <QtWidgets/QApplication> int main(int argc, char *argv[]) { diff --git a/examples/network/network-chat/peermanager.cpp b/examples/network/network-chat/peermanager.cpp index 45587404fd3..0bf619f93fc 100644 --- a/examples/network/network-chat/peermanager.cpp +++ b/examples/network/network-chat/peermanager.cpp @@ -2,12 +2,12 @@ // Copyright (C) 2018 Intel Corporation. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause -#include <QtNetwork> - #include "client.h" #include "connection.h" #include "peermanager.h" +#include <QNetworkInterface> + static const qint32 BroadcastInterval = 2000; static const unsigned broadcastPort = 45000; diff --git a/examples/network/network-chat/server.cpp b/examples/network/network-chat/server.cpp index 1537cbb06a9..afc96717ca8 100644 --- a/examples/network/network-chat/server.cpp +++ b/examples/network/network-chat/server.cpp @@ -1,8 +1,6 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause -#include <QtNetwork> - #include "connection.h" #include "server.h" |