Files are conceptually temporary, having extra conflict handling logic
is unnecessary, and having the test fail to run if it crashed on last
invocation is annoying.
Replace underlength resume_file_id's with arbitrary data. Loaded file IDs are
not used for anything at this time, but they should not be null nor invalid.
Any 32-byte value is valid, so use all 0's for consistency.
Fix#6553
The implicit cast in addNewFileMessage's argument causes a conversion from the
binary data of file_id to be interpreted as UTF8 characters. On null bytes or
invalid UTF8, the resulting QString can be empty or truncated. Empty IDs causes
null file_restart_id's to be inserted into the database.
Fixes the cause of #6553, but the database damage still needs to be healed.
"finished" is not a field in file_transfers. Bug has been present since
initially introduced in d9b39b3102.
Had no real effect since file transfers are inserted with initial state
CANCELLED, which is usually the case for a 0-length finished file, but
it still logged an SQL error.
warnings interface was only being linked to qtox_static, so were not being
applied to e.g. util. Link it to each library as well as qtox_static so that
they all inherit all the warnings.
We already deep copy all other data types. Especially with Qt types like
QByteArray, having a deep copy to start is important since it shallow
copies on any subsequent copy, so the callback provider only gets a
shallow copy in the QByteArray of the temporary data from SQLite.
* Pass MessageBoxManager instantiation around instead of relying on a singleton
* Mock MessageBoxManager for unit tests when needed, since they don't have a
QApplication which is required for creating QWidgets
* Remove GUI class, which didn't have a clear purpose
Widget is the only caller, let it set its own title. Wrap inherited setTitle to
prepend "qTox". Check for thread is not needed since it is only called
from Widget's slots.
Style already has themeChanged, which was unused. GUI's themeReload just
dispatches to Style, which is already piped to GUI classes. Give the signal
to Style itself so that classes can connect to that, rather than relying on
GUI's singleton.
CMAKE_OSX_DEPLOYMENT_TARGET has no effect when not building for macOS.
MACOSX_RPATH must be set explicitly for OpenAL to be found. It is default using newer cmake, but OpenAL is using cmake 2.6.
macOS system.log was reporting "Unknown key for integer: RunAtLoad" and
not loading qTox at start despite
~/Library/LaunchAgents/chat.tox.qtox.autorun.plist being present.
Changing the type from an int to a bool causes it to load successfully
on boot.
Fix#2814
Autotools version failed to configure on macOS, and QrEncode's README says "If
the configure script does not work well, try to use CMake." Cmake works for
both macOS and Windows.