Network chat: update includes

Prefer own headers, avoid full-module includes

Task-number: QTBUG-108873
Change-Id: I4282d4aab5fd66c64fc27cd130b223d33069d80f
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This commit is contained in:
Mårten Nordheim 2023-05-16 12:58:47 +02:00
parent 39cdf431f0
commit c437c33f29
7 changed files with 14 additions and 14 deletions

View File

@ -1,10 +1,14 @@
// Copyright (C) 2016 The Qt Company Ltd. // Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include <QtWidgets>
#include "chatdialog.h" #include "chatdialog.h"
#include <QTimer>
#include <QScrollBar>
#include <QLineEdit>
#include <QTextTable>
#include <QMessageBox>
ChatDialog::ChatDialog(QWidget *parent) ChatDialog::ChatDialog(QWidget *parent)
: QDialog(parent) : QDialog(parent)
{ {

View File

@ -1,12 +1,12 @@
// Copyright (C) 2016 The Qt Company Ltd. // Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include <QtNetwork>
#include "client.h" #include "client.h"
#include "connection.h" #include "connection.h"
#include "peermanager.h" #include "peermanager.h"
#include <QHostInfo>
Client::Client() Client::Client()
{ {
peerManager = new PeerManager(this); peerManager = new PeerManager(this);

View File

@ -4,12 +4,12 @@
#ifndef CLIENT_H #ifndef CLIENT_H
#define CLIENT_H #define CLIENT_H
#include "server.h"
#include <QAbstractSocket> #include <QAbstractSocket>
#include <QHash> #include <QHash>
#include <QHostAddress> #include <QHostAddress>
#include "server.h"
class PeerManager; class PeerManager;
class Client : public QObject class Client : public QObject

View File

@ -4,7 +4,7 @@
#include "connection.h" #include "connection.h"
#include <QtNetwork> #include <QTimerEvent>
static const int TransferTimeout = 30 * 1000; static const int TransferTimeout = 30 * 1000;
static const int PongTimeout = 60 * 1000; static const int PongTimeout = 60 * 1000;

View File

@ -1,11 +1,9 @@
// Copyright (C) 2016 The Qt Company Ltd. // Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include <QApplication>
#include "chatdialog.h" #include "chatdialog.h"
#include <QtCore/QSettings> #include <QtWidgets/QApplication>
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {

View File

@ -2,12 +2,12 @@
// Copyright (C) 2018 Intel Corporation. // Copyright (C) 2018 Intel Corporation.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include <QtNetwork>
#include "client.h" #include "client.h"
#include "connection.h" #include "connection.h"
#include "peermanager.h" #include "peermanager.h"
#include <QNetworkInterface>
static const qint32 BroadcastInterval = 2000; static const qint32 BroadcastInterval = 2000;
static const unsigned broadcastPort = 45000; static const unsigned broadcastPort = 45000;

View File

@ -1,8 +1,6 @@
// Copyright (C) 2016 The Qt Company Ltd. // Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include <QtNetwork>
#include "connection.h" #include "connection.h"
#include "server.h" #include "server.h"