diff options
author | w0xlt <94266259+w0xlt@users.noreply.github.com> | 2022-06-21 18:53:03 -0300 |
---|---|---|
committer | w0xlt <94266259+w0xlt@users.noreply.github.com> | 2022-06-21 19:16:39 -0300 |
commit | c378535e28e0c54353fde9c4a66cb3134a3ee742 (patch) | |
tree | da8798d66a8c29bb2bd33bf7169ae11380000730 /src/qt/guiutil.h | |
parent | a09033e22c4f072c86a1885dd476f3059e5416d1 (diff) | |
download | bitcoin-c378535e28e0c54353fde9c4a66cb3134a3ee742.tar.xz |
qt: Add a function that extracts the suffix from a filter
Extract the 'Extract first suffix from filter pattern...'
functionality into a testable utility function
Diffstat (limited to 'src/qt/guiutil.h')
-rw-r--r-- | src/qt/guiutil.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/qt/guiutil.h b/src/qt/guiutil.h index e38ac6026a..acbe415a91 100644 --- a/src/qt/guiutil.h +++ b/src/qt/guiutil.h @@ -123,6 +123,14 @@ namespace GUIUtil */ QString getDefaultDataDirectory(); + /** + * Extract first suffix from filter pattern "Description (*.foo)" or "Description (*.foo *.bar ...). + * + * @param[in] filter Filter specification such as "Comma Separated Files (*.csv)" + * @return QString + */ + QString ExtractFirstSuffixFromFilter(const QString& filter); + /** Get save filename, mimics QFileDialog::getSaveFileName, except that it appends a default suffix when no suffix is provided by the user. |