diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-05-19 14:51:39 -0500 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2013-05-20 01:17:13 +0200 |
commit | ab6b32d2617496ee55c2ab5600903cfbe7096cff (patch) | |
tree | 1165745408e3cc801da1598ebd4a6d6dfc0c3ab0 | |
parent | 3d9f4442efe2defc4bc1d70f2d3dec342ee7d0d4 (diff) | |
download | tdebase-ab6b32d2617496ee55c2ab5600903cfbe7096cff.tar.gz tdebase-ab6b32d2617496ee55c2ab5600903cfbe7096cff.zip |
Fix inadvertent sidebar signal disconnection on mouse settings reload
This resolves Bug 1515
(cherry picked from commit 3a3d187585f05730e7084ae122d80438bde88080)
-rw-r--r-- | konqueror/sidebar/trees/dirtree_module/dirtree_item.cpp | 3 | ||||
-rw-r--r-- | konqueror/sidebar/trees/konq_sidebartree.cpp | 10 | ||||
-rw-r--r-- | konqueror/sidebar/trees/konq_sidebartree.h | 2 |
3 files changed, 10 insertions, 5 deletions
diff --git a/konqueror/sidebar/trees/dirtree_module/dirtree_item.cpp b/konqueror/sidebar/trees/dirtree_module/dirtree_item.cpp index 811867b14..6af1b452c 100644 --- a/konqueror/sidebar/trees/dirtree_module/dirtree_item.cpp +++ b/konqueror/sidebar/trees/dirtree_module/dirtree_item.cpp @@ -159,8 +159,9 @@ void KonqSidebarDirTreeItem::itemSelected() { bool bInTrash = false; - if ( m_fileItem->url().directory(false) == KGlobalSettings::trashPath() ) + if ( m_fileItem->url().directory(false) == KGlobalSettings::trashPath() ) { bInTrash = true; + } TQMimeSource *data = TQApplication::clipboard()->data(); bool paste = ( data->encodedData( data->format() ).size() != 0 ); diff --git a/konqueror/sidebar/trees/konq_sidebartree.cpp b/konqueror/sidebar/trees/konq_sidebartree.cpp index e6cfacbf8..1ce06fad8 100644 --- a/konqueror/sidebar/trees/konq_sidebartree.cpp +++ b/konqueror/sidebar/trees/konq_sidebartree.cpp @@ -156,7 +156,7 @@ KonqSidebarTree::KonqSidebarTree( KonqSidebar_Tree *parent, TQWidget *parentWidg connect( this, TQT_SIGNAL( mouseButtonPressed(int, TQListViewItem*, const TQPoint&, int)), this, TQT_SLOT( slotMouseButtonPressed(int, TQListViewItem*, const TQPoint&, int)) ); connect( this, TQT_SIGNAL( mouseButtonClicked( int, TQListViewItem*, const TQPoint&, int ) ), - this, TQT_SLOT( slotMouseButtonClicked( int, TQListViewItem*, const TQPoint&, int ) ) ); + this, TQT_SLOT( slotSidebarMouseButtonClicked( int, TQListViewItem*, const TQPoint&, int ) ) ); connect( this, TQT_SIGNAL( returnPressed( TQListViewItem * ) ), this, TQT_SLOT( slotDoubleClicked( TQListViewItem * ) ) ); connect( this, TQT_SIGNAL( selectionChanged() ), @@ -475,8 +475,9 @@ void KonqSidebarTree::slotExecuted( TQListViewItem *item ) args.serviceType = dItem->externalMimeType(); args.trustedSource = true; KURL externalURL = dItem->externalURL(); - if ( !externalURL.isEmpty() ) + if ( !externalURL.isEmpty() ) { openURLRequest( externalURL, args ); + } } void KonqSidebarTree::slotMouseButtonPressed( int _button, TQListViewItem* _item, const TQPoint&, int col ) @@ -492,7 +493,10 @@ void KonqSidebarTree::slotMouseButtonPressed( int _button, TQListViewItem* _item } } -void KonqSidebarTree::slotMouseButtonClicked(int _button, TQListViewItem* _item, const TQPoint&, int col) +// This is named slotSidebarMouseButtonClicked() so as not to conflict with slotMouseButtonClicked() +// If the same name is used, both slots will be disconnected whenever mouse settings are loaded +// See klistview.cpp slotSettingsChanged() and Bug 1515 for details +void KonqSidebarTree::slotSidebarMouseButtonClicked(int _button, TQListViewItem* _item, const TQPoint&, int col) { KonqSidebarTreeItem * item = static_cast<KonqSidebarTreeItem*>(_item); if(_item && col < 2) diff --git a/konqueror/sidebar/trees/konq_sidebartree.h b/konqueror/sidebar/trees/konq_sidebartree.h index a8e2ad075..02968c252 100644 --- a/konqueror/sidebar/trees/konq_sidebartree.h +++ b/konqueror/sidebar/trees/konq_sidebartree.h @@ -135,7 +135,7 @@ private slots: void slotDoubleClicked( TQListViewItem *item ); void slotExecuted( TQListViewItem *item ); void slotMouseButtonPressed(int _button, TQListViewItem* _item, const TQPoint&, int col); - void slotMouseButtonClicked(int _button, TQListViewItem* _item, const TQPoint&, int col); + void slotSidebarMouseButtonClicked(int _button, TQListViewItem* _item, const TQPoint&, int col); void slotSelectionChanged(); void slotAnimation(); |