Commit e00aa54f authored by Eike Ziller's avatar Eike Ziller

Add override keyword to IEditor & TextEditorWidget implementations

Change-Id: I403101d788d9edfea5c5c9440ab4f39ad00e81f7
Reviewed-by: default avatarTobias Hunger <tobias.hunger@theqtcompany.com>
parent 686def2d
......@@ -101,6 +101,11 @@ int AndroidManifestEditor::currentColumn() const
return cursor.position() - cursor.block().position() + 1;
}
void AndroidManifestEditor::gotoLine(int line, int column, bool centerLine)
{
textEditor()->gotoLine(line, column, centerLine);
}
void AndroidManifestEditor::changeEditorPage(QAction *action)
{
if (!widget()->setActivePage(static_cast<AndroidManifestEditorWidget::EditorPage>(action->data().toInt()))) {
......
......@@ -54,15 +54,15 @@ class AndroidManifestEditor : public Core::IEditor
public:
explicit AndroidManifestEditor(AndroidManifestEditorWidget *editorWidget);
bool open(QString *errorString, const QString &fileName, const QString &realFileName);
QWidget *toolBar();
AndroidManifestEditorWidget *widget() const;
Core::IDocument *document();
bool open(QString *errorString, const QString &fileName, const QString &realFileName) override;
QWidget *toolBar() override;
AndroidManifestEditorWidget *widget() const override;
Core::IDocument *document() override;
TextEditor::TextEditorWidget *textEditor() const;
int currentLine() const;
int currentColumn() const;
void gotoLine(int line, int column = 0, bool centerLine = true) { textEditor()->gotoLine(line, column, centerLine); }
int currentLine() const override;
int currentColumn() const override;
void gotoLine(int line, int column = 0, bool centerLine = true) override;
private slots:
void changeEditorPage(QAction *action);
......
......@@ -45,9 +45,10 @@ public:
BazaarEditorWidget();
private:
QSet<QString> annotationChanges() const;
QString changeUnderCursor(const QTextCursor &cursor) const;
VcsBase::BaseAnnotationHighlighter *createAnnotationHighlighter(const QSet<QString> &changes) const;
QSet<QString> annotationChanges() const override;
QString changeUnderCursor(const QTextCursor &cursor) const override;
VcsBase::BaseAnnotationHighlighter *createAnnotationHighlighter(
const QSet<QString> &changes) const override;
mutable QRegExp m_changesetId;
mutable QRegExp m_exactChangesetId;
......
......@@ -404,18 +404,18 @@ public:
updateCursorPosition(widget->cursorPosition());
}
~BinEditor()
~BinEditor() override
{
delete m_widget;
}
bool open(QString *errorString, const QString &fileName, const QString &realFileName) {
bool open(QString *errorString, const QString &fileName, const QString &realFileName) override {
QTC_ASSERT(fileName == realFileName, return false); // The bineditor can do no autosaving
return m_file->open(errorString, fileName);
}
IDocument *document() { return m_file; }
IDocument *document() override { return m_file; }
QWidget *toolBar() { return m_toolBar; }
QWidget *toolBar() override { return m_toolBar; }
private slots:
void updateCursorPosition(int position) {
......
......@@ -47,9 +47,10 @@ public:
ClearCaseEditorWidget();
private:
QSet<QString> annotationChanges() const;
QString changeUnderCursor(const QTextCursor &) const;
VcsBase::BaseAnnotationHighlighter *createAnnotationHighlighter(const QSet<QString> &changes) const;
QSet<QString> annotationChanges() const override;
QString changeUnderCursor(const QTextCursor &) const override;
VcsBase::BaseAnnotationHighlighter *createAnnotationHighlighter(
const QSet<QString> &changes) const override;
QRegExp m_versionNumberPattern;
};
......
......@@ -54,7 +54,7 @@ public:
void setIsUcm(bool isUcm);
protected:
QByteArray fileContents() const;
QByteArray fileContents() const override;
};
......
......@@ -148,8 +148,8 @@ public:
private:
bool save(const QString &fileName = QString());
Link findLinkAt(const QTextCursor &cursor, bool resolveTarget = true, bool inNextSplit = false);
void contextMenuEvent(QContextMenuEvent *e);
Link findLinkAt(const QTextCursor &cursor, bool resolveTarget = true, bool inNextSplit = false) override;
void contextMenuEvent(QContextMenuEvent *e) override;
};
void CMakeEditorWidget::contextMenuEvent(QContextMenuEvent *e)
......
......@@ -47,8 +47,8 @@ class CMakeEditor : public TextEditor::BaseTextEditor
public:
CMakeEditor();
void finalizeInitialization();
QString contextHelpId() const;
void finalizeInitialization() override;
QString contextHelpId() const override;
friend class CMakeEditorWidget;
};
......
......@@ -65,7 +65,7 @@ class CppEditorWidget : public TextEditor::TextEditorWidget
public:
CppEditorWidget();
~CppEditorWidget();
~CppEditorWidget() override;
CppEditorDocument *cppEditorDocument() const;
CppTools::CppEditorOutline *outline() const;
......
......@@ -46,10 +46,11 @@ public:
CvsEditorWidget();
private:
QSet<QString> annotationChanges() const;
QString changeUnderCursor(const QTextCursor &) const;
VcsBase::BaseAnnotationHighlighter *createAnnotationHighlighter(const QSet<QString> &changes) const;
QStringList annotationPreviousVersions(const QString &revision) const;
QSet<QString> annotationChanges() const override;
QString changeUnderCursor(const QTextCursor &) const override;
VcsBase::BaseAnnotationHighlighter *createAnnotationHighlighter(
const QSet<QString> &changes) const override;
QStringList annotationPreviousVersions(const QString &revision) const override;
mutable QRegExp m_revisionAnnotationPattern;
mutable QRegExp m_revisionLogPattern;
......
......@@ -120,7 +120,7 @@ class DesignerXmlEditorWidget : public TextEditor::TextEditorWidget
public:
DesignerXmlEditorWidget() {}
void finalizeInitialization()
void finalizeInitialization() override
{
setReadOnly(true);
}
......
......@@ -93,17 +93,17 @@ class DescriptionEditorWidget : public TextEditorWidget
Q_OBJECT
public:
DescriptionEditorWidget(QWidget *parent = 0);
virtual QSize sizeHint() const;
virtual QSize sizeHint() const override;
signals:
void requestBranchList();
protected:
void mouseMoveEvent(QMouseEvent *e);
void mouseReleaseEvent(QMouseEvent *e);
void mouseMoveEvent(QMouseEvent *e) override;
void mouseReleaseEvent(QMouseEvent *e) override;
void setDisplaySettings(const DisplaySettings &ds);
void setMarginSettings(const MarginSettings &ms);
void setDisplaySettings(const DisplaySettings &ds) override;
void setMarginSettings(const MarginSettings &ms) override;
bool findContentsUnderCursor(const QTextCursor &cursor);
void highlightCurrentContents();
......
......@@ -60,16 +60,16 @@ class DiffEditor : public Core::IEditor
public:
DiffEditor(DiffEditorDocument *doc);
~DiffEditor();
~DiffEditor() override;
Core::IEditor *duplicate();
Core::IEditor *duplicate() override;
bool open(QString *errorString,
const QString &fileName,
const QString &realFileName);
Core::IDocument *document();
const QString &realFileName) override;
Core::IDocument *document() override;
QWidget *toolBar();
QWidget *toolBar() override;
private slots:
void documentHasChanged();
......
......@@ -53,7 +53,7 @@ class SelectableTextEditorWidget : public TextEditor::TextEditorWidget
Q_OBJECT
public:
SelectableTextEditorWidget(Core::Id id, QWidget *parent = 0);
~SelectableTextEditorWidget();
~SelectableTextEditorWidget() override;
void setSelections(const QMap<int, QList<DiffSelection> > &selections);
private:
......@@ -61,7 +61,7 @@ private:
const QTextBlock &block,
const QPointF &offset,
const QVector<QTextLayout::FormatRange> &selections,
const QRect &clipRect) const;
const QRect &clipRect) const override;
// block number, list of ranges
// DiffSelection.start - can be -1 (continues from the previous line)
......
......@@ -104,7 +104,7 @@ public:
void restoreState();
public slots:
void setDisplaySettings(const DisplaySettings &ds);
void setDisplaySettings(const DisplaySettings &ds) override;
signals:
void jumpToOriginalFileRequested(int diffFileIndex,
......@@ -115,21 +115,21 @@ signals:
int chunkIndex);
protected:
virtual int extraAreaWidth(int *markWidthPtr = 0) const {
int extraAreaWidth(int *markWidthPtr = 0) const override {
return SelectableTextEditorWidget::extraAreaWidth(markWidthPtr);
}
void applyFontSettings();
virtual QString lineNumber(int blockNumber) const;
virtual int lineNumberDigits() const;
virtual bool selectionVisible(int blockNumber) const;
virtual bool replacementVisible(int blockNumber) const;
QColor replacementPenColor(int blockNumber) const;
virtual QString plainTextFromSelection(const QTextCursor &cursor) const;
void mouseDoubleClickEvent(QMouseEvent *e);
void contextMenuEvent(QContextMenuEvent *e);
virtual void paintEvent(QPaintEvent *e);
virtual void scrollContentsBy(int dx, int dy);
void applyFontSettings() override;
QString lineNumber(int blockNumber) const override;
int lineNumberDigits() const override;
bool selectionVisible(int blockNumber) const override;
bool replacementVisible(int blockNumber) const override;
QColor replacementPenColor(int blockNumber) const override;
QString plainTextFromSelection(const QTextCursor &cursor) const override;
void mouseDoubleClickEvent(QMouseEvent *e) override;
void contextMenuEvent(QContextMenuEvent *e) override;
void paintEvent(QPaintEvent *e) override;
void scrollContentsBy(int dx, int dy) override;
private:
void paintSeparator(QPainter &painter, QColor &color, const QString &text,
......
......@@ -74,13 +74,13 @@ signals:
void currentDiffFileIndexChanged(int index);
public slots:
void setDisplaySettings(const TextEditor::DisplaySettings &ds);
void setDisplaySettings(const TextEditor::DisplaySettings &ds) override;
protected:
void mouseDoubleClickEvent(QMouseEvent *e);
void contextMenuEvent(QContextMenuEvent *e);
QString lineNumber(int blockNumber) const;
int lineNumberDigits() const;
void mouseDoubleClickEvent(QMouseEvent *e) override;
void contextMenuEvent(QContextMenuEvent *e) override;
QString lineNumber(int blockNumber) const override;
int lineNumberDigits() const override;
private slots:
void setFontSettings(const TextEditor::FontSettings &fontSettings);
......
......@@ -52,7 +52,7 @@ class GitSubmitEditor : public VcsBase::VcsBaseSubmitEditor
Q_OBJECT
public:
explicit GitSubmitEditor(const VcsBase::VcsBaseSubmitEditorParameters *parameters);
~GitSubmitEditor();
~GitSubmitEditor() override;
void setCommitData(const CommitData &);
GitSubmitEditorPanelData panelData() const;
......
......@@ -122,7 +122,7 @@ public:
QSet<QString> identifiers() const;
AssistInterface *createAssistInterface(AssistKind assistKind, AssistReason reason) const;
AssistInterface *createAssistInterface(AssistKind assistKind, AssistReason reason) const override;
private:
void updateDocumentNow();
......
......@@ -53,13 +53,13 @@ class ImageViewer : public Core::IEditor
public:
explicit ImageViewer(QWidget *parent = 0);
~ImageViewer();
~ImageViewer() override;
bool open(QString *errorString, const QString &fileName, const QString &realFileName);
Core::IDocument *document();
QWidget *toolBar();
bool open(QString *errorString, const QString &fileName, const QString &realFileName) override;
Core::IDocument *document() override;
QWidget *toolBar() override;
IEditor *duplicate();
IEditor *duplicate() override;
public slots:
void imageSizeUpdated(const QSize &size);
......
......@@ -45,11 +45,12 @@ public:
MercurialEditorWidget();
private:
QSet<QString> annotationChanges() const;
QString changeUnderCursor(const QTextCursor &cursor) const;
VcsBase::BaseAnnotationHighlighter *createAnnotationHighlighter(const QSet<QString> &changes) const;
QString decorateVersion(const QString &revision) const;
QStringList annotationPreviousVersions(const QString &revision) const;
QSet<QString> annotationChanges() const override;
QString changeUnderCursor(const QTextCursor &cursor) const override;
VcsBase::BaseAnnotationHighlighter *createAnnotationHighlighter(
const QSet<QString> &changes) const override;
QString decorateVersion(const QString &revision) const override;
QStringList annotationPreviousVersions(const QString &revision) const override;
mutable QRegExp exactIdentifier12;
mutable QRegExp exactIdentifier40;
......
......@@ -46,11 +46,12 @@ public:
PerforceEditorWidget();
private:
QSet<QString> annotationChanges() const;
QString changeUnderCursor(const QTextCursor &) const;
VcsBase::BaseAnnotationHighlighter *createAnnotationHighlighter(const QSet<QString> &changes) const;
QString findDiffFile(const QString &f) const;
QStringList annotationPreviousVersions(const QString &v) const;
QSet<QString> annotationChanges() const override;
QString changeUnderCursor(const QTextCursor &) const override;
VcsBase::BaseAnnotationHighlighter *createAnnotationHighlighter(
const QSet<QString> &changes) const override;
QString findDiffFile(const QString &f) const override;
QStringList annotationPreviousVersions(const QString &v) const override;
mutable QRegExp m_changeNumberPattern;
};
......
......@@ -65,8 +65,8 @@ public:
static QString fileFromChangeLine(const QString &line);
protected:
QByteArray fileContents() const;
bool setFileContents(const QByteArray &contents);
QByteArray fileContents() const override;
bool setFileContents(const QByteArray &contents) override;
private:
inline PerforceSubmitEditorWidget *submitEditorWidget();
......
......@@ -65,8 +65,8 @@ public:
protected:
virtual Link findLinkAt(const QTextCursor &, bool resolveTarget = true,
bool inNextSplit = false);
void contextMenuEvent(QContextMenuEvent *);
bool inNextSplit = false) override;
void contextMenuEvent(QContextMenuEvent *) override;
};
static bool isValidFileNameChar(const QChar &c)
......
......@@ -67,14 +67,14 @@ class QmlJSEditorWidget : public TextEditor::TextEditorWidget
public:
QmlJSEditorWidget();
void finalizeInitialization();
void finalizeInitialization() override;
QmlJSEditorDocument *qmlJsEditorDocument() const;
QModelIndex outlineModelIndex();
TextEditor::AssistInterface *createAssistInterface(TextEditor::AssistKind assistKind,
TextEditor::AssistReason reason) const;
TextEditor::AssistReason reason) const override;
void inspectElementUnderCursor() const;
......@@ -103,18 +103,18 @@ private slots:
void updateCodeWarnings(QmlJS::Document::Ptr doc);
protected:
void contextMenuEvent(QContextMenuEvent *e);
bool event(QEvent *e);
void wheelEvent(QWheelEvent *event);
void resizeEvent(QResizeEvent *event);
void scrollContentsBy(int dx, int dy);
void applyFontSettings();
void contextMenuEvent(QContextMenuEvent *e) override;
bool event(QEvent *e) override;
void wheelEvent(QWheelEvent *event) override;
void resizeEvent(QResizeEvent *event) override;
void scrollContentsBy(int dx, int dy) override;
void applyFontSettings() override;
void createToolBar();
TextEditor::TextEditorWidget::Link findLinkAt(const QTextCursor &cursor,
bool resolveTarget = true,
bool inNextSplit = false);
QString foldReplacementText(const QTextBlock &block) const;
void onRefactorMarkerClicked(const TextEditor::RefactorMarker &marker);
bool inNextSplit = false) override;
QString foldReplacementText(const QTextBlock &block) const override;
void onRefactorMarkerClicked(const TextEditor::RefactorMarker &marker) override;
private:
bool isClosingBrace(const QList<QmlJS::Token> &tokens) const;
......@@ -151,7 +151,7 @@ class QmlJSEditor : public TextEditor::BaseTextEditor
public:
QmlJSEditor();
bool isDesignModePreferred() const;
bool isDesignModePreferred() const override;
};
class QmlJSEditorFactory : public TextEditor::TextEditorFactory
......
......@@ -92,12 +92,12 @@ public:
ResourceEditorW(const Core::Context &context,
ResourceEditorPlugin *plugin,
QWidget *parent = 0);
~ResourceEditorW();
~ResourceEditorW() override;
// IEditor
bool open(QString *errorString, const QString &fileName, const QString &realFileName);
Core::IDocument *document() { return m_resourceDocument; }
QWidget *toolBar();
bool open(QString *errorString, const QString &fileName, const QString &realFileName) override;
Core::IDocument *document() override { return m_resourceDocument; }
QWidget *toolBar() override;
private slots:
void onUndoStackChanged(bool canUndo, bool canRedo);
......
......@@ -46,10 +46,11 @@ public:
SubversionEditorWidget();
private:
QSet<QString> annotationChanges() const;
QString changeUnderCursor(const QTextCursor &) const;
VcsBase::BaseAnnotationHighlighter *createAnnotationHighlighter(const QSet<QString> &changes) const;
QStringList annotationPreviousVersions(const QString &) const;
QSet<QString> annotationChanges() const override;
QString changeUnderCursor(const QTextCursor &) const override;
VcsBase::BaseAnnotationHighlighter *createAnnotationHighlighter(
const QSet<QString> &changes) const override;
QStringList annotationPreviousVersions(const QString &) const override;
QRegularExpression m_changeNumberPattern;
QRegularExpression m_revisionNumberPattern;
......
......@@ -51,8 +51,8 @@ public:
void setStatusList(const QList<StatusFilePair> &statusOutput);
QByteArray fileContents() const;
bool setFileContents(const QByteArray &contents);
QByteArray fileContents() const override;
bool setFileContents(const QByteArray &contents) override;
};
} // namespace Internal
......
......@@ -51,7 +51,7 @@ class PlainTextEditorWidget : public TextEditorWidget
{
public:
PlainTextEditorWidget() {}
void finalizeInitialization()
void finalizeInitialization() override
{
textDocument()->setMimeType(QLatin1String(Constants::C_TEXTEDITOR_MIMETYPE_TEXT));
}
......
......@@ -47,9 +47,9 @@ signals:
void snippetContentChanged();
protected:
virtual void focusOutEvent(QFocusEvent *event);
virtual void focusOutEvent(QFocusEvent *event) override;
virtual int extraAreaWidth(int * /* markWidthPtr */ = 0) const { return 0; }
virtual int extraAreaWidth(int * /* markWidthPtr */ = 0) const override { return 0; }
};
} // namespace TextEditor
......
......@@ -149,21 +149,21 @@ public:
void addContext(Core::Id id);
// IEditor
Core::IDocument *document();
bool open(QString *errorString, const QString &fileName, const QString &realFileName);
Core::IDocument *document() override;
bool open(QString *errorString, const QString &fileName, const QString &realFileName) override;
IEditor *duplicate();
IEditor *duplicate() override;
QByteArray saveState() const;
bool restoreState(const QByteArray &state);
QWidget *toolBar();
QByteArray saveState() const override;
bool restoreState(const QByteArray &state) override;
QWidget *toolBar() override;
QString contextHelpId() const; // from IContext
void setContextHelpId(const QString &id);
QString contextHelpId() const override; // from IContext
void setContextHelpId(const QString &id) override;
int currentLine() const;
int currentColumn() const;
void gotoLine(int line, int column = 0, bool centerLine = true);
int currentLine() const override;
int currentColumn() const override;
void gotoLine(int line, int column = 0, bool centerLine = true) override;
/*! Returns the amount of visible columns (in characters) in the editor */
int columnCount() const;
......@@ -205,7 +205,7 @@ class TEXTEDITOR_EXPORT TextEditorWidget : public QPlainTextEdit
public:
TextEditorWidget(QWidget *parent = 0);
~TextEditorWidget();
~TextEditorWidget() override;
void setTextDocument(const QSharedPointer<TextDocument> &doc);
TextDocument *textDocument() const;
......@@ -488,34 +488,34 @@ signals:
protected:
QTextBlock blockForVisibleRow(int row) const;
bool event(QEvent *e);
void inputMethodEvent(QInputMethodEvent *e);
void keyPressEvent(QKeyEvent *e);
void wheelEvent(QWheelEvent *e);
void changeEvent(QEvent *e);
void focusInEvent(QFocusEvent *e);
void focusOutEvent(QFocusEvent *e);
void showEvent(QShowEvent *);
bool viewportEvent(QEvent *event);
void resizeEvent(QResizeEvent *);
void paintEvent(QPaintEvent *);
bool event(QEvent *e) override;
void inputMethodEvent(QInputMethodEvent *e) override;
void keyPressEvent(QKeyEvent *e) override;
void wheelEvent(QWheelEvent *e) override;
void changeEvent(QEvent *e) override;
void focusInEvent(QFocusEvent *e) override;
void focusOutEvent(QFocusEvent *e) override;
void showEvent(QShowEvent *) override;
bool viewportEvent(QEvent *event) override;
void resizeEvent(QResizeEvent *) override;
void paintEvent(QPaintEvent *) override;
virtual void paintBlock(QPainter *painter,
const QTextBlock &block,
const QPointF &offset,
const QVector<QTextLayout::FormatRange> &selections,
const QRect &clipRect) const;
void timerEvent(QTimerEvent *);
void mouseMoveEvent(QMouseEvent *);
void mousePressEvent(QMouseEvent *);
void mouseReleaseEvent(QMouseEvent *);
void mouseDoubleClickEvent(QMouseEvent *);
void leaveEvent(QEvent *);
void keyReleaseEvent(QKeyEvent *);
void dragEnterEvent(QDragEnterEvent *e);
QMimeData *createMimeDataFromSelection() const;
bool canInsertFromMimeData(const QMimeData *source) const;
void insertFromMimeData(const QMimeData *source);
void timerEvent(QTimerEvent *) override;
void mouseMoveEvent(QMouseEvent *) override;
void mousePressEvent(QMouseEvent *) override;
void mouseReleaseEvent(QMouseEvent *) override;
void mouseDoubleClickEvent(QMouseEvent *) override;
void leaveEvent(QEvent *) override;
void keyReleaseEvent(QKeyEvent *) override;
void dragEnterEvent(QDragEnterEvent *e) override;
QMimeData *createMimeDataFromSelection() const override;
bool canInsertFromMimeData(const QMimeData *source) const override;
void insertFromMimeData(const QMimeData *source) override;
virtual QString plainTextFromSelection(const QTextCursor &cursor) const;
static QString convertToPlainText(const QString &txt);
......
......@@ -132,7 +132,7 @@ public:
static Core::IEditor* locateEditorByTag(const QString &tag);
static QString editorTag(EditorContentType t, const QString &workingDirectory, const QStringList &files,
const QString &revision = QString());
void finalizeInitialization();
void finalizeInitialization() override;
signals:
void describeRequested(const QString &source, const QString &change);
void annotateRevisionRequested(const QString &workingDirectory, const QString &file,
......@@ -161,7 +161,7 @@ protected:
virtual QString fileNameForLine(int line) const;
public:
void finalizeInitialization();
void finalizeInitialization() override;
// FIXME: Consolidate these into finalizeInitialization
void setDescribeSlot(QObject *describeReceiver, const char *describeSlot);
// void
......@@ -169,7 +169,7 @@ public:
//
void setParameters(const VcsBaseEditorParameters *parameters);
~VcsBaseEditorWidget();
~VcsBaseEditorWidget() override;
/* Force read-only: Make it a read-only, temporary file.
* Should be set to true by version control views. It is not on
......@@ -230,11 +230,11 @@ public slots:
void reportCommandFinished(bool ok, int exitCode, const QVariant &data);
protected:
void contextMenuEvent(QContextMenuEvent *e);
void mouseMoveEvent(QMouseEvent *e);
void mouseReleaseEvent(QMouseEvent *e);
void mouseDoubleClickEvent(QMouseEvent *e);
void keyPressEvent(QKeyEvent *);
void contextMenuEvent(QContextMenuEvent *e) override;
void mouseMoveEvent(QMouseEvent *e) override;
void mouseReleaseEvent(QMouseEvent *e) override;
void mouseDoubleClickEvent(QMouseEvent *e) override;
void keyPressEvent(QKeyEvent *) override;
private slots:
void slotActivateAnnotation();
......
......@@ -82,7 +82,7 @@ public:
void unregisterActions(QAction *editorUndoAction, QAction *editorRedoAction,
QAction *submitAction = 0, QAction *diffAction = 0);
~VcsBaseSubmitEditor();
~VcsBaseSubmitEditor() override;
// A utility routine to be called when closing a submit editor.
// Runs checks on the message and prompts according to configuration.
......@@ -114,10 +114,10 @@ public:
void setCheckScriptWorkingDirectory(const QString &);
// Core::IEditor
bool open(QString *errorString, const QString &fileName, const QString &realFileName);
Core::IDocument *document();
bool open(QString *errorString, const QString &<