Commit 544ac4d5 authored by Cristian Greco's avatar Cristian Greco

Imported Upstream version 2.9.3

parent 0ceb953e
......@@ -87,6 +87,7 @@ Translations authors:
- Finnish: Niklas Laxström (nikerabbit@users.sourceforge.net)
- French: Christophe Dumez (chris@qbittorrent.org)
- Galician: Marcos Lans (marcoslansgarza@gmail.com)
- Georgian: Beqa Arabuli (arabulibeqa@yahoo.com)
- German: Niels Hoffmann (zentralmaschine@users.sourceforge.net)
- Greek: Tsvetan Bankov (emerge_life@users.sourceforge.net) and Stephanos Antaris (santaris@csd.auth.gr)
- Hungarian: Majoros Péter (majoros.j.p@t-online.hu)
......
* Thu Dec 29 2011 - Christophe Dumez <chris@qbittorrent.org> - v2.9.3
- BUGFIX: Fix btdigg plugin (Python3 support + torrent name in magnet links)
- BUGFIX: Fix banning of IPv6 peers (Closes #885021)
- BUGFIX: Fix torrent addition dialog layout problem (Closes #84650522)
- BUGFIX: Do not report any progress for disabled files (Closes #56731485)
- BUGFIX: Make torrent sorting case insensitive (Closes #857154)
- BUGFIX: Improve Web UI usability of small devices
- BUGFIX: Program updater: More reliable version detection / comparison
- I18N: Add Georgian translation
* Sat Oct 29 2011 - Christophe Dumez <chris@qbittorrent.org> - v2.9.2
- BUGFIX: Fix mimimum dimensions for torrent addition dialog
- BUGFIX: Remove dependency on boost-datetime
......
......@@ -2,8 +2,22 @@ PREFIX = /usr/local
BINDIR = /usr/local/bin
DATADIR = /usr/local/share
INCLUDEPATH += /usr/local/include/libtorrent /usr/include/openssl /usr/include /opt/local/include/boost /opt/local/include
LIBS += -ltorrent-rasterbar -lcrypto -L/opt/local/lib -lboost_system-mt -lboost_filesystem-mt -lboost_thread-mt -framework Cocoa -framework Carbon -framework IOKit
# Use pkg-config to get all necessary libtorrent DEFINES
CONFIG += link_pkgconfig
PKGCONFIG += libtorrent-rasterbar
# Special include/libs paths (macports)
INCLUDEPATH += /usr/include/openssl /usr/include /opt/local/include/boost /opt/local/include
LIBS += -L/opt/local/lib
# OpenSSL lib
LIBS += -lssl -lcrypto
# Boost system lib
LIBS += -lboost_system-mt
# Boost filesystem lib (Not needed for libtorrent >= 0.16.0)
LIBS += -lboost_filesystem-mt
# Carbon
LIBS += -framework Carbon -framework IOKit
document_icon.path = Contents/Resources
document_icon.files = Icons/qBitTorrentDocument.icns
......
......@@ -47,7 +47,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleGetInfoString</key>
<string>2.9.2</string>
<string>2.9.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleExecutable</key>
......
......@@ -75,6 +75,7 @@ class about : public QDialog, private Ui::AboutDlg{
<li><u>Dutch:</u> Pieter Heyvaert (pieter_heyvaert@hotmail.com)</li>\
<li><u>Finnish:</u> Niklas Laxström (nikerabbit@users.sourceforge.net) and Pekka Niemi (pekka.niemi@iki.fi)</li>\
<li><u>Galician:</u> Marcos Lans (marcoslansgarza@gmail.com)</li>\
<li><u>Georgian:</u> Beqa Arabuli (arabulibeqa@yahoo.com)</li>\
<li><u>German:</u> Niels Hoffmann (zentralmaschine@users.sourceforge.net)</li>\
<li><u>Greek:</u> Tsvetan Bankov (emerge_life@users.sourceforge.net)</li>\
<li><u>Hungarian:</u> Majoros Péter (majoros.peterj@gmail.com)</li>\
......
......@@ -33,5 +33,6 @@
<file>lang/qbittorrent_en.qm</file>
<file>lang/qbittorrent_hr.qm</file>
<file>lang/qbittorrent_ro.qm</file>
<file>lang/qbittorrent_ka.qm</file>
</qresource>
</RCC>
\ No newline at end of file
</RCC>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff was suppressed by a .gitattributes entry.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -59,7 +59,6 @@ const int UNLEN = 256;
#ifdef Q_WS_MAC
#include <CoreServices/CoreServices.h>
#include <Carbon/Carbon.h>
#include <Cocoa/Cocoa.h>
#endif
#ifndef Q_WS_WIN
......@@ -113,9 +112,6 @@ QString misc::QDesktopServicesDataLocation() {
return result;
#else
#ifdef Q_WS_MAC
// http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_Functions/Reference/reference.html
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES);
NSString *dataDirectory =
FSRef ref;
OSErr err = FSFindFolder(kUserDomain, kApplicationSupportFolderType, false, &ref);
if (err)
......@@ -204,19 +200,7 @@ QString misc::QDesktopServicesDownloadLocation() {
#endif
#ifdef Q_WS_MAC
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES);
NSString *applicationDirectory = [paths objectAtIndex:0];
NSRange range;
range.location = 0;
range.length = [applicationDirectory length];
QString path(range.length, QChar(0));
unichar *chars = new unichar[range.location];
[nsstr getCharacters:chars range:range];
QString path = QString::fromUtf16(chars, range.length);
delete chars;
path += QLatin1Char('/') + qApp->applicationName();
return path;
// TODO: How to support this on Mac OS X?
#endif
// Fallback
......
......@@ -1270,6 +1270,7 @@ QString options_imp::languageToLocalizedString(QLocale::Language language, const
case QLocale::Russian: return QString::fromUtf8("Русский");
case QLocale::Japanese: return QString::fromUtf8("日本語");
case QLocale::Arabic: return QString::fromUtf8("عربي");
case QLocale::Georgian: return QString::fromUtf8("ქართული");
case QLocale::Chinese: {
if(country == "cn")
return QString::fromUtf8("中文 (简体)");
......
......@@ -196,40 +196,42 @@ void ProgramUpdater::updateProgram()
// title on Windows: /qbittorrent-win32/qbittorrent-2.4.7/qbittorrent_2.4.7_setup.exe
// title on Mac: /qbittorrent-mac/qbittorrent-2.4.4/qbittorrent-2.4.4.dmg
QString ProgramUpdater::extractVersionNumber(QString title) const
QString ProgramUpdater::extractVersionNumber(const QString& title) const
{
QString version;
QStringList parts = title.split("/");
if(parts.size() != 4) {
qDebug("ProgramUpdater: Unrecognized title: %s", qPrintable(title));
return version;
}
QString folder = parts.at(2);
if(!folder.contains("-")) {
qDebug("ProgramUpdater: Unrecognized folder name: %s", qPrintable(folder));
return version;
}
version = folder.mid(folder.lastIndexOf("-")+1);
if(version.split(".").size() != 3) {
qDebug("ProgramUpdater: Unrecognized version format: %s", qPrintable(version));
qDebug() << Q_FUNC_INFO << title;
QRegExp regVer("qbittorrent[_-]([0-9.]+)(_setup)?(\\.exe|\\.dmg)");
if (regVer.indexIn(title) < 0) {
qWarning() << Q_FUNC_INFO << "Failed to extract version from file name:" << title;
return QString::null;
} else {
QString version = regVer.cap(1);
qDebug() << Q_FUNC_INFO << "Extracted version:" << version;
return version;
}
return version;
}
bool ProgramUpdater::isVersionMoreRecent(QString new_version) const
bool ProgramUpdater::isVersionMoreRecent(const QString& remote_version) const
{
const QStringList parts = new_version.split(".");
Q_ASSERT(parts.size() == 3);
const int major = parts.at(0).toInt();
const int minor = parts.at(1).toInt();
const int bugfix = parts.at(2).toInt();
if(major < VERSION_MAJOR)
return false;
if(minor < VERSION_MINOR)
return false;
if(bugfix <= VERSION_BUGFIX)
return false;
return true;
QRegExp regVer("([0-9.]+)");
if (regVer.indexIn(QString(VERSION)) >= 0) {
QString local_version = regVer.cap(1);
qDebug() << Q_FUNC_INFO << "local version:" << local_version << "/" << VERSION;
QStringList remote_parts = remote_version.split('.');
QStringList local_parts = local_version.split('.');
for (int i=0; i<qMin(remote_parts.size(), local_parts.size()); ++i) {
if (remote_parts[i].toInt() > local_parts[i].toInt())
return true;
if (remote_parts[i].toInt() < local_parts[i].toInt())
return false;
}
// Compared parts were equal, if remote version is longer, then it's more recent (2.9.2.1 > 2.9.2)
if (remote_parts.size() > local_parts.size())
return true;
// versions are equal, check if the local version is a development release, in which case it is older (2.9.2beta < 2.9.2)
QRegExp regDevel("(alpha|beta|rc)");
if (regDevel.indexIn(VERSION) >= 0)
return true;
}
return false;
}
......@@ -47,8 +47,8 @@ public:
void updateProgram();
protected:
QString extractVersionNumber(QString title) const;
bool isVersionMoreRecent(QString new_version) const;
QString extractVersionNumber(const QString& title) const;
bool isVersionMoreRecent(const QString& new_version) const;
protected slots:
void rssDownloadFinished(QNetworkReply* reply);
......
......@@ -74,26 +74,31 @@ public:
QItemDelegate::drawDisplay(painter, opt, option.rect, misc::friendlyUnit(index.data().toLongLong()));
break;
case PROGRESS:{
QStyleOptionProgressBarV2 newopt;
qreal progress = index.data().toDouble()*100.;
newopt.rect = opt.rect;
// We don't want to display 100% unless
// the torrent is really complete
if(progress > 99.94 && progress < 100.)
progress = 99.9;
newopt.text = QString(QByteArray::number(progress, 'f', 1))+QString::fromUtf8("%");
newopt.progress = (int)progress;
newopt.maximum = 100;
newopt.minimum = 0;
newopt.state |= QStyle::State_Enabled;
newopt.textVisible = true;
if (index.data().toDouble() >= 0) {
QStyleOptionProgressBarV2 newopt;
qreal progress = index.data().toDouble()*100.;
newopt.rect = opt.rect;
// We don't want to display 100% unless
// the torrent is really complete
if(progress > 99.94 && progress < 100.)
progress = 99.9;
newopt.text = QString(QByteArray::number(progress, 'f', 1))+QString::fromUtf8("%");
newopt.progress = (int)progress;
newopt.maximum = 100;
newopt.minimum = 0;
newopt.state |= QStyle::State_Enabled;
newopt.textVisible = true;
#ifndef Q_WS_WIN
QApplication::style()->drawControl(QStyle::CE_ProgressBar, &newopt, painter);
QApplication::style()->drawControl(QStyle::CE_ProgressBar, &newopt, painter);
#else
// XXX: To avoid having the progress text on the right of the bar
QPlastiqueStyle st;
st.drawControl(QStyle::CE_ProgressBar, &newopt, painter, 0);
// XXX: To avoid having the progress text on the right of the bar
QPlastiqueStyle st;
st.drawControl(QStyle::CE_ProgressBar, &newopt, painter, 0);
#endif
} else {
// Do not display anything if the file is disabled (progress == -1)
QItemDelegate::drawBackground(painter, opt, index);
}
break;
}
case PRIORITY: {
......
......@@ -365,13 +365,13 @@ public:
start();
}
static void processFilterList(libtorrent::session *s, QStringList IPs) {
static void processFilterList(libtorrent::session *s, const QStringList& IPs) {
// First, import current filter
libtorrent::ip_filter filter = s->get_ip_filter();
foreach(const QString &ip, IPs) {
qDebug("Manual ban of peer %s", ip.toLocal8Bit().constData());
boost::system::error_code ec;
libtorrent::address_v4 addr = libtorrent::address_v4::from_string(ip.toLocal8Bit().constData(), ec);
libtorrent::address addr = libtorrent::address::from_string(ip.toLocal8Bit().constData(), ec);
Q_ASSERT(!ec);
if(!ec)
filter.add_rule(addr, addr, libtorrent::ip_filter::blocked);
......
......@@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-
#
#VERSION: 1.1
#VERSION: 1.2
#AUTHORS: BTDigg team (research@btdigg.org)
#
# GNU GENERAL PUBLIC LICENSE
......@@ -45,14 +45,14 @@ class btdigg(object):
continue
info_hash, name, files, size, dl, seen = line.strip().split('\t')[:6]
res = dict(link = 'magnet:?xt=urn:btih:%s' % (info_hash,),
name = name.translate(None, '|'),
name = name.translate(None, '|')
res = dict(link = 'magnet:?xt=urn:btih:%s&dn=%s' % (info_hash, urllib.quote(name)),
name = name,
size = size,
seeds = int(dl),
leech = int(dl),
engine_url = self.url,
desc_link = 'http://btdigg.org/search?%s' % (urllib.urlencode(dict(info_hash = info_hash, q = req)),))
desc_link = '%s/search?%s' % (self.url, urllib.urlencode(dict(info_hash = info_hash, q = req)),))
prettyPrinter(res)
finally:
......
......@@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-
#
#VERSION: 1.1
#VERSION: 1.2
#AUTHORS: BTDigg team (research@btdigg.org)
#
# GNU GENERAL PUBLIC LICENSE
......@@ -36,23 +36,24 @@ class btdigg(object):
pass
def search(self, what, cat='all'):
req = what.replace('+', ' ')
req = urllib.parse.unquote(what).replace('+', ' ')
u = urllib.request.urlopen('http://api.btdigg.org/api/public-8e9a50f8335b964f/s01?%s' % (urllib.parse.urlencode(dict(q = req)),))
try:
for line in u:
line = line.decode('utf-8')
if line.startswith('#'):
continue
info_hash, name, files, size, dl, seen = line.strip().split('\t')[:6]
res = dict(link = 'magnet:?xt=urn:btih:%s' % (info_hash,),
name = name.translate(None, '|'),
name = name.replace('|', '')
res = dict(link = 'magnet:?xt=urn:btih:%s&dn=%s' % (info_hash, urllib.parse.quote(name)),
name = name,
size = size,
seeds = int(dl),
leech = int(dl),
engine_url = self.url,
desc_link = 'http://btdigg.org/search?%s' % (urllib.parse.urlencode(dict(info_hash = info_hash, q = req)),))
desc_link = '%s/search?%s' % (self.url, urllib.parse.urlencode(dict(info_hash = info_hash, q = req)),))
prettyPrinter(res)
finally:
......
......@@ -219,4 +219,5 @@ TRANSLATIONS = $$LANG_PATH/qbittorrent_fr.ts \
$$LANG_PATH/qbittorrent_hr.ts \
$$LANG_PATH/qbittorrent_gl.ts \
$$LANG_PATH/qbittorrent_hy.ts \
$$LANG_PATH/qbittorrent_lt.ts
$$LANG_PATH/qbittorrent_lt.ts \
$$LANG_PATH/qbittorrent_ka.ts
......@@ -2,6 +2,14 @@
<ui version="4.0">
<class>addTorrentDialog</class>
<widget class="QDialog" name="addTorrentDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>434</width>
<height>598</height>
</rect>
</property>
<property name="windowTitle">
<string>Torrent addition dialog</string>
</property>
......@@ -21,7 +29,7 @@
</widget>
</item>
<item>
<layout class="QFormLayout" name="formLayout">
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="savePathLbl">
<property name="text">
......@@ -33,6 +41,12 @@
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QComboBox" name="savePathTxt">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="editable">
<bool>true</bool>
</property>
......@@ -278,12 +292,6 @@
</item>
<item>
<layout class="QHBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<spacer>
<property name="orientation">
......
......@@ -194,7 +194,7 @@ public:
qreal getProgress() const {
if(getPriority() == 0)
return 0.;
return -1;
qulonglong size = getSize();
if(size > 0)
return total_done/(float)getSize();
......@@ -313,6 +313,8 @@ public:
}
QVariant data(int column) const {
if(column == COL_PROGRESS)
return getProgress();
return itemData.value(column);
}
......@@ -618,6 +620,7 @@ public:
setFilterKeyColumn(TorrentFileItem::COL_NAME);
setFilterRole(Qt::DisplayRole);
setDynamicSortFilter(true);
setSortCaseSensitivity(Qt::CaseInsensitive);
}
~TorrentFilesFilterModel() {
......
......@@ -94,6 +94,7 @@ TransferListWidget::TransferListWidget(QWidget *parent, MainWindow *main_window,
nameFilterModel->setSourceModel(statusFilterModel);
nameFilterModel->setFilterKeyColumn(TorrentModelItem::TR_NAME);
nameFilterModel->setFilterRole(Qt::DisplayRole);
nameFilterModel->setSortCaseSensitivity(Qt::CaseInsensitive);
setModel(nameFilterModel);
......
......@@ -11,7 +11,7 @@
<center>
<br/>
<h2 class="vcenter"><img class="vcenter" title="Download from URL" src="theme/insert-link"/>_(Download Torrents from their URL or Magnet link)</h2>
<textarea name="list" id="urls" rows="10" cols="1"></textarea>
<textarea id="urls" rows="10"></textarea>
<p>_(Only one link per line)</p>
<input type="button" value="_(Download)" id="downButton"/>
</center>
......
......@@ -287,6 +287,7 @@
<option value="sk_SK">Slovenčina</option>
<option value="sr_CS">Српски</option>
<option value="hy_AM">Հայերեն</option>
<option value="ka_GE">ქართული</option>
<option value="ro_RO">Română</option>
<option value="tr_TR">Türkçe</option>
<option value="el_GR">Ελληνικά</option>
......
......@@ -317,7 +317,7 @@ window.addEvent('load', function(){
if($defined(prop_h))
prop_h = prop_h.toInt();
else
prop_h = 200;
prop_h = Window.getSize().y / 2.;
new MochaUI.Panel({
id: 'propertiesPanel',
title: 'Panel',
......
PROJECT_NAME = qbittorrent
PROJECT_VERSION = 2.9.2
PROJECT_VERSION = 2.9.3
os2 {
DEFINES += VERSION=\'\"v$${PROJECT_VERSION}\"\'
......@@ -9,4 +9,4 @@ os2 {
DEFINES += VERSION_MAJOR=2
DEFINES += VERSION_MINOR=9
DEFINES += VERSION_BUGFIX=2
DEFINES += VERSION_BUGFIX=3
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment