aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2016-11-30 22:58:43 (GMT)
committerAlbert Astals Cid <aacid@kde.org>2016-11-30 22:59:35 (GMT)
commit04a9ba13ebf279b8483377554cd1782661bbc5f8 (patch)
treeb35563b85666e5c1b8f67b90c7c32d888285d24a
parent29934219cb670eb2ef80a8089f9139578ad3eaa9 (diff)
Fix SQL plugin combobox to actually show on the toolbarv16.11.90
Summary: ↑ Test Plan: Tested, works better Reviewers: #kate Subscribers: kwrite-devel Differential Revision: https://phabricator.kde.org/D3115
-rw-r--r--addons/katesql/katesqlview.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/addons/katesql/katesqlview.cpp b/addons/katesql/katesqlview.cpp
index 3743686..89901c4 100644
--- a/addons/katesql/katesqlview.cpp
+++ b/addons/katesql/katesqlview.cpp
@@ -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") );