Hi all,

i am maintaining a Qt4 application, since updating my desktop to KDE5 (plasma5) i experience strange issues with marking text for cut&paste.

Issue is as following.


When i mark some text with the mouse in the Qt4 based application (the application displays a webpage with the use of QtWebPage and QtWebView) the KDE5 plasma system tray get stuck for around 30 seconds e.g. clicking on a icon does not work, clicking on a different task does not work, clicking the menu button does not work etc. However switching tasks via ALT+tab does all times work perfectly. So it looks like only the system tray is affected.

I debugged the issue down to following call in the application

- The application window uses QtWebPage
- inside QTWebPage object a QtWebView object is used to create the view for the webpage.
- The QtWebView has a mouse event handler

Qt Code:
  1. void Browser::mousePressEvent( QMouseEvent* event ) {
  2. StatusBar::hideDownloadManager();
  3.  
  4. if ( ( event->button() == 2 ) &&
  5. ( mPage->loggedIn() ) )
  6. {
  7. contextMenu( event, mPage->currentSr() );
  8. //qDebug() << mPage->getElementText( element.attribute("id") );
  9. }
  10.  
  11. if ( ( event->button() == 4 ) &&
  12. ( mPage->loggedIn() ) &&
  13. ( mPage->getElementAt( event->pos() ).element().attribute( "type" ) != "input" ) &&
  14. ( mPage->getElementAt( event->pos() ).element().attribute( "type" ) != "text" ) &&
  15. ( !isTextArea( mPage->getElementAt( event->pos() ).element() ) ) &&
  16. ( MainApp::isSrNr( MainApp::getClipboard() ) ) )
  17. {
  18. querySR( MainApp::getClipboard().trimmed() );
  19. }
  20. QWebView::mousePressEvent( event );
  21. }
To copy to clipboard, switch view to plain text mode 

When i comment out everything EXPECT

Qt Code:
  1. QWebView::mousePressEvent( event );
To copy to clipboard, switch view to plain text mode 

the issue still happens.

If only commented out the line

Qt Code:
  1. QWebView::mousePressEvent( event );
To copy to clipboard, switch view to plain text mode 

the issue does not show up, hover mouse clicks are not recognized anymore.

So i believe the issue must be related to QWebView::mousePressEvent. Is there something i can check/debug this to track down the issue ?

Thanks for any help/hint.

regards,
Tami