Some builds of Qt appear to have a bug in icon loading: QIcon::hasThemeIcon
is sometimes unaware that the icon returned from QIcon::fromTheme was a
fallback icon, causing hasThemeIcon to incorrectly return true.
In qTox this leads to the tray and window icons using the static qTox logo
icon instead of an icon based on the current presence status.
This workaround checks for an icon that definitely does not exist to
determine if hasThemeIcon can be trusted.
On systems with the Qt bug, this workaround will always use our included
icons but user themes will be unable to override them.
the system tray should no longer use a static icon when the xdg
application icons are named qtox.{png,svg}
this means the workaround https://bugs.archlinux.org/task/47910 done
downstream at arch linux shouldn't be necessary anymore.
related discussion in #2903
qTox will automatically import the old history on startup.
This new database code is much more robust.
It is very resilient and will not corrupt or disappear after a crash or
power failure, unlike the old code.
The on-disk database format is also much more compact now.
The database sync option in the advanced settings has been removed,
we know run many database operations asynchronously so performance
should not be a problem anymore, but we always ensure resiliency
in case of abrupt termination, so there is no tradeoff anymore.
This patch adds ability to override qTox window and tray icons with ones from user's desktop theme. Some people prefer keeping tray icons consistent to achieve best looks.
Following theme icons used:
* qtox: general window icon which is also used in taskbar
* qtox-online, qtox-offline, qtox-busy, qtox-away, qtox-invisible, qtox-event: tray icons
If theme icon is not available then default built-in icon will be used.