Fixed build for Xcode and GCC.

This commit is contained in:
John Preston 2016-10-26 14:03:33 +03:00
parent ff2d959abd
commit abd755d7fc
2 changed files with 35 additions and 29 deletions

View File

@ -62,20 +62,7 @@ private:
};
template <typename Widget>
class WidgetFadeWrap : public WidgetFadeWrap<TWidget> {
public:
WidgetFadeWrap(QWidget *parent, Widget *entity
, base::lambda_unique<void()> updateCallback
, int duration = st::widgetFadeDuration) : WidgetFadeWrap<TWidget>(parent, entity, std_::move(updateCallback), duration) {
}
Widget *entity() {
return static_cast<Widget*>(WidgetFadeWrap<TWidget>::entity());
}
const Widget *entity() const {
return static_cast<const Widget*>(WidgetFadeWrap<TWidget>::entity());
}
};
class WidgetFadeWrap;
template <>
class WidgetFadeWrap<TWidget> : public TWidget {
@ -124,4 +111,20 @@ private:
};
template <typename Widget>
class WidgetFadeWrap : public WidgetFadeWrap<TWidget> {
public:
WidgetFadeWrap(QWidget *parent, Widget *entity
, base::lambda_unique<void()> updateCallback
, int duration = st::widgetFadeDuration) : WidgetFadeWrap<TWidget>(parent, entity, std_::move(updateCallback), duration) {
}
Widget *entity() {
return static_cast<Widget*>(WidgetFadeWrap<TWidget>::entity());
}
const Widget *entity() const {
return static_cast<const Widget*>(WidgetFadeWrap<TWidget>::entity());
}
};
} // namespace Ui

View File

@ -25,21 +25,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
namespace Ui {
template <typename Widget>
class WidgetSlideWrap : public WidgetSlideWrap<TWidget> {
public:
WidgetSlideWrap(QWidget *parent, Widget *entity
, style::margins entityPadding
, base::lambda_unique<void()> updateCallback
, int duration = st::widgetSlideDuration) : WidgetSlideWrap<TWidget>(parent, entity, entityPadding, std_::move(updateCallback), duration) {
}
Widget *entity() {
return static_cast<Widget*>(WidgetSlideWrap<TWidget>::entity());
}
const Widget *entity() const {
return static_cast<const Widget*>(WidgetSlideWrap<TWidget>::entity());
}
};
class WidgetSlideWrap;
template <>
class WidgetSlideWrap<TWidget> : public TWidget {
@ -85,4 +71,21 @@ private:
};
template <typename Widget>
class WidgetSlideWrap : public WidgetSlideWrap<TWidget> {
public:
WidgetSlideWrap(QWidget *parent, Widget *entity
, style::margins entityPadding
, base::lambda_unique<void()> updateCallback
, int duration = st::widgetSlideDuration) : WidgetSlideWrap<TWidget>(parent, entity, entityPadding, std_::move(updateCallback), duration) {
}
Widget *entity() {
return static_cast<Widget*>(WidgetSlideWrap<TWidget>::entity());
}
const Widget *entity() const {
return static_cast<const Widget*>(WidgetSlideWrap<TWidget>::entity());
}
};
} // namespace Ui