Commit 263a5737 authored by Gleb Popov's avatar Gleb Popov 💬

QuickOpen: Trim whitespace from input

Summary: Trim whitespace from the input to QuickOpen. For example, when copying a file path into the QuickOpen widget from some command line output and it happens to contain some whitespace at the start or end, it will still work with this patch. Without the patch, one has to remove the whitespace manually.

Test Plan: Shortly tested it manually.

Reviewers: #kdevelop, dhaumann

Reviewed By: dhaumann

Subscribers: dhaumann, apol, kdevelop-devel

Tags: #kdevelop

Differential Revision: https://phabricator.kde.org/D17885
parent 57ec89f9
......@@ -331,9 +331,11 @@ void QuickOpenWidget::updateProviders()
void QuickOpenWidget::textChanged(const QString& str)
{
QString strTrimmed = str.trimmed();
// "cheap" when something was just appended to the current filter
updateTimerInterval(str.startsWith(m_filter));
m_filter = str;
updateTimerInterval(strTrimmed.startsWith(m_filter));
m_filter = strTrimmed;
m_filterTimer.start();
}
......
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