summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Preston <johnprestonmail@gmail.com>2024-03-08 15:49:30 +0400
committerJohn Preston <johnprestonmail@gmail.com>2024-03-08 15:49:30 +0400
commit990ae11f6291aa0a9d71007c0cee5e28b68c0c0a (patch)
tree3a8df3586b1a04810f236e28a2d53f2c605f83c6
parent3d5092f7ad58311fc31424f1aadae0be6134f8c1 (diff)
Version 4.15.1: Fix build with GCC.v4.15.1
-rw-r--r--Telegram/SourceFiles/boxes/peers/replace_boost_box.cpp7
-rw-r--r--Telegram/SourceFiles/data/business/data_shortcut_messages.cpp1
-rw-r--r--Telegram/SourceFiles/history/view/media/history_view_contact.cpp3
-rw-r--r--Telegram/SourceFiles/info/info_content_widget.cpp5
-rw-r--r--Telegram/SourceFiles/info/info_layer_widget.cpp30
-rw-r--r--Telegram/SourceFiles/settings/business/settings_chatbots.cpp1
-rw-r--r--Telegram/SourceFiles/settings/business/settings_quick_replies.cpp1
-rw-r--r--Telegram/SourceFiles/settings/business/settings_recipients_helper.cpp4
-rw-r--r--Telegram/SourceFiles/settings/business/settings_shortcut_messages.cpp8
-rw-r--r--Telegram/SourceFiles/settings/business/settings_working_hours.cpp2
10 files changed, 3 insertions, 59 deletions
diff --git a/Telegram/SourceFiles/boxes/peers/replace_boost_box.cpp b/Telegram/SourceFiles/boxes/peers/replace_boost_box.cpp
index 36f18ab231..f57573d996 100644
--- a/Telegram/SourceFiles/boxes/peers/replace_boost_box.cpp
+++ b/Telegram/SourceFiles/boxes/peers/replace_boost_box.cpp
@@ -425,14 +425,9 @@ Ui::BoostCounters ParseBoostCounters(
}
Ui::BoostFeatures LookupBoostFeatures(not_null<ChannelData*> channel) {
- const auto group = channel->isMegagroup();
- const auto appConfig = &channel->session().account().appConfig();
- const auto get = [&](const QString &key, int fallback, bool ok = true) {
- return ok ? appConfig->get<int>(key, fallback) : 0;
- };
-
auto nameColorsByLevel = base::flat_map<int, int>();
auto linkStylesByLevel = base::flat_map<int, int>();
+ const auto group = channel->isMegagroup();
const auto peerColors = &channel->session().api().peerColors();
const auto &list = group
? peerColors->requiredLevelsGroup()
diff --git a/Telegram/SourceFiles/data/business/data_shortcut_messages.cpp b/Telegram/SourceFiles/data/business/data_shortcut_messages.cpp
index df2f5f880e..75b27a25ba 100644
--- a/Telegram/SourceFiles/data/business/data_shortcut_messages.cpp
+++ b/Telegram/SourceFiles/data/business/data_shortcut_messages.cpp
@@ -262,7 +262,6 @@ void ShortcutMessages::scheduleShortcutsReload() {
}
void ShortcutMessages::apply(const MTPDupdateNewQuickReply &update) {
- const auto selfId = _session->userPeerId();
const auto &reply = update.vquick_reply();
auto foundId = BusinessShortcutId();
const auto shortcut = parseShortcut(reply);
diff --git a/Telegram/SourceFiles/history/view/media/history_view_contact.cpp b/Telegram/SourceFiles/history/view/media/history_view_contact.cpp
index 1a3e35716b..1e6654abde 100644
--- a/Telegram/SourceFiles/history/view/media/history_view_contact.cpp
+++ b/Telegram/SourceFiles/history/view/media/history_view_contact.cpp
@@ -244,10 +244,8 @@ void Contact::draw(Painter &p, const PaintContext &context) const {
}
const auto st = context.st;
- const auto sti = context.imageStyle();
const auto stm = context.messageStyle();
- const auto bubble = st::msgPadding;
const auto full = Rect(currentSize());
const auto outer = full - inBubblePadding();
const auto inner = outer - innerMargin();
@@ -438,7 +436,6 @@ TextState Contact::textState(QPoint point, StateRequest request) const {
if (_buttons.size() > 1) {
const auto end = rect::bottom(inner) + _st.padding.bottom();
- const auto line = st::historyPageButtonLine;
const auto bWidth = inner.width() / float64(_buttons.size());
const auto bHeight = rect::bottom(outer) - end;
for (auto i = 0; i < _buttons.size(); i++) {
diff --git a/Telegram/SourceFiles/info/info_content_widget.cpp b/Telegram/SourceFiles/info/info_content_widget.cpp
index 440c125b22..b2908c3ac6 100644
--- a/Telegram/SourceFiles/info/info_content_widget.cpp
+++ b/Telegram/SourceFiles/info/info_content_widget.cpp
@@ -167,12 +167,7 @@ Ui::RpWidget *ContentWidget::doSetInnerWidget(
const auto bottom = top + height;
_innerDesiredHeight = desired;
_innerWrap->setVisibleTopBottom(top, bottom);
- LOG(("TOP: %1, HEIGHT: %2, DESIRED: %3, TILL: %4").arg(top).arg(height).arg(desired).arg(std::max(desired - bottom, 0)));
_scrollTillBottomChanges.fire_copy(std::max(desired - bottom, 0));
- //const auto bottom = _scroll->scrollTop() + _scroll->height();
- //_innerDesiredHeight = desired;
- //_innerWrap->setVisibleTopBottom(_scroll->scrollTop(), bottom);
- //_scrollTillBottomChanges.fire_copy(std::max(desired - bottom, 0));
}, _innerWrap->lifetime());
return _innerWrap->entity();
diff --git a/Telegram/SourceFiles/info/info_layer_widget.cpp b/Telegram/SourceFiles/info/info_layer_widget.cpp
index 50eca44563..3404cf932c 100644
--- a/Telegram/SourceFiles/info/info_layer_widget.cpp
+++ b/Telegram/SourceFiles/info/info_layer_widget.cpp
@@ -138,7 +138,6 @@ void LayerWidget::setContentHeight(int height) {
if (_contentWrapHeight == height) {
return;
}
- LOG(("CONTENT WRAP HEIGHT: %1 -> %2").arg(_contentWrapHeight).arg(height));
_contentWrapHeight = height;
if (_inResize) {
_pendingResize = true;
@@ -261,35 +260,6 @@ int LayerWidget::resizeGetHeight(int newWidth) {
auto attempts = 0;
while (true) {
_inResize = true;
- {
- const auto &parentSize = parentWidget()->size();
- const auto windowWidth = parentSize.width();
- const auto windowHeight = parentSize.height();
- const auto newLeft = (windowWidth - newWidth) / 2;
- const auto newTop = std::clamp(
- windowHeight / 24,
- st::infoLayerTopMinimal,
- st::infoLayerTopMaximal);
- const auto newBottom = newTop;
-
- const auto bottomRadius = st::boxRadius;
- const auto maxVisibleHeight = windowHeight - newTop;
- // Top rounding is included in _contentWrapHeight.
- auto desiredHeight = _contentWrapHeight + bottomRadius;
- accumulate_min(desiredHeight, maxVisibleHeight - newBottom);
-
- // First resize content to new width and get the new desired height.
- const auto contentLeft = 0;
- const auto contentTop = 0;
- const auto contentBottom = bottomRadius;
- const auto contentWidth = newWidth;
- auto contentHeight = desiredHeight - contentTop - contentBottom;
- LOG(("ATTEMPT %1: WIDTH %2, WRAP HEIGHT %3, SCROLL TILL BOTTOM: %4"
- ).arg(attempts + 1
- ).arg(newWidth
- ).arg(_contentWrapHeight
- ).arg(_contentWrap->scrollTillBottom(contentHeight)));
- }
const auto newGeometry = countGeometry(newWidth);
_inResize = false;
if (!_pendingResize) {
diff --git a/Telegram/SourceFiles/settings/business/settings_chatbots.cpp b/Telegram/SourceFiles/settings/business/settings_chatbots.cpp
index 78d4462008..656d499581 100644
--- a/Telegram/SourceFiles/settings/business/settings_chatbots.cpp
+++ b/Telegram/SourceFiles/settings/business/settings_chatbots.cpp
@@ -479,7 +479,6 @@ void Chatbots::setupContent(
void Chatbots::save() {
const auto show = controller()->uiShow();
- const auto session = &controller()->session();
const auto fail = [=](QString error) {
if (error == u"BUSINESS_RECIPIENTS_EMPTY"_q) {
show->showToast(tr::lng_greeting_recipients_empty(tr::now));
diff --git a/Telegram/SourceFiles/settings/business/settings_quick_replies.cpp b/Telegram/SourceFiles/settings/business/settings_quick_replies.cpp
index 97b0c9a614..d451feb1bb 100644
--- a/Telegram/SourceFiles/settings/business/settings_quick_replies.cpp
+++ b/Telegram/SourceFiles/settings/business/settings_quick_replies.cpp
@@ -130,7 +130,6 @@ void QuickReplies::setupContent(
auto old = inner->count();
const auto &shortcuts = messages->shortcuts();
- auto i = 0;
for (const auto &[_, shortcut]
: shortcuts.list | ranges::views::reverse) {
if (!shortcut.count) {
diff --git a/Telegram/SourceFiles/settings/business/settings_recipients_helper.cpp b/Telegram/SourceFiles/settings/business/settings_recipients_helper.cpp
index 7f7f2b7156..160b1d83b8 100644
--- a/Telegram/SourceFiles/settings/business/settings_recipients_helper.cpp
+++ b/Telegram/SourceFiles/settings/business/settings_recipients_helper.cpp
@@ -171,7 +171,7 @@ void AddBusinessRecipientsSelector(
const auto all = current.allButExcluded || current.included.empty();
const auto group = std::make_shared<Ui::RadiobuttonGroup>(
all ? kAllExcept : kSelectedOnly);
- const auto everyone = container->add(
+ container->add(
object_ptr<Ui::Radiobutton>(
container,
group,
@@ -179,7 +179,7 @@ void AddBusinessRecipientsSelector(
tr::lng_chatbots_all_except(tr::now),
st::settingsChatbotsAccess),
st::settingsChatbotsAccessMargins);
- const auto selected = container->add(
+ container->add(
object_ptr<Ui::Radiobutton>(
container,
group,
diff --git a/Telegram/SourceFiles/settings/business/settings_shortcut_messages.cpp b/Telegram/SourceFiles/settings/business/settings_shortcut_messages.cpp
index 3b11431262..e1fcec944d 100644
--- a/Telegram/SourceFiles/settings/business/settings_shortcut_messages.cpp
+++ b/Telegram/SourceFiles/settings/business/settings_shortcut_messages.cpp
@@ -181,7 +181,6 @@ private:
void processScroll();
void updateInnerVisibleArea();
- void pushReplyReturn(not_null<HistoryItem*> item);
void checkReplyReturns();
void confirmDeleteSelected();
void clearSelected();
@@ -565,7 +564,6 @@ bool ShortcutMessages::paintOuter(
not_null<QWidget*> outer,
int maxVisibleHeight,
QRect clip) {
- const auto window = outer->window()->height();
Window::SectionWidget::PaintBackground(
_theme.get(),
outer,
@@ -1092,12 +1090,6 @@ bool ShortcutMessages::cornerButtonsHas(CornerButtonType type) {
return (type == CornerButtonType::Down);
}
-void ShortcutMessages::pushReplyReturn(not_null<HistoryItem*> item) {
- if (item->shortcutId() == _shortcutId.current()) {
- _cornerButtons.pushReplyReturn(item);
- }
-}
-
void ShortcutMessages::checkReplyReturns() {
const auto currentTop = _scroll->scrollTop();
const auto shortcutId = _shortcutId.current();
diff --git a/Telegram/SourceFiles/settings/business/settings_working_hours.cpp b/Telegram/SourceFiles/settings/business/settings_working_hours.cpp
index 525d069a4f..fe80e5c73b 100644
--- a/Telegram/SourceFiles/settings/business/settings_working_hours.cpp
+++ b/Telegram/SourceFiles/settings/business/settings_working_hours.cpp
@@ -60,7 +60,6 @@ private:
const auto abs = std::abs(data.utcOffset);
const auto hours = abs / 3600;
const auto minutes = (abs % 3600) / 60;
- const auto seconds = abs % 60;
const auto sign = (data.utcOffset < 0) ? '-' : '+';
const auto prefix = u"(UTC"_q
+ sign
@@ -366,7 +365,6 @@ void EditDayBox(
const auto from = std::max(
std::min(last + 30 * 60, kDay - 30 * 60),
last + 60);
- const auto till = std::min(from + 4 * 3600, kDay + 30 * 60);
now.list.push_back({ from, from + 4 * 3600 });
}
state->data = std::move(now);