]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/views/dolphinview.cpp
Merge branch 'Applications/18.08'
[dolphin.git] / src / views / dolphinview.cpp
index 342c226382ae561fef05fd1af3e14f619bc82ed7..48f41bb0e85f1de848f18a1803d6ce4905a6d2bf 100644 (file)
@@ -176,8 +176,10 @@ DolphinView::DolphinView(const QUrl& url, QWidget* parent) :
     connect(selectionManager, &KItemListSelectionManager::selectionChanged,
             this, &DolphinView::slotSelectionChanged);
 
+#ifdef HAVE_BALOO
     m_toolTipManager = new ToolTipManager(this);
     connect(m_toolTipManager, &ToolTipManager::urlActivated, this, &DolphinView::urlActivated);
+#endif
 
     m_versionControlObserver = new VersionControlObserver(this);
     m_versionControlObserver->setModel(m_model);
@@ -755,6 +757,7 @@ bool DolphinView::eventFilter(QObject* watched, QEvent* event)
     case QEvent::GraphicsSceneDragEnter:
         if (watched == m_view) {
             m_dragging = true;
+            abortTwoClicksRenaming();
         }
         break;
 
@@ -1030,7 +1033,9 @@ void DolphinView::slotItemHovered(int index)
         const QPoint pos = m_container->mapToGlobal(itemRect.topLeft().toPoint());
         itemRect.moveTo(pos);
 
+#ifdef HAVE_BALOO
         m_toolTipManager->showToolTip(item, itemRect, nativeParentWidget()->windowHandle());
+#endif
     }
 
     emit requestItemInfo(item);
@@ -1407,9 +1412,11 @@ void DolphinView::updateViewState()
 
 void DolphinView::hideToolTip()
 {
+#ifdef HAVE_BALOO
     if (GeneralSettings::showToolTips()) {
         m_toolTipManager->hideToolTip();
     }
+#endif
 }
 
 void DolphinView::calculateItemCount(int& fileCount,
@@ -1432,8 +1439,8 @@ void DolphinView::slotTwoClicksRenamingTimerTimeout()
 {
     const KItemListSelectionManager* selectionManager = m_container->controller()->selectionManager();
 
-    // verify that only one item is selected and that no item is dragged
-    if (selectionManager->selectedItems().count() == 1 && !m_dragging) {
+    // verify that only one item is selected
+    if (selectionManager->selectedItems().count() == 1) {
         const int index = selectionManager->currentItem();
         const QUrl fileItemUrl = m_model->fileItem(index).url();