2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-05 08:55:59 +00:00

Add and use base::make_weak_unique() helper.

This commit is contained in:
John Preston
2017-08-15 12:35:01 +03:00
parent 0880c01a20
commit 782114d644
5 changed files with 23 additions and 13 deletions

View File

@@ -244,7 +244,7 @@ void CloudManager::switchToLanguage(QString id) {
void CloudManager::performSwitchToCustom() {
auto filter = qsl("Language files (*.strings)");
auto title = qsl("Choose language .strings file");
FileDialog::GetOpenPath(title, filter, [weak = base::weak_unique_ptr<CloudManager>(this)](const FileDialog::OpenResult &result) {
FileDialog::GetOpenPath(title, filter, [weak = base::make_weak_unique(this)](const FileDialog::OpenResult &result) {
if (!weak || result.paths.isEmpty()) {
return;
}