Browse Source

Make URL in "Add Torrent File..." clickable. Closes #3928.

adaptive-webui-19844
Chocobo1 9 years ago
parent
commit
a16de62103
  1. 3
      src/gui/addnewtorrentdialog.cpp
  2. 16
      src/gui/addnewtorrentdialog.ui

3
src/gui/addnewtorrentdialog.cpp

@ -667,8 +667,7 @@ void AddNewTorrentDialog::setupTreeview()
setWindowTitle(m_torrentInfo.name()); setWindowTitle(m_torrentInfo.name());
// Set torrent information // Set torrent information
QString comment = m_torrentInfo.comment(); ui->comment_lbl->setText(Utils::Misc::parseHtmlLinks(m_torrentInfo.comment()));
ui->comment_lbl->setText(comment.replace('\n', ' '));
ui->date_lbl->setText(!m_torrentInfo.creationDate().isNull() ? m_torrentInfo.creationDate().toString(Qt::DefaultLocaleLongDate) : tr("Not available")); ui->date_lbl->setText(!m_torrentInfo.creationDate().isNull() ? m_torrentInfo.creationDate().toString(Qt::DefaultLocaleLongDate) : tr("Not available"));
// Prepare content tree // Prepare content tree

16
src/gui/addnewtorrentdialog.ui

@ -161,8 +161,20 @@
</item> </item>
<item row="1" column="1"> <item row="1" column="1">
<widget class="QLabel" name="comment_lbl"> <widget class="QLabel" name="comment_lbl">
<property name="text"> <property name="textFormat">
<string notr="true">comment</string> <enum>Qt::RichText</enum>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
<property name="textInteractionFlags">
<set>Qt::TextBrowserInteraction</set>
</property> </property>
</widget> </widget>
</item> </item>

Loading…
Cancel
Save