Commit Graph

33 Commits

Author SHA1 Message Date
Mike Gelfand db3d40d0ed Switch to clang-format for code formatting, include Mac client 2021-08-16 00:38:29 +03:00
Charles Kerr 9d313a8816
sonarcloud warnings 9 (#1511)
* refactor: const correctness 

* refactor: fix some implicit conversions

* refactor: make local pointers const if their objects are not modified

* refactor: do not cast away const in torrent-cell-renderer

* refactor: remove call to deprecated gtk_icon_size_lookup_for_settings

* refactor: member functions that do not mutate their objects should be declared const

* chore: do not end comments with a semicolon
2020-11-08 21:31:02 -06:00
Charles Kerr e59fe7daaf
fix: silence some sonarcloud warnings (#1493)
* refactor: add null ptr check in initPeerRow()

* refactor: add a nullptr gurad in icon_cache_get_mime_type_icon

* chore: silence two "break notreached" warnings

* chore: silence sonarcloud html warnings

* chore: silence sonarcloud uninitialized var warning

* chore: silence sonarcloud nullptr warning
2020-10-31 16:23:43 -05:00
Charles Kerr 677dc73eac
refactor: use GTest for running tests (#1383)
* refactor: use google-test on libtransmission tests
2020-08-11 13:11:55 -05:00
Mike Gelfand 14370e5353 Fix a number of other style inconsistencies met along the way (part 2) 2017-05-01 18:47:49 +03:00
Mike Gelfand e1d53855f4 Avoid declaring multiple variables on the same line 2017-05-01 18:46:41 +03:00
Mike Gelfand 4f9d9ad92b Code style change leftovers
For some reason, GTK client wasn't fully processed. All the rest of changes
are mostly in comments.
2017-04-21 10:40:57 +03:00
Mike Gelfand dadffa2c0f Align type qualifiers to the right (code style)
This way all the qualifiers (`const`, `volatile`, `mutable`) are grouped
together, e.g. `T const* const x` vs. `const T* const x`. Also helps reading
types right-to-left, e.g. "constant pointer to constant T" vs. "constant
pointer to T which is constant".
2017-04-20 19:53:20 +03:00
Mike Gelfand d7930984ef Adjust uncrustify config, reformat all but Mac client
There're places where manual intervention is still required as uncrustify
is not ideal (unfortunately), but at least one may rely on it to do the
right thing most of the time (e.g. when sending in a patch).

The style itself is quite different from what we had before but making it
uniform across all the codebase is the key. I also hope that it'll make the
code more readable (YMMV) and less sensitive to further changes.
2017-04-20 10:01:22 +03:00
Mike Gelfand 2248d3670f Get rid of $Id$ SVN keywords in source files 2016-09-02 23:10:15 +03:00
Jordan Lee b559a20029 const correctness
silence some qual-cast warnings by sprinkling more consts throughout,
e.g. casting a const void* to a const struct foo * const *
2015-12-06 22:13:10 +00:00
Jordan Lee 59af132947 replace deprecated gtk_icon_info_free() calls with g_object_unref() in GTK+ >= 3.8.0 2013-07-08 16:25:18 +00:00
Jordan Lee d1571bda02 (gtk) use replace strcmp() with g_strcmp0() everywhere 2013-02-14 15:17:42 +00:00
Jordan Lee 3d38723ad9 Follow more common whitespace style conventions in the C code (libtransmission, daemon, utils, cli, gtk). 2012-12-05 17:29:46 +00:00
Jordan Lee 0e48418f26 (trunk gtk) since we're bumping glib's requirement to 2.26 (27 Sept 2010), it's a good time to bump the gtk+ requirement to 2.22 (32 Sept 2010). 2011-08-07 18:41:13 +00:00
Jordan Lee 270126820a (trunk gtk) bump the glib2 requirement from 2.8 to 2.26 s.t. transmission-gtk can use glib's GDBus module and drop the glib-dbus library dependency 2011-08-07 16:42:38 +00:00
Jordan Lee 879a2afcbd Update the copyright year in the source code comments.
The Berne Convention says that the copyright year is moot, so instead of adding another year to each file as in previous years, I've removed the year altogether from the source code comments in libtransmission, gtk, qt, utils, daemon, and cli.

Juliusz's copyright notice in tr-dht and Johannes' copyright notice in tr-lpd have been left alone; it didn't seem appropriate to modify them.
2011-01-19 13:48:47 +00:00
Charles Kerr 5eafe91824 (trunk gtk) general cleanup to make function's naming scheme and API more consistent. This is only a fraction of what the GTK+ client's codebase needs, unfortunately. 2010-12-21 19:20:58 +00:00
Charles Kerr 56e90f1457 (trunk) more "svn propset" tweaks for $Id$ 2010-10-01 20:22:51 +00:00
Charles Kerr 5eb2f5a274 (trunk gtk) and while we're on the subject, fix more tab damage 2010-05-18 20:55:14 +00:00
Charles Kerr 182cbb8b90 (trunk) one of the less-interesting commits in a while: remove trailing spaces from lines 2010-01-05 23:47:50 +00:00
Charles Kerr baf0ffb02c (trunk gtk) #2605: GIcon memory leak in GTK+ client 2009-11-25 04:42:42 +00:00
Charles Kerr f69e335291 (trunk) #2096: Magnet, BEP #9 support 2009-11-24 02:16:31 +00:00
Charles Kerr b63a9fb17c (trunk gtk) #2453: Transmission since version 1.61 need GTK+ 2.12 or an upper version. 2009-09-27 17:47:45 +00:00
Charles Kerr 2a7fe76098 (gtk trunk) possible fix for #2267: gdb says it's crashing in g_strfreev(). possibly the pointer being passed to g_strfreev() isn't initialized properly if the GThemedIcon's is NULL (or if somehow its "names" property isn't found). 2009-08-11 19:36:11 +00:00
Charles Kerr 5e0315892b (trunk gtk) possible fix for #2267 2009-07-27 18:48:21 +00:00
Charles Kerr 3cbacf4202 (trunk gtk) #2079: transmission 1.61 crashes on Ubuntu Hardy 2009-06-05 15:45:18 +00:00
Charles Kerr 29b1d3e2cc (trunk) #920: add "move data" to libT so all clients can use it 2009-05-13 15:54:04 +00:00
Charles Kerr c0c3a00161 (trunk gtk) fix memory leak in the icons code. 2009-04-23 15:45:30 +00:00
Charles Kerr 9d04f8906c (trunk gtk) icons.c: silence a couple of compiler warnings on older systems 2009-03-05 16:08:16 +00:00
Charles Kerr f6ecec7776 (trunk gtk) #628: tweak r7996 a little bit to play nicer on older versions of gtk+ 2009-03-03 17:58:25 +00:00
Charles Kerr f5612b348b (trunk gtk) maybe compile a little better for Lacrocivous 2009-03-03 00:55:03 +00:00
Charles Kerr 983febee3b (gtk trunk) #628: Show thumbnails next to torrents 2009-03-02 23:31:01 +00:00