forked from qt-creator/qt-creator
DiffEditor: Use nested using namespace declarations
Change-Id: Iaf695a7c95f4267b5480036dedfa0485b841ca6e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -51,8 +51,7 @@ using namespace Core;
|
|||||||
using namespace TextEditor;
|
using namespace TextEditor;
|
||||||
using namespace Utils;
|
using namespace Utils;
|
||||||
|
|
||||||
namespace DiffEditor {
|
namespace DiffEditor::Internal {
|
||||||
namespace Internal {
|
|
||||||
|
|
||||||
class DescriptionEditorWidget : public TextEditorWidget
|
class DescriptionEditorWidget : public TextEditorWidget
|
||||||
{
|
{
|
||||||
@@ -618,7 +617,6 @@ void DiffEditor::showDiffView(IDiffView *view)
|
|||||||
setupView(view);
|
setupView(view);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace DiffEditor::Internal
|
||||||
} // namespace DiffEditor
|
|
||||||
|
|
||||||
#include "diffeditor.moc"
|
#include "diffeditor.moc"
|
||||||
|
@@ -18,9 +18,8 @@ QT_END_NAMESPACE
|
|||||||
|
|
||||||
namespace TextEditor { class TextEditorWidget; }
|
namespace TextEditor { class TextEditorWidget; }
|
||||||
|
|
||||||
namespace DiffEditor {
|
namespace DiffEditor::Internal {
|
||||||
|
|
||||||
namespace Internal {
|
|
||||||
class DescriptionEditorWidget;
|
class DescriptionEditorWidget;
|
||||||
class DiffEditorDocument;
|
class DiffEditorDocument;
|
||||||
class IDiffView;
|
class IDiffView;
|
||||||
@@ -95,5 +94,4 @@ private:
|
|||||||
bool m_showDescription = true;
|
bool m_showDescription = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace DiffEditor::Internal
|
||||||
} // namespace DiffEditor
|
|
||||||
|
@@ -24,8 +24,7 @@
|
|||||||
using namespace Core;
|
using namespace Core;
|
||||||
using namespace Utils;
|
using namespace Utils;
|
||||||
|
|
||||||
namespace DiffEditor {
|
namespace DiffEditor::Internal {
|
||||||
namespace Internal {
|
|
||||||
|
|
||||||
DiffEditorDocument::DiffEditorDocument() :
|
DiffEditorDocument::DiffEditorDocument() :
|
||||||
Core::BaseTextDocument()
|
Core::BaseTextDocument()
|
||||||
@@ -388,5 +387,4 @@ void DiffEditorDocument::endReload(bool success)
|
|||||||
emit reloadFinished(success);
|
emit reloadFinished(success);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace DiffEditor::Internal
|
||||||
} // namespace DiffEditor
|
|
||||||
|
@@ -15,8 +15,7 @@ using namespace Core;
|
|||||||
using namespace TextEditor;
|
using namespace TextEditor;
|
||||||
using namespace Utils;
|
using namespace Utils;
|
||||||
|
|
||||||
namespace DiffEditor {
|
namespace DiffEditor::Internal {
|
||||||
namespace Internal {
|
|
||||||
|
|
||||||
DiffEditorFactory::DiffEditorFactory() :
|
DiffEditorFactory::DiffEditorFactory() :
|
||||||
descriptionHandler {
|
descriptionHandler {
|
||||||
@@ -50,5 +49,4 @@ DiffEditorFactory::DiffEditorFactory() :
|
|||||||
setEditorCreator([] { return new DiffEditor(new DiffEditorDocument); });
|
setEditorCreator([] { return new DiffEditor(new DiffEditorDocument); });
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace DiffEditor::Internal
|
||||||
} // namespace DiffEditor
|
|
||||||
|
@@ -7,8 +7,7 @@
|
|||||||
|
|
||||||
#include <texteditor/texteditoractionhandler.h>
|
#include <texteditor/texteditoractionhandler.h>
|
||||||
|
|
||||||
namespace DiffEditor {
|
namespace DiffEditor::Internal {
|
||||||
namespace Internal {
|
|
||||||
|
|
||||||
class DiffEditorFactory : public Core::IEditorFactory
|
class DiffEditorFactory : public Core::IEditorFactory
|
||||||
{
|
{
|
||||||
@@ -22,5 +21,4 @@ private:
|
|||||||
TextEditor::TextEditorActionHandler rightHandler;
|
TextEditor::TextEditorActionHandler rightHandler;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace DiffEditor::Internal
|
||||||
} // namespace DiffEditor
|
|
||||||
|
@@ -29,8 +29,7 @@ using namespace Core;
|
|||||||
using namespace TextEditor;
|
using namespace TextEditor;
|
||||||
using namespace Utils;
|
using namespace Utils;
|
||||||
|
|
||||||
namespace DiffEditor {
|
namespace DiffEditor::Internal {
|
||||||
namespace Internal {
|
|
||||||
|
|
||||||
class ReloadInput {
|
class ReloadInput {
|
||||||
public:
|
public:
|
||||||
@@ -535,8 +534,7 @@ void DiffEditorPlugin::initialize()
|
|||||||
d = new DiffEditorPluginPrivate;
|
d = new DiffEditorPluginPrivate;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace DiffEditor::Internal
|
||||||
} // namespace DiffEditor
|
|
||||||
|
|
||||||
#ifdef WITH_TESTS
|
#ifdef WITH_TESTS
|
||||||
|
|
||||||
|
@@ -6,8 +6,7 @@
|
|||||||
#include <coreplugin/diffservice.h>
|
#include <coreplugin/diffservice.h>
|
||||||
#include <extensionsystem/iplugin.h>
|
#include <extensionsystem/iplugin.h>
|
||||||
|
|
||||||
namespace DiffEditor {
|
namespace DiffEditor::Internal {
|
||||||
namespace Internal {
|
|
||||||
|
|
||||||
class DiffEditorServiceImpl : public QObject, public Core::DiffService
|
class DiffEditorServiceImpl : public QObject, public Core::DiffService
|
||||||
{
|
{
|
||||||
@@ -46,5 +45,4 @@ private slots:
|
|||||||
#endif // WITH_TESTS
|
#endif // WITH_TESTS
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace DiffEditor::Internal
|
||||||
} // namespace DiffEditor
|
|
||||||
|
@@ -29,8 +29,7 @@ using namespace Core;
|
|||||||
using namespace TextEditor;
|
using namespace TextEditor;
|
||||||
using namespace Utils;
|
using namespace Utils;
|
||||||
|
|
||||||
namespace DiffEditor {
|
namespace DiffEditor::Internal {
|
||||||
namespace Internal {
|
|
||||||
|
|
||||||
DiffEditorWidgetController::DiffEditorWidgetController(QWidget *diffEditorWidget)
|
DiffEditorWidgetController::DiffEditorWidgetController(QWidget *diffEditorWidget)
|
||||||
: QObject(diffEditorWidget)
|
: QObject(diffEditorWidget)
|
||||||
@@ -330,6 +329,4 @@ DiffEditorInput::DiffEditorInput(DiffEditorWidgetController *controller)
|
|||||||
, m_charFormat{&controller->m_charFormat[LeftSide], &controller->m_charFormat[RightSide]}
|
, m_charFormat{&controller->m_charFormat[LeftSide], &controller->m_charFormat[RightSide]}
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
|
} // namespace DiffEditor::Internal
|
||||||
} // namespace Internal
|
|
||||||
} // namespace DiffEditor
|
|
||||||
|
@@ -14,8 +14,7 @@
|
|||||||
|
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
|
|
||||||
namespace DiffEditor {
|
namespace DiffEditor::Internal {
|
||||||
namespace Internal {
|
|
||||||
|
|
||||||
IDiffView::IDiffView(QObject *parent) : QObject(parent)
|
IDiffView::IDiffView(QObject *parent) : QObject(parent)
|
||||||
{ }
|
{ }
|
||||||
@@ -230,5 +229,4 @@ void SideBySideView::setSync(bool sync)
|
|||||||
m_widget->setHorizontalSync(sync);
|
m_widget->setHorizontalSync(sync);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace DiffEditor::Internal
|
||||||
} // namespace DiffEditor
|
|
||||||
|
@@ -13,8 +13,7 @@
|
|||||||
|
|
||||||
using namespace TextEditor;
|
using namespace TextEditor;
|
||||||
|
|
||||||
namespace DiffEditor {
|
namespace DiffEditor::Internal {
|
||||||
namespace Internal {
|
|
||||||
|
|
||||||
SelectableTextEditorWidget::SelectableTextEditorWidget(Utils::Id id, QWidget *parent)
|
SelectableTextEditorWidget::SelectableTextEditorWidget(Utils::Id id, QWidget *parent)
|
||||||
: TextEditorWidget(parent)
|
: TextEditorWidget(parent)
|
||||||
@@ -142,5 +141,4 @@ void SelectableTextEditorWidget::paintBlock(QPainter *painter,
|
|||||||
TextEditorWidget::paintBlock(painter, block, offset, newSelections, clipRect);
|
TextEditorWidget::paintBlock(painter, block, offset, newSelections, clipRect);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace DiffEditor::Internal
|
||||||
} // namespace DiffEditor
|
|
||||||
|
@@ -7,8 +7,7 @@
|
|||||||
|
|
||||||
namespace TextEditor { class DisplaySettings; }
|
namespace TextEditor { class DisplaySettings; }
|
||||||
|
|
||||||
namespace DiffEditor {
|
namespace DiffEditor::Internal {
|
||||||
namespace Internal {
|
|
||||||
|
|
||||||
class DiffSelection
|
class DiffSelection
|
||||||
{
|
{
|
||||||
@@ -46,5 +45,4 @@ private:
|
|||||||
DiffSelections m_diffSelections;
|
DiffSelections m_diffSelections;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace DiffEditor::Internal
|
||||||
} // namespace DiffEditor
|
|
||||||
|
@@ -35,8 +35,7 @@ using namespace Utils;
|
|||||||
|
|
||||||
using namespace std::placeholders;
|
using namespace std::placeholders;
|
||||||
|
|
||||||
namespace DiffEditor {
|
namespace DiffEditor::Internal {
|
||||||
namespace Internal {
|
|
||||||
|
|
||||||
static DiffSide oppositeSide(DiffSide side)
|
static DiffSide oppositeSide(DiffSide side)
|
||||||
{
|
{
|
||||||
@@ -1104,7 +1103,6 @@ void SideBySideDiffEditorWidget::syncCursor(SideDiffEditorWidget *source, SideDi
|
|||||||
dest->horizontalScrollBar()->setValue(oldHSliderPos);
|
dest->horizontalScrollBar()->setValue(oldHSliderPos);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace DiffEditor::Internal
|
||||||
} // namespace DiffEditor
|
|
||||||
|
|
||||||
#include "sidebysidediffeditorwidget.moc"
|
#include "sidebysidediffeditorwidget.moc"
|
||||||
|
@@ -28,8 +28,7 @@ using namespace Core;
|
|||||||
using namespace TextEditor;
|
using namespace TextEditor;
|
||||||
using namespace Utils;
|
using namespace Utils;
|
||||||
|
|
||||||
namespace DiffEditor {
|
namespace DiffEditor::Internal {
|
||||||
namespace Internal {
|
|
||||||
|
|
||||||
UnifiedDiffEditorWidget::UnifiedDiffEditorWidget(QWidget *parent)
|
UnifiedDiffEditorWidget::UnifiedDiffEditorWidget(QWidget *parent)
|
||||||
: SelectableTextEditorWidget("DiffEditor.UnifiedDiffEditor", parent)
|
: SelectableTextEditorWidget("DiffEditor.UnifiedDiffEditor", parent)
|
||||||
@@ -589,5 +588,4 @@ void UnifiedDiffEditorWidget::setCurrentDiffFileIndex(int diffFileIndex)
|
|||||||
verticalScrollBar()->setValue(blockNumber);
|
verticalScrollBar()->setValue(blockNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace DiffEditor::Internal
|
||||||
} // namespace DiffEditor
|
|
||||||
|
@@ -21,7 +21,6 @@
|
|||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
class QProcessEnvironment;
|
|
||||||
class QMenu;
|
class QMenu;
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user