From 1ce6f4a7c35014b16062a650b49eb67cc6e0fdf1 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Mon, 10 Jan 2011 17:33:53 +0000 Subject: [PATCH] Fix magnet link name update problem --- src/main.cpp | 6 ++++++ src/qtlibtorrent/torrentmodel.cpp | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 573a5d197..e93725daf 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -294,6 +294,12 @@ int main(int argc, char *argv[]){ QStringList torrentCmdLine = app.arguments(); // Remove first argument (program name) torrentCmdLine.removeFirst(); +#ifndef QT_NO_DEBUG_OUTPUT + foreach(const QString &argument, torrentCmdLine) { + qDebug() << "Command line argument:" << argument; + } +#endif + #ifndef DISABLE_GUI MainWindow window(0, torrentCmdLine); if(!no_splash) diff --git a/src/qtlibtorrent/torrentmodel.cpp b/src/qtlibtorrent/torrentmodel.cpp index 05a6fac88..a9ce25bfd 100644 --- a/src/qtlibtorrent/torrentmodel.cpp +++ b/src/qtlibtorrent/torrentmodel.cpp @@ -142,7 +142,7 @@ QVariant TorrentModelItem::data(int column, int role) const if(role != Qt::DisplayRole && role != Qt::UserRole) return QVariant(); switch(column) { case TR_NAME: - return m_name; + return m_name.isEmpty()? m_torrent.name() : m_name; case TR_PRIORITY: return m_torrent.queue_position(); case TR_SIZE: