2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Remove MTP::MainInstance() global access point.

This commit is contained in:
John Preston
2020-06-11 20:09:46 +04:00
parent 7f09da9e32
commit 0ad7dcaef9
84 changed files with 823 additions and 1362 deletions

View File

@@ -10,7 +10,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "boxes/abstract_box.h"
#include "storage/storage_media_prepare.h"
#include "ui/wrap/slide_wrap.h"
#include "mtproto/mtproto_rpc_sender.h"
#include "mtproto/sender.h"
class Image;
@@ -49,10 +49,7 @@ struct Information;
} // namespace Streaming
} // namespace Media
class EditCaptionBox
: public Ui::BoxContent
, public RPCSender
, private base::Subscriber {
class EditCaptionBox final : public Ui::BoxContent, private base::Subscriber {
public:
EditCaptionBox(
QWidget*,
@@ -87,7 +84,7 @@ private:
void captionResized();
void saveDone(const MTPUpdates &updates);
bool saveFail(const RPCError &error);
void saveFail(const RPCError &error);
void setName(QString nameString, qint64 size);
bool fileFromClipboard(not_null<const QMimeData*> data);
@@ -104,7 +101,9 @@ private:
: _preparedList.files.front().path;
}
not_null<Window::SessionController*> _controller;
const not_null<Window::SessionController*> _controller;
MTP::Sender _api;
FullMsgId _msgId;
std::shared_ptr<Data::PhotoMedia> _photoMedia;
std::shared_ptr<Data::DocumentMedia> _documentMedia;