mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 14:45:14 +00:00
Add version check for abstract sockets
This commit is contained in:
@@ -122,9 +122,9 @@ int Sandbox::start() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef Q_OS_LINUX
|
#if defined Q_OS_LINUX && QT_VERSION >= QT_VERSION_CHECK(6, 2, 0)
|
||||||
_localServer.setSocketOptions(QLocalServer::AbstractNamespaceOption);
|
_localServer.setSocketOptions(QLocalServer::AbstractNamespaceOption);
|
||||||
#endif
|
#endif // Q_OS_LINUX && Qt >= 6.2.0
|
||||||
|
|
||||||
connect(
|
connect(
|
||||||
&_localSocket,
|
&_localSocket,
|
||||||
|
@@ -565,14 +565,14 @@ void SetApplicationIcon(const QIcon &icon) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QString SingleInstanceLocalServerName(const QString &hash) {
|
QString SingleInstanceLocalServerName(const QString &hash) {
|
||||||
#ifdef Q_OS_LINUX
|
#if defined Q_OS_LINUX && QT_VERSION >= QT_VERSION_CHECK(6, 2, 0)
|
||||||
if (KSandbox::isSnap()) {
|
if (KSandbox::isSnap()) {
|
||||||
return u"snap.telegram-desktop."_q + hash;
|
return u"snap.telegram-desktop."_q + hash;
|
||||||
}
|
}
|
||||||
return hash + '-' + cGUIDStr();
|
return hash + '-' + cGUIDStr();
|
||||||
#else // Q_OS_LINUX
|
#else // Q_OS_LINUX && Qt >= 6.2.0
|
||||||
return QDir::tempPath() + '/' + hash + '-' + cGUIDStr();
|
return QDir::tempPath() + '/' + hash + '-' + cGUIDStr();
|
||||||
#endif // !Q_OS_LINUX
|
#endif // !Q_OS_LINUX || Qt < 6.2.0
|
||||||
}
|
}
|
||||||
|
|
||||||
std::optional<bool> IsDarkMode() {
|
std::optional<bool> IsDarkMode() {
|
||||||
|
Reference in New Issue
Block a user