Skip to content

Commit

Permalink
more doc
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Nov 29, 2018
1 parent c13b419 commit 157c8f4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Expand Up @@ -57,9 +57,9 @@ Returns true if some text to be search is pending in the queue
Returns true if the a search is currently running
%End

void triggerResult( const QModelIndex &index, const int id = -1 );
void triggerResult( const QModelIndex &index, const int actionId = -1 );
%Docstring
Triggers the result at given ``index`` and with optional ``action`` if context menu entry was triggered
Triggers the result at given ``index`` and with optional ``actionId`` if an additional action was triggered
%End

signals:
Expand Down
6 changes: 3 additions & 3 deletions src/core/locator/qgslocatormodelbridge.cpp
Expand Up @@ -37,14 +37,14 @@ bool QgsLocatorModelBridge::isRunning() const
return mIsRunning;
}

void QgsLocatorModelBridge::triggerResult( const QModelIndex &index, const int id )
void QgsLocatorModelBridge::triggerResult( const QModelIndex &index, const int actionId )
{
mLocator->clearPreviousResults();
QgsLocatorResult result = mProxyModel->data( index, QgsLocatorModel::ResultDataRole ).value< QgsLocatorResult >();
if ( result.filter )
{
if ( id >= 0 )
result.filter->triggerResultFromAction( result, id );
if ( actionId >= 0 )
result.filter->triggerResultFromAction( result, actionId );
else
result.filter->triggerResult( result );
}
Expand Down
4 changes: 2 additions & 2 deletions src/core/locator/qgslocatormodelbridge.h
Expand Up @@ -63,8 +63,8 @@ class CORE_EXPORT QgsLocatorModelBridge : public QObject
//! Returns true if the a search is currently running
bool isRunning() const;

//! Triggers the result at given \a index and with optional \a action if context menu entry was triggered
void triggerResult( const QModelIndex &index, const int id = -1 );
//! Triggers the result at given \a index and with optional \a actionId if an additional action was triggered
void triggerResult( const QModelIndex &index, const int actionId = -1 );

signals:
//! Emitted when a result is added
Expand Down

0 comments on commit 157c8f4

Please sign in to comment.