KPluginName Class Reference
from PyKDE5.kcoreaddons import *
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.
Methods | |
__init__ (self, QString name) | |
__init__ (self, QString name, bool isError) | |
QString | errorString (self) |
bool | isValid (self) |
QString | name (self) |
Static Methods | |
KPluginName | fromErrorString (QString errorString) |
Method Documentation
__init__ | ( | self, | ||
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.
- Parameters:
-
name The name of the plugin; this should not be empty.
__init__ | ( | self, | ||
QString | name, | |||
bool | isError | |||
) |
QString errorString | ( | self ) |
The error string if no name could be determined.
- Returns:
- The string passed to fromErrorString() if isValid() is
bool isValid | ( | self ) |
Whether the name is valid.
Note that this only determines how the KPluginName was constructed, not anything about the value of the string.
- Returns:
- true if the KPluginName(const QString&) constructor was used, false if fromErrorString() was used.
QString name | ( | self ) |
The name of the plugin.
- Returns:
- The string passed to the constructor if isValid() is
Static Method Documentation
KPluginName fromErrorString | ( | QString | errorString | |
) |
Construct an invalid plugin name with an error message.
When this object is passed to KPluginLoader,
- Parameters:
-
errorString will be used for KPluginLoader.errorString(). errorString The (translated) error string.