Commit 87f77af7 authored by Lukáš Tinkl's avatar Lukáš Tinkl
Browse files

bring back the search line widget to the editor

parent b1b84085
......@@ -67,8 +67,6 @@ ConnectionEditor::ConnectionEditor(QWidget* parent, Qt::WindowFlags flags)
m_editor->setupUi(tmp);
setCentralWidget(tmp);
setWindowTitle(i18n("Connection editor")); // TODO this shouldn't be necessary
m_editor->connectionsWidget->setSortingEnabled(false);
m_editor->connectionsWidget->sortByColumn(0, Qt::AscendingOrder);
m_editor->connectionsWidget->setSortingEnabled(true);
......@@ -78,7 +76,7 @@ ConnectionEditor::ConnectionEditor(QWidget* parent, Qt::WindowFlags flags)
m_editor->messageWidget->setCloseButtonVisible(false);
m_editor->messageWidget->setWordWrap(true);
//m_editor->ktreewidgetsearchline->lineEdit()->setClickMessage(i18n("Type here to search connections..."));
m_editor->ktreewidgetsearchline->lineEdit()->setPlaceholderText(i18n("Type here to search connections..."));
initializeConnections();
initializeMenu();
......@@ -318,9 +316,9 @@ void ConnectionEditor::initializeConnections()
filterModel->setSourceModel(model);
m_editor->connectionsWidget->setModel(filterModel);
// m_editor->ktreewidgetsearchline->setProxy(filterModel);
m_editor->ktreewidgetsearchline->setProxy(filterModel);
// m_editor->connectionsWidget->header()->setResizeMode(0, QHeaderView::Stretch);
m_editor->connectionsWidget->header()->setSectionResizeMode(0, QHeaderView::Stretch);
}
void ConnectionEditor::removeConnection()
......
......@@ -23,13 +23,10 @@
<item>
<widget class="KMessageWidget" name="messageWidget" native="true"/>
</item>
<!-- <item>
<widget class="KTreeWidgetSearchLine" name="ktreewidgetsearchline">
<property name="placeholderText">
<string>Search connections...</string>
</property>
<item>
<widget class="KFilterProxySearchLine" name="ktreewidgetsearchline">
</widget>
</item>-->
</item>
<item>
<widget class="QTreeView" name="connectionsWidget">
<property name="sizePolicy">
......@@ -69,7 +66,7 @@
</customwidget>
<customwidget>
<class>KFilterProxySearchLine</class>
<extends>KLineEdit</extends>
<extends>QLineEdit</extends>
<header>kfilterproxysearchline.h</header>
</customwidget>
<customwidget>
......
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