Skip to content

Commit 1d80fe8

Browse files
committed
Review comments
1 parent c12fd87 commit 1d80fe8

File tree

4 files changed

+21
-11
lines changed

4 files changed

+21
-11
lines changed

python/gui/auto_generated/qgsfindfilesbypatternwidget.sip.in

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,21 @@ Constructor for QgsFindFilesByPatternWidget, with the specified ``parent`` widge
3030

3131
QStringList files() const;
3232
%Docstring
33-
Returns the list of files found by the dialog.
33+
Returns the list of files found by the dialog. This may be empty if
34+
no matching files were found.
3435

35-
.. seealso:: :py:func:`filesFound`
36+
.. seealso:: :py:func:`findComplete`
3637
%End
3738

3839
signals:
3940

40-
void filesFound( const QStringList &files );
41+
void findComplete( const QStringList &files );
4142
%Docstring
4243
Emitted after files are found in the dialog.
4344

45+
The ``files`` argument contains a list of all matching files found. This may be empty if
46+
no matching files were found.
47+
4448
.. seealso:: :py:func:`files`
4549
%End
4650

@@ -66,7 +70,8 @@ Constructor for QgsFindFilesByPatternDialog, with the specified ``parent`` widge
6670

6771
QStringList files() const;
6872
%Docstring
69-
Returns the list of files found by the dialog.
73+
Returns the list of files found by the dialog. This may be empty if
74+
no matching files were found.
7075
%End
7176

7277
};

python/plugins/processing/gui/BatchPanel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class BatchPanelFillWidget(QToolButton):
9696
def __init__(self, parameterDefinition, column, panel, parent=None):
9797
super().__init__(parent)
9898

99-
self.setBackgroundRole(QPalette.Window)
99+
self.setBackgroundRole(QPalette.Button)
100100
self.setAutoFillBackground(True)
101101

102102
self.parameterDefinition = parameterDefinition

src/gui/qgsfindfilesbypatternwidget.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ void QgsFindFilesByPatternWidget::find()
103103
disconnect( mFindButton, &QPushButton::clicked, this, &QgsFindFilesByPatternWidget::cancel );
104104
connect( mFindButton, &QPushButton::clicked, this, &QgsFindFilesByPatternWidget::find );
105105

106-
emit filesFound( mFiles );
106+
emit findComplete( mFiles );
107107
}
108108

109109
void QgsFindFilesByPatternWidget::cancel()
@@ -135,7 +135,7 @@ QgsFindFilesByPatternDialog::QgsFindFilesByPatternDialog( QWidget *parent )
135135
setLayout( vLayout );
136136

137137
mButtonBox->button( QDialogButtonBox::Ok )->setEnabled( false );
138-
connect( mWidget, &QgsFindFilesByPatternWidget::filesFound, this, [ = ]( const QStringList & files )
138+
connect( mWidget, &QgsFindFilesByPatternWidget::findComplete, this, [ = ]( const QStringList & files )
139139
{
140140
mButtonBox->button( QDialogButtonBox::Ok )->setEnabled( !files.empty() );
141141
} );

src/gui/qgsfindfilesbypatternwidget.h

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@ class GUI_EXPORT QgsFindFilesByPatternWidget : public QWidget, private Ui::QgsFi
4141
QgsFindFilesByPatternWidget( QWidget *parent SIP_TRANSFERTHIS = nullptr );
4242

4343
/**
44-
* Returns the list of files found by the dialog.
45-
* \see filesFound()
44+
* Returns the list of files found by the dialog. This may be empty if
45+
* no matching files were found.
46+
* \see findComplete()
4647
*/
4748
QStringList files() const { return mFiles; }
4849

@@ -51,9 +52,12 @@ class GUI_EXPORT QgsFindFilesByPatternWidget : public QWidget, private Ui::QgsFi
5152
/**
5253
* Emitted after files are found in the dialog.
5354
*
55+
* The \a files argument contains a list of all matching files found. This may be empty if
56+
* no matching files were found.
57+
*
5458
* \see files()
5559
*/
56-
void filesFound( const QStringList &files );
60+
void findComplete( const QStringList &files );
5761

5862
private slots:
5963

@@ -84,7 +88,8 @@ class GUI_EXPORT QgsFindFilesByPatternDialog : public QDialog
8488
QgsFindFilesByPatternDialog( QWidget *parent SIP_TRANSFERTHIS = nullptr );
8589

8690
/**
87-
* Returns the list of files found by the dialog.
91+
* Returns the list of files found by the dialog. This may be empty if
92+
* no matching files were found.
8893
*/
8994
QStringList files() const;
9095

0 commit comments

Comments
 (0)