From 533599ab1e843c36f87aceee0ff5b864cbf82f03 Mon Sep 17 00:00:00 2001 From: Kurt Hindenburg Date: Sun, 17 Jan 2010 22:59:59 +0000 Subject: [PATCH] Don't copy an empty string to the clipboard. Ideally this should be handled by disable-ing the menu/shortcuts for Copy/Cut/Paste (Wish 203768). BUG: 188725 svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1076289 --- src/TerminalDisplay.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/TerminalDisplay.cpp b/src/TerminalDisplay.cpp index d77fd63e..ce2b51b1 100644 --- a/src/TerminalDisplay.cpp +++ b/src/TerminalDisplay.cpp @@ -2444,7 +2444,8 @@ void TerminalDisplay::copyClipboard() return; QString text = _screenWindow->selectedText(_preserveLineBreaks); - QApplication::clipboard()->setText(text); + if (!text.isEmpty()) + QApplication::clipboard()->setText(text); } void TerminalDisplay::pasteClipboard()