KNSCore::Transaction
#include <transaction.h>
Signals | |
void | finished () |
void | signalEntryEvent (const KNSCore::Entry &entry, KNSCore::Entry::EntryEvent event) |
void | signalErrorCode (KNSCore::ErrorCode::ErrorCode errorCode, const QString &message, const QVariant &metadata) |
void | signalMessage (const QString &message) |
Additional Inherited Members | |
Properties inherited from QObject | |
objectName | |
Public Attributes inherited from QObject | |
typedef | QObjectList |
Protected Member Functions inherited from QObject | |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const QMetaMethod &signal) |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const QMetaMethod &signal) |
bool | isSignalConnected (const QMetaMethod &signal) const const |
int | receivers (const char *signal) const const |
QObject * | sender () const const |
int | senderSignalIndex () const const |
virtual void | timerEvent (QTimerEvent *event) |
Detailed Description
KNewStuff Transaction.
Exposes different actions that can be done on an entry and means to track them to completion.
To create a Transaction we should call one of the static methods that represent the different actions we can take. These will return the Transaction and we can use it to track mesages, the entries' states and eventually its completion using the @m finished signal.
The Transaction will delete itself once it has finished.
- Since
- 6.0
Definition at line 37 of file transaction.h.
Member Function Documentation
◆ adopt()
|
static |
Adopt the entry
from engine
using the adoption command.
For more information, see the documentation about AdoptionCommand from the knsrc file.
Definition at line 348 of file transaction.cpp.
◆ install()
|
static |
Performs an install on the given entry
from the engine
.
- Parameters
-
linkId specifies which of the assets we want to see installed.
- Returns
- a Transaction object that we can use to track the progress to completion
Definition at line 136 of file transaction.cpp.
◆ isFinished()
bool Transaction::isFinished | ( | ) | const |
- Returns
- true as soon as the Transaction is completed as it gets ready to clean itself up
Definition at line 390 of file transaction.cpp.
◆ signalEntryEvent
|
signal |
Informs about how the entry
has changed.
- Parameters
-
event nature of the change
◆ signalErrorCode
|
signal |
Fires in the case of any critical or serious errors, such as network or API problems.
- Parameters
-
errorCode Represents the specific type of error which has occurred message A human-readable message which can be shown to the end user metadata Any additional data which might be hepful to further work out the details of the error (see KNSCore::Entry::ErrorCode for the metadata details)
- See also
- KNSCore::Entry::ErrorCode
◆ signalMessage
Provides the message
to update our users about how the Transaction progressed.
◆ uninstall()
|
static |
Uninstalls the given entry
from the engine
.
It reverses the step done when @m install was called.
- Returns
- a Transaction object that we can use to track the progress to completion
Definition at line 308 of file transaction.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:21:35 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.