Commit 6084727f authored by Volker Krause's avatar Volker Krause
Browse files

Remove the separate clipboard import for health certificates

This is now covered by the generic paste handler.
parent 818f57e0
......@@ -21,7 +21,7 @@ Kirigami.ScrollablePage {
Kirigami.Action {
iconName: "edit-paste"
text: i18n("Import from Clipboard")
onTriggered: HealthCertificateManager.importCertificateFromClipboard()
onTriggered: ApplicationController.importFromClipboard()
},
Kirigami.Action {
iconName: "edit-delete"
......
......@@ -16,13 +16,10 @@
#include <KLocalizedString>
#include <QClipboard>
#include <QDebug>
#include <QDir>
#include <QDirIterator>
#include <QFile>
#include <QGuiApplication>
#include <QMimeData>
#include <QStandardPaths>
#include <QUuid>
......@@ -87,16 +84,6 @@ bool HealthCertificateManager::importCertificate(const QByteArray &rawData)
#endif
}
void HealthCertificateManager::importCertificateFromClipboard()
{
const auto md = QGuiApplication::clipboard()->mimeData();
if (md->hasText()) {
importCertificate(md->text().toUtf8());
} else if (md->hasFormat(QLatin1String("application/octet-stream"))) {
importCertificate(md->data(QLatin1String("application/octet-stream")));
}
}
void HealthCertificateManager::removeCertificate(int row)
{
beginRemoveRows({}, row, row);
......
......@@ -26,7 +26,6 @@ public:
bool isAvailable() const;
bool importCertificate(const QByteArray &rawData);
Q_INVOKABLE void importCertificateFromClipboard();
Q_INVOKABLE void removeCertificate(int row);
enum {
......
Markdown is supported
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