mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-03 22:22:33 -06:00
- BUGFIX: Fix crash in torrent addition dialog when save path does not exist (closes #425227)
- BUGFIX: Fix downloading from URL (broken in v1.5.0)
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
* Thu Sep 7 2009 - Christophe Dumez <chris@qbittorrent.org> - v1.5.1
|
||||||
|
- BUGFIX: Fix crash in torrent addition dialog when save path does not exist (closes #425227)
|
||||||
|
- BUGFIX: Fix downloading from URL (broken in v1.5.0)
|
||||||
|
|
||||||
* Thu Sep 3 2009 - Christophe Dumez <chris@qbittorrent.org> - v1.5.0
|
* Thu Sep 3 2009 - Christophe Dumez <chris@qbittorrent.org> - v1.5.0
|
||||||
- FEATURE: Added Magnet URI support
|
- FEATURE: Added Magnet URI support
|
||||||
- FEATURE: Search engine supports category-based requests
|
- FEATURE: Search engine supports category-based requests
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Categories=Qt;Network;P2P;
|
Categories=Qt;Network;P2P;
|
||||||
Comment=V1.5.0
|
Comment=V1.5.1
|
||||||
Exec=qbittorrent %f
|
Exec=qbittorrent %f
|
||||||
GenericName=Bittorrent client
|
GenericName=Bittorrent client
|
||||||
GenericName[bg]=Торент клиент
|
GenericName[bg]=Торент клиент
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 76 KiB |
@@ -1435,6 +1435,12 @@ void bittorrent::downloadFromUrl(QString url) {
|
|||||||
downloader->downloadUrl(url);
|
downloader->downloadUrl(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void bittorrent::downloadFromURLList(const QStringList& urls) {
|
||||||
|
foreach(const QString &url, urls) {
|
||||||
|
downloadFromUrl(url);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void bittorrent::addMagnetSkipAddDlg(QString uri) {
|
void bittorrent::addMagnetSkipAddDlg(QString uri) {
|
||||||
addMagnetUri(uri, false);
|
addMagnetUri(uri, false);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -170,6 +170,7 @@ class bittorrent : public QObject {
|
|||||||
void processDownloadedFile(QString, QString);
|
void processDownloadedFile(QString, QString);
|
||||||
void saveTrackerFile(QString hash);
|
void saveTrackerFile(QString hash);
|
||||||
void addMagnetSkipAddDlg(QString uri);
|
void addMagnetSkipAddDlg(QString uri);
|
||||||
|
void downloadFromURLList(const QStringList& urls);
|
||||||
|
|
||||||
protected slots:
|
protected slots:
|
||||||
void scanDirectory(QString);
|
void scanDirectory(QString);
|
||||||
|
|||||||
10
src/misc.h
10
src/misc.h
@@ -99,11 +99,17 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static unsigned long long freeDiskSpaceOnPath(QString path) {
|
static long long freeDiskSpaceOnPath(QString path) {
|
||||||
|
if(path.isEmpty()) return -1;
|
||||||
|
QDir dir_path(path);
|
||||||
|
if(!dir_path.exists()) {
|
||||||
|
if(!dir_path.cdUp()) return -1;
|
||||||
|
}
|
||||||
|
Q_ASSERT(dir_path.exists());
|
||||||
#ifndef Q_WS_WIN
|
#ifndef Q_WS_WIN
|
||||||
unsigned long long available;
|
unsigned long long available;
|
||||||
struct statfs stats;
|
struct statfs stats;
|
||||||
int ret = statfs ((path+"/.").toLocal8Bit().data(), &stats) ;
|
int ret = statfs ((dir_path.path()+"/.").toLocal8Bit().data(), &stats) ;
|
||||||
if(ret == 0) {
|
if(ret == 0) {
|
||||||
available = ((unsigned long long)stats.f_bavail) *
|
available = ((unsigned long long)stats.f_bavail) *
|
||||||
((unsigned long long)stats.f_bsize) ;
|
((unsigned long long)stats.f_bsize) ;
|
||||||
|
|||||||
@@ -14,10 +14,10 @@ CONFIG += qt \
|
|||||||
network
|
network
|
||||||
|
|
||||||
# Update this VERSION for each release
|
# Update this VERSION for each release
|
||||||
DEFINES += VERSION=\\\"v1.5.0\\\"
|
DEFINES += VERSION=\\\"v1.5.1\\\"
|
||||||
DEFINES += VERSION_MAJOR=1
|
DEFINES += VERSION_MAJOR=1
|
||||||
DEFINES += VERSION_MINOR=5
|
DEFINES += VERSION_MINOR=5
|
||||||
DEFINES += VERSION_BUGFIX=0
|
DEFINES += VERSION_BUGFIX=1
|
||||||
!mac:QMAKE_LFLAGS += -Wl,--as-needed
|
!mac:QMAKE_LFLAGS += -Wl,--as-needed
|
||||||
contains(DEBUG_MODE, 1) {
|
contains(DEBUG_MODE, 1) {
|
||||||
CONFIG += debug
|
CONFIG += debug
|
||||||
|
|||||||
@@ -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();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user