TextEditor: Remove some *Widget::createEditor implementation

This removes the ones that were not to be used anymore.
The fallback in the base class is left in for now.

Change-Id: I5e7ab16497a83eff9b11deb9e1feb390757eac0e
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This commit is contained in:
hjk
2014-08-28 11:34:19 +02:00
parent 761f8de751
commit 12642cc49a
14 changed files with 2 additions and 59 deletions

View File

@@ -155,7 +155,6 @@ public:
private:
bool save(const QString &fileName = QString());
Link findLinkAt(const QTextCursor &cursor, bool resolveTarget = true, bool inNextSplit = false);
BaseTextEditor *createEditor();
void contextMenuEvent(QContextMenuEvent *e);
};
@@ -164,11 +163,6 @@ CMakeEditorWidget::CMakeEditorWidget()
setCodeFoldingSupported(true);
}
BaseTextEditor *CMakeEditorWidget::createEditor()
{
QTC_ASSERT("should not happen anymore" && false, return 0);
}
void CMakeEditorWidget::contextMenuEvent(QContextMenuEvent *e)
{
showDefaultContextMenu(e, Constants::M_CONTEXT);

View File

@@ -250,11 +250,6 @@ CppEditorOutline *CppEditorWidget::outline() const
return d->m_cppEditorOutline;
}
TextEditor::BaseTextEditor *CppEditorWidget::createEditor()
{
QTC_ASSERT("should not happen anymore" && false, return 0);
}
void CppEditorWidget::paste()
{
if (d->m_localRenaming.handlePaste())

View File

@@ -109,7 +109,6 @@ protected:
void keyPressEvent(QKeyEvent *e) QTC_OVERRIDE;
void applyFontSettings() QTC_OVERRIDE;
TextEditor::BaseTextEditor *createEditor() QTC_OVERRIDE;
bool openLink(const Link &link, bool inNextSplit) QTC_OVERRIDE
{ return openCppEditorAt(link, inNextSplit); }

View File

@@ -49,11 +49,6 @@ DesignerXmlEditorWidget::DesignerXmlEditorWidget(QDesignerFormWindowInterface *f
configureMimeType(doc->mimeType());
}
TextEditor::BaseTextEditor *DesignerXmlEditorWidget::createEditor()
{
QTC_ASSERT("should not happen anymore" && false, return 0);
}
FormWindowEditor *DesignerXmlEditorWidget::designerEditor() const
{
return qobject_cast<FormWindowEditor *>(editor());

View File

@@ -61,9 +61,6 @@ public:
FormWindowEditor *designerEditor() const;
Internal::FormWindowFile *formWindowFile() const;
protected:
virtual TextEditor::BaseTextEditor *createEditor();
};
} // Internal

View File

@@ -125,8 +125,6 @@ public:
IAssistInterface *createAssistInterface(AssistKind assistKind, AssistReason reason) const;
private:
BaseTextEditor *createEditor();
void updateDocumentNow();
void setSelectedElements();
QString wordUnderCursor() const;
@@ -210,11 +208,6 @@ QString GlslEditorWidget::wordUnderCursor() const
return word;
}
BaseTextEditor *GlslEditorWidget::createEditor()
{
QTC_ASSERT("should not happen anymore" && false, return 0);
}
void GlslEditorWidget::updateDocumentNow()
{
m_updateDocumentTimer.stop();

View File

@@ -57,7 +57,7 @@ namespace Internal {
// PythonEditor
//
class PythonEditor : public TextEditor::BaseTextEditor
class PythonEditor : public BaseTextEditor
{
public:
PythonEditor()
@@ -80,7 +80,7 @@ public:
// PythonEditorWidget
//
class PythonEditorWidget : public TextEditor::BaseTextEditorWidget
class PythonEditorWidget : public BaseTextEditorWidget
{
public:
PythonEditorWidget()
@@ -89,11 +89,6 @@ public:
setMarksVisible(true);
setCodeFoldingSupported(true);
}
TextEditor::BaseTextEditor *createEditor()
{
QTC_ASSERT("should not happen anymore" && false, return 0);
}
};

View File

@@ -79,7 +79,6 @@ public:
protected:
virtual Link findLinkAt(const QTextCursor &, bool resolveTarget = true,
bool inNextSplit = false);
BaseTextEditor *createEditor();
void contextMenuEvent(QContextMenuEvent *);
};
@@ -171,11 +170,6 @@ ProFileEditorWidget::Link ProFileEditorWidget::findLinkAt(const QTextCursor &cur
return link;
}
BaseTextEditor *ProFileEditorWidget::createEditor()
{
QTC_ASSERT("should not happen anymore" && false, return 0);
}
void ProFileEditorWidget::contextMenuEvent(QContextMenuEvent *e)
{
showDefaultContextMenu(e, Constants::M_CONTEXT);

View File

@@ -526,11 +526,6 @@ bool QmlJSEditorWidget::isClosingBrace(const QList<Token> &tokens) const
return false;
}
BaseTextEditor *QmlJSEditorWidget::createEditor()
{
QTC_ASSERT("should not happen anymore" && false, return 0);
}
void QmlJSEditorWidget::createToolBar()
{
m_outlineCombo = new QComboBox;

View File

@@ -105,7 +105,6 @@ protected:
void resizeEvent(QResizeEvent *event);
void scrollContentsBy(int dx, int dy);
void applyFontSettings();
TextEditor::BaseTextEditor *createEditor();
void createToolBar();
TextEditor::BaseTextEditorWidget::Link findLinkAt(const QTextCursor &cursor,
bool resolveTarget = true,

View File

@@ -73,9 +73,4 @@ void SnippetEditorWidget::focusOutEvent(QFocusEvent *event)
BaseTextEditorWidget::focusOutEvent(event);
}
BaseTextEditor *SnippetEditorWidget::createEditor()
{
QTC_ASSERT("should not happen anymore" && false, return 0);
}
} // namespace

View File

@@ -49,7 +49,6 @@ protected:
virtual void focusOutEvent(QFocusEvent *event);
virtual int extraAreaWidth(int * /* markWidthPtr */ = 0) const { return 0; }
virtual BaseTextEditor *createEditor();
};
} // namespace TextEditor

View File

@@ -827,11 +827,6 @@ bool VcsBaseEditorWidget::isModified() const
return false;
}
BaseTextEditor *VcsBaseEditorWidget::createEditor()
{
QTC_ASSERT("should not happen anymore" && false, return 0);
}
void VcsBaseEditorWidget::slotPopulateDiffBrowser()
{
QComboBox *entriesComboBox = d->entriesComboBox();

View File

@@ -226,8 +226,6 @@ public slots:
void reportCommandFinished(bool ok, int exitCode, const QVariant &data);
protected:
virtual TextEditor::BaseTextEditor *createEditor();
void contextMenuEvent(QContextMenuEvent *e);
void mouseMoveEvent(QMouseEvent *e);
void mouseReleaseEvent(QMouseEvent *e);