Changeset View
Changeset View
Standalone View
Standalone View
plugins/quickopen/quickopenwidget.cpp
Show First 20 Lines • Show All 325 Lines • ▼ Show 20 Line(s) | 288 | { | |||
---|---|---|---|---|---|
326 | 326 | | |||
327 | emit itemsChanged(checkedItems); | 327 | emit itemsChanged(checkedItems); | ||
328 | emit scopesChanged(checkedScopes); | 328 | emit scopesChanged(checkedScopes); | ||
329 | m_model->enableProviders(checkedItems, checkedScopes); | 329 | m_model->enableProviders(checkedItems, checkedScopes); | ||
330 | } | 330 | } | ||
331 | 331 | | |||
332 | void QuickOpenWidget::textChanged(const QString& str) | 332 | void QuickOpenWidget::textChanged(const QString& str) | ||
333 | { | 333 | { | ||
334 | QString strTrimmed = str.trimmed(); | ||||
335 | | ||||
334 | // "cheap" when something was just appended to the current filter | 336 | // "cheap" when something was just appended to the current filter | ||
335 | updateTimerInterval(str.startsWith(m_filter)); | 337 | updateTimerInterval(strTrimmed.startsWith(m_filter)); | ||
336 | m_filter = str; | 338 | m_filter = strTrimmed; | ||
337 | m_filterTimer.start(); | 339 | m_filterTimer.start(); | ||
338 | } | 340 | } | ||
339 | 341 | | |||
340 | void QuickOpenWidget::applyFilter() | 342 | void QuickOpenWidget::applyFilter() | ||
341 | { | 343 | { | ||
342 | m_model->textChanged(m_filter); | 344 | m_model->textChanged(m_filter); | ||
343 | 345 | | |||
344 | QModelIndex currentIndex = m_model->index(0, 0, QModelIndex()); | 346 | QModelIndex currentIndex = m_model->index(0, 0, QModelIndex()); | ||
▲ Show 20 Lines • Show All 211 Lines • Show Last 20 Lines |