Fix rare Konqueror crash in tree view mode

This relates to Bug 1820
pull/2/head
Timothy Pearson 10 years ago
parent f3becf2104
commit dc94a41a15

@ -404,6 +404,7 @@ KonqBaseListViewItem::KonqBaseListViewItem(KonqBaseListViewWidget *_listViewWidg
,m_bDisabled(false)
,m_bActive(false)
,m_fileitem(_fileitem)
,m_fileitemURL(_fileitem->url())
,m_pListViewWidget(_listViewWidget)
{}
@ -413,6 +414,7 @@ KonqBaseListViewItem::KonqBaseListViewItem(KonqBaseListViewWidget *_listViewWidg
,m_bDisabled(false)
,m_bActive(false)
,m_fileitem(_fileitem)
,m_fileitemURL(_fileitem->url())
,m_pListViewWidget(_listViewWidget)
{}

@ -71,8 +71,11 @@ class KonqBaseListViewItem : public TDEListViewItem
bool m_bDisabled;
bool m_bActive;
/** Pointer to the file item in KDirLister's list */
/** Pointer to the file item in KDirLister's list
* Don't use this unless you absolutely have to! */
KFileItem* m_fileitem;
/** URL of file item */
KURL m_fileitemURL;
/** Parent tree view */
KonqBaseListViewWidget* m_pListViewWidget;

@ -89,8 +89,13 @@ void KonqListViewDir::open( bool _open, bool _reload )
}
}
KURL KonqListViewDir::kurl()
{
return m_fileitemURL;
}
TQString KonqListViewDir::url( int _trailing )
{
return item()->url().url( _trailing );
return m_fileitemURL.url( _trailing );
}

@ -66,6 +66,11 @@ public:
*/
virtual void setComplete( bool _b ) { m_bComplete = _b; }
/**
* URL of this directory
*/
KURL kurl();
/**
* URL of this directory
* @param _trailing set to true for a trailing slash (see KURL)

@ -294,13 +294,13 @@ void KonqTreeViewWidget::slotDeleteItem( KFileItem *_fileItem )
void KonqTreeViewWidget::openSubFolder( KonqListViewDir* _dir, bool _reload )
{
m_dirLister->openURL( _dir->item()->url(), true /* keep existing data */, _reload );
m_dirLister->openURL( _dir->kurl(), true /* keep existing data */, _reload );
slotUpdateBackground();
}
void KonqTreeViewWidget::stopListingSubFolder( KonqListViewDir* _dir )
{
m_dirLister->stop( _dir->item()->url() );
m_dirLister->stop( _dir->kurl() );
slotUpdateBackground();
}

Loading…
Cancel
Save