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>
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>
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>
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>
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>
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>
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>
Fixes issue #1948: https://github.com/nextcloud/desktop/issues/1948
The client already resolves symlinks when adding new paths to the
sync-list, but the Nautilus plugin did not do this yet, causing it
to not recognise synced folders if they were accessed via a symlink.
Signed-off-by: Daniel Vedder <d.vedder@web.de>