Skip to content

Commit 9fbcc7e

Browse files
committed
browser items parent (moving to thread) fix (crash when dragging postgres layer)
1 parent 79e1236 commit 9fbcc7e

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/core/qgsdataitem.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,15 +160,14 @@ QgsDataItem::QgsDataItem( QgsDataItem::Type type, QgsDataItem* parent, QString n
160160
: QObject()
161161
, mType( type )
162162
, mCapabilities( NoCapabilities )
163-
, mParent( 0 ) // items are created without parent, parent is set later by setParent()
163+
, mParent( parent )
164164
, mState( NotPopulated )
165165
, mPopulated( false )
166166
, mName( name )
167167
, mPath( path )
168168
, mDeferredDelete( false )
169169
, mFutureWatcher( 0 )
170170
{
171-
Q_UNUSED( parent );
172171
}
173172

174173
QgsDataItem::~QgsDataItem()

src/core/qgsdataitem.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ class CORE_EXPORT QgsDataItem : public QObject
5454
Favourites
5555
};
5656

57-
/** Create new data item.
58-
* @param parent - the param is ignored, children created by createChildren() do not have parent, parent is set later by setParent if the item really becomes a parent child */
57+
/** Create new data item. */
5958
QgsDataItem( QgsDataItem::Type type, QgsDataItem* parent, QString name, QString path );
6059
virtual ~QgsDataItem();
6160

0 commit comments

Comments
 (0)