Merge pull request #15181 from glassez/qt5

Raise minimum Qt version to 5.15.2
This commit is contained in:
Vladimir Golovnev 2021-07-23 06:22:57 +03:00 committed by GitHub
commit 1eb246c98b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
38 changed files with 120 additions and 146 deletions

View file

@ -504,16 +504,16 @@ void TorrentContentModel::setupModelData(const BitTorrent::TorrentInfo &info)
const QString path = Utils::Fs::toUniformPath(info.filePath(i));
// Iterate of parts of the path to create necessary folders
QVector<QStringRef> pathFolders = path.splitRef('/', Qt::SkipEmptyParts);
QList<QStringView> pathFolders = QStringView(path).split(u'/', Qt::SkipEmptyParts);
pathFolders.removeLast();
for (const QStringRef &pathPartRef : asConst(pathFolders))
for (const QStringView pathPart : asConst(pathFolders))
{
const QString pathPart = pathPartRef.toString();
TorrentContentModelFolder *newParent = currentParent->childFolderWithName(pathPart);
const QString folderPath = pathPart.toString();
TorrentContentModelFolder *newParent = currentParent->childFolderWithName(folderPath);
if (!newParent)
{
newParent = new TorrentContentModelFolder(pathPart, currentParent);
newParent = new TorrentContentModelFolder(folderPath, currentParent);
currentParent->appendChild(newParent);
}
currentParent = newParent;