mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-01-15 19:55:18 +00:00
Alpha 1.0.17: crash fix in file open.
ShellExecute() call reenters Qt event loop, so each time we schedule a delayed action (like destroying FileLoader) and after that we call ShellExecute (in psOpenFile) we destroy it inside this call and can't use it after. So now we perform ShellExecute calls only delayed (using task queue).
This commit is contained in:
parent
a5eb5a6ea2
commit
ae08a2f697
@ -9,7 +9,7 @@
|
|||||||
<Identity Name="TelegramDesktop"
|
<Identity Name="TelegramDesktop"
|
||||||
ProcessorArchitecture="x64"
|
ProcessorArchitecture="x64"
|
||||||
Publisher="CN=Telegram Messenger LLP, O=Telegram Messenger LLP, L=London, C=GB"
|
Publisher="CN=Telegram Messenger LLP, O=Telegram Messenger LLP, L=London, C=GB"
|
||||||
Version="1.0.16.0" />
|
Version="1.0.17.0" />
|
||||||
<Properties>
|
<Properties>
|
||||||
<DisplayName>Telegram Desktop</DisplayName>
|
<DisplayName>Telegram Desktop</DisplayName>
|
||||||
<PublisherDisplayName>Telegram Messenger LLP</PublisherDisplayName>
|
<PublisherDisplayName>Telegram Messenger LLP</PublisherDisplayName>
|
||||||
|
@ -34,8 +34,8 @@ IDI_ICON1 ICON "..\\art\\icon256.ico"
|
|||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION 1,0,16,0
|
FILEVERSION 1,0,17,0
|
||||||
PRODUCTVERSION 1,0,16,0
|
PRODUCTVERSION 1,0,17,0
|
||||||
FILEFLAGSMASK 0x3fL
|
FILEFLAGSMASK 0x3fL
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
@ -52,10 +52,10 @@ BEGIN
|
|||||||
BEGIN
|
BEGIN
|
||||||
VALUE "CompanyName", "Telegram Messenger LLP"
|
VALUE "CompanyName", "Telegram Messenger LLP"
|
||||||
VALUE "FileDescription", "Telegram Desktop"
|
VALUE "FileDescription", "Telegram Desktop"
|
||||||
VALUE "FileVersion", "1.0.16.0"
|
VALUE "FileVersion", "1.0.17.0"
|
||||||
VALUE "LegalCopyright", "Copyright (C) 2014-2017"
|
VALUE "LegalCopyright", "Copyright (C) 2014-2017"
|
||||||
VALUE "ProductName", "Telegram Desktop"
|
VALUE "ProductName", "Telegram Desktop"
|
||||||
VALUE "ProductVersion", "1.0.16.0"
|
VALUE "ProductVersion", "1.0.17.0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
@ -25,8 +25,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
|||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION 1,0,16,0
|
FILEVERSION 1,0,17,0
|
||||||
PRODUCTVERSION 1,0,16,0
|
PRODUCTVERSION 1,0,17,0
|
||||||
FILEFLAGSMASK 0x3fL
|
FILEFLAGSMASK 0x3fL
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
@ -43,10 +43,10 @@ BEGIN
|
|||||||
BEGIN
|
BEGIN
|
||||||
VALUE "CompanyName", "Telegram Messenger LLP"
|
VALUE "CompanyName", "Telegram Messenger LLP"
|
||||||
VALUE "FileDescription", "Telegram Desktop Updater"
|
VALUE "FileDescription", "Telegram Desktop Updater"
|
||||||
VALUE "FileVersion", "1.0.16.0"
|
VALUE "FileVersion", "1.0.17.0"
|
||||||
VALUE "LegalCopyright", "Copyright (C) 2014-2017"
|
VALUE "LegalCopyright", "Copyright (C) 2014-2017"
|
||||||
VALUE "ProductName", "Telegram Desktop"
|
VALUE "ProductName", "Telegram Desktop"
|
||||||
VALUE "ProductVersion", "1.0.16.0"
|
VALUE "ProductVersion", "1.0.17.0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
@ -24,7 +24,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
|
|||||||
|
|
||||||
#define BETA_VERSION_MACRO (0ULL)
|
#define BETA_VERSION_MACRO (0ULL)
|
||||||
|
|
||||||
constexpr int AppVersion = 1000016;
|
constexpr int AppVersion = 1000017;
|
||||||
constexpr str_const AppVersionStr = "1.0.16";
|
constexpr str_const AppVersionStr = "1.0.17";
|
||||||
constexpr bool AppAlphaVersion = true;
|
constexpr bool AppAlphaVersion = true;
|
||||||
constexpr uint64 AppBetaVersion = BETA_VERSION_MACRO;
|
constexpr uint64 AppBetaVersion = BETA_VERSION_MACRO;
|
||||||
|
@ -30,10 +30,9 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
|
|||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include "mainwidget.h"
|
#include "mainwidget.h"
|
||||||
#include "history/history_location_manager.h"
|
#include "history/history_location_manager.h"
|
||||||
|
|
||||||
#include "localstorage.h"
|
#include "localstorage.h"
|
||||||
|
|
||||||
#include "passcodewidget.h"
|
#include "passcodewidget.h"
|
||||||
|
#include "core/task_queue.h"
|
||||||
|
|
||||||
#include <Shobjidl.h>
|
#include <Shobjidl.h>
|
||||||
#include <shellapi.h>
|
#include <shellapi.h>
|
||||||
@ -702,6 +701,7 @@ bool psShowOpenWithMenu(int x, int y, const QString &file) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void psOpenFile(const QString &name, bool openWith) {
|
void psOpenFile(const QString &name, bool openWith) {
|
||||||
|
base::TaskQueue::Main().Put([name, openWith] {
|
||||||
bool mailtoScheme = name.startsWith(qstr("mailto:"));
|
bool mailtoScheme = name.startsWith(qstr("mailto:"));
|
||||||
std::wstring wname = mailtoScheme ? name.toStdWString() : QDir::toNativeSeparators(name).toStdWString();
|
std::wstring wname = mailtoScheme ? name.toStdWString() : QDir::toNativeSeparators(name).toStdWString();
|
||||||
|
|
||||||
@ -719,11 +719,14 @@ void psOpenFile(const QString &name, bool openWith) {
|
|||||||
} else {
|
} else {
|
||||||
ShellExecute(0, L"open", wname.c_str(), 0, 0, SW_SHOWNORMAL);
|
ShellExecute(0, L"open", wname.c_str(), 0, 0, SW_SHOWNORMAL);
|
||||||
}
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void psShowInFolder(const QString &name) {
|
void psShowInFolder(const QString &name) {
|
||||||
QString nameEscaped = QDir::toNativeSeparators(name).replace('"', qsl("\"\""));
|
base::TaskQueue::Main().Put([name] {
|
||||||
|
auto nameEscaped = QDir::toNativeSeparators(name).replace('"', qsl("\"\""));
|
||||||
ShellExecute(0, 0, qsl("explorer").toStdWString().c_str(), (qsl("/select,") + nameEscaped).toStdWString().c_str(), 0, SW_SHOWNORMAL);
|
ShellExecute(0, 0, qsl("explorer").toStdWString().c_str(), (qsl("/select,") + nameEscaped).toStdWString().c_str(), 0, SW_SHOWNORMAL);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
AppVersion 1000016
|
AppVersion 1000017
|
||||||
AppVersionStrMajor 1.0
|
AppVersionStrMajor 1.0
|
||||||
AppVersionStrSmall 1.0.16
|
AppVersionStrSmall 1.0.17
|
||||||
AppVersionStr 1.0.16
|
AppVersionStr 1.0.17
|
||||||
AlphaChannel 1
|
AlphaChannel 1
|
||||||
BetaVersion 0
|
BetaVersion 0
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
1.0.17 alpha (28.02.17)
|
||||||
|
|
||||||
|
- Bug fixes and other minor improvements.
|
||||||
|
|
||||||
|
1.0.16 alpha (27.02.17)
|
||||||
|
|
||||||
|
- Bug fixes and other minor improvements.
|
||||||
|
|
||||||
1.0.15 alpha (27.02.17)
|
1.0.15 alpha (27.02.17)
|
||||||
|
|
||||||
- Wrong supergroup members display fix.
|
- Wrong supergroup members display fix.
|
||||||
|
Loading…
Reference in New Issue
Block a user