VariousPlugins: Fix forward declarations

The pattern is to use QT_[BEGIN/END]_NAMESPACE, instead of
QT_FORWARD_DECLARE_CLASS.

Change-Id: I9da39ee003e1d477a5f56980c218e275706bb3f4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Jarek Kobus
2023-08-17 00:20:09 +02:00
parent 8542c982b4
commit 36e0ea27b9
17 changed files with 40 additions and 23 deletions

View File

@@ -12,7 +12,9 @@
#include <atomic>
QT_FORWARD_DECLARE_CLASS(QDir)
QT_BEGIN_NAMESPACE
class QDir;
QT_END_NAMESPACE
namespace AutotoolsProjectManager::Internal {

View File

@@ -6,7 +6,9 @@
#include <QtGlobal>
#include <QDesignerIntegration>
QT_FORWARD_DECLARE_CLASS(QUrl)
QT_BEGIN_NAMESPACE
class QUrl;
QT_END_NAMESPACE
namespace Designer {
namespace Internal {

View File

@@ -8,8 +8,6 @@
#include <coreplugin/patchtool.h>
#include <coreplugin/textdocument.h>
QT_FORWARD_DECLARE_CLASS(QMenu)
namespace DiffEditor {
class DiffEditorController;

View File

@@ -12,7 +12,9 @@
#include <QTextCharFormat>
#include <QTimer>
QT_FORWARD_DECLARE_CLASS(QMenu)
QT_BEGIN_NAMESPACE
class QMenu;
QT_END_NAMESPACE
namespace Core { class IDocument; }
namespace TextEditor { class FontSettings; }

View File

@@ -11,7 +11,9 @@
#include <QString>
#include <QObject>
QT_FORWARD_DECLARE_CLASS(QWidget)
QT_BEGIN_NAMESPACE
class QWidget;
QT_END_NAMESPACE
namespace TextEditor { class TextEditorWidget; }

View File

@@ -30,9 +30,10 @@
#include <QTextCursor>
// forward declarations
QT_FORWARD_DECLARE_CLASS(QAction)
QT_FORWARD_DECLARE_CLASS(QPlainTextEdit)
QT_BEGIN_NAMESPACE
class QAction;
class QPlainTextEdit;
QT_END_NAMESPACE
namespace Core {
class IEditor;

View File

@@ -26,7 +26,9 @@
#include <QObject>
QT_FORWARD_DECLARE_CLASS(QPlainTextEdit)
QT_BEGIN_NAMESPACE
class QPlainTextEdit;
QT_END_NAMESPACE
namespace EmacsKeys {
namespace Internal {

View File

@@ -7,7 +7,9 @@
#include <utils/filepath.h>
QT_FORWARD_DECLARE_CLASS(QSettings)
QT_BEGIN_NAMESPACE
class QSettings;
QT_END_NAMESPACE
namespace Gerrit {
namespace Internal {

View File

@@ -5,7 +5,9 @@
#include <projectexplorer/itaskhandler.h>
QT_FORWARD_DECLARE_CLASS(QUrl)
QT_BEGIN_NAMESPACE
class QUrl;
QT_END_NAMESPACE
namespace Help {
namespace Internal {

View File

@@ -5,7 +5,9 @@
#include <QDialog>
QT_FORWARD_DECLARE_CLASS(QSpinBox)
QT_BEGIN_NAMESPACE
class QSpinBox;
QT_END_NAMESPACE
namespace Utils {
class FilePath;

View File

@@ -8,7 +8,9 @@
#include <QGraphicsView>
QT_FORWARD_DECLARE_CLASS(QImage)
QT_BEGIN_NAMESPACE
class QImage;
QT_END_NAMESPACE
namespace Utils {
class QtcSettings;

View File

@@ -8,7 +8,9 @@
#include <QSize>
#include <QVector>
QT_FORWARD_DECLARE_CLASS(QLineEdit)
QT_BEGIN_NAMESPACE
class QLineEdit;
QT_END_NAMESPACE
namespace Utils {
class FilePath;

View File

@@ -12,8 +12,6 @@
#include <QObject>
QT_FORWARD_DECLARE_CLASS(QWidget)
namespace ProjectExplorer {
class ToolChain;
}

View File

@@ -13,8 +13,6 @@
#include <QObject>
#include <QVersionNumber>
QT_FORWARD_DECLARE_CLASS(QWidget)
namespace Utils {
class FilePath;
class PathChooser;

View File

@@ -5,8 +5,6 @@
#include <QListView>
QT_FORWARD_DECLARE_CLASS(QModelIndex)
namespace QmakeProjectManager {
namespace Internal {
class ClassModel;

View File

@@ -5,7 +5,9 @@
#include "qtsupport_global.h"
QT_FORWARD_DECLARE_CLASS(QSettings)
QT_BEGIN_NAMESPACE
class QSettings;
QT_END_NAMESPACE
namespace QtSupport {

View File

@@ -6,7 +6,9 @@
#include "keyword.h"
QT_FORWARD_DECLARE_CLASS(QSettings)
QT_BEGIN_NAMESPACE
class QSettings;
QT_END_NAMESPACE
namespace Todo {
namespace Internal {