Commit 0c8a2bce authored by Tony Murray's avatar Tony Murray

Modify search results to match the silly output of KUrl::prettyUrl().

Now when the url input field is filled automatically when connecting it will match at least one entry every time.

svn path=/trunk/KDE/kdenetwork/krdc/; revision=1204412
parent f1d589a7
......@@ -75,6 +75,8 @@
#include <QToolBar>
#include <QVBoxLayout>
static const QByteArray FILTER_EXCLUSIONS = "@/:";
MainWindow::MainWindow(QWidget *parent)
: KXmlGuiWindow(parent),
m_fullscreenWindow(0),
......@@ -1182,7 +1184,8 @@ int MainWindow::currentRemoteView() const
void MainWindow::updateFilter(const QString &text)
{
m_remoteDesktopsModelProxy->setFilterRegExp(QRegExp("IGNORE|" + text, Qt::CaseInsensitive, QRegExp::RegExp));
// use QUrl::toPercentEncoding() to match KUrl::prettyUrl()
m_remoteDesktopsModelProxy->setFilterRegExp(QRegExp("IGNORE|" + QUrl::toPercentEncoding(text, FILTER_EXCLUSIONS), Qt::CaseInsensitive, QRegExp::RegExp));
}
void MainWindow::createDockWidget()
......
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