|
Krita Source Code Documentation
|
#include <KisSupporterBundlesFetcher.h>
Inheritance diagram for KisSupporterBundlesFetcher:Signals | |
| void | fetchIndexDone (bool success, const QString &errorMessage) |
Public Member Functions | |
| const QVector< KisSupporterBundle > & | bundles () const |
| QNetworkReply * | fetchBundle (const KisSupporterBundle &bundle) |
| void | fetchIndex () |
| bool | isFetching () const |
| KisSupporterBundlesFetcher (QObject *parent=nullptr) | |
Static Public Member Functions | |
| static bool | hasNetworkReplyError (QNetworkReply *reply, QString &outErrorMessage) |
Private Member Functions | |
| bool | checkExistingIndexDb (unsigned int expectedVersion, const QString &expectedHash) |
| bool | doWithIndexDb (QString &outErrorMessage, const std::function< bool(QSqlDatabase &, QString &)> &block) |
| void | emitCheckTxtFetchFailed (const QString &errorMessage) |
| void | emitFailure (const QString &errorMessage) |
| void | emitIndexDbFetchFailed (const QString &errorMessage) |
| QNetworkReply * | fetch (const QString &path) |
| void | fetchIndexDb (unsigned int expectedVersion, const QString &expectedHash) |
| void | handleCheckTxtFetched (QNetworkReply *reply) |
| bool | handleCheckTxtPredefinedFailure (const QString &content) |
| void | handleIndexDbFetched (QNetworkReply *reply, unsigned int expectedVersion, const QString &expectedHash) |
| void | readIndexDbBundles () |
Static Private Member Functions | |
| static bool | readSqliteUserVersion (const QByteArray &bytes, unsigned int &outVersion) |
Private Attributes | |
| QVector< KisSupporterBundle > | m_bundles |
| bool | m_fetching = false |
| QString | m_indexDbPath |
| KisNetworkAccessManager * | m_nam = nullptr |
Static Private Attributes | |
| static constexpr char | BASE_URL [] = "https://cdn.kde.org/krita/.android-supporters-extra/supporterbundles/" |
Definition at line 19 of file KisSupporterBundlesFetcher.h.
|
explicit |
Definition at line 22 of file KisSupporterBundlesFetcher.cpp.
References dbgResources, and m_indexDbPath.
|
inline |
Definition at line 30 of file KisSupporterBundlesFetcher.h.
References m_bundles.
|
private |
Definition at line 132 of file KisSupporterBundlesFetcher.cpp.
References dbgResources, m_indexDbPath, and readSqliteUserVersion().
|
private |
Definition at line 331 of file KisSupporterBundlesFetcher.cpp.
References m_indexDbPath.
|
private |
Definition at line 315 of file KisSupporterBundlesFetcher.cpp.
References emitFailure().
|
private |
Definition at line 325 of file KisSupporterBundlesFetcher.cpp.
References fetchIndexDone(), and m_fetching.
|
private |
Definition at line 320 of file KisSupporterBundlesFetcher.cpp.
References emitFailure().
|
private |
Definition at line 299 of file KisSupporterBundlesFetcher.cpp.
References BASE_URL, dbgResources, and m_nam.
| QNetworkReply * KisSupporterBundlesFetcher::fetchBundle | ( | const KisSupporterBundle & | bundle | ) |
Definition at line 41 of file KisSupporterBundlesFetcher.cpp.
References fetch(), and KisSupporterBundle::fileName.
| void KisSupporterBundlesFetcher::fetchIndex | ( | ) |
Definition at line 30 of file KisSupporterBundlesFetcher.cpp.
References fetch(), handleCheckTxtFetched(), KIS_SAFE_ASSERT_RECOVER_RETURN, and m_fetching.
|
private |
Definition at line 162 of file KisSupporterBundlesFetcher.cpp.
References fetch(), and handleIndexDbFetched().
|
signal |
|
private |
Definition at line 62 of file KisSupporterBundlesFetcher.cpp.
References checkExistingIndexDb(), dbgResources, emitCheckTxtFetchFailed(), fetchIndexDb(), handleCheckTxtPredefinedFailure(), hasNetworkReplyError(), and readIndexDbBundles().
|
private |
Definition at line 106 of file KisSupporterBundlesFetcher.cpp.
References emitFailure().
|
private |
Definition at line 171 of file KisSupporterBundlesFetcher.cpp.
References dbgResources, emitIndexDbFetchFailed(), hasNetworkReplyError(), m_indexDbPath, readIndexDbBundles(), and readSqliteUserVersion().
|
static |
Definition at line 46 of file KisSupporterBundlesFetcher.cpp.
|
inline |
Definition at line 25 of file KisSupporterBundlesFetcher.h.
References m_fetching.
|
private |
Definition at line 225 of file KisSupporterBundlesFetcher.cpp.
References dbgResources, doWithIndexDb(), fetchIndexDone(), m_bundles, m_fetching, KisSupporterBundle::thumbnail, and warnResources.
|
staticprivate |
Definition at line 351 of file KisSupporterBundlesFetcher.cpp.
|
staticconstexprprivate |
Definition at line 45 of file KisSupporterBundlesFetcher.h.
|
private |
Definition at line 70 of file KisSupporterBundlesFetcher.h.
|
private |
Definition at line 71 of file KisSupporterBundlesFetcher.h.
|
private |
Definition at line 69 of file KisSupporterBundlesFetcher.h.
|
private |
Definition at line 68 of file KisSupporterBundlesFetcher.h.