Skip to content

Commit 3aa58be

Browse files
committed
qt, refactor: Inline GUIUtil::SplitSkipEmptyParts function
1 parent d1ec6db commit 3aa58be

File tree

2 files changed

+1
-18
lines changed

2 files changed

+1
-18
lines changed

src/qt/guiutil.h

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -348,23 +348,6 @@ namespace GUIUtil
348348
*/
349349
bool HasPixmap(const QLabel* label);
350350

351-
/**
352-
* Splits the string into substrings wherever separator occurs, and returns
353-
* the list of those strings. Empty strings do not appear in the result.
354-
*
355-
* QString::split() signature differs in different Qt versions:
356-
* - QString::SplitBehavior is deprecated since Qt 5.15
357-
* - Qt::SplitBehavior was introduced in Qt 5.14
358-
* If {QString|Qt}::SkipEmptyParts behavior is required, use this
359-
* function instead of QString::split().
360-
*/
361-
template <typename SeparatorType>
362-
QStringList SplitSkipEmptyParts(const QString& string, const SeparatorType& separator)
363-
{
364-
return string.split(separator, Qt::SkipEmptyParts);
365-
}
366-
367-
368351
/**
369352
* Replaces a plain text link with an HTML tagged one.
370353
*/

src/qt/transactionview.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ void TransactionView::setModel(WalletModel *_model)
221221
if (_model->getOptionsModel())
222222
{
223223
// Add third party transaction URLs to context menu
224-
QStringList listUrls = GUIUtil::SplitSkipEmptyParts(_model->getOptionsModel()->getThirdPartyTxUrls(), "|");
224+
QStringList listUrls = _model->getOptionsModel()->getThirdPartyTxUrls().split("|", Qt::SkipEmptyParts);
225225
bool actions_created = false;
226226
for (int i = 0; i < listUrls.size(); ++i)
227227
{

0 commit comments

Comments
 (0)