Summary:
D19852 intrdouced x-kde-force-image-copy hint for programs to specify that
images should be set to the clipboard even if should not be included in the
history. But when the program was closed the clipboard was restored to the first
item in history in which the image was not included. To fix this introduce a new
class member which holds the last clipboard item and restore it.
Credit goes to David Edumndson
Test Plan:
Try it with spectacle
Reviewers:
@ngraham, @davidedmundson, #plasma
Subscribers:
Summary:
D19852 intrdouced x-kde-force-image-copy hint for programs to specify that
images should be set to the clipboard even if should not be included in the
history. But when the program was closed the clipboard was restored to the first
item in history in which the image was not included. To fix this introduce a new
class member which holds the last clipboard item and restore it.
Credit goes to David Edumndson
Test Plan:
Try it with spectacle
Reviewers:
@ngraham, @davidedmundson, #plasma
Subscribers:
Summary:
kde4_add_app_icon is fairly deprecated. additionally the call itself
was madness because it actually pulls the icon out of oxygen in the install
location. that is assuming the icon theme is even installed at build time
(which is probably always not true in our binary factorization
environments). lastly the app_icon helper is only useful to pick up
icons for osx and windows, neither are target platforms for plasma.
remove the app_icon call entirely until a use for it arises, which should
be... never... unless we decide that we want to replace explorer.exe ;)
Reviewers: davidedmundson
Reviewed By: davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D21766
Summary:
Change the default Klipper behavior in order for https://phabricator.kde.org/D19715 to work.
Klipper will save images to clipboard, but unless Ignore Images is unchecked in the options, it won't save them to clipboard history.
CCBUG: 393708
Reviewers: #plasma_workspaces, davidedmundson
Reviewed By: #plasma_workspaces, davidedmundson
Subscribers: ngraham, davidedmundson, plasma-devel, #plasma_workspaces
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D19852
Nested event loops in conjunction with QML are dangerous.
Port to QMessageBox which can be used without exec()
CHANGELOG: Fix crash when deactivating Klipper's URL grabber
BUG: 363771
FIXED-IN: 5.14.5
Differential Revision: https://phabricator.kde.org/D17531
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:
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