From abd755d7fcf828f66be2d83d6dcf2b43fc1eabed Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 26 Oct 2016 14:03:33 +0300 Subject: [PATCH] Fixed build for Xcode and GCC. --- .../SourceFiles/ui/effects/widget_fade_wrap.h | 31 +++++++++-------- .../ui/effects/widget_slide_wrap.h | 33 ++++++++++--------- 2 files changed, 35 insertions(+), 29 deletions(-) diff --git a/Telegram/SourceFiles/ui/effects/widget_fade_wrap.h b/Telegram/SourceFiles/ui/effects/widget_fade_wrap.h index d9788fd243..49214b1c24 100644 --- a/Telegram/SourceFiles/ui/effects/widget_fade_wrap.h +++ b/Telegram/SourceFiles/ui/effects/widget_fade_wrap.h @@ -62,20 +62,7 @@ private: }; template -class WidgetFadeWrap : public WidgetFadeWrap { -public: - WidgetFadeWrap(QWidget *parent, Widget *entity - , base::lambda_unique updateCallback - , int duration = st::widgetFadeDuration) : WidgetFadeWrap(parent, entity, std_::move(updateCallback), duration) { - } - Widget *entity() { - return static_cast(WidgetFadeWrap::entity()); - } - const Widget *entity() const { - return static_cast(WidgetFadeWrap::entity()); - } - -}; +class WidgetFadeWrap; template <> class WidgetFadeWrap : public TWidget { @@ -124,4 +111,20 @@ private: }; +template +class WidgetFadeWrap : public WidgetFadeWrap { +public: + WidgetFadeWrap(QWidget *parent, Widget *entity + , base::lambda_unique updateCallback + , int duration = st::widgetFadeDuration) : WidgetFadeWrap(parent, entity, std_::move(updateCallback), duration) { + } + Widget *entity() { + return static_cast(WidgetFadeWrap::entity()); + } + const Widget *entity() const { + return static_cast(WidgetFadeWrap::entity()); + } + +}; + } // namespace Ui diff --git a/Telegram/SourceFiles/ui/effects/widget_slide_wrap.h b/Telegram/SourceFiles/ui/effects/widget_slide_wrap.h index c0c99a0c43..4675b86fbc 100644 --- a/Telegram/SourceFiles/ui/effects/widget_slide_wrap.h +++ b/Telegram/SourceFiles/ui/effects/widget_slide_wrap.h @@ -25,21 +25,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org namespace Ui { template -class WidgetSlideWrap : public WidgetSlideWrap { -public: - WidgetSlideWrap(QWidget *parent, Widget *entity - , style::margins entityPadding - , base::lambda_unique updateCallback - , int duration = st::widgetSlideDuration) : WidgetSlideWrap(parent, entity, entityPadding, std_::move(updateCallback), duration) { - } - Widget *entity() { - return static_cast(WidgetSlideWrap::entity()); - } - const Widget *entity() const { - return static_cast(WidgetSlideWrap::entity()); - } - -}; +class WidgetSlideWrap; template <> class WidgetSlideWrap : public TWidget { @@ -85,4 +71,21 @@ private: }; +template +class WidgetSlideWrap : public WidgetSlideWrap { +public: + WidgetSlideWrap(QWidget *parent, Widget *entity + , style::margins entityPadding + , base::lambda_unique updateCallback + , int duration = st::widgetSlideDuration) : WidgetSlideWrap(parent, entity, entityPadding, std_::move(updateCallback), duration) { + } + Widget *entity() { + return static_cast(WidgetSlideWrap::entity()); + } + const Widget *entity() const { + return static_cast(WidgetSlideWrap::entity()); + } + +}; + } // namespace Ui