]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Merge branch 'Applications/18.08'
authorElvis Angelaccio <elvis.angelaccio@kde.org>
Sat, 27 Oct 2018 16:04:05 +0000 (18:04 +0200)
committerElvis Angelaccio <elvis.angelaccio@kde.org>
Sat, 27 Oct 2018 16:04:05 +0000 (18:04 +0200)
1  2 
src/views/dolphinview.cpp

index 40346c169c849bf7583b01708beda9ad3d26c523,3bb71089f62b41964aac402b7b2e5f194775b48b..3e966792de6334d4d2e565b59fdc76d7fcc9937e
@@@ -176,10 -176,8 +176,10 @@@ DolphinView::DolphinView(const QUrl& ur
      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);
@@@ -1033,9 -1031,7 +1033,9 @@@ void DolphinView::slotItemHovered(int i
          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);
@@@ -1120,7 -1116,7 +1120,7 @@@ void DolphinView::slotMouseButtonPresse
  
  void DolphinView::slotSelectedItemTextPressed(int index)
  {
-     if (GeneralSettings::renameInline()) {
+     if (GeneralSettings::renameInline() && !m_view->style()->styleHint(QStyle::SH_ItemView_ActivateItemOnSingleClick)) {
          const KFileItem item = m_model->fileItem(index);
          const KFileItemListProperties capabilities(KFileItemList() << item);
          if (capabilities.supportsMoving()) {
@@@ -1412,11 -1408,9 +1412,11 @@@ void DolphinView::updateViewState(
  
  void DolphinView::hideToolTip()
  {
 +#ifdef HAVE_BALOO
      if (GeneralSettings::showToolTips()) {
          m_toolTipManager->hideToolTip();
      }
 +#endif
  }
  
  void DolphinView::calculateItemCount(int& fileCount,
@@@ -1488,7 -1482,7 +1488,7 @@@ void DolphinView::slotRenamingResult(KJ
  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);
@@@ -1569,7 -1563,7 +1569,7 @@@ void DolphinView::slotRoleEditingFinish
      if (role == "text") {
          const KFileItem oldItem = m_model->fileItem(index);
          const QString newName = value.toString();
 -        if (!newName.isEmpty() && newName != oldItem.text() && newName != QLatin1String(".") && newName != QLatin1String("..")) {
 +        if (!newName.isEmpty() && newName != oldItem.text() && newName != QLatin1Char('.') && newName != QLatin1String("..")) {
              const QUrl oldUrl = oldItem.url();
  
              QUrl newUrl = oldUrl.adjusted(QUrl::RemoveFilename);