From d47427a2d51fcc7f8e1f8926a706e04ff01603ed Mon Sep 17 00:00:00 2001 From: Arno Date: Sat, 20 Aug 2016 08:31:29 +0200 Subject: Present torrent files as a tree A torrent info dictionary has two modes: single and multi files. When in multi-mode, the name-entry is the directory containing the files. Represent it as a tree. During testing I discovered a fatal bug in the torrent parser: If we encounter an invalid string, we have to move mPos forward, else we will loop indefinitely until we're OOM. I also added some icons for folders, files and trackers. --- torrentparser.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'torrentparser.h') diff --git a/torrentparser.h b/torrentparser.h index 02129fb..e1f8ef7 100644 --- a/torrentparser.h +++ b/torrentparser.h @@ -13,7 +13,6 @@ class TorrentParser : public QObject { public: TorrentParser(const QString file, QObject *parent = 0); const QList parse(); - const QString lastError() const { return mLastError; } private: const QVariant parseObject(); @@ -25,7 +24,6 @@ class TorrentParser : public QObject { QString mLastError; QByteArray mData; int mPos; - bool mOk; }; #endif // TORRENTPARSER_H -- cgit v1.2.3-70-g09d2