Pages
API Documentation
On this page

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

List of all members, including inherited members

Public Functions

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

We use cookies to personalize content and to analyze our traffic. Please decide if you are willing to accept cookies from our website.