MCPcopy Create free account
hub / github.com/KDE/kdiff3 / canCopy

Method canCopy

src/kdiff3.cpp:556–561  ·  view source on GitHub ↗

Please do not add logic for MergeResultWindow or DiffTextWindow here they have their own handlers. This function is only concerned with qt objects that don't support canCopy. allowCopy() or's the results from all canCopy signals sent via boost. returns true if a QLineEdit or QLineEdit is in focus because Qt handles these internally. */

Source from the content-addressed store, hash-verified

554 returns true if a QLineEdit or QLineEdit is in focus because Qt handles these internally.
555*/
556bool KDiff3App::canCopy()
557{
558 QWidget* focus = focusWidget();
559
560 return (qobject_cast<QLineEdit*>(focus) != nullptr || qobject_cast<QTextEdit*>(focus) != nullptr);
561}
562/*
563 Make sure Edit menu tracks focus correctly.
564*/

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected