tux3 (4):
fix: Accept IDs as tox URIs, not just ToxDNS addresses
fix: Various IPC event handling and related bugs on startup
fix: Don't even try to add ourselves as a friend in the Tox URI handler
fix: msleep in toxuri processEvents loops, to avoid 100% CPU
Fixes#1926 : When an IPC event was processed locally, if the window was closed before the core could start, the event handler would be forever stuck in the background waiting for the core to start. We fix this by substituting QApplication::quit() by a Nexus::quit() function and a Nexus::isRunning() function, which gives us a condition for exiting blocking processEvents() loops. We cannot simply use QApplication::quit(), because this function has no effect before the start of the event loop.
The problem was further exacerbated by the Tox URI event handler being (incorrectly) blocking. The IPC owner would block in this event handler, and the sender of the event would give up waiting and process the event itself a second time, potentially triggering the first bug. We fix the event handlers accordingly to be (mostly) non-blocking.
Also fixes a related deadlock between ~Core and ~Profile in the case of an early exit
Revert needed, since otherwise there is no way to do automatic sorting
of includes.
Also reverted change to the docs, as leaving it would make incorrect
docs.
In case of conflicts, includes were sorted according to the coding
standards from #3839.
This reverts commit b4a9f04f92.
This reverts commit 5921122960.
It was always eating two characters more than needed.
A toxURI passed to handleToxURI always starts with "tox:", it's checked in the handleToxURI callers. So here we need to remove that prefix, that's long 4 characters and not 6.
The previous code was meant to handle tox:// and tox: cases, but the tox:// case is invalid and should not be handled (see #2118).
Fixes: d6a0910fc8 ("fix uri parsing and tox URI detection, closes#2118")
If you restart qTox in the middle of downloading an update, it would continue to download the update correctly but the progress bar would go from 0 to 50% instead of resuming from 50 to 100%