Summary:
The overall mission of TaskTools::windowUrlFromMetadata is to use
various pieces of metadata to run KServiceTypeTrader queries and
get a list of matching services. Sometimes this will find more than
one service. So far we simply used whatever KServiceTypeTrader
returned first, but in some cases we can and should do better. The
included lengthy code comment names an example case.
In concert with D13058, this allows both the Linux-native and Wine-
installed (S|s)team.desktop files to coexist and their windows be
correctly mapped to the relevant .desktop file, by exploiting that
by their nature each case ends up with a different KService::menuId()
(that this is useful for differentiation is why the menuId differs,
after all).
This change looks like it introduces disgusting complexity at first,
but in some sense, trying to pick the most match-y out of the found
services instead of just randomly picking the first one makes sense.
Reviewers: broulik, davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D13073
Summary:
After we improved our StartupWMClass handling we worked with Wine
in https://bugs.winehq.org/show_bug.cgi?id=32699 to get them to add
StartupWMClass=foo.exe keys to the .desktop files they generate,
since they have foo.exe in WM_CLASS.
This old rule short-circuits the StartupWMClass handling prevented
this from actually working on our side.
BUG:393787
Reviewers: broulik, davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D13058
Summary:
If the fullRepresentation has a minimum size, the applet cannot be shrinked back to show the compactRepresentation.
Alternative fix: make the switch size larger than the minimum size of the fullRepresentation
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D12853
This codepath is hit when the search query is very short. Fixes "D" and "d" finding different, sometimes no, results.
BUG: 394202
FIXED-IN: 5.12.6
Differential Revision: https://phabricator.kde.org/D12927
Summary:
Password manager tools like Keepassx offer an option to clear
the clipboard/selection after some time, e.g. 10 seconds,
after the password was copied to the clipboard. This works fine,
but unfortunately the password isn't removed from Klipper's
history. This is a great security risk, which may make the use
of password managers impossible.
This patch changes Klipper::applyClipChanges(const QMimeData* clipData)
where clipboard data is inserted into history. If the data has an
additional mime type 'x-kde-passwordManagerHint' with the data 'secret',
it is not inserted into history.
For this to work as designed, password managers should add the
additional mime type 'x-kde-passwordManagerHint' to the mimeData
like following when copying a password to the clipboard:
```
QMimeData* mimeDataClipboard = new QMimeData();
const QString secretStr = "secret";
QByteArray secretBa = secretStr.toUtf8();
mimeDataClipboard->setText(password); // this is the password to copy
mimeDataClipboard->setData("x-kde-passwordManagerHint", secretBa);
clipboard->setMimeData(mimeDataClipboard, QClipboard::Clipboard);
if (clipboard->supportsSelection()) {
// we cannot use the same QMimeData, it's already owned by clipboard
QMimeData* mimeDataSelection = new QMimeData();
mimeDataSelection->setText(password); // this is the password to
copy
mimeDataSelection->setData("x-kde-passwordManagerHint", secretBa);
clipboard->setMimeData(mimeDataSelection, QClipboard::Selection);
}
```
Reviewers: davidedmundson
Reviewed By: davidedmundson
Subscribers: dvratil, broulik, graesslin, davidedmundson, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D12539
Summary:
The logout greeter theme has a timer that invokes the current action if
no keyboard interaction has taken place.
This cancel on keyboard nav is broken on multiple monitor setups as even
if a user is interacting with one, the timer from another can still
fire.
Fix is via JS singleton library as the timer is very theme specific. I
didn't want to add anything in shutdowndlg.cpp as it would be breaking
layering.
BUG: 394249
Test Plan:
Had multi monitor setup
Pressed key on one screen. All timer UIs cleared, nothing happened after
30 seconds
Reviewers: #plasma
Subscribers: zzag, broulik, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D12893
Summary:
With slideshow desktop wallpaper plugin, selecting "Open wallpaper Image" from RMB does nothing. It looks like the `action_open` method called by the RMB menu action is using an old field that no longer exists.
The patch updates the code to use the correct field.
BUG: 394035
Reviewers: #plasma_workspaces, ngraham, broulik
Reviewed By: #plasma_workspaces, ngraham, broulik
Subscribers: broulik, ngraham, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D12777
Summary:
Gives a speed boost on multiple monitors where we have multiple views.
Also cleaned up some imports/paths used
Test Plan:
Grepped use of rootContext() referred to the right context
Used greeter to log out successfully
Reviewers: #plasma, broulik
Reviewed By: #plasma, broulik
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D12891
Summary:
Move the {nav Open With} items into the top group of the context menu for notifications with images or files that you can open and see in the filesystem. This makes it consistent with Dolphin, which now has all the Open in/with items grouped together at the top of the menu.
I didn't move the {nav Open With} items all the way to the top because my sense is that {nav Open containing folder} is the more common action and deserves to be the top item. Also, putting it below the {nav Open With} actions would result in an extra ugly separator.
Test Plan: {F5848641}
Reviewers: broulik
Reviewed By: broulik
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D12882
Summary:
Krunner::match is performed in potentially multiple overlapping threads
as a user presses each character. Qt SQL is not thread safe according to
the docs or according to the numerous reports.
It's a bit of a blind patch, ideally we should only use the database in
the thread that opened it.
This patch at least this means queries will be queued which I think will
be enough.
CCBUG: 363136
Test Plan: Restarted krunner. Still saw my firefox bookmarks
Reviewers: #plasma, mart
Reviewed By: #plasma, mart
Subscribers: rempt, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D12683
Summary: This then invokes the relevant KCM when clicked
Test Plan:
Forced software rendering, saw SNI
restarted, saw SNI
set "never show again". It hid itself
Restarted. It remained hidden
Reviewers: #plasma, broulik
Reviewed By: #plasma, broulik
Subscribers: alexeymin, broulik, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D12679
Summary:
If we cannot create a GL context, instead of showing an error and
quitting, switch to using the QtQuick software renderer and restart.
If software mode is already set, then show the error as before. This
could happen in the case of the software renderer not being installed.
Test Plan:
After doing some driver changing, I ended up with the annoying "plasma can't start"
message.
Without the entry in kdeglobals I now start plasma and it seamlessly comes up
working.
Reviewers: #plasma
Subscribers: mart, broulik, graesslin, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D11722
Since Phonon 4.9, this code fails to play a login sound if the sound
file is specified as absolute file path (without "file://"). The reason
is that QUrl() treats the parameter as Url (not as file path), and this
only accidentally worked with earlier Phonon versions but not any more.
This patch uses QUrl::fromUserInput() instead to create a QUrl from the
string in the settings file, which fixes the problem.
This is the same change as
https://phabricator.kde.org/R289:9db06adc8114163f401417064b07772139bc36bc
in knotifications.
A more detailed explanation of the problem can be found in
https://bugs.kde.org/show_bug.cgi?id=337276#c12 .
BUG: 392725
FIXED-IN: 5.12.5
Differential Revision: https://phabricator.kde.org/D12606