1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-27 01:57:52 +00:00
Commit graph

12523 commits

Author SHA1 Message Date
Mike Gelfand
342f38bbc5 Factor RPC logic out from session (Qt client) 2014-12-27 20:03:10 +00:00
Mike Gelfand
17d6666b4c A bit of harmless refactoring
Prefer C++-style over C-style type casting.
Use qApp instead of QApplication/QCoreApplication::instance().
Use explicit QString::fromLatin1()/fromUtf8() where applicable.
2014-12-27 14:07:14 +00:00
Mike Gelfand
2ca4596fac Refactor FreespaceLabel to make it possible for it to be created in Qt Designer 2014-12-26 18:41:47 +00:00
Mike Gelfand
2d02481f2d Fix the rest of :: formatting in C++ code 2014-12-26 14:22:35 +00:00
Mike Gelfand
e9394e2f9b Fix directory name display in relocate dialog 2014-12-26 14:21:47 +00:00
Mike Gelfand
8a4f8b9e15 Rework relocate dialog in Qt client to load from .ui 2014-12-26 10:35:00 +00:00
Mike Gelfand
92168df0e1 Fix up some about dialog leftovers, sync Qt client translations 2014-12-25 21:51:59 +00:00
Mike Gelfand
4138c7519b Rework about dialog in Qt client to load from .ui 2014-12-25 19:39:45 +00:00
Mike Gelfand
4f239d57e1 Move numeric units to the right of values (per KDE HIG)
Sync translations with the code. Adjust translations for changed phrases
(hopefully correct for the most of them).

One phrase still left untouched (Preferences -> Downloading), need to
think on better wording.
2014-12-22 03:06:09 +00:00
Mike Gelfand
1eec889832 #4050: Use TRANSLATIONS_DIR macro as a hint for Qt client translation files location 2014-12-22 01:08:19 +00:00
Mike Gelfand
f83872849a #5543: Add a warning panel with id of duplicate torrent (patch by rb07 + personal touch) 2014-12-22 00:02:27 +00:00
Mike Gelfand
629281a1e2 Fix license wording in Qt client .cc files to match the rest of the code. 2014-12-21 23:49:39 +00:00
Mike Gelfand
56c75a13b0 Rework session dialog in Qt client to load from .ui 2014-12-21 23:46:31 +00:00
Mike Gelfand
4ddbd550d8 Move filter text clearing button into line edit. Use Qt-provided button on Qt 5.2+. 2014-12-21 15:34:52 +00:00
Mike Gelfand
237acf1726 Rework statistics dialog in Qt client to load from .ui
Fix "Started %n time(s)" phrase (remove space in "time (s)", add proper
English translation for numeric forms).
2014-12-21 13:57:15 +00:00
Mike Gelfand
eee49af2b4 Improve cross-compilation support when using CMake 2014-12-20 22:28:43 +00:00
Mike Gelfand
dee7bc9b6a Move status bar creation to mainwin.ui
Among other things,
* fix turtle icons size (20x14 -> 16x16)
* use QIcon states instead of changing the turtle icon ourselves each
  time (unchecked - off, checked - on)
* make speed limit action in tray menu checkable
* simplify status bar buttons drawing and use QToolButton instead of
  QPushButton
2014-12-18 01:30:50 +00:00
Mike Gelfand
172f875691 Sync Qt client translations with the code 2014-12-14 18:33:28 +00:00
Mike Gelfand
70c6087e94 Rework torrent details dialog in Qt client to load from .ui
Make squeeze labels (used for values on Information tab) display tooltip
on hover if their text doesn't fit. Make selective labels (same as in
GTK+ client) text selectable with keyboard in addition to mouse.
Prevent dialog width growth occured before to fit long error texts.
2014-12-14 18:12:21 +00:00
Mike Gelfand
6c02008280 Do not use printf-style formatting in C++ code 2014-12-14 15:34:31 +00:00
Mike Gelfand
737fdab775 Do not use void to denote argumentless functions in C++ code 2014-12-14 11:57:23 +00:00
Mike Gelfand
c845e35ce1 Fix format specifier warning introduced couple commits earlier 2014-12-13 17:04:14 +00:00
Mike Gelfand
74a5bdb9e6 Don't mess with MinGW printf support for now (tricky) 2014-12-13 16:00:14 +00:00
Mike Gelfand
52a9d774e4 Fix compilation on Windows
This should not affect non-Win32 platforms in any way.
As for Win32 (both MinGW and MSVC), this should hopefully allow for
unpatched compilation. Correct functioning is not yet guaranteed though.
2014-12-13 15:22:39 +00:00
Mike Gelfand
aa0b500ae5 Make utp_config.h usable with MSVC (#warning directive is not standard) 2014-12-13 10:03:44 +00:00
Mike Gelfand
365b28bc81 Strip needless const& specifiers on SIGNAL and SLOT arguments (Qt client) 2014-12-13 09:04:10 +00:00
Mike Gelfand
2adbb42763 Fix various cppcheck comments for Qt client code 2014-12-12 23:52:17 +00:00
Mike Gelfand
9605bfc36a Remove redundant "struct" keyword use in C++ code (Qt client) 2014-12-12 23:21:04 +00:00
Mike Gelfand
67dc1c8485 Strip spaces around :: in C++ code (Qt client) 2014-12-12 23:05:10 +00:00
Mike Gelfand
faf1b2fbdf #5848: Use theme-provided icons in Qt client (patch by equeim + small additions) 2014-12-12 21:47:22 +00:00
Mike Gelfand
79848c36c0 #5841: Fix initial watchdir scan in Qt client
Run the initial scan after application has finished initializing and
session has been created. Otherwise, adding torrents is a no-op.
2014-12-11 22:21:24 +00:00
Mike Gelfand
64757f640a #5685: Use proper icon in Qt client desktop file (reported by rahulsundaram) 2014-12-11 20:13:45 +00:00
Mike Gelfand
aedfc35393 #5692: Fix build under Cygwin (patch by rb07) 2014-12-11 20:06:07 +00:00
Mike Gelfand
74c6719bb2 #5407: Fix crash on Mac when pausing torrents (patch by x190) 2014-12-11 19:57:52 +00:00
Mike Gelfand
7de6a52e14 Fix utils test; move -Winline to C-only flags (it only harms C++) 2014-12-11 05:25:26 +00:00
Mike Gelfand
fed15dc29d Fix a couple of ordinary and pedantic warnings
Add previously missing -Wall to warning flags in CMake. Remove -Wformat
and -Wvariadic-macros (enabled by default; latter is not meaningful in
C99 mode we use), -Wdeclaration-after-statement (again, not needed as
we use C99). Move -Wmissing-declarations to C-only flags (GCC man says
so).

Add copyrights year to crypto-utils-fallback.c.
2014-12-11 05:11:02 +00:00
Mike Gelfand
bb09ad5a50 Add missing svn:keywords property to recently (and not so recently) added files 2014-12-10 18:58:12 +00:00
Mike Gelfand
4fe156a255 Fix tr_moveFile error reporting
Remove unused `renamed` argument.
Use tr_error instead of errno to report errors to support Win32 file
wrappers which do not map Windows error codes to POSIX ones.
Return bool instead of int (0/-1).

Uncomment tr_error_prefix and tr_error_propagate_prefixed functions.
2014-12-10 18:37:58 +00:00
Mike Gelfand
a3fdd5f029 #5369: Improve file allocation error checking (initial patch by g.proskurin)
Additionally,
* always close file descriptor on error in cached_file_open (FD leak),
* only store file descriptor to tr_cached_file on success,
* call ftruncate after xfsctl-based preallocation so that correct size
  is reported by the system.
2014-12-10 18:23:11 +00:00
Mike Gelfand
1560ebd3ff Fix small memory leaks in crypto (base64) and rename (multi-file torrent) unit tests 2014-12-07 10:42:12 +00:00
Mike Gelfand
b9d844b166 Increase move test timeouts from 5 sec to 5 min 2014-12-07 10:10:16 +00:00
Mike Gelfand
5a05ceee5e Include CTest to enable memcheck 2014-12-07 10:00:34 +00:00
Mike Gelfand
e7382071d0 Remove duplicate -Wcast-align flag, add canonicalize_file_name function check 2014-12-06 16:28:53 +00:00
Mike Gelfand
627555f47b #4400, #5462: Fix Mac build by adding new crypto-utils files to Xcode project. 2014-12-05 23:41:09 +00:00
Mike Gelfand
42de056a4b #4400, #5462: Move SHA1/HEX helpers to crypto-utils
On a way to factoring out OpenSSL support to a standalone file to ease
addition of other crypto libraries support in the future, move helpers
providing SHA1/HEX conversion to crypto-utils.{c,h}.

Rename functions:
* tr_sha1_to_hex -> tr_binary_to_hex (add length argument),
* tr_hex_to_sha1 -> tr_hex_to_binary (add length argument).

Make tr_sha1_to_hex and tr_hex_to_sha1 wrappers around above functions.
2014-12-04 20:53:56 +00:00
Mike Gelfand
748f8a75d2 #4400, #5462: Move SSHA1 helpers to crypto-utils
On a way to factoring out OpenSSL support to a standalone file to ease
addition of other crypto libraries support in the future, move helpers
providing SSHA1 password generation and checking to crypto-utils.{c,h}.
2014-12-04 20:45:18 +00:00
Mike Gelfand
5c43b5c23c #4400, #5462: Move BASE64 helpers to crypto-utils
On a way to factoring out OpenSSL support to a standalone file to ease
addition of other crypto libraries support in the future, move helpers
providing BASE64 encoding and decoding to crypto-utils.{c,h}. OpenSSL-
related functionality is moved to crypto-utils-openssl.c.

Add new functions to be implemented by crypto backends:
* tr_base64_encode_impl - encode from binary to BASE64,
* tr_base64_decode_impl - decode from BASE64 to binary.

Change `tr_base64_encode` and `tr_base64_decode` functions to expect
non-negative input data length which is considered real and never adjusted.
To process null-terminated strings (which was achieved before by passing 0
or -1 as input data length), add new `tr_base64_encode_str` and
`tr_base64_decode_str` functions which do not accept input data length as
an argument but calculate it on their own.
2014-12-04 19:58:34 +00:00
Mike Gelfand
117ab3e8d2 #4400, #5462: Move DH helpers to crypto-utils
On a way to factoring out OpenSSL support to a standalone file to ease
addition of other crypto libraries support in the future, move helpers
providing DH key exchange to crypto-utils.{c,h}. OpenSSL-related
functionality (DH context management) is moved to crypto-utils-openssl.c.
Since we know in advance that DH secret key management code will be the
same for most of backends, implement common functionality in separate
crypto-utils-fallback.c.

Add new tr_dh_ctx_t and tr_dh_secret_t types and functions to be
implemented by crypto backends:
* tr_dh_new - allocate DH context,
* tr_dh_free - free the context,
* tr_dh_make_key - generate private/public keypair,
* tr_dh_agree - perform DH key exchange and generate secret key,
* tr_dh_secret_derive - calculate secret key hash,
* tr_dh_secret_free - free the secret key,
* tr_dh_align_key - align some DH key in the buffer allocated for it.

Make DH secret key not accessible in plain form outside the crypto
backend. This allows for implementations where the key is managed by
the underlying library and is not even exposed to our backend.
2014-12-04 19:18:08 +00:00
Mike Gelfand
7e23390fa2 #4400, #5462: Do not assert on input to SHA1 or RC4 if input length is 0. 2014-12-04 18:20:46 +00:00
Mike Gelfand
d424ed143e #4400, #5462: Move RC4 helpers to crypto-utils
On a way to factoring out OpenSSL support to a standalone file to ease
addition of other crypto libraries support in the future, move helpers
providing RC4 ciphering to crypto-utils.{c,h}. OpenSSL-related
functionality (RC4 context management) is moved to crypto-utils-openssl.c.

Add new tr_rc4_ctx_t type and functions to be implemented by crypto
backends:
* tr_rc4_new - allocate RC4 context,
* tr_rc4_free - free the context,
* tr_rc4_set_key - set cipher key,
* tr_rc4_process - cipher memory block.
2014-12-04 12:37:08 +00:00