Commit Graph

15 Commits

Author SHA1 Message Date
Charles Kerr 7f147c65fb
refactor: fix more sonarcloud warnings (#1508)
* refactor: const correctness

* refactor: use getpwuid_r instead of getpwuid

* chore: simplify dict walking loop logic

* refactor: remove dead store assignment in announcer

* refactor: use std::make_shared
2020-11-05 16:46:21 -06:00
Charles Kerr 73fdd722a7
Sonarcloud warnings 3 (#1498)
* chore: use ClassName:: for calling static methods

* chore: prefer to initialize member data in the class initializer
2020-11-01 19:13:32 -06:00
Charles Kerr c2fb393390
chore: fix clang-tidy-11 warnings (#1436)
* refactor: mark subclass' destructors as override.

* refactor: use QUrl to parse announce URL strings.

The prompt for this was to work around a clang-tidy issue where
"char* host = nullptr;" triggers a "don't use varargs" warning,
but on the other hand it's also terser / cleaner.

* refactor: make the TorrentDelegate brushes const.

* refactor: s/auto/auto const*/ where appropriate

* chore: add some nonconst global warning exemptions

* chore: turn off warnings in GTest

* refactor: just disable the clang-tidy warning.

Apparently a std::array<T>::iterator is a T* on clang, since clang-tidy's
readability warning says we should use 'auto*' instead of 'auto'. However
adding that annotation fails on MSVC, where the is apparently _not_ a raw
pointer.

Since there's not a way to satisfy both of them at the same time, disable
the warning.
2020-09-09 09:24:39 -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
Charles Kerr 51573a3c1e
chore: clang-tidy cleanups (#1287)
* chore: fix syntax error in clang-tidy config file
2020-06-05 14:02:11 -05:00
Charles Kerr 070a7f2ffc
refactor: use snake_case field naming in qt client (#1262)
* refactor: use snake_case field naming in qt client

* fix: some missed symbols

* chore: make uncrustify happy

* fixup! refactor: use snake_case field naming in qt client
2020-05-27 16:53:12 -05:00
Charles Kerr d43aeb6a5c
chore: add clang-tidy checks to Qt client (#1236)
* chore: add clang-tidy integration for Qt client
2020-05-19 20:32:51 -05: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 981ef30ab4 Use session ID (if available) to check if session is local or not (Qt client) 2016-10-03 21:26:28 +03:00
Mike Gelfand 2248d3670f Get rid of $Id$ SVN keywords in source files 2016-09-02 23:10:15 +03:00
Jordan Lee 1af60ad6ad use '#pragma once' instead of #ifndef..#define..#endif guards 2016-03-29 16:37:21 +00:00
Mike Gelfand 971cc6d2d9 Remove context help button from dialogs on Windows
We don't currently (if ever) provide context help, so the button is
useless. Moreover, on Windows 10 it's even larger than before and
sometimes title text doesn't fit because of it.
2015-09-01 20:19:26 +00:00
Mike Gelfand 5120fc0f2c Unify/prettify Qt client headers style 2015-06-12 22:12:12 +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
Renamed from qt/options.h (Browse further)