From bf0306261a04b9bc4f72a617e06ac0709bf41be7 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Wed, 25 Jul 2018 09:06:27 +0200 Subject: Avoid unnecessary widgets dependency --- framework/src/clipboardproxy.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'framework') 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 @@ /* - Copyright (c) 2016 Christian Mollekofp + Copyright (c) 2016 Christian Mollekopf This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by @@ -19,12 +19,12 @@ #include "clipboardproxy.h" #include -#include +#include ClipboardProxy::ClipboardProxy(QObject *parent) : QObject(parent) { - QClipboard *clipboard = QApplication::clipboard(); + QClipboard *clipboard = QGuiApplication::clipboard(); QObject::connect(clipboard, &QClipboard::dataChanged, this, &ClipboardProxy::dataChanged); QObject::connect(clipboard, &QClipboard::selectionChanged, @@ -33,7 +33,7 @@ ClipboardProxy::ClipboardProxy(QObject *parent) void ClipboardProxy::setDataText(const QString &text) { - QApplication::clipboard()->setText(text, QClipboard::Clipboard); + QGuiApplication::clipboard()->setText(text, QClipboard::Clipboard); } QString ClipboardProxy::dataText() const @@ -43,10 +43,10 @@ QString ClipboardProxy::dataText() const void ClipboardProxy::setSelectionText(const QString &text) { - QApplication::clipboard()->setText(text, QClipboard::Selection); + QGuiApplication::clipboard()->setText(text, QClipboard::Selection); } QString ClipboardProxy::selectionText() const { - return QApplication::clipboard()->text(QClipboard::Selection); + return QGuiApplication::clipboard()->text(QClipboard::Selection); } -- cgit v1.2.3