Huggle
build:^490^dce1e5c
|
The RevertQuery class can be used to rollback any edit. More...
#include <revertquery.hpp>
Public Slots | |
void | OnTick () |
Public Member Functions | |
RevertQuery (WikiEdit *Edit) | |
void | Kill () |
Terminates a query. More... | |
void | Process () |
Execute query. More... | |
bool | Processed () |
Returns true in case that query is processed. | |
QString | QueryTargetToString () |
Return a target of a query. More... | |
![]() | |
Query () | |
Creates empty query. | |
virtual | ~Query () |
Destructor for query. | |
void | ProcessCallback () |
unsigned int | QueryID () |
virtual QString | QueryStatusToString () |
virtual QString | QueryTypeToString () |
Convert a type of this query to a string. | |
![]() | |
unsigned long | CollectableID () |
CollectableID. More... | |
QString | DebugHgc () |
DebugHgc. More... | |
bool | IsLocked () |
bool | IsManaged () |
IsManaged Managed class is deleted by GC and must not be deleted by hand. More... | |
void | Lock () |
Lock this object so that other threads can't change consumers or modify its properties. | |
void | RegisterConsumer (const int consumer) |
Registers a consumer. More... | |
void | RegisterConsumer (const QString consumer) |
Registers a consumer. More... | |
virtual bool | SafeDelete () |
Use this if you are not sure if you can delete this object in this moment. | |
void | Unlock () |
Unlock this object for deletion by other threads. | |
void | UnregisterConsumer (const int consumer) |
This function will remove a string which prevent the object from being removed. More... | |
void | UnregisterConsumer (const QString consumer) |
This function will remove a string which prevent the object from being removed. More... | |
Static Public Member Functions | |
static QString | GetCustomRevertStatus (QString RevertData) |
Public Attributes | |
bool | IgnorePreflightCheck |
Rollback with no check if it's a good idea or not (revert even whitelisted users, sysops etc) | |
bool | MinorEdit |
QString | Summary |
QString | Token |
bool | UsingSR |
Whether software rollback should be used instead of regular rollback. | |
![]() | |
Callback | callback |
Callback. More... | |
void * | CallbackResult |
This is a pointer to object returned by your callback function. | |
QString | CustomStatus |
Custom status. More... | |
Query * | Dependency |
Dependency for query. More... | |
bool | HiddenQuery |
QueryResult * | Result |
Result of query, see documentation of QueryResult for more. | |
bool | RetryOnTimeoutFailure |
QDateTime | StartTime |
enum _Status | Status |
Current status of a query. | |
int | Timeout |
QueryType | Type |
Type of a query. More... | |
Private Member Functions | |
void | Cancel () |
void | CheckPreflight () |
bool | CheckRevert () |
void | Exit () |
void | Preflight () |
bool | ProcessRevert () |
void | Revert () |
void | Rollback () |
Private Attributes | |
WikiEdit * | edit |
EditQuery * | EditQuerySoftwareRollback |
bool | PreflightFinished |
ApiQuery * | qPreflight |
ApiQuery * | qRetrieve |
ApiQuery * | qRevert |
bool | RollingBack |
QTimer * | timer |
Additional Inherited Members | |
![]() | |
static QNetworkAccessManager | NetworkManager |
The RevertQuery class can be used to rollback any edit.
Definition at line 32 of file revertquery.hpp.
|
virtual |
Terminates a query.
In case it's not running nothing happens, in case query is currently running it should be immediately stopped and error result should be generated This is only a virtual interface implemented in Query which does nothing by default it is necessary for every query to implement this for it to work properly
Reimplemented from Huggle::Query.
Definition at line 74 of file revertquery.cpp.
References Huggle::QueryResult::ErrorMessage, Huggle::ApiQuery::Kill(), Huggle::Query::Result, and Huggle::Collectable::UnregisterConsumer().
Referenced by ProcessRevert().
|
virtual |
Execute query.
This is a main() of every query, your implementation goes here
Reimplemented from Huggle::Query.
Definition at line 53 of file revertquery.cpp.
References Huggle::Query::CustomStatus, Huggle::Core::DebugLog(), and Huggle::Collectable::RegisterConsumer().
Referenced by Huggle::Core::RevertEdit().
|
private |
Definition at line 382 of file revertquery.cpp.
References Huggle::Query::CustomStatus, Huggle::QueryResult::Data, Huggle::Core::DebugLog(), Huggle::QueryResult::ErrorMessage, Kill(), Huggle::Core::Log(), Huggle::WikiEdit::Page, Huggle::WikiPage::PageName, Huggle::EditQuery::Processed(), Huggle::Query::Processed(), Huggle::Collectable::RegisterConsumer(), Huggle::Query::Result, Huggle::WikiEdit::RevID, Huggle::Collectable::UnregisterConsumer(), Huggle::WikiEdit::User, and Huggle::WikiUser::Username.
|
virtual |
Return a target of a query.
Target is either explicitly defined abstract identifier that is used for statistical purposes, or it is provided by query itself, based on a type of that query typical example would be a page that is affected by ApiQuery
Reimplemented from Huggle::Query.
Definition at line 108 of file revertquery.cpp.
References Huggle::WikiEdit::Page, and Huggle::WikiPage::PageName.
|
private |
Definition at line 528 of file revertquery.cpp.
References Huggle::Core::AppendQuery(), Huggle::Query::CustomStatus, Huggle::Core::DebugLog(), Huggle::QueryResult::ErrorMessage, Huggle::WikiUser::getBadnessScore(), Huggle::Configuration::GetDefaultRevertSummary(), Huggle::Core::Log(), Huggle::WikiEdit::Page, Huggle::WikiPage::PageName, Huggle::ApiQuery::Parameters, Huggle::ApiQuery::Process(), Huggle::Collectable::RegisterConsumer(), Huggle::Query::Result, Huggle::ApiQuery::SetAction(), Huggle::ApiQuery::Target, Huggle::WikiUser::UpdateUser(), Huggle::WikiEdit::User, Huggle::WikiUser::Username, Huggle::ApiQuery::UsingPOST, UsingSR, and Huggle::Configuration::Verbosity.