mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-02 07:25:46 +00:00
Provide old version to Platform::NewVersionLaunched
This commit is contained in:
@@ -622,6 +622,22 @@ bool OpenSystemSettings(SystemSettingsType type) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void NewVersionLaunched(int oldVersion) {
|
||||
InstallLauncher();
|
||||
if (oldVersion > 0
|
||||
&& oldVersion <= 4000002
|
||||
&& qEnvironmentVariableIsSet("WAYLAND_DISPLAY")
|
||||
&& DesktopEnvironment::IsGnome()
|
||||
&& !QFile::exists(cWorkingDir() + qsl("tdata/nowayland"))) {
|
||||
QFile f(cWorkingDir() + qsl("tdata/nowayland"));
|
||||
if (f.open(QIODevice::WriteOnly)) {
|
||||
f.write("1");
|
||||
f.close();
|
||||
Core::Restart(); // restart with X backend
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
namespace ThirdParty {
|
||||
|
||||
void start() {
|
||||
@@ -642,22 +658,6 @@ void finish() {
|
||||
|
||||
} // namespace Platform
|
||||
|
||||
void psNewVersion() {
|
||||
Platform::InstallLauncher();
|
||||
if (Local::oldSettingsVersion() > 0
|
||||
&& Local::oldSettingsVersion() <= 4000002
|
||||
&& qEnvironmentVariableIsSet("WAYLAND_DISPLAY")
|
||||
&& DesktopEnvironment::IsGnome()
|
||||
&& !QFile::exists(cWorkingDir() + qsl("tdata/nowayland"))) {
|
||||
QFile f(cWorkingDir() + qsl("tdata/nowayland"));
|
||||
if (f.open(QIODevice::WriteOnly)) {
|
||||
f.write("1");
|
||||
f.close();
|
||||
Core::Restart(); // restart with X backend
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void psSendToMenu(bool send, bool silent) {
|
||||
}
|
||||
|
||||
|
@@ -48,8 +48,6 @@ void psSendToMenu(bool send, bool silent = false);
|
||||
int psCleanup();
|
||||
int psFixPrevious();
|
||||
|
||||
void psNewVersion();
|
||||
|
||||
inline QByteArray psDownloadPathBookmark(const QString &path) {
|
||||
return QByteArray();
|
||||
}
|
||||
|
Reference in New Issue
Block a user