mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-21 16:07:23 -06:00
Merge pull request #10792 from Chocobo1/rename2
Remove empty leftover folders after rename properly
This commit is contained in:
@@ -198,3 +198,14 @@ TriStateBool Utils::String::parseTriStateBool(const QString &string)
|
||||
return TriStateBool::False;
|
||||
return TriStateBool::Undefined;
|
||||
}
|
||||
|
||||
QString Utils::String::join(const QVector<QStringRef> &strings, const QString &separator)
|
||||
{
|
||||
if (strings.empty())
|
||||
return {};
|
||||
|
||||
QString ret = strings[0].toString();
|
||||
for (int i = 1; i < strings.count(); ++i)
|
||||
ret += (separator + strings[i]);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -31,8 +31,10 @@
|
||||
#define UTILS_STRING_H
|
||||
|
||||
#include <QLatin1String>
|
||||
#include <QVector>
|
||||
|
||||
class QString;
|
||||
class QStringRef;
|
||||
|
||||
class TriStateBool;
|
||||
|
||||
@@ -66,6 +68,8 @@ namespace Utils
|
||||
|
||||
bool parseBool(const QString &string, bool defaultValue);
|
||||
TriStateBool parseTriStateBool(const QString &string);
|
||||
|
||||
QString join(const QVector<QStringRef> &strings, const QString &separator);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user