Search for usage in LXR

#include <kpluginloader.h>

Public Member Functions

 KPluginName (const QString &name)
QString errorString () const
bool isValid () const
QString name () const

Static Public Member Functions

static KPluginName fromErrorString (const QString &errorString)

Detailed Description

Represents the name of a plugin intended for KPluginLoader.

This exists only so that classes such as KService can provide a cast operator to allow them to be used as arguments to KPluginLoader. Unless you are implementing such a cast operator, you should never need to use this class directly.

Definition at line 439 of file kpluginloader.h.

Constructor & Destructor Documentation

◆ KPluginName()

KPluginName::KPluginName ( const QString name)

Construct a (valid) plugin name from a string.

If there was an error and the name could not be determined, fromErrorString() should be used instead to construct an appropriate error message.

nameThe name of the plugin; this should not be empty.

Definition at line 497 of file kpluginloader.h.

Member Function Documentation

◆ errorString()

QString KPluginName::errorString ( ) const

The error string if no name could be determined.

The string passed to fromErrorString() if isValid() is false, QString() otherwise.

Definition at line 515 of file kpluginloader.h.

◆ fromErrorString()

KPluginName KPluginName::fromErrorString ( const QString errorString)

Construct an invalid plugin name with an error message.

When this object is passed to KPluginLoader, errorString will be used for KPluginLoader::errorString().

errorStringThe (translated) error string.

Definition at line 519 of file kpluginloader.h.

◆ isValid()

bool KPluginName::isValid ( ) const

Whether the name is valid.

Note that this only determines how the KPluginName was constructed, not anything about the value of the string.

true if the KPluginName(const QString&) constructor was used, false if fromErrorString() was used.

Definition at line 511 of file kpluginloader.h.

◆ name()

QString KPluginName::name ( ) const

The name of the plugin.

The string passed to the constructor if isValid() is true, QString() otherwise.

Definition at line 507 of file kpluginloader.h.

The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Mar 27 2023 04:15:35 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.