forked from qt-creator/qt-creator
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:
@@ -155,7 +155,6 @@ public:
|
|||||||
private:
|
private:
|
||||||
bool save(const QString &fileName = QString());
|
bool save(const QString &fileName = QString());
|
||||||
Link findLinkAt(const QTextCursor &cursor, bool resolveTarget = true, bool inNextSplit = false);
|
Link findLinkAt(const QTextCursor &cursor, bool resolveTarget = true, bool inNextSplit = false);
|
||||||
BaseTextEditor *createEditor();
|
|
||||||
void contextMenuEvent(QContextMenuEvent *e);
|
void contextMenuEvent(QContextMenuEvent *e);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -164,11 +163,6 @@ CMakeEditorWidget::CMakeEditorWidget()
|
|||||||
setCodeFoldingSupported(true);
|
setCodeFoldingSupported(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
BaseTextEditor *CMakeEditorWidget::createEditor()
|
|
||||||
{
|
|
||||||
QTC_ASSERT("should not happen anymore" && false, return 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CMakeEditorWidget::contextMenuEvent(QContextMenuEvent *e)
|
void CMakeEditorWidget::contextMenuEvent(QContextMenuEvent *e)
|
||||||
{
|
{
|
||||||
showDefaultContextMenu(e, Constants::M_CONTEXT);
|
showDefaultContextMenu(e, Constants::M_CONTEXT);
|
||||||
|
|||||||
@@ -250,11 +250,6 @@ CppEditorOutline *CppEditorWidget::outline() const
|
|||||||
return d->m_cppEditorOutline;
|
return d->m_cppEditorOutline;
|
||||||
}
|
}
|
||||||
|
|
||||||
TextEditor::BaseTextEditor *CppEditorWidget::createEditor()
|
|
||||||
{
|
|
||||||
QTC_ASSERT("should not happen anymore" && false, return 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CppEditorWidget::paste()
|
void CppEditorWidget::paste()
|
||||||
{
|
{
|
||||||
if (d->m_localRenaming.handlePaste())
|
if (d->m_localRenaming.handlePaste())
|
||||||
|
|||||||
@@ -109,7 +109,6 @@ protected:
|
|||||||
void keyPressEvent(QKeyEvent *e) QTC_OVERRIDE;
|
void keyPressEvent(QKeyEvent *e) QTC_OVERRIDE;
|
||||||
|
|
||||||
void applyFontSettings() QTC_OVERRIDE;
|
void applyFontSettings() QTC_OVERRIDE;
|
||||||
TextEditor::BaseTextEditor *createEditor() QTC_OVERRIDE;
|
|
||||||
|
|
||||||
bool openLink(const Link &link, bool inNextSplit) QTC_OVERRIDE
|
bool openLink(const Link &link, bool inNextSplit) QTC_OVERRIDE
|
||||||
{ return openCppEditorAt(link, inNextSplit); }
|
{ return openCppEditorAt(link, inNextSplit); }
|
||||||
|
|||||||
@@ -49,11 +49,6 @@ DesignerXmlEditorWidget::DesignerXmlEditorWidget(QDesignerFormWindowInterface *f
|
|||||||
configureMimeType(doc->mimeType());
|
configureMimeType(doc->mimeType());
|
||||||
}
|
}
|
||||||
|
|
||||||
TextEditor::BaseTextEditor *DesignerXmlEditorWidget::createEditor()
|
|
||||||
{
|
|
||||||
QTC_ASSERT("should not happen anymore" && false, return 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
FormWindowEditor *DesignerXmlEditorWidget::designerEditor() const
|
FormWindowEditor *DesignerXmlEditorWidget::designerEditor() const
|
||||||
{
|
{
|
||||||
return qobject_cast<FormWindowEditor *>(editor());
|
return qobject_cast<FormWindowEditor *>(editor());
|
||||||
|
|||||||
@@ -61,9 +61,6 @@ public:
|
|||||||
|
|
||||||
FormWindowEditor *designerEditor() const;
|
FormWindowEditor *designerEditor() const;
|
||||||
Internal::FormWindowFile *formWindowFile() const;
|
Internal::FormWindowFile *formWindowFile() const;
|
||||||
|
|
||||||
protected:
|
|
||||||
virtual TextEditor::BaseTextEditor *createEditor();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // Internal
|
} // Internal
|
||||||
|
|||||||
@@ -125,8 +125,6 @@ public:
|
|||||||
IAssistInterface *createAssistInterface(AssistKind assistKind, AssistReason reason) const;
|
IAssistInterface *createAssistInterface(AssistKind assistKind, AssistReason reason) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
BaseTextEditor *createEditor();
|
|
||||||
|
|
||||||
void updateDocumentNow();
|
void updateDocumentNow();
|
||||||
void setSelectedElements();
|
void setSelectedElements();
|
||||||
QString wordUnderCursor() const;
|
QString wordUnderCursor() const;
|
||||||
@@ -210,11 +208,6 @@ QString GlslEditorWidget::wordUnderCursor() const
|
|||||||
return word;
|
return word;
|
||||||
}
|
}
|
||||||
|
|
||||||
BaseTextEditor *GlslEditorWidget::createEditor()
|
|
||||||
{
|
|
||||||
QTC_ASSERT("should not happen anymore" && false, return 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void GlslEditorWidget::updateDocumentNow()
|
void GlslEditorWidget::updateDocumentNow()
|
||||||
{
|
{
|
||||||
m_updateDocumentTimer.stop();
|
m_updateDocumentTimer.stop();
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ namespace Internal {
|
|||||||
// PythonEditor
|
// PythonEditor
|
||||||
//
|
//
|
||||||
|
|
||||||
class PythonEditor : public TextEditor::BaseTextEditor
|
class PythonEditor : public BaseTextEditor
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PythonEditor()
|
PythonEditor()
|
||||||
@@ -80,7 +80,7 @@ public:
|
|||||||
// PythonEditorWidget
|
// PythonEditorWidget
|
||||||
//
|
//
|
||||||
|
|
||||||
class PythonEditorWidget : public TextEditor::BaseTextEditorWidget
|
class PythonEditorWidget : public BaseTextEditorWidget
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PythonEditorWidget()
|
PythonEditorWidget()
|
||||||
@@ -89,11 +89,6 @@ public:
|
|||||||
setMarksVisible(true);
|
setMarksVisible(true);
|
||||||
setCodeFoldingSupported(true);
|
setCodeFoldingSupported(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
TextEditor::BaseTextEditor *createEditor()
|
|
||||||
{
|
|
||||||
QTC_ASSERT("should not happen anymore" && false, return 0);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -79,7 +79,6 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
virtual Link findLinkAt(const QTextCursor &, bool resolveTarget = true,
|
virtual Link findLinkAt(const QTextCursor &, bool resolveTarget = true,
|
||||||
bool inNextSplit = false);
|
bool inNextSplit = false);
|
||||||
BaseTextEditor *createEditor();
|
|
||||||
void contextMenuEvent(QContextMenuEvent *);
|
void contextMenuEvent(QContextMenuEvent *);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -171,11 +170,6 @@ ProFileEditorWidget::Link ProFileEditorWidget::findLinkAt(const QTextCursor &cur
|
|||||||
return link;
|
return link;
|
||||||
}
|
}
|
||||||
|
|
||||||
BaseTextEditor *ProFileEditorWidget::createEditor()
|
|
||||||
{
|
|
||||||
QTC_ASSERT("should not happen anymore" && false, return 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ProFileEditorWidget::contextMenuEvent(QContextMenuEvent *e)
|
void ProFileEditorWidget::contextMenuEvent(QContextMenuEvent *e)
|
||||||
{
|
{
|
||||||
showDefaultContextMenu(e, Constants::M_CONTEXT);
|
showDefaultContextMenu(e, Constants::M_CONTEXT);
|
||||||
|
|||||||
@@ -526,11 +526,6 @@ bool QmlJSEditorWidget::isClosingBrace(const QList<Token> &tokens) const
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
BaseTextEditor *QmlJSEditorWidget::createEditor()
|
|
||||||
{
|
|
||||||
QTC_ASSERT("should not happen anymore" && false, return 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void QmlJSEditorWidget::createToolBar()
|
void QmlJSEditorWidget::createToolBar()
|
||||||
{
|
{
|
||||||
m_outlineCombo = new QComboBox;
|
m_outlineCombo = new QComboBox;
|
||||||
|
|||||||
@@ -105,7 +105,6 @@ protected:
|
|||||||
void resizeEvent(QResizeEvent *event);
|
void resizeEvent(QResizeEvent *event);
|
||||||
void scrollContentsBy(int dx, int dy);
|
void scrollContentsBy(int dx, int dy);
|
||||||
void applyFontSettings();
|
void applyFontSettings();
|
||||||
TextEditor::BaseTextEditor *createEditor();
|
|
||||||
void createToolBar();
|
void createToolBar();
|
||||||
TextEditor::BaseTextEditorWidget::Link findLinkAt(const QTextCursor &cursor,
|
TextEditor::BaseTextEditorWidget::Link findLinkAt(const QTextCursor &cursor,
|
||||||
bool resolveTarget = true,
|
bool resolveTarget = true,
|
||||||
|
|||||||
@@ -73,9 +73,4 @@ void SnippetEditorWidget::focusOutEvent(QFocusEvent *event)
|
|||||||
BaseTextEditorWidget::focusOutEvent(event);
|
BaseTextEditorWidget::focusOutEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
BaseTextEditor *SnippetEditorWidget::createEditor()
|
|
||||||
{
|
|
||||||
QTC_ASSERT("should not happen anymore" && false, return 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -49,7 +49,6 @@ protected:
|
|||||||
virtual void focusOutEvent(QFocusEvent *event);
|
virtual void focusOutEvent(QFocusEvent *event);
|
||||||
|
|
||||||
virtual int extraAreaWidth(int * /* markWidthPtr */ = 0) const { return 0; }
|
virtual int extraAreaWidth(int * /* markWidthPtr */ = 0) const { return 0; }
|
||||||
virtual BaseTextEditor *createEditor();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace TextEditor
|
} // namespace TextEditor
|
||||||
|
|||||||
@@ -827,11 +827,6 @@ bool VcsBaseEditorWidget::isModified() const
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
BaseTextEditor *VcsBaseEditorWidget::createEditor()
|
|
||||||
{
|
|
||||||
QTC_ASSERT("should not happen anymore" && false, return 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void VcsBaseEditorWidget::slotPopulateDiffBrowser()
|
void VcsBaseEditorWidget::slotPopulateDiffBrowser()
|
||||||
{
|
{
|
||||||
QComboBox *entriesComboBox = d->entriesComboBox();
|
QComboBox *entriesComboBox = d->entriesComboBox();
|
||||||
|
|||||||
@@ -226,8 +226,6 @@ public slots:
|
|||||||
void reportCommandFinished(bool ok, int exitCode, const QVariant &data);
|
void reportCommandFinished(bool ok, int exitCode, const QVariant &data);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual TextEditor::BaseTextEditor *createEditor();
|
|
||||||
|
|
||||||
void contextMenuEvent(QContextMenuEvent *e);
|
void contextMenuEvent(QContextMenuEvent *e);
|
||||||
void mouseMoveEvent(QMouseEvent *e);
|
void mouseMoveEvent(QMouseEvent *e);
|
||||||
void mouseReleaseEvent(QMouseEvent *e);
|
void mouseReleaseEvent(QMouseEvent *e);
|
||||||
|
|||||||
Reference in New Issue
Block a user