| Summary: | Opening network KCM again with different Uuid arg doesn't change selected connection | ||
|---|---|---|---|
| Product: | [Applications] systemsettings | Reporter: | Nicolas Fella <nicolas.fella> |
| Component: | kcm_networkmanagement | Assignee: | Jan Grulich <jgrulich> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | nate, plasma-bugs-null, postix |
| Priority: | NOR | ||
| Version First Reported In: | master | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | https://invent.kde.org/plasma/plasma-nm/-/commit/8638ee5821af770469e765192d0afb42962352d6 | Version Fixed/Implemented In: | |
| Sentry Crash Report: | |||
|
Description
Nicolas Fella
2022-11-08 01:35:30 UTC
This assumes that https://invent.kde.org/plasma/plasma-nm/-/merge_requests/170 is merged and that systemsettings is actually opened Same goes for the new Flatpak Permissions KCM. It can't switch to another requested app when it's already opened. This KConfigModule API should be revisited in Plasma 6. Do we need anything more than an "argumentsChanged" signal on the KCM class? > Do we need anything more than an "argumentsChanged" signal on the KCM class?
I'd say it should be a virtual method, not a signal:
class ConfigModule {
bool handleArgumentsChange(const QVariantList &args) {
return false;
}
}
When new arguments arrive, there are two possible scenarios:
1. Shell detects that KCM has unsaved changes, and triggers Apply/Discard dialog. If discarded or applied, tell KCM to reload its data and then pass new arguments (go to scenario #2). If cancelled, discard new arguments.
2. Shell detects that KCM has no unsaved changes, so it passes new arguments through the new virtual method. If method returns true, it means that the arguments got handled and KCM did its right thing. Otherwise, either KCM or base class implementation returns false, in which case shell unloads KCM completely, and loads it back in with new arguments passed in constructor (as previously).
By the way, do we really have a usecase for QVariantList? Can't it be just strings?
*** Bug 478901 has been marked as a duplicate of this bug. *** A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-nm/-/merge_requests/366 Git commit 2c33582e89a836fb0a7c369f3ae6d99e494c0dc8 by Nicolas Fella. Committed on 31/10/2024 at 16:12. Pushed by nicolasfella into branch 'Plasma/6.2'. [kcm] Update selected connection when opening KCM a second time (cherry picked from commit 8638ee5821af770469e765192d0afb42962352d6) M +28 -14 kcm/kcm.cpp M +1 -0 kcm/kcm.h https://invent.kde.org/plasma/plasma-nm/-/commit/2c33582e89a836fb0a7c369f3ae6d99e494c0dc8 Git commit 8638ee5821af770469e765192d0afb42962352d6 by Nicolas Fella. Committed on 31/10/2024 at 15:14. Pushed by nicolasfella into branch 'master'. [kcm] Update selected connection when opening KCM a second time M +28 -14 kcm/kcm.cpp M +1 -0 kcm/kcm.h https://invent.kde.org/plasma/plasma-nm/-/commit/8638ee5821af770469e765192d0afb42962352d6 |