Message caching is handled by SessionChatLog in memory even when history is
disabled. ChatLog doesn't need to worry about how the messages its rendering
are being stored. Dynamic loading up and down in chatlog is sitll functional.
Checking if history pointer is valid is not sufficient, the setting must also
be checked. This caused asserts in history when history was disabled in
settings.
Makes the CoreAV thread own all ToxCalls in order to prevent signals
from being emitted via a Direct connection from Audio to CoreAV.
(cherry picked from commit 6b468e41fa)
In other applications chatrooms allow you to idle in a call and have
people hop in and out as desired. If a user is the only one presently
online in a group but knows someone will be joining shortly they should
be able to join the call ahead of time.
(cherry picked from commit 46d57c6864)
receiver QObject is used by Qt to automatically deregister the connection when
the receiver is destroyed. Forward it on to Qt's connect.
(cherry picked from commit 24e4ec3751)
Qt doesn't support QObject multiple inheritance, so use our existing interface
macros to declare signals in the interface without QObject, and implement them
in child classes.
(cherry picked from commit 82a4f1b412)
connection is normally returned from Qt's connect, and the caller may want to
track the connection to manually disconnect it.
(cherry picked from commit 41b2b35ce3)
c-toxcore calls the groupCallCallback from it's main thread instead of
the ToxAV thread as expected, this was triggering an assertion.
Aditionally the destructors of Core and CoreAV were fixed, because they
now either crashed or deadlocked qTox when it was closed while a group
call was still running.
(cherry picked from commit 141cbf8870)
This actually fixes two problems:
1) CoreAV and Audio thread both locked the callsLock and audioLock in
different orders, resulting in a deadlock of both threads. This fixed by
using a ReadWriteLock in the CoreAV thread.
2) Multiple functions were emitting signals while holding a lock. This
is unsafe, because the connected slot may acquire any other lock. This
is fixed by releasing the locks before emitting signals.
(cherry picked from commit 4b9e4a571d)
It doesn't really make sense to assert that the callbacks are coming
from any other thread than CoreAV, when we actually want to ensure the
callback is coming from Core thread.
Remove over agressive assert from sendGroupCallAudio(...), this function
should be callable from any thread.
(cherry picked from commit 9499925fb2)
We we're calling toxav_* functions without synchronizing to any of the
Tox threads.
Additionally remove the call timeout, it creates timers from different
threads, which causes errors.
(cherry picked from commit 98cfe9838f)
This commit fixes the behavior when a message is received while the
chatlog is scrolled to the bottom. With this change, the chatlog will
stick to the bottom when it is scrolled all the way down. If it is
somewhere in the middle (e.g. for search) the chatlog will not change
its position.
This is a minimal fix to reduce risk for the release. A more complete
re-architecture will be made.
The netcam covers much of the chat in groups, and has nothing to show since
group video calls aren't possible. Who is speaking in call is already shown by
the bold names at the top of the group, taking much less space.
Fix#5918
As of 2019-10-09, toxme.io was taken offline permanently. Remove UI and code
in qTox relating to it. Revert this commit if it comes back online in the
future.
Fix#5897
When re-evaluating our dependencies we decided that the update bridge
has a high potential for security issues because it's not widely used.
Additionally similar functionality is already present in qTox.
* When the DB schema was too new we were accessing history anyways. This
has potential to just completely corrupt the DB
* When history was disabled there was a chance we would attempt to write
to history anyways. Added more checks in this area
* Chatform was accessing invalid iterators when there were no displayed
messages. Added a guard for this case
Group calls are supposed to show the name of each member under their
avatars. The color of the text was previously fixed to white regardless
of the background ignoring the color of the background.
This fix ensures that the background color is not the same color as the
label text
Avatars for group members currently in a call are resized depending on
the area they are displayed in. Previously a scrollbar would appear and
disapear based on the size of the contents. This resulted in
oscillations that ended in a SIGSEGV.
This fix avoids the oscillations by fixing the scrollbar to always be
shown
The call to Core::getGroupPeerNames is expected to return a list where
the index in the list is the group member id. In any error case we were
previously breaking this constraint. It turns out that every time
someone joins a group we call this function before they have a valid
name resulting in their id not being added to the list.
This fix ensures that the list coming out of Core::getGroupPeerNames
always has a full list.
Fixes#5838
On application close we used to access invalid memory associated with
the audio subsystem. This was because on destruction of static variables
we tried to access state associated with an already destructed item.
These variables seem to have no good reason to be static. They should be
tied to a single CoreAV instance and are only accessed through an
existing CoreAV instance.
The previous implementation of hiding the date line would cause 100% cpu
usage. When the date line was shown it would hide the top line, causing
the date line to be hidden again due to a state change in which dates
was visible.
This is a minimal patch to work around the issue by pretending the line
covered by the date line is the first visible line when the dateline is
shown
Fixes#5620
Before a bug in qTox would make it possible for a user to try to send an empty
action type message. This would fail to send at toxcore, but still be persisted
in history, causing it to fail every time FauxOfflineEngine tried to resend
it. Moving these stuck messages into the broke_messages table will stop qTox
from attempting to deliver them on each connect, and display in the GUI to
users that the messages aren't really pending anymore.
Otherwise sending just "/me " calls down to core with 0-length action, which
causes a toxcore send error.
There may be messages that are stuck in history as pending with "/me " content,
causing them to fail to send on every start. Those should be moved to the new
broken_messages table, similar to stuck pending messages from #5776. There's no
reason this fix to stop adding more broken messages needs to wait on the
history fix, though.