mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-19 21:03:30 -07:00
Merge pull request #15181 from glassez/qt5
Raise minimum Qt version to 5.15.2
This commit is contained in:
commit
1eb246c98b
38 changed files with 120 additions and 146 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue