summaryrefslogtreecommitdiffstats
path: root/konqueror
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-10-04 18:27:03 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-10-04 18:27:03 -0500
commitdc94a41a15af93d28310c04e224419fb033b7a7e (patch)
treec45d19adb00df0cd9c4df1142404fcaab723fdfa /konqueror
parentf3becf2104c8a615807ca62ce7c170624aab9ea5 (diff)
downloadtdebase-dc94a41a15af93d28310c04e224419fb033b7a7e.tar.gz
tdebase-dc94a41a15af93d28310c04e224419fb033b7a7e.zip
Fix rare Konqueror crash in tree view mode
This relates to Bug 1820
Diffstat (limited to 'konqueror')
-rw-r--r--konqueror/listview/konq_listviewitems.cc2
-rw-r--r--konqueror/listview/konq_listviewitems.h5
-rw-r--r--konqueror/listview/konq_treeviewitem.cc7
-rw-r--r--konqueror/listview/konq_treeviewitem.h5
-rw-r--r--konqueror/listview/konq_treeviewwidget.cc4
5 files changed, 19 insertions, 4 deletions
diff --git a/konqueror/listview/konq_listviewitems.cc b/konqueror/listview/konq_listviewitems.cc
index d5665313f..45ff99c1c 100644
--- a/konqueror/listview/konq_listviewitems.cc
+++ b/konqueror/listview/konq_listviewitems.cc
@@ -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)
{}
diff --git a/konqueror/listview/konq_listviewitems.h b/konqueror/listview/konq_listviewitems.h
index f374daf1b..2e2827519 100644
--- a/konqueror/listview/konq_listviewitems.h
+++ b/konqueror/listview/konq_listviewitems.h
@@ -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;
diff --git a/konqueror/listview/konq_treeviewitem.cc b/konqueror/listview/konq_treeviewitem.cc
index 32baf1c41..12953c401 100644
--- a/konqueror/listview/konq_treeviewitem.cc
+++ b/konqueror/listview/konq_treeviewitem.cc
@@ -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 );
}
diff --git a/konqueror/listview/konq_treeviewitem.h b/konqueror/listview/konq_treeviewitem.h
index b17adacaf..6dcc1bb79 100644
--- a/konqueror/listview/konq_treeviewitem.h
+++ b/konqueror/listview/konq_treeviewitem.h
@@ -68,6 +68,11 @@ public:
/**
* URL of this directory
+ */
+ KURL kurl();
+
+ /**
+ * URL of this directory
* @param _trailing set to true for a trailing slash (see KURL)
*/
TQString url( int _trailing );
diff --git a/konqueror/listview/konq_treeviewwidget.cc b/konqueror/listview/konq_treeviewwidget.cc
index 4d04f2fa4..77adc4b61 100644
--- a/konqueror/listview/konq_treeviewwidget.cc
+++ b/konqueror/listview/konq_treeviewwidget.cc
@@ -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();
}