Changeset View
Changeset View
Standalone View
Standalone View
src/services/kservice.h
Show First 20 Lines • Show All 562 Lines • ▼ Show 20 Line(s) | 334 | #endif | |||
---|---|---|---|---|---|
563 | * KPluginLoader(service); | 563 | * KPluginLoader(service); | ||
564 | * @endcode | 564 | * @endcode | ||
565 | * which will use library() as the name of the plugin. If the service | 565 | * which will use library() as the name of the plugin. If the service | ||
566 | * is not valid or does not have a library, KPluginLoader::errorString() | 566 | * is not valid or does not have a library, KPluginLoader::errorString() | ||
567 | * will be set appropriately. | 567 | * will be set appropriately. | ||
568 | */ | 568 | */ | ||
569 | operator KPluginName() const; | 569 | operator KPluginName() const; | ||
570 | 570 | | |||
571 | /** | ||||
572 | * Returns true if @p pattern matches a subsequence of the string @p text. | ||||
573 | * For instance the pattern "libremath" matches the text "LibreOffice Math", assuming | ||||
574 | * @p cs is Qt::CaseInsensitive. | ||||
575 | */ | ||||
576 | static bool isSubseq(const QString& pattern, const QString& text, Qt::CaseSensitivity cs = Qt::CaseSensitive); | ||||
apol: Can we give it a better name? How about something like `isContained`? or at least… | |||||
577 | | ||||
571 | private: | 578 | private: | ||
572 | friend class KBuildServiceFactory; | 579 | friend class KBuildServiceFactory; | ||
573 | 580 | | |||
574 | /// @internal for KBuildSycoca only | 581 | /// @internal for KBuildSycoca only | ||
575 | struct ServiceTypeAndPreference { | 582 | struct ServiceTypeAndPreference { | ||
576 | ServiceTypeAndPreference() | 583 | ServiceTypeAndPreference() | ||
577 | : preference(-1), serviceType() {} | 584 | : preference(-1), serviceType() {} | ||
578 | ServiceTypeAndPreference(int pref, const QString &servType) | 585 | ServiceTypeAndPreference(int pref, const QString &servType) | ||
Show All 22 Lines |
Can we give it a better name? How about something like isContained? or at least isSubsequence.