mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-30 22:25:12 +00:00
Replace gsl::not_null<T*> with just not_null<T*>.
This commit is contained in:
@@ -27,7 +27,7 @@ class SectionWidget;
|
||||
|
||||
class SectionMemento {
|
||||
public:
|
||||
virtual object_ptr<Window::SectionWidget> createWidget(QWidget *parent, gsl::not_null<Window::Controller*> controller, const QRect &geometry) = 0;
|
||||
virtual object_ptr<Window::SectionWidget> createWidget(QWidget *parent, not_null<Window::Controller*> controller, const QRect &geometry) = 0;
|
||||
virtual ~SectionMemento() {
|
||||
}
|
||||
|
||||
|
@@ -24,7 +24,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
|
||||
|
||||
namespace Window {
|
||||
|
||||
SectionWidget::SectionWidget(QWidget *parent, gsl::not_null<Window::Controller*> controller) : AbstractSectionWidget(parent, controller) {
|
||||
SectionWidget::SectionWidget(QWidget *parent, not_null<Window::Controller*> controller) : AbstractSectionWidget(parent, controller) {
|
||||
}
|
||||
|
||||
void SectionWidget::setGeometryWithTopMoved(const QRect &newGeometry, int topDelta) {
|
||||
|
@@ -35,7 +35,7 @@ enum class Column {
|
||||
|
||||
class AbstractSectionWidget : public TWidget, protected base::Subscriber {
|
||||
public:
|
||||
AbstractSectionWidget(QWidget *parent, gsl::not_null<Window::Controller*> controller) : TWidget(parent), _controller(controller) {
|
||||
AbstractSectionWidget(QWidget *parent, not_null<Window::Controller*> controller) : TWidget(parent), _controller(controller) {
|
||||
}
|
||||
|
||||
// Float player interface.
|
||||
@@ -47,12 +47,12 @@ public:
|
||||
}
|
||||
|
||||
protected:
|
||||
gsl::not_null<Window::Controller*> controller() const {
|
||||
not_null<Window::Controller*> controller() const {
|
||||
return _controller;
|
||||
}
|
||||
|
||||
private:
|
||||
gsl::not_null<Window::Controller*> _controller;
|
||||
not_null<Window::Controller*> _controller;
|
||||
|
||||
};
|
||||
|
||||
@@ -70,7 +70,7 @@ struct SectionSlideParams {
|
||||
|
||||
class SectionWidget : public AbstractSectionWidget {
|
||||
public:
|
||||
SectionWidget(QWidget *parent, gsl::not_null<Window::Controller*> controller);
|
||||
SectionWidget(QWidget *parent, not_null<Window::Controller*> controller);
|
||||
|
||||
virtual PeerData *peerForDialogs() const {
|
||||
return nullptr;
|
||||
@@ -99,7 +99,7 @@ public:
|
||||
//
|
||||
// If this method returns false it is not supposed to modify the memento.
|
||||
// If this method returns true it may modify the memento ("take" heavy items).
|
||||
virtual bool showInternal(gsl::not_null<SectionMemento*> memento) = 0;
|
||||
virtual bool showInternal(not_null<SectionMemento*> memento) = 0;
|
||||
|
||||
// Create a memento of that section to store it in the history stack.
|
||||
// This method may modify the section ("take" heavy items).
|
||||
|
@@ -37,7 +37,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
|
||||
|
||||
namespace Window {
|
||||
|
||||
TopBarWidget::TopBarWidget(QWidget *parent, gsl::not_null<Window::Controller*> controller) : TWidget(parent)
|
||||
TopBarWidget::TopBarWidget(QWidget *parent, not_null<Window::Controller*> controller) : TWidget(parent)
|
||||
, _controller(controller)
|
||||
, _clearSelection(this, langFactory(lng_selected_clear), st::topBarClearButton)
|
||||
, _forward(this, langFactory(lng_selected_forward), st::defaultActiveButton)
|
||||
|
@@ -37,7 +37,7 @@ class TopBarWidget : public TWidget, private base::Subscriber {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
TopBarWidget(QWidget *parent, gsl::not_null<Window::Controller*> controller);
|
||||
TopBarWidget(QWidget *parent, not_null<Window::Controller*> controller);
|
||||
|
||||
struct SelectedState {
|
||||
bool textSelected = false;
|
||||
@@ -80,7 +80,7 @@ private:
|
||||
void updateAdaptiveLayout();
|
||||
int countSelectedButtonsTop(float64 selectedShown);
|
||||
|
||||
gsl::not_null<Window::Controller*> _controller;
|
||||
not_null<Window::Controller*> _controller;
|
||||
|
||||
PeerData *_searchInPeer = nullptr;
|
||||
int _selectedCount = 0;
|
||||
|
@@ -136,7 +136,7 @@ void Controller::provideChatWidth(int requestedWidth) {
|
||||
}
|
||||
}
|
||||
|
||||
void Controller::showJumpToDate(gsl::not_null<PeerData*> peer, QDate requestedDate) {
|
||||
void Controller::showJumpToDate(not_null<PeerData*> peer, QDate requestedDate) {
|
||||
Expects(peer != nullptr);
|
||||
auto currentPeerDate = [peer] {
|
||||
if (auto history = App::historyLoaded(peer)) {
|
||||
|
@@ -39,10 +39,10 @@ class Controller {
|
||||
public:
|
||||
static constexpr auto kDefaultDialogsWidthRatio = 5. / 14;
|
||||
|
||||
Controller(gsl::not_null<MainWindow*> window) : _window(window) {
|
||||
Controller(not_null<MainWindow*> window) : _window(window) {
|
||||
}
|
||||
|
||||
gsl::not_null<MainWindow*> window() const {
|
||||
not_null<MainWindow*> window() const {
|
||||
return _window;
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ public:
|
||||
bool canProvideChatWidth(int requestedWidth) const;
|
||||
void provideChatWidth(int requestedWidth);
|
||||
|
||||
void showJumpToDate(gsl::not_null<PeerData*> peer, QDate requestedDate);
|
||||
void showJumpToDate(not_null<PeerData*> peer, QDate requestedDate);
|
||||
|
||||
base::Variable<float64> &dialogsWidthRatio() {
|
||||
return _dialogsWidthRatio;
|
||||
@@ -102,7 +102,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
gsl::not_null<MainWindow*> _window;
|
||||
not_null<MainWindow*> _window;
|
||||
|
||||
base::Observable<PeerData*> _searchInPeerChanged;
|
||||
base::Observable<PeerData*> _historyPeerChanged;
|
||||
|
@@ -96,14 +96,14 @@ void MainMenu::refreshMenu() {
|
||||
App::wnd()->onShowNewChannel();
|
||||
}, &st::mainMenuNewChannel, &st::mainMenuNewChannelOver);
|
||||
_menu->addAction(lang(lng_menu_contacts), [] {
|
||||
Ui::show(Box<PeerListBox>(std::make_unique<ContactsBoxController>(), [](gsl::not_null<PeerListBox*> box) {
|
||||
Ui::show(Box<PeerListBox>(std::make_unique<ContactsBoxController>(), [](not_null<PeerListBox*> box) {
|
||||
box->addButton(langFactory(lng_close), [box] { box->closeBox(); });
|
||||
box->addLeftButton(langFactory(lng_profile_add_contact), [] { App::wnd()->onShowAddContact(); });
|
||||
}));
|
||||
}, &st::mainMenuContacts, &st::mainMenuContactsOver);
|
||||
if (Global::PhoneCallsEnabled()) {
|
||||
_menu->addAction(lang(lng_menu_calls), [] {
|
||||
Ui::show(Box<PeerListBox>(std::make_unique<Calls::BoxController>(), [](gsl::not_null<PeerListBox*> box) {
|
||||
Ui::show(Box<PeerListBox>(std::make_unique<Calls::BoxController>(), [](not_null<PeerListBox*> box) {
|
||||
box->addButton(langFactory(lng_close), [box] { box->closeBox(); });
|
||||
}));
|
||||
}, &st::mainMenuCalls, &st::mainMenuCallsOver);
|
||||
|
Reference in New Issue
Block a user