Commit Graph

2 Commits (46fedcbe96ed7aff1bbebf468da28222cd74dac6)

Author SHA1 Message Date
Vincent Reher 46fedcbe96 Introduced an implementation-agnostic interface to TSM centered around
a structure describing a match pattern and associated options such as:

  - Pattern type: regex, wildcard (see Note 1), and substring (new).
  - Alphanumeric character handling: case-sensitive, case-insensitive,
    equivalent character matching (new - see Note 2).
  - Match goal: "matching" vs. "inverted matching" (new).

Introduced additional "get*" and "set*" functions to accommodate the
new list-of-structures interfaces to TSM.

Incorporated most of MichelleC's feedback through 2022-12-04
on previously committed code. Other code cleanup.

See file tdecore/README.tdestringmatcher for additional information.

Note 1: The implementation of wildcard support no longer uses
the TQRegExp.setWildcard() function for regex conversion or
the TQRegExp.exactMatch() function for matching.

Note 2: Full implementation of equivalent character matching is
postponed to a future commit.

Signed-off-by: Vincent Reher <tde@4reher.org>
3 years ago
Vincent Reher 78905ffa6a Introduce TDEStringMatcher, a general purpose iterative string
matching class. Additional information about the class can be
found in tdecore/README.tdestringmatcher.

Introduce concept of a "hidden file matcher" instance of the
TDEStringMatcher class that can be used to extend the definition
"hidden" files beyond traditional "dotfiles".

Create a global default instance of a "hidden file matcher"
for use in applications that don't need their own.

Modify KFileItem class to utilize a hidden file matcher when
evaluating whether or not a filesystem object is hidden.

This commit partially addresses issue # 273. Additional changes
to tdelibs, tdebase/libkonq, and tdebase/konqueror will be
required to resolve that issue.

Signed-off-by: Vincent Reher <tde@4reher.org>
3 years ago