From 1d57f99c14dc1b7dca4111e7618f3bbb80951ec8 Mon Sep 17 00:00:00 2001 From: RadRussianRus Date: Sun, 11 Sep 2022 23:57:41 +0300 Subject: [PATCH] [Fix] Fix Windows build Fixed errors: - C2036 (unknown size): templates can be used only with fully defined structs - Incomplete type Data::Media --- .../chat_helpers/stickers_list_widget.cpp | 11 ----------- .../chat_helpers/stickers_list_widget.h | 16 ++++++++++------ .../SourceFiles/chat_helpers/stickers_lottie.cpp | 1 + .../view/media/history_view_media_common.cpp | 1 + .../inline_bots/inline_bot_layout_internal.cpp | 1 + 5 files changed, 13 insertions(+), 17 deletions(-) diff --git a/Telegram/SourceFiles/chat_helpers/stickers_list_widget.cpp b/Telegram/SourceFiles/chat_helpers/stickers_list_widget.cpp index aa5a7a6c0..bf14efd72 100644 --- a/Telegram/SourceFiles/chat_helpers/stickers_list_widget.cpp +++ b/Telegram/SourceFiles/chat_helpers/stickers_list_widget.cpp @@ -39,7 +39,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "window/window_session_controller.h" // GifPauseReason. #include "main/main_session.h" #include "main/main_session_settings.h" -#include "media/clip/media_clip_reader.h" #include "apiwrap.h" #include "api/api_toggling_media.h" // Api::ToggleFavedSticker #include "styles/style_chat_helpers.h" @@ -224,16 +223,6 @@ private: }; -struct StickersListWidget::Sticker { - not_null document; - std::shared_ptr documentMedia; - Lottie::Animation *lottie = nullptr; - Media::Clip::ReaderPointer webm; - QPixmap savedFrame; - - void ensureMediaCreated(); -}; - auto StickersListWidget::PrepareStickers( const QVector &pack) -> std::vector { diff --git a/Telegram/SourceFiles/chat_helpers/stickers_list_widget.h b/Telegram/SourceFiles/chat_helpers/stickers_list_widget.h index 19b61755e..20dff741e 100644 --- a/Telegram/SourceFiles/chat_helpers/stickers_list_widget.h +++ b/Telegram/SourceFiles/chat_helpers/stickers_list_widget.h @@ -9,6 +9,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "chat_helpers/tabbed_selector.h" #include "data/stickers/data_stickers.h" +#include "media/clip/media_clip_reader.h" #include "base/variant.h" #include "base/timer.h" @@ -39,11 +40,6 @@ class DocumentMedia; class StickersSet; } // namespace Data -namespace Media::Clip { -class ReaderPointer; -enum class Notification; -} // namespace Media::Clip - namespace ChatHelpers { struct StickerIcon; @@ -118,7 +114,15 @@ protected: private: class Footer; - struct Sticker; + struct Sticker { + not_null document; + std::shared_ptr documentMedia; + Lottie::Animation *lottie = nullptr; + Media::Clip::ReaderPointer webm; + QPixmap savedFrame; + + void ensureMediaCreated(); + }; enum class Section { Featured, diff --git a/Telegram/SourceFiles/chat_helpers/stickers_lottie.cpp b/Telegram/SourceFiles/chat_helpers/stickers_lottie.cpp index 712bcea77..4866f68cd 100644 --- a/Telegram/SourceFiles/chat_helpers/stickers_lottie.cpp +++ b/Telegram/SourceFiles/chat_helpers/stickers_lottie.cpp @@ -9,6 +9,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "lottie/lottie_single_player.h" #include "lottie/lottie_multi_player.h" +#include "data/data_media_types.h" #include "data/stickers/data_stickers_set.h" #include "data/data_document.h" #include "data/data_document_media.h" diff --git a/Telegram/SourceFiles/history/view/media/history_view_media_common.cpp b/Telegram/SourceFiles/history/view/media/history_view_media_common.cpp index 00f28fa0c..785480416 100644 --- a/Telegram/SourceFiles/history/view/media/history_view_media_common.cpp +++ b/Telegram/SourceFiles/history/view/media/history_view_media_common.cpp @@ -8,6 +8,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "history/view/media/history_view_media_common.h" #include "ui/text/format_values.h" +#include "data/data_media_types.h" #include "data/data_document.h" #include "data/data_wall_paper.h" #include "history/view/history_view_element.h" diff --git a/Telegram/SourceFiles/inline_bots/inline_bot_layout_internal.cpp b/Telegram/SourceFiles/inline_bots/inline_bot_layout_internal.cpp index fb0ff5308..eab2b76a3 100644 --- a/Telegram/SourceFiles/inline_bots/inline_bot_layout_internal.cpp +++ b/Telegram/SourceFiles/inline_bots/inline_bot_layout_internal.cpp @@ -7,6 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL */ #include "inline_bots/inline_bot_layout_internal.h" +#include "data/data_media_types.h" #include "data/data_photo.h" #include "data/data_document.h" #include "data/data_session.h"