forked from qt-creator/qt-creator
CMakeProjectManager: Use a BaseEditorFactory derived class
Change-Id: Ia5f2b789d82c63552ec7abe5ec22bbc29100a59a Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This commit is contained in:
@@ -32,8 +32,6 @@
|
||||
|
||||
#include <texteditor/basetextdocument.h>
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <texteditor/codeassist/completionassistprovider.h>
|
||||
#include <coreplugin/editormanager/ieditorfactory.h>
|
||||
|
||||
namespace CMakeProjectManager {
|
||||
namespace Internal {
|
||||
@@ -47,47 +45,21 @@ class CMakeEditor : public TextEditor::BaseTextEditor
|
||||
public:
|
||||
CMakeEditor();
|
||||
|
||||
void finalizeInitialization();
|
||||
QString contextHelpId() const;
|
||||
|
||||
friend class CMakeEditorWidget;
|
||||
|
||||
private slots:
|
||||
void markAsChanged();
|
||||
public slots:
|
||||
void build();
|
||||
};
|
||||
|
||||
class CMakeEditorWidget : public TextEditor::BaseTextEditorWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CMakeEditorWidget();
|
||||
|
||||
private:
|
||||
bool save(const QString &fileName = QString());
|
||||
Link findLinkAt(const QTextCursor &cursor, bool resolveTarget = true, bool inNextSplit = false);
|
||||
TextEditor::BaseTextEditor *createEditor();
|
||||
void contextMenuEvent(QContextMenuEvent *e);
|
||||
};
|
||||
|
||||
class CMakeDocument : public TextEditor::BaseTextDocument
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CMakeDocument();
|
||||
|
||||
QString defaultPath() const;
|
||||
QString suggestedFileName() const;
|
||||
};
|
||||
|
||||
class CMakeEditorFactory : public Core::IEditorFactory
|
||||
class CMakeEditorFactory : public TextEditor::BaseTextEditorFactory
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CMakeEditorFactory();
|
||||
Core::IEditor *createEditor();
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
Reference in New Issue
Block a user