- // Only request a tooltip for the name column and when no selection or
- // drag & drop operation is done (indicated by the left mouse button)
- if ((index.column() == DolphinModel::Name) && !(QApplication::mouseButtons() & Qt::LeftButton)) {
- m_itemRect = m_view->visualRect(index);
- const QPoint pos = m_view->viewport()->mapToGlobal(m_itemRect.topLeft());
- m_itemRect.moveTo(pos);
-
- const QModelIndex dirIndex = m_proxyModel->mapToSource(index);
- m_item = m_dolphinModel->itemForIndex(dirIndex);
-
- // Only start the retrieving of the content, when the mouse has been over this
- // item for 200 milliseconds. This prevents a lot of useless preview jobs and
- // meta data retrieval, when passing rapidly over a lot of items.
- m_contentRetrievalTimer->start();
- m_showToolTipTimer->start();
- m_toolTipRequested = true;
- Q_ASSERT(!m_metaDataRequested);
+ m_toolTipRequested = false;
+ m_metaDataRequested = false;
+ m_showToolTipTimer->stop();
+ m_contentRetrievalTimer->stop();
+
+ if (m_fileMetaDataToolTip) {
+ m_fileMetaDataToolTip->hide();
+ // Do not delete the tool tip immediately to prevent crashes when
+ // QCoreApplication tries to deliver an 'Enter' event to it, see bug 310579.
+ m_fileMetaDataToolTip->deleteLater();
+ m_fileMetaDataToolTip = 0;