mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 14:59:39 -04:00
qt, refactor: Inline GUIUtil::SplitSkipEmptyParts
function
This commit is contained in:
parent
d1ec6db249
commit
3aa58bea8e
2 changed files with 1 additions and 18 deletions
|
@ -348,23 +348,6 @@ namespace GUIUtil
|
|||
*/
|
||||
bool HasPixmap(const QLabel* label);
|
||||
|
||||
/**
|
||||
* Splits the string into substrings wherever separator occurs, and returns
|
||||
* the list of those strings. Empty strings do not appear in the result.
|
||||
*
|
||||
* QString::split() signature differs in different Qt versions:
|
||||
* - QString::SplitBehavior is deprecated since Qt 5.15
|
||||
* - Qt::SplitBehavior was introduced in Qt 5.14
|
||||
* If {QString|Qt}::SkipEmptyParts behavior is required, use this
|
||||
* function instead of QString::split().
|
||||
*/
|
||||
template <typename SeparatorType>
|
||||
QStringList SplitSkipEmptyParts(const QString& string, const SeparatorType& separator)
|
||||
{
|
||||
return string.split(separator, Qt::SkipEmptyParts);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Replaces a plain text link with an HTML tagged one.
|
||||
*/
|
||||
|
|
|
@ -221,7 +221,7 @@ void TransactionView::setModel(WalletModel *_model)
|
|||
if (_model->getOptionsModel())
|
||||
{
|
||||
// Add third party transaction URLs to context menu
|
||||
QStringList listUrls = GUIUtil::SplitSkipEmptyParts(_model->getOptionsModel()->getThirdPartyTxUrls(), "|");
|
||||
QStringList listUrls = _model->getOptionsModel()->getThirdPartyTxUrls().split("|", Qt::SkipEmptyParts);
|
||||
bool actions_created = false;
|
||||
for (int i = 0; i < listUrls.size(); ++i)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue