Automatically put text into clipboard when yanking

Review Request #109512 - Created March 15, 2013 and submitted

Information
Fabian Kosmale
kate
273386
Reviewers
kate
ehamberg
This patch adds yanked text to the clipboard when no specific register was specified. Unfortunately, it can't be used for the deletion commnands. Support for them could be easily added in KateViModeBase::deleteRange (the yankToClipBoard function would then moved there).However that would require including the needed header in KateViModeBase. 
As I'm not sure if this is a good idea, and would like to hear your opinion on this. I'd also like to hear if you have a better idea where this could be implemented.
Last but not least, there aren't unit tests for my code at the moment. I'd like to write some, but I couldn't find documentation about them so far.
compiled and run; worked as intended

Issues

  • 3
  • 0
  • 0
  • 3
Description From Last Updated
If you make this: QApplication::clipboard()->setText(text); you do not need the member variable m_clipboard at all. Or do I miss something? Dominik Haumann Dominik Haumann
make it #include "kateglobal.h" if you use KateGlobal::copyToClipboard(). Dominik Haumann Dominik Haumann
I just stumbled over void KateGlobal::copyToClipboard (const QString &text) which provides a clipboard history. I suggest to use this instead ... Dominik Haumann Dominik Haumann
Dominik Haumann
Fabian Kosmale
Erlend Hamberg
Fabian Kosmale
Dominik Haumann
Fabian Kosmale
Commit Hook
Fabian Kosmale
Review request changed

Status: Closed (submitted)

Loading...