Deprecate KFilterProxySearchLine
ClosedPublic

Authored by svuorela on Aug 12 2018, 3:20 PM.

Details

Summary

It is too primitive and simple for anything but the absolutely most basic things

It is fixed to FixedStrings, search in all columns and caseinsensitive. And it seems to
not really be fixeable. So just mark it as deprecated and remove it at a later point.

Test Plan

It has approximately 6 users across the kde codebase, let's fix them one by one.

Diff Detail

Repository
R276 KItemViews
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
svuorela created this revision.Aug 12 2018, 3:20 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptAug 12 2018, 3:20 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
svuorela requested review of this revision.Aug 12 2018, 3:20 PM

+1, and also too narrow regarding being specific to QLineEdit and QSFPM. If at all this should be just the logic, and be independent of the UI.

dfaure accepted this revision.Aug 13 2018, 11:04 AM

This class was doing it with a timer, I wonder if that should be part of the recommendation ("use QLineEdit with a timer"), or if we don't recommend delaying the searching as a general solution.
(e.g. another typical fix for the "I type one letter and the result is huge" issue is to require 3 letters).

This revision is now accepted and ready to land.Aug 13 2018, 11:04 AM
svuorela updated this revision to Diff 39579.Aug 13 2018, 11:08 AM

Improve deprecation documentation

dfaure accepted this revision.Aug 13 2018, 11:17 AM
This revision was automatically updated to reflect the committed changes.
kossebau added inline comments.Aug 13 2018, 11:26 AM
src/kfilterproxysearchline.h
48

Why not KITEMVIEWS_DEPRECATED_EXPORT?

While being defined as KITEMVIEWS_EXPORT KITEMVIEWS_DEPRECATED, so effectively the same, I wonder about consistent usage of the macros, and if there is areason not to use this special one?