From 6c3a2002b49c783df8bffba8f2c6c3f48d37904e Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Tue, 8 Apr 2008 19:08:23 +0000 Subject: [PATCH] Bypassed a Qt-issue where enabling the menu-animation for QApplication emits a clicked() signal during the context menu is open. I got no bug-number from the Trolltech tasktracker yet, I'll update the number xxxxxx by the real number as soon as I received the bug-number. BUG: 155574 svn path=/trunk/KDE/kdebase/apps/; revision=794872 --- src/dolphinview.cpp | 6 +++++- src/dolphinview.h | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/dolphinview.cpp b/src/dolphinview.cpp index 869d052af..7b0ac8947 100644 --- a/src/dolphinview.cpp +++ b/src/dolphinview.cpp @@ -69,6 +69,7 @@ DolphinView::DolphinView(QWidget* parent, m_showPreview(false), m_loadingDirectory(false), m_storedCategorizedSorting(false), + m_isContextMenuOpen(false), m_mode(DolphinView::IconsView), m_topLayout(0), m_controller(0), @@ -747,7 +748,8 @@ void DolphinView::triggerItem(const KFileItem& item) return; } - if (item.isNull()) { + // TODO: the m_isContextMenuOpen check is a workaround for Qt-issue xxxxxx + if (item.isNull() || m_isContextMenuOpen) { return; } @@ -768,7 +770,9 @@ void DolphinView::openContextMenu(const QPoint& pos) item = fileItem(index); } + m_isContextMenuOpen = true; // TODO: workaround for Qt-issue xxxxxx emit requestContextMenu(item, url()); + m_isContextMenuOpen = false; } void DolphinView::dropUrls(const KUrl::List& urls, diff --git a/src/dolphinview.h b/src/dolphinview.h index c058338a8..40d382738 100644 --- a/src/dolphinview.h +++ b/src/dolphinview.h @@ -639,6 +639,7 @@ private: bool m_showPreview; bool m_loadingDirectory; bool m_storedCategorizedSorting; + bool m_isContextMenuOpen; // TODO: workaround for Qt-issue xxxxxx Mode m_mode; DolphinMainWindow* m_mainWindow; -- 2.47.3