Browse Source

Show info hash in the torrent details in 'Add New Torrent' dialog.

Initial work by chrishirst.
Closes #2385.
adaptive-webui-19844
sledgehammer999 10 years ago
parent
commit
6209d8838a
  1. 2
      src/addnewtorrentdialog.cpp
  2. 16
      src/addnewtorrentdialog.ui

2
src/addnewtorrentdialog.cpp

@ -212,6 +212,7 @@ bool AddNewTorrentDialog::loadTorrent(const QString& torrent_path, const QString
return false; return false;
} }
ui->lblhash->setText(m_hash);
setupTreeview(); setupTreeview();
return true; return true;
} }
@ -247,6 +248,7 @@ bool AddNewTorrentDialog::loadMagnet(const QString &magnet_uri)
HiddenData::addData(m_hash); HiddenData::addData(m_hash);
QBtSession::instance()->addMagnetUri(m_url, false); QBtSession::instance()->addMagnetUri(m_url, false);
setMetadataProgressIndicator(true, tr("Retrieving metadata...")); setMetadataProgressIndicator(true, tr("Retrieving metadata..."));
ui->lblhash->setText(m_hash);
return true; return true;
} }

16
src/addnewtorrentdialog.ui

@ -137,7 +137,7 @@
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<item> <item>
<layout class="QGridLayout" name="gridLayout" rowstretch="0,0,0" columnstretch="0,1"> <layout class="QGridLayout" name="gridLayout" rowstretch="0,0,0,0" columnstretch="0,1">
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="text"> <property name="text">
@ -180,6 +180,20 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Info Hash:</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="lblhash">
<property name="textInteractionFlags">
<set>Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
</layout> </layout>
</item> </item>
<item> <item>

Loading…
Cancel
Save