The function returns the number of lowest zero bits of a 32-bit value
and shifts the value by that number. By the time it reaches last
condition x can be zero if and only if the passed value was zero and
hence we can immediately return 32.
Initially the condition were likely supposed to be `if (!(x & 1))` but
in this particular case it's the same as `!x` and subjectively it makes
more sense to just check if the number is zero. See discussion in
the #264.
See-also: https://mirror.git.trinitydesktop.org/gitea/TDE/tqt/pulls/264
Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
(cherry picked from commit 709a2722bd)
The desktop files listed a mimetype, but it doesn't seem to be tied
to any specific file types. Also, the filename is not passed in the
Exec arguments.
Lintian tag: desktop-mime-but-no-exec-code
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit dee8637bfc)
It makes no logical sense to serialize a pointer value and in fact 0 is written. So the call to look_ptr is never executed when deserializing a pointer.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit ec615dc3b5)
Also remove some left over files that should have been deleted when
support for SCO was removed.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 43ae5aadf4)
The #defines were used for some very old compilers which had issues with template instantiation.
We are now using c++17 compilers, so this is unnecessary.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 45d592deb6)
The sed invocation previously introduced in 854c5d5c9 was using `\s` for
space matching which is GNU extensions. This commit replaces it with
POSIX-compliant character class `[[:space:]]`.
Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
(cherry picked from commit c7a23a1e57)
We are using c++17 compilers, so 'explicit' is supported.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 1df9f28205)
We are using c++17 compilers, so bool is always available.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 0b8fe7da6f)
We are using c++17 compilers, so template specialization are supported.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 9e057c68de)
since timers are only activated by the main GUI thread in 'gsourceDispatch'.
This solves issue TDE/tdebase#635.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 6da60fd237)
Although highly unlikely, the following situation was possible:
- a thread is restarted while still running. The call to the second 'start()' blocks because the thread is still running
- the OS decides to randomly wake up the thread that called 'start()'
- a second thread is started and runs in parallel to the first thread, with obvious undefined behavior
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 3143d2d40a)
This relates to issue #162.
The new code is partially taken from Qt4 but with some local rework.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit c5cda03125)
If the selected font supports the required characters, the text will be displayed correctly.
If the selected font does not support such characters, empty boxes will be displayed in place of the expected text.
Part of the code changes comes from Qt4 code.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit e0a38072cf)