Redesign "Incomplete folder" feature

Change "Incomplete/temp folder" term with "download folder".
Allow to set "download folder" per torrent (in manual mode) and per category (in automatic mode).
This commit is contained in:
Vladimir Golovnev (Glassez) 2021-05-20 10:36:44 +03:00 committed by Vladimir Golovnev (glassez)
parent b0e41abf5a
commit 1c0f8b4289
No known key found for this signature in database
GPG key ID: 52A2C7DEE2DFA6F7
48 changed files with 1457 additions and 599 deletions

View file

@ -106,12 +106,12 @@ namespace
void openDestinationFolder(const BitTorrent::Torrent *const torrent)
{
#ifdef Q_OS_MACOS
MacUtils::openFiles({torrent->contentPath(true)});
MacUtils::openFiles({torrent->contentPath()});
#else
if (torrent->filesCount() == 1)
Utils::Gui::openFolderSelect(torrent->contentPath(true));
Utils::Gui::openFolderSelect(torrent->contentPath());
else
Utils::Gui::openPath(torrent->contentPath(true));
Utils::Gui::openPath(torrent->contentPath());
#endif
}
@ -525,22 +525,22 @@ void TransferListWidget::openSelectedTorrentsFolder() const
// folders prehilighted for opening, so we use a custom method.
for (BitTorrent::Torrent *const torrent : asConst(getSelectedTorrents()))
{
QString path = torrent->contentPath(true);
pathsList.insert(path);
const QString contentPath = QDir(torrent->actualStorageLocation()).absoluteFilePath(torrent->contentPath());
pathsList.insert(contentPath);
}
MacUtils::openFiles(pathsList);
#else
for (BitTorrent::Torrent *const torrent : asConst(getSelectedTorrents()))
{
QString path = torrent->contentPath(true);
if (!pathsList.contains(path))
const QString contentPath = torrent->contentPath();
if (!pathsList.contains(contentPath))
{
if (torrent->filesCount() == 1)
Utils::Gui::openFolderSelect(path);
Utils::Gui::openFolderSelect(contentPath);
else
Utils::Gui::openPath(path);
Utils::Gui::openPath(contentPath);
}
pathsList.insert(path);
pathsList.insert(contentPath);
}
#endif // Q_OS_MACOS
}