Changeset View
Changeset View
Standalone View
Standalone View
net-im/telegram-desktop/files/patch-Telegram_SourceFiles_main.cpp
- This file was added.
Property | Old Value | New Value |
---|---|---|
fbsd:nokeywords | null | yes \ No newline at end of property |
svn:eol-style | null | native \ No newline at end of property |
svn:mime-type | null | text/plain \ No newline at end of property |
--- Telegram/SourceFiles/main.cpp.orig 2017-09-05 17:38:38 UTC | |||||
+++ Telegram/SourceFiles/main.cpp | |||||
@@ -21,11 +21,14 @@ Copyright (c) 2014-2017 John Preston, ht | |||||
#include "application.h" | |||||
#include "platform/platform_specific.h" | |||||
#include "storage/localstorage.h" | |||||
+#include <QFileInfo> | |||||
+#include <QDir> | |||||
int main(int argc, char *argv[]) { | |||||
-#ifndef Q_OS_MAC // Retina display support is working fine, others are not. | |||||
+#if !defined(Q_OS_MAC) && QT_VERSION >= QT_VERSION_CHECK(5, 6, 0) | |||||
+ // Retina display support is working fine, others are not. | |||||
QCoreApplication::setAttribute(Qt::AA_DisableHighDpiScaling, true); | |||||
-#endif // Q_OS_MAC | |||||
+#endif // not defined Q_OS_MAC and QT_VERSION >= 5.6.0 | |||||
QCoreApplication::setApplicationName(qsl("TelegramDesktop")); | |||||
InitFromCommandLine(argc, argv); | |||||
@@ -39,6 +42,11 @@ int main(int argc, char *argv[]) { | |||||
Logs::start(); // must be started before Platform is started | |||||
Platform::start(); // must be started before QApplication is created | |||||
+ // I don't know why path is not in QT_PLUGIN_PATH by default | |||||
+ QCoreApplication::addLibraryPath(QFileInfo(QCoreApplication::applicationFilePath()).absolutePath()+"/../lib/qt5/plugins"); | |||||
+ // without this Telegram doesn't start on Ubuntu 17.04 due GTK errors | |||||
tcberner: ^%%QT_PLUGINDIR%%? or do they want ${PREFIX}/bin/lib/qt5/plugins? | |||||
Done Inline ActionsThis one isn't %%FOO%%-based. There is a mistake, it was meant to be ../lib yuri: This one isn't %%FOO%%-based. There is a mistake, it was meant to be ../lib | |||||
Done Inline Actionsconditions still aply :D -- I would sed in %%QT_PLUGINDIR%% instead of this whole thing "garbling a path together"-thingy -- also this should not be necesssary [tm]. tcberner: conditions still aply :D -- I would sed in %%QT_PLUGINDIR%% instead of this whole thing… | |||||
Done Inline ActionsConditionals apply in regular patches? yuri: Conditionals apply in regular patches? | |||||
Done Inline ActionsI meant an error in the patch does not negate, that just using QT_PLUGINDIR is what is needed :) tcberner: I meant an error in the patch does not negate, that just using QT_PLUGINDIR is what is needed… | |||||
+ setenv("QT_STYLE_OVERRIDE", "qwerty", false); | |||||
+ | |||||
int result = 0; | |||||
{ | |||||
Application app(argc, argv); |
^%%QT_PLUGINDIR%%? or do they want ${PREFIX}/bin/lib/qt5/plugins?