Commit b65429d9 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

No need to delay PackageKit backend initialization

Doesn't buy us much and makes the whole thing a bit more complex
parent a8420b2a
......@@ -81,15 +81,6 @@ PackageKitBackend::PackageKitBackend(QObject* parent)
SourcesModel::global()->addSourcesBackend(new PackageKitSourcesBackend(this));
QTimer::singleShot(0, this, &PackageKitBackend::delayedInit);
}
PackageKitBackend::~PackageKitBackend()
{
}
void PackageKitBackend::delayedInit()
{
QString error;
const bool b = m_appdata.load(&error);
reloadPackageList();
......@@ -103,6 +94,8 @@ void PackageKitBackend::delayedInit()
}
}
PackageKitBackend::~PackageKitBackend() = default;
bool PackageKitBackend::isFetching() const
{
return m_isFetching;
......
......@@ -90,8 +90,6 @@ class DISCOVERCOMMON_EXPORT PackageKitBackend : public AbstractResourcesBackend
void getUpdatesDetailsFinished(PackageKit::Transaction::Exit,uint);
private:
void delayedInit();
template <typename T>
T resourcesByPackageNames(const QStringList& names) const;
void fetchUpdates();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment