summaryrefslogtreecommitdiff
path: root/src/plugins/glsleditor
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>2011-02-25 15:58:02 +0100
committerThorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>2011-02-25 16:11:20 +0100
commit70b70770a41f171be56d348c3427881eeb661968 (patch)
tree7682744780ad035b91fdf61ac11add40037414ab /src/plugins/glsleditor
parentb3169701013a01729cead5e0a4a9defd9246f423 (diff)
downloadqt-creator-70b70770a41f171be56d348c3427881eeb661968.tar.gz
Fixed layout issues in some editor toolbars
Cleaned up some hacky code in the process. Done-with: Tobias Hunger
Diffstat (limited to 'src/plugins/glsleditor')
-rw-r--r--src/plugins/glsleditor/glsleditor.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/plugins/glsleditor/glsleditor.cpp b/src/plugins/glsleditor/glsleditor.cpp
index 52cec9789b..79e5a11204 100644
--- a/src/plugins/glsleditor/glsleditor.cpp
+++ b/src/plugins/glsleditor/glsleditor.cpp
@@ -274,7 +274,7 @@ TextEditor::BaseTextEditor *GLSLTextEditorWidget::createEditor()
return editable;
}
-void GLSLTextEditorWidget::createToolBar(GLSLEditorEditable *editable)
+void GLSLTextEditorWidget::createToolBar(GLSLEditorEditable *editor)
{
m_outlineCombo = new QComboBox;
m_outlineCombo->setMinimumContentsLength(22);
@@ -295,10 +295,7 @@ void GLSLTextEditorWidget::createToolBar(GLSLEditorEditable *editable)
policy.setHorizontalPolicy(QSizePolicy::Expanding);
m_outlineCombo->setSizePolicy(policy);
- QToolBar *toolBar = static_cast<QToolBar*>(editable->toolBar());
-
- QList<QAction*> actions = toolBar->actions();
- toolBar->insertWidget(actions.first(), m_outlineCombo);
+ editor->insertExtraToolBarWidget(TextEditor::BaseTextEditor::Left, m_outlineCombo);
}
bool GLSLTextEditorWidget::event(QEvent *e)