Commit 12642cc4 authored by hjk's avatar hjk

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: default avatarChristian Stenger <christian.stenger@digia.com>
parent 761f8de7
......@@ -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);
......
......@@ -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())
......
......@@ -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); }
......
......@@ -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());
......
......@@ -61,9 +61,6 @@ public:
FormWindowEditor *designerEditor() const;
Internal::FormWindowFile *formWindowFile() const;
protected:
virtual TextEditor::BaseTextEditor *createEditor();
};
} // Internal
......
......@@ -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();
......
......@@ -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);
}
};
......
......@@ -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);
......
......@@ -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;
......
......@@ -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,
......
......@@ -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
......@@ -49,7 +49,6 @@ protected:
virtual void focusOutEvent(QFocusEvent *event);
virtual int extraAreaWidth(int * /* markWidthPtr */ = 0) const { return 0; }
virtual BaseTextEditor *createEditor();
};
} // namespace TextEditor
......
......@@ -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();
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment