From c87a0bde0bd3ee8d51c227e2c330384305a92895 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Fri, 18 Dec 2009 17:22:53 +0000 Subject: [PATCH] - Do not display .!qB incomplete files extension in files panel --- src/torrentfilesmodel.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/torrentfilesmodel.h b/src/torrentfilesmodel.h index 813930836..3794bedcb 100644 --- a/src/torrentfilesmodel.h +++ b/src/torrentfilesmodel.h @@ -57,7 +57,11 @@ public: Q_ASSERT(parent); parentItem = parent; 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("parent is %s", parent->getName().toLocal8Bit().data()); itemData << QVariant((qulonglong)f.size); @@ -74,6 +78,9 @@ public: TreeItem(QString name, TreeItem *parent=0) { parentItem = parent; type = FOLDER; + // Do not display incomplete extensions + if(name.endsWith(".!qB")) + name.chop(4); itemData << name; itemData << 0.; // Size itemData << 0.; // Progress;