Commit graph

5472 commits

Author SHA1 Message Date
Jerome Leclanche
5a3927a22d Fix configure script when running with dash
`test 1 == 1` will fail using dash as the default shell. The `test 1 = 1`
syntax works in both Bash and Dash.
2014-11-12 14:54:07 +01:00
Nick Tiskov
60c4306502 Fix missing icon for open action in file list 2014-11-12 11:51:09 +03:00
Nick Tiskov
18e0d122fb Add tooltip to episode filter text edit 2014-11-12 11:50:43 +03:00
Nick Tiskov
0564ceea9f Implement episode filter for rss downloader 2014-11-12 11:50:42 +03:00
sledgehammer999
e8bec885cb Merge pull request #2145 from pmzqla/webui
Make Web API locale independent
2014-11-12 00:32:00 +02:00
Gabriele
b4acb2ef52 Use localeCompare to sort torrent list by name 2014-11-10 13:57:01 +01:00
Gabriele
ed83070517 Use raw data to sort columns
Store the raw data retrieved in a new data-raw attribute and use
these to sort the columns.

In addition, make the ETA column sortable.
2014-11-10 13:57:01 +01:00
Gabriele
ec592f8175 Remove unneeded parameters from helper functions for WebUI 2014-11-10 13:57:01 +01:00
Gabriele
aedf579d77 WebUI: make API locale independet
Sizes are now given in bytes.
Dates are Unix timestamps and converted to ISO 8601 in the web UI.
Numbers are not converted to strings.
-1 is returned for undefined values.

Some keys have been splitted:

Torrent list (json/torrents)
 * num_seeds: Torrent seeds connected to
 * num_complete: Torrent seeds in the swarm
 * num_leechs: Torrent leechers connected to
 * num_incomplete: Torrent leechers in the swarm

Torrent generic properties (propertiesGeneral/hash)
 * total_uploaded: Total data uploaded
 * total_uploaded_session: Total data uploaded this session
 * total_downloaded: Total data dowloaded
 * total_downloaded_session: Total data downloaded this session
 * time_elapsed: Torrent elapsed time
 * seeding_time: Torrent elapsed time while complete
 * nb_connections: Torrent connection count
 * nb_connections_limit: Torrent connection count limit

Global transfer info (json/transferInfo)
 * dl_info_speed: Global downalod rate
 * dl_info_data: Data downloaded this session
 * up_info_speed: Global upload rate
 * up_info_data: Data uploaded this session

Closes #1524.
2014-11-10 13:57:01 +01:00
Gabriele
8cc7a3573e Show current speed limits in the status bar
Closes #1316.
2014-11-09 23:00:45 +01:00
Gabriele
f46e660679 Adjust the size of the elements in the statusbar
Use the same height for all the elements and try to prevent
variations of the speed labels.
2014-11-09 23:00:45 +01:00
sledgehammer999
d642ddc795 Merge pull request #2150 from pmzqla/webui-fix
WebUI: Don't empty transfer list before updating it
2014-11-09 23:02:32 +02:00
Gabriele
09fde676ae WebUI: Don't empty transfer list before updating it
This causes the list from disappearing in IE 10.
No longer needed table rows are deleted anyway.
2014-11-09 21:19:38 +01:00
sledgehammer999
4dbc235c70 Use rgb values to match colors before commit ad116e. Taken from qcolor_p.cpp. 2014-11-09 13:59:36 +02:00
sledgehammer999
6d64f2430c Merge pull request #2140 from sorokin/fix-torrent-removal
Fix torrent removal. Closes #2132
2014-11-09 13:09:38 +02:00
sledgehammer999
9d770ea48b Merge pull request #2144 from sorokin/up-down-scrolling
Speed up scrolling with up/down keys
2014-11-09 13:07:00 +02:00
sledgehammer999
21139f9d29 Merge pull request #2142 from sorokin/repaint
Misc changes in TorrentModel and TransferListWidget
2014-11-09 13:06:39 +02:00
Ivan Sorokin
5986c1dbc9 Cache QRegExp in misc::parseHtmlLinks()
This commit should improve performance when user navigating through
torrent list using up/down keys. A scrolling through all the list
(276 torrents) took:

    Total wall time:                            18.813s
    Total CPU time:                              3.210s
    misc::parseHtmlLinks():                      0.096s

misc::parseHtmlLinks() is 8th most hottest function on
this use case.
2014-11-09 12:57:14 +03:00
Ivan Sorokin
9023232653 Cache icons in TorrentContentModel
This commit caches icons in TorrentContentModel in the same way they are
cached in TorrentModel.

This commit should improve performance when user navigating through
torrent list using up/down keys. A scrolling through all the list
(276 torrents) took:

    Total wall time:                            18.813s
    Total CPU time:                              3.210s
    IconProvider::generateDifferentSizes():      0.170s

IconProvider::generateDifferentSizes is 5th most hottest function on
this use case.
2014-11-09 12:57:14 +03:00
Ivan Sorokin
976982ba09 Now user-created labels "all" and "none" works as regular labels 2014-11-09 03:59:49 +03:00
Ivan Sorokin
f235c0ae6c Merge label filter into TransferListSortModel
This also fixes a bug that when label filter contains special symbols
from regex, the label filter may match torrents with multiple different
labels.
2014-11-09 03:58:50 +03:00
Ivan Sorokin
8bafc5e216 Merge StatusSortFilterProxyModel into TransferListSortModel
I thought merging all 3 sort-filter proxy models into one should
speedup dataChanged() signal. As turned out this is not the case. The
time difference is within inaccuracy range, so this doesn't affect
performance.

But I still think it is good to merge them into one proxy model as it
simplifies code.
2014-11-09 03:58:50 +03:00
Ivan Sorokin
cf2cb29826 Split transferlistsortmodel into .h and .cpp 2014-11-09 03:58:50 +03:00
Ivan Sorokin
0976918ca2 Call updateTorrentNumbers() once per every model refresh, not once for every row changed
Torrent numbers were recalculated on every dataChanged() signal. The previous commit
greatly increases the number of dataChanged() signals.

HEAD^^:
    Total wall clock:                 97.069s
    updateTorrentNumbers() time:       0.033s

HEAD^:
    Total wall clock:                 96.132s
    updateTorrentNumbers() time:       0.179s

HEAD:
    Total wall clock:                 95.535s
    updateTorrentNumbers() time:       0.047s

After this commit the time of updateTorrentNumbers() is (almost) back to
the level that it was in HEAD^^.
2014-11-09 03:58:50 +03:00
Ivan Sorokin
e5c024967d Emit TorrentModel::dataChanged() signal only for specific rows, not for the entire table
In commit b50d733 TorrentModel moved from a periodic refresh, to using
postStatusUpdate(). In this transition I forgot to remove emition of
dataChanged() signal for the entire table.

According to my measurements this commit reduce CPU usage of qbittorrent
by a factor of 3:

Before:
   Total wall clock:                                      97.07s
   CPU time:                                              21.77s
   - Time spent in TransferListDelegate::paint():         14.60s
   - Time spent in TorrentModel::forceModelRefresh():      1.44s
   - Time spent in TorrentModel::stateUpdated():           0.02s

After:
   Total wall clock:                                      96.13s
   CPU time:                                               6.68s
   - Time spent in TransferListDelegate::paint():          2.63s
   - Time spent in TorrentModel::forceModelRefresh():     <0.01s
   - Time spent in TorrentModel::stateUpdated():           1.73s

As it is seen the time spent in painting is reduced by a factor of 6 (14.60->2.63) at
the cost of slightly increased time of notifications that model is
changed (1.44->1.73). The next commits attempt to address this issue.
2014-11-09 03:58:50 +03:00
Ivan Sorokin
2e55c1f307 Optimize torrentRow a bit
The problem is that torrentRow() does linear search over the list of all
available torrents. So it doesn't scale well for large number of
torrents. Removing the copying of QString from linear search
inner loop, speed up it considerably.

The proper solution should be using hash table instead of linear search.
This require more radical changes in TorrentModel and may be done in a
separate commit.
2014-11-09 03:48:58 +03:00
sledgehammer999
a07f25aa67 Merge pull request #2124 from pmzqla/webui
Misc changes to the WebUI
2014-11-09 01:51:38 +02:00
Gabriele
97c1b17cf0 Show a spinner while torrents are being uploaded 2014-11-09 00:30:37 +01:00
Gabriele
3d1617b2de Upload torrents on user command
Don't upload the torrents as soon as they are selected.

Also, adjust the HTML code to better place the upload button.
2014-11-09 00:28:41 +01:00
Gabriele
ee3a736787 WebUI: Return error in case uploaded files are not torrents 2014-11-09 00:28:41 +01:00
Gabriele
8b8c9d3573 Rotate expand image to better suit its use in the UI 2014-11-09 00:28:36 +01:00
Gabriele
c255ba675a Center images in top menu 2014-11-09 00:28:18 +01:00
Gabriele
7b49ab2a48 Add missing images and fix few paths
These images are used in CSS rules, but are missing.

Images taken from MochaUI git repo.
2014-11-09 00:28:18 +01:00
Gabriele
465ff473f1 Drop Firefox specific code
This change improves the responsiveness while resizing panels.
The code was intended to fix bugs in really old versions of Firefox.
2014-11-09 00:28:18 +01:00
Gabriele
e83e46b08a Fix panel height calculation in Opera 2014-11-09 00:28:18 +01:00
Gabriele
7b73e96863 Fix errors in width and height calculations
border-left/right/top/bottom are not numbers.
2014-11-09 00:28:18 +01:00
Gabriele
dc0591997a Bump Internet Explorer compatibility 2014-11-09 00:28:18 +01:00
Gabriele
30a25e1de4 Workaround to make invisible buttons clickable on IE 2014-11-09 00:28:18 +01:00
Gabriele
d106c12aa2 Restricts hacks and workarounds to IE < 9 2014-11-09 00:28:18 +01:00
Gabriele
66a91a6e3a Remove XML encoding declaration from HTML files 2014-11-09 00:27:53 +01:00
Gabriele
0d2e9a9473 Reduce font size of priority combo boxes
They were too big in some cases (e.g. Firefox on Linux).
2014-11-09 00:25:40 +01:00
Gabriele
fa706b24be Use fake tristate checkbox on IE < 9 only 2014-11-09 00:25:40 +01:00
Gabriele
92cc8f7211 Fix disappearing transferlist list when zooming in the browser
When the page is zoomed in the browser, the transferlist doesn't fit
in the page and is moved below the left column, disappearing completely.

Allow elements to overlap the handle to prevent this from happening.

The error message is moved in the status bar since it's wrongly placed
because of the overlap.

Closes #603.
2014-11-09 00:25:40 +01:00
Gabriele
4f28fb5680 Minimize width of first column in transfer list 2014-11-09 00:25:40 +01:00
Gabriele
afde16c252 Change color of table header in bottom panel and add some padding 2014-11-09 00:25:40 +01:00
Gabriele
c516c0ac12 Center vertically "+" image in tracker list 2014-11-09 00:25:40 +01:00
Gabriele
af9e40d83d Alternate background color for torrent content
CSS3 support required.
2014-11-09 00:25:40 +01:00
Gabriele
b01c1f3b9a Don't show white parts when hovering over the elements of the menu 2014-11-09 00:25:40 +01:00
Gabriele
4ff999d1c5 Change background color of rows of torrent content 2014-11-09 00:25:40 +01:00
Gabriele
c9db08f0f4 Change background color of filterlist on hover 2014-11-09 00:25:40 +01:00