From 6b04278de2d3532d1987c9703c7fd99e322ac7d1 Mon Sep 17 00:00:00 2001 From: Yuri Date: Sun, 17 May 2015 10:57:55 -0700 Subject: [PATCH] Copy ToxID into XA_PRIMARY clipboard too to make retrieval easier. --- src/widget/form/profileform.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/widget/form/profileform.cpp b/src/widget/form/profileform.cpp index c92bf3418..b3648d2d6 100644 --- a/src/widget/form/profileform.cpp +++ b/src/widget/form/profileform.cpp @@ -150,7 +150,9 @@ void ProfileForm::copyIdClicked() toxId->selectAll(); QString txt = toxId->text(); txt.replace('\n',""); - QApplication::clipboard()->setText(txt); + QApplication::clipboard()->setText(txt, QClipboard::Clipboard); + if (QApplication::clipboard()->supportsSelection()) + QApplication::clipboard()->setText(txt, QClipboard::Selection); toxId->setCursorPosition(0); if (!hasCheck)