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

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
{ {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment