summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@qt.io>2017-09-12 16:07:42 +0200
committerKai Koehne <kai.koehne@qt.io>2017-10-04 09:31:18 +0000
commitb7c16e4f454804929be6ed6ec7053b66822d8463 (patch)
tree10b40fb22c32a82078014eff64b626f6e2fc7d0a /examples
parentec3712ba8fc968a153f2e85b4f2654bb377dfd00 (diff)
Assistant Examples: Unify #include style
Change-Id: I72c419123e27e06ae30fa2042fb8bb6ddbab9da4 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Diffstat (limited to 'examples')
-rw-r--r--examples/assistant/remotecontrol/main.cpp5
-rw-r--r--examples/assistant/remotecontrol/remotecontrol.cpp15
-rw-r--r--examples/assistant/remotecontrol/remotecontrol.h5
-rw-r--r--examples/assistant/simpletextviewer/assistant.cpp15
-rw-r--r--examples/assistant/simpletextviewer/assistant.h4
-rw-r--r--examples/assistant/simpletextviewer/findfiledialog.cpp26
-rw-r--r--examples/assistant/simpletextviewer/findfiledialog.h4
-rw-r--r--examples/assistant/simpletextviewer/main.cpp6
-rw-r--r--examples/assistant/simpletextviewer/mainwindow.cpp20
-rw-r--r--examples/assistant/simpletextviewer/mainwindow.h9
-rw-r--r--examples/assistant/simpletextviewer/textedit.cpp8
-rw-r--r--examples/assistant/simpletextviewer/textedit.h6
12 files changed, 64 insertions, 59 deletions
diff --git a/examples/assistant/remotecontrol/main.cpp b/examples/assistant/remotecontrol/main.cpp
index 3652e6251..3ab883268 100644
--- a/examples/assistant/remotecontrol/main.cpp
+++ b/examples/assistant/remotecontrol/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.
@@ -48,9 +48,10 @@
**
****************************************************************************/
-#include <QtWidgets/QApplication>
#include "remotecontrol.h"
+#include <QApplication>
+
int main(int argc, char *argv[])
{
Q_INIT_RESOURCE(remotecontrol);
diff --git a/examples/assistant/remotecontrol/remotecontrol.cpp b/examples/assistant/remotecontrol/remotecontrol.cpp
index 3ee8bb27d..916a08efd 100644
--- a/examples/assistant/remotecontrol/remotecontrol.cpp
+++ b/examples/assistant/remotecontrol/remotecontrol.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.
@@ -48,15 +48,14 @@
**
****************************************************************************/
-#include <QtCore/QDir>
-#include <QtCore/QProcess>
-#include <QtCore/QTextStream>
-#include <QtCore/QLibraryInfo>
-
-#include <QtWidgets/QMessageBox>
-
#include "remotecontrol.h"
+#include <QDir>
+#include <QLibraryInfo>
+#include <QMessageBox>
+#include <QProcess>
+#include <QTextStream>
+
RemoteControl::RemoteControl(QWidget *parent, Qt::WindowFlags flags)
: QMainWindow(parent, flags)
{
diff --git a/examples/assistant/remotecontrol/remotecontrol.h b/examples/assistant/remotecontrol/remotecontrol.h
index 16a9f9441..5054f59f8 100644
--- a/examples/assistant/remotecontrol/remotecontrol.h
+++ b/examples/assistant/remotecontrol/remotecontrol.h
@@ -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.
@@ -51,9 +51,10 @@
#ifndef REMOTECONTROL_H
#define REMOTECONTROL_H
-#include <QtWidgets/QMainWindow>
#include "ui_remotecontrol.h"
+#include <QMainWindow>
+
QT_BEGIN_NAMESPACE
class QProcess;
QT_END_NAMESPACE;
diff --git a/examples/assistant/simpletextviewer/assistant.cpp b/examples/assistant/simpletextviewer/assistant.cpp
index a9b2776b6..b7bbe6a06 100644
--- a/examples/assistant/simpletextviewer/assistant.cpp
+++ b/examples/assistant/simpletextviewer/assistant.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.
@@ -48,15 +48,14 @@
**
****************************************************************************/
-#include <QtCore/QByteArray>
-#include <QtCore/QDir>
-#include <QtCore/QLibraryInfo>
-#include <QtCore/QProcess>
-
-#include <QtWidgets/QMessageBox>
-
#include "assistant.h"
+#include <QByteArray>
+#include <QDir>
+#include <QLibraryInfo>
+#include <QMessageBox>
+#include <QProcess>
+
Assistant::Assistant()
: proc(0)
{
diff --git a/examples/assistant/simpletextviewer/assistant.h b/examples/assistant/simpletextviewer/assistant.h
index fce67f0da..dada5a1ee 100644
--- a/examples/assistant/simpletextviewer/assistant.h
+++ b/examples/assistant/simpletextviewer/assistant.h
@@ -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.
@@ -51,7 +51,7 @@
#ifndef ASSISTANT_H
#define ASSISTANT_H
-#include <QtCore/QString>
+#include <QString>
QT_BEGIN_NAMESPACE
class QProcess;
diff --git a/examples/assistant/simpletextviewer/findfiledialog.cpp b/examples/assistant/simpletextviewer/findfiledialog.cpp
index b34b8aeae..cf64e9a6a 100644
--- a/examples/assistant/simpletextviewer/findfiledialog.cpp
+++ b/examples/assistant/simpletextviewer/findfiledialog.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.
@@ -48,21 +48,21 @@
**
****************************************************************************/
-#include <QtCore/QDir>
-#include <QtWidgets/QLayout>
-#include <QtWidgets/QComboBox>
-#include <QtWidgets/QTreeWidget>
-#include <QtWidgets/QLayout>
-#include <QtWidgets/QFileDialog>
-#include <QtWidgets/QDialogButtonBox>
-#include <QtWidgets/QToolButton>
-#include <QtWidgets/QPushButton>
-#include <QtWidgets/QLabel>
-
-#include "findfiledialog.h"
#include "assistant.h"
+#include "findfiledialog.h"
#include "textedit.h"
+#include <QComboBox>
+#include <QDialogButtonBox>
+#include <QDir>
+#include <QFileDialog>
+#include <QHBoxLayout>
+#include <QLabel>
+#include <QPushButton>
+#include <QToolButton>
+#include <QTreeWidget>
+#include <QTreeWidgetItem>
+
//! [0]
FindFileDialog::FindFileDialog(TextEdit *editor, Assistant *assistant)
: QDialog(editor)
diff --git a/examples/assistant/simpletextviewer/findfiledialog.h b/examples/assistant/simpletextviewer/findfiledialog.h
index 2d5b1378a..bc0e22409 100644
--- a/examples/assistant/simpletextviewer/findfiledialog.h
+++ b/examples/assistant/simpletextviewer/findfiledialog.h
@@ -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.
@@ -51,7 +51,7 @@
#ifndef FINDFILEDIALOG_H
#define FINDFILEDIALOG_H
-#include <QtWidgets/QDialog>
+#include <QDialog>
QT_BEGIN_NAMESPACE
class QComboBox;
diff --git a/examples/assistant/simpletextviewer/main.cpp b/examples/assistant/simpletextviewer/main.cpp
index 30c886f5a..55c1039f8 100644
--- a/examples/assistant/simpletextviewer/main.cpp
+++ b/examples/assistant/simpletextviewer/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.
@@ -48,10 +48,10 @@
**
****************************************************************************/
-#include <QtWidgets/QApplication>
-
#include "mainwindow.h"
+#include <QApplication>
+
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
diff --git a/examples/assistant/simpletextviewer/mainwindow.cpp b/examples/assistant/simpletextviewer/mainwindow.cpp
index 0660a0426..5b0564ca1 100644
--- a/examples/assistant/simpletextviewer/mainwindow.cpp
+++ b/examples/assistant/simpletextviewer/mainwindow.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.
@@ -48,18 +48,18 @@
**
****************************************************************************/
-#include <QtCore/QLibraryInfo>
-#include <QtWidgets/QApplication>
-#include <QtWidgets/QAction>
-#include <QtWidgets/QMenu>
-#include <QtWidgets/QMenuBar>
-#include <QtWidgets/QMessageBox>
-
-#include "mainwindow.h"
-#include "findfiledialog.h"
#include "assistant.h"
+#include "findfiledialog.h"
+#include "mainwindow.h"
#include "textedit.h"
+#include <QAction>
+#include <QApplication>
+#include <QLibraryInfo>
+#include <QMenu>
+#include <QMenuBar>
+#include <QMessageBox>
+
// ![0]
MainWindow::MainWindow()
{
diff --git a/examples/assistant/simpletextviewer/mainwindow.h b/examples/assistant/simpletextviewer/mainwindow.h
index 7026b5eca..e8e917ea3 100644
--- a/examples/assistant/simpletextviewer/mainwindow.h
+++ b/examples/assistant/simpletextviewer/mainwindow.h
@@ -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.
@@ -51,7 +51,12 @@
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
-#include <QtWidgets/QMainWindow>
+#include <QMainWindow>
+
+QT_BEGIN_NAMESPACE
+class QAction;
+class QMenu;
+QT_END_NAMESPACE
class Assistant;
class TextEdit;
diff --git a/examples/assistant/simpletextviewer/textedit.cpp b/examples/assistant/simpletextviewer/textedit.cpp
index 81cb3251a..18cd767eb 100644
--- a/examples/assistant/simpletextviewer/textedit.cpp
+++ b/examples/assistant/simpletextviewer/textedit.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.
@@ -48,11 +48,11 @@
**
****************************************************************************/
-#include <QtCore/QFileInfo>
-#include <QtCore/QFile>
-
#include "textedit.h"
+#include <QFile>
+#include <QFileInfo>
+
TextEdit::TextEdit(QWidget *parent)
: QTextEdit(parent)
{
diff --git a/examples/assistant/simpletextviewer/textedit.h b/examples/assistant/simpletextviewer/textedit.h
index 70bcf75af..d44fbb5f5 100644
--- a/examples/assistant/simpletextviewer/textedit.h
+++ b/examples/assistant/simpletextviewer/textedit.h
@@ -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.
@@ -51,8 +51,8 @@
#ifndef TEXTEDIT_H
#define TEXTEDIT_H
-#include <QtCore/QUrl>
-#include <QtWidgets/QTextEdit>
+#include <QTextEdit>
+#include <QUrl>
class TextEdit : public QTextEdit
{