dereferencing it. Fixes a possible crash when initialising the
Details View in Konqueror, caused by an indirect resizing the of
columns before the DolphinDetailsView constructor is finished.
CCBUG: 257035
svn path=/trunk/KDE/kdebase/apps/; revision=
1198138
void DolphinDetailsView::adjustMaximumSizeForEditing(const QModelIndex& index)
{
- // Make sure that the full width of the "Name" column is available for "Rename Inline"
- m_extensionsFactory->fileItemDelegate()->setMaximumSize(QTreeView::visualRect(index).size());
+ // Make sure that the full width of the "Name" column is available for "Rename Inline".
+ // Before we do that, we have to check if m_extensionsFactory has been initialised because
+ // it is possible that we end up here before the constructor is finished (see bug 257035)
+ if (m_extensionsFactory) {
+ m_extensionsFactory->fileItemDelegate()->setMaximumSize(QTreeView::visualRect(index).size());
+ }
}
#include "dolphindetailsview.moc"