mirror of https://github.com/procxx/kepka.git
Version 1.2.16: Fix build in Xcode 9.3.
This commit is contained in:
parent
dd53bd1c55
commit
87d6081408
|
@ -908,7 +908,7 @@ void ApiWrap::requestPeers(const QList<PeerData*> &peers) {
|
|||
channels.push_back((*i)->asChannel()->inputChannel);
|
||||
}
|
||||
}
|
||||
auto handleChats = [this](const MTPmessages_Chats &result) {
|
||||
auto handleChats = [=](const MTPmessages_Chats &result) {
|
||||
if (auto chats = Api::getChatsFromMessagesChats(result)) {
|
||||
App::feedChats(*chats);
|
||||
}
|
||||
|
@ -920,7 +920,7 @@ void ApiWrap::requestPeers(const QList<PeerData*> &peers) {
|
|||
request(MTPchannels_GetChannels(MTP_vector<MTPInputChannel>(channels))).done(handleChats).send();
|
||||
}
|
||||
if (!users.isEmpty()) {
|
||||
request(MTPusers_GetUsers(MTP_vector<MTPInputUser>(users))).done([this](const MTPVector<MTPUser> &result) {
|
||||
request(MTPusers_GetUsers(MTP_vector<MTPInputUser>(users))).done([=](const MTPVector<MTPUser> &result) {
|
||||
App::feedUsers(result);
|
||||
}).send();
|
||||
}
|
||||
|
@ -1702,7 +1702,7 @@ void ApiWrap::handlePrivacyChange(mtpTypeId keyTypeId, const MTPVector<MTPPrivac
|
|||
}
|
||||
|
||||
auto now = unixtime();
|
||||
App::enumerateUsers([&userRules, contactsRule, everyoneRule, now](UserData *user) {
|
||||
App::enumerateUsers([&](UserData *user) {
|
||||
if (user->isSelf() || user->loadedStatus != PeerData::FullLoaded) {
|
||||
return;
|
||||
}
|
||||
|
@ -2033,7 +2033,7 @@ void ApiWrap::requestParticipantsCountDelayed(
|
|||
not_null<ChannelData*> channel) {
|
||||
_participantsCountRequestTimer.call(
|
||||
kReloadChannelMembersTimeout,
|
||||
[this, channel] { channel->updateFullForced(); });
|
||||
[=] { channel->updateFullForced(); });
|
||||
}
|
||||
|
||||
void ApiWrap::requestChannelRangeDifference(not_null<History*> history) {
|
||||
|
@ -2296,7 +2296,7 @@ void ApiWrap::requestStickers(TimeId now) {
|
|||
};
|
||||
_stickersUpdateRequest = request(MTPmessages_GetAllStickers(
|
||||
MTP_int(Local::countStickersHash(true))
|
||||
)).done(onDone).fail([this, onDone](const RPCError &error) {
|
||||
)).done(onDone).fail([=](const RPCError &error) {
|
||||
LOG(("App Fail: Failed to get stickers!"));
|
||||
onDone(MTP_messages_allStickersNotModified());
|
||||
}).send();
|
||||
|
@ -3738,7 +3738,7 @@ void ApiWrap::uploadAlbumMedia(
|
|||
const MessageGroupId &groupId,
|
||||
const MTPInputMedia &media) {
|
||||
const auto localId = item->fullId();
|
||||
const auto failed = [this] {
|
||||
const auto failed = [=] {
|
||||
|
||||
};
|
||||
request(MTPmessages_UploadMedia(
|
||||
|
|
|
@ -278,10 +278,10 @@ AuthSession::AuthSession(UserId userId)
|
|||
, _changelogs(Core::Changelogs::Create(this)) {
|
||||
Expects(_userId != 0);
|
||||
|
||||
_saveDataTimer.setCallback([this] {
|
||||
_saveDataTimer.setCallback([=] {
|
||||
Local::writeUserSettings();
|
||||
});
|
||||
subscribe(Messenger::Instance().passcodedChanged(), [this] {
|
||||
subscribe(Messenger::Instance().passcodedChanged(), [=] {
|
||||
_shouldLockAt = 0;
|
||||
notifications().updateAll();
|
||||
});
|
||||
|
|
|
@ -641,7 +641,7 @@ ConfirmInviteBox::ConfirmInviteBox(QWidget*, const QString &title, bool isChanne
|
|||
}
|
||||
|
||||
void ConfirmInviteBox::prepare() {
|
||||
addButton(langFactory(lng_group_invite_join), [this] {
|
||||
addButton(langFactory(lng_group_invite_join), [] {
|
||||
if (auto main = App::main()) {
|
||||
main->onInviteImport();
|
||||
}
|
||||
|
|
|
@ -469,7 +469,7 @@ void EditRestrictedBox::createUntilVariants() {
|
|||
_untilVariants.back()->setDisabled(true);
|
||||
}
|
||||
};
|
||||
auto addCustomVariant = [this, addVariant](TimeId until, TimeId from, TimeId to) {
|
||||
auto addCustomVariant = [addVariant](TimeId until, TimeId from, TimeId to) {
|
||||
if (!ChannelData::IsRestrictedForever(until) && until > from && until <= to) {
|
||||
addVariant(
|
||||
until,
|
||||
|
|
|
@ -95,7 +95,7 @@ void EditPrivacyBox::prepare() {
|
|||
|
||||
int EditPrivacyBox::resizeGetHeight(int newWidth) {
|
||||
auto top = 0;
|
||||
auto layoutRow = [this, newWidth, &top](auto &widget, style::margins padding) {
|
||||
auto layoutRow = [&](auto &widget, style::margins padding) {
|
||||
if (!widget) return;
|
||||
widget->resizeToNaturalWidth(newWidth - padding.left() - padding.right());
|
||||
widget->moveToLeft(padding.left(), top + padding.top());
|
||||
|
@ -137,7 +137,7 @@ int EditPrivacyBox::countDefaultHeight(int newWidth) {
|
|||
}
|
||||
return st::editPrivacyOptionMargin.top() + st::defaultCheck.diameter + st::editPrivacyOptionMargin.bottom();
|
||||
};
|
||||
auto labelHeight = [this, newWidth](const QString &text, const style::FlatLabel &st, style::margins padding) {
|
||||
auto labelHeight = [newWidth](const QString &text, const style::FlatLabel &st, style::margins padding) {
|
||||
if (text.isEmpty()) {
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -731,7 +731,7 @@ void EditChatAdminsBoxController::Start(not_null<ChatData*> chat) {
|
|||
}
|
||||
|
||||
void AddBotToGroupBoxController::Start(not_null<UserData*> bot) {
|
||||
auto initBox = [bot](not_null<PeerListBox*> box) {
|
||||
auto initBox = [=](not_null<PeerListBox*> box) {
|
||||
box->addButton(langFactory(lng_cancel), [box] { box->closeBox(); });
|
||||
};
|
||||
Ui::show(Box<PeerListBox>(std::make_unique<AddBotToGroupBoxController>(bot), std::move(initBox)));
|
||||
|
|
|
@ -256,7 +256,7 @@ void StickersListWidget::Footer::enumerateVisibleIcons(Callback callback) {
|
|||
}
|
||||
|
||||
void StickersListWidget::Footer::preloadImages() {
|
||||
enumerateVisibleIcons([this](const StickerIcon &icon, int x) {
|
||||
enumerateVisibleIcons([](const StickerIcon &icon, int x) {
|
||||
if (auto sticker = icon.sticker) {
|
||||
sticker->thumb->load();
|
||||
}
|
||||
|
|
|
@ -457,7 +457,7 @@ public:\n\
|
|||
inline const color &get_transparent() const { return _colors[0]; }; // special color\n";
|
||||
|
||||
int indexInPalette = 1;
|
||||
if (!module_.enumVariables([this, &indexInPalette](const Variable &variable) -> bool {
|
||||
if (!module_.enumVariables([&](const Variable &variable) -> bool {
|
||||
auto name = variable.name.back();
|
||||
if (variable.value.type().tag != structure::TypeTag::Color) {
|
||||
return false;
|
||||
|
@ -584,7 +584,7 @@ QList<row> data();\n\
|
|||
}
|
||||
|
||||
bool Generator::writeStructsForwardDeclarations() {
|
||||
bool hasNoExternalStructs = module_.enumVariables([this](const Variable &value) -> bool {
|
||||
bool hasNoExternalStructs = module_.enumVariables([&](const Variable &value) -> bool {
|
||||
if (value.value.type().tag == structure::TypeTag::Struct) {
|
||||
if (!module_.findStructInModule(value.value.type().name, module_)) {
|
||||
return false;
|
||||
|
@ -598,7 +598,7 @@ bool Generator::writeStructsForwardDeclarations() {
|
|||
|
||||
header_->newline();
|
||||
std::set<QString> alreadyDeclaredTypes;
|
||||
bool result = module_.enumVariables([this, &alreadyDeclaredTypes](const Variable &value) -> bool {
|
||||
bool result = module_.enumVariables([&](const Variable &value) -> bool {
|
||||
if (value.value.type().tag == structure::TypeTag::Struct) {
|
||||
if (!module_.findStructInModule(value.value.type().name, module_)) {
|
||||
if (alreadyDeclaredTypes.find(value.value.type().name.back()) == alreadyDeclaredTypes.end()) {
|
||||
|
@ -618,7 +618,7 @@ bool Generator::writeStructsDefinitions() {
|
|||
return true;
|
||||
}
|
||||
|
||||
bool result = module_.enumStructs([this](const Struct &value) -> bool {
|
||||
bool result = module_.enumStructs([&](const Struct &value) -> bool {
|
||||
header_->stream() << "\
|
||||
struct " << value.name.back() << " {\n";
|
||||
for (auto &field : value.fields) {
|
||||
|
@ -646,7 +646,7 @@ bool Generator::writeRefsDeclarations() {
|
|||
if (isPalette_) {
|
||||
header_->stream() << "extern const style::color &transparent; // special color\n";
|
||||
}
|
||||
bool result = module_.enumVariables([this](const Variable &value) -> bool {
|
||||
bool result = module_.enumVariables([&](const Variable &value) -> bool {
|
||||
auto name = value.name.back();
|
||||
auto type = typeToString(value.value.type());
|
||||
if (type.isEmpty()) {
|
||||
|
@ -668,7 +668,7 @@ bool Generator::writeIncludesInSource() {
|
|||
}
|
||||
|
||||
auto includes = QStringList();
|
||||
std::function<bool(const Module&)> collector = [this, &collector, &includes](const Module &module) {
|
||||
std::function<bool(const Module&)> collector = [&](const Module &module) {
|
||||
module.enumIncludes(collector);
|
||||
auto base = moduleBaseName(module);
|
||||
if (!includes.contains(base)) {
|
||||
|
@ -690,7 +690,7 @@ bool Generator::writeVariableDefinitions() {
|
|||
}
|
||||
|
||||
source_->newline();
|
||||
bool result = module_.enumVariables([this](const Variable &variable) -> bool {
|
||||
bool result = module_.enumVariables([&](const Variable &variable) -> bool {
|
||||
auto name = variable.name.back();
|
||||
auto type = typeToString(variable.value.type());
|
||||
if (type.isEmpty()) {
|
||||
|
@ -710,7 +710,7 @@ bool Generator::writeRefsDefinition() {
|
|||
if (isPalette_) {
|
||||
source_->stream() << "const style::color &transparent(_palette.get_transparent()); // special color\n";
|
||||
}
|
||||
bool result = module_.enumVariables([this](const Variable &variable) -> bool {
|
||||
bool result = module_.enumVariables([&](const Variable &variable) -> bool {
|
||||
auto name = variable.name.back();
|
||||
auto type = typeToString(variable.value.type());
|
||||
if (type.isEmpty()) {
|
||||
|
@ -752,7 +752,7 @@ void palette::finalize() {\n\
|
|||
compute(0, -1, { 255, 255, 255, 0}); // special color\n";
|
||||
|
||||
QList<structure::FullName> names;
|
||||
module_.enumVariables([this, &names](const Variable &variable) -> bool {
|
||||
module_.enumVariables([&](const Variable &variable) -> bool {
|
||||
names.push_back(variable.name);
|
||||
return true;
|
||||
});
|
||||
|
@ -761,7 +761,7 @@ void palette::finalize() {\n\
|
|||
int indexInPalette = 1;
|
||||
QByteArray checksumString;
|
||||
checksumString.append("&transparent:{ 255, 255, 255, 0 }");
|
||||
auto result = module_.enumVariables([this, &indexInPalette, &checksumString, &dataRows, &names](const Variable &variable) -> bool {
|
||||
auto result = module_.enumVariables([&](const Variable &variable) -> bool {
|
||||
auto name = variable.name.back();
|
||||
auto index = indexInPalette++;
|
||||
paletteIndices_.emplace(name, index);
|
||||
|
@ -826,7 +826,7 @@ int getPaletteIndex(QLatin1String name) {\n\
|
|||
auto tabsUsed = 1;
|
||||
|
||||
// Returns true if at least one check was finished.
|
||||
auto finishChecksTillKey = [this, &chars, &checkTypes, &checkLengthHistory, &tabsUsed, tabs](const QString &key) {
|
||||
auto finishChecksTillKey = [&](const QString &key) {
|
||||
auto result = false;
|
||||
while (!chars.isEmpty() && key.midRef(0, chars.size()) != chars) {
|
||||
result = true;
|
||||
|
@ -1069,7 +1069,7 @@ void init_" << baseName_ << "() {\n\
|
|||
|
||||
if (module_.hasIncludes()) {
|
||||
bool writtenAtLeastOne = false;
|
||||
bool result = module_.enumIncludes([this,&writtenAtLeastOne](const Module &module) -> bool {
|
||||
bool result = module_.enumIncludes([&](const Module &module) -> bool {
|
||||
if (module.hasVariables()) {
|
||||
source_->stream() << "\tinit_" + moduleBaseName(module) + "();\n";
|
||||
writtenAtLeastOne = true;
|
||||
|
@ -1096,7 +1096,7 @@ void init_" << baseName_ << "() {\n\
|
|||
|
||||
if (isPalette_) {
|
||||
source_->stream() << "\t_palette.finalize();\n";
|
||||
} else if (!module_.enumVariables([this](const Variable &variable) -> bool {
|
||||
} else if (!module_.enumVariables([&](const Variable &variable) -> bool {
|
||||
auto name = variable.name.back();
|
||||
auto value = valueAssignmentCode(variable.value);
|
||||
if (value.isEmpty()) {
|
||||
|
|
|
@ -34,7 +34,7 @@ inline auto SingleFlagValue(
|
|||
return FlagsValueWithMask(
|
||||
std::move(value),
|
||||
flag
|
||||
) | rpl::map([flag](typename ChangeType::Type value) {
|
||||
) | rpl::map([](typename ChangeType::Type value) {
|
||||
return !!value;
|
||||
});
|
||||
}
|
||||
|
|
|
@ -95,7 +95,7 @@ DialogsInner::DialogsInner(QWidget *parent, not_null<Window::Controller*> contro
|
|||
[this](auto item) { itemRemoved(item); },
|
||||
lifetime());
|
||||
Auth().data().itemRepaintRequest(
|
||||
) | rpl::start_with_next([this](auto item) {
|
||||
) | rpl::start_with_next([=](auto item) {
|
||||
const auto history = item->history();
|
||||
if (history->textCachedFor == item) {
|
||||
history->updateChatListEntry();
|
||||
|
@ -114,7 +114,7 @@ DialogsInner::DialogsInner(QWidget *parent, not_null<Window::Controller*> contro
|
|||
UpdateRowSection::Default | UpdateRowSection::Filtered);
|
||||
});
|
||||
|
||||
subscribe(Window::Theme::Background(), [this](const Window::Theme::BackgroundUpdate &data) {
|
||||
subscribe(Window::Theme::Background(), [=](const Window::Theme::BackgroundUpdate &data) {
|
||||
if (data.paletteChanged()) {
|
||||
Dialogs::Layout::clearUnreadBadgesCache();
|
||||
}
|
||||
|
|
|
@ -1193,7 +1193,7 @@ void InnerWidget::suggestRestrictUser(not_null<UserData*> user) {
|
|||
MTP_int(0));
|
||||
editRestrictions(hasAdminRights, bannedRights);
|
||||
}
|
||||
}).fail([this, editRestrictions](const RPCError &error) {
|
||||
}).fail([=](const RPCError &error) {
|
||||
auto bannedRights = MTP_channelBannedRights(
|
||||
MTP_flags(0),
|
||||
MTP_int(0));
|
||||
|
|
|
@ -261,7 +261,7 @@ Widget::Widget(QWidget *parent, not_null<Window::Controller*> controller, not_nu
|
|||
|
||||
connect(_scroll, &Ui::ScrollArea::scrolled, this, [this] { onScroll(); });
|
||||
|
||||
_whatIsThis->setClickedCallback([this] { Ui::show(Box<InformBox>(lang(lng_admin_log_about_text))); });
|
||||
_whatIsThis->setClickedCallback([=] { Ui::show(Box<InformBox>(lang(lng_admin_log_about_text))); });
|
||||
}
|
||||
|
||||
void Widget::showFilter() {
|
||||
|
|
|
@ -1732,7 +1732,7 @@ void HistoryInner::savePhotoToFile(not_null<PhotoData*> photo) {
|
|||
filedialogDefaultName(
|
||||
qsl("photo"),
|
||||
qsl(".jpg")),
|
||||
base::lambda_guarded(this, [this, photo](const QString &result) {
|
||||
base::lambda_guarded(this, [=](const QString &result) {
|
||||
if (!result.isEmpty()) {
|
||||
photo->full->pix().toImage().save(result, "JPG");
|
||||
}
|
||||
|
|
|
@ -582,7 +582,7 @@ HistoryWidget::HistoryWidget(
|
|||
}
|
||||
}, lifetime());
|
||||
Auth().data().animationPlayInlineRequest(
|
||||
) | rpl::start_with_next([this](auto item) {
|
||||
) | rpl::start_with_next([=](auto item) {
|
||||
if (const auto view = item->mainView()) {
|
||||
if (const auto media = view->media()) {
|
||||
media->playAnimation();
|
||||
|
|
|
@ -443,7 +443,7 @@ int Inner::refreshInlineRows(PeerData *queryPeer, UserData *bot, const CacheEntr
|
|||
_inlineBot = bot;
|
||||
_inlineQueryPeer = queryPeer;
|
||||
refreshSwitchPmButton(entry);
|
||||
auto clearResults = [this, entry]() {
|
||||
auto clearResults = [&] {
|
||||
if (!entry) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -104,7 +104,7 @@ void Widget::createLanguageLink() {
|
|||
this,
|
||||
object_ptr<Ui::LinkButton>(this, text));
|
||||
_changeLanguage->hide(anim::type::instant);
|
||||
_changeLanguage->entity()->setClickedCallback([this, languageId] {
|
||||
_changeLanguage->entity()->setClickedCallback([=] {
|
||||
Lang::CurrentCloudManager().switchToLanguage(languageId);
|
||||
});
|
||||
_changeLanguage->toggle(!_resetAccount, anim::type::normal);
|
||||
|
@ -117,7 +117,10 @@ void Widget::createLanguageLink() {
|
|||
if (!currentId.isEmpty() && currentId != defaultId) {
|
||||
createLink(Lang::GetOriginalValue(lng_switch_to_this), defaultId);
|
||||
} else if (!suggestedId.isEmpty() && suggestedId != currentId) {
|
||||
request(MTPlangpack_GetStrings(MTP_string(suggestedId), MTP_vector<MTPstring>(1, MTP_string("lng_switch_to_this")))).done([this, suggestedId, createLink](const MTPVector<MTPLangPackString> &result) {
|
||||
request(MTPlangpack_GetStrings(
|
||||
MTP_string(suggestedId),
|
||||
MTP_vector<MTPstring>(1, MTP_string("lng_switch_to_this"))
|
||||
)).done([=](const MTPVector<MTPLangPackString> &result) {
|
||||
auto strings = Lang::Instance::ParseStrings(result);
|
||||
auto it = strings.find(lng_switch_to_this);
|
||||
if (it != strings.end()) {
|
||||
|
|
|
@ -911,7 +911,7 @@ void MainWidget::cancelUploadLayer(not_null<HistoryItem*> item) {
|
|||
|
||||
void MainWidget::deletePhotoLayer(PhotoData *photo) {
|
||||
if (!photo) return;
|
||||
Ui::show(Box<ConfirmBox>(lang(lng_delete_photo_sure), lang(lng_box_delete), base::lambda_guarded(this, [this, photo] {
|
||||
Ui::show(Box<ConfirmBox>(lang(lng_delete_photo_sure), lang(lng_box_delete), base::lambda_guarded(this, [=] {
|
||||
Ui::hideLayer();
|
||||
|
||||
auto me = App::self();
|
||||
|
@ -1665,12 +1665,12 @@ void MainWidget::documentLoadFailed(FileLoader *loader, bool started) {
|
|||
auto document = Auth().data().document(documentId);
|
||||
if (started) {
|
||||
auto failedFileName = loader->fileName();
|
||||
Ui::show(Box<ConfirmBox>(lang(lng_download_finish_failed), base::lambda_guarded(this, [this, document, failedFileName] {
|
||||
Ui::show(Box<ConfirmBox>(lang(lng_download_finish_failed), base::lambda_guarded(this, [=] {
|
||||
Ui::hideLayer();
|
||||
if (document) document->save(failedFileName);
|
||||
})));
|
||||
} else {
|
||||
Ui::show(Box<ConfirmBox>(lang(lng_download_path_failed), lang(lng_download_path_settings), base::lambda_guarded(this, [this] {
|
||||
Ui::show(Box<ConfirmBox>(lang(lng_download_path_failed), lang(lng_download_path_settings), base::lambda_guarded(this, [=] {
|
||||
Global::SetDownloadPath(QString());
|
||||
Global::SetDownloadPathBookmark(QByteArray());
|
||||
Ui::show(Box<DownloadPathBox>());
|
||||
|
|
|
@ -76,47 +76,47 @@ CoverWidget::CoverWidget(QWidget *parent) : RpWidget(parent)
|
|||
_timeLabel->setAttribute(Qt::WA_TransparentForMouseEvents);
|
||||
setMouseTracking(true);
|
||||
|
||||
_playback->setInLoadingStateChangedCallback([this](bool loading) {
|
||||
_playback->setInLoadingStateChangedCallback([=](bool loading) {
|
||||
_playbackSlider->setDisabled(loading);
|
||||
});
|
||||
_playback->setValueChangedCallback([this](float64 value) {
|
||||
_playback->setValueChangedCallback([=](float64 value) {
|
||||
_playbackSlider->setValue(value);
|
||||
});
|
||||
_playbackSlider->setChangeProgressCallback([this](float64 value) {
|
||||
_playbackSlider->setChangeProgressCallback([=](float64 value) {
|
||||
_playback->setValue(value, false);
|
||||
handleSeekProgress(value);
|
||||
});
|
||||
_playbackSlider->setChangeFinishedCallback([this](float64 value) {
|
||||
_playbackSlider->setChangeFinishedCallback([=](float64 value) {
|
||||
_playback->setValue(value, false);
|
||||
handleSeekFinished(value);
|
||||
});
|
||||
_playPause->setClickedCallback([this] {
|
||||
_playPause->setClickedCallback([=] {
|
||||
instance()->playPauseCancelClicked(AudioMsgId::Type::Song);
|
||||
});
|
||||
|
||||
updateRepeatTrackIcon();
|
||||
_repeatTrack->setClickedCallback([this] {
|
||||
_repeatTrack->setClickedCallback([=] {
|
||||
instance()->toggleRepeat(AudioMsgId::Type::Song);
|
||||
});
|
||||
|
||||
updateVolumeToggleIcon();
|
||||
_volumeToggle->setClickedCallback([this]() {
|
||||
_volumeToggle->setClickedCallback([=]() {
|
||||
Global::SetSongVolume((Global::SongVolume() > 0) ? 0. : Global::RememberedSongVolume());
|
||||
mixer()->setSongVolume(Global::SongVolume());
|
||||
Global::RefSongVolumeChanged().notify();
|
||||
});
|
||||
subscribe(Global::RefSongVolumeChanged(), [this] { updateVolumeToggleIcon(); });
|
||||
subscribe(instance()->repeatChangedNotifier(), [this](AudioMsgId::Type type) {
|
||||
subscribe(Global::RefSongVolumeChanged(), [=] { updateVolumeToggleIcon(); });
|
||||
subscribe(instance()->repeatChangedNotifier(), [=](AudioMsgId::Type type) {
|
||||
if (type == AudioMsgId::Type::Song) {
|
||||
updateRepeatTrackIcon();
|
||||
}
|
||||
});
|
||||
subscribe(instance()->updatedNotifier(), [this](const TrackState &state) {
|
||||
subscribe(instance()->updatedNotifier(), [=](const TrackState &state) {
|
||||
if (state.id.type() == AudioMsgId::Type::Song) {
|
||||
handleSongUpdate(state);
|
||||
}
|
||||
});
|
||||
subscribe(instance()->trackChangedNotifier(), [this](AudioMsgId::Type type) {
|
||||
subscribe(instance()->trackChangedNotifier(), [=](AudioMsgId::Type type) {
|
||||
if (type == AudioMsgId::Type::Song) {
|
||||
handleSongChange();
|
||||
}
|
||||
|
@ -353,12 +353,12 @@ void CoverWidget::createPrevNextButtons() {
|
|||
if (!_previousTrack) {
|
||||
_previousTrack.create(this, st::mediaPlayerPanelPreviousButton);
|
||||
_previousTrack->show();
|
||||
_previousTrack->setClickedCallback([this]() {
|
||||
_previousTrack->setClickedCallback([=]() {
|
||||
instance()->previous();
|
||||
});
|
||||
_nextTrack.create(this, st::mediaPlayerPanelNextButton);
|
||||
_nextTrack->show();
|
||||
_nextTrack->setClickedCallback([this]() {
|
||||
_nextTrack->setClickedCallback([=]() {
|
||||
instance()->next();
|
||||
});
|
||||
updatePlayPrevNextPositions();
|
||||
|
|
|
@ -116,7 +116,7 @@ Widget::Widget(QWidget *parent) : RpWidget(parent)
|
|||
});
|
||||
|
||||
updateVolumeToggleIcon();
|
||||
_volumeToggle->setClickedCallback([this] {
|
||||
_volumeToggle->setClickedCallback([=] {
|
||||
Global::SetSongVolume((Global::SongVolume() > 0) ? 0. : Global::RememberedSongVolume());
|
||||
mixer()->setSongVolume(Global::SongVolume());
|
||||
Global::RefSongVolumeChanged().notify();
|
||||
|
@ -124,7 +124,7 @@ Widget::Widget(QWidget *parent) : RpWidget(parent)
|
|||
subscribe(Global::RefSongVolumeChanged(), [this] { updateVolumeToggleIcon(); });
|
||||
|
||||
updateRepeatTrackIcon();
|
||||
_repeatTrack->setClickedCallback([this] {
|
||||
_repeatTrack->setClickedCallback([=] {
|
||||
instance()->toggleRepeat(AudioMsgId::Type::Song);
|
||||
});
|
||||
|
||||
|
@ -538,12 +538,12 @@ void Widget::createPrevNextButtons() {
|
|||
if (!_previousTrack) {
|
||||
_previousTrack.create(this, st::mediaPlayerPreviousButton);
|
||||
_previousTrack->show();
|
||||
_previousTrack->setClickedCallback([this]() {
|
||||
_previousTrack->setClickedCallback([=]() {
|
||||
instance()->previous();
|
||||
});
|
||||
_nextTrack.create(this, st::mediaPlayerNextButton);
|
||||
_nextTrack->show();
|
||||
_nextTrack->setClickedCallback([this]() {
|
||||
_nextTrack->setClickedCallback([=]() {
|
||||
instance()->next();
|
||||
});
|
||||
updatePlayPrevNextPositions();
|
||||
|
|
|
@ -152,7 +152,7 @@ void MediaView::refreshLang() {
|
|||
}
|
||||
|
||||
void MediaView::moveToScreen() {
|
||||
auto widgetScreen = [this](auto &&widget) -> QScreen* {
|
||||
auto widgetScreen = [&](auto &&widget) -> QScreen* {
|
||||
if (auto handle = widget ? widget->windowHandle() : nullptr) {
|
||||
return handle->screen();
|
||||
}
|
||||
|
@ -2280,7 +2280,7 @@ void MediaView::paintThemePreview(Painter &p, QRect clip) {
|
|||
}
|
||||
}
|
||||
|
||||
auto fillOverlay = [this, &p, clip](QRect fill) {
|
||||
auto fillOverlay = [&](QRect fill) {
|
||||
auto clipped = fill.intersected(clip);
|
||||
if (!clipped.isEmpty()) {
|
||||
p.setOpacity(st::themePreviewOverlayOpacity);
|
||||
|
|
|
@ -43,16 +43,16 @@ GroupMembersWidget::GroupMembersWidget(
|
|||
notifyPeerUpdated(update);
|
||||
}));
|
||||
|
||||
setRemovedCallback([this, peer](PeerData *selectedPeer) {
|
||||
setRemovedCallback([=](PeerData *selectedPeer) {
|
||||
removePeer(selectedPeer);
|
||||
});
|
||||
setSelectedCallback([this](PeerData *selectedPeer) {
|
||||
setSelectedCallback([=](PeerData *selectedPeer) {
|
||||
Ui::showPeerProfile(selectedPeer);
|
||||
});
|
||||
setUpdateItemCallback([this](Item *item) {
|
||||
setUpdateItemCallback([=](Item *item) {
|
||||
updateItemStatusText(item);
|
||||
});
|
||||
setPreloadMoreCallback([this] {
|
||||
setPreloadMoreCallback([=] {
|
||||
preloadMore();
|
||||
});
|
||||
|
||||
|
|
|
@ -171,7 +171,7 @@ TEST_CASE("basic event_streams tests", "[rpl::event_stream]") {
|
|||
stream.fire(3);
|
||||
{
|
||||
auto saved = lifetime();
|
||||
stream.events().start([=, &stream](int value) {
|
||||
stream.events().start([=](int value) {
|
||||
*sum += value;
|
||||
}, [=](no_error) {
|
||||
}, [=] {
|
||||
|
|
|
@ -41,13 +41,13 @@ void AdvancedWidget::createControls() {
|
|||
style::margins marginSmall(0, 0, 0, st::settingsSmallSkip);
|
||||
style::margins marginLarge(0, 0, 0, st::settingsLargeSkip);
|
||||
|
||||
style::margins marginLocalStorage = ([&marginSmall, &marginLarge]() {
|
||||
style::margins marginLocalStorage = [&] {
|
||||
#ifndef TDESKTOP_DISABLE_NETWORK_PROXY
|
||||
return marginSmall;
|
||||
#else // !TDESKTOP_DISABLE_NETWORK_PROXY
|
||||
return marginLarge;
|
||||
#endif // TDESKTOP_DISABLE_NETWORK_PROXY
|
||||
})();
|
||||
}();
|
||||
if (self()) {
|
||||
createChildRow(_manageLocalStorage, marginLocalStorage, lang(lng_settings_manage_local_storage), SLOT(onManageLocalStorage()));
|
||||
}
|
||||
|
|
|
@ -199,7 +199,7 @@ void PrivacyWidget::autoLockUpdated() {
|
|||
void PrivacyWidget::onBlockedUsers() {
|
||||
Ui::show(Box<PeerListBox>(std::make_unique<BlockedBoxController>(), [](not_null<PeerListBox*> box) {
|
||||
box->addButton(langFactory(lng_close), [box] { box->closeBox(); });
|
||||
box->addLeftButton(langFactory(lng_blocked_list_add), [box] { BlockedBoxController::BlockNewUser(); });
|
||||
box->addLeftButton(langFactory(lng_blocked_list_add), [=] { BlockedBoxController::BlockNewUser(); });
|
||||
}));
|
||||
}
|
||||
|
||||
|
|
|
@ -214,7 +214,7 @@ void prepareRound(
|
|||
auto intsTopRight = ints + target.x() + target.width() - cornerWidth + target.y() * imageWidth;
|
||||
auto intsBottomLeft = ints + target.x() + (target.y() + target.height() - cornerHeight) * imageWidth;
|
||||
auto intsBottomRight = ints + target.x() + target.width() - cornerWidth + (target.y() + target.height() - cornerHeight) * imageWidth;
|
||||
auto maskCorner = [imageWidth, imageHeight, imageIntsPerPixel, imageIntsPerLine](uint32 *imageInts, const QImage &mask) {
|
||||
auto maskCorner = [&](uint32 *imageInts, const QImage &mask) {
|
||||
auto maskWidth = mask.width();
|
||||
auto maskHeight = mask.height();
|
||||
auto maskBytesPerPixel = (mask.depth() >> 3);
|
||||
|
|
|
@ -302,7 +302,7 @@ void SendButton::paintEvent(QPaintEvent *e) {
|
|||
auto rippleColor = anim::color(st::historyAttachEmoji.ripple.color, st::historyRecordVoiceRippleBgActive, recordActive);
|
||||
paintRipple(p, (width() - st::historyAttachEmoji.rippleAreaSize) / 2, st::historyAttachEmoji.rippleAreaPosition.y(), ms, &rippleColor);
|
||||
|
||||
auto fastIcon = [recordActive, over, this] {
|
||||
auto fastIcon = [&] {
|
||||
if (recordActive == 1.) {
|
||||
return &st::historyRecordVoiceActive;
|
||||
} else if (over) {
|
||||
|
|
|
@ -40,8 +40,8 @@ Tooltip::Tooltip() : TWidget(nullptr) {
|
|||
setAttribute(Qt::WA_NoSystemBackground, true);
|
||||
setAttribute(Qt::WA_TranslucentBackground, true);
|
||||
|
||||
_showTimer.setCallback([this] { performShow(); });
|
||||
_hideByLeaveTimer.setCallback([this] { Hide(); });
|
||||
_showTimer.setCallback([=] { performShow(); });
|
||||
_hideByLeaveTimer.setCallback([=] { Hide(); });
|
||||
|
||||
connect(App::wnd()->windowHandle(), SIGNAL(activeChanged()), this, SLOT(onWndActiveChanged()));
|
||||
}
|
||||
|
|
|
@ -961,7 +961,7 @@ QPixmap MediaPreviewWidget::currentImage() const {
|
|||
if (_document->loaded()) {
|
||||
if (!_gif && !_gif.isBad()) {
|
||||
auto that = const_cast<MediaPreviewWidget*>(this);
|
||||
that->_gif = Media::Clip::MakeReader(_document, FullMsgId(), [this, that](Media::Clip::Notification notification) {
|
||||
that->_gif = Media::Clip::MakeReader(_document, FullMsgId(), [=](Media::Clip::Notification notification) {
|
||||
that->clipCallback(notification);
|
||||
});
|
||||
if (_gif) _gif->setAutoplay();
|
||||
|
|
|
@ -127,14 +127,14 @@ void EditorBlock::Row::setValue(QColor value) {
|
|||
}
|
||||
|
||||
void EditorBlock::Row::fillValueString() {
|
||||
auto addHex = [this](int code) {
|
||||
auto addHex = [=](int code) {
|
||||
if (code >= 0 && code < 10) {
|
||||
_valueString.append('0' + code);
|
||||
} else if (code >= 10 && code < 16) {
|
||||
_valueString.append('a' + (code - 10));
|
||||
}
|
||||
};
|
||||
auto addCode = [this, addHex](int code) {
|
||||
auto addCode = [=](int code) {
|
||||
addHex(code / 16);
|
||||
addHex(code % 16);
|
||||
};
|
||||
|
@ -459,7 +459,7 @@ void EditorBlock::enumerateRowsFrom(int top, Callback callback) const {
|
|||
int EditorBlock::resizeGetHeight(int newWidth) {
|
||||
auto result = 0;
|
||||
auto descriptionWidth = newWidth - st::themeEditorMargin.left() - st::themeEditorMargin.right();
|
||||
enumerateRows([this, &result, descriptionWidth](Row &row) {
|
||||
enumerateRows([&](Row &row) {
|
||||
row.setTop(result);
|
||||
|
||||
auto height = row.height();
|
||||
|
|
|
@ -141,7 +141,7 @@ Controller::ColumnLayout Controller::computeColumnLayout() const {
|
|||
auto bodyWidth = window()->bodyWidget()->width();
|
||||
auto dialogsWidth = 0, chatWidth = 0, thirdWidth = 0;
|
||||
|
||||
auto useOneColumnLayout = [this, bodyWidth] {
|
||||
auto useOneColumnLayout = [&] {
|
||||
auto minimalNormal = st::columnMinimalWidthLeft
|
||||
+ st::columnMinimalWidthMain;
|
||||
if (bodyWidth < minimalNormal) {
|
||||
|
@ -150,7 +150,7 @@ Controller::ColumnLayout Controller::computeColumnLayout() const {
|
|||
return false;
|
||||
};
|
||||
|
||||
auto useNormalLayout = [this, bodyWidth] {
|
||||
auto useNormalLayout = [&] {
|
||||
// Used if useSmallColumnLayout() == false.
|
||||
if (bodyWidth < minimalThreeColumnWidth()) {
|
||||
return true;
|
||||
|
|
|
@ -28,7 +28,7 @@ else
|
|||
#gyp --depth=. --generator-output=../.. -Goutput_dir=out Telegram.gyp --format=xcode-ninja
|
||||
#gyp --depth=. --generator-output=../.. -Goutput_dir=out Telegram.gyp --format=xcode
|
||||
# use patched gyp with Xcode project generator
|
||||
../../../Libraries/gyp/gyp --depth=. --generator-output=.. -Goutput_dir=../out -Gxcode_upgrade_check_project_version=920 -Dofficial_build_target=$BuildTarget Telegram.gyp --format=xcode
|
||||
../../../Libraries/gyp/gyp --depth=. --generator-output=.. -Goutput_dir=../out -Gxcode_upgrade_check_project_version=930 -Dofficial_build_target=$BuildTarget Telegram.gyp --format=xcode
|
||||
fi
|
||||
|
||||
cd ../..
|
||||
|
|
Loading…
Reference in New Issue