Fix build and crash in Xcode.

This commit is contained in:
John Preston 2017-11-05 13:56:43 +04:00
parent 628c8e10f7
commit cb5c59c86c
3 changed files with 3 additions and 10 deletions

View File

@ -204,7 +204,7 @@ void InnerWidget::saveState(not_null<Memento*> memento) {
}
void InnerWidget::restoreState(not_null<Memento*> memento) {
_listController->restoreState(std::move(memento->listState()));
_listController->restoreState(memento->listState());
}
int InnerWidget::desiredHeight() const {

View File

@ -56,11 +56,6 @@ void SectionWidget::init() {
}, _content->lifetime());
}
not_null<Controller*> SectionWidget::controller() const {
Expects(_content != nullptr);
return _content->controller();
}
PeerData *SectionWidget::peerForDialogs() const {
return _content->peerForDialogs();
}
@ -94,13 +89,13 @@ std::unique_ptr<Window::SectionMemento> SectionWidget::createMemento() {
object_ptr<Window::LayerWidget> SectionWidget::moveContentToLayer(
QRect bodyGeometry) {
if (controller()->wrap() != Wrap::Narrow
if (_content->controller()->wrap() != Wrap::Narrow
|| width() < LayerWidget::MinimalSupportedWidth()) {
return nullptr;
}
return MoveMemento(
std::move(_content)).createLayer(
controller()->window(),
controller(),
bodyGeometry);
}

View File

@ -73,8 +73,6 @@ protected:
private:
void init();
not_null<Controller*> controller() const;
object_ptr<WrapWidget> _content;
};