Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 99c93102 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

flatpak: initialise the no-sources item as we construct the backend

parent e81d0d1b
......@@ -51,6 +51,7 @@ FlatpakSourcesBackend::FlatpakSourcesBackend(const QVector<FlatpakInstallation *
, m_preferredInstallation(installations.constFirst())
, m_sources(new QStandardItemModel(this))
, m_flathubAction(new QAction(i18n("Add Flathub"), this))
, m_noSourcesItem(new QStandardItem(QStringLiteral("-")))
{
m_flathubAction->setToolTip(QStringLiteral("flathub"));
connect(m_flathubAction, &QAction::triggered, this, [this](){
......@@ -62,7 +63,6 @@ FlatpakSourcesBackend::FlatpakSourcesBackend(const QVector<FlatpakInstallation *
}
}
m_noSourcesItem = new QStandardItem(QStringLiteral("-"));
m_noSourcesItem->setEnabled(false);
if (m_sources->rowCount() == 0) {
m_sources->appendRow(m_noSourcesItem);
......
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