mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-21 16:07:23 -06:00
Drop ".unwanted folder" feature
This commit is contained in:
@@ -161,8 +161,3 @@ QString PieceAvailabilityBar::simpleToolTipText() const
|
||||
return tr("White: Unavailable pieces") + '\n'
|
||||
+ tr("Blue: Available pieces") + '\n';
|
||||
}
|
||||
|
||||
bool PieceAvailabilityBar::isFileNameCorrectionNeeded() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -48,7 +48,6 @@ public:
|
||||
private:
|
||||
bool updateImage(QImage &image) override;
|
||||
QString simpleToolTipText() const override;
|
||||
bool isFileNameCorrectionNeeded() const override;
|
||||
|
||||
// last used int vector, uses to better resize redraw
|
||||
// TODO: make a diff pieces to new pieces and update only changed pixels, speedup when update > 20x faster
|
||||
|
||||
@@ -276,12 +276,8 @@ void PiecesBar::showToolTip(const QHelpEvent *e)
|
||||
|
||||
DetailedTooltipRenderer renderer(stream, tooltipTitle);
|
||||
|
||||
const bool isFileNameCorrectionNeeded = this->isFileNameCorrectionNeeded();
|
||||
for (int f : files) {
|
||||
QString filePath {m_torrent->info().filePath(f)};
|
||||
if (isFileNameCorrectionNeeded)
|
||||
filePath.replace(QLatin1String("/.unwanted"), QString());
|
||||
|
||||
const QString filePath {m_torrent->info().filePath(f)};
|
||||
renderer(Utils::Misc::friendlyUnit(m_torrent->info().fileSize(f)), filePath);
|
||||
}
|
||||
stream << "</body></html>";
|
||||
@@ -333,8 +329,3 @@ void PiecesBar::updatePieceColors()
|
||||
m_pieceColors[i] = mixTwoColors(backgroundColor().rgb(), m_pieceColor.rgb(), ratio);
|
||||
}
|
||||
}
|
||||
|
||||
bool PiecesBar::isFileNameCorrectionNeeded() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -83,9 +83,6 @@ private:
|
||||
|
||||
virtual QString simpleToolTipText() const = 0;
|
||||
|
||||
/// whether to perform removing of ".unwanted" directory from paths
|
||||
virtual bool isFileNameCorrectionNeeded() const;
|
||||
|
||||
// draw new image to replace the actual image
|
||||
// returns true if image was successfully updated
|
||||
virtual bool updateImage(QImage &image) = 0;
|
||||
|
||||
@@ -458,9 +458,6 @@ void TorrentContentModel::setupModelData(const BitTorrent::TorrentInfo &info)
|
||||
pathFolders.removeLast();
|
||||
|
||||
for (const QStringRef &pathPartRef : asConst(pathFolders)) {
|
||||
if (pathPartRef == QLatin1String(".unwanted"))
|
||||
continue;
|
||||
|
||||
const QString pathPart = pathPartRef.toString();
|
||||
TorrentContentModelFolder *newParent = currentParent->childFolderWithName(pathPart);
|
||||
if (!newParent) {
|
||||
|
||||
Reference in New Issue
Block a user