D13535: Do not cancel old clipboard selection if it is same as the new one.

Fabian Vogt noreply at phabricator.kde.org
Thu Jun 14 17:25:11 UTC 2018


fvogt added a comment.


  Yes, a unit test makes sense. I tried to add
  
    // replace the data source with itself, ensure that it did not get cancelled
    // replace the data source with itself, ensure that it did not get cancelled
    selectionOfferedSpy.clear();
    dataSource2->offer(QStringLiteral("text/plain"));
    dataDevice->setSelection(2, dataSource2.data());
    QVERIFY(selectionOfferedSpy.wait());
    QVERIFY(sourceCancelled2Spy.isEmpty());
  
  in TestDataDevice::testReplaceSource() and it fails without this patch.
  With this patch however, the selection isn't offered (is that correct behaviour?) so the wait() times out.
  Is there a better way to test this?

REPOSITORY
  R127 KWayland

REVISION DETAIL
  https://phabricator.kde.org/D13535

To: fvogt, #plasma, #frameworks
Cc: graesslin, kde-frameworks-devel, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180614/a2d19f2d/attachment.html>


More information about the Kde-frameworks-devel mailing list