Changeset View
Changeset View
Standalone View
Standalone View
src/kfilterproxysearchline.h
Show All 16 Lines | |||||
17 | * Boston, MA 02110-1301, USA. | 17 | * Boston, MA 02110-1301, USA. | ||
18 | */ | 18 | */ | ||
19 | 19 | | |||
20 | #ifndef KFILTERPROXYSEARCHLINE_H | 20 | #ifndef KFILTERPROXYSEARCHLINE_H | ||
21 | #define KFILTERPROXYSEARCHLINE_H | 21 | #define KFILTERPROXYSEARCHLINE_H | ||
22 | 22 | | |||
23 | #include <kitemviews_export.h> | 23 | #include <kitemviews_export.h> | ||
24 | 24 | | |||
25 | #ifndef KITEMVIEWS_NO_DEPRECATED | ||||
26 | | ||||
25 | #include <QWidget> | 27 | #include <QWidget> | ||
26 | class KFilterProxySearchLinePrivate; | 28 | class KFilterProxySearchLinePrivate; | ||
27 | 29 | | |||
28 | class QLineEdit; | 30 | class QLineEdit; | ||
29 | class QSortFilterProxyModel; | 31 | class QSortFilterProxyModel; | ||
30 | 32 | | |||
31 | /** | 33 | /** | ||
32 | * @class KFilterProxySearchLine kfilterproxysearchline.h KFilterProxySearchLine | 34 | * @class KFilterProxySearchLine kfilterproxysearchline.h KFilterProxySearchLine | ||
33 | * | 35 | * | ||
34 | * Responsible for the quick search when you are using a QSortFilterProxyModel. | 36 | * Responsible for the quick search when you are using a QSortFilterProxyModel. | ||
35 | * This will give you an widget which you can embed in your application, call | 37 | * This will give you an widget which you can embed in your application, call | ||
36 | * the setProxy() function to indicate on which QSortFilterProxyModel this | 38 | * the setProxy() function to indicate on which QSortFilterProxyModel this | ||
37 | * search line should operate. | 39 | * search line should operate. | ||
38 | * | 40 | * | ||
39 | * @author Tom Albers <tomalbers@kde.nl> | 41 | * @author Tom Albers <tomalbers@kde.nl> | ||
40 | * @since 4.2 | 42 | * @since 4.2 | ||
43 | * @deprecated since 5.50, use QLineEdit directly. If filtering is expensive, | ||||
44 | * consider a short timer to not act on every keypress, and if results are large, | ||||
45 | * consider not reacting until 3 letters. | ||||
41 | */ | 46 | */ | ||
42 | 47 | | |||
43 | class KITEMVIEWS_EXPORT KFilterProxySearchLine | 48 | class KITEMVIEWS_EXPORT KITEMVIEWS_DEPRECATED KFilterProxySearchLine | ||
kossebau: Why not KITEMVIEWS_DEPRECATED_EXPORT?
While being defined as `KITEMVIEWS_EXPORT… | |||||
44 | : public QWidget | 49 | : public QWidget | ||
45 | { | 50 | { | ||
46 | Q_OBJECT | 51 | Q_OBJECT | ||
47 | 52 | | |||
48 | public: | 53 | public: | ||
49 | /** | 54 | /** | ||
50 | * Constructor | 55 | * Constructor | ||
51 | */ | 56 | */ | ||
Show All 23 Lines | |||||
75 | private: | 80 | private: | ||
76 | KFilterProxySearchLinePrivate *const d; | 81 | KFilterProxySearchLinePrivate *const d; | ||
77 | Q_DISABLE_COPY(KFilterProxySearchLine) | 82 | Q_DISABLE_COPY(KFilterProxySearchLine) | ||
78 | Q_PRIVATE_SLOT(d, void slotSearchLineChange(const QString &newText)) | 83 | Q_PRIVATE_SLOT(d, void slotSearchLineChange(const QString &newText)) | ||
79 | Q_PRIVATE_SLOT(d, void slotSearchLineActivate()) | 84 | Q_PRIVATE_SLOT(d, void slotSearchLineActivate()) | ||
80 | }; | 85 | }; | ||
81 | 86 | | |||
82 | #endif | 87 | #endif | ||
88 | | ||||
89 | #endif |
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?