TextEditor: Move toolbar widgets from *Editor to *Widget

Lifetime is coupled to the widgets, not the editor.

Change-Id: I01560bbdd6c399376d3a4184f0eb83e4153f830e
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
hjk
2014-08-01 16:41:18 +02:00
parent ac00146a94
commit a9b7045803
6 changed files with 68 additions and 85 deletions

View File

@@ -277,8 +277,8 @@ void CppEditorWidget::createToolBar(CPPEditor *editor)
connect(cmd, SIGNAL(keySequenceChanged()), this, SLOT(updatePreprocessorButtonTooltip()));
updatePreprocessorButtonTooltip();
connect(d->m_preprocessorButton, SIGNAL(clicked()), this, SLOT(showPreProcessorWidget()));
editor->insertExtraToolBarWidget(TextEditor::BaseTextEditor::Left, d->m_preprocessorButton);
editor->insertExtraToolBarWidget(TextEditor::BaseTextEditor::Left, d->m_cppEditorOutline->widget());
insertExtraToolBarWidget(TextEditor::BaseTextEditorWidget::Left, d->m_preprocessorButton);
insertExtraToolBarWidget(TextEditor::BaseTextEditorWidget::Left, d->m_cppEditorOutline->widget());
}
void CppEditorWidget::paste()