Commit 6de4c156 authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

Remove unused QStrings

parent 3fa33a79
......@@ -1003,7 +1003,6 @@ void FlatpakBackend::createPool(QSharedPointer<FlatpakSource> source)
AppStream::Pool *pool = new AppStream::Pool(this);
auto fw = new QFutureWatcher<bool>(this);
const auto sourceName = source->name();
connect(fw, &QFutureWatcher<bool>::finished, this, [this, fw, pool, source]() {
source->m_pool = pool;
m_flatpakLoadingSources.removeAll(source);
......
......@@ -705,7 +705,6 @@ void FlatpakResource::loadPermissions()
KDesktopFile parser(f.fileName());
QString brief, description;
const QString valueOn = "on";
const KConfigGroup contextGroup = parser.group("Context");
const QString shared = contextGroup.readEntry("shared", QString());
......@@ -802,7 +801,6 @@ void FlatpakResource::loadPermissions()
QString appendText = "\n- " + homeList.join("\n- ");
if (homeAccess) {
brief = i18n("Home Folder Access");
QString accessLevel;
if (home_rw && home_ro && home_cr) {
description =
i18n("Can read, write, and create files in the following locations in your home folder without asking permission first: %1", appendText);
......@@ -818,7 +816,6 @@ void FlatpakResource::loadPermissions()
appendText = "\n- " + systemList.join("\n- ");
if (systemAccess) {
brief = i18n("System Folder Access");
QString accessLevel;
if (system_rw && system_ro && system_cr) {
description = i18n("Can read, write, and create system files in the following locations without asking permission first: %1", appendText);
} else if (system_rw && !system_cr) {
......
  • sourceName was not actually unused; this makes compilation fail with certain combinations of flatpak and appstream:

    /home/nate/kde/src/discover/libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp: In member function ‘void FlatpakBackend::createPool(QSharedPointer<FlatpakSource>)’:
    /home/nate/kde/src/discover/libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp:1029:101: error: ‘sourceName’ was not declared in this scope; did you mean ‘sources’?
     1029 |     const QString subdir = flatpak_installation_get_id(source->installation()) + QLatin1Char('/') + sourceName;
          |                                                                                                     ^~~~~~~~~~
          |                                                                                                     sources
    

    I guess you didn't hit this because you have newer AppStream stuff.

    Fixed in af1e43eb

Supports Markdown
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