Skip to content

Commit

Permalink
Address PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Sep 18, 2024
1 parent c03fe9f commit b614c4f
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,16 +128,16 @@ an expression context for the editor when required.

QgsMapLayer *layer() const;
%Docstring
Returns the (possibly NULL) layer associated with the expression editor.
Returns the (possibly NULL) layer associated with the expression editor context.

.. versionadded:: 3.30
.. versionadded:: 3.40
%End

void setLayer( QgsMapLayer *layer );
%Docstring
Sets the ``layer`` to be used for in the expression editor context.
Sets the ``layer`` to be used associated with the expression editor context.

.. versionadded:: 3.30
.. versionadded:: 3.40
%End

signals:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,16 +128,16 @@ an expression context for the editor when required.

QgsMapLayer *layer() const;
%Docstring
Returns the (possibly NULL) layer associated with the expression editor.
Returns the (possibly NULL) layer associated with the expression editor context.

.. versionadded:: 3.30
.. versionadded:: 3.40
%End

void setLayer( QgsMapLayer *layer );
%Docstring
Sets the ``layer`` to be used for in the expression editor context.
Sets the ``layer`` to be used associated with the expression editor context.

.. versionadded:: 3.30
.. versionadded:: 3.40
%End

signals:
Expand Down
3 changes: 2 additions & 1 deletion src/gui/layout/qgslayoutmanualtablewidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "qgslayoutmanualtablewidget.h"
#include "qgslayoutatlas.h"
#include "qgslayout.h"
#include "qgslayoutreportcontext.h"
#include "qgsprintlayout.h"
#include "qgslayoutframe.h"
#include "qgslayoutitemwidget.h"
Expand Down Expand Up @@ -186,7 +187,7 @@ void QgsLayoutManualTableWidget::setTableContents()
else
{
mEditorDialog = new QgsTableEditorDialog( this );
if ( QgsLayout * layout =mTable->layout() )
if ( QgsLayout *layout = mTable->layout() )
{
mEditorDialog->setLayer( layout->reportContext().layer() );
}
Expand Down
3 changes: 2 additions & 1 deletion src/gui/tableeditor/qgstableeditordialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "qgspanelwidgetstack.h"
#include "qgstableeditorformattingwidget.h"
#include "qgssettings.h"
#include "qgsmaplayer.h"

#include <QClipboard>
#include <QMessageBox>
Expand Down Expand Up @@ -154,7 +155,7 @@ void QgsTableEditorDialog::closeEvent( QCloseEvent * )

QgsMapLayer *QgsTableEditorDialog::layer() const
{
return mLayer;
return mLayer.data();
}

void QgsTableEditorDialog::setLayer( QgsMapLayer *layer )
Expand Down
9 changes: 5 additions & 4 deletions src/gui/tableeditor/qgstableeditordialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "qgstablecell.h"
#include "ui_qgstableeditorbase.h"
#include <QMainWindow>
#include <QPointer>

class QgsTableEditorWidget;
class QgsMessageBar;
Expand Down Expand Up @@ -144,14 +145,14 @@ class GUI_EXPORT QgsTableEditorDialog : public QMainWindow, private Ui::QgsTable
void registerExpressionContextGenerator( QgsExpressionContextGenerator *generator );

/**
* Returns the (possibly NULL) layer associated with the expression editor.
* \since QGIS 3.30
* Returns the (possibly NULL) layer associated with the expression editor context.
* \since QGIS 3.40
*/
QgsMapLayer *layer() const;

/**
* Sets the \a layer to be used for in the expression editor context.
* \since QGIS 3.30
* Sets the \a layer to be used associated with the expression editor context.
* \since QGIS 3.40
*/
void setLayer( QgsMapLayer *layer );

Expand Down

0 comments on commit b614c4f

Please sign in to comment.