Fix compilation error introduced in last commit

Display pieces size in torrent properties
This commit is contained in:
Christophe Dumez
2010-12-21 17:52:49 +00:00
parent 6bcbfa2e05
commit f5b3564392
4 changed files with 57 additions and 10 deletions

View File

@@ -177,6 +177,7 @@ void PropertiesWidget::clear() {
qDebug("Clearing torrent properties");
save_path->clear();
lbl_creationDate->clear();
pieceSize_lbl->clear();
hash_lbl->clear();
comment_text->clear();
progress_lbl->clear();
@@ -247,6 +248,8 @@ void PropertiesWidget::loadTorrentInfos(const QTorrentHandle &_h) {
if(h.has_metadata()) {
// Creation date
lbl_creationDate->setText(h.creation_date());
// Pieces size
pieceSize_lbl->setText(misc::friendlyUnit(h.piece_length()));
// Comment
comment_text->setHtml(h.comment());
// URL seeds

View File

@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>540</width>
<height>329</height>
<height>274</height>
</rect>
</property>
<property name="font">
@@ -53,9 +53,9 @@
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<y>-92</y>
<width>520</width>
<height>355</height>
<height>377</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
@@ -497,6 +497,49 @@
</layout>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Pieces size:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="3" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_7">
<item>
<widget class="QLabel" name="pieceSize_lbl">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string notr="true">piece size</string>
</property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_8">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>14</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="4" column="0">
<widget class="QLabel" name="comment_lbl2">
<property name="text">
<string>Comment:</string>
@@ -506,7 +549,7 @@
</property>
</widget>
</item>
<item row="3" column="1">
<item row="4" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QTextBrowser" name="comment_text">
@@ -519,6 +562,7 @@ p, li { white-space: pre-wrap; }
&lt;tr&gt;
&lt;td style=&quot;border: none;&quot;&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans';&quot;&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="openExternalLinks">