@ -90,6 +90,7 @@ public:
connect ( actionMaximum , SIGNAL ( triggered ( ) ) , this , SLOT ( maximumSelection ( ) ) ) ;
connect ( actionMaximum , SIGNAL ( triggered ( ) ) , this , SLOT ( maximumSelection ( ) ) ) ;
connect ( collapseAllButton , SIGNAL ( clicked ( ) ) , torrentContentList , SLOT ( collapseAll ( ) ) ) ;
connect ( collapseAllButton , SIGNAL ( clicked ( ) ) , torrentContentList , SLOT ( collapseAll ( ) ) ) ;
connect ( expandAllButton , SIGNAL ( clicked ( ) ) , torrentContentList , SLOT ( expandAll ( ) ) ) ;
connect ( expandAllButton , SIGNAL ( clicked ( ) ) , torrentContentList , SLOT ( expandAll ( ) ) ) ;
torrentContentList - > header ( ) - > resizeSection ( 0 , 200 ) ;
torrentContentList - > header ( ) - > resizeSection ( 0 , 200 ) ;
//torrentContentList->header()->setResizeMode(0, QHeaderView::Stretch);
//torrentContentList->header()->setResizeMode(0, QHeaderView::Stretch);
QString home = QDir : : homePath ( ) ;
QString home = QDir : : homePath ( ) ;
@ -148,6 +149,7 @@ public:
delete arb ;
delete arb ;
connect ( PropListModel , SIGNAL ( itemChanged ( QStandardItem * ) ) , this , SLOT ( updatePriorities ( QStandardItem * ) ) ) ;
connect ( PropListModel , SIGNAL ( itemChanged ( QStandardItem * ) ) , this , SLOT ( updatePriorities ( QStandardItem * ) ) ) ;
//torrentContentList->expandAll();
//torrentContentList->expandAll();
connect ( savePathTxt , SIGNAL ( textChanged ( QString ) ) , this , SLOT ( updateDiskSpaceLabels ( ) ) ) ;
updateDiskSpaceLabels ( ) ;
updateDiskSpaceLabels ( ) ;
show ( ) ;
show ( ) ;
}
}
@ -278,7 +280,7 @@ public slots:
}
}
void updateDiskSpaceLabels ( ) {
void updateDiskSpaceLabels ( ) {
unsigned long long available = misc : : freeDiskSpaceOnPath ( savePathTxt - > text ( ) ) ;
long long available = misc : : freeDiskSpaceOnPath ( savePathTxt - > text ( ) ) ;
lbl_disk_space - > setText ( misc : : friendlyUnit ( available ) ) ;
lbl_disk_space - > setText ( misc : : friendlyUnit ( available ) ) ;
// Determine torrent size
// Determine torrent size
@ -293,7 +295,7 @@ public slots:
lbl_torrent_size - > setText ( misc : : friendlyUnit ( torrent_size ) ) ;
lbl_torrent_size - > setText ( misc : : friendlyUnit ( torrent_size ) ) ;
// Check if free space is sufficient
// Check if free space is sufficient
if ( available > 0 ) {
if ( available > 0 ) {
if ( available > torrent_size ) {
if ( ( unsigned long long ) available > torrent_size ) {
// Space is sufficient
// Space is sufficient
label_space_msg - > setText ( tr ( " (%1 left after torrent download) " , " e.g. (100MiB left after torrent download) " ) . arg ( misc : : friendlyUnit ( available - torrent_size ) ) ) ;
label_space_msg - > setText ( tr ( " (%1 left after torrent download) " , " e.g. (100MiB left after torrent download) " ) . arg ( misc : : friendlyUnit ( available - torrent_size ) ) ) ;
} else {
} else {
@ -316,7 +318,6 @@ public slots:
}
}
if ( ! dir . isNull ( ) ) {
if ( ! dir . isNull ( ) ) {
savePathTxt - > setText ( dir ) ;
savePathTxt - > setText ( dir ) ;
updateDiskSpaceLabels ( ) ;
}
}
}
}