Compare commits
44 Commits
release-1.
...
release-0.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ff277fe5bb | ||
|
|
7140a532ed | ||
|
|
db4f3ab08a | ||
|
|
1deb7b88bc | ||
|
|
0d40bb0d68 | ||
|
|
b033893d39 | ||
|
|
e9693d3829 | ||
|
|
bc7d9d00ab | ||
|
|
0c05c893a0 | ||
|
|
8b3c4f8143 | ||
|
|
90bc79d4e1 | ||
|
|
676d6764b9 | ||
|
|
cb08280180 | ||
|
|
ecede8b53e | ||
|
|
f6a54f6fcf | ||
|
|
6039851f13 | ||
|
|
f1decc5432 | ||
|
|
12629a9e38 | ||
|
|
14f13d0406 | ||
|
|
e0213dc6c3 | ||
|
|
2f065bd9ea | ||
|
|
b87882dd59 | ||
|
|
df06fcac03 | ||
|
|
3de95cdb04 | ||
|
|
062fd6d81c | ||
|
|
82d9e19e96 | ||
|
|
22eead5f9a | ||
|
|
f5627e4345 | ||
|
|
da867a767b | ||
|
|
b751954566 | ||
|
|
f774228529 | ||
|
|
4d6aad8cab | ||
|
|
188e3956d8 | ||
|
|
88d7400644 | ||
|
|
41254bcdf4 | ||
|
|
067aa010b6 | ||
|
|
f94197816c | ||
|
|
78e976e97e | ||
|
|
225d8bcc5b | ||
|
|
9bd29ebdb0 | ||
|
|
7565902fc1 | ||
|
|
0b8a1f8c1f | ||
|
|
8800614077 | ||
|
|
156001f51d |
72
AUTHORS
@@ -1,71 +1 @@
|
||||
Author:
|
||||
* Christophe Dumez <chris@qbittorrent.org>
|
||||
|
||||
Contributors:
|
||||
* Arnaud Demaizière <arnaud@qbittorrent.org>
|
||||
* Ishan Arora <ishan@qbittorrent.org>
|
||||
* Grigis Gaëtan <cipher16@gmail.com>
|
||||
|
||||
Images Authors:
|
||||
* files: src/Icons/*.png
|
||||
copyright: Gnome Icon Theme
|
||||
license: GPLv2
|
||||
url: http://ftp.acc.umu.se/pub/GNOME/sources/gnome-icon-theme
|
||||
|
||||
* files: src/Icons/flags/*.png
|
||||
copyright: Open Clip Art Library
|
||||
license: Creative Commons Public Domain Dedication
|
||||
url: http://www.openclipart.org
|
||||
|
||||
* files: src/Icons/skins/*.png
|
||||
copyright: Mateusz Tobola <tobejodok@qbittorrent.org>
|
||||
license: GPLv2
|
||||
|
||||
* files: src/menuicons/YYxYY/*.png
|
||||
copyright: Mateusz Tobola <tobejodok@qbittorrent.org>
|
||||
license: GPLv2
|
||||
|
||||
* file: src/search_engine/engines/btjunkie.png
|
||||
copyright: Downloaded from btjunkie.org
|
||||
|
||||
* file: src/search_engine/engines/isohunt.png
|
||||
copyright: Downloaded from isohunt.com
|
||||
|
||||
* file: src/search_engine/engines/mininova.png
|
||||
copyright: Downloaded from mininova.org
|
||||
|
||||
* file: src/search_engine/engines/piratebay.png
|
||||
copyright: Downloaded from thepiratebay.org
|
||||
|
||||
* file: src/search_engine/engines/torrentreactor.png
|
||||
copyright: Downloaded from torrentreactor.net
|
||||
|
||||
Translations authors:
|
||||
* files: src/lang/*.ts
|
||||
copyright:
|
||||
- Brazilian: Nick Marinho (nickmarinho@gmail.com)
|
||||
- Bulgarian: Tsvetan & Boiko Bankov (emerge_life@users.sourceforge.net)
|
||||
- Catalan: Gekko Dam Beer (gekko04@users.sourceforge.net)
|
||||
- Chinese (Simplified): Guo Yue (guoyue0418@hotmail.com)
|
||||
- Danish: Mathias Nielsen (comoneo@gmail.com)
|
||||
- Dutch: Joost Schipper (heavyjoost@users.sourceforge.net)
|
||||
- English: Christophe Dumez (chris@qbittorrent.org)
|
||||
- Finnish: Niklas Laxström (nikerabbit@users.sourceforge.net)
|
||||
- French: Christophe Dumez (chris@qbittorrent.org)
|
||||
- German: Niels Hoffmann (zentralmaschine@users.sourceforge.net)
|
||||
- Greek: Tsvetan Bankov (emerge_life@users.sourceforge.net)
|
||||
- Hungarian: Majoros Péter (majoros.j.p@t-online.hu)
|
||||
- Italian: Mirko Ferrari (mirkoferrari@gmail.com) and Ferraro Luciano (luciano.ferraro@gmail.com)
|
||||
- Japanese: Nardog (nardog@e2umail.com)
|
||||
- Korean: Jin Woo Sin (jin828sin@users.sourceforge.net)
|
||||
- Norwegian: Lars-Erik Labori (hamil@users.sourceforge.net)
|
||||
- Polish: Jarek Smieja (ajep9691@wp.pl)
|
||||
- Portuguese: Nick Marinho (nickmarinho@gmail.com)
|
||||
- Romanian: Obada Denis (obadadenis@users.sourceforge.net)
|
||||
- Russian: Nick Khazov (m2k3d0n at users.sourceforge.net)
|
||||
- Slovak: helix84
|
||||
- Spanish: Vicente Raul Plata Fonseca (silverxnt@users.sourceforge.net)
|
||||
- Swedish: Daniel Nylander (po@danielnylander.se)
|
||||
- Turkish: Erdem Bingöl (erdem84@gmail.com)
|
||||
- Ukrainian: Andrey Shpachenko (masterfix@users.sourceforge.net)
|
||||
license: GPLv2
|
||||
Christophe Dumez <chris@qbittorrent.org>
|
||||
|
||||
130
Changelog
@@ -1,128 +1,10 @@
|
||||
* Fri Aug 01 2008 - Christophe Dumez <chris@qbittorrent.org> - v1.1.1
|
||||
- BUGFIX: Fixed bad resource file for icons
|
||||
|
||||
* Fri Aug 01 2008 - Christophe Dumez <chris@qbittorrent.org> - v1.1.0
|
||||
- FEATURE: Web interface to control qbittorrent (Ishan Arora)
|
||||
- FEATURE: Can spoof Azureus peer id to avoid ban
|
||||
- FEATURE: Allow to hide/show some columns in download and seeding lists
|
||||
- FEATURE: Option to start qBittorrent minimized in systray
|
||||
- FEATURE: Multi-tab support in search engine (Grigis Gaëtan)
|
||||
- FEATURE: Allow to define double-click actions in torrents lists
|
||||
- FEATURE: Allow to open torrent destination folder
|
||||
- FEATURE: Real progress bar in torrent properties that displays downloaded pieces
|
||||
- FEATURE: Allow to buy downloads using ShareMonkey
|
||||
- FEATURE: Display if UPnP/NAT-PMP was successful or not
|
||||
- FEATURE: Threadified torrent creation
|
||||
- FEATURE: Improved eMule DAT ip filter parser
|
||||
- FEATURE: Added support for PeerGuardian p2p filters (text)
|
||||
- FEATURE: Added support for PeerGuardian p2b filters (binary)
|
||||
- FEATURE: Allow to customize folder scan interval
|
||||
- FEATURE: Allow to add several trackers at once
|
||||
- BUGFIX: Allow to run one instance of qBittorrent per user
|
||||
- BUGFIX: Do not display seeds number in seeding list (always 0)
|
||||
- BUGFIX: Threadified IP filter file parser to avoid GUI freeze
|
||||
- BUGFIX: Ask if we want to redownload if content was deleted from hard drive
|
||||
- BUGFIX: Added missing copyright/licensing information for some files
|
||||
- BUGFIX: qBittorrent is no longer conflicting with rTorrent (libtorrent renamed to libtorrent-rasterbar)
|
||||
- COSMETIC: Do not display progress bar in seeding list (always 100%)
|
||||
- COSMETIC: Added a progress bar for torrent creation
|
||||
- COSMETIC: Display tracker errors in a cleaner way
|
||||
- COSMETIC: Display "unpaused/total_torrent" in download/upload tabs
|
||||
- COSMETIC: Allow to resize RSS column
|
||||
- COSMETIC: Global UP/DL speeds and ratio are displayed above tabs
|
||||
- COSMETIC: Use infinity symbol for ETA when time is infinite
|
||||
|
||||
* Fri Apr 11 2008 - Christophe Dumez <chris@qbittorrent.org> - v1.0.0
|
||||
- FEATURE: Based on new libtorrent v0.13
|
||||
- FEATURE: Added UPnP / NAT-PMP port forwarding support
|
||||
- FEATURE: Added encryption support (compatible with Azureus)
|
||||
- FEATURE: Bittorrent FAST extension support
|
||||
- FEATURE: Added RSS support
|
||||
- FEATURE: Support files prioritizing in a torrent
|
||||
- FEATURE: Brand new search engine plugins system
|
||||
- FEATURE: Filtered files don't appear on hard disk anymore
|
||||
- FEATURE: Finished torrents are now moved to another tab for seeding
|
||||
- FEATURE: Display more infos about the torrent in its properties
|
||||
- FEATURE: Allow the user to edit torrents' trackers
|
||||
- FEATURE: Allow user to change qBT's style (Plastique, Cleanlooks, Motif, CDE, MacOSX, WinXP)
|
||||
- FEATURE: Allow the user to disable system tray integration
|
||||
- FEATURE: Search engine is now using one thread per website for faster results
|
||||
- FEATURE: Improved a lot the torrent creation module
|
||||
- FEATURE: Allow to set upload/download limit per torrent (right click)
|
||||
- FEATURE: Ask for exit confirmation only if download list is not empty
|
||||
- FEATURE: Allow to use a proxy for trackers / web seeds / peers / DHT connections
|
||||
- FEATURE: Supports SOCKS5 proxies as well as HTTP ones
|
||||
- FEATURE: Better systems integration (buttons, dialogs...)
|
||||
- FEATURE: Filtered files are not allocated on the hard-drive anymore (sparse file support)
|
||||
- FEATURE: IPs blocked by filter are now logged in GUI
|
||||
- FEATURE: Added a way to link against static libtorrent (useful for deb packages)
|
||||
- FEATURE: Allow to set global upload/download limits from tray icon menu
|
||||
- FEATURE: IPv6 is now fully supported
|
||||
- FEATURE: Real torrent share ratio is now displayed in transfer list
|
||||
- FEATURE: Added keyboard shortcuts for main actions (see wiki)
|
||||
- FEATURE: Added a popup menu to set priority for multiple files at once
|
||||
- FEATURE: Improved a lot downloading from urls (using libcommoncpp2 instead of libcurl)
|
||||
- FEATURE: A search request can now be terminated by another
|
||||
- FEATURE: User is now warned when fast resume data was rejected
|
||||
- FEATURE: Url seeds are now displayed in torrent properties and are editable
|
||||
- FEATURE: Allow to drag 'n drop urls on the main window
|
||||
- FEATURE: Improved search engine (multipage support in all plugins)
|
||||
- FEATURE: Added BTJunkie search engine plugin
|
||||
- FEATURE: Added an option to force full disk allocation for all torrents
|
||||
- FEATURE: Added an option to add torrents in paused state
|
||||
- FEATURE: Added an option to set the max number of connections per torrent
|
||||
- FEATURE: Added an option to set the max number of uploads per torrent
|
||||
- FEATURE: Added an option to automatically delete torrents when they reach a given ratio (>= 1.0)
|
||||
- FEATURE: Added an option to display current transfer speeds in title bar
|
||||
- FEATURE: Torrent content is now displayed as a tree
|
||||
- I18N: Added Hungarian translation
|
||||
- I18N: Added Brazilian translation
|
||||
- BUGFIX: Progress of paused torrents is now correct on restart
|
||||
- BUGFIX: Progress column gets sorted on restart it is was during last execution
|
||||
- BUGFIX: Made ETA more reliable using stats instead of instant values
|
||||
- BUGFIX: Remove torrent from hard drive used to delete parent folder if empty
|
||||
- BUGFIX: Fixed a crash when filtering all the files in a torrent
|
||||
- BUGFIX: Reload torrent only when necessary (properties)
|
||||
- BUGFIX: qBittorrent is not exiting anymore when a dialog is closed and main window is hidden
|
||||
- BUGFIX: Search plugin update is not making the GUI freeze anymore (moved to a thread)
|
||||
- BUGFIX: DHT settings were not saved correctly
|
||||
- BUGFIX: Workaround to build on Fedora system (pkg-config problem)
|
||||
- BUGFIX: search plugin update - do not display only last version changelog
|
||||
- BUGFIX: Search plugin update - fixed missing new lines in changelog
|
||||
- BUGFIX: The number of search results was not reset when clicking on 'Clear' button
|
||||
- BUGFIX: Update torrent progress when its content changed (filtered files)
|
||||
- BUGFIX: Improved the way menu icons are installed to avoid problems on some systems
|
||||
- BUGFIX: Improved incremental download
|
||||
- BUGFIX: Improved unicode support
|
||||
- BUGFIX: Made torrent deletion from hard-drive safer
|
||||
- BUGFIX: Prevent downloadFromUrl flooding
|
||||
- BUGFIX: ETA was wrong for torrents with filtered files
|
||||
- BUGFIX: Fixed drag'n drop on non-KDE systems
|
||||
- BUGFIX: Removed build dependency on Python
|
||||
- BUGFIX: Catching DHT exception in case there is a problem
|
||||
- COSMETIC: Redesigned torrent properties a little
|
||||
- COSMETIC: Totally redesigned program preferences
|
||||
- COSMETIC: Display more logs messages concerning features
|
||||
- COSMETIC: Improved lists renderers
|
||||
- COSMETIC: Use a different icon for torrents being checked and for connecting ones
|
||||
- COSMETIC: Improved some icons
|
||||
- COSMETIC: Improved systray tooltip style
|
||||
|
||||
* Mon May 07 2007 - Christophe Dumez <chris@qbittorrent.org> - v0.9.3
|
||||
- BUGFIX: Fixed pause toggle on double-click in download list
|
||||
- BUGFIX: The torrent size displayed now only takes unfiltered files into account
|
||||
- BUGFIX: Fixed compiling errors with libtorrent svn (future v0.13 with UPnP enabled)
|
||||
- BUGFIX: Remember sorted column in download list on restart
|
||||
- BUGFIX: Small fix in the german translation
|
||||
- BUGFIX: Some fixes in slovak translation
|
||||
|
||||
* Tue Apr 10 2007 - Christophe Dumez <chris@qbittorrent.org> - v0.9.2
|
||||
- BUGFIX: Window can now stay maximized on exit
|
||||
- BUGFIX: Use PKGCONFIG again for configuring libtorrent
|
||||
- BUGFIX: Allow to compile with libtorrent v0.11
|
||||
- BUGFIX: Disabled main window context menu (annoying)
|
||||
- I18N: Added Japanese translation
|
||||
- I18N: Updated Turkish translation
|
||||
- BUGFIX: Window can now stay maximized on exit
|
||||
- BUGFIX: Use PKGCONFIG again for configuring libtorrent
|
||||
- BUGFIX: Allow to compile with libtorrent v0.11
|
||||
- BUGFIX: Disabled main window context menu (annoying)
|
||||
- I18N: Added Japanese translation
|
||||
- I18N: Updated Turkish translation
|
||||
|
||||
* Wed Apr 04 2007 - Christophe Dumez <chris@qbittorrent.org> - v0.9.1
|
||||
- BUGFIX: A lot of fixes in configure file
|
||||
|
||||
28
INSTALL
@@ -1,4 +1,4 @@
|
||||
qBittorrent - A BitTorrent client in C++ / Qt4
|
||||
qBittorrent - A BitTorrent client in C++ / Qt4.2
|
||||
------------------------------------------
|
||||
|
||||
*** Necessary if qt3 is default on your system ***
|
||||
@@ -14,31 +14,23 @@ qbittorrent
|
||||
will install and execute qBittorrent hopefully without any problems.
|
||||
|
||||
Dependencies:
|
||||
- Qt >= 4.3.0 (libqt-devel, libqtgui, libqtcore, libqtnetwork, libqtxml)
|
||||
Qt >= 4.4.0 is advised
|
||||
- Qt >= 4.2 (libqt-devel, libqtgui, libqtcore, libqtnetwork)
|
||||
|
||||
- libtorrent-rasterbar by Arvid Norberg (>= v0.13.1 REQUIRED)
|
||||
-> http://www.libtorrent.net
|
||||
Be careful: another library (the one used by rTorrent) uses a similar name.
|
||||
- libtorrent by Arvid Norberg (>= v0.11 REQUIRED, >= 0.12 ADVISED)
|
||||
-> http://libtorrent.sf.net
|
||||
Be carefull: another library (the one used by rtorrent) use the same name.
|
||||
These are TWO different libraries and qBittorrent will only work with the one provided
|
||||
on sourceforge (created by Arvid Norberg). The two libraries conflicts with each other.
|
||||
|
||||
- libboost: libboost-filesystem, libboost-date-time, libboost-thread, libboost-serialization
|
||||
|
||||
- libcurl
|
||||
|
||||
- python >= 2.3 (needed by search engine)
|
||||
- python >= 2.3 (previous might work - not tested): needed by search engine.
|
||||
|
||||
- libmagick++ (advised, not required)
|
||||
* Needed for favicons support (RSS / Search plugins)
|
||||
NOTE FOR GNOME USERS:
|
||||
- qt4-qtconfig package is advised or qBittorrent interface will be ugly
|
||||
|
||||
- libzzip (advised, not required)
|
||||
* Needed for zip support (Search plugins)
|
||||
|
||||
NOTE FOR NON-KDE USERS:
|
||||
- qt4-qtconfig package is advised when using other systems than KDE.
|
||||
You can also change qBittorrent style to Cleanlooks (GNOME like)
|
||||
|
||||
DOCUMENTATION:
|
||||
Please note that there is a documentation with a "compiling howto" at http://wiki.qbittorrent.org.
|
||||
|
||||
------------------------------------------
|
||||
Christophe Dumez <chris@qbittorrent.org>
|
||||
|
||||
16
README
@@ -1,32 +1,32 @@
|
||||
qBittorrent - A BitTorrent client in Qt4
|
||||
qBittorrent - A BitTorrent client in Qt4.2
|
||||
------------------------------------------
|
||||
|
||||
Description:
|
||||
********************************
|
||||
qBittorrent is a bittorrent client programmed in C++ / Qt4 that uses
|
||||
libtorrent (sometimes called rblibtorrent) by Arvid Norberg.
|
||||
qBittorrent is a bittorrent client programmed in C++ / Qt4.2 that use
|
||||
libtorrent (sometimes called rb_libtorrent) by Arvid Norberg.
|
||||
|
||||
It aims to be a good alternative to all other bittorrent clients
|
||||
out there. qBittorrent is fast, stable and provides unicode
|
||||
support as well as many features.
|
||||
support.
|
||||
|
||||
Installation:
|
||||
********************************
|
||||
For installation, follow the instructions from INSTALL file, but simple:
|
||||
For installation follow the instructions from INSTALL file, but simple
|
||||
|
||||
./configure
|
||||
make && make install
|
||||
qbittorrent
|
||||
|
||||
will install and execute qBittorrent hopefully without any problem.
|
||||
will install and execute qBittorrent hopefully without any problems.
|
||||
|
||||
For more information please visit:
|
||||
http://www.qbittorrent.org
|
||||
|
||||
Please report any bug (or feature request) to:
|
||||
Please report any bug (or feature requests) to:
|
||||
http://bugs.qbittorrent.org
|
||||
|
||||
You can also meet me (chris-qBT) on IRC:
|
||||
You can also meet me on IRC:
|
||||
#qbittorrent on irc.freenode.net
|
||||
|
||||
------------------------------------------
|
||||
|
||||
61
TODO
@@ -1,22 +1,41 @@
|
||||
See https://blueprints.launchpad.net/qbittorrent/
|
||||
// Easy
|
||||
- Write documentation
|
||||
- Translations into as many languages as possible
|
||||
- Improve man page
|
||||
- Add more keyboard shortcuts
|
||||
|
||||
Translations updated in v1.1.0:
|
||||
- French
|
||||
- Chinese
|
||||
- Polish
|
||||
- Portuguese
|
||||
- Brazilian
|
||||
- Slovak
|
||||
- Swedish
|
||||
- Romanian
|
||||
- Finnish
|
||||
- Italian
|
||||
- Turkish
|
||||
- Korean
|
||||
- Hungarian
|
||||
- German
|
||||
- Spanish
|
||||
- Russian
|
||||
- Dutch
|
||||
- Bulgarian
|
||||
- Greek
|
||||
// Intermediate
|
||||
- Port on MacOS, Windows (and create an installer for Windows) - Progressing
|
||||
- Add some transparency (menus,...)
|
||||
- Add upnp port forwarding support
|
||||
|
||||
// Harder
|
||||
- Allow user to organize the downloads into categories/folders
|
||||
- Display new searches in new tabs
|
||||
- Display a progress bar that really displays the pieces we have (like in eMule)
|
||||
|
||||
// Waiting for libtorrent
|
||||
- Encryption support (v0.13?)
|
||||
- File selection in a torrent in compact mode
|
||||
- Allow to prioritize files within a torrent
|
||||
- Allow to prioritize torrents
|
||||
|
||||
// Unsure
|
||||
- Azureus spoofing to prevent ban from trackers?
|
||||
- Web interface?
|
||||
- Use downloader class to download search plugin updates
|
||||
- Allow to set upload limit for each torrent
|
||||
- Option to shutdown computer when downloads are finished
|
||||
- Add a torrent scheduler
|
||||
|
||||
// in v1.0.0 (partial)
|
||||
- Download from RSS feeds (WIP by gtsoul)
|
||||
- Move finished torrent to another tab and keep on seeding them even after restart
|
||||
- Allow to edit the trackers for a torrent
|
||||
- Improve torrent creation dialog (look & features)
|
||||
- Add IPv6 support (at least start working on it)
|
||||
- UPnP support?
|
||||
|
||||
// In v0.9.0
|
||||
- Update translations (FR, SV, NB, PL, RU, DE, SK, KO, ZH_CN, EL, BG, ES, DA, UK, PT, IT, NL done)
|
||||
- Wait for libtorrent v0.12 official release
|
||||
|
||||
439
configure
vendored
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Generated by qconf 1.4 ( http://delta.affinix.com/qconf/ )
|
||||
# Generated by qconf 1.3 ( http://delta.affinix.com/qconf/ )
|
||||
#
|
||||
|
||||
show_usage() {
|
||||
@@ -18,20 +18,11 @@ Main options:
|
||||
--help This help text.
|
||||
|
||||
Dependency options:
|
||||
--with-libtorrent-inc=[path] Path to libtorrent-rasterbar include
|
||||
files
|
||||
--with-libtorrent-lib=[path] Path to libtorrent-rasterbar library
|
||||
files
|
||||
--with-libtorrent-static-lib=[path] Path to libtorrent-rasterbar .a file
|
||||
--with-libboost-inc=[path] Path to libboost include files
|
||||
--with-libcurl-inc=[path] Path to libcurl include files
|
||||
--with-libcurl-lib=[path] Path to libcurl library files
|
||||
--disable-libmagick Disable use of libmagick
|
||||
--with-libmagick-inc=[path] Path to libmagick++ include files
|
||||
--with-libmagick-lib=[path] Path to libmagick++ library files
|
||||
--disable-libzzip Disable use of libzzip
|
||||
--with-libzzip-inc=[path] Path to libzzip++ include files
|
||||
--with-libzzip-lib=[path] Path to libzzip++ library files
|
||||
--with-libtorrent-inc=[path] Path to libtorrent include files
|
||||
--with-libtorrent-lib=[path] Path to libtorrent library files
|
||||
--with-libboost-inc=[path] Path to libboost include files
|
||||
--with-libcurl-inc=[path] Path to libcurl include files
|
||||
--with-libcurl-lib=[path] Path to libcurl library files
|
||||
|
||||
EOT
|
||||
}
|
||||
@@ -158,11 +149,6 @@ while [ $# -gt 0 ]; do
|
||||
shift
|
||||
;;
|
||||
|
||||
--with-libtorrent-static-lib=*)
|
||||
QC_WITH_LIBTORRENT_STATIC_LIB=$optarg
|
||||
shift
|
||||
;;
|
||||
|
||||
--with-libboost-inc=*)
|
||||
QC_WITH_LIBBOOST_INC=$optarg
|
||||
shift
|
||||
@@ -178,38 +164,8 @@ while [ $# -gt 0 ]; do
|
||||
shift
|
||||
;;
|
||||
|
||||
--disable-libmagick)
|
||||
QC_DISABLE_libmagick="Y"
|
||||
shift
|
||||
;;
|
||||
|
||||
--with-libmagick-inc=*)
|
||||
QC_WITH_LIBMAGICK_INC=$optarg
|
||||
shift
|
||||
;;
|
||||
|
||||
--with-libmagick-lib=*)
|
||||
QC_WITH_LIBMAGICK_LIB=$optarg
|
||||
shift
|
||||
;;
|
||||
|
||||
--disable-libzzip)
|
||||
QC_DISABLE_libzzip="Y"
|
||||
shift
|
||||
;;
|
||||
|
||||
--with-libzzip-inc=*)
|
||||
QC_WITH_LIBZZIP_INC=$optarg
|
||||
shift
|
||||
;;
|
||||
|
||||
--with-libzzip-lib=*)
|
||||
QC_WITH_LIBZZIP_LIB=$optarg
|
||||
shift
|
||||
;;
|
||||
|
||||
--verbose)
|
||||
QC_VERBOSE="Y"
|
||||
QC_DEBUG="Y"
|
||||
shift
|
||||
;;
|
||||
--help) show_usage; exit ;;
|
||||
@@ -223,7 +179,7 @@ DATADIR=${DATADIR:-$PREFIX/share}
|
||||
|
||||
echo "Configuring qbittorrent ..."
|
||||
|
||||
if [ "$QC_VERBOSE" = "Y" ]; then
|
||||
if [ "$QC_DEBUG" = "Y" ]; then
|
||||
echo
|
||||
echo PREFIX=$PREFIX
|
||||
echo BINDIR=$BINDIR
|
||||
@@ -231,65 +187,39 @@ echo DATADIR=$DATADIR
|
||||
echo EX_QTDIR=$EX_QTDIR
|
||||
echo QC_WITH_LIBTORRENT_INC=$QC_WITH_LIBTORRENT_INC
|
||||
echo QC_WITH_LIBTORRENT_LIB=$QC_WITH_LIBTORRENT_LIB
|
||||
echo QC_WITH_LIBTORRENT_STATIC_LIB=$QC_WITH_LIBTORRENT_STATIC_LIB
|
||||
echo QC_WITH_LIBBOOST_INC=$QC_WITH_LIBBOOST_INC
|
||||
echo QC_WITH_LIBCURL_INC=$QC_WITH_LIBCURL_INC
|
||||
echo QC_WITH_LIBCURL_LIB=$QC_WITH_LIBCURL_LIB
|
||||
echo QC_DISABLE_libmagick=$QC_DISABLE_libmagick
|
||||
echo QC_WITH_LIBMAGICK_INC=$QC_WITH_LIBMAGICK_INC
|
||||
echo QC_WITH_LIBMAGICK_LIB=$QC_WITH_LIBMAGICK_LIB
|
||||
echo QC_DISABLE_libzzip=$QC_DISABLE_libzzip
|
||||
echo QC_WITH_LIBZZIP_INC=$QC_WITH_LIBZZIP_INC
|
||||
echo QC_WITH_LIBZZIP_LIB=$QC_WITH_LIBZZIP_LIB
|
||||
echo
|
||||
fi
|
||||
|
||||
printf "Verifying Qt 4 build environment ... "
|
||||
|
||||
# run qmake -v and check version
|
||||
qmake_check_v4() {
|
||||
if [ -x "$1" ]; then
|
||||
if echo `$1 -v 2>&1` | grep "Qt version 4\." >/dev/null 2>&1; then
|
||||
return 0
|
||||
elif [ "$QC_VERBOSE" = "Y" ]; then
|
||||
echo "Warning: $1 not for Qt 4"
|
||||
fi
|
||||
fi
|
||||
return 1
|
||||
}
|
||||
|
||||
if [ "$QC_VERBOSE" = "Y" ]; then
|
||||
if [ "$QC_DEBUG" = "Y" ]; then
|
||||
echo
|
||||
fi
|
||||
|
||||
qm=""
|
||||
names="qmake-qt4 qmake4 qmake"
|
||||
|
||||
# qt4 check: --qtdir
|
||||
if [ -z "$qm" ] && [ ! -z "$EX_QTDIR" ]; then
|
||||
for n in $names; do
|
||||
qstr=$EX_QTDIR/bin/$n
|
||||
if qmake_check_v4 "$qstr"; then
|
||||
qm=$qstr
|
||||
break;
|
||||
fi
|
||||
done
|
||||
if [ -z "$qm" ]; then
|
||||
qstr=$EX_QTDIR/bin/qmake
|
||||
if [ -x "$qstr" ]; then
|
||||
qm=$qstr
|
||||
fi
|
||||
fi
|
||||
if [ -z "$qm" ] && [ "$QC_VERBOSE" = "Y" ]; then
|
||||
if [ -z "$qm" ] && [ "$QC_DEBUG" = "Y" ]; then
|
||||
echo "Warning: qmake not found via --qtdir"
|
||||
fi
|
||||
|
||||
# qt4 check: QTDIR
|
||||
if [ -z "$qm" ] && [ ! -z "$QTDIR" ]; then
|
||||
for n in $names; do
|
||||
qstr=$QTDIR/bin/$n
|
||||
if qmake_check_v4 "$qstr"; then
|
||||
qm=$qstr
|
||||
break;
|
||||
fi
|
||||
done
|
||||
if [ -z "$qm" ]; then
|
||||
qstr=$QTDIR/bin/qmake
|
||||
if [ -x "$qstr" ]; then
|
||||
qm=$qstr
|
||||
fi
|
||||
fi
|
||||
if [ -z "$qm" ] && [ "$QC_VERBOSE" = "Y" ]; then
|
||||
if [ -z "$qm" ] && [ "$QC_DEBUG" = "Y" ]; then
|
||||
echo "Warning: qmake not found via \$QTDIR"
|
||||
fi
|
||||
|
||||
@@ -297,93 +227,86 @@ fi
|
||||
if [ -z "$qm" ]; then
|
||||
str=`pkg-config QtCore --variable=exec_prefix 2>/dev/null`
|
||||
if [ ! -z "$str" ]; then
|
||||
for n in $names; do
|
||||
qstr=$str/bin/$n
|
||||
if qmake_check_v4 "$qstr"; then
|
||||
qm=$qstr
|
||||
break;
|
||||
fi
|
||||
done
|
||||
qstr=$str/bin/qmake
|
||||
if [ -x "$qstr" ]; then
|
||||
qm=$qstr
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if [ -z "$qm" ] && [ "$QC_VERBOSE" = "Y" ]; then
|
||||
if [ -z "$qm" ] && [ "$QC_DEBUG" = "Y" ]; then
|
||||
echo "Warning: qmake not found via pkg-config"
|
||||
fi
|
||||
|
||||
# qt4 check: PATH
|
||||
if [ -z "$qm" ]; then
|
||||
for n in $names; do
|
||||
qstr=`$WHICH $n 2>/dev/null`
|
||||
if qmake_check_v4 "$qstr"; then
|
||||
qm=$qstr
|
||||
break;
|
||||
fi
|
||||
done
|
||||
qstr=`$WHICH qmake 2>/dev/null`
|
||||
if [ -x "$qstr" ]; then
|
||||
qm=$qstr
|
||||
fi
|
||||
fi
|
||||
if [ -z "$qm" ] && [ "$QC_VERBOSE" = "Y" ]; then
|
||||
if [ -z "$qm" ] && [ "$QC_DEBUG" = "Y" ]; then
|
||||
echo "Warning: qmake not found via \$PATH"
|
||||
fi
|
||||
|
||||
if [ -z "$qm" ]; then
|
||||
if [ "$QC_VERBOSE" = "Y" ]; then
|
||||
if [ "$QC_DEBUG" = "Y" ]; then
|
||||
echo " -> fail"
|
||||
else
|
||||
echo "fail"
|
||||
fi
|
||||
printf "\n"
|
||||
printf "Reason: Unable to find the 'qmake' tool for Qt 4.\n"
|
||||
printf "Reason: Unable to find the 'qmake' tool.\n"
|
||||
printf "\n"
|
||||
show_qt_info
|
||||
exit 1;
|
||||
fi
|
||||
if [ "$QC_VERBOSE" = "Y" ]; then
|
||||
if [ "$QC_DEBUG" = "Y" ]; then
|
||||
echo qmake found in $qm
|
||||
fi
|
||||
|
||||
gen_files() {
|
||||
cat >$1/modules.cpp <<EOT
|
||||
#line 1 "qt4.qcm"
|
||||
#line 1 "qt42.qcm"
|
||||
/*
|
||||
-----BEGIN QCMOD-----
|
||||
name: Qt >= 4.3
|
||||
name: Qt >= 4.2
|
||||
-----END QCMOD-----
|
||||
*/
|
||||
class qc_qt4 : public ConfObj
|
||||
class qc_qt42 : public ConfObj
|
||||
{
|
||||
public:
|
||||
qc_qt4(Conf *c) : ConfObj(c) {}
|
||||
QString name() const { return "Qt >= 4.3"; }
|
||||
QString shortname() const { return "Qt 4.3"; }
|
||||
qc_qt42(Conf *c) : ConfObj(c) {}
|
||||
QString name() const { return "Qt >= 4.2"; }
|
||||
QString shortname() const { return "qt42"; }
|
||||
bool exec()
|
||||
{
|
||||
if(QT_VERSION >= 0x040400) {
|
||||
conf->addDefine("QT_4_4");
|
||||
}
|
||||
return(QT_VERSION >= 0x040300);
|
||||
|
||||
return(QT_VERSION >= 0x040200);
|
||||
}
|
||||
};
|
||||
#line 1 "libtorrent-rasterbar.qcm"
|
||||
#line 1 "libtorrent.qcm"
|
||||
/*
|
||||
-----BEGIN QCMOD-----
|
||||
name: libtorrent-rasterbar
|
||||
arg: with-libtorrent-inc=[path], Path to libtorrent-rasterbar include files
|
||||
arg: with-libtorrent-lib=[path], Path to libtorrent-rasterbar library files
|
||||
arg: with-libtorrent-static-lib=[path], Path to libtorrent-rasterbar .a file
|
||||
name: libtorrent
|
||||
arg: with-libtorrent-inc=[path], Path to libtorrent include files
|
||||
arg: with-libtorrent-lib=[path], Path to libtorrent library files
|
||||
-----END QCMOD-----
|
||||
*/
|
||||
class qc_libtorrent_rasterbar : public ConfObj
|
||||
class qc_libtorrent : public ConfObj
|
||||
{
|
||||
public:
|
||||
qc_libtorrent_rasterbar(Conf *c) : ConfObj(c) {}
|
||||
QString name() const { return "libtorrent-rasterbar >= 0.13"; }
|
||||
QString shortname() const { return "libtorrent-rasterbar"; }
|
||||
qc_libtorrent(Conf *c) : ConfObj(c) {}
|
||||
QString name() const { return "libtorrent >= 0.11 (>= 0.12 ADVISED)"; }
|
||||
QString shortname() const { return "libtorrent"; }
|
||||
bool exec(){
|
||||
QString s;
|
||||
s = conf->getenv("QC_WITH_LIBTORRENT_INC");
|
||||
if(!s.isEmpty()) {
|
||||
if(!conf->checkHeader(s, "libtorrent/lsd.hpp")) {
|
||||
if(!conf->checkHeader(s, "libtorrent/kademlia/node.hpp")){
|
||||
return false;
|
||||
}
|
||||
if(!conf->checkHeader(s, "libtorrent/extensions/ut_pex.hpp")) {
|
||||
qWarning("Libtorrent >= v0.12 was not detected, PeX will be disabled.");
|
||||
conf->addDefine("NO_PEX");
|
||||
}
|
||||
}else{
|
||||
QStringList sl;
|
||||
@@ -391,39 +314,33 @@ public:
|
||||
sl << "/usr/local/include";
|
||||
bool found = false;
|
||||
foreach(s, sl){
|
||||
if(conf->checkHeader(s, "libtorrent/lsd.hpp")){
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
if(conf->checkHeader(s, "libtorrent/kademlia/node.hpp")){
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!found) {
|
||||
return false;
|
||||
}
|
||||
if(!found) return false;
|
||||
if(!conf->checkHeader(s, "libtorrent/extensions/ut_pex.hpp")){
|
||||
qWarning("Libtorrent >= v0.12 was not detected, PeX will be disabled.");
|
||||
conf->addDefine("NO_PEX");
|
||||
}
|
||||
}
|
||||
conf->addIncludePath(s);
|
||||
conf->addIncludePath(s+QDir::separator()+"libtorrent");
|
||||
|
||||
s = conf->getenv("QC_WITH_LIBTORRENT_STATIC_LIB");
|
||||
if(!s.isEmpty() && QFile::exists(s) && s.endsWith(".a")){
|
||||
conf->addLib(s);
|
||||
return true;
|
||||
}
|
||||
|
||||
s = conf->getenv("QC_WITH_LIBTORRENT_LIB");
|
||||
if(!s.isEmpty()) {
|
||||
if(!conf->checkLibrary(s, "torrent-rasterbar")) {
|
||||
if(!conf->checkLibrary(s, "torrent")) {
|
||||
return false;
|
||||
}
|
||||
conf->addLib(QString("-L") + s);
|
||||
}else{
|
||||
QStringList sl;
|
||||
sl << "/usr/lib/";
|
||||
sl << "/usr/lib64/";
|
||||
sl << "/usr/local/lib/";
|
||||
sl << "/usr/local/lib64/";
|
||||
bool found = false;
|
||||
foreach(s, sl){
|
||||
if(conf->checkLibrary(s, "torrent-rasterbar")){
|
||||
if(conf->checkLibrary(s, "torrent")){
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
@@ -431,6 +348,7 @@ public:
|
||||
if(!found) return false;
|
||||
conf->addLib(QString("-L") + s);
|
||||
}
|
||||
//conf->addLib("-ltorrent");
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -494,7 +412,7 @@ public:
|
||||
#line 1 "libcurl.qcm"
|
||||
/*
|
||||
-----BEGIN QCMOD-----
|
||||
name: libcommoncpp2
|
||||
name: libcurl
|
||||
arg: with-libcurl-inc=[path], Path to libcurl include files
|
||||
arg: with-libcurl-lib=[path], Path to libcurl library files
|
||||
-----END QCMOD-----
|
||||
@@ -506,12 +424,12 @@ public:
|
||||
QString name() const { return "libcurl"; }
|
||||
QString shortname() const { return "libcurl"; }
|
||||
bool exec(){
|
||||
QString s;
|
||||
QString s;
|
||||
s = conf->getenv("QC_WITH_LIBCURL_INC");
|
||||
if(!s.isEmpty()) {
|
||||
if(!conf->checkHeader(s, "curl/curl.h")) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
QStringList sl;
|
||||
sl << "/usr/include";
|
||||
@@ -525,24 +443,23 @@ public:
|
||||
}
|
||||
if(!found) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
conf->addIncludePath(s);
|
||||
|
||||
s = conf->getenv("QC_WITH_LIBCURL_LIB");
|
||||
if(!s.isEmpty()) {
|
||||
if(!QFile::exists(s+QString("/libcurl.so")))
|
||||
return false;
|
||||
conf->addLib(QString("-L") + s);
|
||||
if(!conf->checkLibrary(s, "curl")) {
|
||||
return false;
|
||||
}
|
||||
conf->addLib(QString("-L") + s);
|
||||
}else{
|
||||
QStringList sl;
|
||||
sl << "/usr/lib/";
|
||||
sl << "/usr/lib64/";
|
||||
sl << "/usr/local/lib/";
|
||||
sl << "/usr/local/lib64/";
|
||||
bool found = false;
|
||||
foreach(s, sl){
|
||||
if(QFile::exists(s+QString("libcurl.so"))){
|
||||
if(conf->checkLibrary(s, "curl")){
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
@@ -550,168 +467,37 @@ public:
|
||||
if(!found) return false;
|
||||
conf->addLib(QString("-L") + s);
|
||||
}
|
||||
conf->addLib("-lcurl");
|
||||
return true;
|
||||
}
|
||||
};
|
||||
#line 1 "libmagick.qcm"
|
||||
#line 1 "python.qcm"
|
||||
/*
|
||||
-----BEGIN QCMOD-----
|
||||
name: libmagick
|
||||
arg: with-libmagick-inc=[path], Path to libmagick++ include files
|
||||
arg: with-libmagick-lib=[path], Path to libmagick++ library files
|
||||
name: python
|
||||
-----END QCMOD-----
|
||||
*/
|
||||
#include <QProcess>
|
||||
class qc_libmagick : public ConfObj
|
||||
class qc_python : public ConfObj
|
||||
{
|
||||
public:
|
||||
qc_libmagick(Conf *c) : ConfObj(c) {}
|
||||
QString name() const { return "ImageMagick library (libmagick++)"; }
|
||||
QString shortname() const { return "libmagick++"; }
|
||||
QString checkString() const {
|
||||
if(!conf->getenv("QC_DISABLE_libmagick").isEmpty())
|
||||
return "";
|
||||
return ConfObj::checkString();
|
||||
}
|
||||
qc_python(Conf *c) : ConfObj(c) {}
|
||||
QString name() const { return "python >= 2.3"; }
|
||||
QString shortname() const { return "python"; }
|
||||
bool exec(){
|
||||
if(!conf->getenv("QC_DISABLE_libmagick").isEmpty())
|
||||
return false;
|
||||
QString s;
|
||||
s = conf->getenv("QC_WITH_LIBMAGICK_INC");
|
||||
if(!s.isEmpty()) {
|
||||
if(!conf->checkHeader(s, "Magick++.h")) {
|
||||
return false;
|
||||
}
|
||||
}else{
|
||||
QStringList sl;
|
||||
sl << "/usr/include";
|
||||
sl << "/usr/local/include";
|
||||
bool found = false;
|
||||
foreach(s, sl){
|
||||
if(conf->checkHeader(s, "Magick++.h")){
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!found)
|
||||
return false;
|
||||
}
|
||||
conf->addIncludePath(s);
|
||||
|
||||
s = conf->getenv("QC_WITH_LIBMAGICK_LIB");
|
||||
if(!s.isEmpty()) {
|
||||
if(!conf->checkLibrary(s, "Magick++")) {
|
||||
return false;
|
||||
}
|
||||
}else{
|
||||
QStringList sl;
|
||||
sl << "/usr/lib/";
|
||||
sl << "/usr/lib64/";
|
||||
sl << "/usr/local/lib/";
|
||||
sl << "/usr/local/lib64/";
|
||||
bool found = false;
|
||||
foreach(s, sl){
|
||||
if(conf->checkLibrary(s, "Magick++")) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!found)
|
||||
return false;
|
||||
}
|
||||
conf->addLib(QString("-L") + s);
|
||||
QProcess magickConfig;
|
||||
QStringList params;
|
||||
params << "--libs";
|
||||
magickConfig.start("Magick++-config", params, QIODevice::ReadOnly);
|
||||
magickConfig.waitForStarted();
|
||||
magickConfig.waitForFinished();
|
||||
QByteArray result = magickConfig.readAll();
|
||||
result = result.replace("\n", "");
|
||||
conf->addLib(result.data());
|
||||
conf->addDefine("HAVE_MAGICK");
|
||||
return true;
|
||||
}
|
||||
};
|
||||
#line 1 "libzzip.qcm"
|
||||
/*
|
||||
-----BEGIN QCMOD-----
|
||||
name: libzzip
|
||||
arg: with-libzzip-inc=[path], Path to libzzip++ include files
|
||||
arg: with-libzzip-lib=[path], Path to libzzip++ library files
|
||||
-----END QCMOD-----
|
||||
*/
|
||||
#include <QProcess>
|
||||
class qc_libzzip : public ConfObj
|
||||
{
|
||||
public:
|
||||
qc_libzzip(Conf *c) : ConfObj(c) {}
|
||||
QString name() const { return "Zzip library (libzzip)"; }
|
||||
QString shortname() const { return "libzzip"; }
|
||||
QString checkString() const {
|
||||
if(!conf->getenv("QC_DISABLE_LIBZZIP").isEmpty())
|
||||
return "";
|
||||
return ConfObj::checkString();
|
||||
}
|
||||
bool exec(){
|
||||
if(!conf->getenv("QC_DISABLE_LIBZZIP").isEmpty())
|
||||
return false;
|
||||
QString s;
|
||||
s = conf->getenv("QC_WITH_LIBZZIP_INC");
|
||||
if(!s.isEmpty()) {
|
||||
if(!conf->checkHeader(s, "zzip/zzip.h")) {
|
||||
return false;
|
||||
}
|
||||
}else{
|
||||
QStringList sl;
|
||||
sl << "/usr/include";
|
||||
sl << "/usr/local/include";
|
||||
bool found = false;
|
||||
foreach(s, sl){
|
||||
if(conf->checkHeader(s, "zzip/zzip.h")){
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!found)
|
||||
return false;
|
||||
}
|
||||
conf->addIncludePath(s);
|
||||
|
||||
s = conf->getenv("QC_WITH_LIBZZIP_LIB");
|
||||
if(!s.isEmpty()) {
|
||||
if(!QFile::exists(s+QString("/libzzip.so"))){
|
||||
return false;
|
||||
}
|
||||
}else{
|
||||
QStringList sl;
|
||||
sl << "/usr/lib/";
|
||||
sl << "/usr/lib64/";
|
||||
sl << "/usr/local/lib/";
|
||||
sl << "/usr/local/lib64/";
|
||||
bool found = false;
|
||||
foreach(s, sl){
|
||||
if(QFile::exists(s+QString("libzzip.so"))){
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!found)
|
||||
return false;
|
||||
}
|
||||
conf->addLib(QString("-L") + s);
|
||||
conf->addLib("-lzzip");
|
||||
conf->addDefine("HAVE_ZZIP");
|
||||
return true;
|
||||
int r = conf->doCommand("python testpython.py");
|
||||
if(r == 0)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
EOT
|
||||
cat >$1/modules_new.cpp <<EOT
|
||||
o = new qc_qt4(conf);
|
||||
o = new qc_qt42(conf);
|
||||
o->required = true;
|
||||
o->disabled = false;
|
||||
o = new qc_libtorrent_rasterbar(conf);
|
||||
o = new qc_libtorrent(conf);
|
||||
o->required = true;
|
||||
o->disabled = false;
|
||||
o = new qc_libboost(conf);
|
||||
@@ -720,17 +506,12 @@ cat >$1/modules_new.cpp <<EOT
|
||||
o = new qc_libcurl(conf);
|
||||
o->required = true;
|
||||
o->disabled = false;
|
||||
o = new qc_libmagick(conf);
|
||||
o->required = false;
|
||||
o->disabled = false;
|
||||
o = new qc_libzzip(conf);
|
||||
o->required = false;
|
||||
o = new qc_python(conf);
|
||||
o->required = true;
|
||||
o->disabled = false;
|
||||
|
||||
EOT
|
||||
cat >$1/conf4.h <<EOT
|
||||
// For license information, see the COPYING file in the qconf base directory.
|
||||
|
||||
#ifndef QC_CONF4_H
|
||||
#define QC_CONF4_H
|
||||
|
||||
@@ -835,8 +616,6 @@ private:
|
||||
|
||||
EOT
|
||||
cat >$1/conf4.cpp <<EOT
|
||||
// For license information, see the COPYING file in the qconf base directory.
|
||||
|
||||
#include "conf4.h"
|
||||
|
||||
#include <stdio.h>
|
||||
@@ -987,18 +766,6 @@ void qc_splitcflags(const QString &cflags, QStringList *incs, QStringList *other
|
||||
}
|
||||
}
|
||||
|
||||
QString qc_escapeArg(const QString &str)
|
||||
{
|
||||
QString out;
|
||||
for(int n = 0; n < (int)str.length(); ++n) {
|
||||
if(str[n] == '-')
|
||||
out += '_';
|
||||
else
|
||||
out += str[n];
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// ConfObj
|
||||
//----------------------------------------------------------------------------
|
||||
@@ -1115,14 +882,14 @@ bool Conf::exec()
|
||||
// if this was a disabled-by-default option, check if it was enabled
|
||||
if(o->disabled)
|
||||
{
|
||||
QString v = QString("QC_ENABLE_") + qc_escapeArg(o->shortname());
|
||||
QString v = QString("QC_ENABLE_") + o->shortname();
|
||||
if(getenv(v) != "Y")
|
||||
continue;
|
||||
}
|
||||
// and the opposite?
|
||||
else
|
||||
{
|
||||
QString v = QString("QC_DISABLE_") + qc_escapeArg(o->shortname());
|
||||
QString v = QString("QC_DISABLE_") + o->shortname();
|
||||
if(getenv(v) == "Y")
|
||||
continue;
|
||||
}
|
||||
@@ -1549,7 +1316,7 @@ int main()
|
||||
# include"modules_new.cpp"
|
||||
#endif
|
||||
|
||||
conf->debug_enabled = (qc_getenv("QC_VERBOSE") == "Y") ? true: false;
|
||||
conf->debug_enabled = (qc_getenv("QC_DEBUG") == "Y") ? true: false;
|
||||
if(conf->debug_enabled)
|
||||
printf(" -> ok\n");
|
||||
else
|
||||
@@ -1605,9 +1372,6 @@ int main()
|
||||
var = qc_getenv("BINDIR");
|
||||
if(!var.isEmpty())
|
||||
str += QString("BINDIR = %1\n").arg(var);
|
||||
var = qc_getenv("INCDIR");
|
||||
if(!var.isEmpty())
|
||||
str += QString("INCDIR = %1\n").arg(var);
|
||||
var = qc_getenv("LIBDIR");
|
||||
if(!var.isEmpty())
|
||||
str += QString("LIBDIR = %1\n").arg(var);
|
||||
@@ -1673,17 +1437,10 @@ export DATADIR
|
||||
export EX_QTDIR
|
||||
export QC_WITH_LIBTORRENT_INC
|
||||
export QC_WITH_LIBTORRENT_LIB
|
||||
export QC_WITH_LIBTORRENT_STATIC_LIB
|
||||
export QC_WITH_LIBBOOST_INC
|
||||
export QC_WITH_LIBCURL_INC
|
||||
export QC_WITH_LIBCURL_LIB
|
||||
export QC_DISABLE_libmagick
|
||||
export QC_WITH_LIBMAGICK_INC
|
||||
export QC_WITH_LIBMAGICK_LIB
|
||||
export QC_DISABLE_libzzip
|
||||
export QC_WITH_LIBZZIP_INC
|
||||
export QC_WITH_LIBZZIP_LIB
|
||||
export QC_VERBOSE
|
||||
export QC_DEBUG
|
||||
rm -rf .qconftemp
|
||||
(
|
||||
mkdir .qconftemp
|
||||
@@ -1696,7 +1453,7 @@ rm -rf .qconftemp
|
||||
|
||||
if [ "$?" != "0" ]; then
|
||||
rm -rf .qconftemp
|
||||
if [ "$QC_VERBOSE" = "Y" ]; then
|
||||
if [ "$QC_DEBUG" = "Y" ]; then
|
||||
echo " -> fail"
|
||||
else
|
||||
echo "fail"
|
||||
@@ -1705,7 +1462,7 @@ if [ "$?" != "0" ]; then
|
||||
printf "Reason: There was an error compiling 'conf'. See conf.log for details.\n"
|
||||
printf "\n"
|
||||
show_qt_info
|
||||
if [ "$QC_VERBOSE" = "Y" ]; then
|
||||
if [ "$QC_DEBUG" = "Y" ]; then
|
||||
echo "conf.log:"
|
||||
cat conf.log
|
||||
fi
|
||||
@@ -1729,7 +1486,7 @@ if [ "$ret" = "1" ]; then
|
||||
else
|
||||
if [ "$ret" != "0" ]; then
|
||||
rm -rf .qconftemp
|
||||
if [ "$QC_VERBOSE" = "Y" ]; then
|
||||
if [ "$QC_DEBUG" = "Y" ]; then
|
||||
echo " -> fail"
|
||||
else
|
||||
echo "fail"
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
.\" This manpage has been automatically generated by docbook2man
|
||||
.\" from a DocBook document. This tool can be found at:
|
||||
.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/>.
|
||||
.TH "QBITTORRENT" "1" "September 1st 2007" "Bittorrent client written in C++ / Qt4" ""
|
||||
|
||||
.SH NAME
|
||||
qBittorrent \- a Bittorrent client written in C++ / Qt4
|
||||
.SH SYNOPSIS
|
||||
|
||||
\fBqbittorrent\fR [FILE | URL] [FILE | URL...]
|
||||
|
||||
\fBqbittorrent\fR \-\-help
|
||||
|
||||
\fBqbittorrent\fR \-\-version
|
||||
.PP
|
||||
.SH "DESCRIPTION"
|
||||
|
||||
\fBqBittorrent\fR is an advanced Bittorrent client written in C++ / Qt4,
|
||||
using the \fBrblibtorrent\fR library by Arvid Norberg. qBittorrent aims
|
||||
to be a good alternative to all other bittorrent clients out there. qBittorrent
|
||||
is fast, stable, light, it supports unicode and it provides a good integrated search engine.
|
||||
It also comes with UPnP port forwarding / NAT-PMP, encryption (Azureus compatible), FAST extension (mainline) and PeX support (utorrent compatible).
|
||||
|
||||
Please report any problem to http://bugs.qbittorrent.org
|
||||
.PP
|
||||
.SH "AUTHOR"
|
||||
|
||||
Christophe Dumez <chris@qbittorrent.org>
|
||||
BIN
doc/qbittorrent.1.gz
Normal file
134
packaging/debian-unstable/debian/changelog
Normal file
@@ -0,0 +1,134 @@
|
||||
qbittorrent (0.6.1-1) unstable; urgency=low
|
||||
|
||||
* Disabled debug mode
|
||||
|
||||
-- Christophe Dumez <chris@qbittorrent.org> Mon, 28 Aug 2006 21:22:48 +0200
|
||||
|
||||
qbittorrent (0.6.1-0) unstable; urgency=low
|
||||
* BUGFIX: Fixed possible segfaults when using context menus
|
||||
* BUGFIX: Cleanup up context menus code
|
||||
* BUGFIX: Used best gzip compressing for manpage
|
||||
|
||||
-- Christophe Dumez <chris@qbittorrent.org> Thu, 24 Aug 2006 19:53:32 +0200
|
||||
|
||||
qbittorrent (0.6.0) unstable; urgency=low
|
||||
* FEATURE: Rewritten the download list from scratch (more flexible)
|
||||
* FEATURE: Rewritten the search results list from scratch (more flexible)
|
||||
* FEATURE: Rewritten the torrent properties list from scratch (more flexible)
|
||||
* FEATURE: Improved and cleaned up search engine code
|
||||
* FEATURE: Search results are now displayed in real time (not sequentially)
|
||||
* FEATURE: Added two command lines parameters (--version, --help)
|
||||
* FEATURE: Added a popup menu for download list
|
||||
* FEATURE: Double-click on an item now toggles the paused state of a download
|
||||
* FEATURE: Improved code to be more portable (Windows & MacOS versions should arrive soon)
|
||||
* FEATURE: Allow to toggle selected state of a file within a torrent using double-click
|
||||
* FEATURE: Remember columns width in download and search results lists
|
||||
* BUGFIX: Don't use pkg-config for libcurl anymore (easier to compile)
|
||||
* BUGFIX: Fixed ETA calculation when downloading while connecting
|
||||
* BUGFIX: Download progress is now displayed correctly during first seconds of execution (was 0% before)
|
||||
* BUGFIX: Code cleanup & optimization
|
||||
* BUGFIX: Fixed sorting in download list
|
||||
* BUGFIX: Fixed sorting in search results list
|
||||
* BUGFIX: Fixed Parameters passing between instances
|
||||
* BUGFIX: Fixed missing icon for clear action in infoBar popup menu
|
||||
* BUGFIX: Fixed truncated lines in search results
|
||||
* BUGFIX: Don't refresh download list when user is in search tab (save CPU)
|
||||
* BUGFIX: Don't update Progress/DL Speed/ETA for finished downloads (save CPU)
|
||||
* BUGFIX: Save selected search engines only when they have changed (faster program exit)
|
||||
* COSMETIC: Increased icon size in toolbar from 24px to 32px
|
||||
* COSMETIC: Display a progress bar to visualize each download progress
|
||||
* COSMETIC: Size of each result in search are displayed in user friendly units
|
||||
* COSMETIC: Display a progress bar to visualize each file progress within a torrent
|
||||
* COSMETIC: Renamed 'ratio' to 'Session ratio' (makes more sense)
|
||||
* COSMETIC: Improved layout of torrent properties window when maximized
|
||||
* COSMETIC: Now number of search results is updated in real time
|
||||
* COSMETIC: Remember last window size
|
||||
* COSMETIC: Improved splash screen look
|
||||
* COSMETIC: Improved default width of columns in download and search results lists
|
||||
|
||||
-- Christophe Dumez <chris@qbittorrent.org> Wed, 22 Aug 2006 10:42:37 +0200
|
||||
|
||||
qbittorrent (0.5.0) unstable; urgency=low
|
||||
* Improved "Download from url" feature (now supports https, ftp & redirections)
|
||||
* Added a torrent creation tool
|
||||
* Display progress for each file within a torrent
|
||||
* Based on new libtorrent v0.10 (lot of improvements)
|
||||
* Now possible to clear log textbox (popup menu)
|
||||
* Added two search engines (isohunt, torrentreactor)
|
||||
* Now Display share ratio on main window
|
||||
* Use OSD (On Screen Display) when a download or a search is finished
|
||||
* Allow only one instance of qBittorrent (and add new parameters to download list)
|
||||
* Remember last selected search engines in search tab
|
||||
* Improved search engines status output (Aborted, timed out, finished, no results)
|
||||
* qBittorrent can now update search plugin from qbittorrent.org
|
||||
* Added Slovak, Italian, Portuguese, Romanian and Traditional Chinese languages
|
||||
* Fixed ThePirateBay parser for search engine (website had changed)
|
||||
* Fixed filenames for results from ThePirateBay search engine
|
||||
* Fixed unicode support for ThePirateBay search engine
|
||||
* Now search results are sorted by seeds
|
||||
* Overwrite nova.py search plugin only if it is outdated
|
||||
* Fixed possible division by 0 in ETA calculation
|
||||
* Improved ETA calculation precision
|
||||
* Fixed default tab in options
|
||||
* When saving options, reconnect only when listening ports changed
|
||||
* qBittorrent has now its own new logo
|
||||
* Display status "downloading" if DL Speed > 0 (even when tracker is down)
|
||||
* Added a splashscreen
|
||||
* qBittorrent has new cute icons
|
||||
* Display number of results in search tab
|
||||
* Added icons for each item in download list according to its state
|
||||
* Redesigned Locale settings
|
||||
* Fixed search engines names width (were cut on the right)
|
||||
* Moved search engines to the left of the window (better ui)
|
||||
|
||||
-- Christophe Dumez <chris@qbittorrent.org> Wed, 2 Aug 2006 19:46:32 +0200
|
||||
|
||||
qbittorrent (0.4.1) unstable; urgency=low
|
||||
* Not counting "protocol chatter" in UP/DL speed anymore
|
||||
* Download speed is now 0 when download is finished
|
||||
* Paused torrents remain paused when qbittorrent is re-started
|
||||
* Added option "go to systray when minimizing"
|
||||
* Added option "Clear finished downloads on exit"
|
||||
* Added option "Ask user for confirmation on exit"
|
||||
* Added "Stalled" status for downloads (colored in orange, paused are in red and finished in green)
|
||||
* Fixed Search window layout on maximizing
|
||||
* Fixed a bug that caused upload limit not to be always applied
|
||||
* Added Bulgarian translation
|
||||
* Updated Translations
|
||||
* Code optimization
|
||||
|
||||
-- Christophe Dumez <chris@qbittorrent.org> Thu, 22 Jun 2006 20:14:27 +0200
|
||||
|
||||
qbittorrent (0.4.0) unstable; urgency=low
|
||||
|
||||
* Added a search engine (supports Mininova & thepiratebay websites)
|
||||
* Fixed critical bug: some options were not applied correctly to BT session
|
||||
* Possibility to download a torrent file from an URL
|
||||
* Added confirmation dialog on qbittorrent exit
|
||||
* Enabled sorting in Download list
|
||||
* Added Ukrainian translation
|
||||
* Support urls as program parameters
|
||||
* Added more actions to trayicon menu
|
||||
* Fixed exception catching when retrieving fastresume data
|
||||
* use Binary prefix standards from IEC 60027-2 for units (B, KiB, MiB, GiB, TiB)
|
||||
* Iconification to systray when minimizing
|
||||
* Code Cleanup & optimization
|
||||
|
||||
-- Christophe Dumez <chris@qbittorrent.org> Wed, 14 Jun 2006 14:47:27 +0200
|
||||
|
||||
qbittorrent (0.3.1) unstable; urgency=low
|
||||
|
||||
* Fixed toolbar layout (spacing).
|
||||
* Added Russian translation.
|
||||
* Resume also finished files on startup (for seeding).
|
||||
* Added colors corresponding to download state.
|
||||
* Fixed a segfault when deleting a download (if no scan dir is set).
|
||||
|
||||
-- Christophe Dumez <chris@qbittorrent.org> Sat, 6 Jun 2006 21:36:27 +0200
|
||||
|
||||
|
||||
qbittorrent (0.3) unstable; urgency=low
|
||||
|
||||
* Initial Release.
|
||||
|
||||
-- Christophe Dumez <chris@qbittorrent.org> Sat, 3 Jun 2006 21:57:27 +0200
|
||||
1
packaging/debian-unstable/debian/compat
Normal file
@@ -0,0 +1 @@
|
||||
4
|
||||
15
packaging/debian-unstable/debian/control
Normal file
@@ -0,0 +1,15 @@
|
||||
Source: qbittorrent
|
||||
Section: net
|
||||
Priority: optional
|
||||
Maintainer: Christophe Dumez <chris@qbittorrent.org>
|
||||
Build-Depends: debhelper (>= 4.0.0), autotools-dev, libqt4-core (>= 4.1.0), libqt4-dev (>= 4.1.0), libqt4-gui (>= 4.1.0), rb-libtorrent (>= 0.10), libcurl3-dev
|
||||
Standards-Version: 3.6.2
|
||||
|
||||
Package: qbittorrent
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, rb-libtorrent (>= 0.10), python (>= 2.3)
|
||||
Description: Bittorrent client in Qt4.1 / C++
|
||||
qBittorrent is a bittorrent client programmed in C++ / Qt4.1
|
||||
using rb_libtorrent by Arvid Norberg. It aims to be a good
|
||||
alternative to other bittorrent client out there. It is fast,
|
||||
stable and provides unicode support.
|
||||
26
packaging/debian-unstable/debian/copyright
Normal file
@@ -0,0 +1,26 @@
|
||||
This is qbittorrent, written and maintained by Christophe Dumez <chris@qbittorrent.org>
|
||||
on Sat, 3 Jun 2006 21:57:27 +0200.
|
||||
|
||||
The original source can always be found at:
|
||||
ftp://ftp.debian.org/dists/unstable/main/source/
|
||||
|
||||
Copyright (C) 2006 Christophe Dumez
|
||||
|
||||
License:
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this package; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
On Debian systems, the complete text of the GNU General
|
||||
Public License can be found in `/usr/share/common-licenses/GPL'.
|
||||
2
packaging/debian-unstable/debian/dirs
Normal file
@@ -0,0 +1,2 @@
|
||||
usr/bin
|
||||
usr/sbin
|
||||
3
packaging/debian-unstable/debian/docs
Normal file
@@ -0,0 +1,3 @@
|
||||
NEWS
|
||||
README
|
||||
TODO
|
||||
107
packaging/debian-unstable/debian/rules
Executable file
@@ -0,0 +1,107 @@
|
||||
#!/usr/bin/make -f
|
||||
# -*- makefile -*-
|
||||
# Sample debian/rules that uses debhelper.
|
||||
# This file was originally written by Joey Hess and Craig Small.
|
||||
# As a special exception, when this file is copied by dh-make into a
|
||||
# dh-make output file, you may use that output file without restriction.
|
||||
# This special exception was added by Craig Small in version 0.37 of dh-make.
|
||||
|
||||
# Uncomment this to turn on verbose mode.
|
||||
#export DH_VERBOSE=1
|
||||
|
||||
|
||||
# These are used for cross-compiling and for saving the configure script
|
||||
# from having to guess our platform (since we know it already)
|
||||
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
|
||||
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
|
||||
|
||||
|
||||
CFLAGS = -Wall
|
||||
|
||||
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
|
||||
CFLAGS += -O0
|
||||
else
|
||||
CFLAGS += -O2
|
||||
endif
|
||||
|
||||
config.status: configure
|
||||
dh_testdir
|
||||
# Add here commands to configure the package.
|
||||
CFLAGS="$(CFLAGS) -Wl,-z,defs" ./configure --prefix=/usr
|
||||
|
||||
|
||||
build: build-stamp
|
||||
|
||||
build-stamp: config.status
|
||||
dh_testdir
|
||||
|
||||
# Add here commands to compile the package.
|
||||
$(MAKE)
|
||||
#docbook-to-man debian/qbittorrent.sgml > qbittorrent.1
|
||||
|
||||
touch build-stamp
|
||||
|
||||
clean:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
rm -f build-stamp
|
||||
|
||||
# Add here commands to clean up after the build process.
|
||||
-$(MAKE) distclean
|
||||
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
|
||||
cp -f /usr/share/misc/config.sub config.sub
|
||||
endif
|
||||
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
|
||||
cp -f /usr/share/misc/config.guess config.guess
|
||||
endif
|
||||
|
||||
|
||||
dh_clean
|
||||
|
||||
install: build
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_clean -k
|
||||
dh_installdirs
|
||||
|
||||
# Add here commands to install the package into debian/qbittorrent.
|
||||
$(MAKE) install INSTALL_ROOT=$(CURDIR)/debian/qbittorrent
|
||||
|
||||
|
||||
# Build architecture-independent files here.
|
||||
binary-indep: build install
|
||||
# We have nothing to do by default.
|
||||
|
||||
# Build architecture-dependent files here.
|
||||
binary-arch: build install
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_installchangelogs Changelog
|
||||
dh_installdocs
|
||||
dh_installexamples
|
||||
# dh_install
|
||||
# dh_installmenu
|
||||
# dh_installdebconf
|
||||
# dh_installlogrotate
|
||||
# dh_installemacsen
|
||||
# dh_installpam
|
||||
# dh_installmime
|
||||
# dh_installinit
|
||||
# dh_installcron
|
||||
# dh_installinfo
|
||||
dh_installman
|
||||
dh_link
|
||||
dh_strip
|
||||
dh_compress
|
||||
dh_fixperms
|
||||
# dh_perl
|
||||
# dh_python
|
||||
# dh_makeshlibs
|
||||
dh_installdeb
|
||||
dh_shlibdeps
|
||||
dh_gencontrol
|
||||
dh_md5sums
|
||||
dh_builddeb
|
||||
|
||||
binary: binary-indep binary-arch
|
||||
.PHONY: build clean binary-indep binary-arch binary install
|
||||
249
packaging/mandriva/qbittorrent.spec
Normal file
@@ -0,0 +1,249 @@
|
||||
|
||||
%define name qbittorrent
|
||||
%define major 0
|
||||
%define minor 6
|
||||
%define patch 1
|
||||
%define version %{major}.%{minor}.%{patch}
|
||||
%define release %mkrel 2
|
||||
%define _iconsdir %{_datadir}/icons
|
||||
%define _mandir %_datadir/man
|
||||
|
||||
Name: %{name}
|
||||
Summary: A Bittorrent Client using C++ / Qt4
|
||||
Version: %{version}
|
||||
Release: %{release}
|
||||
Source0: http://sourceforge.net/projects/qbittorrent/%{name}-%{version}.tar.gz
|
||||
URL: http://sourceforge.net/projects/qbittorrent
|
||||
Vendor: http://qbittorrent.sourceforge.net/
|
||||
Group: Internet/File Transfer
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
|
||||
License: GPL
|
||||
BuildRequires: libqt4-devel >= 4.1.2, libqtgui4 >= 4.1.2, libqtcore4 >= 4.1.2, libqtxml4 >= 4.1.2, libqtnetwork4 >= 4.1.2, rb_libtorrent-devel >= 0.10-3, libcurl3-devel
|
||||
Requires: libqtgui4 >= 4.1.2, libqtcore4 >= 4.1.2, libqtxml4 >= 4.1.2, libqtnetwork4 >= 4.1.2, librb_libtorrent0 >= 0.10-3, python >= 2.3, libcurl3
|
||||
|
||||
%description
|
||||
A Bittorrent client using C++ / libtorrent and a Qt4 Graphical User Interface.
|
||||
It aims to be as fast as possible and to provide multi-OS, unicode support.
|
||||
|
||||
%prep
|
||||
%setup
|
||||
|
||||
%build
|
||||
# Export the Environment variables
|
||||
export QTDIR=%_prefix/%_lib/qt4
|
||||
export KDEDIR=%_prefix
|
||||
export LD_LIBRARY_PATH=$QTDIR/%_lib:$KDEDIR/%_lib:$LD_LIBRARY_PATH
|
||||
export PATH=$QTDIR/bin:$KDEDIR/bin:$PATH
|
||||
|
||||
|
||||
# Change to the Source directory and configure
|
||||
#cd src
|
||||
CFLAGS="%optflags" CXXFLAGS="%optflags" \
|
||||
./configure --prefix=%{buildroot}%{_prefix}
|
||||
|
||||
# Necessary to remove old compiled files.. if they exist
|
||||
make clean
|
||||
|
||||
%make
|
||||
|
||||
%install
|
||||
%makeinstall --directory=src
|
||||
|
||||
|
||||
# Create the menu directory
|
||||
install -d %{buildroot}%{_menudir}
|
||||
|
||||
# Build the Menu
|
||||
#<package> <section> <file_in> <file_out> [requires] [title]
|
||||
kdedesktop2mdkmenu.pl %{name} "%{group}" %{buildroot}%{_datadir}/applications/qBittorrent.desktop %{buildroot}%{_menudir}/%{name}
|
||||
|
||||
%clean
|
||||
%{__rm} -rf %{buildroot}
|
||||
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
%{update_menus}
|
||||
|
||||
%postun
|
||||
/sbin/ldconfig
|
||||
%{clean_menus}
|
||||
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc README INSTALL NEWS COPYING AUTHORS TODO Changelog
|
||||
%doc %{_mandir}/man1/*.bz2
|
||||
|
||||
|
||||
# The binaries
|
||||
%_bindir/*
|
||||
|
||||
|
||||
# Icon files
|
||||
# Hi and Lo colour icons various sizes
|
||||
%_iconsdir/hicolor/128x128/apps/qbittorrent.png
|
||||
%_iconsdir/hicolor/16x16/apps/qbittorrent.png
|
||||
%_iconsdir/hicolor/192x192/apps/qbittorrent.png
|
||||
%_iconsdir/hicolor/22x22/apps/qbittorrent.png
|
||||
%_iconsdir/hicolor/24x24/apps/qbittorrent.png
|
||||
%_iconsdir/hicolor/32x32/apps/qbittorrent.png
|
||||
%_iconsdir/hicolor/36x36/apps/qbittorrent.png
|
||||
%_iconsdir/hicolor/48x48/apps/qbittorrent.png
|
||||
%_iconsdir/hicolor/64x64/apps/qbittorrent.png
|
||||
%_iconsdir/hicolor/72x72/apps/qbittorrent.png
|
||||
%_iconsdir/hicolor/96x96/apps/qbittorrent.png
|
||||
## %_iconsdir/hicolor/scalable/apps/qbittorrent.svgz
|
||||
|
||||
|
||||
# Desktop Link
|
||||
%_datadir/applications/qBittorrent.desktop
|
||||
|
||||
# The qbittorrent Menu directory
|
||||
%dir %{_menudir}
|
||||
%{_menudir}/%{name}
|
||||
|
||||
|
||||
%changelog
|
||||
|
||||
* Wed Aug 23 2006 - Christophe Dumez <chris@qbittorrent.org> - 0.6.0-0.1.2006mdk
|
||||
- FEATURE: Rewritten the download list from scratch (more flexible)
|
||||
- FEATURE: Rewritten the search results list from scratch (more flexible)
|
||||
- FEATURE: Rewritten the torrent properties list from scratch (more flexible)
|
||||
- FEATURE: Improved and cleaned up search engine code
|
||||
- FEATURE: Search results are now displayed in real time (not sequentially)
|
||||
- FEATURE: Added two command lines parameters (--version, --help)
|
||||
- FEATURE: Added a popup menu for download list
|
||||
- FEATURE: Double-click on an item now toggles the paused state of a download
|
||||
- FEATURE: Improved code to be more portable (Windows & MacOS versions should arrive soon)
|
||||
- FEATURE: Allow to toggle selected state of a file within a torrent using double-click
|
||||
- FEATURE: Remember columns width in download and search results lists
|
||||
- BUGFIX: Don't use pkg-config for libcurl anymore (easier to compile)
|
||||
- BUGFIX: Fixed ETA calculation when downloading while connecting
|
||||
- BUGFIX: Download progress is now displayed correctly during first seconds of execution (was 0% before)
|
||||
- BUGFIX: Code cleanup & optimization
|
||||
- BUGFIX: Fixed sorting in download list
|
||||
- BUGFIX: Fixed sorting in search results list
|
||||
- BUGFIX: Fixed Parameters passing between instances
|
||||
- BUGFIX: Fixed missing icon for clear action in infoBar popup menu
|
||||
- BUGFIX: Fixed truncated lines in search results
|
||||
- BUGFIX: Don't refresh download list when user is in search tab (save CPU)
|
||||
- BUGFIX: Don't update Progress/DL Speed/ETA for finished downloads (save CPU)
|
||||
- BUGFIX: Save selected search engines only when they have changed (faster program exit)
|
||||
- COSMETIC: Increased icon size in toolbar from 24px to 32px
|
||||
- COSMETIC: Display a progress bar to visualize each download progress
|
||||
- COSMETIC: Size of each result in search are displayed in user friendly units
|
||||
- COSMETIC: Display a progress bar to visualize each file progress within a torrent
|
||||
- COSMETIC: Renamed 'ratio' to 'Session ratio' (makes more sense)
|
||||
- COSMETIC: Improved layout of torrent properties window when maximized
|
||||
- COSMETIC: Now number of search results is updated in real time
|
||||
- COSMETIC: Remember last window size
|
||||
- COSMETIC: Improved splash screen look
|
||||
- COSMETIC: Improved default width of columns in download and search results lists
|
||||
|
||||
* Tue Aug 08 2006 - Christophe Dumez <chris@qbittorrent.org> - 0.5.0-0.1.20060mdk
|
||||
- FEATURE: Improved "Download from url" feature (now supports https, ftp & redirections)
|
||||
- FEATURE: Added a torrent creation tool
|
||||
- FEATURE: Display progress for each file within a torrent
|
||||
- FEATURE: Based on new libtorrent v0.10 (lot of improvements)
|
||||
- FEATURE: Now possible to clear log textbox (popup menu)
|
||||
- FEATURE: Added two search engines (isohunt, torrentreactor)
|
||||
- FEATURE: Now Display share ratio on main window
|
||||
- FEATURE: Use OSD (On Screen Display) when a download or a search is finished
|
||||
- FEATURE: Allow only one instance of qBittorrent (and add new parameters to download list)
|
||||
- FEATURE: Remember last selected search engines in search tab
|
||||
- FEATURE: Improved search engines status output (Aborted, timed out, finished, no results)
|
||||
- FEATURE: qBittorrent can now update search plugin from qbittorrent.org
|
||||
- I18N: Added Slovak, Italian, Portuguese, Romanian and Traditional Chinese languages
|
||||
- BUGFIX: Fixed ThePirateBay parser for search engine (website had changed)
|
||||
- BUGFIX: Fixed filenames for results from ThePirateBay search engine
|
||||
- BUGFIX: Fixed unicode support for ThePirateBay search engine
|
||||
- BUGFIX: Now search results are sorted by seeds
|
||||
- BUGFIX: Overwrite nova.py search plugin only if it is outdated
|
||||
- BUGFIX: Fixed possible division by 0 in ETA calculation
|
||||
- BUGFIX: Improved ETA calculation precision
|
||||
- BUGFIX: Fixed default tab in options
|
||||
- BUGFIX: When saving options, reconnect only when listening ports changed
|
||||
- COSMETIC: qBittorrent has now its own new logo
|
||||
- COSMETIC: Display status "downloading" if DL Speed > 0 (even when tracker is down)
|
||||
- COSMETIC: Added a splashscreen
|
||||
- COSMETIC: qBittorrent has new cute icons
|
||||
- COSMETIC: Display number of results in search tab
|
||||
- COSMETIC: Added icons for each item in download list according to its state
|
||||
- COSMETIC: Redesigned Locale settings
|
||||
- COSMETIC: Fixed search engines names width (were cut on the right)
|
||||
- COSMETIC: Moved search engines to the left of the window (better ui)
|
||||
|
||||
* Fri Jun 23 2006 - Christophe Dumez <chris@qbittorrent.org> - 0.4.1-0.1.20060mdk
|
||||
- Not counting "protocol chatter" in UP/DL speed anymore
|
||||
- Download speed is now 0 when download is finished
|
||||
- Paused torrents remain paused when qbittorrent is re-started
|
||||
- Added option "go to systray when minimizing"
|
||||
- Added option "Clear finished downloads on exit"
|
||||
- Added option "Ask user for confirmation on exit"
|
||||
- Added "Stalled" status for downloads (colored in orange, paused are in red and finished in green)
|
||||
- Fixed Search window layout on maximizing
|
||||
- Fixed a bug that caused upload limit not to be always applied
|
||||
- Added Bulgarian translation
|
||||
- Updated Translations
|
||||
- Code optimization
|
||||
|
||||
* Tue Jun 13 2006 - Christophe Dumez <chris@qbittorrent.org> - 0.4.0-0.1.20060mdk
|
||||
- Added a search engine (supports Mininova & thepiratebay websites)
|
||||
- Fixed critical bug: some options were not applied correctly to BT session
|
||||
- Possibility to download a torrent file from an URL
|
||||
- Added confirmation dialog on qbittorrent exit
|
||||
- Enabled sorting in Download list
|
||||
- Added Ukrainian translation
|
||||
- Support urls as program parameters
|
||||
- Added more actions to trayicon menu
|
||||
- Fixed exception catching when retrieving fastresume data
|
||||
- use Binary prefix standards from IEC 60027-2 for units (B, KiB, MiB, GiB, TiB)
|
||||
- Iconification to systray when minimizing
|
||||
- Code Cleanup & optimization
|
||||
|
||||
* Tue Jun 06 2006 - Christophe Dumez <chris@qbittorrent.org> - 0.3.1-0.1.20060mdk
|
||||
- Fixed toolbar layout (spacing)
|
||||
- Added Russian translation
|
||||
- Resume also finished files on startup (for seeding)
|
||||
- Added colors corresponding to download state
|
||||
- Fixed a segfault when deleting a download (if no scan dir is set)
|
||||
|
||||
* Mon Jun 05 2006 - Christophe Dumez <chris@qbittorrent.org> - 0.3-0.1.20060mdk
|
||||
- Fixed auto-resume (worked only once)
|
||||
- Fixed BT_Backup dir creation on first startup (thanks Peter)
|
||||
- Now min port and max port are inverted if (min port > max port)
|
||||
- Fixed memory leaks
|
||||
- Added qbittorrent man page
|
||||
- Allow to disable max connections limit (default is disabled)
|
||||
- Disable upload limit by default
|
||||
- Added Menu Entry with icon (thanks Peter)
|
||||
- Restructured directory, now Makefile is in main directory (not src/)
|
||||
- Updated README / INSTALL
|
||||
|
||||
* Fri Jun 02 2006 - Christophe Dumez <chris@qbittorrent.org> 0.2.3-0.1.20060mdk
|
||||
- Fixed ports checking function (user couldn't type the value he wanted)
|
||||
- Check tracker errors list size and clear it if it becomes too big.
|
||||
- qBittorrent does not remove .torrent file from scanned directory anymore
|
||||
- Small cosmetic change
|
||||
|
||||
* Wed May 31 2006 Christophe Dumez <chris@qbittorrent.org> 0.2.2-0.1.20060mdk
|
||||
- Fixed missing icons
|
||||
|
||||
* Sat May 27 2006 Jeffery Fernandez <developer@jefferyfernandez.id.au> 0.2.1-0.1.20060mdk
|
||||
- Initial Build for Mandriva Linux
|
||||
|
||||
* Thu May 25 2006 Christophe Dumez <chris@qbittorrent.org>
|
||||
- Fixed "make install" rule
|
||||
- Disabled debug mode
|
||||
|
||||
* Thu May 25 2006 Christophe Dumez <chris@qbittorrent.org> - v0.2
|
||||
- Fixed a compatibility problem with some versions of qmake
|
||||
- Added translations : Greek, Swedish
|
||||
- Fixed Polish translation selection
|
||||
- Fixed come warning because of two unexisting slots
|
||||
- Improved "Apply" button behaviour in options
|
||||
- Windows are now resizable
|
||||
|
||||
* Tue May 16 2006 Christophe Dumez <chris@qbittorrent.org> - v0.1
|
||||
- Initial release (lack features & still need a lot of improvements)
|
||||
|
||||
147
packaging/mandriva/rb_libtorrent.spec
Normal file
@@ -0,0 +1,147 @@
|
||||
|
||||
%define package_name rb_libtorrent
|
||||
%define orig_name libtorrent
|
||||
%define major 0
|
||||
%define minor .10
|
||||
%define patch .1
|
||||
%define version %{major}%{minor}
|
||||
%define candidate -rc1
|
||||
%define lib_name %mklibname %{package_name} %{major}
|
||||
%define release %mkrel 4
|
||||
|
||||
Summary : libtorrent is a C++ bittorrent library.
|
||||
Name : %{package_name}
|
||||
Version : %{version}
|
||||
Release : %{release}
|
||||
License : GPL
|
||||
Group : Development/C++
|
||||
Source0 : http://www.rasterbar.com/products/libtorrent/libtorrent-%{version}.tar.gz
|
||||
URL : http://www.rasterbar.com
|
||||
BuildRequires : boost >= 1.33.1
|
||||
BuildRoot : %{_tmppath}/%{orig_name}-%{version}-%{release}-root
|
||||
Patch0 : file_progress_arvid.patch.bz2
|
||||
|
||||
%description
|
||||
libtorrent is a C++ library that aims to be a good alternative
|
||||
to all the other bittorrent implementations around.
|
||||
|
||||
|
||||
%package -n %{package_name}-devel
|
||||
Group : Development/C++
|
||||
Summary : Development files for %{package_name}
|
||||
Conflicts : libtorrent7-devel
|
||||
|
||||
%description -n %{package_name}-devel
|
||||
Development files for %{package_name}
|
||||
|
||||
%package -n %{lib_name}
|
||||
Group : Development/C++
|
||||
Summary : Library files for %{package_name}
|
||||
Conflicts : libtorrent7
|
||||
|
||||
%description -n %{lib_name}
|
||||
Library files for %{package_name}
|
||||
|
||||
%prep
|
||||
%setup -n %{orig_name}-%{version}
|
||||
|
||||
%build
|
||||
%configure --prefix=%{_prefix}
|
||||
%make
|
||||
|
||||
|
||||
%install
|
||||
%makeinstall
|
||||
|
||||
# Create directories for the package
|
||||
install -d %{buildroot}%{_includedir}/%{orig_name}
|
||||
install -d %{buildroot}%{_libdir}/pkgconfig
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
# The binaries
|
||||
%files %(orig_name)
|
||||
%defattr(0644, root, root, 0755)
|
||||
%{_bindir}/*
|
||||
|
||||
# Documentation
|
||||
%defattr(-, root, root)
|
||||
%doc README AUTHORS INSTALL COPYING ChangeLog NEWS
|
||||
%doc docs/*
|
||||
|
||||
|
||||
# Devel Package
|
||||
%files -n %{package_name}-devel
|
||||
%defattr(-,root,root,-)
|
||||
%dir %{_includedir}/%{orig_name}/
|
||||
%dir %{_includedir}/%{orig_name}/asio/
|
||||
%dir %{_includedir}/%{orig_name}/asio/detail/
|
||||
%dir %{_includedir}/%{orig_name}/asio/impl/
|
||||
%dir %{_includedir}/%{orig_name}/asio/ip/
|
||||
%dir %{_includedir}/%{orig_name}/asio/ip/detail/
|
||||
%dir %{_includedir}/%{orig_name}/asio/ssl/
|
||||
%dir %{_includedir}/%{orig_name}/asio/ssl/detail/
|
||||
%{_includedir}/%{orig_name}/*.hpp
|
||||
%{_includedir}/%{orig_name}/asio/*.hpp
|
||||
%{_includedir}/%{orig_name}/asio/detail/*.hpp
|
||||
%{_includedir}/%{orig_name}/asio/impl/*.ipp
|
||||
%{_includedir}/%{orig_name}/asio/ip/*.hpp
|
||||
%{_includedir}/%{orig_name}/asio/ip/detail/*.hpp
|
||||
%{_includedir}/%{orig_name}/asio/ssl/*.hpp
|
||||
%{_includedir}/%{orig_name}/asio/ssl/detail/*.hpp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
%{_libdir}/%{orig_name}.a
|
||||
%{_libdir}/%{orig_name}.la
|
||||
%{_libdir}/%{orig_name}.so
|
||||
%{_libdir}/pkgconfig/libtorrent.pc
|
||||
|
||||
|
||||
# Library Package
|
||||
%files -n %{lib_name}
|
||||
%defattr(-,root,root,-)
|
||||
%_libdir/%{orig_name}.so.*
|
||||
|
||||
|
||||
%changelog
|
||||
|
||||
* Wed Aug 23 2006 Christophe Dumez <chris@qbittorrent.org> 10.0.1-2006mdk
|
||||
- Added patch for Torrent Properties crash fix
|
||||
|
||||
* Sat Jul 1 2006 %{packager} %{version}-%{release}
|
||||
- fixed a bug where the requested number of peers in a tracker request could
|
||||
be too big.
|
||||
- fixed a bug where empty files were not created in full allocation mode.
|
||||
- fixed a bug in storage that would, in rare cases, fail to do a
|
||||
complete check.
|
||||
- exposed more settings for tweaking parameters in the piece-picker,
|
||||
downloader and uploader (http_settings replaced by session_settings).
|
||||
- tweaked default settings to improve high bandwidth transfers.
|
||||
- improved the piece picker performance and made it possible to download
|
||||
popular pieces in sequence to improve disk performance.
|
||||
- added the possibility to control upload and download limits per peer.
|
||||
- fixed problem with re-requesting skipped pieces when peer was sending pieces
|
||||
out of fifo-order.
|
||||
- added support for http seeding (the GetRight protocol)
|
||||
- renamed identifiers called 'id' in the public interface to support linking
|
||||
with Objective.C++
|
||||
- changed the extensions protocol to use the new one, which is also
|
||||
implemented by uTorrent.
|
||||
- factorized the peer_connection and added web_peer_connection which is
|
||||
able to download from http-sources.
|
||||
- converted the network code to use asio (resulted in slight api changes
|
||||
dealing with network addresses).
|
||||
- made libtorrent build in vc7 (patches from Allen Zhao)
|
||||
- fixed bug caused when binding outgoing connections to a non-local interface.
|
||||
- add_torrent() will now throw if called while the session object is
|
||||
being closed.
|
||||
- added the ability to limit the number of simultaneous half-open
|
||||
TCP connections. Flags in peer_info has been added.
|
||||
|
||||
|
||||
* Thu Jun 1 2006 %{packager} %{version}-%{release}
|
||||
- Initial Build for Mandriva Linux
|
||||
134
packaging/ubuntu-dapper/debian/changelog
Normal file
@@ -0,0 +1,134 @@
|
||||
qbittorrent (0.6.1-0ubuntu2) dapper; urgency=low
|
||||
|
||||
* Disabled debug mode
|
||||
|
||||
-- Christophe Dumez <chris@qbittorrent.org> Mon, 28 Aug 2006 19:29:17 +0000
|
||||
|
||||
qbittorrent (0.6.1-0ubuntu1) dapper; urgency=low
|
||||
* BUGFIX: Fixed possible segfaults when using context menus
|
||||
* BUGFIX: Cleanup up context menus code
|
||||
* BUGFIX: Used best gzip compressing for manpage
|
||||
|
||||
-- Christophe Dumez <chris@qbittorrent.org> Thu, 24 Aug 2006 19:53:32 +0200
|
||||
|
||||
qbittorrent (0.6.0) dapper; urgency=low
|
||||
* FEATURE: Rewritten the download list from scratch (more flexible)
|
||||
* FEATURE: Rewritten the search results list from scratch (more flexible)
|
||||
* FEATURE: Rewritten the torrent properties list from scratch (more flexible)
|
||||
* FEATURE: Improved and cleaned up search engine code
|
||||
* FEATURE: Search results are now displayed in real time (not sequentially)
|
||||
* FEATURE: Added two command lines parameters (--version, --help)
|
||||
* FEATURE: Added a popup menu for download list
|
||||
* FEATURE: Double-click on an item now toggles the paused state of a download
|
||||
* FEATURE: Improved code to be more portable (Windows & MacOS versions should arrive soon)
|
||||
* FEATURE: Allow to toggle selected state of a file within a torrent using double-click
|
||||
* FEATURE: Remember columns width in download and search results lists
|
||||
* BUGFIX: Don't use pkg-config for libcurl anymore (easier to compile)
|
||||
* BUGFIX: Fixed ETA calculation when downloading while connecting
|
||||
* BUGFIX: Download progress is now displayed correctly during first seconds of execution (was 0% before)
|
||||
* BUGFIX: Code cleanup & optimization
|
||||
* BUGFIX: Fixed sorting in download list
|
||||
* BUGFIX: Fixed sorting in search results list
|
||||
* BUGFIX: Fixed Parameters passing between instances
|
||||
* BUGFIX: Fixed missing icon for clear action in infoBar popup menu
|
||||
* BUGFIX: Fixed truncated lines in search results
|
||||
* BUGFIX: Don't refresh download list when user is in search tab (save CPU)
|
||||
* BUGFIX: Don't update Progress/DL Speed/ETA for finished downloads (save CPU)
|
||||
* BUGFIX: Save selected search engines only when they have changed (faster program exit)
|
||||
* COSMETIC: Increased icon size in toolbar from 24px to 32px
|
||||
* COSMETIC: Display a progress bar to visualize each download progress
|
||||
* COSMETIC: Size of each result in search are displayed in user friendly units
|
||||
* COSMETIC: Display a progress bar to visualize each file progress within a torrent
|
||||
* COSMETIC: Renamed 'ratio' to 'Session ratio' (makes more sense)
|
||||
* COSMETIC: Improved layout of torrent properties window when maximized
|
||||
* COSMETIC: Now number of search results is updated in real time
|
||||
* COSMETIC: Remember last window size
|
||||
* COSMETIC: Improved splash screen look
|
||||
* COSMETIC: Improved default width of columns in download and search results lists
|
||||
|
||||
-- Christophe Dumez <chris@qbittorrent.org> Wed, 22 Aug 2006 10:42:37 +0200
|
||||
|
||||
qbittorrent (0.5.0) dapper; urgency=low
|
||||
* Improved "Download from url" feature (now supports https, ftp & redirections)
|
||||
* Added a torrent creation tool
|
||||
* Display progress for each file within a torrent
|
||||
* Based on new libtorrent v0.10 (lot of improvements)
|
||||
* Now possible to clear log textbox (popup menu)
|
||||
* Added two search engines (isohunt, torrentreactor)
|
||||
* Now Display share ratio on main window
|
||||
* Use OSD (On Screen Display) when a download or a search is finished
|
||||
* Allow only one instance of qBittorrent (and add new parameters to download list)
|
||||
* Remember last selected search engines in search tab
|
||||
* Improved search engines status output (Aborted, timed out, finished, no results)
|
||||
* qBittorrent can now update search plugin from qbittorrent.org
|
||||
* Added Slovak, Italian, Portuguese, Romanian and Traditional Chinese languages
|
||||
* Fixed ThePirateBay parser for search engine (website had changed)
|
||||
* Fixed filenames for results from ThePirateBay search engine
|
||||
* Fixed unicode support for ThePirateBay search engine
|
||||
* Now search results are sorted by seeds
|
||||
* Overwrite nova.py search plugin only if it is outdated
|
||||
* Fixed possible division by 0 in ETA calculation
|
||||
* Improved ETA calculation precision
|
||||
* Fixed default tab in options
|
||||
* When saving options, reconnect only when listening ports changed
|
||||
* qBittorrent has now its own new logo
|
||||
* Display status "downloading" if DL Speed > 0 (even when tracker is down)
|
||||
* Added a splashscreen
|
||||
* qBittorrent has new cute icons
|
||||
* Display number of results in search tab
|
||||
* Added icons for each item in download list according to its state
|
||||
* Redesigned Locale settings
|
||||
* Fixed search engines names width (were cut on the right)
|
||||
* Moved search engines to the left of the window (better ui)
|
||||
|
||||
-- Christophe Dumez <chris@qbittorrent.org> Wed, 2 Aug 2006 19:46:32 +0200
|
||||
|
||||
qbittorrent (0.4.1) dapper; urgency=low
|
||||
* Not counting "protocol chatter" in UP/DL speed anymore
|
||||
* Download speed is now 0 when download is finished
|
||||
* Paused torrents remain paused when qbittorrent is re-started
|
||||
* Added option "go to systray when minimizing"
|
||||
* Added option "Clear finished downloads on exit"
|
||||
* Added option "Ask user for confirmation on exit"
|
||||
* Added "Stalled" status for downloads (colored in orange, paused are in red and finished in green)
|
||||
* Fixed Search window layout on maximizing
|
||||
* Fixed a bug that caused upload limit not to be always applied
|
||||
* Added Bulgarian translation
|
||||
* Updated Translations
|
||||
* Code optimization
|
||||
|
||||
-- Christophe Dumez <chris@qbittorrent.org> Thu, 22 Jun 2006 20:14:27 +0200
|
||||
|
||||
qbittorrent (0.4.0) dapper; urgency=low
|
||||
|
||||
* Added a search engine (supports Mininova & thepiratebay websites)
|
||||
* Fixed critical bug: some options were not applied correctly to BT session
|
||||
* Possibility to download a torrent file from an URL
|
||||
* Added confirmation dialog on qbittorrent exit
|
||||
* Enabled sorting in Download list
|
||||
* Added Ukrainian translation
|
||||
* Support urls as program parameters
|
||||
* Added more actions to trayicon menu
|
||||
* Fixed exception catching when retrieving fastresume data
|
||||
* use Binary prefix standards from IEC 60027-2 for units (B, KiB, MiB, GiB, TiB)
|
||||
* Iconification to systray when minimizing
|
||||
* Code Cleanup & optimization
|
||||
|
||||
-- Christophe Dumez <chris@qbittorrent.org> Wed, 14 Jun 2006 14:47:27 +0200
|
||||
|
||||
qbittorrent (0.3.1) dapper; urgency=low
|
||||
|
||||
* Fixed toolbar layout (spacing).
|
||||
* Added Russian translation.
|
||||
* Resume also finished files on startup (for seeding).
|
||||
* Added colors corresponding to download state.
|
||||
* Fixed a segfault when deleting a download (if no scan dir is set).
|
||||
|
||||
-- Christophe Dumez <chris@qbittorrent.org> Sat, 6 Jun 2006 21:36:27 +0200
|
||||
|
||||
|
||||
qbittorrent (0.3) dapper; urgency=low
|
||||
|
||||
* Initial Release.
|
||||
|
||||
-- Christophe Dumez <chris@qbittorrent.org> Sat, 3 Jun 2006 21:57:27 +0200
|
||||
1
packaging/ubuntu-dapper/debian/compat
Normal file
@@ -0,0 +1 @@
|
||||
4
|
||||
15
packaging/ubuntu-dapper/debian/control
Normal file
@@ -0,0 +1,15 @@
|
||||
Source: qbittorrent
|
||||
Section: net
|
||||
Priority: optional
|
||||
Maintainer: Christophe Dumez <chris@qbittorrent.org>
|
||||
Build-Depends: debhelper (>= 4.0.0), autotools-dev, libqt4-core (>= 4.1.0), libqt4-dev (>= 4.1.0), libqt4-gui (>= 4.1.0), rb-libtorrent (>= 0.10), libcurl3-dev
|
||||
Standards-Version: 3.6.2
|
||||
|
||||
Package: qbittorrent
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, rb-libtorrent (>= 0.10), python (>= 2.3)
|
||||
Description: Bittorrent client in Qt4.1 / C++
|
||||
qBittorrent is a bittorrent client programmed in C++ / Qt4.1
|
||||
using rb_libtorrent by Arvid Norberg. It aims to be a good
|
||||
alternative to other bittorrent client out there. It is fast,
|
||||
stable and provides unicode support.
|
||||
26
packaging/ubuntu-dapper/debian/copyright
Normal file
@@ -0,0 +1,26 @@
|
||||
This is qbittorrent, written and maintained by Christophe Dumez <chris@qbittorrent.org>
|
||||
on Sat, 3 Jun 2006 21:57:27 +0200.
|
||||
|
||||
The original source can always be found at:
|
||||
ftp://ftp.debian.org/dists/unstable/main/source/
|
||||
|
||||
Copyright (C) 2006 Christophe Dumez
|
||||
|
||||
License:
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this package; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
On Debian systems, the complete text of the GNU General
|
||||
Public License can be found in `/usr/share/common-licenses/GPL'.
|
||||
2
packaging/ubuntu-dapper/debian/dirs
Normal file
@@ -0,0 +1,2 @@
|
||||
usr/bin
|
||||
usr/sbin
|
||||
3
packaging/ubuntu-dapper/debian/docs
Normal file
@@ -0,0 +1,3 @@
|
||||
NEWS
|
||||
README
|
||||
TODO
|
||||
1
packaging/ubuntu-dapper/debian/files
Normal file
@@ -0,0 +1 @@
|
||||
qbittorrent_0.6.1-0ubuntu2_i386.deb net optional
|
||||
1
packaging/ubuntu-dapper/debian/qbittorrent.substvars
Normal file
@@ -0,0 +1 @@
|
||||
shlibs:Depends=libboost-date-time1.33.1, libboost-filesystem1.33.1, libboost-thread1.33.1, libc6 (>= 2.3.4-1), libcurl3 (>= 7.15.0-1), libgcc1 (>= 1:4.0.2), libqt4-core (>= 4.1.2), libqt4-gui (>= 4.1.2), libstdc++6 (>= 4.0.2-4), libx11-6, libxext6, zlib1g (>= 1:1.2.1)
|
||||
107
packaging/ubuntu-dapper/debian/rules
Executable file
@@ -0,0 +1,107 @@
|
||||
#!/usr/bin/make -f
|
||||
# -*- makefile -*-
|
||||
# Sample debian/rules that uses debhelper.
|
||||
# This file was originally written by Joey Hess and Craig Small.
|
||||
# As a special exception, when this file is copied by dh-make into a
|
||||
# dh-make output file, you may use that output file without restriction.
|
||||
# This special exception was added by Craig Small in version 0.37 of dh-make.
|
||||
|
||||
# Uncomment this to turn on verbose mode.
|
||||
#export DH_VERBOSE=1
|
||||
|
||||
|
||||
# These are used for cross-compiling and for saving the configure script
|
||||
# from having to guess our platform (since we know it already)
|
||||
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
|
||||
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
|
||||
|
||||
|
||||
CFLAGS = -Wall
|
||||
|
||||
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
|
||||
CFLAGS += -O0
|
||||
else
|
||||
CFLAGS += -O2
|
||||
endif
|
||||
|
||||
config.status: configure
|
||||
dh_testdir
|
||||
# Add here commands to configure the package.
|
||||
CFLAGS="$(CFLAGS) -Wl,-z,defs" ./configure --prefix=/usr
|
||||
|
||||
|
||||
build: build-stamp
|
||||
|
||||
build-stamp: config.status
|
||||
dh_testdir
|
||||
|
||||
# Add here commands to compile the package.
|
||||
$(MAKE)
|
||||
#docbook-to-man debian/qbittorrent.sgml > qbittorrent.1
|
||||
|
||||
touch build-stamp
|
||||
|
||||
clean:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
rm -f build-stamp
|
||||
|
||||
# Add here commands to clean up after the build process.
|
||||
-$(MAKE) distclean
|
||||
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
|
||||
cp -f /usr/share/misc/config.sub config.sub
|
||||
endif
|
||||
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
|
||||
cp -f /usr/share/misc/config.guess config.guess
|
||||
endif
|
||||
|
||||
|
||||
dh_clean
|
||||
|
||||
install: build
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_clean -k
|
||||
dh_installdirs
|
||||
|
||||
# Add here commands to install the package into debian/qbittorrent.
|
||||
$(MAKE) install INSTALL_ROOT=$(CURDIR)/debian/qbittorrent
|
||||
|
||||
|
||||
# Build architecture-independent files here.
|
||||
binary-indep: build install
|
||||
# We have nothing to do by default.
|
||||
|
||||
# Build architecture-dependent files here.
|
||||
binary-arch: build install
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_installchangelogs Changelog
|
||||
dh_installdocs
|
||||
dh_installexamples
|
||||
# dh_install
|
||||
# dh_installmenu
|
||||
# dh_installdebconf
|
||||
# dh_installlogrotate
|
||||
# dh_installemacsen
|
||||
# dh_installpam
|
||||
# dh_installmime
|
||||
# dh_installinit
|
||||
# dh_installcron
|
||||
# dh_installinfo
|
||||
dh_installman
|
||||
dh_link
|
||||
dh_strip
|
||||
dh_compress
|
||||
dh_fixperms
|
||||
# dh_perl
|
||||
# dh_python
|
||||
# dh_makeshlibs
|
||||
dh_installdeb
|
||||
dh_shlibdeps
|
||||
dh_gencontrol
|
||||
dh_md5sums
|
||||
dh_builddeb
|
||||
|
||||
binary: binary-indep binary-arch
|
||||
.PHONY: build clean binary-indep binary-arch binary install
|
||||
134
packaging/ubuntu-edgy/debian/changelog
Normal file
@@ -0,0 +1,134 @@
|
||||
qbittorrent (0.6.1-0ubuntu2) edgy; urgency=low
|
||||
|
||||
* Disabled debug mode
|
||||
|
||||
-- Christophe Dumez <chris@qbittorrent.org> Mon, 28 Aug 2006 21:22:48 +0200
|
||||
|
||||
qbittorrent (0.6.1-0ubuntu1) edgy; urgency=low
|
||||
* BUGFIX: Fixed possible segfaults when using context menus
|
||||
* BUGFIX: Cleanup up context menus code
|
||||
* BUGFIX: Used best gzip compressing for manpage
|
||||
|
||||
-- Christophe Dumez <chris@qbittorrent.org> Thu, 24 Aug 2006 19:53:32 +0200
|
||||
|
||||
qbittorrent (0.6.0) edgy; urgency=low
|
||||
* FEATURE: Rewritten the download list from scratch (more flexible)
|
||||
* FEATURE: Rewritten the search results list from scratch (more flexible)
|
||||
* FEATURE: Rewritten the torrent properties list from scratch (more flexible)
|
||||
* FEATURE: Improved and cleaned up search engine code
|
||||
* FEATURE: Search results are now displayed in real time (not sequentially)
|
||||
* FEATURE: Added two command lines parameters (--version, --help)
|
||||
* FEATURE: Added a popup menu for download list
|
||||
* FEATURE: Double-click on an item now toggles the paused state of a download
|
||||
* FEATURE: Improved code to be more portable (Windows & MacOS versions should arrive soon)
|
||||
* FEATURE: Allow to toggle selected state of a file within a torrent using double-click
|
||||
* FEATURE: Remember columns width in download and search results lists
|
||||
* BUGFIX: Don't use pkg-config for libcurl anymore (easier to compile)
|
||||
* BUGFIX: Fixed ETA calculation when downloading while connecting
|
||||
* BUGFIX: Download progress is now displayed correctly during first seconds of execution (was 0% before)
|
||||
* BUGFIX: Code cleanup & optimization
|
||||
* BUGFIX: Fixed sorting in download list
|
||||
* BUGFIX: Fixed sorting in search results list
|
||||
* BUGFIX: Fixed Parameters passing between instances
|
||||
* BUGFIX: Fixed missing icon for clear action in infoBar popup menu
|
||||
* BUGFIX: Fixed truncated lines in search results
|
||||
* BUGFIX: Don't refresh download list when user is in search tab (save CPU)
|
||||
* BUGFIX: Don't update Progress/DL Speed/ETA for finished downloads (save CPU)
|
||||
* BUGFIX: Save selected search engines only when they have changed (faster program exit)
|
||||
* COSMETIC: Increased icon size in toolbar from 24px to 32px
|
||||
* COSMETIC: Display a progress bar to visualize each download progress
|
||||
* COSMETIC: Size of each result in search are displayed in user friendly units
|
||||
* COSMETIC: Display a progress bar to visualize each file progress within a torrent
|
||||
* COSMETIC: Renamed 'ratio' to 'Session ratio' (makes more sense)
|
||||
* COSMETIC: Improved layout of torrent properties window when maximized
|
||||
* COSMETIC: Now number of search results is updated in real time
|
||||
* COSMETIC: Remember last window size
|
||||
* COSMETIC: Improved splash screen look
|
||||
* COSMETIC: Improved default width of columns in download and search results lists
|
||||
|
||||
-- Christophe Dumez <chris@qbittorrent.org> Wed, 22 Aug 2006 10:42:37 +0200
|
||||
|
||||
qbittorrent (0.5.0) edgy; urgency=low
|
||||
* Improved "Download from url" feature (now supports https, ftp & redirections)
|
||||
* Added a torrent creation tool
|
||||
* Display progress for each file within a torrent
|
||||
* Based on new libtorrent v0.10 (lot of improvements)
|
||||
* Now possible to clear log textbox (popup menu)
|
||||
* Added two search engines (isohunt, torrentreactor)
|
||||
* Now Display share ratio on main window
|
||||
* Use OSD (On Screen Display) when a download or a search is finished
|
||||
* Allow only one instance of qBittorrent (and add new parameters to download list)
|
||||
* Remember last selected search engines in search tab
|
||||
* Improved search engines status output (Aborted, timed out, finished, no results)
|
||||
* qBittorrent can now update search plugin from qbittorrent.org
|
||||
* Added Slovak, Italian, Portuguese, Romanian and Traditional Chinese languages
|
||||
* Fixed ThePirateBay parser for search engine (website had changed)
|
||||
* Fixed filenames for results from ThePirateBay search engine
|
||||
* Fixed unicode support for ThePirateBay search engine
|
||||
* Now search results are sorted by seeds
|
||||
* Overwrite nova.py search plugin only if it is outdated
|
||||
* Fixed possible division by 0 in ETA calculation
|
||||
* Improved ETA calculation precision
|
||||
* Fixed default tab in options
|
||||
* When saving options, reconnect only when listening ports changed
|
||||
* qBittorrent has now its own new logo
|
||||
* Display status "downloading" if DL Speed > 0 (even when tracker is down)
|
||||
* Added a splashscreen
|
||||
* qBittorrent has new cute icons
|
||||
* Display number of results in search tab
|
||||
* Added icons for each item in download list according to its state
|
||||
* Redesigned Locale settings
|
||||
* Fixed search engines names width (were cut on the right)
|
||||
* Moved search engines to the left of the window (better ui)
|
||||
|
||||
-- Christophe Dumez <chris@qbittorrent.org> Wed, 2 Aug 2006 19:46:32 +0200
|
||||
|
||||
qbittorrent (0.4.1) edgy; urgency=low
|
||||
* Not counting "protocol chatter" in UP/DL speed anymore
|
||||
* Download speed is now 0 when download is finished
|
||||
* Paused torrents remain paused when qbittorrent is re-started
|
||||
* Added option "go to systray when minimizing"
|
||||
* Added option "Clear finished downloads on exit"
|
||||
* Added option "Ask user for confirmation on exit"
|
||||
* Added "Stalled" status for downloads (colored in orange, paused are in red and finished in green)
|
||||
* Fixed Search window layout on maximizing
|
||||
* Fixed a bug that caused upload limit not to be always applied
|
||||
* Added Bulgarian translation
|
||||
* Updated Translations
|
||||
* Code optimization
|
||||
|
||||
-- Christophe Dumez <chris@qbittorrent.org> Thu, 22 Jun 2006 20:14:27 +0200
|
||||
|
||||
qbittorrent (0.4.0) edgy; urgency=low
|
||||
|
||||
* Added a search engine (supports Mininova & thepiratebay websites)
|
||||
* Fixed critical bug: some options were not applied correctly to BT session
|
||||
* Possibility to download a torrent file from an URL
|
||||
* Added confirmation dialog on qbittorrent exit
|
||||
* Enabled sorting in Download list
|
||||
* Added Ukrainian translation
|
||||
* Support urls as program parameters
|
||||
* Added more actions to trayicon menu
|
||||
* Fixed exception catching when retrieving fastresume data
|
||||
* use Binary prefix standards from IEC 60027-2 for units (B, KiB, MiB, GiB, TiB)
|
||||
* Iconification to systray when minimizing
|
||||
* Code Cleanup & optimization
|
||||
|
||||
-- Christophe Dumez <chris@qbittorrent.org> Wed, 14 Jun 2006 14:47:27 +0200
|
||||
|
||||
qbittorrent (0.3.1) edgy; urgency=low
|
||||
|
||||
* Fixed toolbar layout (spacing).
|
||||
* Added Russian translation.
|
||||
* Resume also finished files on startup (for seeding).
|
||||
* Added colors corresponding to download state.
|
||||
* Fixed a segfault when deleting a download (if no scan dir is set).
|
||||
|
||||
-- Christophe Dumez <chris@qbittorrent.org> Sat, 6 Jun 2006 21:36:27 +0200
|
||||
|
||||
|
||||
qbittorrent (0.3) edgy; urgency=low
|
||||
|
||||
* Initial Release.
|
||||
|
||||
-- Christophe Dumez <chris@qbittorrent.org> Sat, 3 Jun 2006 21:57:27 +0200
|
||||
1
packaging/ubuntu-edgy/debian/compat
Normal file
@@ -0,0 +1 @@
|
||||
4
|
||||
15
packaging/ubuntu-edgy/debian/control
Normal file
@@ -0,0 +1,15 @@
|
||||
Source: qbittorrent
|
||||
Section: net
|
||||
Priority: optional
|
||||
Maintainer: Christophe Dumez <chris@qbittorrent.org>
|
||||
Build-Depends: debhelper (>= 4.0.0), autotools-dev, libqt4-core (>= 4.1.0), libqt4-dev (>= 4.1.0), libqt4-gui (>= 4.1.0), rb-libtorrent (>= 0.10), libcurl3-dev
|
||||
Standards-Version: 3.6.2
|
||||
|
||||
Package: qbittorrent
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, rb-libtorrent (>= 0.10), python (>= 2.3)
|
||||
Description: Bittorrent client in Qt4.1 / C++
|
||||
qBittorrent is a bittorrent client programmed in C++ / Qt4.1
|
||||
using rb_libtorrent by Arvid Norberg. It aims to be a good
|
||||
alternative to other bittorrent client out there. It is fast,
|
||||
stable and provides unicode support.
|
||||
26
packaging/ubuntu-edgy/debian/copyright
Normal file
@@ -0,0 +1,26 @@
|
||||
This is qbittorrent, written and maintained by Christophe Dumez <chris@qbittorrent.org>
|
||||
on Sat, 3 Jun 2006 21:57:27 +0200.
|
||||
|
||||
The original source can always be found at:
|
||||
ftp://ftp.debian.org/dists/unstable/main/source/
|
||||
|
||||
Copyright (C) 2006 Christophe Dumez
|
||||
|
||||
License:
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this package; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
On Debian systems, the complete text of the GNU General
|
||||
Public License can be found in `/usr/share/common-licenses/GPL'.
|
||||
2
packaging/ubuntu-edgy/debian/dirs
Normal file
@@ -0,0 +1,2 @@
|
||||
usr/bin
|
||||
usr/sbin
|
||||
3
packaging/ubuntu-edgy/debian/docs
Normal file
@@ -0,0 +1,3 @@
|
||||
NEWS
|
||||
README
|
||||
TODO
|
||||
1
packaging/ubuntu-edgy/debian/files
Normal file
@@ -0,0 +1 @@
|
||||
qbittorrent_0.6.1-0ubuntu2_i386.deb net optional
|
||||
1
packaging/ubuntu-edgy/debian/qbittorrent.substvars
Normal file
@@ -0,0 +1 @@
|
||||
shlibs:Depends=libboost-date-time1.33.1, libboost-filesystem1.33.1, libboost-thread1.33.1, libc6 (>= 2.4-1), libcurl3 (>= 7.15.4-1), libgcc1 (>= 1:4.1.1-11ubuntu1), libqt4-core (>= 4.1.4), libqt4-gui (>= 4.1.4), libstdc++6 (>= 4.1.1-11ubuntu1), libx11-6, libxext6, zlib1g (>= 1:1.2.1)
|
||||
107
packaging/ubuntu-edgy/debian/rules
Executable file
@@ -0,0 +1,107 @@
|
||||
#!/usr/bin/make -f
|
||||
# -*- makefile -*-
|
||||
# Sample debian/rules that uses debhelper.
|
||||
# This file was originally written by Joey Hess and Craig Small.
|
||||
# As a special exception, when this file is copied by dh-make into a
|
||||
# dh-make output file, you may use that output file without restriction.
|
||||
# This special exception was added by Craig Small in version 0.37 of dh-make.
|
||||
|
||||
# Uncomment this to turn on verbose mode.
|
||||
#export DH_VERBOSE=1
|
||||
|
||||
|
||||
# These are used for cross-compiling and for saving the configure script
|
||||
# from having to guess our platform (since we know it already)
|
||||
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
|
||||
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
|
||||
|
||||
|
||||
CFLAGS = -Wall
|
||||
|
||||
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
|
||||
CFLAGS += -O0
|
||||
else
|
||||
CFLAGS += -O2
|
||||
endif
|
||||
|
||||
config.status: configure
|
||||
dh_testdir
|
||||
# Add here commands to configure the package.
|
||||
CFLAGS="$(CFLAGS) -Wl,-z,defs" ./configure --prefix=/usr
|
||||
|
||||
|
||||
build: build-stamp
|
||||
|
||||
build-stamp: config.status
|
||||
dh_testdir
|
||||
|
||||
# Add here commands to compile the package.
|
||||
$(MAKE)
|
||||
#docbook-to-man debian/qbittorrent.sgml > qbittorrent.1
|
||||
|
||||
touch build-stamp
|
||||
|
||||
clean:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
rm -f build-stamp
|
||||
|
||||
# Add here commands to clean up after the build process.
|
||||
-$(MAKE) distclean
|
||||
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
|
||||
cp -f /usr/share/misc/config.sub config.sub
|
||||
endif
|
||||
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
|
||||
cp -f /usr/share/misc/config.guess config.guess
|
||||
endif
|
||||
|
||||
|
||||
dh_clean
|
||||
|
||||
install: build
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_clean -k
|
||||
dh_installdirs
|
||||
|
||||
# Add here commands to install the package into debian/qbittorrent.
|
||||
$(MAKE) install INSTALL_ROOT=$(CURDIR)/debian/qbittorrent
|
||||
|
||||
|
||||
# Build architecture-independent files here.
|
||||
binary-indep: build install
|
||||
# We have nothing to do by default.
|
||||
|
||||
# Build architecture-dependent files here.
|
||||
binary-arch: build install
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_installchangelogs Changelog
|
||||
dh_installdocs
|
||||
dh_installexamples
|
||||
# dh_install
|
||||
# dh_installmenu
|
||||
# dh_installdebconf
|
||||
# dh_installlogrotate
|
||||
# dh_installemacsen
|
||||
# dh_installpam
|
||||
# dh_installmime
|
||||
# dh_installinit
|
||||
# dh_installcron
|
||||
# dh_installinfo
|
||||
dh_installman
|
||||
dh_link
|
||||
dh_strip
|
||||
dh_compress
|
||||
dh_fixperms
|
||||
# dh_perl
|
||||
# dh_python
|
||||
# dh_makeshlibs
|
||||
dh_installdeb
|
||||
dh_shlibdeps
|
||||
dh_gencontrol
|
||||
dh_md5sums
|
||||
dh_builddeb
|
||||
|
||||
binary: binary-indep binary-arch
|
||||
.PHONY: build clean binary-indep binary-arch binary install
|
||||
@@ -1,199 +0,0 @@
|
||||
<?xml version = '1.0'?>
|
||||
<kdevelop>
|
||||
<general>
|
||||
<author>Christophe Dumez</author>
|
||||
<email>chris@qbittorrent.org</email>
|
||||
<version>1.0.0</version>
|
||||
<projectmanagement>KDevTrollProject</projectmanagement>
|
||||
<primarylanguage>C++</primarylanguage>
|
||||
<keywords>
|
||||
<keyword>Qt</keyword>
|
||||
</keywords>
|
||||
<projectname>qBittorrent</projectname>
|
||||
<ignoreparts/>
|
||||
<projectdirectory>.</projectdirectory>
|
||||
<absoluteprojectpath>false</absoluteprojectpath>
|
||||
<description/>
|
||||
<defaultencoding/>
|
||||
<versioncontrol>kdevsubversion</versioncontrol>
|
||||
</general>
|
||||
<kdevfileview>
|
||||
<groups>
|
||||
<group pattern="*.cpp;*.cxx;*.h" name="Sources" />
|
||||
<group pattern="*.ui" name="User Interface" />
|
||||
<group pattern="*.png" name="Icons" />
|
||||
<group pattern="*" name="Others" />
|
||||
<hidenonprojectfiles>false</hidenonprojectfiles>
|
||||
<hidenonlocation>false</hidenonlocation>
|
||||
</groups>
|
||||
<tree>
|
||||
<hidepatterns>*.o,*.lo,CVS</hidepatterns>
|
||||
<hidenonprojectfiles>false</hidenonprojectfiles>
|
||||
<showvcsfields>false</showvcsfields>
|
||||
</tree>
|
||||
</kdevfileview>
|
||||
<kdevdoctreeview>
|
||||
<ignoretocs>
|
||||
<toc>bash</toc>
|
||||
<toc>bash_bugs</toc>
|
||||
<toc>clanlib</toc>
|
||||
<toc>w3c-dom-level2-html</toc>
|
||||
<toc>fortran_bugs_gcc</toc>
|
||||
<toc>gnome1</toc>
|
||||
<toc>gnustep</toc>
|
||||
<toc>gtk</toc>
|
||||
<toc>gtk_bugs</toc>
|
||||
<toc>haskell</toc>
|
||||
<toc>haskell_bugs_ghc</toc>
|
||||
<toc>java_bugs_gcc</toc>
|
||||
<toc>java_bugs_sun</toc>
|
||||
<toc>kde2book</toc>
|
||||
<toc>opengl</toc>
|
||||
<toc>pascal_bugs_fp</toc>
|
||||
<toc>php</toc>
|
||||
<toc>php_bugs</toc>
|
||||
<toc>perl</toc>
|
||||
<toc>perl_bugs</toc>
|
||||
<toc>python</toc>
|
||||
<toc>python_bugs</toc>
|
||||
<toc>qt-kdev3</toc>
|
||||
<toc>ruby</toc>
|
||||
<toc>ruby_bugs</toc>
|
||||
<toc>sdl</toc>
|
||||
<toc>stl</toc>
|
||||
<toc>w3c-svg</toc>
|
||||
<toc>sw</toc>
|
||||
<toc>w3c-uaag10</toc>
|
||||
<toc>wxwidgets_bugs</toc>
|
||||
</ignoretocs>
|
||||
<ignoredoxygen>
|
||||
<toc>KDE Libraries (Doxygen)</toc>
|
||||
</ignoredoxygen>
|
||||
</kdevdoctreeview>
|
||||
<kdevdebugger>
|
||||
<general>
|
||||
<dbgshell/>
|
||||
<gdbpath/>
|
||||
<configGdbScript/>
|
||||
<runShellScript/>
|
||||
<runGdbScript/>
|
||||
<breakonloadinglibs>true</breakonloadinglibs>
|
||||
<separatetty>false</separatetty>
|
||||
<floatingtoolbar>false</floatingtoolbar>
|
||||
</general>
|
||||
<display>
|
||||
<staticmembers>false</staticmembers>
|
||||
<demanglenames>true</demanglenames>
|
||||
<outputradix>10</outputradix>
|
||||
</display>
|
||||
</kdevdebugger>
|
||||
<kdevcppsupport>
|
||||
<qt>
|
||||
<version>4</version>
|
||||
<used>true</used>
|
||||
<includestyle>4</includestyle>
|
||||
<designerintegration>ExternalDesigner</designerintegration>
|
||||
<root>/usr/lib/qt4</root>
|
||||
<qmake>/usr/bin/qmake</qmake>
|
||||
<designer>/usr/bin/designer</designer>
|
||||
<designerpluginpaths/>
|
||||
</qt>
|
||||
<references>
|
||||
<pcs>automatic_%2Fhome%2Fishanarora%2Fprojects%2Fqbittorrent</pcs>
|
||||
</references>
|
||||
<codecompletion>
|
||||
<automaticCodeCompletion>true</automaticCodeCompletion>
|
||||
<automaticArgumentsHint>true</automaticArgumentsHint>
|
||||
<automaticHeaderCompletion>true</automaticHeaderCompletion>
|
||||
<codeCompletionDelay>250</codeCompletionDelay>
|
||||
<argumentsHintDelay>400</argumentsHintDelay>
|
||||
<headerCompletionDelay>250</headerCompletionDelay>
|
||||
<showOnlyAccessibleItems>false</showOnlyAccessibleItems>
|
||||
<completionBoxItemOrder>0</completionBoxItemOrder>
|
||||
<howEvaluationContextMenu>true</howEvaluationContextMenu>
|
||||
<showCommentWithArgumentHint>true</showCommentWithArgumentHint>
|
||||
<statusBarTypeEvaluation>false</statusBarTypeEvaluation>
|
||||
<namespaceAliases>std=_GLIBCXX_STD;__gnu_cxx=std</namespaceAliases>
|
||||
<processPrimaryTypes>true</processPrimaryTypes>
|
||||
<processFunctionArguments>true</processFunctionArguments>
|
||||
<preProcessAllHeaders>true</preProcessAllHeaders>
|
||||
<parseMissingHeadersExperimental>true</parseMissingHeadersExperimental>
|
||||
<resolveIncludePathsUsingMakeExperimental>true</resolveIncludePathsUsingMakeExperimental>
|
||||
<alwaysParseInBackground>true</alwaysParseInBackground>
|
||||
<usePermanentCaching>true</usePermanentCaching>
|
||||
<alwaysIncludeNamespaces>false</alwaysIncludeNamespaces>
|
||||
<includePaths>.;</includePaths>
|
||||
</codecompletion>
|
||||
<creategettersetter>
|
||||
<prefixGet>get</prefixGet>
|
||||
<prefixSet>set</prefixSet>
|
||||
<prefixVariable>m_,_</prefixVariable>
|
||||
<parameterName>theValue</parameterName>
|
||||
<inlineGet>true</inlineGet>
|
||||
<inlineSet>true</inlineSet>
|
||||
</creategettersetter>
|
||||
<splitheadersource>
|
||||
<enabled>false</enabled>
|
||||
<synchronize>true</synchronize>
|
||||
<orientation>Vertical</orientation>
|
||||
</splitheadersource>
|
||||
</kdevcppsupport>
|
||||
<kdevfilecreate>
|
||||
<filetypes/>
|
||||
<useglobaltypes>
|
||||
<type ext="ui" />
|
||||
<type ext="cpp" />
|
||||
<type ext="h" />
|
||||
</useglobaltypes>
|
||||
</kdevfilecreate>
|
||||
<kdevtrollproject>
|
||||
<general>
|
||||
<activedir>src</activedir>
|
||||
</general>
|
||||
<run>
|
||||
<directoryradio>executable</directoryradio>
|
||||
<mainprogram>/home/ishanarora/projects/qbittorrent/src/qbittorrent</mainprogram>
|
||||
<programargs/>
|
||||
<globaldebugarguments/>
|
||||
<globalcwd>/home/ishanarora/projects/qbittorrent</globalcwd>
|
||||
<useglobalprogram>true</useglobalprogram>
|
||||
<terminal>false</terminal>
|
||||
<autocompile>true</autocompile>
|
||||
<autoinstall>false</autoinstall>
|
||||
<autokdesu>false</autokdesu>
|
||||
<envvars/>
|
||||
</run>
|
||||
<make>
|
||||
<abortonerror>true</abortonerror>
|
||||
<runmultiplejobs>false</runmultiplejobs>
|
||||
<numberofjobs>1</numberofjobs>
|
||||
<dontact>false</dontact>
|
||||
<makebin/>
|
||||
<prio>0</prio>
|
||||
<envvars/>
|
||||
</make>
|
||||
<qmake>
|
||||
<savebehaviour>2</savebehaviour>
|
||||
<replacePaths>false</replacePaths>
|
||||
<disableDefaultOpts>true</disableDefaultOpts>
|
||||
</qmake>
|
||||
</kdevtrollproject>
|
||||
<cppsupportpart>
|
||||
<filetemplates>
|
||||
<interfacesuffix>.h</interfacesuffix>
|
||||
<implementationsuffix>.cpp</implementationsuffix>
|
||||
</filetemplates>
|
||||
</cppsupportpart>
|
||||
<ctagspart>
|
||||
<customArguments/>
|
||||
<customTagfilePath>/home/ishanarora/projects/qbittorrent/tags</customTagfilePath>
|
||||
<activeTagsFiles/>
|
||||
</ctagspart>
|
||||
<kdevdocumentation>
|
||||
<projectdoc>
|
||||
<docsystem/>
|
||||
<docurl/>
|
||||
<usermanualurl/>
|
||||
</projectdoc>
|
||||
</kdevdocumentation>
|
||||
</kdevelop>
|
||||
@@ -2,11 +2,10 @@
|
||||
<name>qbittorrent</name>
|
||||
<profile>qbittorrent.pro</profile>
|
||||
<moddir>qcm</moddir>
|
||||
<datadir/>
|
||||
<dep type='qt4'>
|
||||
<dep type='qt42'>
|
||||
<required/>
|
||||
</dep>
|
||||
<dep type='libtorrent-rasterbar'>
|
||||
<dep type='libtorrent'>
|
||||
<required/>
|
||||
</dep>
|
||||
<dep type='libboost'>
|
||||
@@ -15,6 +14,7 @@
|
||||
<dep type='libcurl'>
|
||||
<required/>
|
||||
</dep>
|
||||
<dep type='libmagick'/>
|
||||
<dep type='libzzip'/>
|
||||
<dep type='python'>
|
||||
<required/>
|
||||
</dep>
|
||||
</qconf>
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
/*
|
||||
-----BEGIN QCMOD-----
|
||||
name: libcommoncpp2
|
||||
arg: with-libcommoncpp2-inc=[path], Path to libcommoncpp2 include files
|
||||
arg: with-libcommoncpp2-lib=[path], Path to libcommoncpp2 library files
|
||||
-----END QCMOD-----
|
||||
*/
|
||||
class qc_libcommoncpp2 : public ConfObj
|
||||
{
|
||||
public:
|
||||
qc_libcommoncpp2(Conf *c) : ConfObj(c) {}
|
||||
QString name() const { return "GNU Common C++ library (libcommoncpp2)"; }
|
||||
QString shortname() const { return "libcommoncpp2"; }
|
||||
bool exec(){
|
||||
QString s;
|
||||
s = conf->getenv("QC_WITH_LIBCOMMONCPP2_INC");
|
||||
if(!s.isEmpty()) {
|
||||
if(!conf->checkHeader(s, "cc++/url.h")) {
|
||||
return false;
|
||||
}
|
||||
}else{
|
||||
QStringList sl;
|
||||
sl << "/usr/include";
|
||||
sl << "/usr/local/include";
|
||||
bool found = false;
|
||||
foreach(s, sl){
|
||||
if(conf->checkHeader(s, "cc++/url.h")){
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!found) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
conf->addIncludePath(s);
|
||||
|
||||
s = conf->getenv("QC_WITH_LIBCOMMONCPP2_LIB");
|
||||
if(!s.isEmpty()) {
|
||||
if(!QFile::exists(s+QString("/libccext2.so")))
|
||||
return false;
|
||||
if(!QFile::exists(s+QString("/libccgnu2.so")))
|
||||
return false;
|
||||
conf->addLib(QString("-L") + s);
|
||||
}else{
|
||||
QStringList sl;
|
||||
sl << "/usr/lib/";
|
||||
sl << "/usr/lib64/";
|
||||
sl << "/usr/local/lib/";
|
||||
sl << "/usr/local/lib64/";
|
||||
bool found = false;
|
||||
foreach(s, sl){
|
||||
if(QFile::exists(s+QString("libccext2.so"))){
|
||||
if(QFile::exists(s+QString("libccgnu2.so"))){
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!found) return false;
|
||||
conf->addLib(QString("-L") + s);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
-----BEGIN QCMOD-----
|
||||
name: libcommoncpp2
|
||||
name: libcurl
|
||||
arg: with-libcurl-inc=[path], Path to libcurl include files
|
||||
arg: with-libcurl-lib=[path], Path to libcurl library files
|
||||
-----END QCMOD-----
|
||||
@@ -12,12 +12,12 @@ public:
|
||||
QString name() const { return "libcurl"; }
|
||||
QString shortname() const { return "libcurl"; }
|
||||
bool exec(){
|
||||
QString s;
|
||||
QString s;
|
||||
s = conf->getenv("QC_WITH_LIBCURL_INC");
|
||||
if(!s.isEmpty()) {
|
||||
if(!conf->checkHeader(s, "curl/curl.h")) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
QStringList sl;
|
||||
sl << "/usr/include";
|
||||
@@ -31,24 +31,23 @@ public:
|
||||
}
|
||||
if(!found) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
conf->addIncludePath(s);
|
||||
|
||||
s = conf->getenv("QC_WITH_LIBCURL_LIB");
|
||||
if(!s.isEmpty()) {
|
||||
if(!QFile::exists(s+QString("/libcurl.so")))
|
||||
return false;
|
||||
conf->addLib(QString("-L") + s);
|
||||
if(!conf->checkLibrary(s, "curl")) {
|
||||
return false;
|
||||
}
|
||||
conf->addLib(QString("-L") + s);
|
||||
}else{
|
||||
QStringList sl;
|
||||
sl << "/usr/lib/";
|
||||
sl << "/usr/lib64/";
|
||||
sl << "/usr/local/lib/";
|
||||
sl << "/usr/local/lib64/";
|
||||
bool found = false;
|
||||
foreach(s, sl){
|
||||
if(QFile::exists(s+QString("libcurl.so"))){
|
||||
if(conf->checkLibrary(s, "curl")){
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
@@ -56,6 +55,7 @@ public:
|
||||
if(!found) return false;
|
||||
conf->addLib(QString("-L") + s);
|
||||
}
|
||||
conf->addLib("-lcurl");
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,79 +0,0 @@
|
||||
/*
|
||||
-----BEGIN QCMOD-----
|
||||
name: libmagick
|
||||
arg: with-libmagick-inc=[path], Path to libmagick++ include files
|
||||
arg: with-libmagick-lib=[path], Path to libmagick++ library files
|
||||
-----END QCMOD-----
|
||||
*/
|
||||
#include <QProcess>
|
||||
class qc_libmagick : public ConfObj
|
||||
{
|
||||
public:
|
||||
qc_libmagick(Conf *c) : ConfObj(c) {}
|
||||
QString name() const { return "ImageMagick library (libmagick++)"; }
|
||||
QString shortname() const { return "libmagick++"; }
|
||||
QString checkString() const {
|
||||
if(!conf->getenv("QC_DISABLE_libmagick").isEmpty())
|
||||
return "";
|
||||
return ConfObj::checkString();
|
||||
}
|
||||
bool exec(){
|
||||
if(!conf->getenv("QC_DISABLE_libmagick").isEmpty())
|
||||
return false;
|
||||
QString s;
|
||||
s = conf->getenv("QC_WITH_LIBMAGICK_INC");
|
||||
if(!s.isEmpty()) {
|
||||
if(!conf->checkHeader(s, "Magick++.h")) {
|
||||
return false;
|
||||
}
|
||||
}else{
|
||||
QStringList sl;
|
||||
sl << "/usr/include";
|
||||
sl << "/usr/local/include";
|
||||
bool found = false;
|
||||
foreach(s, sl){
|
||||
if(conf->checkHeader(s, "Magick++.h")){
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!found)
|
||||
return false;
|
||||
}
|
||||
conf->addIncludePath(s);
|
||||
|
||||
s = conf->getenv("QC_WITH_LIBMAGICK_LIB");
|
||||
if(!s.isEmpty()) {
|
||||
if(!conf->checkLibrary(s, "Magick++")) {
|
||||
return false;
|
||||
}
|
||||
}else{
|
||||
QStringList sl;
|
||||
sl << "/usr/lib/";
|
||||
sl << "/usr/lib64/";
|
||||
sl << "/usr/local/lib/";
|
||||
sl << "/usr/local/lib64/";
|
||||
bool found = false;
|
||||
foreach(s, sl){
|
||||
if(conf->checkLibrary(s, "Magick++")) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!found)
|
||||
return false;
|
||||
}
|
||||
conf->addLib(QString("-L") + s);
|
||||
QProcess magickConfig;
|
||||
QStringList params;
|
||||
params << "--libs";
|
||||
magickConfig.start("Magick++-config", params, QIODevice::ReadOnly);
|
||||
magickConfig.waitForStarted();
|
||||
magickConfig.waitForFinished();
|
||||
QByteArray result = magickConfig.readAll();
|
||||
result = result.replace("\n", "");
|
||||
conf->addLib(result.data());
|
||||
conf->addDefine("HAVE_MAGICK");
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -1,70 +0,0 @@
|
||||
/*
|
||||
-----BEGIN QCMOD-----
|
||||
name: libtorrent-rasterbar
|
||||
arg: with-libtorrent-inc=[path], Path to libtorrent-rasterbar include files
|
||||
arg: with-libtorrent-lib=[path], Path to libtorrent-rasterbar library files
|
||||
arg: with-libtorrent-static-lib=[path], Path to libtorrent-rasterbar .a file
|
||||
-----END QCMOD-----
|
||||
*/
|
||||
class qc_libtorrent_rasterbar : public ConfObj
|
||||
{
|
||||
public:
|
||||
qc_libtorrent_rasterbar(Conf *c) : ConfObj(c) {}
|
||||
QString name() const { return "libtorrent-rasterbar >= 0.13"; }
|
||||
QString shortname() const { return "libtorrent-rasterbar"; }
|
||||
bool exec(){
|
||||
QString s;
|
||||
s = conf->getenv("QC_WITH_LIBTORRENT_INC");
|
||||
if(!s.isEmpty()) {
|
||||
if(!conf->checkHeader(s, "libtorrent/lsd.hpp")) {
|
||||
return false;
|
||||
}
|
||||
}else{
|
||||
QStringList sl;
|
||||
sl << "/usr/include";
|
||||
sl << "/usr/local/include";
|
||||
bool found = false;
|
||||
foreach(s, sl){
|
||||
if(conf->checkHeader(s, "libtorrent/lsd.hpp")){
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!found) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
conf->addIncludePath(s);
|
||||
conf->addIncludePath(s+QDir::separator()+"libtorrent");
|
||||
|
||||
s = conf->getenv("QC_WITH_LIBTORRENT_STATIC_LIB");
|
||||
if(!s.isEmpty() && QFile::exists(s) && s.endsWith(".a")){
|
||||
conf->addLib(s);
|
||||
return true;
|
||||
}
|
||||
|
||||
s = conf->getenv("QC_WITH_LIBTORRENT_LIB");
|
||||
if(!s.isEmpty()) {
|
||||
if(!conf->checkLibrary(s, "torrent-rasterbar")) {
|
||||
return false;
|
||||
}
|
||||
conf->addLib(QString("-L") + s);
|
||||
}else{
|
||||
QStringList sl;
|
||||
sl << "/usr/lib/";
|
||||
sl << "/usr/lib64/";
|
||||
sl << "/usr/local/lib/";
|
||||
sl << "/usr/local/lib64/";
|
||||
bool found = false;
|
||||
foreach(s, sl){
|
||||
if(conf->checkLibrary(s, "torrent-rasterbar")){
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!found) return false;
|
||||
conf->addLib(QString("-L") + s);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
68
qcm/libtorrent.qcm
Normal file
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
-----BEGIN QCMOD-----
|
||||
name: libtorrent
|
||||
arg: with-libtorrent-inc=[path], Path to libtorrent include files
|
||||
arg: with-libtorrent-lib=[path], Path to libtorrent library files
|
||||
-----END QCMOD-----
|
||||
*/
|
||||
class qc_libtorrent : public ConfObj
|
||||
{
|
||||
public:
|
||||
qc_libtorrent(Conf *c) : ConfObj(c) {}
|
||||
QString name() const { return "libtorrent >= 0.11 (>= 0.12 ADVISED)"; }
|
||||
QString shortname() const { return "libtorrent"; }
|
||||
bool exec(){
|
||||
QString s;
|
||||
s = conf->getenv("QC_WITH_LIBTORRENT_INC");
|
||||
if(!s.isEmpty()) {
|
||||
if(!conf->checkHeader(s, "libtorrent/kademlia/node.hpp")){
|
||||
return false;
|
||||
}
|
||||
if(!conf->checkHeader(s, "libtorrent/extensions/ut_pex.hpp")) {
|
||||
qWarning("Libtorrent >= v0.12 was not detected, PeX will be disabled.");
|
||||
conf->addDefine("NO_PEX");
|
||||
}
|
||||
}else{
|
||||
QStringList sl;
|
||||
sl << "/usr/include";
|
||||
sl << "/usr/local/include";
|
||||
bool found = false;
|
||||
foreach(s, sl){
|
||||
if(conf->checkHeader(s, "libtorrent/kademlia/node.hpp")){
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!found) return false;
|
||||
if(!conf->checkHeader(s, "libtorrent/extensions/ut_pex.hpp")){
|
||||
qWarning("Libtorrent >= v0.12 was not detected, PeX will be disabled.");
|
||||
conf->addDefine("NO_PEX");
|
||||
}
|
||||
}
|
||||
conf->addIncludePath(s);
|
||||
conf->addIncludePath(s+QDir::separator()+"libtorrent");
|
||||
|
||||
s = conf->getenv("QC_WITH_LIBTORRENT_LIB");
|
||||
if(!s.isEmpty()) {
|
||||
if(!conf->checkLibrary(s, "torrent")) {
|
||||
return false;
|
||||
}
|
||||
conf->addLib(QString("-L") + s);
|
||||
}else{
|
||||
QStringList sl;
|
||||
sl << "/usr/lib/";
|
||||
sl << "/usr/local/lib/";
|
||||
bool found = false;
|
||||
foreach(s, sl){
|
||||
if(conf->checkLibrary(s, "torrent")){
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!found) return false;
|
||||
conf->addLib(QString("-L") + s);
|
||||
}
|
||||
//conf->addLib("-ltorrent");
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -1,71 +0,0 @@
|
||||
/*
|
||||
-----BEGIN QCMOD-----
|
||||
name: libzzip
|
||||
arg: with-libzzip-inc=[path], Path to libzzip++ include files
|
||||
arg: with-libzzip-lib=[path], Path to libzzip++ library files
|
||||
-----END QCMOD-----
|
||||
*/
|
||||
#include <QProcess>
|
||||
class qc_libzzip : public ConfObj
|
||||
{
|
||||
public:
|
||||
qc_libzzip(Conf *c) : ConfObj(c) {}
|
||||
QString name() const { return "Zzip library (libzzip)"; }
|
||||
QString shortname() const { return "libzzip"; }
|
||||
QString checkString() const {
|
||||
if(!conf->getenv("QC_DISABLE_LIBZZIP").isEmpty())
|
||||
return "";
|
||||
return ConfObj::checkString();
|
||||
}
|
||||
bool exec(){
|
||||
if(!conf->getenv("QC_DISABLE_LIBZZIP").isEmpty())
|
||||
return false;
|
||||
QString s;
|
||||
s = conf->getenv("QC_WITH_LIBZZIP_INC");
|
||||
if(!s.isEmpty()) {
|
||||
if(!conf->checkHeader(s, "zzip/zzip.h")) {
|
||||
return false;
|
||||
}
|
||||
}else{
|
||||
QStringList sl;
|
||||
sl << "/usr/include";
|
||||
sl << "/usr/local/include";
|
||||
bool found = false;
|
||||
foreach(s, sl){
|
||||
if(conf->checkHeader(s, "zzip/zzip.h")){
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!found)
|
||||
return false;
|
||||
}
|
||||
conf->addIncludePath(s);
|
||||
|
||||
s = conf->getenv("QC_WITH_LIBZZIP_LIB");
|
||||
if(!s.isEmpty()) {
|
||||
if(!QFile::exists(s+QString("/libzzip.so"))){
|
||||
return false;
|
||||
}
|
||||
}else{
|
||||
QStringList sl;
|
||||
sl << "/usr/lib/";
|
||||
sl << "/usr/lib64/";
|
||||
sl << "/usr/local/lib/";
|
||||
sl << "/usr/local/lib64/";
|
||||
bool found = false;
|
||||
foreach(s, sl){
|
||||
if(QFile::exists(s+QString("libzzip.so"))){
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!found)
|
||||
return false;
|
||||
}
|
||||
conf->addLib(QString("-L") + s);
|
||||
conf->addLib("-lzzip");
|
||||
conf->addDefine("HAVE_ZZIP");
|
||||
return true;
|
||||
}
|
||||
};
|
||||
19
qcm/python.qcm
Normal file
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
-----BEGIN QCMOD-----
|
||||
name: python
|
||||
-----END QCMOD-----
|
||||
*/
|
||||
class qc_python : public ConfObj
|
||||
{
|
||||
public:
|
||||
qc_python(Conf *c) : ConfObj(c) {}
|
||||
QString name() const { return "python >= 2.3"; }
|
||||
QString shortname() const { return "python"; }
|
||||
bool exec(){
|
||||
int r = conf->doCommand("python testpython.py");
|
||||
if(r == 0)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
};
|
||||
20
qcm/qt4.qcm
@@ -1,20 +0,0 @@
|
||||
/*
|
||||
-----BEGIN QCMOD-----
|
||||
name: Qt >= 4.3
|
||||
-----END QCMOD-----
|
||||
*/
|
||||
class qc_qt4 : public ConfObj
|
||||
{
|
||||
public:
|
||||
qc_qt4(Conf *c) : ConfObj(c) {}
|
||||
QString name() const { return "Qt >= 4.3"; }
|
||||
QString shortname() const { return "Qt 4.3"; }
|
||||
bool exec()
|
||||
{
|
||||
if(QT_VERSION >= 0x040400) {
|
||||
conf->addDefine("QT_4_4");
|
||||
}
|
||||
return(QT_VERSION >= 0x040300);
|
||||
|
||||
}
|
||||
};
|
||||
16
qcm/qt42.qcm
Normal file
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
-----BEGIN QCMOD-----
|
||||
name: Qt >= 4.2
|
||||
-----END QCMOD-----
|
||||
*/
|
||||
class qc_qt42 : public ConfObj
|
||||
{
|
||||
public:
|
||||
qc_qt42(Conf *c) : ConfObj(c) {}
|
||||
QString name() const { return "Qt >= 4.2"; }
|
||||
QString shortname() const { return "qt42"; }
|
||||
bool exec()
|
||||
{
|
||||
return(QT_VERSION >= 0x040200);
|
||||
}
|
||||
};
|
||||
@@ -22,11 +22,10 @@
|
||||
#ifndef DLLISTDELEGATE_H
|
||||
#define DLLISTDELEGATE_H
|
||||
|
||||
#include <QItemDelegate>
|
||||
#include <QAbstractItemDelegate>
|
||||
#include <QModelIndex>
|
||||
#include <QPainter>
|
||||
#include <QStyleOptionProgressBarV2>
|
||||
#include <QStyleOptionViewItemV2>
|
||||
#include <QProgressBar>
|
||||
#include <QApplication>
|
||||
#include "misc.h"
|
||||
@@ -38,66 +37,128 @@
|
||||
#define DLSPEED 3
|
||||
#define UPSPEED 4
|
||||
#define SEEDSLEECH 5
|
||||
#define RATIO 6
|
||||
#define STATUS 6
|
||||
#define ETA 7
|
||||
#define HASH 8
|
||||
|
||||
class DLListDelegate: public QItemDelegate {
|
||||
class DLListDelegate: public QAbstractItemDelegate {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
DLListDelegate(QObject *parent) : QItemDelegate(parent){}
|
||||
DLListDelegate(QObject *parent=0) : QAbstractItemDelegate(parent){}
|
||||
|
||||
~DLListDelegate(){}
|
||||
|
||||
void paint(QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index) const{
|
||||
QStyleOptionViewItemV2 opt = QItemDelegate::setOptions(index, option);
|
||||
QStyleOptionViewItem opt = option;
|
||||
char tmp[MAX_CHAR_TMP];
|
||||
// set text color
|
||||
QVariant value = index.data(Qt::TextColorRole);
|
||||
if (value.isValid() && qvariant_cast<QColor>(value).isValid()){
|
||||
opt.palette.setColor(QPalette::Text, qvariant_cast<QColor>(value));
|
||||
}
|
||||
QPalette::ColorGroup cg = option.state & QStyle::State_Enabled
|
||||
? QPalette::Normal : QPalette::Disabled;
|
||||
if (option.state & QStyle::State_Selected){
|
||||
painter->setPen(opt.palette.color(cg, QPalette::HighlightedText));
|
||||
}else{
|
||||
painter->setPen(opt.palette.color(cg, QPalette::Text));
|
||||
}
|
||||
// draw the background color
|
||||
if(index.column() != PROGRESS){
|
||||
if (option.showDecorationSelected && (option.state & QStyle::State_Selected)){
|
||||
if (cg == QPalette::Normal && !(option.state & QStyle::State_Active)){
|
||||
cg = QPalette::Inactive;
|
||||
}
|
||||
painter->fillRect(option.rect, option.palette.brush(cg, QPalette::Highlight));
|
||||
}else{
|
||||
value = index.data(Qt::BackgroundColorRole);
|
||||
if (value.isValid() && qvariant_cast<QColor>(value).isValid()){
|
||||
painter->fillRect(option.rect, qvariant_cast<QColor>(value));
|
||||
}
|
||||
}
|
||||
}
|
||||
switch(index.column()){
|
||||
case SIZE:
|
||||
QItemDelegate::drawBackground(painter, opt, index);
|
||||
QItemDelegate::drawDisplay(painter, opt, option.rect, misc::friendlyUnit(index.data().toLongLong()));
|
||||
painter->drawText(option.rect, Qt::AlignCenter, misc::friendlyUnit(index.data().toLongLong()));
|
||||
break;
|
||||
case ETA:
|
||||
QItemDelegate::drawBackground(painter, opt, index);
|
||||
QItemDelegate::drawDisplay(painter, opt, option.rect, misc::userFriendlyDuration(index.data().toLongLong()));
|
||||
painter->drawText(option.rect, Qt::AlignCenter, misc::userFriendlyDuration(index.data().toLongLong()));
|
||||
break;
|
||||
case UPSPEED:
|
||||
case DLSPEED:{
|
||||
QItemDelegate::drawBackground(painter, opt, index);
|
||||
double speed = index.data().toDouble();
|
||||
QItemDelegate::drawDisplay(painter, opt, opt.rect, QString(QByteArray::number(speed/1024., 'f', 1))+QString::fromUtf8(" ")+tr("KiB/s"));
|
||||
break;
|
||||
}
|
||||
case RATIO:{
|
||||
QItemDelegate::drawBackground(painter, opt, index);
|
||||
double ratio = index.data().toDouble();
|
||||
QItemDelegate::drawDisplay(painter, opt, opt.rect, QString(QByteArray::number(ratio, 'f', 1)));
|
||||
float speed = index.data().toDouble();
|
||||
snprintf(tmp, MAX_CHAR_TMP, "%.1f", speed/1024.);
|
||||
painter->drawText(option.rect, Qt::AlignCenter, QString(tmp)+" "+tr("KiB/s"));
|
||||
break;
|
||||
}
|
||||
case PROGRESS:{
|
||||
QStyleOptionProgressBarV2 newopt;
|
||||
double progress = index.data().toDouble()*100.;
|
||||
float progress;
|
||||
progress = index.data().toDouble()*100.;
|
||||
snprintf(tmp, MAX_CHAR_TMP, "%.1f", progress);
|
||||
newopt.rect = opt.rect;
|
||||
newopt.text = QString(QByteArray::number(progress, 'f', 1))+QString::fromUtf8("%");
|
||||
newopt.text = QString(tmp)+"%";
|
||||
newopt.progress = (int)progress;
|
||||
newopt.maximum = 100;
|
||||
newopt.minimum = 0;
|
||||
newopt.state |= QStyle::State_Enabled;
|
||||
newopt.textVisible = true;
|
||||
newopt.textVisible = false;
|
||||
QApplication::style()->drawControl(QStyle::CE_ProgressBar, &newopt,
|
||||
painter);
|
||||
//We prefer to display text manually to control color/font/boldness
|
||||
if (option.state & QStyle::State_Selected){
|
||||
opt.palette.setColor(QPalette::Text, QColor("grey"));
|
||||
painter->setPen(opt.palette.color(cg, QPalette::Text));
|
||||
}
|
||||
painter->drawText(option.rect, Qt::AlignCenter, newopt.text);
|
||||
break;
|
||||
}
|
||||
case NAME:{
|
||||
// decoration
|
||||
value = index.data(Qt::DecorationRole);
|
||||
QPixmap pixmap = qvariant_cast<QIcon>(value).pixmap(option.decorationSize, option.state & QStyle::State_Enabled ? QIcon::Normal : QIcon::Disabled, option.state & QStyle::State_Open ? QIcon::On : QIcon::Off);
|
||||
QRect pixmapRect = (pixmap.isNull() ? QRect(0, 0, 0, 0): QRect(QPoint(0, 0), option.decorationSize));
|
||||
if (pixmapRect.isValid()){
|
||||
QPoint p = QStyle::alignedRect(option.direction, Qt::AlignLeft, pixmap.size(), option.rect).topLeft();
|
||||
painter->drawPixmap(p, pixmap);
|
||||
}
|
||||
painter->drawText(option.rect.translated(pixmap.size().width(), 0), Qt::AlignLeft, index.data().toString());
|
||||
break;
|
||||
}
|
||||
default:
|
||||
QItemDelegate::paint(painter, option, index);
|
||||
painter->drawText(option.rect, Qt::AlignCenter, index.data().toString());
|
||||
}
|
||||
}
|
||||
|
||||
QWidget* createEditor(QWidget*, const QStyleOptionViewItem &, const QModelIndex &) const {
|
||||
// No editor here
|
||||
return 0;
|
||||
QSize sizeHint(const QStyleOptionViewItem & option, const QModelIndex & index) const{
|
||||
QVariant value = index.data(Qt::FontRole);
|
||||
QFont fnt = value.isValid() ? qvariant_cast<QFont>(value) : option.font;
|
||||
QFontMetrics fontMetrics(fnt);
|
||||
const QString text = index.data(Qt::DisplayRole).toString();
|
||||
QRect textRect = QRect(0, 0, 0, fontMetrics.lineSpacing() * (text.count(QLatin1Char('\n')) + 1));
|
||||
return textRect.size();
|
||||
}
|
||||
|
||||
// QWidget* createEditor(QWidget * parent, const QStyleOptionViewItem& /*option*/, const QModelIndex & index) const{
|
||||
// if(index.column() == PROGRESS){
|
||||
// QProgressBar *progressBar = new QProgressBar(parent);
|
||||
// progressBar->setRange(0,100);
|
||||
// progressBar->installEventFilter(const_cast<DLListDelegate*>(this));
|
||||
// return progressBar;
|
||||
// }
|
||||
// return 0;
|
||||
// }
|
||||
// void setEditorData(QWidget *editor, const QModelIndex &index) const{
|
||||
// QProgressBar *progressBar = static_cast<QProgressBar*>(editor);
|
||||
// float progress = index.data().toDouble();
|
||||
// progressBar->setValue((int)(progress*100.));
|
||||
// }
|
||||
// void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex & index) const{
|
||||
// if(index.column() == PROGRESS){
|
||||
// editor->setGeometry(option.rect);
|
||||
// }
|
||||
// }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,81 +0,0 @@
|
||||
/*
|
||||
* Bittorrent Client using Qt4 and libtorrent.
|
||||
* Copyright (C) 2006 Christophe Dumez
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* Contact : chris@qbittorrent.org
|
||||
*/
|
||||
|
||||
#ifndef FINISHEDLISTDELEGATE_H
|
||||
#define FINISHEDLISTDELEGATE_H
|
||||
|
||||
#include <QItemDelegate>
|
||||
#include <QModelIndex>
|
||||
#include <QPainter>
|
||||
#include <QStyleOptionProgressBarV2>
|
||||
#include <QStyleOptionViewItemV2>
|
||||
#include <QProgressBar>
|
||||
#include <QApplication>
|
||||
#include "misc.h"
|
||||
|
||||
// Defines for download list list columns
|
||||
#define F_NAME 0
|
||||
#define F_SIZE 1
|
||||
#define F_UPSPEED 2
|
||||
#define F_LEECH 3
|
||||
#define F_RATIO 4
|
||||
#define F_HASH 5
|
||||
|
||||
class FinishedListDelegate: public QItemDelegate {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
FinishedListDelegate(QObject *parent) : QItemDelegate(parent){}
|
||||
|
||||
~FinishedListDelegate(){}
|
||||
|
||||
void paint(QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index) const{
|
||||
QStyleOptionViewItemV2 opt = QItemDelegate::setOptions(index, option);
|
||||
switch(index.column()){
|
||||
case F_SIZE:
|
||||
QItemDelegate::drawBackground(painter, opt, index);
|
||||
QItemDelegate::drawDisplay(painter, opt, option.rect, misc::friendlyUnit(index.data().toLongLong()));
|
||||
break;
|
||||
case F_UPSPEED:{
|
||||
QItemDelegate::drawBackground(painter, opt, index);
|
||||
double speed = index.data().toDouble();
|
||||
QItemDelegate::drawDisplay(painter, opt, opt.rect, QString(QByteArray::number(speed/1024., 'f', 1))+QString::fromUtf8(" ")+tr("KiB/s"));
|
||||
break;
|
||||
}
|
||||
case F_RATIO:{
|
||||
QItemDelegate::drawBackground(painter, opt, index);
|
||||
double ratio = index.data().toDouble();
|
||||
QItemDelegate::drawDisplay(painter, opt, opt.rect, QString(QByteArray::number(ratio, 'f', 1)));
|
||||
break;
|
||||
}
|
||||
default:
|
||||
QItemDelegate::paint(painter, option, index);
|
||||
}
|
||||
}
|
||||
|
||||
QWidget* createEditor(QWidget*, const QStyleOptionViewItem &, const QModelIndex &) const {
|
||||
// No editor here
|
||||
return 0;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,602 +0,0 @@
|
||||
/*
|
||||
* Bittorrent Client using Qt4 and libtorrent.
|
||||
* Copyright (C) 2006 Christophe Dumez
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* Contact : chris@qbittorrent.org
|
||||
*/
|
||||
#include "FinishedTorrents.h"
|
||||
#include "misc.h"
|
||||
#include "properties_imp.h"
|
||||
#include "bittorrent.h"
|
||||
#include "allocationDlg.h"
|
||||
#include "FinishedListDelegate.h"
|
||||
#include "GUI.h"
|
||||
|
||||
#include <QFile>
|
||||
#include <QSettings>
|
||||
#include <QStandardItemModel>
|
||||
#include <QHeaderView>
|
||||
#include <QMenu>
|
||||
#include <QMessageBox>
|
||||
|
||||
FinishedTorrents::FinishedTorrents(QObject *parent, bittorrent *BTSession) : parent(parent), BTSession(BTSession), nbFinished(0){
|
||||
setupUi(this);
|
||||
actionStart->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/play.png")));
|
||||
actionPause->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/pause.png")));
|
||||
connect(BTSession, SIGNAL(addedTorrent(QString, QTorrentHandle&, bool)), this, SLOT(torrentAdded(QString, QTorrentHandle&, bool)));
|
||||
finishedListModel = new QStandardItemModel(0,6);
|
||||
finishedListModel->setHeaderData(F_NAME, Qt::Horizontal, tr("Name", "i.e: file name"));
|
||||
finishedListModel->setHeaderData(F_SIZE, Qt::Horizontal, tr("Size", "i.e: file size"));
|
||||
finishedListModel->setHeaderData(F_UPSPEED, Qt::Horizontal, tr("UP Speed", "i.e: Upload speed"));
|
||||
finishedListModel->setHeaderData(F_LEECH, Qt::Horizontal, tr("Leechers", "i.e: full/partial sources"));
|
||||
finishedListModel->setHeaderData(F_RATIO, Qt::Horizontal, tr("Ratio"));
|
||||
finishedList->setModel(finishedListModel);
|
||||
loadHiddenColumns();
|
||||
// Hide hash column
|
||||
finishedList->hideColumn(F_HASH);
|
||||
// Load last columns width for download list
|
||||
if(!loadColWidthFinishedList()){
|
||||
finishedList->header()->resizeSection(0, 200);
|
||||
}
|
||||
// Make download list header clickable for sorting
|
||||
finishedList->header()->setClickable(true);
|
||||
finishedList->header()->setSortIndicatorShown(true);
|
||||
connect(finishedList->header(), SIGNAL(sectionPressed(int)), this, SLOT(sortFinishedList(int)));
|
||||
finishedListDelegate = new FinishedListDelegate(finishedList);
|
||||
finishedList->setItemDelegate(finishedListDelegate);
|
||||
connect(finishedList, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(displayFinishedListMenu(const QPoint&)));
|
||||
finishedList->header()->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
connect(finishedList->header(), SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(displayFinishedHoSMenu(const QPoint&)));
|
||||
|
||||
connect(finishedList, SIGNAL(doubleClicked(const QModelIndex&)), this, SLOT(notifyTorrentDoubleClicked(const QModelIndex&)));
|
||||
actionDelete->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/delete.png")));
|
||||
actionPreview_file->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/preview.png")));
|
||||
actionDelete_Permanently->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/delete_perm.png")));
|
||||
actionTorrent_Properties->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/properties.png")));
|
||||
actionSet_upload_limit->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/seeding.png")));
|
||||
connect(actionPause, SIGNAL(triggered()), (GUI*)parent, SLOT(on_actionPause_triggered()));
|
||||
connect(actionStart, SIGNAL(triggered()), (GUI*)parent, SLOT(on_actionStart_triggered()));
|
||||
connect(actionDelete, SIGNAL(triggered()), (GUI*)parent, SLOT(on_actionDelete_triggered()));
|
||||
connect(actionPreview_file, SIGNAL(triggered()), (GUI*)parent, SLOT(on_actionPreview_file_triggered()));
|
||||
connect(actionDelete_Permanently, SIGNAL(triggered()), (GUI*)parent, SLOT(on_actionDelete_Permanently_triggered()));
|
||||
connect(actionOpen_destination_folder, SIGNAL(triggered()), (GUI*)parent, SLOT(openDestinationFolder()));
|
||||
connect(actionBuy_it, SIGNAL(triggered()), (GUI*)parent, SLOT(goBuyPage()));
|
||||
connect(actionTorrent_Properties, SIGNAL(triggered()), this, SLOT(propertiesSelection()));
|
||||
|
||||
connect(actionHOSColName, SIGNAL(triggered()), this, SLOT(hideOrShowColumnName()));
|
||||
connect(actionHOSColSize, SIGNAL(triggered()), this, SLOT(hideOrShowColumnSize()));
|
||||
connect(actionHOSColUpSpeed, SIGNAL(triggered()), this, SLOT(hideOrShowColumnUpSpeed()));
|
||||
connect(actionHOSColLeechers, SIGNAL(triggered()), this, SLOT(hideOrShowColumnLeechers()));
|
||||
connect(actionHOSColRatio, SIGNAL(triggered()), this, SLOT(hideOrShowColumnRatio()));
|
||||
}
|
||||
|
||||
FinishedTorrents::~FinishedTorrents(){
|
||||
saveColWidthFinishedList();
|
||||
saveHiddenColumns();
|
||||
delete finishedListDelegate;
|
||||
delete finishedListModel;
|
||||
}
|
||||
|
||||
void FinishedTorrents::notifyTorrentDoubleClicked(const QModelIndex& index) {
|
||||
unsigned int row = index.row();
|
||||
QString hash = getHashFromRow(row);
|
||||
emit torrentDoubleClicked(hash, true);
|
||||
}
|
||||
|
||||
void FinishedTorrents::addTorrent(QString hash){
|
||||
if(!BTSession->isFinished(hash)){
|
||||
BTSession->setFinishedTorrent(hash);
|
||||
}
|
||||
int row = getRowFromHash(hash);
|
||||
if(row != -1) return;
|
||||
row = finishedListModel->rowCount();
|
||||
QTorrentHandle h = BTSession->getTorrentHandle(hash);
|
||||
// Adding torrent to download list
|
||||
finishedListModel->insertRow(row);
|
||||
finishedListModel->setData(finishedListModel->index(row, F_NAME), QVariant(h.name()));
|
||||
finishedListModel->setData(finishedListModel->index(row, F_SIZE), QVariant((qlonglong)h.actual_size()));
|
||||
finishedListModel->setData(finishedListModel->index(row, F_UPSPEED), QVariant((double)0.));
|
||||
finishedListModel->setData(finishedListModel->index(row, F_LEECH), QVariant("0"));
|
||||
finishedListModel->setData(finishedListModel->index(row, F_RATIO), QVariant(QString::fromUtf8(misc::toString(BTSession->getRealRatio(hash)).c_str())));
|
||||
finishedListModel->setData(finishedListModel->index(row, F_HASH), QVariant(hash));
|
||||
if(h.is_paused()) {
|
||||
finishedListModel->setData(finishedListModel->index(row, F_NAME), QIcon(":/Icons/skin/paused.png"), Qt::DecorationRole);
|
||||
setRowColor(row, "red");
|
||||
}else{
|
||||
finishedListModel->setData(finishedListModel->index(row, F_NAME), QVariant(QIcon(":/Icons/skin/seeding.png")), Qt::DecorationRole);
|
||||
setRowColor(row, "orange");
|
||||
}
|
||||
// Update the number of finished torrents
|
||||
++nbFinished;
|
||||
emit finishedTorrentsNumberChanged(nbFinished);
|
||||
}
|
||||
|
||||
void FinishedTorrents::torrentAdded(QString, QTorrentHandle& h, bool) {
|
||||
QString hash = h.hash();
|
||||
if(BTSession->isFinished(hash)) {
|
||||
addTorrent(hash);
|
||||
}
|
||||
}
|
||||
|
||||
// Set the color of a row in data model
|
||||
void FinishedTorrents::setRowColor(int row, QString color){
|
||||
unsigned int nbColumns = finishedListModel->columnCount()-1;
|
||||
for(unsigned int i=0; i<nbColumns; ++i){
|
||||
finishedListModel->setData(finishedListModel->index(row, i), QVariant(QColor(color)), Qt::ForegroundRole);
|
||||
}
|
||||
}
|
||||
|
||||
QStringList FinishedTorrents::getSelectedTorrents(bool only_one) const{
|
||||
QStringList res;
|
||||
QModelIndex index;
|
||||
QModelIndexList selectedIndexes = finishedList->selectionModel()->selectedIndexes();
|
||||
foreach(index, selectedIndexes) {
|
||||
if(index.column() == F_NAME) {
|
||||
// Get the file hash
|
||||
QString hash = finishedListModel->data(finishedListModel->index(index.row(), F_HASH)).toString();
|
||||
res << hash;
|
||||
if(only_one) break;
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
unsigned int FinishedTorrents::getNbTorrentsInList() const {
|
||||
return nbFinished;
|
||||
}
|
||||
|
||||
// Load columns width in a file that were saved previously
|
||||
// (finished list)
|
||||
bool FinishedTorrents::loadColWidthFinishedList(){
|
||||
qDebug("Loading columns width for finished list");
|
||||
QSettings settings("qBittorrent", "qBittorrent");
|
||||
QString line = settings.value("FinishedListColsWidth", QString()).toString();
|
||||
if(line.isEmpty())
|
||||
return false;
|
||||
QStringList width_list = line.split(' ');
|
||||
if(width_list.size() < finishedListModel->columnCount()-1)
|
||||
return false;
|
||||
unsigned int listSize = width_list.size();
|
||||
for(unsigned int i=0; i<listSize; ++i){
|
||||
finishedList->header()->resizeSection(i, width_list.at(i).toInt());
|
||||
}
|
||||
qDebug("Finished list columns width loaded");
|
||||
return true;
|
||||
}
|
||||
|
||||
// Save columns width in a file to remember them
|
||||
// (finished list)
|
||||
void FinishedTorrents::saveColWidthFinishedList() const{
|
||||
qDebug("Saving columns width in finished list");
|
||||
QSettings settings("qBittorrent", "qBittorrent");
|
||||
QStringList width_list;
|
||||
QStringList new_width_list;
|
||||
short nbColumns = finishedListModel->columnCount()-1;
|
||||
|
||||
QString line = settings.value("FinishedListColsWidth", QString()).toString();
|
||||
if(!line.isEmpty()) {
|
||||
width_list = line.split(' ');
|
||||
}
|
||||
for(short i=0; i<nbColumns; ++i){
|
||||
if(finishedList->columnWidth(i)<1 && width_list.size() == finishedListModel->columnCount()-1 && width_list.at(i).toInt()>=1) {
|
||||
// load the former width
|
||||
new_width_list << width_list.at(i);
|
||||
} else if(finishedList->columnWidth(i)>=1) {
|
||||
// usual case, save the current width
|
||||
new_width_list << QString::fromUtf8(misc::toString(finishedList->columnWidth(i)).c_str());
|
||||
} else {
|
||||
// default width
|
||||
finishedList->resizeColumnToContents(i);
|
||||
new_width_list << QString::fromUtf8(misc::toString(finishedList->columnWidth(i)).c_str());
|
||||
}
|
||||
}
|
||||
settings.setValue("FinishedListColsWidth", new_width_list.join(" "));
|
||||
qDebug("Finished list columns width saved");
|
||||
}
|
||||
|
||||
void FinishedTorrents::on_actionSet_upload_limit_triggered(){
|
||||
QModelIndexList selectedIndexes = finishedList->selectionModel()->selectedIndexes();
|
||||
QModelIndex index;
|
||||
QStringList hashes;
|
||||
foreach(index, selectedIndexes){
|
||||
if(index.column() == F_NAME){
|
||||
// Get the file hash
|
||||
hashes << finishedListModel->data(finishedListModel->index(index.row(), F_HASH)).toString();
|
||||
}
|
||||
}
|
||||
new BandwidthAllocationDialog(this, true, BTSession, hashes);
|
||||
}
|
||||
|
||||
void FinishedTorrents::updateFinishedList(){
|
||||
QString hash;
|
||||
QStringList finishedSHAs = BTSession->getFinishedTorrents();
|
||||
foreach(hash, finishedSHAs){
|
||||
QTorrentHandle h = BTSession->getTorrentHandle(hash);
|
||||
if(!h.is_valid()){
|
||||
qDebug("Problem: This torrent is not valid in finished list");
|
||||
continue;
|
||||
}
|
||||
int row = getRowFromHash(hash);
|
||||
if(row == -1){
|
||||
qDebug("Cannot find torrent in finished list, adding it");
|
||||
addTorrent(hash);
|
||||
row = getRowFromHash(hash);
|
||||
}
|
||||
Q_ASSERT(row != -1);
|
||||
if(h.is_paused()) continue;
|
||||
if(BTSession->getTorrentsToPauseAfterChecking().indexOf(hash) != -1) {
|
||||
continue;
|
||||
}
|
||||
if(h.state() == torrent_status::downloading || (h.state() != torrent_status::checking_files && h.state() != torrent_status::queued_for_checking && h.progress() < 1.)) {
|
||||
// What are you doing here? go back to download tab!
|
||||
int reponse = QMessageBox::question(this, tr("Incomplete torrent in seeding list"), tr("It appears that the state of '%1' torrent changed from 'seeding' to 'downloading'. Would you like to move it back to download list? (otherwise the torrent will simply be deleted)").arg(h.name()), QMessageBox::Yes | QMessageBox::No);
|
||||
if (reponse == QMessageBox::Yes) {
|
||||
qDebug("Info: a torrent was moved from finished to download tab");
|
||||
deleteTorrent(hash);
|
||||
BTSession->setFinishedTorrent(hash);
|
||||
emit torrentMovedFromFinishedList(hash);
|
||||
}
|
||||
else if (reponse == QMessageBox::No) {
|
||||
qDebug("Deleted from the finished");
|
||||
BTSession->deleteTorrent(hash, true);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if(h.state() == torrent_status::checking_files){
|
||||
finishedListModel->setData(finishedListModel->index(row, F_NAME), QVariant(QIcon(QString::fromUtf8(":/Icons/time.png"))), Qt::DecorationRole);
|
||||
setRowColor(row, QString::fromUtf8("grey"));
|
||||
continue;
|
||||
}
|
||||
setRowColor(row, QString::fromUtf8("orange"));
|
||||
finishedListModel->setData(finishedListModel->index(row, F_NAME), QVariant(QIcon(QString::fromUtf8(":/Icons/skin/seeding.png"))), Qt::DecorationRole);
|
||||
if(!finishedList->isColumnHidden(F_UPSPEED)) {
|
||||
finishedListModel->setData(finishedListModel->index(row, F_UPSPEED), QVariant((double)h.upload_payload_rate()));
|
||||
}
|
||||
if(!finishedList->isColumnHidden(F_LEECH)) {
|
||||
finishedListModel->setData(finishedListModel->index(row, F_LEECH), misc::toQString(h.num_peers() - h.num_seeds(), true));
|
||||
}
|
||||
if(!finishedList->isColumnHidden(F_RATIO)) {
|
||||
finishedListModel->setData(finishedListModel->index(row, F_RATIO), QVariant(misc::toQString(BTSession->getRealRatio(hash))));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int FinishedTorrents::getRowFromHash(QString hash) const{
|
||||
unsigned int nbRows = finishedListModel->rowCount();
|
||||
for(unsigned int i=0; i<nbRows; ++i){
|
||||
if(finishedListModel->data(finishedListModel->index(i, F_HASH)) == hash){
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Note: does not actually pause the torrent in BT Session
|
||||
void FinishedTorrents::pauseTorrent(QString hash) {
|
||||
int row = getRowFromHash(hash);
|
||||
if(row == -1)
|
||||
return;
|
||||
finishedListModel->setData(finishedListModel->index(row, F_UPSPEED), QVariant((double)0.0));
|
||||
finishedListModel->setData(finishedListModel->index(row, F_NAME), QIcon(QString::fromUtf8(":/Icons/skin/paused.png")), Qt::DecorationRole);
|
||||
finishedListModel->setData(finishedListModel->index(row, F_LEECH), QVariant(QString::fromUtf8("0")));
|
||||
setRowColor(row, QString::fromUtf8("red"));
|
||||
}
|
||||
|
||||
void FinishedTorrents::resumeTorrent(QString hash) {
|
||||
int row = getRowFromHash(hash);
|
||||
Q_ASSERT(row != -1);
|
||||
finishedListModel->setData(finishedListModel->index(row, F_NAME), QVariant(QIcon(QString::fromUtf8(":/Icons/skin/seeding.png"))), Qt::DecorationRole);
|
||||
setRowColor(row, QString::fromUtf8("orange"));
|
||||
}
|
||||
|
||||
QString FinishedTorrents::getHashFromRow(unsigned int row) const {
|
||||
Q_ASSERT(row < (unsigned int)finishedListModel->rowCount());
|
||||
return finishedListModel->data(finishedListModel->index(row, F_HASH)).toString();
|
||||
}
|
||||
|
||||
// Will move it to download tab
|
||||
void FinishedTorrents::deleteTorrent(QString hash){
|
||||
int row = getRowFromHash(hash);
|
||||
if(row == -1){
|
||||
qDebug("Torrent is not in finished list, nothing to delete");
|
||||
return;
|
||||
}
|
||||
finishedListModel->removeRow(row);
|
||||
--nbFinished;
|
||||
emit finishedTorrentsNumberChanged(nbFinished);
|
||||
}
|
||||
|
||||
// Show torrent properties dialog
|
||||
void FinishedTorrents::showProperties(const QModelIndex &index){
|
||||
showPropertiesFromHash(finishedListModel->data(finishedListModel->index(index.row(), F_HASH)).toString());
|
||||
}
|
||||
|
||||
void FinishedTorrents::showPropertiesFromHash(QString hash){
|
||||
QTorrentHandle h = BTSession->getTorrentHandle(hash);
|
||||
properties *prop = new properties(this, BTSession, h);
|
||||
connect(prop, SIGNAL(filteredFilesChanged(QString)), this, SLOT(updateFileSize(QString)));
|
||||
connect(prop, SIGNAL(trackersChanged(QString)), BTSession, SLOT(saveTrackerFile(QString)));
|
||||
prop->show();
|
||||
}
|
||||
|
||||
void FinishedTorrents::updateFileSize(QString hash){
|
||||
int row = getRowFromHash(hash);
|
||||
QTorrentHandle h = BTSession->getTorrentHandle(hash);
|
||||
finishedListModel->setData(finishedListModel->index(row, F_SIZE), QVariant((qlonglong)h.actual_size()));
|
||||
}
|
||||
|
||||
// display properties of selected items
|
||||
void FinishedTorrents::propertiesSelection(){
|
||||
QModelIndexList selectedIndexes = finishedList->selectionModel()->selectedIndexes();
|
||||
QModelIndex index;
|
||||
foreach(index, selectedIndexes){
|
||||
if(index.column() == F_NAME){
|
||||
showProperties(index);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void FinishedTorrents::displayFinishedListMenu(const QPoint& pos){
|
||||
QMenu myFinishedListMenu(this);
|
||||
QModelIndex index;
|
||||
// Enable/disable pause/start action given the DL state
|
||||
QModelIndexList selectedIndexes = finishedList->selectionModel()->selectedIndexes();
|
||||
bool has_pause = false, has_start = false, has_preview = false;
|
||||
foreach(index, selectedIndexes) {
|
||||
if(index.column() == F_NAME) {
|
||||
// Get the file name
|
||||
QString hash = finishedListModel->data(finishedListModel->index(index.row(), F_HASH)).toString();
|
||||
// Get handle and pause the torrent
|
||||
QTorrentHandle h = BTSession->getTorrentHandle(hash);
|
||||
if(!h.is_valid()) continue;
|
||||
if(h.is_paused()) {
|
||||
if(!has_start) {
|
||||
myFinishedListMenu.addAction(actionStart);
|
||||
has_start = true;
|
||||
}
|
||||
}else{
|
||||
if(!has_pause) {
|
||||
myFinishedListMenu.addAction(actionPause);
|
||||
has_pause = true;
|
||||
}
|
||||
}
|
||||
if(BTSession->isFilePreviewPossible(hash) && !has_preview) {
|
||||
myFinishedListMenu.addAction(actionPreview_file);
|
||||
has_preview = true;
|
||||
}
|
||||
if(has_pause && has_start && has_preview) break;
|
||||
}
|
||||
}
|
||||
myFinishedListMenu.addSeparator();
|
||||
myFinishedListMenu.addAction(actionDelete);
|
||||
myFinishedListMenu.addAction(actionDelete_Permanently);
|
||||
myFinishedListMenu.addSeparator();
|
||||
myFinishedListMenu.addAction(actionSet_upload_limit);
|
||||
myFinishedListMenu.addSeparator();
|
||||
myFinishedListMenu.addAction(actionOpen_destination_folder);
|
||||
myFinishedListMenu.addAction(actionTorrent_Properties);
|
||||
myFinishedListMenu.addSeparator();
|
||||
myFinishedListMenu.addAction(actionBuy_it);
|
||||
|
||||
// Call menu
|
||||
// XXX: why mapToGlobal() is not enough?
|
||||
myFinishedListMenu.exec(mapToGlobal(pos)+QPoint(10,59));
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Hiding Columns functions
|
||||
*/
|
||||
|
||||
// hide/show columns menu
|
||||
void FinishedTorrents::displayFinishedHoSMenu(const QPoint& pos){
|
||||
QMenu hideshowColumn(this);
|
||||
hideshowColumn.setTitle(tr("Hide or Show Column"));
|
||||
for(int i=0; i<=F_RATIO; i++) {
|
||||
hideshowColumn.addAction(getActionHoSCol(i));
|
||||
}
|
||||
// Call menu
|
||||
hideshowColumn.exec(mapToGlobal(pos)+QPoint(10,32));
|
||||
}
|
||||
|
||||
// toggle hide/show a column
|
||||
void FinishedTorrents::hideOrShowColumn(int index) {
|
||||
unsigned int nbVisibleColumns = 0;
|
||||
unsigned int nbCols = finishedListModel->columnCount();
|
||||
// Count visible columns
|
||||
for(unsigned int i=0; i<nbCols; ++i) {
|
||||
if(!finishedList->isColumnHidden(i))
|
||||
++nbVisibleColumns;
|
||||
}
|
||||
if(!finishedList->isColumnHidden(index)) {
|
||||
// User wants to hide the column
|
||||
// Is there at least one other visible column?
|
||||
if(nbVisibleColumns <= 1) return;
|
||||
// User can hide the column, do it.
|
||||
finishedList->setColumnHidden(index, true);
|
||||
getActionHoSCol(index)->setIcon(QIcon(QString::fromUtf8(":/Icons/button_cancel.png")));
|
||||
--nbVisibleColumns;
|
||||
} else {
|
||||
// User want to display the column
|
||||
finishedList->setColumnHidden(index, false);
|
||||
getActionHoSCol(index)->setIcon(QIcon(QString::fromUtf8(":/Icons/button_ok.png")));
|
||||
++nbVisibleColumns;
|
||||
}
|
||||
//resize all others non-hidden columns
|
||||
for(unsigned int i=0; i<nbCols; ++i) {
|
||||
if(!finishedList->isColumnHidden(i)) {
|
||||
finishedList->setColumnWidth(i, (int)ceil(finishedList->columnWidth(i)+(finishedList->columnWidth(index)/nbVisibleColumns)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void FinishedTorrents::hideOrShowColumnName() {
|
||||
hideOrShowColumn(F_NAME);
|
||||
}
|
||||
|
||||
void FinishedTorrents::hideOrShowColumnSize() {
|
||||
hideOrShowColumn(F_SIZE);
|
||||
}
|
||||
|
||||
void FinishedTorrents::hideOrShowColumnUpSpeed() {
|
||||
hideOrShowColumn(F_UPSPEED);
|
||||
}
|
||||
|
||||
void FinishedTorrents::hideOrShowColumnLeechers() {
|
||||
hideOrShowColumn(F_LEECH);
|
||||
}
|
||||
|
||||
void FinishedTorrents::hideOrShowColumnRatio() {
|
||||
hideOrShowColumn(F_RATIO);
|
||||
}
|
||||
|
||||
// load the previous settings, and hide the columns
|
||||
bool FinishedTorrents::loadHiddenColumns() {
|
||||
bool loaded = false;
|
||||
QSettings settings("qBittorrent", "qBittorrent");
|
||||
QString line = settings.value("FinishedListColsHoS", QString()).toString();
|
||||
QStringList ishidden_list;
|
||||
if(!line.isEmpty()) {
|
||||
ishidden_list = line.split(' ');
|
||||
if(ishidden_list.size() == finishedListModel->columnCount()-1) {
|
||||
unsigned int listSize = ishidden_list.size();
|
||||
for(unsigned int i=0; i<listSize; ++i){
|
||||
finishedList->header()->resizeSection(i, ishidden_list.at(i).toInt());
|
||||
}
|
||||
loaded = true;
|
||||
}
|
||||
}
|
||||
for(int i=0; i<finishedListModel->columnCount()-1; i++) {
|
||||
if(loaded && ishidden_list.at(i) == "0") {
|
||||
finishedList->setColumnHidden(i, true);
|
||||
getActionHoSCol(i)->setIcon(QIcon(QString::fromUtf8(":/Icons/button_cancel.png")));
|
||||
} else {
|
||||
getActionHoSCol(i)->setIcon(QIcon(QString::fromUtf8(":/Icons/button_ok.png")));
|
||||
}
|
||||
}
|
||||
return loaded;
|
||||
}
|
||||
|
||||
// save the hidden columns in settings
|
||||
void FinishedTorrents::saveHiddenColumns() {
|
||||
QSettings settings("qBittorrent", "qBittorrent");
|
||||
QStringList ishidden_list;
|
||||
short nbColumns = finishedListModel->columnCount()-1;
|
||||
|
||||
for(short i=0; i<nbColumns; ++i){
|
||||
if(finishedList->isColumnHidden(i)) {
|
||||
ishidden_list << QString::fromUtf8(misc::toString(0).c_str());
|
||||
} else {
|
||||
ishidden_list << QString::fromUtf8(misc::toString(1).c_str());
|
||||
}
|
||||
}
|
||||
settings.setValue("FinishedListColsHoS", ishidden_list.join(" "));
|
||||
}
|
||||
|
||||
// getter, return the action hide or show whose id is index
|
||||
QAction* FinishedTorrents::getActionHoSCol(int index) {
|
||||
switch(index) {
|
||||
case F_NAME :
|
||||
return actionHOSColName;
|
||||
break;
|
||||
case F_SIZE :
|
||||
return actionHOSColSize;
|
||||
break;
|
||||
case F_UPSPEED :
|
||||
return actionHOSColUpSpeed;
|
||||
break;
|
||||
case F_LEECH :
|
||||
return actionHOSColLeechers;
|
||||
break;
|
||||
case F_RATIO :
|
||||
return actionHOSColRatio;
|
||||
break;
|
||||
default :
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Sorting functions
|
||||
*/
|
||||
|
||||
void FinishedTorrents::sortFinishedList(int index){
|
||||
static Qt::SortOrder sortOrder = Qt::AscendingOrder;
|
||||
if(finishedList->header()->sortIndicatorSection() == index){
|
||||
if(sortOrder == Qt::AscendingOrder){
|
||||
sortOrder = Qt::DescendingOrder;
|
||||
}else{
|
||||
sortOrder = Qt::AscendingOrder;
|
||||
}
|
||||
}
|
||||
finishedList->header()->setSortIndicator(index, sortOrder);
|
||||
switch(index){
|
||||
case F_SIZE:
|
||||
case F_UPSPEED:
|
||||
sortFinishedListFloat(index, sortOrder);
|
||||
break;
|
||||
default:
|
||||
sortFinishedListString(index, sortOrder);
|
||||
}
|
||||
}
|
||||
|
||||
void FinishedTorrents::sortFinishedListFloat(int index, Qt::SortOrder sortOrder){
|
||||
QList<QPair<int, double> > lines;
|
||||
// insertion sorting
|
||||
unsigned int nbRows = finishedListModel->rowCount();
|
||||
for(unsigned int i=0; i<nbRows; ++i){
|
||||
misc::insertSort(lines, QPair<int,double>(i, finishedListModel->data(finishedListModel->index(i, index)).toDouble()), sortOrder);
|
||||
}
|
||||
// Insert items in new model, in correct order
|
||||
unsigned int nbRows_old = lines.size();
|
||||
for(unsigned int row=0; row<nbRows_old; ++row){
|
||||
finishedListModel->insertRow(finishedListModel->rowCount());
|
||||
unsigned int sourceRow = lines[row].first;
|
||||
unsigned int nbColumns = finishedListModel->columnCount();
|
||||
for(unsigned int col=0; col<nbColumns; ++col){
|
||||
finishedListModel->setData(finishedListModel->index(nbRows_old+row, col), finishedListModel->data(finishedListModel->index(sourceRow, col)));
|
||||
finishedListModel->setData(finishedListModel->index(nbRows_old+row, col), finishedListModel->data(finishedListModel->index(sourceRow, col), Qt::DecorationRole), Qt::DecorationRole);
|
||||
finishedListModel->setData(finishedListModel->index(nbRows_old+row, col), finishedListModel->data(finishedListModel->index(sourceRow, col), Qt::ForegroundRole), Qt::ForegroundRole);
|
||||
}
|
||||
}
|
||||
// Remove old rows
|
||||
finishedListModel->removeRows(0, nbRows_old);
|
||||
}
|
||||
|
||||
void FinishedTorrents::sortFinishedListString(int index, Qt::SortOrder sortOrder){
|
||||
QList<QPair<int, QString> > lines;
|
||||
// Insertion sorting
|
||||
unsigned int nbRows = finishedListModel->rowCount();
|
||||
for(unsigned int i=0; i<nbRows; ++i){
|
||||
misc::insertSortString(lines, QPair<int, QString>(i, finishedListModel->data(finishedListModel->index(i, index)).toString()), sortOrder);
|
||||
}
|
||||
// Insert items in new model, in correct order
|
||||
unsigned int nbRows_old = lines.size();
|
||||
for(unsigned int row=0; row<nbRows_old; ++row){
|
||||
finishedListModel->insertRow(finishedListModel->rowCount());
|
||||
unsigned int sourceRow = lines[row].first;
|
||||
unsigned int nbColumns = finishedListModel->columnCount();
|
||||
for(unsigned int col=0; col<nbColumns; ++col){
|
||||
finishedListModel->setData(finishedListModel->index(nbRows_old+row, col), finishedListModel->data(finishedListModel->index(sourceRow, col)));
|
||||
finishedListModel->setData(finishedListModel->index(nbRows_old+row, col), finishedListModel->data(finishedListModel->index(sourceRow, col), Qt::DecorationRole), Qt::DecorationRole);
|
||||
finishedListModel->setData(finishedListModel->index(nbRows_old+row, col), finishedListModel->data(finishedListModel->index(sourceRow, col), Qt::ForegroundRole), Qt::ForegroundRole);
|
||||
}
|
||||
}
|
||||
// Remove old rows
|
||||
finishedListModel->removeRows(0, nbRows_old);
|
||||
}
|
||||
@@ -1,92 +0,0 @@
|
||||
/*
|
||||
* Bittorrent Client using Qt4 and libtorrent.
|
||||
* Copyright (C) 2006 Christophe Dumez
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* Contact : chris@qbittorrent.org
|
||||
*/
|
||||
|
||||
#ifndef SEEDING_H
|
||||
#define SEEDING_H
|
||||
|
||||
#include "ui_seeding.h"
|
||||
#include "qtorrenthandle.h"
|
||||
|
||||
class QStandardItemModel;
|
||||
class bittorrent;
|
||||
class FinishedListDelegate;
|
||||
|
||||
using namespace libtorrent;
|
||||
|
||||
class FinishedTorrents : public QWidget, public Ui::seeding {
|
||||
Q_OBJECT
|
||||
private:
|
||||
QObject *parent;
|
||||
bittorrent *BTSession;
|
||||
FinishedListDelegate *finishedListDelegate;
|
||||
QStandardItemModel *finishedListModel;
|
||||
unsigned int nbFinished;
|
||||
void hideOrShowColumn(int index);
|
||||
bool loadHiddenColumns();
|
||||
void saveHiddenColumns();
|
||||
QAction* getActionHoSCol(int index);
|
||||
|
||||
public:
|
||||
FinishedTorrents(QObject *parent, bittorrent *BTSession);
|
||||
~FinishedTorrents();
|
||||
// Methods
|
||||
bool loadColWidthFinishedList();
|
||||
int getRowFromHash(QString hash) const;
|
||||
QStringList getSelectedTorrents(bool only_one=false) const;
|
||||
unsigned int getNbTorrentsInList() const;
|
||||
QString getHashFromRow(unsigned int row) const;
|
||||
|
||||
protected slots:
|
||||
void showProperties(const QModelIndex &index);
|
||||
void displayFinishedListMenu(const QPoint&);
|
||||
void displayFinishedHoSMenu(const QPoint&);
|
||||
void setRowColor(int row, QString color);
|
||||
void saveColWidthFinishedList() const;
|
||||
void sortFinishedList(int index);
|
||||
void sortFinishedListFloat(int index, Qt::SortOrder sortOrder);
|
||||
void sortFinishedListString(int index, Qt::SortOrder sortOrder);
|
||||
void updateFileSize(QString hash);
|
||||
void torrentAdded(QString path, QTorrentHandle& h, bool fastResume);
|
||||
void on_actionSet_upload_limit_triggered();
|
||||
void notifyTorrentDoubleClicked(const QModelIndex& index);
|
||||
void hideOrShowColumnName();
|
||||
void hideOrShowColumnSize();
|
||||
void hideOrShowColumnUpSpeed();
|
||||
void hideOrShowColumnLeechers();
|
||||
void hideOrShowColumnRatio();
|
||||
|
||||
public slots:
|
||||
void addTorrent(QString hash);
|
||||
void updateFinishedList();
|
||||
void pauseTorrent(QString hash);
|
||||
void resumeTorrent(QString hash);
|
||||
void propertiesSelection();
|
||||
void deleteTorrent(QString hash);
|
||||
void showPropertiesFromHash(QString hash);
|
||||
|
||||
signals:
|
||||
void torrentMovedFromFinishedList(QString);
|
||||
void torrentDoubleClicked(QString hash, bool finished);
|
||||
void finishedTorrentsNumberChanged(unsigned int);
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
2579
src/GUI.cpp
233
src/GUI.h
@@ -22,151 +22,167 @@
|
||||
#ifndef GUI_H
|
||||
#define GUI_H
|
||||
|
||||
#include <QMainWindow>
|
||||
#include <QProcess>
|
||||
#include <QTcpServer>
|
||||
#include <QSystemTrayIcon>
|
||||
|
||||
#include "ui_MainWindow.h"
|
||||
#include "qtorrenthandle.h"
|
||||
#include <libtorrent/entry.hpp>
|
||||
#include <libtorrent/bencode.hpp>
|
||||
#include <libtorrent/session.hpp>
|
||||
#include <libtorrent/fingerprint.hpp>
|
||||
#include <libtorrent/session_settings.hpp>
|
||||
#include <libtorrent/identify_client.hpp>
|
||||
#include <libtorrent/alert_types.hpp>
|
||||
|
||||
#include "ui_MainWindow.h"
|
||||
#include "options_imp.h"
|
||||
#include "about_imp.h"
|
||||
#include "previewSelect.h"
|
||||
#include "trackerLogin.h"
|
||||
#include "bittorrent.h"
|
||||
|
||||
|
||||
#define TIME_TRAY_BALLOON 5000
|
||||
|
||||
class bittorrent;
|
||||
class createtorrent;
|
||||
class QTimer;
|
||||
class DownloadingTorrents;
|
||||
class FinishedTorrents;
|
||||
class QCompleter;
|
||||
class DLListDelegate;
|
||||
class SearchListDelegate;
|
||||
class downloadThread;
|
||||
class downloadFromURL;
|
||||
class SearchEngine;
|
||||
#ifdef QT_4_4
|
||||
class QLocalServer;
|
||||
class QLocalSocket;
|
||||
#else
|
||||
class QTcpServer;
|
||||
class QTcpSocket;
|
||||
#endif
|
||||
class QTcpSocket;
|
||||
class QCloseEvent;
|
||||
class RSSImp;
|
||||
class QShortcut;
|
||||
class about;
|
||||
class previewSelect;
|
||||
class options_imp;
|
||||
class QTabWidget;
|
||||
class QLabel;
|
||||
class QModelIndex;
|
||||
class HttpServer;
|
||||
|
||||
using namespace libtorrent;
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
class GUI : public QMainWindow, private Ui::MainWindow{
|
||||
Q_OBJECT
|
||||
|
||||
private:
|
||||
// Bittorrent
|
||||
bittorrent *BTSession;
|
||||
bittorrent BTSession;
|
||||
QTimer *checkConnect;
|
||||
QList<QPair<QTorrentHandle,QString> > unauthenticated_trackers;
|
||||
QHash<QString, QStringList> trackerErrors;
|
||||
QList<QPair<torrent_handle,std::string> > unauthenticated_trackers;
|
||||
downloadFromURL *downloadFromURLDialog;
|
||||
// GUI related
|
||||
QTabWidget *tabs;
|
||||
options_imp *options;
|
||||
QSystemTrayIcon *myTrayIcon;
|
||||
QTimer *systrayCreator;
|
||||
QMenu *myTrayIconMenu;
|
||||
DownloadingTorrents *downloadingTorrentTab;
|
||||
FinishedTorrents *finishedTorrentTab;
|
||||
QLabel *connecStatusLblIcon;
|
||||
bool systrayIntegration;
|
||||
bool displaySpeedInTitle;
|
||||
bool force_exit;
|
||||
unsigned int refreshInterval;
|
||||
createtorrent *createWindow;
|
||||
QTimer *refresher;
|
||||
// Keyboard shortcuts
|
||||
QShortcut *switchSearchShortcut;
|
||||
QShortcut *switchSearchShortcut2;
|
||||
QShortcut *switchDownShortcut;
|
||||
QShortcut *switchUpShortcut;
|
||||
QShortcut *switchRSSShortcut;
|
||||
// Search
|
||||
SearchEngine *searchEngine;
|
||||
// RSS
|
||||
RSSImp *rssWidget;
|
||||
// Web UI
|
||||
HttpServer *httpServer;
|
||||
// Misc
|
||||
#ifdef QT_4_4
|
||||
QLocalServer *localServer;
|
||||
QLocalSocket *clientConnection;
|
||||
#else
|
||||
QTcpServer *localServer;
|
||||
QSystemTrayIcon *myTrayIcon;
|
||||
QMenu *myTrayIconMenu;
|
||||
about *aboutdlg;
|
||||
QStandardItemModel *DLListModel;
|
||||
DLListDelegate *DLDelegate;
|
||||
QStandardItemModel *SearchListModel;
|
||||
SearchListDelegate *SearchDelegate;
|
||||
unsigned int nbTorrents;
|
||||
QLabel *connecStatusLblIcon;
|
||||
bool force_exit;
|
||||
// Preview
|
||||
previewSelect *previewSelection;
|
||||
QProcess *previewProcess;
|
||||
// Search related
|
||||
QHash<QString, QString> searchResultsUrls;
|
||||
QProcess *searchProcess;
|
||||
bool search_stopped;
|
||||
bool no_search_results;
|
||||
QByteArray search_result_line_truncated;
|
||||
unsigned long nb_search_results;
|
||||
QTcpServer tcpServer;
|
||||
QTcpSocket *clientConnection;
|
||||
#endif
|
||||
QCompleter *searchCompleter;
|
||||
QStringList searchHistory;
|
||||
|
||||
protected slots:
|
||||
// GUI related slots
|
||||
void dropEvent(QDropEvent *event);
|
||||
void dragEnterEvent(QDragEnterEvent *event);
|
||||
void toggleVisibility(QSystemTrayIcon::ActivationReason e);
|
||||
void on_actionAbout_triggered();
|
||||
void on_actionCreate_torrent_triggered();
|
||||
void on_actionWebsite_triggered() const;
|
||||
void on_actionBugReport_triggered() const;
|
||||
void showAbout();
|
||||
void setInfoBar(const QString& info, const QString& color="black");
|
||||
void updateDlList(bool force=false);
|
||||
void showCreateWindow();
|
||||
void clearLog();
|
||||
void openqBTHomepage();
|
||||
void openqBTBugTracker();
|
||||
void readParamsOnSocket();
|
||||
void acceptConnection();
|
||||
void togglePausedState(QString hash);
|
||||
void torrentDoubleClicked(QString hash, bool finished);
|
||||
void on_actionPreview_file_triggered();
|
||||
void previewFile(QString filePath);
|
||||
void saveCheckedSearchEngines(int) const;
|
||||
void saveColWidthDLList() const;
|
||||
void saveColWidthSearchList() const;
|
||||
void loadCheckedSearchEngines();
|
||||
bool loadColWidthDLList();
|
||||
bool loadColWidthSearchList();
|
||||
void sortDownloadList(int index);
|
||||
void sortDownloadListFloat(int index, Qt::SortOrder sortOrder);
|
||||
void sortDownloadListString(int index, Qt::SortOrder sortOrder);
|
||||
void sortSearchList(int index);
|
||||
void sortSearchListInt(int index, Qt::SortOrder sortOrder);
|
||||
void sortSearchListString(int index, Qt::SortOrder sortOrder);
|
||||
void displayDLListMenu(const QPoint& pos);
|
||||
void selectGivenRow(const QModelIndex& index);
|
||||
void togglePausedState(const QModelIndex& index);
|
||||
void displayInfoBarMenu(const QPoint& pos);
|
||||
void displayGUIMenu(const QPoint& pos);
|
||||
void previewFileSelection();
|
||||
void previewFile(const QString& filePath);
|
||||
void cleanTempPreviewFile(int, QProcess::ExitStatus);
|
||||
void balloonClicked();
|
||||
void writeSettings();
|
||||
void readSettings();
|
||||
void on_actionExit_triggered();
|
||||
void createTrayIcon();
|
||||
void updateUnfinishedTorrentNumber(unsigned int nb);
|
||||
void updateFinishedTorrentNumber(unsigned int nb);
|
||||
void fullDiskError(QTorrentHandle& h) const;
|
||||
void handleDownloadFromUrlFailure(QString, QString) const;
|
||||
void createSystrayDelayed();
|
||||
// Keyboard shortcuts
|
||||
void createKeyboardShortcuts();
|
||||
void displayDownTab() const;
|
||||
void displayUpTab() const;
|
||||
void displaySearchTab() const;
|
||||
void displayRSSTab() const;
|
||||
void forceExit();
|
||||
// Torrent actions
|
||||
void on_actionTorrent_Properties_triggered();
|
||||
void on_actionPause_triggered();
|
||||
void on_actionPause_All_triggered();
|
||||
void on_actionStart_triggered();
|
||||
void on_actionStart_All_triggered();
|
||||
void on_actionOpen_triggered();
|
||||
void on_actionDelete_Permanently_triggered();
|
||||
void on_actionDelete_triggered();
|
||||
void on_actionSet_global_upload_limit_triggered();
|
||||
void on_actionSet_global_download_limit_triggered();
|
||||
void on_actionDocumentation_triggered() const;
|
||||
void showProperties(const QModelIndex &index);
|
||||
void propertiesSelection();
|
||||
void pauseSelection();
|
||||
void pauseAll();
|
||||
void startSelection();
|
||||
void resumeAll();
|
||||
void askForTorrents();
|
||||
void deletePermanently();
|
||||
void deleteSelection();
|
||||
void checkConnectionStatus();
|
||||
void configureSession(bool deleteOptions);
|
||||
void processParams(const QStringList& params);
|
||||
void addTorrent(QString path);
|
||||
void addUnauthenticatedTracker(QPair<QTorrentHandle,QString> tracker);
|
||||
void addUnauthenticatedTracker(QPair<torrent_handle,std::string> tracker);
|
||||
void processScannedFiles(const QStringList& params);
|
||||
void processDownloadedFiles(QString path, QString url);
|
||||
void processDownloadedFiles(const QString& path, const QString& url);
|
||||
void downloadFromURLList(const QStringList& urls);
|
||||
void deleteTorrent(QString hash);
|
||||
void deleteRatioTorrent(QString fileName);
|
||||
void finishedTorrent(QTorrentHandle& h) const;
|
||||
void torrentChecked(QString hash) const;
|
||||
void updateLists();
|
||||
bool initWebUi(QString username, QString password, int port);
|
||||
void pauseTorrent(QString hash);
|
||||
void displayDownloadingUrlInfos(const QString& url);
|
||||
// Search slots
|
||||
void on_search_button_clicked();
|
||||
void on_stop_search_button_clicked();
|
||||
void on_clear_button_clicked();
|
||||
void on_download_button_clicked();
|
||||
void on_update_nova_button_clicked();
|
||||
void appendSearchResult(const QString& line);
|
||||
void searchFinished(int exitcode,QProcess::ExitStatus);
|
||||
void readSearchOutput();
|
||||
void searchStarted();
|
||||
void downloadSelectedItem(const QModelIndex& index);
|
||||
void startSearchHistory();
|
||||
void saveSearchHistory();
|
||||
// Utils slots
|
||||
void setRowColor(int row, const QString& color, bool inDLList=true);
|
||||
// Options slots
|
||||
void on_actionOptions_triggered();
|
||||
void OptionsSaved(QString info, bool deleteOptions);
|
||||
void showOptions();
|
||||
void OptionsSaved(const QString& info, bool deleteOptions);
|
||||
// HTTP slots
|
||||
void on_actionDownload_from_URL_triggered();
|
||||
|
||||
void askForTorrentUrl();
|
||||
|
||||
public slots:
|
||||
void trackerAuthenticationRequired(QTorrentHandle& h);
|
||||
void setTabText(int index, QString text) const;
|
||||
void openDestinationFolder() const;
|
||||
void goBuyPage() const;
|
||||
void updateRatio();
|
||||
void torrentAdded(const QString& path, torrent_handle& h, bool fastResume);
|
||||
void torrentDuplicate(const QString& path);
|
||||
void torrentCorrupted(const QString& path);
|
||||
void finishedTorrent(torrent_handle& h);
|
||||
void fullDiskError(torrent_handle& h);
|
||||
void portListeningFailure();
|
||||
void trackerError(const QString& hash, const QString& time, const QString& msg);
|
||||
void trackerAuthenticationRequired(torrent_handle& h);
|
||||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent *);
|
||||
@@ -177,8 +193,11 @@ class GUI : public QMainWindow, private Ui::MainWindow{
|
||||
GUI(QWidget *parent=0, QStringList torrentCmdLine=QStringList());
|
||||
~GUI();
|
||||
// Methods
|
||||
int getCurrentTabIndex() const;
|
||||
QPoint screenCenter() const;
|
||||
int getRowFromHash(const QString& name) const;
|
||||
float getNovaVersion(const QString& novaPath) const;
|
||||
QByteArray getNovaChangelog(const QString& novaPath) const;
|
||||
void updateNova() const;
|
||||
QPoint screenCenter();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
Before Width: | Height: | Size: 1005 B |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 820 B |
|
Before Width: | Height: | Size: 821 B |
|
Before Width: | Height: | Size: 722 B |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 575 B |
|
Before Width: | Height: | Size: 704 B |
|
Before Width: | Height: | Size: 998 B After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 799 B |
BIN
src/Icons/flags/china_hong_kong.png
Normal file
|
After Width: | Height: | Size: 558 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 449 B |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 248 B |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 813 B |
|
Before Width: | Height: | Size: 532 B After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 5.2 KiB |
@@ -1,25 +1,24 @@
|
||||
[Desktop Entry]
|
||||
Categories=Qt;Network;P2P
|
||||
Comment=V1.1.1
|
||||
Exec=qbittorrent %f
|
||||
Categories=Qt;Application;Network;P2P
|
||||
Comment=V0.9.2
|
||||
Encoding=UTF-8
|
||||
Exec=qbittorrent
|
||||
GenericName=Bittorrent client
|
||||
GenericName[bg]=Торент клиент
|
||||
GenericName[de]=Bittorren Client
|
||||
GenericName[el]=Τορεντ πελάτης
|
||||
GenericName[es]=Cliente Bittorrent
|
||||
GenericName[fr]=Client Bittorrent
|
||||
GenericName[it]=Client Bittorrent
|
||||
GenericName[ja]=Bittorrent クライアント
|
||||
GenericName[ko]=비토렌트 클라이언트
|
||||
GenericName[nl]=Bittorrent client
|
||||
GenericName[pl]=Klient Bittorrent
|
||||
GenericName[ru]=клиент Bittorrent
|
||||
GenericName[es]=Cliente Bittorrent
|
||||
GenericName[sv]=Bittorrent-klient
|
||||
GenericName[tr]=Bittorrent istemcisi
|
||||
GenericName[uk]=Bittorrent-клієнт
|
||||
GenericName[de]=Bittorren Client
|
||||
GenericName[pl]=Klient Bittorrent
|
||||
GenericName[zh]=Bittorrent之用户
|
||||
GenericName[ko]=비토렌트 클라이언트
|
||||
GenericName[el]=Τορεντ πελάτης
|
||||
GenericName[bg]=Торент клиент
|
||||
GenericName[uk]=Bittorrent-клієнт
|
||||
GenericName[ru]=клиент Bittorrent
|
||||
Icon=qbittorrent
|
||||
MimeType=application/x-bittorrent;
|
||||
MimeType=application/x-bittorrent
|
||||
Name=qBittorrent
|
||||
Name[ko]=큐비토런트
|
||||
Terminal=false
|
||||
|
||||
|
Before Width: | Height: | Size: 948 B |
|
Before Width: | Height: | Size: 607 B |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 842 B After Width: | Height: | Size: 496 B |
|
Before Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 304 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 770 B |
|
Before Width: | Height: | Size: 337 B |
|
Before Width: | Height: | Size: 379 B |
BIN
src/Icons/splash.jpg
Normal file
|
After Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 75 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 766 B |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 739 B |
|
Before Width: | Height: | Size: 856 B |
|
Before Width: | Height: | Size: 888 B |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 825 B |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 765 B |
|
Before Width: | Height: | Size: 787 B |
|
Before Width: | Height: | Size: 629 B |
@@ -24,7 +24,6 @@
|
||||
|
||||
#include <QItemDelegate>
|
||||
#include <QStyleOptionProgressBarV2>
|
||||
#include <QStyleOptionViewItemV2>
|
||||
#include <QModelIndex>
|
||||
#include <QPainter>
|
||||
#include <QProgressBar>
|
||||
@@ -36,43 +35,80 @@
|
||||
#define SIZE 1
|
||||
#define PROGRESS 2
|
||||
|
||||
class PreviewListDelegate: public QItemDelegate {
|
||||
class PreviewListDelegate: public QAbstractItemDelegate {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
PreviewListDelegate(QObject *parent=0) : QItemDelegate(parent){}
|
||||
PreviewListDelegate(QObject *parent=0) : QAbstractItemDelegate(parent){}
|
||||
|
||||
~PreviewListDelegate(){}
|
||||
|
||||
void paint(QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index) const{
|
||||
QStyleOptionViewItemV2 opt = QItemDelegate::setOptions(index, option);
|
||||
|
||||
QItemDelegate delegate;
|
||||
QStyleOptionViewItem opt = option;
|
||||
QStyleOptionProgressBarV2 newopt;
|
||||
char tmp[MAX_CHAR_TMP];
|
||||
float progress;
|
||||
// set text color
|
||||
QVariant value = index.data(Qt::TextColorRole);
|
||||
if (value.isValid() && qvariant_cast<QColor>(value).isValid()){
|
||||
opt.palette.setColor(QPalette::Text, qvariant_cast<QColor>(value));
|
||||
}
|
||||
QPalette::ColorGroup cg = option.state & QStyle::State_Enabled
|
||||
? QPalette::Normal : QPalette::Disabled;
|
||||
if (option.state & QStyle::State_Selected){
|
||||
painter->setPen(opt.palette.color(cg, QPalette::HighlightedText));
|
||||
}else{
|
||||
painter->setPen(opt.palette.color(cg, QPalette::Text));
|
||||
}
|
||||
// draw the background color
|
||||
if(index.column() != PROGRESS){
|
||||
if (option.showDecorationSelected && (option.state & QStyle::State_Selected)){
|
||||
if (cg == QPalette::Normal && !(option.state & QStyle::State_Active)){
|
||||
cg = QPalette::Inactive;
|
||||
}
|
||||
painter->fillRect(option.rect, option.palette.brush(cg, QPalette::Highlight));
|
||||
}else{
|
||||
value = index.data(Qt::BackgroundColorRole);
|
||||
if (value.isValid() && qvariant_cast<QColor>(value).isValid()){
|
||||
painter->fillRect(option.rect, qvariant_cast<QColor>(value));
|
||||
}
|
||||
}
|
||||
}
|
||||
switch(index.column()){
|
||||
case SIZE:
|
||||
QItemDelegate::drawBackground(painter, opt, index);
|
||||
QItemDelegate::drawDisplay(painter, opt, option.rect, misc::friendlyUnit(index.data().toLongLong()));
|
||||
painter->drawText(option.rect, Qt::AlignCenter, misc::friendlyUnit(index.data().toLongLong()));
|
||||
break;
|
||||
case PROGRESS:{
|
||||
float progress = index.data().toDouble()*100.;
|
||||
QStyleOptionProgressBarV2 newopt;
|
||||
case NAME:
|
||||
painter->drawText(option.rect, Qt::AlignLeft, index.data().toString());
|
||||
break;
|
||||
case PROGRESS:
|
||||
progress = index.data().toDouble()*100.;
|
||||
snprintf(tmp, MAX_CHAR_TMP, "%.1f", progress);
|
||||
newopt.rect = opt.rect;
|
||||
newopt.text = QString(QByteArray::number(progress, 'f', 1))+QString::fromUtf8("%");
|
||||
newopt.text = QString(tmp)+"%";
|
||||
newopt.progress = (int)progress;
|
||||
newopt.maximum = 100;
|
||||
newopt.minimum = 0;
|
||||
newopt.state |= QStyle::State_Enabled;
|
||||
newopt.textVisible = true;
|
||||
QApplication::style()->drawControl(QStyle::CE_ProgressBar, &newopt, painter);
|
||||
newopt.textVisible = false;
|
||||
QApplication::style()->drawControl(QStyle::CE_ProgressBar, &newopt,
|
||||
painter);
|
||||
//We prefer to display text manually to control color/font/boldness
|
||||
if (option.state & QStyle::State_Selected){
|
||||
opt.palette.setColor(QPalette::Text, QColor("grey"));
|
||||
painter->setPen(opt.palette.color(cg, QPalette::Text));
|
||||
}
|
||||
painter->drawText(option.rect, Qt::AlignCenter, newopt.text);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
QItemDelegate::paint(painter, option, index);
|
||||
painter->drawText(option.rect, Qt::AlignCenter, index.data().toString());
|
||||
}
|
||||
}
|
||||
|
||||
QWidget* createEditor(QWidget*, const QStyleOptionViewItem &, const QModelIndex &) const {
|
||||
// No editor here
|
||||
return 0;
|
||||
QSize sizeHint(const QStyleOptionViewItem & option, const QModelIndex & index) const{
|
||||
QItemDelegate delegate;
|
||||
return delegate.sizeHint(option, index);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -22,11 +22,8 @@
|
||||
#ifndef PROPLISTDELEGATE_H
|
||||
#define PROPLISTDELEGATE_H
|
||||
|
||||
#include <QItemDelegate>
|
||||
#include <QAbstractItemDelegate>
|
||||
#include <QStyleOptionProgressBarV2>
|
||||
#include <QStyleOptionViewItemV2>
|
||||
#include <QStyleOptionComboBox>
|
||||
#include <QComboBox>
|
||||
#include <QModelIndex>
|
||||
#include <QPainter>
|
||||
#include <QProgressBar>
|
||||
@@ -37,112 +34,82 @@
|
||||
#define NAME 0
|
||||
#define SIZE 1
|
||||
#define PROGRESS 2
|
||||
#define PRIORITY 3
|
||||
#define INDEX 4
|
||||
#define SELECTED 3
|
||||
|
||||
#define IGNORED 0
|
||||
#define NORMAL 1
|
||||
#define HIGH 2
|
||||
#define MAXIMUM 7
|
||||
|
||||
class PropListDelegate: public QItemDelegate {
|
||||
class PropListDelegate: public QAbstractItemDelegate {
|
||||
Q_OBJECT
|
||||
|
||||
private:
|
||||
bool* filteredFilesChanged;
|
||||
|
||||
public:
|
||||
PropListDelegate(QObject *parent=0, bool* filteredFilesChanged=0) : QItemDelegate(parent){
|
||||
this->filteredFilesChanged = filteredFilesChanged;
|
||||
}
|
||||
PropListDelegate(QObject *parent=0) : QAbstractItemDelegate(parent){}
|
||||
|
||||
~PropListDelegate(){}
|
||||
|
||||
void paint(QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index) const{
|
||||
QStyleOptionViewItemV2 opt = QItemDelegate::setOptions(index, option);
|
||||
QPalette::ColorGroup cg = option.state & QStyle::State_Enabled ? QPalette::Normal : QPalette::Disabled;
|
||||
QStyleOptionViewItem opt = option;
|
||||
char tmp[MAX_CHAR_TMP];
|
||||
// set text color
|
||||
QVariant value = index.data(Qt::TextColorRole);
|
||||
if (value.isValid() && qvariant_cast<QColor>(value).isValid()){
|
||||
opt.palette.setColor(QPalette::Text, qvariant_cast<QColor>(value));
|
||||
}
|
||||
QPalette::ColorGroup cg = option.state & QStyle::State_Enabled
|
||||
? QPalette::Normal : QPalette::Disabled;
|
||||
if (option.state & QStyle::State_Selected){
|
||||
painter->setPen(opt.palette.color(cg, QPalette::HighlightedText));
|
||||
}else{
|
||||
painter->setPen(opt.palette.color(cg, QPalette::Text));
|
||||
}
|
||||
// draw the background color
|
||||
if(index.column() != PROGRESS){
|
||||
if (option.showDecorationSelected && (option.state & QStyle::State_Selected)){
|
||||
if (cg == QPalette::Normal && !(option.state & QStyle::State_Active)){
|
||||
cg = QPalette::Inactive;
|
||||
}
|
||||
painter->fillRect(option.rect, option.palette.brush(cg, QPalette::Highlight));
|
||||
}else{
|
||||
value = index.data(Qt::BackgroundColorRole);
|
||||
if (value.isValid() && qvariant_cast<QColor>(value).isValid()){
|
||||
painter->fillRect(option.rect, qvariant_cast<QColor>(value));
|
||||
}
|
||||
}
|
||||
}
|
||||
switch(index.column()){
|
||||
case SIZE:
|
||||
QItemDelegate::drawBackground(painter, opt, index);
|
||||
QItemDelegate::drawDisplay(painter, opt, option.rect, misc::friendlyUnit(index.data().toLongLong()));
|
||||
painter->drawText(option.rect, Qt::AlignCenter, misc::friendlyUnit(index.data().toLongLong()));
|
||||
break;
|
||||
case NAME:
|
||||
painter->drawText(option.rect, Qt::AlignLeft, index.data().toString());
|
||||
break;
|
||||
case PROGRESS:{
|
||||
QStyleOptionProgressBarV2 newopt;
|
||||
float progress = index.data().toDouble()*100.;
|
||||
snprintf(tmp, MAX_CHAR_TMP, "%.1f", progress);
|
||||
newopt.rect = opt.rect;
|
||||
newopt.text = QString(QByteArray::number(progress, 'f', 1))+QString::fromUtf8("%");
|
||||
newopt.text = QString(tmp)+"%";
|
||||
newopt.progress = (int)progress;
|
||||
newopt.maximum = 100;
|
||||
newopt.minimum = 0;
|
||||
newopt.state |= QStyle::State_Enabled;
|
||||
newopt.textVisible = true;
|
||||
QApplication::style()->drawControl(QStyle::CE_ProgressBar, &newopt, painter);
|
||||
break;
|
||||
}
|
||||
case PRIORITY:{
|
||||
QStyleOptionComboBox newopt;
|
||||
newopt.rect = opt.rect;
|
||||
switch(index.data().toInt()){
|
||||
case IGNORED:
|
||||
newopt.currentText = tr("Ignored");
|
||||
break;
|
||||
case NORMAL:
|
||||
newopt.currentText = tr("Normal", "Normal (priority)");
|
||||
break;
|
||||
case HIGH:
|
||||
newopt.currentText = tr("High", "High (priority)");
|
||||
break;
|
||||
case MAXIMUM:
|
||||
newopt.currentText = tr("Maximum", "Maximum (priority)");
|
||||
break;
|
||||
default:
|
||||
qDebug("Unhandled priority, setting NORMAL");
|
||||
newopt.currentText = tr("Normal", "Normal (priority)");
|
||||
}
|
||||
newopt.state |= QStyle::State_Enabled;
|
||||
QApplication::style()->drawComplexControl(QStyle::CC_ComboBox, &newopt,
|
||||
newopt.textVisible = false;
|
||||
QApplication::style()->drawControl(QStyle::CE_ProgressBar, &newopt,
|
||||
painter);
|
||||
opt.palette.setColor(QPalette::Text, QColor("black"));
|
||||
painter->setPen(opt.palette.color(cg, QPalette::Text));
|
||||
painter->drawText(option.rect, Qt::AlignLeft, QString::fromUtf8(" ")+newopt.currentText);
|
||||
//We prefer to display text manually to control color/font/boldness
|
||||
if (option.state & QStyle::State_Selected){
|
||||
opt.palette.setColor(QPalette::Text, QColor("grey"));
|
||||
painter->setPen(opt.palette.color(cg, QPalette::Text));
|
||||
}
|
||||
painter->drawText(option.rect, Qt::AlignCenter, newopt.text);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
QItemDelegate::paint(painter, option, index);
|
||||
}
|
||||
}
|
||||
|
||||
QWidget* createEditor(QWidget *parent, const QStyleOptionViewItem &/* option */, const QModelIndex & index) const {
|
||||
if(index.column() != PRIORITY) return 0;
|
||||
QComboBox* editor = new QComboBox(parent);
|
||||
editor->setFocusPolicy(Qt::StrongFocus);
|
||||
editor->addItem(tr("Ignored"));
|
||||
editor->addItem(tr("Normal", "Normal (priority)"));
|
||||
editor->addItem(tr("High", "High (priority)"));
|
||||
editor->addItem(tr("Maximum", "Maximum (priority)"));
|
||||
return editor;
|
||||
}
|
||||
|
||||
void setEditorData(QWidget *editor, const QModelIndex &index) const {
|
||||
unsigned short val = index.model()->data(index, Qt::DisplayRole).toInt();
|
||||
QComboBox *combobox = static_cast<QComboBox*>(editor);
|
||||
qDebug("Set Editor data: Prio is %d", val);
|
||||
switch(val){
|
||||
case IGNORED:
|
||||
combobox->setCurrentIndex(0);
|
||||
break;
|
||||
case NORMAL:
|
||||
combobox->setCurrentIndex(1);
|
||||
break;
|
||||
case HIGH:
|
||||
combobox->setCurrentIndex(2);
|
||||
break;
|
||||
case MAXIMUM:
|
||||
combobox->setCurrentIndex(3);
|
||||
case SELECTED:
|
||||
if(index.data().toBool()){
|
||||
painter->drawText(option.rect, Qt::AlignCenter, tr("True"));
|
||||
}else{
|
||||
painter->drawText(option.rect, Qt::AlignCenter, tr("False"));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
qDebug("Unhandled priority, setting to NORMAL");
|
||||
combobox->setCurrentIndex(1);
|
||||
painter->drawText(option.rect, Qt::AlignCenter, index.data().toString());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,73 +121,6 @@ class PropListDelegate: public QItemDelegate {
|
||||
QRect textRect = QRect(0, 0, 0, fontMetrics.lineSpacing() * (text.count(QLatin1Char('\n')) + 1));
|
||||
return textRect.size();
|
||||
}
|
||||
|
||||
public slots:
|
||||
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const {
|
||||
QComboBox *combobox = static_cast<QComboBox*>(editor);
|
||||
int value = combobox->currentIndex();
|
||||
qDebug("Setting combobox value in index: %d", value);
|
||||
unsigned short old_val = index.model()->data(index, Qt::DisplayRole).toInt();
|
||||
switch(value){
|
||||
case 0:
|
||||
if(old_val != IGNORED){
|
||||
model->setData(index, QVariant(IGNORED));
|
||||
if(filteredFilesChanged != 0)
|
||||
*filteredFilesChanged = true;
|
||||
} else {
|
||||
// XXX: hack to force the model to send the itemChanged() signal
|
||||
model->setData(index, QVariant(NORMAL));
|
||||
model->setData(index, QVariant(IGNORED));
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
// if(old_val != NORMAL){
|
||||
// model->setData(index, QVariant(NORMAL));
|
||||
// if(filteredFilesChanged != 0)
|
||||
// *filteredFilesChanged = true;
|
||||
// } else {
|
||||
model->setData(index, QVariant(HIGH));
|
||||
model->setData(index, QVariant(NORMAL));
|
||||
if(filteredFilesChanged != 0)
|
||||
*filteredFilesChanged = true;
|
||||
// }
|
||||
break;
|
||||
case 2:
|
||||
if(old_val != HIGH){
|
||||
model->setData(index, QVariant(HIGH));
|
||||
if(filteredFilesChanged != 0)
|
||||
*filteredFilesChanged = true;
|
||||
} else {
|
||||
model->setData(index, QVariant(NORMAL));
|
||||
model->setData(index, QVariant(HIGH));
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if(old_val != MAXIMUM){
|
||||
model->setData(index, QVariant(MAXIMUM));
|
||||
if(filteredFilesChanged != 0)
|
||||
*filteredFilesChanged = true;
|
||||
} else {
|
||||
model->setData(index, QVariant(HIGH));
|
||||
model->setData(index, QVariant(MAXIMUM));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if(old_val != NORMAL){
|
||||
model->setData(index, QVariant(NORMAL));
|
||||
if(filteredFilesChanged != 0)
|
||||
*filteredFilesChanged = true;
|
||||
} else {
|
||||
model->setData(index, QVariant(HIGH));
|
||||
model->setData(index, QVariant(NORMAL));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &/* index */) const {
|
||||
editor->setGeometry(option.rect);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||