Commit graph

14367 commits

Author SHA1 Message Date
Stephan Beyer
eaf4aa0e5b Fix leak in CloudProviderManager
The member _map, allocated in the constructor, was leaking.

The ad-hoc way to fix the leak would have been to add a destructor
that deletes _map.  However, there is no good reason why _map has
to be a pointer to a QMap (instead of a QMap).
Hence this commit changes the type of the _map member from a QMap
pointer to a QMap.

Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
2020-05-21 01:22:15 +02:00
Stephan Beyer
71a474129b Fix leak in CloudProviderWrapper
The member _recentlyChanged, allocated in the constructor, was leaking.

The ad-hoc way to fix the leak would have been to add a destructor
that deletes _recentlyChanged.  However, there is no good reason why
_recentlyChanged has to be a pointer to a QList (instead of a QList).
Hence this commit changes the type of the _recentlyChanged member
from a QList pointer to a QList.

Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
2020-05-21 01:22:15 +02:00
Kevin Ottens
5543e4d834 Don't use int literals for bools
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-05-20 13:52:58 +02:00
Nextcloud bot
7c5dbdd004
[tx-robot] updated from transifex 2020-05-20 03:25:52 +00:00
Michael Schuster
ef7d268a63
Merge pull request #1990 from nextcloud/use_auto_to_avoid_duplicated_type_names
Use auto to avoiding repeating type names
2020-05-20 04:14:14 +02:00
Michael Schuster
7804b8e006
Fix spacing
Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-05-20 03:57:33 +02:00
Kevin Ottens
712869db9a Use auto to avoiding repeating type names
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-05-20 03:54:41 +02:00
Michael Schuster
3d2de4fc40
Merge pull request #1989 from nextcloud/remove_redundant_virtual
Remove useless virtual, better use override only
2020-05-20 03:27:45 +02:00
Michael Schuster
1f2bfc0f42
Merge pull request #1988 from nextcloud/nullptr_everywhere
Use nullptr when appropriate
2020-05-20 02:55:15 +02:00
Michael Schuster
6559ba46bb
Merge pull request #1992 from NeroBurner/patch-1
Update github links to desktop repository
2020-05-20 02:53:00 +02:00
Michael Schuster
7fd431b50f
Use the default parameter: QUrl::path(QUrl::PrettyDecoded = 0x000000)
Change it to path() to be consistent with the other usages in the project :)

See: https://doc.qt.io/qt-5/qurl.html#path

Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-05-20 02:30:45 +02:00
Kevin Ottens
dea6ebaa35 Use nullptr when appropriate
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-05-20 02:21:26 +02:00
Michael Schuster
0c040c9686
Merge pull request #1986 from nextcloud/properly_handle_denormalized_href_path
Properly handle denormalized href
2020-05-20 01:31:34 +02:00
Reinhold Gschweicher
6ba59c9a9b Update github links to desktop repository
Update the issue and open PR links with the new repository URL.
The old URL is forwarded, but feels not completely right.

Signed-off-by: Reinhold Gschweicher <pyro4hell@gmail.com>
2020-05-19 21:33:37 +02:00
Michael Schuster
1f402e3482
Merge pull request #1994 from nextcloud/cleanup_stale_files
Remove now unused Qt patch files
2020-05-19 20:45:05 +02:00
Kevin Ottens
35d1b8b820
Merge pull request #1991 from sbeyer/improve-sanitizer-support
Improve sanitizer support
2020-05-19 20:21:40 +02:00
Kevin Ottens
cd5db46036 Remove now unused files
Those files all refer to Qt version older than 5.12, also they seemed
unused for a while now.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-05-19 19:43:35 +02:00
Michael Schuster
2744146101
Merge pull request #1979 from nextcloud/bump_qt_dependency_to_5_12
Stop supporting Qt older than 5.12
2020-05-19 18:57:28 +02:00
Stephan Beyer
7f598b181e Add -fno-sanitize=vptr for SANITIZE_UNDEFINED=ON
The UndefinedBehaviorSanitizer includes the "vptr" check.  This
check, however, needs typeinfo for OCC::AccountManager because
otherwise its stub for FileManTest leads to undefined references
when linking.  Adding the -frtti flag to enable run-time typeinfo
did not solve the problem.  I do not know another solution, so this
commit disables the vptr check.

Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
2020-05-19 10:57:58 +02:00
Stephan Beyer
00574ef8b4 Make sanitizer options more fine-grained
The SANITIZE_ADDRESS option of our CMake configuration activates the
AddressSanitizer (and UBSan in a non-working way) for the whole project
(although, by the way, its documentation pretends that it is only enabled
for tests).

This commit introduces new options SANITIZE_LEAK, SANITIZE_MEMORY,
SANITIZE_UNDEFINED, SANITIZE_THREAD.  Each of these options (including
SANITIZE_ADDRESS) enables only the corresponding sanitizer.

Moreover, we mark all sanitizer options as advanced options, because these
options are only interesting for developers.

Note that some sanitizers are conflicting, that is, not all options can
be enabled simultaneously.  Also, not all sanitizers are available for
all compilers and versions.  We, however, do not check for this, instead
we let the compiler throw its errors in such cases.

The explicit usage of the Google Linker is removed, because it is not
necessary and can lead to problems with clang.

The commit can be considered a rewrite of cmake/modules/SanitizerFlags.cmake.

Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
2020-05-19 10:57:02 +02:00
Nextcloud bot
b7517e9082
[tx-robot] updated from transifex 2020-05-19 03:24:08 +00:00
Kevin Ottens
9328a4bba3 Remove useless virtual, better use override only
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-05-18 20:45:20 +02:00
Kevin Ottens
4d1ff01654 Properly handle denormalized href
In case of denormalized paths in the dav href (presence of . or .. in
the path) simple string startsWith comparison wasn't enough to know if
said href ended up in the right namespace. That's why we're now using
QUrl (pretending local file since we don't have a full URL in the href)
to normalize the path before comparison.

This could happen with broken proxies for instance where we would
wrongly validate the dav information resulting in potentially surprising
syncing and name collisions.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-05-18 19:33:34 +02:00
Nextcloud bot
8f1b10ea70
[tx-robot] updated from transifex 2020-05-18 03:22:51 +00:00
Nextcloud bot
9a5d3ede18
[tx-robot] updated from transifex 2020-05-17 03:23:33 +00:00
Nextcloud bot
bfeb408a8c
[tx-robot] updated from transifex 2020-05-16 03:24:46 +00:00
Nextcloud bot
34c9eea413
[tx-robot] updated from transifex 2020-05-15 03:24:34 +00:00
Kevin Ottens
3867e73fd5 Stop supporting Qt older than 5.12
This both removes older Qt from the CI and also adjust all the
find_package calls in CMakeLists.txt

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-05-14 21:15:45 +02:00
Nextcloud bot
57ad12f3d2
[tx-robot] updated from transifex 2020-05-14 03:25:33 +00:00
Nextcloud bot
7cb7678dd4
[tx-robot] updated from transifex 2020-05-13 03:24:15 +00:00
Michael Schuster
4788f5032c
Merge pull request #1974 from nextcloud/dont_silently_kill_debug
Don't silently kill debug messages
2020-05-12 19:29:54 +02:00
Michael Schuster
a786c3a972
Merge pull request #1972 from nextcloud/fix_fileutil_leak
Fix leak in FileUtil::IsChildFile
2020-05-12 17:33:24 +02:00
Kevin Ottens
9000a880cb Don't silently kill debug messages
The message handler globally installed by the logger silently drop
messages if the logger is not logging. On top of it, it doesn't log
debug messages by default.

Anything not logged is currently silently discarded. This can come as a
surprise to a developer trying to contribute for the first time and
adding some debug message for some reason.

We're thus trying to strike a middle ground which is that debug messages
get a regular output if the logger isn't interested in them.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-05-12 17:33:13 +02:00
Kevin Ottens
bfdb1e730a Fix leak in FileUtil::IsChildFile
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-05-12 14:32:34 +02:00
Nextcloud bot
d2b4d1de4b
[tx-robot] updated from transifex 2020-05-12 03:23:08 +00:00
Nextcloud bot
8bd1ce2a3d
[tx-robot] updated from transifex 2020-05-11 03:24:25 +00:00
Nextcloud bot
56b067bbb9
[tx-robot] updated from transifex 2020-05-10 03:25:39 +00:00
Michael Schuster
afae7606cf
Merge pull request #1965 from ivaradi/drop-xenial
Do not build for Xenial anymore
2020-05-08 20:11:09 +02:00
István Váradi
697d303259 Do not build for Xenial anymore.
Signed-off-by: István Váradi <ivaradi@varadiistvan.hu>
2020-05-08 19:47:43 +02:00
Kevin Ottens
66d69bf197
Merge pull request #1961 from nextcloud/tray_window_is_dialog
Indicate this is a dialog and not a regular window
2020-05-07 13:05:40 +02:00
Kevin Ottens
3b6ab2fa5a Indicate this is a dialog and not a regular window
This is necessary with some window managers which would otherwise
consider they can reposition and resize the tray window as they wish
(yes, even though the user can't do it directly).

This is for instance the case if you use the tiling mode scripts of
KWin. It automatically ignores dialogs but might force windows to be
fullscreen (which would badly break the layout in our case).

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-05-07 09:39:08 +02:00
Kevin Ottens
f47b68b96c
Merge pull request #1962 from nextcloud/fix_svg_icon_loading
Force the default QQC2 style
2020-05-07 07:26:39 +02:00
Nextcloud bot
f0758c96aa
[tx-robot] updated from transifex 2020-05-07 03:24:41 +00:00
Kevin Ottens
de7021e85e Force the default QQC2 style
This works around a bug in KDE's qqc2-desktop-style which breaks buttons
with icons not based on a name. By forcing a style name the KDE Plasma
platformtheme plugin won't try to force qqc2-desktops-style anymore.

Can be removed once the bug in qqc2-desktop-style is gone.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-05-07 02:07:02 +02:00
Michael Schuster
590d0f25b5
Merge pull request #1963 from nextcloud/drone-remove-qt-5.7-and-5.8
Drone: Remove CI builds for Qt 5.7 and 5.8
2020-05-07 01:45:46 +02:00
Michael Schuster
244c8fa995
Drone: Remove CI builds for Qt 5.7 and 5.8
Housekeeping and the new 2.7 Tray builds need at least Qt 5.9

Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-05-07 01:17:36 +02:00
Michael Schuster
cd8762f2c1
Merge pull request #1957 from nextcloud/backport/1954/master
[master] Fix typos.
2020-05-04 20:41:42 +02:00
Michael Schuster
5f75231cf6
Merge pull request #1949 from veddox/master
Resolve symlinks when checking for registered paths.
2020-05-04 20:17:48 +02:00
Sandro Knauß
6cdae6c19e Fix typos.
Debian has a list of known typos in their checking tools.

Signed-off-by: Sandro Knauß <hefee@debian.org>
2020-05-04 18:11:36 +00:00
Michael Schuster
0082ff90df
Merge pull request #1955 from ivaradi/debian-cleanup
Remove unnecessary Debian build files
2020-05-04 19:57:19 +02:00