Commit Graph

13222 Commits

Author SHA1 Message Date
Mike Gelfand fd9c2c74f4 Remove some unused includes/macros; fix build (re. QPointer) 2015-07-30 06:55:28 +00:00
Mike Gelfand f592083f15 Create dialogs on demand, don't keep them ready all the time 2015-07-30 06:18:02 +00:00
Mike Gelfand 18ea8c429a Improve RPC performance for local sessions
Don't unnecessarily de-/serialize JSON data if local session is used.
2015-07-13 00:32:48 +00:00
Mike Gelfand 5296570476 Improve file tree population/update performance
Use simple tokenization instead of splitting the file path into
QStringList for each item. Don't expand each added item separetely
during population/update. Don't expand all the items but just up to the
point where parent has more than one expandable child.

Also, fix items order by sorting items after population/update. Fix
sorting by size on systems where uint64_t != quint64.
2015-07-12 20:48:54 +00:00
Mike Gelfand b9adf279ca #5912: Prevent completed pieces modification by webseeds (patch by cfpp2p)
This avoids blocks corruption in case webseed provides bad data.

As explained by cfpp2p, "The requirements to reproduce are at least one
webseed that sends corrupt block(s), and at least one other peer (webseed
or regular peer) that sends correct data for the same block. Then a peer
with correct block sends the block and transmission accepts and verifies
that block as good. But then the webseed thread comes around and the same
block is downloaded from the webseed that sends a bad block which is then
written even though the piece was previously deemed complete."
2015-07-05 07:54:46 +00:00
Mike Gelfand 6cbfcdc85e Fix `tr_net_strerror` on Windows (oops) 2015-07-01 00:58:00 +00:00
Mike Gelfand 79195614b2 Use `sockerrno` and `tr_net_strerror` for most of network-related errors
This ensures proper network errors formatting on Windows.

Also, disable IP_TOS socket option modification attempts on Windows
since it's not supported there and is considered deprecated: "Do not
use. Type of Service (TOS) settings should only be set using the
Quality of Service API" (c) MSDN. Using QoS API is a subject for
separate commit(s).
2015-07-01 00:54:41 +00:00
Mike Gelfand 1a885dcb17 Some look-and-feel improvements for Mac and GTK+ styles (Qt client) 2015-06-28 14:18:06 +00:00
Mike Gelfand ba7ea94c7d Avoid assert on passing negative values to `isprint` (due to type promotion) 2015-06-26 21:22:27 +00:00
Mike Gelfand 2b5a03a88c #5964: Another follow-up commit for #5456 (encrypted communication with libevent 2.1.x)
Decrypt only what is asked for, not more. This fixes previous commit
which changed semantics by processing the buffer to the very end,
starting with correct offset though.

Refactor encryption/decryption to a single function which callback.
2015-06-24 21:24:41 +00:00
Mike Gelfand cdcc9e249f #5964: Follow-up fix for #5456 (encrypted communication with libevent 2.1.x)
I've misread libevent documentation and the check introduced was not
entirely correct. Changed `evbuffer_peek` call now to only request the
data which would fit into provided iovec.
2015-06-24 20:38:41 +00:00
Mike Gelfand 6101a69957 Avoid possible `_XOPEN_SOURCE` redefinition warning 2015-06-23 21:16:33 +00:00
Mike Gelfand 45b73a7866 #5456: Fix encrypted communication with libevent 2.1.x
Recent versions of libevent changed the semantics of `evbuffer_ptr_set`
function in a way that it succeeds if pointer is set right after the end
of the buffer. This caused `tr_cryptoEncrypt` and `tr_cryptoDecrypt` to
be called twice for last buffer chunk since no checks for `evbuffer_peek`
return value were made while it was returning 0 on last loop cycle,
leaving iovec unchanged.
2015-06-17 20:32:33 +00:00
Mike Gelfand 58312e6c16 Torrent properties dialog improvements
Simplify DND checkboxes drawing, this also fixes incorrect drawing on
Mac when file tree widget is inactive.
Do better job calculating column widths for file tree to avoid ellipsis.
Fix file tree sorting order for size and priority columns.
Change key to toggle priorities to Shift+Space instead of Enter/Return
to avoid conflicts with name editing and default button handling.
Fix selected tracker item background drawing in certain cases.
2015-06-15 21:07:46 +00:00
Mike Gelfand b0278ca353 Instead of standard C headers include their C++ counterparts 2015-06-12 22:41:36 +00:00
Mike Gelfand 5120fc0f2c Unify/prettify Qt client headers style 2015-06-12 22:12:12 +00:00
Mike Gelfand 5b61ba81ba Sync Qt client translations, add Polish language 2015-06-10 22:51:53 +00:00
Mike Gelfand 07912d230b Use PascalCase for Qt client filenames
Split FileTree.{h,cc} and FilterBar.{h,cc} files so that each class
is in its own file.

This breaks translations (some classes got renamed => context changed),
to be fixed by next commit (along with Tx sync).
2015-06-10 21:27:11 +00:00
Mike Gelfand 088c5c6ab9 Bump DHT version used in CMake scripts (includes latest Win32 fixes) 2015-06-08 19:54:51 +00:00
Mike Gelfand 2804335d05 Don't print trailing space char on each line when saving JSON 2015-06-01 20:50:25 +00:00
Mike Gelfand 5d48c2d3e9 #5851: Don't use _configthreadlocale if not provided by CRT (even if declaration is present) 2015-06-01 18:52:14 +00:00
Mike Gelfand ae5755dc1e #5851: Use per-thread locale setup if possible
This prevents crashes on concurrent tr_variantFromBuf, tr_variantToBuf
and tr_variantGetReal use.
2015-06-01 05:25:14 +00:00
Mike Gelfand 2e6d5c8bc9 Add more booleans to the picture 2015-05-31 22:13:31 +00:00
Mike Gelfand 6c04259c39 Remove useless ws2tcpip.h include in net.h
It's already included above, and QT_DLL condition is meaningless
since net.h is only being used inside libtransmission which doesn't
use Qt.
2015-05-30 15:44:17 +00:00
Mike Gelfand 8dd65cdfba Use CreateProcess instead of _spawnvpe to execute scripts on Windows 2015-05-30 11:15:57 +00:00
Mike Gelfand 7abe7c28a3 #4882: \u-encode all non-printable (as opposed to non-ascii) characters 2015-05-16 17:33:01 +00:00
Mike Gelfand e0dc1d6735 Fix some issues revealed by coverity 2015-05-09 14:10:55 +00:00
Mike Gelfand 4a23c94252 Fix some issues revealed by coverity 2015-05-09 14:09:05 +00:00
Mike Gelfand cdf3cf62f9 Fix some issues revealed by coverity 2015-05-09 11:56:35 +00:00
Mike Gelfand 2321bc3fad Fix some issues revealed by coverity 2015-05-09 08:37:55 +00:00
Mike Gelfand df98031294 #5946: Save "prefetch-enabled" setting as boolean (spotted by cfpp2p) 2015-05-07 06:45:35 +00:00
Mike Gelfand 7177d43ba1 #5944: Unify indentation style and strip trailing whitespaces across JS code, no functional changes (patch by xzcvczx + a lot more) 2015-05-05 19:12:48 +00:00
Mike Gelfand 5de8bbe6d8 Cut internal macro names to have equal number of underscores on each side (take two) 2015-05-04 20:06:05 +00:00
Mike Gelfand 7879100c01 Cut internal macro names to have equal number of underscores on each side 2015-05-04 19:58:34 +00:00
Mike Gelfand 1bcebc2da9 Remove `-Wdeclaration-after-statement` flag (we use C99) 2015-05-03 11:44:18 +00:00
Mike Gelfand 363069ff97 #5930: Fix style of Gtk+3.16 overshoot and undershoot (patch by nagisa) 2015-05-03 10:30:35 +00:00
Mike Gelfand 50364a7883 #4866: Replace existing menus with jQueryUI menu 2015-04-30 05:20:48 +00:00
Mike Gelfand 0c01e6e19d #5937: Don't send TR_RPC_TORRENT_ADDED notification if torrent wasn't actually added (patch by xzcvczx) 2015-04-29 19:42:05 +00:00
Mike Gelfand 9674df5c4d Use jQuery UI's `ui-helper-hidden` CSS class instead of our own 2015-04-26 03:35:44 +00:00
Mike Gelfand a1393e7b35 #5934: Generate REVISION file and use it in case of missing reliable source 2015-04-24 19:14:56 +00:00
Mike Gelfand b5eee9b0fc Bump natpmp revision to include latest Win32 fixes 2015-04-23 22:03:29 +00:00
Mike Gelfand 123a8decc2 Define WIN32_LEAN_AND_MEAN and NOMINMAX for our own code only 2015-04-23 21:32:00 +00:00
Mike Gelfand 742c89b3b7 Emit warning from uTP config in a more friendly way 2015-04-23 20:20:21 +00:00
Mike Gelfand cd8ed4ff10 #5894: Get rid of eval() in JS code (patch by Ancient; 2nd part) 2015-04-23 19:30:40 +00:00
Mike Gelfand fd8e1e25a4 #5894: Get rid of inline styles in HTML (patch by Ancient; 1st part, slightly modified per IRC discussion) 2015-04-23 19:02:38 +00:00
Mike Gelfand 06d73853b9 Even better (and unified) torrent origin logic for GTK+, Qt and web clients 2015-04-22 21:04:49 +00:00
Mike Gelfand ea368388ed Fix JS error on undefined creator during inspector update
Since torrents' info is fetched asynchronously, it may not yet be
available when inspector updates. Account for possibly undefined
creator.

Refine logic used to construct torrent origin phrase to prevent
results such as "Created by  on <date>" or "Created by <creator>
on ".
2015-04-22 20:36:28 +00:00
Mike Gelfand dc1eb80dca #5894: Fix autotools build ("trailing backslash on last line") 2015-04-21 21:23:15 +00:00
Mike Gelfand ff7638d901 #5894: Update jQuery to 1.11.2 (with Migrate plugin 1.2.1), jQuery UI to 1.11.4 2015-04-21 21:17:45 +00:00
Mike Gelfand 68339d6933 Bump miniupnpc revision to fix `MINIUPNP_STATICLIB` macro definition 2015-04-21 13:56:17 +00:00