Skip to content

Commit

Permalink
Add SIP_DEPRECATED
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Mar 2, 2021
1 parent dccef52 commit d762646
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion python/core/auto_generated/qgsdataitem.sip.in
Expand Up @@ -246,7 +246,7 @@ A draggable item has to implement :py:func:`~QgsDataItem.mimeUri` that will be u
.. versionadded:: 3.0
%End

virtual QgsMimeDataUtils::Uri mimeUri() const;
virtual QgsMimeDataUtils::Uri mimeUri() const /Deprecated/;
%Docstring
Returns mime URI for the data item.
Items that return valid URI will be returned in mime data when dragging a selection from browser model.
Expand Down
5 changes: 5 additions & 0 deletions src/core/qgsdataitem.cpp
Expand Up @@ -817,6 +817,11 @@ bool QgsDataItem::handleDoubleClick()
return false;
}

QgsMimeDataUtils::Uri QgsDataItem::mimeUri() const
{
return mimeUris().isEmpty() ? QgsMimeDataUtils::Uri() : mimeUris().first();
}

bool QgsDataItem::rename( const QString & )
{
return false;
Expand Down
5 changes: 1 addition & 4 deletions src/core/qgsdataitem.h
Expand Up @@ -263,10 +263,7 @@ class CORE_EXPORT QgsDataItem : public QObject
* \deprecated since QGIS 3.18, use mimeUris() instead
* \since QGIS 3.0
*/
Q_DECL_DEPRECATED virtual QgsMimeDataUtils::Uri mimeUri() const
{
return mimeUris().isEmpty() ? QgsMimeDataUtils::Uri() : mimeUris().first();
}
Q_DECL_DEPRECATED virtual QgsMimeDataUtils::Uri mimeUri() const SIP_DEPRECATED;

/**
* Returns mime URIs for the data item, most data providers will only return a single URI
Expand Down

0 comments on commit d762646

Please sign in to comment.