diff options
author | Jesper K. Pedersen <jesper.pedersen@kdab.com> | 2013-05-17 08:20:07 +0200 |
---|---|---|
committer | Jesper K. Pedersen <jesper.pedersen@kdab.com> | 2013-05-21 15:05:22 +0200 |
commit | aad6a7fc57ad69aab3688047ae7ead8480dafd37 (patch) | |
tree | ca7d4e992c71edbb719e337b3c59f5c0ed403047 | |
parent | f2be8915da84a5b6bac1305822878cdb9c2f1298 (diff) |
added switchHeaderSourceFile
Change-Id: I63df0ff201d8306aa02a2f6931c7af6a01a512a1
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
-rw-r--r-- | objects/cppeditor.cpp | 6 | ||||
-rw-r--r-- | objects/cppeditor.h | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/objects/cppeditor.cpp b/objects/cppeditor.cpp index 546a3c7..550dbf8 100644 --- a/objects/cppeditor.cpp +++ b/objects/cppeditor.cpp @@ -35,6 +35,7 @@ #include "cppfunction.h" #include <cpptools/cppmodelmanagerinterface.h> #include "cppclass.h" +#include <cpptools/cpptoolsplugin.h> namespace Scripting { namespace Internal { @@ -49,6 +50,11 @@ void CppEditor::switchDeclarationDefinition() Core::ActionManager::command(::CppEditor::Constants::SWITCH_DECLARATION_DEFINITION)->action()->trigger(); } +void CppEditor::switchHeaderSourceFile() +{ + CppTools::Internal::CppToolsPlugin::instance()->switchHeaderSource(); +} + CppFunction *CppEditor::currentFunction() const { return functionAt(editor()->currentLine(), editor()->currentColumn()); diff --git a/objects/cppeditor.h b/objects/cppeditor.h index 480820f..dbd9591 100644 --- a/objects/cppeditor.h +++ b/objects/cppeditor.h @@ -55,6 +55,7 @@ public: public slots: void switchDeclarationDefinition(); + void switchHeaderSourceFile(); CppFunction* functionAt(int line, int column) const; CppFunction* currentFunction() const; CppClass *classAt(int line, int column) const; |