Commit e924c6b1 authored by Cristian Greco's avatar Cristian Greco

Imported Upstream version 3.0.9

parent fc281a11
......@@ -92,8 +92,9 @@ Translations authors:
- 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)
- Hebrew: David Deutsch (d.deffo@gmail.com)
- Hungarian: Majoros Péter (majoros.j.p@t-online.hu)
- Italian: Matteo Sechi (bu17714@gmail.com)
- Italian: bovirus (bovirus@live.it) and Matteo Sechi (bu17714@gmail.com)
- Japanese: Masato Hashimoto (cabezon.hashimoto@gmail.com)
- Korean: Jin Woo Sin (jin828sin@users.sourceforge.net)
- Lithuanian: Naglis Jonaitis (njonaitis@gmail.com)
......@@ -107,5 +108,5 @@ Translations authors:
- Spanish: Francisco Luque Contreras (frannoe@ya.com)
- Swedish: Daniel Nylander (po@danielnylander.se)
- Turkish: Hasan Yilmaz (iletisim@hedefturkce.com)
- Ukrainian: Andrey Shpachenko (masterfix@users.sourceforge.net) and Oleh Prypin (blaxpirit@gmail.com)
- Ukrainian: Oleh Prypin (blaxpirit@gmail.com)
license: GPLv2
* Sat May 5 2012 - Christophe Dumez <chris@qbittorrent.org> - v2.9.8
- BUGFIX: Various UI style fixes
- BUGFIX: Fix compilation with gcc 4.7
- BUGFIX: Fix possible compilation error with msvc (Windows)
- BUGFIX: Fix compilation on OS/2
- I18N: Update Italian translation
* Sun Mar 18 2012 - Christophe Dumez <chris@qbittorrent.org> - v2.9.7
- BUGFIX: Fix important HTTP request parsing bug (Web UI)
* Sat Mar 17 2012 - Christophe Dumez <chris@qbittorrent.org> - v2.9.6
- BUGFIX: Fix download first/last pieces state reporting
- BUGFIX: Fix name of progress column in torrent content panel
- BUGFIX: Disable system tray icon on Mac OS X
- BUGFIX: RSS downloader should not ignore "Do not start automatically" rule (closes #946910)
- BUGFIX: Fix DHT port setting in Web UI (Closes #952182)
- BUGFIX: Fix possible Web UI authentication problem when using SSL (closes #941343)
- BUGFIX: Fix possible issues with folder removal when removing a torrent
- I18N: Add Basque translation
* Sat Feb 18 2012 - Christophe Dumez <chris@qbittorrent.org> - v2.9.5
- BUGFIX: Fix crash when disabling then reenabling RSS
- BUGFIX: Fix duplicate torrent detection when adding a magnet link
- BUGFIX: Fix import of new trackers when adding a torrent with same hash (Closes #747000)
- BUGFIX: Fix possible redownload of torrents marked as read (Closes #927495)
- BUGFIX: Properly remove RSS feed settings/history upon feed removal
* Sat Feb 18 2012 - Christophe Dumez <chris@qbittorrent.org> - v2.9.4
- BUGFIX: qBittorrent does not handle redirection to relative URLs correctly (Closes #919905)
- BUGFIX: Cmd+M minimizes main window on Mac OS X (Closes #928216)
- BUGFIX: Cmd+Del removes torrents on Mac OS X (Closes #928852)
- BUGFIX: Fix potential bug when moving single file torrents to tmp folder (closes #932861)
- BUGFIX: Fix torrent import dialog layout (Closes #930932)
- BUGFIX: Prevent log window buffer from filling up (Closes #929673)
- I18N: Add Belarusian translation
* 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
- BUGFIX: Remove dependency on boost-filesystem (libtorrent v0.16.x)
* Sun Oct 23 2011 - Christophe Dumez <chris@qbittorrent.org> - v2.9.1
- BUGFIX: Add support for speed limits scheduling (Web UI)
- BUGFIX: Fix ratio calculation for purely seeded torrents
- I18N: Update Russian translation
- COSMETIC: Torrent addition dialog layout fixes
* Sat Mar 16 2013 - Christophe Dumez <chris@qbittorrent.org> - v3.0.9
- BUGFIX: Raise qBittorrent windows when another instance is launched
- BUGFIX: Show human readable names for network interfaces in preferences (Windows)
- BUGFIX: Fix torrent creator bug when saving non-latin path (Windows)
- BUGFIX: Enable 'copy magnet uri' for torrents without metadata too
- BUGFIX: Fix a few JSON parser issues (Gelmir)
- BUGFIX: Add support for gzipped encoded HTTP responses (daimor)
- BUGFIX: Fix possibly missing "Add torrent" icon (Driim)
- OTHER: Add search plugin for Legit Torrents
* Sun Jan 20 2013 - Christophe Dumez <chris@qbittorrent.org> - v3.0.8
- BUGFIX: Fix support for --no-splash command line argument
- BUGFIX: Fix compilation error with libtorrent v0.15
- BUGFIX: Fix search issues with Python3
- BUGFIX: Fix dead link about certificates in program preferences
* Sat Jan 19 2013 - Christophe Dumez <chris@qbittorrent.org> - v3.0.7
- BUGFIX: Update max write cache size to 2048MB and set it to automatic by default (closes #148)
- BUGFIX: Add m4v to the list of previewable file extensions (closes #216)
- BUGFIX: Fix "Couldn't set environment variable..." message on start up (closes #245)
- BUGFIX: Use right path separator in torrent addition dialog on Windows
- BUGFIX: Fix "Set as default save path" setting (closes #254)
- BUGFIX: Reenable disk cache on Windows since the memory issue seems to be gone
- BUGFIX: Fixed several search engine plugins and removed the dead ones
- BUGFIX: Use https links in search plugins when possible
- BUGFIX: Bump Mootools to v1.4.5 (Web UI)
- BUGFIX: Require password to exit qBittorrent from tray icon when locked (closes #311)
- BUGFIX: Fix possible crash in loadPeers() (closes #222)
* Sun Oct 7 2012 - Christophe Dumez <chris@qbittorrent.org> - v3.0.6
- BUGFIX: Fix unicode support for command-line arguments on Windows (closes #139)
- BUGFIX: Do not store created torrent in memory before writing it to a file (closes #133)
- BUGFIX: No longer fallback to ANY interface if the user-selected interface cannot be found (closes #143)
- BUGFIX: Fix timezone parsing in RSS (closes #136)
- BUGFIX: Fix cookie support for RSS feeds (closes #119)
* Sun Sep 30 2012 - Christophe Dumez <chris@qbittorrent.org> - v3.0.5
- BUGFIX: Disabling systray icon no longer disables file association settings (closes #114)
- BUGFIX: Import new trackers from magnet link in case of duplicate torrent (closes #111)
- BUGFIX: Fix "Skip hash check" feature in torrent import dialog (closes #128)
- BUGFIX: Several Web UI connection fixes
- BUGFIX: Add Basque locale to Web UI
* Tue Sep 18 2012 - Christophe Dumez <chris@qbittorrent.org> - v3.0.4
- BUGFIX: Fix issue with downloads starting from scratch on startup if temporary
directory setting is enabled.
* Sun Sep 16 2012 - Christophe Dumez <chris@qbittorrent.org> - v3.0.3
- BUGFIX: Fix issue with temporary directory not being taken into consideration (closes #94)
- BUGFIX: Address encoding issues when using search engine on Windows (closes #29)
- BUGFIX: Bypass cache when uploading a torrent file in Web UI (closes #68)
- BUGFIX: "Completed On" column is not updated until restart (closes #84)
- BUGFIX: Fix possible build error on some systems
- I18N: Add hebrew translation
* Sat Sep 1 2012 - Christophe Dumez <chris@qbittorrent.org> - v3.0.2
- FEATURE: Add "clear" functionality to search field (closes #59)
- BUGFIX: Attempt to use qBittorrent icon from theme if available (closes #49)
- BUGFIX: Fix crash when a fastresume file is empty (closes #52)
- BUGFIX: Fix encoding problem for detected XDG Download folder (closes #53)
- BUGFIX: Improve performance when showing torrent content panel (Improves #24)
- BUGFIX: Fix label-based filtering of torrents whose label contains special characters
- BUGFIX: Fix possible crash due to labels (closes #64)
* Tue Aug 21 2012 - Christophe Dumez <chris@qbittorrent.org> - v3.0.1
- BUGFIX: Fix possible crash when adding a tracker to a magnet torrent without metadata (Closes #1034254)
- BUGFIX: Remember queue position for torrents without metadata (closes #17)
- BUGFIX: Fix crash when using unauthorized characters in label names (closes #19)
- BUGFIX: Fix search plugins updating (closes #25)
- BUGFIX: Make uTP connections rate limited by default
* Thu Aug 09 2012 - Christophe Dumez <chris@qbittorrent.org> - v3.0.0
- FEATURE: Brand new torrent addition dialog
- FEATURE: Add the ability to choose the save path when using magnet links (mutoso)
- FEATURE: Add support for adding multiple local torrents at once (Web UI)
- COSMETIC: Improve style of left panel
- BUGFIX: Lower panels no longer gets disabled
- BUGFIX: Major code refactoring and various optimizations.
- BUGFIX: No longer strip root folder from torrent files
- OTHER: Drop support for libtorrent v0.14.x
- OTHER: Drop support for Qt 4.5
* Sat Oct 08 2011 - Christophe Dumez <chris@qbittorrent.org> - v2.9.0
- FEATURE: Add file association settings to program preferences (Windows)
......
......@@ -10,11 +10,11 @@ qBittorrent - A BitTorrent client in C++ / Qt4
will install and execute qBittorrent hopefully without any problems.
Dependencies:
- Qt >= 4.5.0 (libqtgui, libqtcore, libqtnetwork, libqtxml, libqtdbus/optional)
- Qt >= 4.6.0 (libqtgui, libqtcore, libqtnetwork, libqtxml, libqtdbus/optional)
- pkg-config executable
- libtorrent-rasterbar by Arvid Norberg (>= 0.14.4 REQUIRED, compatible with v0.15.x/v0.16.x)
- libtorrent-rasterbar by Arvid Norberg (>= 0.15.0)
-> http://www.libtorrent.net
Be careful: another library (the one used by rTorrent) uses a similar name.
......@@ -44,7 +44,7 @@ qBittorrent - A BitTorrent client in C++ / Qt4
- pkg-config executable
- libtorrent-rasterbar by Arvid Norberg (>= 0.14.4 REQUIRED, >= v0.15.0 ADVISED)
- libtorrent-rasterbar by Arvid Norberg (>= v0.15.0)
-> http://www.libtorrent.net
Be careful: another library (the one used by rTorrent) uses a similar name.
......
......@@ -42,7 +42,10 @@ LIBS += -Lx:/trees/libtorrent/trunk/src/.libs \
Of course all the above path references have to be adjusted to your build env.
It should now be easy to build qBittorrent:
Now you can either do a normal build or a shadow build. A shadow build has the
advantage that no created files are in the same dir as the sources are.
For a normal build do the following:
Simply type:
$ qmake
......@@ -50,6 +53,16 @@ $ qmake
Followed by:
$ make
For a shadow build do the following:
given your sources are in x:\trees\qbittorrent\trunk create a
x:\trees\qbittorrent\build directory
Now switch to the created directory and type:
$ qmake ..\trunk
Followed by:
$ make
If all works fine you should get a working qbittorrent executable.
If you have any question regarding the eCS (OS/2) port of qBittorrent you can meet me (_diver) on IRC:
......
......@@ -325,7 +325,7 @@ cat >$1/modules.cpp <<EOT
#line 1 "qt4.qcm"
/*
-----BEGIN QCMOD-----
name: Qt >= 4.5
name: Qt >= 4.6
arg: enable-debug, Enable debug mode
arg: disable-gui, Disable qBittorrent Graphical user interface for headless running
-----END QCMOD-----
......@@ -334,8 +334,8 @@ class qc_qt4 : public ConfObj
{
public:
qc_qt4(Conf *c) : ConfObj(c) {}
QString name() const { return "Qt >= 4.5"; }
QString shortname() const { return "Qt 4.5"; }
QString name() const { return "Qt >= 4.6"; }
QString shortname() const { return "Qt 4.6"; }
bool exec()
{
// NOX mode
......@@ -356,7 +356,7 @@ public:
#else
conf->addExtra("MANPREFIX = \$\$PREFIX/share");
#endif
return(QT_VERSION >= 0x040500);
return(QT_VERSION >= 0x040600);
}
};
#line 1 "qt-dbus.qcm"
......@@ -419,11 +419,11 @@ class qc_libtorrent_rasterbar : public ConfObj
{
public:
qc_libtorrent_rasterbar(Conf *c) : ConfObj(c) {}
QString name() const { return "libtorrent-rasterbar >= 0.14.4"; }
QString name() const { return "libtorrent-rasterbar >= 0.15.0"; }
QString shortname() const { return "libtorrent-rasterbar"; }
bool exec(){
QStringList incs;
QString req_ver = "0.14.4";
QString req_ver = "0.15.0";
QString version, libs, other;
VersionMode mode = VersionMin;
if(!conf->findPkgConfig("libtorrent-rasterbar", mode, req_ver, &version, &incs, &libs, &other))
......
......@@ -67,7 +67,7 @@ ZIP Installation:
klibc
-----
1. Download klibc 0.6.4 or better (see http://svn.netlabs.org/libc for more information)
1. Download klibc 0.6.5 or better (see http://svn.netlabs.org/libc for more information)
2. Install the files to your libpath eg x:\ecs\dll
openssl 1.0
......@@ -146,6 +146,19 @@ development, you can do so in one of the following ways:
7. HISTORY
==========
2012-09-19
* updated to 3.0.4 code level of QBittorrent
* updated libtorrent to 0.16.3 level
2012-09-06
* updated to 3.0.2 code level of QBittorrent
2012-05-14
* updated to 2.9.8 code level of QBittorrent
2012-03-15
* updated to 2.9.5 code level of QBittorrent
......
......@@ -5,6 +5,7 @@ DATADIR = /usr/local/share
# Use pkg-config to get all necessary libtorrent DEFINES
CONFIG += link_pkgconfig
PKGCONFIG += libtorrent-rasterbar
DEFINES += BOOST_ASIO_DYN_LINK
# Special include/libs paths (macports)
INCLUDEPATH += /usr/include/openssl /usr/include /opt/local/include/boost /opt/local/include
......@@ -15,16 +16,52 @@ LIBS += -lssl -lcrypto
# Boost system lib
LIBS += -lboost_system-mt
# Boost filesystem lib (Not needed for libtorrent >= 0.16.0)
LIBS += -lboost_filesystem-mt
#LIBS += -lboost_filesystem-mt
# Carbon
LIBS += -framework Carbon -framework IOKit
# Zlib
LIBS += -lz
document_icon.path = Contents/Resources
document_icon.files = Icons/qBitTorrentDocument.icns
document_icon.files = mac/qBitTorrentDocument.icns
QMAKE_BUNDLE_DATA += document_icon
ICON = Icons/qbittorrent_mac.icns
QMAKE_INFO_PLIST = Info.plist
qt_conf.path = Contents/Resources
qt_conf.files = mac/qt.conf
QMAKE_BUNDLE_DATA += qt_conf
qt_translations.path = Contents/MacOS/translations
qt_translations.files = qt-translations/qt_ar.qm \
qt-translations/qt_bg.qm \
qt-translations/qt_ca.qm \
qt-translations/qt_cs.qm \
qt-translations/qt_da.qm \
qt-translations/qt_de.qm \
qt-translations/qt_es.qm \
qt-translations/qt_fi.qm \
qt-translations/qt_fr.qm \
qt-translations/qt_gl.qm \
qt-translations/qt_he.qm \
qt-translations/qt_hu.qm \
qt-translations/qt_it.qm \
qt-translations/qt_ja.qm \
qt-translations/qt_ko.qm \
qt-translations/qt_lt.qm \
qt-translations/qt_nl.qm \
qt-translations/qt_pl.qm \
qt-translations/qt_pt.qm \
qt-translations/qt_pt_BR.qm \
qt-translations/qt_ru.qm \
qt-translations/qt_sk.qm \
qt-translations/qt_sv.qm \
qt-translations/qt_tr.qm \
qt-translations/qt_uk.qm \
qt-translations/qt_zh_CN.qm \
qt-translations/qt_zh_TW.qm
QMAKE_BUNDLE_DATA += qt_translations
ICON = mac/qbittorrent_mac.icns
QMAKE_INFO_PLIST = mac/Info.plist
DEFINES += WITH_GEOIP_EMBEDDED
message("On Mac OS X, GeoIP database must be embedded.")
......@@ -7,12 +7,13 @@ LIBS += -ltorrent-rasterbar \
-lboost_thread \
-lboost_system \
-lboost_filesystem \
-lssl -lcrypto -lidn -lpthread
-lssl -lcrypto -lidn -lpthread -lz
RC_FILE = qbittorrent_os2.rc
# LIBTORRENT DEFINES
DEFINES += WITH_SHIPPED_GEOIP_H
DEFINES += BOOST_ASIO_DYN_LINK
DEFINES += WITH_GEOIP_EMBEDDED
message("On eCS(OS/2), GeoIP database must be embedded.")
......@@ -8,11 +8,11 @@ class qc_libtorrent_rasterbar : public ConfObj
{
public:
qc_libtorrent_rasterbar(Conf *c) : ConfObj(c) {}
QString name() const { return "libtorrent-rasterbar >= 0.14.4"; }
QString name() const { return "libtorrent-rasterbar >= 0.15.0"; }
QString shortname() const { return "libtorrent-rasterbar"; }
bool exec(){
QStringList incs;
QString req_ver = "0.14.4";
QString req_ver = "0.15.0";
QString version, libs, other;
VersionMode mode = VersionMin;
if(!conf->findPkgConfig("libtorrent-rasterbar", mode, req_ver, &version, &incs, &libs, &other))
......
/*
-----BEGIN QCMOD-----
name: Qt >= 4.5
name: Qt >= 4.6
arg: enable-debug, Enable debug mode
arg: disable-gui, Disable qBittorrent Graphical user interface for headless running
-----END QCMOD-----
......@@ -9,8 +9,8 @@ class qc_qt4 : public ConfObj
{
public:
qc_qt4(Conf *c) : ConfObj(c) {}
QString name() const { return "Qt >= 4.5"; }
QString shortname() const { return "Qt 4.5"; }
QString name() const { return "Qt >= 4.6"; }
QString shortname() const { return "Qt 4.6"; }
bool exec()
{
// NOX mode
......@@ -31,6 +31,6 @@ public:
#else
conf->addExtra("MANPREFIX = $$PREFIX/share");
#endif
return(QT_VERSION >= 0x040500);
return(QT_VERSION >= 0x040600);
}
};
......@@ -45,7 +45,7 @@ class about : public QDialog, private Ui::AboutDlg{
qDebug("Deleting about dlg");
}
about(QWidget *parent): QDialog(parent){
about(QWidget *parent): QDialog(parent) {
setupUi(this);
setAttribute(Qt::WA_DeleteOnClose);
// Set icons
......@@ -80,8 +80,9 @@ class about : public QDialog, private Ui::AboutDlg{
<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>Hebrew:</u> David Deutsch (d.deffo@gmail.com)</li>\
<li><u>Hungarian:</u> Majoros Péter (majoros.peterj@gmail.com)</li>\
<li><u>Italian:</u> Matteo Sechi (bu17714@gmail.com)</li>\
<li><u>Italian:</u> bovirus (bovirus@live.it) and Matteo Sechi (bu17714@gmail.com)</li>\
<li><u>Japanese:</u> Masato Hashimoto (cabezon.hashimoto@gmail.com)</li>\
<li><u>Korean:</u> Jin Woo Sin (jin828sin@users.sourceforge.net)</li>\
<li><u>Lithuanian:</u> Naglis Jonaitis (njonaitis@gmail.com)</li>\
......@@ -95,13 +96,13 @@ class about : public QDialog, private Ui::AboutDlg{
<li><u>Spanish:</u> Francisco Luque Contreras (frannoe@ya.com)</li>\
<li><u>Swedish:</u> Daniel Nylander (po@danielnylander.se)</li>\
<li><u>Turkish:</u> Hasan YILMAZ (iletisim@hedefturkce.com) and Erdem Bingöl (erdem84@gmail.com)</li>\
<li><u>Ukrainian:</u> Andrey Shpachenko (masterfix@users.sourceforge.net) and Oleh Prypin (blaxpirit@gmail.com)</li></ul>");
<li><u>Ukrainian:</u> Oleh Prypin (blaxpirit@gmail.com)</li></ul>");
trans_txt += "<p>"+tr("Please contact me if you would like to translate qBittorrent into your own language.")+"</p>";
te_translation->setHtml(trans_txt);
// License
te_license->append(QString::fromUtf8("<a name='top'></a>"));
QFile licensefile(":/gpl.html");
if(licensefile.open(QIODevice::ReadOnly|QIODevice::Text)) {
if (licensefile.open(QIODevice::ReadOnly|QIODevice::Text)) {
te_license->setHtml(licensefile.readAll());
licensefile.close();
}
......
This diff is collapsed.
/*
* Bittorrent Client using Qt4 and libtorrent.
* Copyright (C) 2006 Christophe Dumez
* Copyright (C) 2012 Christophe Dumez
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
......@@ -28,70 +28,64 @@
* Contact : chris@qbittorrent.org
*/
#ifndef TORRENTADDITION_H
#define TORRENTADDITION_H
#include <QStringList>
#include "ui_torrentadditiondlg.h"
#ifndef ADDNEWTORRENTDIALOG_H
#define ADDNEWTORRENTDIALOG_H
#include <QDialog>
#include <QUrl>
#include <libtorrent/torrent_info.hpp>
class TorrentFilesFilterModel;
QT_BEGIN_NAMESPACE
namespace Ui {
class AddNewTorrentDialog;
}
QT_END_NAMESPACE
class TorrentContentFilterModel;
class PropListDelegate;
class torrentAdditionDialog : public QDialog, private Ui_addTorrentDialog{
class AddNewTorrentDialog : public QDialog
{
Q_OBJECT
public:
torrentAdditionDialog(QWidget *parent);
~torrentAdditionDialog();
void showLoadMagnetURI(QString magnet_uri);
void showLoad(QString filePath, QString from_url=QString::null);
QString getCurrentTruncatedSavePath(QString* root_folder_or_file_name = 0) const;
QString getTruncatedSavePath(QString save_path, QString* root_folder_or_file_name = 0) const;
bool allFiltered() const;
~AddNewTorrentDialog();
public slots:
void displayContentListMenu(const QPoint&);
void renameSelectedFile();
void updateDiskSpaceLabels();
void on_browseButton_clicked();
void on_CancelButton_clicked();
void savePiecesPriorities();
void on_OkButton_clicked();
void hideTorrentContent();
void limitDialogWidth();
void saveTruncatedPathHistory();
void loadSavePathHistory();
void updateLabelInSavePath(QString label);
void updateSavePathCurrentText();
void resetComboLabelIndex(QString text);
static void showTorrent(const QString& torrent_path, const QString& from_url = QString());
static void showMagnet(const QString& torrent_link);
protected:
void closeEvent(QCloseEvent *event);
private slots:
void showAdvancedSettings(bool show);
void displayContentTreeMenu(const QPoint&);
void on_buttonBox_accepted();
void updateDiskSpaceLabel();
void onSavePathChanged(int);
void relayout();
void renameSelectedFile();
void setdialogPosition();
private:
void readSettings();
void saveSettings();
explicit AddNewTorrentDialog(QWidget *parent = 0);
bool loadTorrent(const QString& torrent_path, const QString& from_url);
bool loadMagnet(const QString& magnet_uri);
void loadSavePathHistory();
void saveSavePathHistory() const;
int indexOfSavePath(const QString& save_path);
void updateFileNameInSavePaths(const QString& new_filename);
void loadState();
void saveState();
private:
QString fileName;
QString hash;
QString filePath;
QString from_url;
QString defaultSavePath;
QString old_label;
bool appendLabelToSavePath;
TorrentFilesFilterModel *PropListModel;
PropListDelegate *PropDelegate;
unsigned int nbFiles;
boost::intrusive_ptr<libtorrent::torrent_info> t;
QStringList files_path;
bool is_magnet;
int hidden_height;
QStringList path_history;
bool m_showContentList;
Ui::AddNewTorrentDialog *ui;
TorrentContentFilterModel *m_contentModel;
PropListDelegate *m_contentDelegate;
bool m_isMagnet;
QString m_filePath;
QString m_url;
QString m_hash;
boost::intrusive_ptr<libtorrent::torrent_info> m_torrentInfo;
QStringList m_filesPath;
bool m_hasRenamedFile;
};
#endif
#endif // ADDNEWTORRENTDIALOG_H
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>AddNewTorrentDialog</class>
<widget class="QDialog" name="AddNewTorrentDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>414</width>
<height>590</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>400</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>800</width>
<height>16777215</height>
</size>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Save as</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QComboBox" name="save_path_combo">