KShellCompletion Class
This class does shell-like completion of file names. More...
Header: | #include <KShellCompletion> |
CMake: | find_package(KF6 REQUIRED COMPONENTS KIO) target_link_libraries(mytarget PRIVATE KF6::KIOWidgets) |
Inherits: | KUrlCompletion |
Public Functions
Reimplemented Public Functions
virtual QString | makeCompletion(const QString &text) override |
Detailed Description
A string passed to makeCompletion() will be interpreted as a shell command line. Completion will be done on the last argument on the line. Returned matches consist of the first arguments (uncompleted) plus the completed last argument.
Member Function Documentation
KShellCompletion::KShellCompletion()
Constructs a KShellCompletion object.
[override virtual]
QString KShellCompletion::makeCompletion(const QString &text)
Reimplements: KUrlCompletion::makeCompletion(const QString &text).
Finds completions to the given text. The first match is returned and emitted in the signal match().
text the text to complete
Returns the first match, or QString() if not found