1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-11 07:18:08 +00:00

- Do not display .!qB incomplete files extension in files panel

This commit is contained in:
Christophe Dumez 2009-12-18 17:22:53 +00:00
parent c1bc9886b7
commit c87a0bde0b

View File

@ -57,7 +57,11 @@ public:
Q_ASSERT(parent); Q_ASSERT(parent);
parentItem = parent; parentItem = parent;
type = TFILE; type = TFILE;
itemData << misc::toQString(f.path.string()).split("/").last(); QString name = misc::toQString(f.path.string()).split("/").last();
// Do not display incomplete extensions
if(name.endsWith(".!qB"))
name.chop(4);
itemData << name;
qDebug("Created a TreeItem file with name %s", getName().toLocal8Bit().data()); qDebug("Created a TreeItem file with name %s", getName().toLocal8Bit().data());
qDebug("parent is %s", parent->getName().toLocal8Bit().data()); qDebug("parent is %s", parent->getName().toLocal8Bit().data());
itemData << QVariant((qulonglong)f.size); itemData << QVariant((qulonglong)f.size);
@ -74,6 +78,9 @@ public:
TreeItem(QString name, TreeItem *parent=0) { TreeItem(QString name, TreeItem *parent=0) {
parentItem = parent; parentItem = parent;
type = FOLDER; type = FOLDER;
// Do not display incomplete extensions
if(name.endsWith(".!qB"))
name.chop(4);
itemData << name; itemData << name;
itemData << 0.; // Size itemData << 0.; // Size
itemData << 0.; // Progress; itemData << 0.; // Progress;