crash in pinnedbar fix, assertion info added to crash report, onViewsIncrement() and updateCounter() checks added, returned style fake qt args for Xubuntu 15.10, 0.9.33 stable (Linux only)

This commit is contained in:
John Preston
2016-03-16 00:13:32 +03:00
parent 3226c93f88
commit b3f11e7dff
10 changed files with 42 additions and 22 deletions
+12 -5
View File
@@ -38,14 +38,21 @@ int main(int argc, char *argv[]) {
Logs::start(); // must be started before PlatformSpecific is started
PlatformSpecific::start(); // must be started before QApplication is created
//QByteArray args[] = { "-style=0" }; // prepare fake args to disable QT_STYLE_OVERRIDE env variable
//static const int a_cnt = sizeof(args) / sizeof(args[0]);
//int a_argc = a_cnt + 1;
//char *a_argv[a_cnt + 1] = { argv[0], args[0].data() };
// prepare fake args to disable QT_STYLE_OVERRIDE env variable
// currently this is required in some desktop environments, including Xubuntu 15.10
// when we don't default style to "none" Qt dynamically loads GTK somehow internally and
// our own GTK dynamic load and usage leads GTK errors and freeze of the current main thread
// we can't disable our own GTK loading because it is required by libappindicator, which
// provides the tray icon for this system, because Qt tray icon is broken there
// see https://github.com/telegramdesktop/tdesktop/issues/1774
QByteArray args[] = { "-style=0" };
static const int a_cnt = sizeof(args) / sizeof(args[0]);
int a_argc = a_cnt + 1;
char *a_argv[a_cnt + 1] = { argv[0], args[0].data() };
int result = 0;
{
Application app(argc, argv);
Application app(a_argc, a_argv);
result = app.exec();
}