diff options
author | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2014-02-11 21:55:42 +0200 |
---|---|---|
committer | hjk <hjk121@nokiamail.com> | 2014-02-12 09:30:37 +0100 |
commit | 7ed1576083ceb7a6587796c63510d0fe027a9aac (patch) | |
tree | 3056a9c4bef984e0dd02ef8826b4016df4e986e5 /src/plugins/texteditor | |
parent | 3f44590f4b894fc1fa479d748dd0587aaf6dea50 (diff) | |
download | qt-creator-7ed1576083ceb7a6587796c63510d0fe027a9aac.tar.gz |
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: hjk <hjk121@nokiamail.com>
Diffstat (limited to 'src/plugins/texteditor')
18 files changed, 18 insertions, 56 deletions
diff --git a/src/plugins/texteditor/basefilefind.h b/src/plugins/texteditor/basefilefind.h index f7f14662d5..c3d8e7dc81 100644 --- a/src/plugins/texteditor/basefilefind.h +++ b/src/plugins/texteditor/basefilefind.h @@ -48,9 +48,7 @@ class IFindSupport; } // namespace Core namespace TextEditor { -namespace Internal { -class BaseFileFindPrivate; -} // namespace Internal +namespace Internal { class BaseFileFindPrivate; } class TEXTEDITOR_EXPORT BaseFileFind : public Core::IFindFilter { diff --git a/src/plugins/texteditor/basehoverhandler.h b/src/plugins/texteditor/basehoverhandler.h index 427a20711e..ea6c781568 100644 --- a/src/plugins/texteditor/basehoverhandler.h +++ b/src/plugins/texteditor/basehoverhandler.h @@ -40,9 +40,7 @@ QT_BEGIN_NAMESPACE class QPoint; QT_END_NAMESPACE -namespace Core { -class IEditor; -} +namespace Core { class IEditor; } namespace TextEditor { diff --git a/src/plugins/texteditor/basetextmark.h b/src/plugins/texteditor/basetextmark.h index 3f3f65aaf5..849092ce78 100644 --- a/src/plugins/texteditor/basetextmark.h +++ b/src/plugins/texteditor/basetextmark.h @@ -34,9 +34,7 @@ #include "itextmark.h" namespace TextEditor { -namespace Internal { -class BaseTextMarkRegistry; -} +namespace Internal { class BaseTextMarkRegistry; } class ITextMarkable; diff --git a/src/plugins/texteditor/codeassist/iassistinterface.h b/src/plugins/texteditor/codeassist/iassistinterface.h index 51c501f0b8..7debebe4bf 100644 --- a/src/plugins/texteditor/codeassist/iassistinterface.h +++ b/src/plugins/texteditor/codeassist/iassistinterface.h @@ -41,9 +41,7 @@ class QTextDocument; class QThread; QT_END_NAMESPACE -namespace Core { -class IDocument; -} +namespace Core { class IDocument; } namespace TextEditor { diff --git a/src/plugins/texteditor/codestylepool.h b/src/plugins/texteditor/codestylepool.h index b449163d75..631d5f9f31 100644 --- a/src/plugins/texteditor/codestylepool.h +++ b/src/plugins/texteditor/codestylepool.h @@ -42,9 +42,7 @@ class ICodeStylePreferences; class ICodeStylePreferencesFactory; class TabSettings; -namespace Internal { -class CodeStylePoolPrivate; -} +namespace Internal { class CodeStylePoolPrivate; } class TEXTEDITOR_EXPORT CodeStylePool : public QObject { diff --git a/src/plugins/texteditor/colorschemeedit.h b/src/plugins/texteditor/colorschemeedit.h index fd7000d1ee..d5cfe14a12 100644 --- a/src/plugins/texteditor/colorschemeedit.h +++ b/src/plugins/texteditor/colorschemeedit.h @@ -42,9 +42,7 @@ QT_END_NAMESPACE namespace TextEditor { namespace Internal { -namespace Ui { -class ColorSchemeEdit; -} +namespace Ui { class ColorSchemeEdit; } class FormatsModel; diff --git a/src/plugins/texteditor/fontsettingspage.h b/src/plugins/texteditor/fontsettingspage.h index 0466ad8bf8..c0e82fd295 100644 --- a/src/plugins/texteditor/fontsettingspage.h +++ b/src/plugins/texteditor/fontsettingspage.h @@ -46,9 +46,7 @@ QT_END_NAMESPACE namespace TextEditor { -namespace Internal { -class FontSettingsPagePrivate; -} // namespace Internal +namespace Internal { class FontSettingsPagePrivate; } // GUI description of a format consisting of id (settings key) // and displayName to be displayed diff --git a/src/plugins/texteditor/generichighlighter/highlighterexception.h b/src/plugins/texteditor/generichighlighter/highlighterexception.h index c674dd7c0a..85054e8019 100644 --- a/src/plugins/texteditor/generichighlighter/highlighterexception.h +++ b/src/plugins/texteditor/generichighlighter/highlighterexception.h @@ -31,11 +31,7 @@ #define HIGHLIGHTEREXCEPTION_H namespace TextEditor { -namespace Internal { - -class HighlighterException {}; - -} // namespace Internal +namespace Internal { class HighlighterException {}; } } // namespace TextEditor #endif // HIGHLIGHTEREXCEPTION_H diff --git a/src/plugins/texteditor/generichighlighter/highlightersettingspage.h b/src/plugins/texteditor/generichighlighter/highlightersettingspage.h index 69d1372f53..a7081c6bc9 100644 --- a/src/plugins/texteditor/generichighlighter/highlightersettingspage.h +++ b/src/plugins/texteditor/generichighlighter/highlightersettingspage.h @@ -38,9 +38,7 @@ QT_END_NAMESPACE namespace TextEditor { -namespace Internal { -class HighlightDefinitionMetaData; -} +namespace Internal { class HighlightDefinitionMetaData; } class HighlighterSettings; diff --git a/src/plugins/texteditor/highlighterutils.h b/src/plugins/texteditor/highlighterutils.h index ead9854403..627c45d613 100644 --- a/src/plugins/texteditor/highlighterutils.h +++ b/src/plugins/texteditor/highlighterutils.h @@ -37,9 +37,7 @@ * but due to a very hackish test of that generic highlighter, * there functions must be outside. */ -namespace Core { -class MimeType; -} +namespace Core { class MimeType; } namespace TextEditor { diff --git a/src/plugins/texteditor/icodestylepreferences.h b/src/plugins/texteditor/icodestylepreferences.h index ca19586018..42ca853f46 100644 --- a/src/plugins/texteditor/icodestylepreferences.h +++ b/src/plugins/texteditor/icodestylepreferences.h @@ -41,9 +41,7 @@ QT_END_NAMESPACE namespace TextEditor { -namespace Internal { -class ICodeStylePreferencesPrivate; -} +namespace Internal { class ICodeStylePreferencesPrivate; } class TabSettings; class CodeStylePool; diff --git a/src/plugins/texteditor/ioutlinewidget.h b/src/plugins/texteditor/ioutlinewidget.h index e6f27da106..077637caed 100644 --- a/src/plugins/texteditor/ioutlinewidget.h +++ b/src/plugins/texteditor/ioutlinewidget.h @@ -33,9 +33,7 @@ #include <texteditor/texteditor_global.h> #include <QWidget> -namespace Core { -class IEditor; -} +namespace Core { class IEditor; } namespace TextEditor { diff --git a/src/plugins/texteditor/itexteditor.h b/src/plugins/texteditor/itexteditor.h index 594efad15d..96f7e03b3e 100644 --- a/src/plugins/texteditor/itexteditor.h +++ b/src/plugins/texteditor/itexteditor.h @@ -50,9 +50,7 @@ class QRect; class QTextBlock; QT_END_NAMESPACE -namespace Utils { - class CommentDefinition; -} +namespace Utils { class CommentDefinition; } namespace TextEditor { diff --git a/src/plugins/texteditor/linenumberfilter.h b/src/plugins/texteditor/linenumberfilter.h index a4eb8b2c77..3806d18f33 100644 --- a/src/plugins/texteditor/linenumberfilter.h +++ b/src/plugins/texteditor/linenumberfilter.h @@ -36,9 +36,7 @@ #include <QList> #include <QFutureInterface> -namespace Core { -class IEditor; -} +namespace Core { class IEditor; } namespace TextEditor { namespace Internal { diff --git a/src/plugins/texteditor/outlinefactory.h b/src/plugins/texteditor/outlinefactory.h index de2b9ddd87..ea001520b3 100644 --- a/src/plugins/texteditor/outlinefactory.h +++ b/src/plugins/texteditor/outlinefactory.h @@ -35,9 +35,7 @@ #include <QStackedWidget> #include <QMenu> -namespace Core { -class IEditor; -} +namespace Core { class IEditor; } namespace TextEditor { namespace Internal { diff --git a/src/plugins/texteditor/plaintexteditor.h b/src/plugins/texteditor/plaintexteditor.h index ca620afd91..dd2604a36e 100644 --- a/src/plugins/texteditor/plaintexteditor.h +++ b/src/plugins/texteditor/plaintexteditor.h @@ -34,9 +34,7 @@ #include <utils/uncommentselection.h> -namespace Core { -class MimeType; -} +namespace Core { class MimeType; } namespace TextEditor { diff --git a/src/plugins/texteditor/simplecodestylepreferenceswidget.h b/src/plugins/texteditor/simplecodestylepreferenceswidget.h index 992b242b34..33f014de09 100644 --- a/src/plugins/texteditor/simplecodestylepreferenceswidget.h +++ b/src/plugins/texteditor/simplecodestylepreferenceswidget.h @@ -40,9 +40,7 @@ class TabSettings; class TabSettingsWidget; class ICodeStylePreferences; -namespace Ui { - class TabPreferencesWidget; -} +namespace Ui { class TabPreferencesWidget; } class TEXTEDITOR_EXPORT SimpleCodeStylePreferencesWidget : public QWidget { diff --git a/src/plugins/texteditor/texteditorplugin.h b/src/plugins/texteditor/texteditorplugin.h index 3fd323b156..24930a17ee 100644 --- a/src/plugins/texteditor/texteditorplugin.h +++ b/src/plugins/texteditor/texteditorplugin.h @@ -32,9 +32,7 @@ #include <extensionsystem/iplugin.h> -namespace Core { -class SearchResultWindow; -} +namespace Core { class SearchResultWindow; } namespace TextEditor { |