summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorRoberto Raggi <roberto.raggi@nokia.com>2010-06-22 09:27:34 +0200
committerRoberto Raggi <roberto.raggi@nokia.com>2010-06-22 12:13:30 +0200
commit91eff02007551bd4ee8a3285b34199a104d6d088 (patch)
tree440606c18f242483ee6e322404581dcde76b039e /src/plugins
parenta19f802529fd7a748df1fc1e29fd89015151167d (diff)
downloadqt-creator-91eff02007551bd4ee8a3285b34199a104d6d088.tar.gz
Moved CppRefactoringChanges.
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/cppeditor/cppeditor.pro6
-rw-r--r--src/plugins/cppeditor/cppquickfix.cpp6
-rw-r--r--src/plugins/cppeditor/cppquickfix.h7
-rw-r--r--src/plugins/cppeditor/cpprefactoringchanges.cpp (renamed from src/plugins/cpptools/cpprefactoringchanges.cpp)1
-rw-r--r--src/plugins/cppeditor/cpprefactoringchanges.h (renamed from src/plugins/cpptools/cpprefactoringchanges.h)14
-rw-r--r--src/plugins/cpptools/cpptools.pro6
6 files changed, 21 insertions, 19 deletions
diff --git a/src/plugins/cppeditor/cppeditor.pro b/src/plugins/cppeditor/cppeditor.pro
index bd24c10b20..8e3b022e4b 100644
--- a/src/plugins/cppeditor/cppeditor.pro
+++ b/src/plugins/cppeditor/cppeditor.pro
@@ -14,7 +14,8 @@ HEADERS += cppplugin.h \
cppeditorenums.h \
cppeditor_global.h \
cppclasswizard.h \
- cppquickfix.h
+ cppquickfix.h \
+ cpprefactoringchanges.h
SOURCES += cppplugin.cpp \
cppeditor.cpp \
@@ -22,7 +23,8 @@ SOURCES += cppplugin.cpp \
cpphoverhandler.cpp \
cppfilewizard.cpp \
cppclasswizard.cpp \
- cppquickfix.cpp
+ cppquickfix.cpp \
+ cpprefactoringchanges.cpp
RESOURCES += cppeditor.qrc
diff --git a/src/plugins/cppeditor/cppquickfix.cpp b/src/plugins/cppeditor/cppquickfix.cpp
index 179969fc8d..63c7f8c0b2 100644
--- a/src/plugins/cppeditor/cppquickfix.cpp
+++ b/src/plugins/cppeditor/cppquickfix.cpp
@@ -47,7 +47,7 @@
#include <Name.h>
#include <Literals.h>
-#include <cpptools/cpprefactoringchanges.h>
+#include <cppeditor/cpprefactoringchanges.h>
#include <cpptools/cpptoolsconstants.h>
#include <cpptools/cppmodelmanagerinterface.h>
@@ -944,7 +944,7 @@ int CppQuickFixOperation::match(TextEditor::QuickFixState *state)
if (_refactoringChanges)
delete _refactoringChanges;
CPPEditor *cppEditor = qobject_cast<CPPEditor*>(editor());
- _refactoringChanges = new CppTools::CppRefactoringChanges(s->info.snapshot, cppEditor->modelManager());
+ _refactoringChanges = new CppRefactoringChanges(s->info.snapshot, cppEditor->modelManager());
return match(s->path);
}
@@ -956,7 +956,7 @@ void CppQuickFixOperation::apply()
cppRefactoringChanges()->apply();
}
-CppTools::CppRefactoringChanges *CppQuickFixOperation::cppRefactoringChanges() const
+CppEditor::CppRefactoringChanges *CppQuickFixOperation::cppRefactoringChanges() const
{ return _refactoringChanges; }
TextEditor::RefactoringChanges *CppQuickFixOperation::refactoringChanges() const
diff --git a/src/plugins/cppeditor/cppquickfix.h b/src/plugins/cppeditor/cppquickfix.h
index 28e11b5451..961769cace 100644
--- a/src/plugins/cppeditor/cppquickfix.h
+++ b/src/plugins/cppeditor/cppquickfix.h
@@ -43,10 +43,11 @@
namespace CppTools {
class CppModelManagerInterface;
- class CppRefactoringChanges;
} // end of namespace CppTools
namespace CppEditor {
+class CppRefactoringChanges;
+
namespace Internal {
class CppQuickFixOperation: public TextEditor::QuickFixOperation
@@ -68,7 +69,7 @@ protected:
QString fileName() const;
virtual void apply();
- virtual CppTools::CppRefactoringChanges *cppRefactoringChanges() const;
+ virtual CppRefactoringChanges *cppRefactoringChanges() const;
virtual TextEditor::RefactoringChanges *refactoringChanges() const;
const CPlusPlus::Token &tokenAt(unsigned index) const;
@@ -101,7 +102,7 @@ protected:
QString textOf(const CPlusPlus::AST *ast) const;
private:
- CppTools::CppRefactoringChanges *_refactoringChanges;
+ CppRefactoringChanges *_refactoringChanges;
CPlusPlus::Document::Ptr _document;
CPlusPlus::AST *_topLevelNode;
};
diff --git a/src/plugins/cpptools/cpprefactoringchanges.cpp b/src/plugins/cppeditor/cpprefactoringchanges.cpp
index d03ec51da7..72ad416d76 100644
--- a/src/plugins/cpptools/cpprefactoringchanges.cpp
+++ b/src/plugins/cppeditor/cpprefactoringchanges.cpp
@@ -32,6 +32,7 @@
using namespace CPlusPlus;
using namespace CppTools;
using namespace TextEditor;
+using namespace CppEditor;
CppRefactoringChanges::CppRefactoringChanges(const Snapshot &snapshot,
CppModelManagerInterface *modelManager)
diff --git a/src/plugins/cpptools/cpprefactoringchanges.h b/src/plugins/cppeditor/cpprefactoringchanges.h
index 5056a57396..3371ca42c7 100644
--- a/src/plugins/cpptools/cpprefactoringchanges.h
+++ b/src/plugins/cppeditor/cpprefactoringchanges.h
@@ -33,16 +33,16 @@
#include <cplusplus/CppDocument.h>
#include <cpptools/cppmodelmanagerinterface.h>
-#include <cpptools/cpptools_global.h>
+#include <cppeditor/cppeditor_global.h>
#include <texteditor/refactoringchanges.h>
-namespace CppTools {
+namespace CppEditor {
-class CPPTOOLS_EXPORT CppRefactoringChanges: public TextEditor::RefactoringChanges
+class CPPEDITOR_EXPORT CppRefactoringChanges: public TextEditor::RefactoringChanges
{
public:
- CppRefactoringChanges(const CPlusPlus::Snapshot &snapshot, CppModelManagerInterface *modelManager);
+ CppRefactoringChanges(const CPlusPlus::Snapshot &snapshot, CppTools::CppModelManagerInterface *modelManager);
virtual QStringList apply();
@@ -53,10 +53,10 @@ public:
private:
CPlusPlus::Snapshot m_snapshot;
- CppModelManagerInterface *m_modelManager;
- CppModelManagerInterface::WorkingCopy m_workingCopy;
+ CppTools::CppModelManagerInterface *m_modelManager;
+ CppTools::CppModelManagerInterface::WorkingCopy m_workingCopy;
};
-} // namespace CppTools
+} // namespace CppEditor
#endif // CPPREFACTORINGCHANGES_H
diff --git a/src/plugins/cpptools/cpptools.pro b/src/plugins/cpptools/cpptools.pro
index 1f5e09d0c3..de7adcd66f 100644
--- a/src/plugins/cpptools/cpptools.pro
+++ b/src/plugins/cpptools/cpptools.pro
@@ -23,8 +23,7 @@ HEADERS += completionsettingspage.h \
searchsymbols.h \
cppdoxygen.h \
cppfilesettingspage.h \
- cppfindreferences.h \
- cpprefactoringchanges.h
+ cppfindreferences.h
SOURCES += completionsettingspage.cpp \
cppclassesfilter.cpp \
@@ -39,8 +38,7 @@ SOURCES += completionsettingspage.cpp \
cppdoxygen.cpp \
cppfilesettingspage.cpp \
abstracteditorsupport.cpp \
- cppfindreferences.cpp \
- cpprefactoringchanges.cpp
+ cppfindreferences.cpp
FORMS += completionsettingspage.ui \
cppfilesettingspage.ui