From c25992126964ae959f2549f4975e5037d91a6f1a Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 4 Dec 2018 16:10:00 +0400 Subject: [PATCH] Use qualified names for App::main and App::wnd. --- Telegram/SourceFiles/app.cpp | 4 ++-- Telegram/SourceFiles/facades.cpp | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Telegram/SourceFiles/app.cpp b/Telegram/SourceFiles/app.cpp index 7faeac059..3b08006a3 100644 --- a/Telegram/SourceFiles/app.cpp +++ b/Telegram/SourceFiles/app.cpp @@ -1529,12 +1529,12 @@ namespace App { } setLaunchState(QuitRequested); - if (auto window = wnd()) { + if (auto window = App::wnd()) { if (!Sandbox::isSavingSession()) { window->hide(); } } - if (auto mainwidget = main()) { + if (auto mainwidget = App::main()) { mainwidget->saveDraftToCloud(); } Messenger::QuitAttempt(); diff --git a/Telegram/SourceFiles/facades.cpp b/Telegram/SourceFiles/facades.cpp index 2de246475..02c024363 100644 --- a/Telegram/SourceFiles/facades.cpp +++ b/Telegram/SourceFiles/facades.cpp @@ -38,19 +38,19 @@ void CallDelayed(int duration, FnMut &&lambda) { } // namespace internal void sendBotCommand(PeerData *peer, UserData *bot, const QString &cmd, MsgId replyTo) { - if (auto m = main()) { + if (auto m = App::main()) { m->sendBotCommand(peer, bot, cmd, replyTo); } } void hideSingleUseKeyboard(const HistoryItem *msg) { - if (auto m = main()) { + if (auto m = App::main()) { m->hideSingleUseKeyboard(msg->history()->peer, msg->id); } } bool insertBotCommand(const QString &cmd) { - if (auto m = main()) { + if (auto m = App::main()) { return m->insertBotCommand(cmd); } return false; @@ -82,7 +82,7 @@ void activateBotCommand( case ButtonType::Callback: case ButtonType::Game: { - if (auto m = main()) { + if (auto m = App::main()) { m->app_sendBotCallback(button, msg, row, column); } } break; @@ -149,7 +149,7 @@ void activateBotCommand( } void searchByHashtag(const QString &tag, PeerData *inPeer) { - if (const auto m = main()) { + if (const auto m = App::main()) { Ui::hideSettingsAndLayer(); Messenger::Instance().hideMediaView(); if (inPeer && (!inPeer->isChannel() || inPeer->isMegagroup())) { @@ -164,13 +164,13 @@ void searchByHashtag(const QString &tag, PeerData *inPeer) { } void showSettings() { - if (auto w = wnd()) { + if (auto w = App::wnd()) { w->showSettings(); } } void activateClickHandler(ClickHandlerPtr handler, ClickContext context) { - crl::on_main(wnd(), [=] { + crl::on_main(App::wnd(), [=] { handler->onClick(context); }); }