forked from qt-creator/qt-creator
CppEditor: Rename CPPEditor{,Document} to CppEditor{,Document}
Better in line with the rest. Change-Id: I692c8b6b9bebf22f059709fb60e53ea04fcb7d53 Reviewed-by: Christian Stenger <christian.stenger@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -79,14 +79,15 @@
|
||||
|
||||
using namespace Core;
|
||||
using namespace CPlusPlus;
|
||||
using namespace CppEditor;
|
||||
using namespace CppEditor::Internal;
|
||||
using namespace CppTools;
|
||||
using namespace TextEditor;
|
||||
|
||||
namespace CppEditor {
|
||||
namespace Internal {
|
||||
|
||||
namespace {
|
||||
|
||||
class TestActionsTestCase : public CppEditor::Internal::Tests::TestCase
|
||||
class TestActionsTestCase : public Tests::TestCase
|
||||
{
|
||||
public:
|
||||
class AbstractAction
|
||||
@@ -120,7 +121,7 @@ private:
|
||||
/// Move word camel case wise from current cursor position until given token (not included)
|
||||
/// and execute the tokenActions for each new position.
|
||||
static void moveWordCamelCaseToToken(TranslationUnit *translationUnit, const Token &token,
|
||||
CPPEditor *editor, const Actions &tokenActions);
|
||||
CppEditor *editor, const Actions &tokenActions);
|
||||
|
||||
static void undoAllChangesAndCloseAllEditors();
|
||||
|
||||
@@ -143,7 +144,7 @@ Actions singleAction(const ActionPointer &action)
|
||||
}
|
||||
|
||||
TestActionsTestCase::TestActionsTestCase(const Actions &tokenActions, const Actions &fileActions)
|
||||
: CppEditor::Internal::Tests::TestCase(/*runGarbageCollector=*/false)
|
||||
: Tests::TestCase(/*runGarbageCollector=*/false)
|
||||
{
|
||||
QVERIFY(succeededSoFar());
|
||||
|
||||
@@ -187,7 +188,7 @@ TestActionsTestCase::TestActionsTestCase(const Actions &tokenActions, const Acti
|
||||
|
||||
// Open editor
|
||||
QCOMPARE(DocumentModel::openedDocuments().size(), 0);
|
||||
CPPEditor *editor;
|
||||
CppEditor *editor;
|
||||
CppEditorWidget *editorWidget;
|
||||
QVERIFY(openCppEditor(filePath, &editor, &editorWidget));
|
||||
|
||||
@@ -287,7 +288,7 @@ void TestActionsTestCase::executeActionsOnEditorWidget(CppEditorWidget *editorWi
|
||||
|
||||
void TestActionsTestCase::moveWordCamelCaseToToken(TranslationUnit *translationUnit,
|
||||
const Token &token,
|
||||
CPPEditor *editor,
|
||||
CppEditor *editor,
|
||||
const Actions &tokenActions)
|
||||
{
|
||||
QVERIFY(translationUnit);
|
||||
@@ -373,7 +374,7 @@ void SwitchDeclarationDefinitionTokenAction::run(CppEditorWidget *)
|
||||
IEditor *editorBefore = EditorManager::currentEditor();
|
||||
const int originalLine = editorBefore->currentLine();
|
||||
const int originalColumn = editorBefore->currentColumn();
|
||||
CppEditor::Internal::CppEditorPlugin::instance()->switchDeclarationDefinition();
|
||||
CppEditorPlugin::instance()->switchDeclarationDefinition();
|
||||
QApplication::processEvents();
|
||||
|
||||
// Go back
|
||||
@@ -394,7 +395,7 @@ public:
|
||||
|
||||
void FindUsagesTokenAction::run(CppEditorWidget *)
|
||||
{
|
||||
CppEditor::Internal::CppEditorPlugin::instance()->findUsages();
|
||||
CppEditorPlugin::instance()->findUsages();
|
||||
QApplication::processEvents();
|
||||
}
|
||||
|
||||
@@ -407,7 +408,7 @@ public:
|
||||
|
||||
void RenameSymbolUnderCursorTokenAction::run(CppEditorWidget *)
|
||||
{
|
||||
CppEditor::Internal::CppEditorPlugin::instance()->renameSymbolUnderCursor();
|
||||
CppEditorPlugin::instance()->renameSymbolUnderCursor();
|
||||
QApplication::processEvents();
|
||||
}
|
||||
|
||||
@@ -420,7 +421,7 @@ public:
|
||||
|
||||
void OpenTypeHierarchyTokenAction::run(CppEditorWidget *)
|
||||
{
|
||||
CppEditor::Internal::CppEditorPlugin::instance()->openTypeHierarchy();
|
||||
CppEditorPlugin::instance()->openTypeHierarchy();
|
||||
QApplication::processEvents();
|
||||
}
|
||||
|
||||
@@ -474,7 +475,7 @@ void RunAllQuickFixesTokenAction::run(CppEditorWidget *editorWidget)
|
||||
return;
|
||||
|
||||
foreach (CppQuickFixFactory *quickFixFactory, quickFixFactories) {
|
||||
TextEditor::QuickFixOperations operations;
|
||||
QuickFixOperations operations;
|
||||
// Some Quick Fixes pop up a dialog and are therefore inappropriate for this test.
|
||||
// Where possible, use a guiless version of the factory.
|
||||
if (qobject_cast<InsertVirtualMethods *>(quickFixFactory)) {
|
||||
@@ -567,3 +568,6 @@ void CppEditorPlugin::test_moveTokenWiseThroughEveryFileAndTriggerQuickFixes()
|
||||
{
|
||||
TestActionsTestCase(singleAction(ActionPointer(new RunAllQuickFixesTokenAction)));
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace CppEditor
|
||||
|
||||
Reference in New Issue
Block a user