mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-02 07:25:46 +00:00
Using standard library instead of std_ namespace.
Currently tested only in VS2015.
This commit is contained in:
@@ -46,7 +46,7 @@ public:
|
||||
}
|
||||
|
||||
void setDoneCallback(base::lambda<void()> &&callback) {
|
||||
_doneCallback = std_::move(callback);
|
||||
_doneCallback = std::move(callback);
|
||||
}
|
||||
|
||||
void setLayerBoxes(const QRect &specialLayerBox, const QRect &layerBox);
|
||||
@@ -98,10 +98,10 @@ private:
|
||||
};
|
||||
|
||||
void LayerStackWidget::BackgroundWidget::setCacheImages(QPixmap &&bodyCache, QPixmap &&mainMenuCache, QPixmap &&specialLayerCache, QPixmap &&layerCache) {
|
||||
_bodyCache = std_::move(bodyCache);
|
||||
_mainMenuCache = std_::move(mainMenuCache);
|
||||
_specialLayerCache = std_::move(specialLayerCache);
|
||||
_layerCache = std_::move(layerCache);
|
||||
_bodyCache = std::move(bodyCache);
|
||||
_mainMenuCache = std::move(mainMenuCache);
|
||||
_specialLayerCache = std::move(specialLayerCache);
|
||||
_layerCache = std::move(layerCache);
|
||||
_specialLayerCacheBox = _specialLayerBox;
|
||||
_layerCacheBox = _layerBox;
|
||||
setAttribute(Qt::WA_OpaquePaintEvent, !_bodyCache.isNull());
|
||||
@@ -259,7 +259,7 @@ void LayerStackWidget::BackgroundWidget::paintEvent(QPaintEvent *e) {
|
||||
// in the transparent special layer cache corners after filling special layer
|
||||
// rect above its cache with alpha_current opacity.
|
||||
auto region = QRegion(bg) - specialLayerBox;
|
||||
for_const (auto rect, region.rects()) {
|
||||
for (auto rect : region.rects()) {
|
||||
p.fillRect(rect, st::layerBg);
|
||||
}
|
||||
p.setOpacity((bgOpacity - overSpecialOpacity) / (1. - (overSpecialOpacity * st::layerBg->c.alphaF())));
|
||||
@@ -410,7 +410,7 @@ void LayerStackWidget::setCacheImages() {
|
||||
}
|
||||
setAttribute(Qt::WA_OpaquePaintEvent, !bodyCache.isNull());
|
||||
updateLayerBoxes();
|
||||
_background->setCacheImages(std_::move(bodyCache), std_::move(mainMenuCache), std_::move(specialLayerCache), std_::move(layerCache));
|
||||
_background->setCacheImages(std::move(bodyCache), std::move(mainMenuCache), std::move(specialLayerCache), std::move(layerCache));
|
||||
}
|
||||
|
||||
void LayerStackWidget::onLayerClosed(LayerWidget *layer) {
|
||||
@@ -522,7 +522,7 @@ void LayerStackWidget::resizeEvent(QResizeEvent *e) {
|
||||
}
|
||||
|
||||
void LayerStackWidget::showBox(object_ptr<BoxContent> box) {
|
||||
auto pointer = pushBox(std_::move(box));
|
||||
auto pointer = pushBox(std::move(box));
|
||||
while (!_layers.isEmpty() && _layers.front() != pointer) {
|
||||
auto removingLayer = _layers.front();
|
||||
_layers.pop_front();
|
||||
@@ -590,9 +590,9 @@ void LayerStackWidget::showFinished() {
|
||||
}
|
||||
|
||||
void LayerStackWidget::showSpecialLayer(object_ptr<LayerWidget> layer) {
|
||||
startAnimation([this, layer = std_::move(layer)]() mutable {
|
||||
startAnimation([this, layer = std::move(layer)]() mutable {
|
||||
_specialLayer.destroyDelayed();
|
||||
_specialLayer = std_::move(layer);
|
||||
_specialLayer = std::move(layer);
|
||||
initChildLayer(_specialLayer);
|
||||
}, [this] {
|
||||
clearLayers();
|
||||
@@ -612,7 +612,7 @@ void LayerStackWidget::showMainMenu() {
|
||||
}
|
||||
|
||||
void LayerStackWidget::appendBox(object_ptr<BoxContent> box) {
|
||||
pushBox(std_::move(box));
|
||||
pushBox(std::move(box));
|
||||
}
|
||||
|
||||
LayerWidget *LayerStackWidget::pushBox(object_ptr<BoxContent> box) {
|
||||
@@ -621,7 +621,7 @@ LayerWidget *LayerStackWidget::pushBox(object_ptr<BoxContent> box) {
|
||||
if (oldLayer->inFocusChain()) setFocus();
|
||||
oldLayer->hide();
|
||||
}
|
||||
auto layer = object_ptr<AbstractBox>(this, std_::move(box));
|
||||
auto layer = object_ptr<AbstractBox>(this, std::move(box));
|
||||
_layers.push_back(layer);
|
||||
initChildLayer(layer);
|
||||
|
||||
@@ -641,9 +641,9 @@ LayerWidget *LayerStackWidget::pushBox(object_ptr<BoxContent> box) {
|
||||
|
||||
void LayerStackWidget::prependBox(object_ptr<BoxContent> box) {
|
||||
if (_layers.empty()) {
|
||||
return showBox(std_::move(box));
|
||||
return showBox(std::move(box));
|
||||
}
|
||||
auto layer = object_ptr<AbstractBox>(this, std_::move(box));
|
||||
auto layer = object_ptr<AbstractBox>(this, std::move(box));
|
||||
layer->hide();
|
||||
_layers.push_front(layer);
|
||||
initChildLayer(layer);
|
||||
|
Reference in New Issue
Block a user