Commit 04a9ba13 authored by Albert Astals Cid's avatar Albert Astals Cid

Fix SQL plugin combobox to actually show on the toolbar

Summary: ↑

Test Plan: Tested, works better

Reviewers: #kate

Subscribers: kwrite-devel

Differential Revision: https://phabricator.kde.org/D3115
parent 29934219
......@@ -75,11 +75,10 @@ KateSQLView::KateSQLView(KTextEditor::Plugin *plugin, KTextEditor::MainWindow *m
m_schemaBrowserWidget = new SchemaBrowserWidget(m_schemaBrowserToolView, m_manager);
m_connectionsComboBox = new KComboBox(this);
m_connectionsComboBox = new KComboBox(false);
m_connectionsComboBox->setEditable(false);
m_connectionsComboBox->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
m_connectionsComboBox->setModel(m_manager->connectionModel());
// m_connectionsComboBox->setItemDelegate( new ConnectionDelegate(this) );
setupActions();
......@@ -140,9 +139,10 @@ void KateSQLView::setupActions()
action->setIcon( QIcon::fromTheme (QLatin1String ("view-refresh")) );
connect( action , SIGNAL(triggered()) , this , SLOT(slotConnectionReconnect()) );
action = collection->addAction(QLatin1String ("connection_chooser"));
action->setText( i18nc("@action:intoolbar", "Connection") );
// FIXME KF5 action->setDefaultWidget(m_connectionsComboBox);
QWidgetAction *wa = new QWidgetAction(this);
collection->addAction(QLatin1String ("connection_chooser"), wa);
wa->setText( i18nc("@action:intoolbar", "Connection") );
wa->setDefaultWidget(m_connectionsComboBox);
action = collection->addAction(QLatin1String ("query_run"));
action->setText( i18nc("@action:inmenu", "Run query") );
......
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