X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/e308985de4b355e5758c916ba683040f6f394603..105fe62eeb3ec3258a35400a1e6cb2901e01ac2d:/src/views/dolphinview.cpp diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index 342c22638..df2797d1d 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -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(); @@ -1481,7 +1488,7 @@ void DolphinView::slotRenamingResult(KJob* job) void DolphinView::slotDirectoryLoadingStarted() { // Disable the writestate temporary until it can be determined in a fast way - // in DolphinView::slotLoadingCompleted() + // in DolphinView::slotDirectoryLoadingCompleted() if (m_isFolderWritable) { m_isFolderWritable = false; emit writeStateChanged(m_isFolderWritable);