mirror of
https://invent.kde.org/marcoa/a-la-karte.git
synced 2026-03-27 09:13:09 +00:00
Trigger per-source import when import source is re-enabled
This commit is contained in:
parent
834b3a2ab6
commit
40a7b823ba
1 changed files with 18 additions and 0 deletions
18
src/app.cpp
18
src/app.cpp
|
|
@ -98,6 +98,8 @@ App::App(QObject *parent)
|
||||||
if (m_gameModel->removeByPlatformPrefix(QStringLiteral("Steam")) > 0) {
|
if (m_gameModel->removeByPlatformPrefix(QStringLiteral("Steam")) > 0) {
|
||||||
saveLibrary();
|
saveLibrary();
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
importFromSteam();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
connect(m_config, &Config::importLutrisChanged, this, [this]() {
|
connect(m_config, &Config::importLutrisChanged, this, [this]() {
|
||||||
|
|
@ -105,6 +107,8 @@ App::App(QObject *parent)
|
||||||
if (m_gameModel->removeByPlatformPrefix(QStringLiteral("Lutris")) > 0) {
|
if (m_gameModel->removeByPlatformPrefix(QStringLiteral("Lutris")) > 0) {
|
||||||
saveLibrary();
|
saveLibrary();
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
importFromLutris();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
connect(m_config, &Config::importHeroicChanged, this, [this]() {
|
connect(m_config, &Config::importHeroicChanged, this, [this]() {
|
||||||
|
|
@ -112,6 +116,8 @@ App::App(QObject *parent)
|
||||||
if (m_gameModel->removeByPlatformPrefix(QStringLiteral("Heroic")) > 0) {
|
if (m_gameModel->removeByPlatformPrefix(QStringLiteral("Heroic")) > 0) {
|
||||||
saveLibrary();
|
saveLibrary();
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
importFromHeroic();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
connect(m_config, &Config::importDesktopChanged, this, [this]() {
|
connect(m_config, &Config::importDesktopChanged, this, [this]() {
|
||||||
|
|
@ -119,6 +125,8 @@ App::App(QObject *parent)
|
||||||
if (m_gameModel->removeByPlatformPrefix(QStringLiteral("Desktop")) > 0) {
|
if (m_gameModel->removeByPlatformPrefix(QStringLiteral("Desktop")) > 0) {
|
||||||
saveLibrary();
|
saveLibrary();
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
importFromDesktop();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
connect(m_config, &Config::importBottlesChanged, this, [this]() {
|
connect(m_config, &Config::importBottlesChanged, this, [this]() {
|
||||||
|
|
@ -126,6 +134,8 @@ App::App(QObject *parent)
|
||||||
if (m_gameModel->removeByPlatformPrefix(QStringLiteral("Bottles")) > 0) {
|
if (m_gameModel->removeByPlatformPrefix(QStringLiteral("Bottles")) > 0) {
|
||||||
saveLibrary();
|
saveLibrary();
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
importFromBottles();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
connect(m_config, &Config::importFlatpakChanged, this, [this]() {
|
connect(m_config, &Config::importFlatpakChanged, this, [this]() {
|
||||||
|
|
@ -133,6 +143,8 @@ App::App(QObject *parent)
|
||||||
if (m_gameModel->removeByPlatformPrefix(QStringLiteral("Flatpak")) > 0) {
|
if (m_gameModel->removeByPlatformPrefix(QStringLiteral("Flatpak")) > 0) {
|
||||||
saveLibrary();
|
saveLibrary();
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
importFromFlatpak();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
connect(m_config, &Config::importItchChanged, this, [this]() {
|
connect(m_config, &Config::importItchChanged, this, [this]() {
|
||||||
|
|
@ -140,6 +152,8 @@ App::App(QObject *parent)
|
||||||
if (m_gameModel->removeByPlatformPrefix(QStringLiteral("itch.io")) > 0) {
|
if (m_gameModel->removeByPlatformPrefix(QStringLiteral("itch.io")) > 0) {
|
||||||
saveLibrary();
|
saveLibrary();
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
importFromItch();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
connect(m_config, &Config::importLegendaryChanged, this, [this]() {
|
connect(m_config, &Config::importLegendaryChanged, this, [this]() {
|
||||||
|
|
@ -147,6 +161,8 @@ App::App(QObject *parent)
|
||||||
if (m_gameModel->removeByPlatformPrefix(QStringLiteral("Legendary")) > 0) {
|
if (m_gameModel->removeByPlatformPrefix(QStringLiteral("Legendary")) > 0) {
|
||||||
saveLibrary();
|
saveLibrary();
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
importFromLegendary();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
connect(m_config, &Config::importRetroArchChanged, this, [this]() {
|
connect(m_config, &Config::importRetroArchChanged, this, [this]() {
|
||||||
|
|
@ -154,6 +170,8 @@ App::App(QObject *parent)
|
||||||
if (m_gameModel->removeByPlatformPrefix(QStringLiteral("RetroArch")) > 0) {
|
if (m_gameModel->removeByPlatformPrefix(QStringLiteral("RetroArch")) > 0) {
|
||||||
saveLibrary();
|
saveLibrary();
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
importFromRetroArch();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue