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
	
	-     StatusBar::hideDownloadManager(); 
-   
-     if ( ( event->button() == 2 ) && 
-          ( mPage->loggedIn() ) ) 
-     { 
-         contextMenu( event, mPage->currentSr() ); 
-         //qDebug() << mPage->getElementText( element.attribute("id") ); 
-     } 
-   
-     if ( ( event->button() == 4 ) &&  
-          ( mPage->loggedIn() ) && 
-          ( mPage->getElementAt( event->pos() ).element().attribute( "type" ) != "input" ) && 
-          ( mPage->getElementAt( event->pos() ).element().attribute( "type" ) != "text" )  && 
-          ( !isTextArea( mPage->getElementAt( event->pos() ).element() ) ) && 
-          ( MainApp::isSrNr( MainApp::getClipboard() ) ) ) 
-     { 
-         querySR( MainApp::getClipboard().trimmed() ); 
-     } 
-     QWebView::mousePressEvent( event ); 
- } 
        void Browser::mousePressEvent( QMouseEvent* event ) {
    StatusBar::hideDownloadManager();
    
    if ( ( event->button() == 2 ) &&
         ( mPage->loggedIn() ) )
    {
        contextMenu( event, mPage->currentSr() );
        //qDebug() << mPage->getElementText( element.attribute("id") );
    }
      
    if ( ( event->button() == 4 ) && 
         ( mPage->loggedIn() ) &&
         ( mPage->getElementAt( event->pos() ).element().attribute( "type" ) != "input" ) &&
         ( mPage->getElementAt( event->pos() ).element().attribute( "type" ) != "text" )  &&
         ( !isTextArea( mPage->getElementAt( event->pos() ).element() ) ) &&
         ( MainApp::isSrNr( MainApp::getClipboard() ) ) )
    {
        querySR( MainApp::getClipboard().trimmed() );
    }
    QWebView::mousePressEvent( event );
}
To copy to clipboard, switch view to plain text mode 
  
When i comment out everything EXPECT 
	
	- QWebView::mousePressEvent( event ); 
        QWebView::mousePressEvent( event );
To copy to clipboard, switch view to plain text mode 
  
the issue still happens.
If only commented out the line
	
	- QWebView::mousePressEvent( event ); 
        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
				
			
Bookmarks