mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Add Qt 6 support
Tested only on Linux so far
This commit is contained in:
@@ -288,6 +288,7 @@ void Launcher::init() {
|
||||
QApplication::setApplicationName(qsl("TelegramDesktop"));
|
||||
QApplication::setAttribute(Qt::AA_DisableHighDpiScaling, true);
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
// fallback session management is useless for tdesktop since it doesn't have
|
||||
// any "are you sure you want to close this window?" dialogs
|
||||
// but it produces bugs like https://github.com/telegramdesktop/tdesktop/issues/5022
|
||||
@@ -295,6 +296,7 @@ void Launcher::init() {
|
||||
// and https://github.com/telegramdesktop/tdesktop/issues/948
|
||||
// more info: https://doc.qt.io/qt-5/qguiapplication.html#isFallbackSessionManagementEnabled
|
||||
QApplication::setFallbackSessionManagementEnabled(false);
|
||||
#endif // Qt < 6.0.0
|
||||
|
||||
initHook();
|
||||
}
|
||||
@@ -402,7 +404,7 @@ void Launcher::prepareSettings() {
|
||||
if (!path.isEmpty()) {
|
||||
auto info = QFileInfo(path);
|
||||
if (info.isSymLink()) {
|
||||
info = info.symLinkTarget();
|
||||
info = QFileInfo(info.symLinkTarget());
|
||||
}
|
||||
if (info.exists()) {
|
||||
const auto dir = info.absoluteDir().absolutePath();
|
||||
|
Reference in New Issue
Block a user