diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-07-25 09:06:27 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-07-25 09:06:27 +0200 |
commit | bf0306261a04b9bc4f72a617e06ac0709bf41be7 (patch) | |
tree | 6fcf2cc08717a496197202a0183168a7603c33ed | |
parent | d6841e0c4f9c567fd7157eddfb28b84fba9114f4 (diff) | |
download | kube-bf0306261a04b9bc4f72a617e06ac0709bf41be7.tar.gz kube-bf0306261a04b9bc4f72a617e06ac0709bf41be7.zip |
Avoid unnecessary widgets dependency
-rw-r--r-- | framework/src/clipboardproxy.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/framework/src/clipboardproxy.cpp b/framework/src/clipboardproxy.cpp index aaa5052b..0d8c9cbf 100644 --- a/framework/src/clipboardproxy.cpp +++ b/framework/src/clipboardproxy.cpp | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | Copyright (c) 2016 Christian Mollekofp <mollekopf@kolabsys.com> | 2 | Copyright (c) 2016 Christian Mollekopf <mollekopf@kolabsys.com> |
3 | 3 | ||
4 | This library is free software; you can redistribute it and/or modify it | 4 | This library is free software; you can redistribute it and/or modify it |
5 | under the terms of the GNU Library General Public License as published by | 5 | under the terms of the GNU Library General Public License as published by |
@@ -19,12 +19,12 @@ | |||
19 | #include "clipboardproxy.h" | 19 | #include "clipboardproxy.h" |
20 | 20 | ||
21 | #include <QClipboard> | 21 | #include <QClipboard> |
22 | #include <QApplication> | 22 | #include <QGuiApplication> |
23 | 23 | ||
24 | ClipboardProxy::ClipboardProxy(QObject *parent) | 24 | ClipboardProxy::ClipboardProxy(QObject *parent) |
25 | : QObject(parent) | 25 | : QObject(parent) |
26 | { | 26 | { |
27 | QClipboard *clipboard = QApplication::clipboard(); | 27 | QClipboard *clipboard = QGuiApplication::clipboard(); |
28 | QObject::connect(clipboard, &QClipboard::dataChanged, | 28 | QObject::connect(clipboard, &QClipboard::dataChanged, |
29 | this, &ClipboardProxy::dataChanged); | 29 | this, &ClipboardProxy::dataChanged); |
30 | QObject::connect(clipboard, &QClipboard::selectionChanged, | 30 | QObject::connect(clipboard, &QClipboard::selectionChanged, |
@@ -33,7 +33,7 @@ ClipboardProxy::ClipboardProxy(QObject *parent) | |||
33 | 33 | ||
34 | void ClipboardProxy::setDataText(const QString &text) | 34 | void ClipboardProxy::setDataText(const QString &text) |
35 | { | 35 | { |
36 | QApplication::clipboard()->setText(text, QClipboard::Clipboard); | 36 | QGuiApplication::clipboard()->setText(text, QClipboard::Clipboard); |
37 | } | 37 | } |
38 | 38 | ||
39 | QString ClipboardProxy::dataText() const | 39 | QString ClipboardProxy::dataText() const |
@@ -43,10 +43,10 @@ QString ClipboardProxy::dataText() const | |||
43 | 43 | ||
44 | void ClipboardProxy::setSelectionText(const QString &text) | 44 | void ClipboardProxy::setSelectionText(const QString &text) |
45 | { | 45 | { |
46 | QApplication::clipboard()->setText(text, QClipboard::Selection); | 46 | QGuiApplication::clipboard()->setText(text, QClipboard::Selection); |
47 | } | 47 | } |
48 | 48 | ||
49 | QString ClipboardProxy::selectionText() const | 49 | QString ClipboardProxy::selectionText() const |
50 | { | 50 | { |
51 | return QApplication::clipboard()->text(QClipboard::Selection); | 51 | return QGuiApplication::clipboard()->text(QClipboard::Selection); |
52 | } | 52 | } |