From cfd04d22d9678f6797bbf398f17e0c5ed266b3a4 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)