Revamp Local Fortune Client Example: Fix include order
Fix include order to respect the Coding Conventions. Include individual headers instead of "generic" headers. Remove QT_{BEGIN,END}_NAMESPACE because these are private Qt macros that should not be used in the examples. Task-number: QTBUG-117036 Pick-to: 6.6 6.5 Change-Id: I33f9c54098824bfcfacac7c2f624554e105a291a Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
This commit is contained in:
parent
fedb1f5b76
commit
b83736be05
@ -1,11 +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 <QtNetwork>
|
|
||||||
|
|
||||||
#include "client.h"
|
#include "client.h"
|
||||||
|
|
||||||
|
#include <QDialogButtonBox>
|
||||||
|
#include <QGridLayout>
|
||||||
|
#include <QGuiApplication>
|
||||||
|
#include <QMessageBox>
|
||||||
|
#include <QTimer>
|
||||||
|
|
||||||
Client::Client(QWidget *parent)
|
Client::Client(QWidget *parent)
|
||||||
: QDialog(parent),
|
: QDialog(parent),
|
||||||
hostLineEdit(new QLineEdit("fortune")),
|
hostLineEdit(new QLineEdit("fortune")),
|
||||||
|
@ -4,15 +4,12 @@
|
|||||||
#ifndef CLIENT_H
|
#ifndef CLIENT_H
|
||||||
#define CLIENT_H
|
#define CLIENT_H
|
||||||
|
|
||||||
#include <QDialog>
|
|
||||||
#include <QDataStream>
|
#include <QDataStream>
|
||||||
|
#include <QDialog>
|
||||||
|
#include <QLabel>
|
||||||
|
#include <QLineEdit>
|
||||||
#include <QLocalSocket>
|
#include <QLocalSocket>
|
||||||
|
#include <QPushButton>
|
||||||
QT_BEGIN_NAMESPACE
|
|
||||||
class QLabel;
|
|
||||||
class QLineEdit;
|
|
||||||
class QPushButton;
|
|
||||||
QT_END_NAMESPACE
|
|
||||||
|
|
||||||
class Client : public QDialog
|
class Client : public QDialog
|
||||||
{
|
{
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
// 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 "client.h"
|
#include "client.h"
|
||||||
|
|
||||||
|
#include <QApplication>
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
QApplication app(argc, argv);
|
QApplication app(argc, argv);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user