Commit 7ed15760 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by hjk

Clean up single namespace forward-declarations

Done using the following ruby script:

Dir.glob('**/*.h').each { |file|
  if File.file?(file)
    s = File.read(file)
    t = s.gsub(/^namespace .+ \{\n\s*class .*;\n\s*\}.*$/) { |m| m.gsub(/\n\s*/, ' ').gsub(/\s*\/\/.*$/, '') }
    if t != s
      puts file
      File.open(file, 'w').write(t)
    end
  end
}

Change-Id: Iffcb966e90eb8e1a625eccd5dd0b94f000ae368e
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent 3f44590f
...@@ -39,9 +39,7 @@ namespace ExtensionSystem { ...@@ -39,9 +39,7 @@ namespace ExtensionSystem {
class PluginSpec; class PluginSpec;
namespace Internal { namespace Internal {
namespace Ui { namespace Ui { class PluginDetailsView; }
class PluginDetailsView;
} // namespace Ui
} // namespace Internal } // namespace Internal
......
...@@ -38,9 +38,7 @@ namespace ExtensionSystem { ...@@ -38,9 +38,7 @@ namespace ExtensionSystem {
class PluginSpec; class PluginSpec;
namespace Internal { namespace Internal {
namespace Ui { namespace Ui { class PluginErrorView; }
class PluginErrorView;
} // namespace Ui
} // namespace Internal } // namespace Internal
class EXTENSIONSYSTEM_EXPORT PluginErrorView : public QWidget class EXTENSIONSYSTEM_EXPORT PluginErrorView : public QWidget
......
...@@ -46,9 +46,7 @@ class PluginCollection; ...@@ -46,9 +46,7 @@ class PluginCollection;
class IPlugin; class IPlugin;
class PluginSpec; class PluginSpec;
namespace Internal { namespace Internal { class PluginManagerPrivate; }
class PluginManagerPrivate;
}
class EXTENSIONSYSTEM_EXPORT PluginManager : public QObject class EXTENSIONSYSTEM_EXPORT PluginManager : public QObject
{ {
......
...@@ -35,14 +35,10 @@ ...@@ -35,14 +35,10 @@
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
class QVariant; class QVariant;
namespace Ui { namespace Ui { class ContextPaneTextWidget; }
class ContextPaneTextWidget;
}
QT_END_NAMESPACE QT_END_NAMESPACE
namespace QmlJS { namespace QmlJS { class PropertyReader; }
class PropertyReader;
}
namespace QmlEditorWidgets { namespace QmlEditorWidgets {
......
...@@ -41,9 +41,7 @@ class QGraphicsDropShadowEffect; ...@@ -41,9 +41,7 @@ class QGraphicsDropShadowEffect;
class QGraphicsOpacityEffect; class QGraphicsOpacityEffect;
QT_END_NAMESPACE QT_END_NAMESPACE
namespace QmlJS { namespace QmlJS { class PropertyReader; }
class PropertyReader;
}
namespace QmlEditorWidgets { namespace QmlEditorWidgets {
......
...@@ -46,9 +46,7 @@ class QLabel; ...@@ -46,9 +46,7 @@ class QLabel;
class QSlider; class QSlider;
QT_END_NAMESPACE QT_END_NAMESPACE
namespace QmlJS { namespace QmlJS { class PropertyReader; }
class PropertyReader;
}
namespace QmlEditorWidgets { namespace QmlEditorWidgets {
......
...@@ -34,14 +34,10 @@ ...@@ -34,14 +34,10 @@
#include <QWidget> #include <QWidget>
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
namespace Ui { namespace Ui { class ContextPaneWidgetRectangle; }
class ContextPaneWidgetRectangle;
}
QT_END_NAMESPACE QT_END_NAMESPACE
namespace QmlJS { namespace QmlJS { class PropertyReader; }
class PropertyReader;
}
namespace QmlEditorWidgets { namespace QmlEditorWidgets {
......
...@@ -36,14 +36,10 @@ ...@@ -36,14 +36,10 @@
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
class QVariant; class QVariant;
namespace Ui { namespace Ui { class EasingContextPane; }
class EasingContextPane;
}
QT_END_NAMESPACE QT_END_NAMESPACE
namespace QmlJS { namespace QmlJS { class PropertyReader; }
class PropertyReader;
}
namespace QmlEditorWidgets { namespace QmlEditorWidgets {
class EasingSimulation; class EasingSimulation;
......
...@@ -39,9 +39,7 @@ ...@@ -39,9 +39,7 @@
QT_FORWARD_DECLARE_CLASS(QTextStream) QT_FORWARD_DECLARE_CLASS(QTextStream)
namespace Utils { namespace Utils { class JsonObjectValue; }
class JsonObjectValue;
}
namespace QmlJS { namespace QmlJS {
......
...@@ -37,9 +37,7 @@ ...@@ -37,9 +37,7 @@
#include <qmljs/qmljsdocument.h> #include <qmljs/qmljsdocument.h>
#include <qmljs/parser/qmljsastfwd_p.h> #include <qmljs/parser/qmljsastfwd_p.h>
namespace TextEditor { namespace TextEditor { class BaseTextEditor; }
class BaseTextEditor;
} //TextEditor
namespace QmlJS { namespace QmlJS {
......
...@@ -50,9 +50,7 @@ QT_END_NAMESPACE ...@@ -50,9 +50,7 @@ QT_END_NAMESPACE
namespace QmlJS { namespace QmlJS {
class ImportInfo; class ImportInfo;
namespace Internal { namespace Internal { class ImportDependenciesPrivate; }
class ImportDependenciesPrivate;
}
class ImportDependencies; class ImportDependencies;
// match strenght wrt to the selectors of a ViewerContext // match strenght wrt to the selectors of a ViewerContext
......
...@@ -41,9 +41,7 @@ ...@@ -41,9 +41,7 @@
#include <QStringList> #include <QStringList>
#include <QPointer> #include <QPointer>
namespace ProjectExplorer { namespace ProjectExplorer { class Project; }
class Project;
}
namespace QmlJS { namespace QmlJS {
......
...@@ -44,9 +44,7 @@ class ObjectValue; ...@@ -44,9 +44,7 @@ class ObjectValue;
class Value; class Value;
class ScopeChain; class ScopeChain;
namespace AST { namespace AST { class Node; }
class Node;
}
class QMLJS_EXPORT ScopeBuilder class QMLJS_EXPORT ScopeBuilder
{ {
......
...@@ -46,9 +46,7 @@ class SftpChannel; ...@@ -46,9 +46,7 @@ class SftpChannel;
class SshDirectTcpIpTunnel; class SshDirectTcpIpTunnel;
class SshRemoteProcess; class SshRemoteProcess;
namespace Internal { namespace Internal { class SshConnectionPrivate; }
class SshConnectionPrivate;
} // namespace Internal
enum SshConnectionOption { enum SshConnectionOption {
SshIgnoreDefaultProxy = 0x1, SshIgnoreDefaultProxy = 0x1,
......
...@@ -34,9 +34,7 @@ ...@@ -34,9 +34,7 @@
#include "sshremoteprocess.h" #include "sshremoteprocess.h"
namespace QSsh { namespace QSsh {
namespace Internal { namespace Internal { class SshRemoteProcessRunnerPrivate; }
class SshRemoteProcessRunnerPrivate;
} // namespace Internal
class QSSH_EXPORT SshRemoteProcessRunner : public QObject class QSSH_EXPORT SshRemoteProcessRunner : public QObject
{ {
......
...@@ -38,9 +38,7 @@ namespace Utils { ...@@ -38,9 +38,7 @@ namespace Utils {
class Environment; class Environment;
class EnvironmentItem; class EnvironmentItem;
namespace Internal { namespace Internal { class EnvironmentModelPrivate; }
class EnvironmentModelPrivate;
} // namespace Internal
class QTCREATOR_UTILS_EXPORT EnvironmentModel : public QAbstractTableModel class QTCREATOR_UTILS_EXPORT EnvironmentModel : public QAbstractTableModel
{ {
......
...@@ -35,9 +35,7 @@ ...@@ -35,9 +35,7 @@
QT_FORWARD_DECLARE_CLASS(QString) QT_FORWARD_DECLARE_CLASS(QString)
namespace Utils { namespace Utils {
namespace Internal { namespace Internal { class PortListPrivate; }
class PortListPrivate;
} // namespace Internal
class QTCREATOR_UTILS_EXPORT PortList class QTCREATOR_UTILS_EXPORT PortList
{ {
......
...@@ -35,9 +35,7 @@ ...@@ -35,9 +35,7 @@
#include <QAbstractSocket> #include <QAbstractSocket>
namespace Utils { namespace Utils {
namespace Internal { namespace Internal { class TcpPortsGathererPrivate; }
class TcpPortsGathererPrivate;
}
class QTCREATOR_UTILS_EXPORT TcpPortsGatherer class QTCREATOR_UTILS_EXPORT TcpPortsGatherer
{ {
......
...@@ -36,9 +36,7 @@ ...@@ -36,9 +36,7 @@
QT_FORWARD_DECLARE_CLASS(QVBoxLayout) QT_FORWARD_DECLARE_CLASS(QVBoxLayout)
namespace Utils { namespace Utils { class TipContent; }
class TipContent;
}
#ifndef Q_MOC_RUN #ifndef Q_MOC_RUN
namespace Utils { namespace Utils {
......
...@@ -36,9 +36,7 @@ QT_BEGIN_NAMESPACE ...@@ -36,9 +36,7 @@ QT_BEGIN_NAMESPACE
class QWidget; class QWidget;
QT_END_NAMESPACE QT_END_NAMESPACE
namespace CPlusPlus { namespace CPlusPlus { class Symbol; }
class Symbol;
}
namespace AnalyzerUtils namespace AnalyzerUtils
{ {
......
...@@ -40,9 +40,7 @@ ...@@ -40,9 +40,7 @@
#include <QObject> #include <QObject>
#include <QAction> #include <QAction>
namespace ProjectExplorer { namespace ProjectExplorer { class RunConfiguration; }
class RunConfiguration;
}
namespace Analyzer { namespace Analyzer {
......
...@@ -38,9 +38,7 @@ QT_BEGIN_NAMESPACE ...@@ -38,9 +38,7 @@ QT_BEGIN_NAMESPACE
class QComboBox; class QComboBox;
QT_END_NAMESPACE QT_END_NAMESPACE
namespace Utils { namespace Utils { class PathChooser; }
class PathChooser;
}
namespace AutotoolsProjectManager { namespace AutotoolsProjectManager {
namespace Internal { namespace Internal {
......
...@@ -34,9 +34,7 @@ ...@@ -34,9 +34,7 @@
#include <utils/wizard.h> #include <utils/wizard.h>
namespace Utils { namespace Utils { class PathChooser; }
class PathChooser;
}
namespace AutotoolsProjectManager { namespace AutotoolsProjectManager {
namespace Internal { namespace Internal {
......
...@@ -38,9 +38,7 @@ ...@@ -38,9 +38,7 @@
QT_FORWARD_DECLARE_CLASS(QDir) QT_FORWARD_DECLARE_CLASS(QDir)
namespace Utils { namespace Utils { class FileSystemWatcher; }
class FileSystemWatcher;
}
namespace ProjectExplorer { namespace ProjectExplorer {
class Node; class Node;
......
...@@ -34,9 +34,7 @@ ...@@ -34,9 +34,7 @@
#include <projectexplorer/projectnodes.h> #include <projectexplorer/projectnodes.h>
namespace Core { namespace Core { class IDocument; }
class IDocument;
}
namespace AutotoolsProjectManager { namespace AutotoolsProjectManager {
namespace Internal { namespace Internal {
......
...@@ -34,9 +34,7 @@ ...@@ -34,9 +34,7 @@
namespace BareMetal { namespace BareMetal {
namespace Ui { namespace Ui { class BareMetalDeviceConfigurationWidget; }
class BareMetalDeviceConfigurationWidget;
}
class BareMetalDeviceConfigurationWidget class BareMetalDeviceConfigurationWidget
: public ProjectExplorer::IDeviceWidget : public ProjectExplorer::IDeviceWidget
......
...@@ -34,9 +34,7 @@ ...@@ -34,9 +34,7 @@
#include <utils/wizard.h> #include <utils/wizard.h>
namespace BareMetal { namespace BareMetal {
namespace Internal { namespace Internal { class BareMetalDeviceConfigrationWizardPrivate; }
class BareMetalDeviceConfigrationWizardPrivate;
} // namespace Internal
class BareMetalDeviceConfigurationWizard : public Utils::Wizard class BareMetalDeviceConfigurationWizard : public Utils::Wizard
{ {
......
...@@ -40,9 +40,7 @@ QT_END_NAMESPACE ...@@ -40,9 +40,7 @@ QT_END_NAMESPACE
namespace BareMetal { namespace BareMetal {
class BareMetalRunConfiguration; class BareMetalRunConfiguration;
namespace Internal { namespace Internal { class BareMetalRunConfigurationWidgetPrivate; }
class BareMetalRunConfigurationWidgetPrivate;
} // namespace Internal
class BareMetalRunConfigurationWidget : public QWidget class BareMetalRunConfigurationWidget : public QWidget
{ {
......
...@@ -49,13 +49,9 @@ class IEditorFactory; ...@@ -49,13 +49,9 @@ class IEditorFactory;
class IEditor; class IEditor;
} // namespace Core } // namespace Core
namespace Utils { namespace Utils { class ParameterAction; }
class ParameterAction;
} //namespace Utils
namespace VcsBase { namespace VcsBase { class VcsBaseSubmitEditor; }
class VcsBaseSubmitEditor;
}
namespace Bazaar { namespace Bazaar {
namespace Internal { namespace Internal {
......
...@@ -34,9 +34,7 @@ ...@@ -34,9 +34,7 @@
namespace Bazaar { namespace Bazaar {
namespace Internal { namespace Internal {
namespace Ui { namespace Ui { class CloneOptionsPanel; }
class CloneOptionsPanel;
}
class CloneOptionsPanel : public QWidget class CloneOptionsPanel : public QWidget
{ {
......
...@@ -32,9 +32,7 @@ ...@@ -32,9 +32,7 @@
#include <vcsbase/vcsbaseclient.h> #include <vcsbase/vcsbaseclient.h>
#include <vcsbase/vcsbasesubmiteditor.h> #include <vcsbase/vcsbasesubmiteditor.h>
namespace VcsBase { namespace VcsBase { class SubmitFileModel; }
class SubmitFileModel;
}
namespace Bazaar { namespace Bazaar {
namespace Internal { namespace Internal {
......
...@@ -34,9 +34,7 @@ ...@@ -34,9 +34,7 @@
namespace Bazaar { namespace Bazaar {
namespace Internal { namespace Internal {
namespace Ui { namespace Ui { class PullOrPushDialog; }
class PullOrPushDialog;
}
class PullOrPushDialog : public QDialog class PullOrPushDialog : public QDialog
{ {
......
...@@ -34,9 +34,7 @@ ...@@ -34,9 +34,7 @@
namespace Bazaar { namespace Bazaar {
namespace Internal { namespace Internal {
namespace Ui { namespace Ui { class UnCommitDialog; }
class UnCommitDialog;
}
class UnCommitDialog : public QDialog class UnCommitDialog : public QDialog
{ {
......
...@@ -45,13 +45,9 @@ ...@@ -45,13 +45,9 @@
QT_FORWARD_DECLARE_CLASS(QMenu) QT_FORWARD_DECLARE_CLASS(QMenu)
QT_FORWARD_DECLARE_CLASS(QHelpEvent) QT_FORWARD_DECLARE_CLASS(QHelpEvent)
namespace Core { namespace Core { class IEditor; }
class IEditor;
}
namespace TextEditor { namespace TextEditor { class FontSettings; }
class FontSettings;
}
namespace BINEditor { namespace BINEditor {
......
...@@ -40,13 +40,9 @@ class QAction; ...@@ -40,13 +40,9 @@ class QAction;
class QMenu; class QMenu;
QT_END_NAMESPACE QT_END_NAMESPACE