Fix inadvertent sidebar signal disconnection on mouse settings reload

This resolves Bug 1515
pull/2/head
Timothy Pearson 11 years ago
parent 533941e5dd
commit 3a3d187585

@ -159,8 +159,9 @@ void KonqSidebarDirTreeItem::itemSelected()
{ {
bool bInTrash = false; bool bInTrash = false;
if ( m_fileItem->url().directory(false) == TDEGlobalSettings::trashPath() ) if ( m_fileItem->url().directory(false) == TDEGlobalSettings::trashPath() ) {
bInTrash = true; bInTrash = true;
}
TQMimeSource *data = TQApplication::clipboard()->data(); TQMimeSource *data = TQApplication::clipboard()->data();
bool paste = ( data->encodedData( data->format() ).size() != 0 ); bool paste = ( data->encodedData( data->format() ).size() != 0 );

@ -156,7 +156,7 @@ KonqSidebarTree::KonqSidebarTree( KonqSidebar_Tree *parent, TQWidget *parentWidg
connect( this, TQT_SIGNAL( mouseButtonPressed(int, TQListViewItem*, const TQPoint&, int)), connect( this, TQT_SIGNAL( mouseButtonPressed(int, TQListViewItem*, const TQPoint&, int)),
this, TQT_SLOT( slotMouseButtonPressed(int, TQListViewItem*, const TQPoint&, int)) ); this, TQT_SLOT( slotMouseButtonPressed(int, TQListViewItem*, const TQPoint&, int)) );
connect( this, TQT_SIGNAL( mouseButtonClicked( 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 * ) ), connect( this, TQT_SIGNAL( returnPressed( TQListViewItem * ) ),
this, TQT_SLOT( slotDoubleClicked( TQListViewItem * ) ) ); this, TQT_SLOT( slotDoubleClicked( TQListViewItem * ) ) );
connect( this, TQT_SIGNAL( selectionChanged() ), connect( this, TQT_SIGNAL( selectionChanged() ),
@ -475,8 +475,9 @@ void KonqSidebarTree::slotExecuted( TQListViewItem *item )
args.serviceType = dItem->externalMimeType(); args.serviceType = dItem->externalMimeType();
args.trustedSource = true; args.trustedSource = true;
KURL externalURL = dItem->externalURL(); KURL externalURL = dItem->externalURL();
if ( !externalURL.isEmpty() ) if ( !externalURL.isEmpty() ) {
openURLRequest( externalURL, args ); openURLRequest( externalURL, args );
}
} }
void KonqSidebarTree::slotMouseButtonPressed( int _button, TQListViewItem* _item, const TQPoint&, int col ) 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 tdelistview.cpp slotSettingsChanged() and Bug 1515 for details
void KonqSidebarTree::slotSidebarMouseButtonClicked(int _button, TQListViewItem* _item, const TQPoint&, int col)
{ {
KonqSidebarTreeItem * item = static_cast<KonqSidebarTreeItem*>(_item); KonqSidebarTreeItem * item = static_cast<KonqSidebarTreeItem*>(_item);
if(_item && col < 2) if(_item && col < 2)

@ -135,7 +135,7 @@ private slots:
void slotDoubleClicked( TQListViewItem *item ); void slotDoubleClicked( TQListViewItem *item );
void slotExecuted( TQListViewItem *item ); void slotExecuted( TQListViewItem *item );
void slotMouseButtonPressed(int _button, TQListViewItem* _item, const TQPoint&, int col); 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 slotSelectionChanged();
void slotAnimation(); void slotAnimation();

Loading…
Cancel
Save