Telegram: bump version, switch to Qt6

This commit is contained in:
Gerasim Troeglazov
2021-11-07 17:52:06 +10:00
parent 28048c3eab
commit 787a1268a9
4 changed files with 125 additions and 700 deletions

View File

@@ -1,637 +0,0 @@
From 831bf906370fbaea18bc03895fc499536a914fa0 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Sat, 9 Oct 2021 13:52:53 +1000
Subject: Workaround build issues on GCC8
diff --git a/Telegram/SourceFiles/api/api_who_read.cpp b/Telegram/SourceFiles/api/api_who_read.cpp
index 07d1ede..22092b5 100644
--- a/Telegram/SourceFiles/api/api_who_read.cpp
+++ b/Telegram/SourceFiles/api/api_who_read.cpp
@@ -261,6 +261,7 @@ void RegenerateParticipants(not_null<State*> state, int small, int large) {
}
now.push_back({
.name = peer->name,
+ .userpicSmall = QImage(),
.userpicLarge = GenerateUserpic(userpic, large),
.userpicKey = userpic.uniqueKey,
.id = id,
diff --git a/Telegram/SourceFiles/calls/group/calls_group_panel.cpp b/Telegram/SourceFiles/calls/group/calls_group_panel.cpp
index 2c3d1dc..c28e158 100644
--- a/Telegram/SourceFiles/calls/group/calls_group_panel.cpp
+++ b/Telegram/SourceFiles/calls/group/calls_group_panel.cpp
@@ -160,10 +160,10 @@ void Panel::showToast(TextWithEntities &&text, crl::time duration) {
if (const auto strong = _lastToast.get()) {
strong->hideAnimated();
}
- _lastToast = Ui::ShowMultilineToast({
- .parentOverride = widget(),
+ _lastToast = Ui::ShowMultilineToast(Ui::MultilineToastArgs{
.text = std::move(text),
.duration = duration,
+ .parentOverride = widget(),
});
}
diff --git a/Telegram/SourceFiles/calls/group/calls_group_settings.cpp b/Telegram/SourceFiles/calls/group/calls_group_settings.cpp
index c6bcb04..5986fad 100644
--- a/Telegram/SourceFiles/calls/group/calls_group_settings.cpp
+++ b/Telegram/SourceFiles/calls/group/calls_group_settings.cpp
@@ -554,9 +554,9 @@ void SettingsBox(
box->getDelegate()->show(std::move(next));
});
const auto showToast = crl::guard(box, [=](QString text) {
- Ui::ShowMultilineToast({
- .parentOverride = box->getDelegate()->outerContainer(),
+ Ui::ShowMultilineToast(Ui::MultilineToastArgs{
.text = { text },
+ .parentOverride = box->getDelegate()->outerContainer(),
});
});
auto [shareLinkCallback, shareLinkLifetime] = ShareInviteLinkAction(
@@ -592,9 +592,9 @@ void SettingsBox(
}
QGuiApplication::clipboard()->setText(link);
if (weakBox) {
- Ui::ShowMultilineToast({
- .parentOverride = box->getDelegate()->outerContainer(),
+ Ui::ShowMultilineToast(Ui::MultilineToastArgs{
.text = { tr::lng_create_channel_link_copied(tr::now) },
+ .parentOverride = box->getDelegate()->outerContainer(),
});
}
return true;
diff --git a/Telegram/SourceFiles/calls/group/calls_group_viewport_opengl.cpp b/Telegram/SourceFiles/calls/group/calls_group_viewport_opengl.cpp
index a33e2f0..227487e 100644
--- a/Telegram/SourceFiles/calls/group/calls_group_viewport_opengl.cpp
+++ b/Telegram/SourceFiles/calls/group/calls_group_viewport_opengl.cpp
@@ -1267,11 +1267,13 @@ void Viewport::RendererGL::validateDatas() {
request.updating = true;
} else {
// This invalidates maybeStale*, but they're already equal.
+#ifndef Q_OS_HAIKU
_tileData.push_back({
.id = id,
.peer = peer,
.pause = paused,
});
+#endif
}
const auto nameTop = pausedBottom + index * nameHeight;
_tileData[index].nameVersion = peer->nameVersion;
diff --git a/Telegram/SourceFiles/countries/countries_manager.cpp b/Telegram/SourceFiles/countries/countries_manager.cpp
index 2355208..807d270 100644
--- a/Telegram/SourceFiles/countries/countries_manager.cpp
+++ b/Telegram/SourceFiles/countries/countries_manager.cpp
@@ -221,6 +221,8 @@ void Manager::request() {
auto info = Info(ProcessAlternativeName({
.name = countryData.vdefault_name().v,
.iso2 = countryData.viso2().v,
+ .alternativeName = "",
+ .codes = {},
.isHidden = countryData.is_hidden(),
}));
for (const auto &code : countryData.vcountry_codes().v) {
diff --git a/Telegram/SourceFiles/data/data_media_types.cpp b/Telegram/SourceFiles/data/data_media_types.cpp
index 91eaba4..e7c3814 100644
--- a/Telegram/SourceFiles/data/data_media_types.cpp
+++ b/Telegram/SourceFiles/data/data_media_types.cpp
@@ -578,6 +578,7 @@ ItemPreview MediaPhoto::toPreview(ToPreviewOptions options) const {
return {
.text = WithCaptionDialogsText(type, caption, !images.empty()),
.images = std::move(images),
+ .imagesInTextPosition = 0,
.loadingContext = std::move(context),
};
}
@@ -797,6 +798,7 @@ ItemPreview MediaFile::toPreview(ToPreviewOptions options) const {
return {
.text = WithCaptionDialogsText(type, caption, !images.empty()),
.images = std::move(images),
+ .imagesInTextPosition = 0,
.loadingContext = std::move(context),
};
}
diff --git a/Telegram/SourceFiles/dialogs/ui/dialogs_layout.cpp b/Telegram/SourceFiles/dialogs/ui/dialogs_layout.cpp
index 759492b..642e3c3 100644
--- a/Telegram/SourceFiles/dialogs/ui/dialogs_layout.cpp
+++ b/Telegram/SourceFiles/dialogs/ui/dialogs_layout.cpp
@@ -848,7 +848,7 @@ void RowPainter::paint(
if (const auto searchChat = row->searchInChat()) {
if (const auto peer = searchChat.peer()) {
if (!peer->isChannel() || peer->isMegagroup()) {
- return { .hideSender = true };
+ return { .existing = nullptr, .hideSender = true };
}
}
}
diff --git a/Telegram/SourceFiles/editor/photo_editor_layer_widget.cpp b/Telegram/SourceFiles/editor/photo_editor_layer_widget.cpp
index 9100631..2e3a64b 100644
--- a/Telegram/SourceFiles/editor/photo_editor_layer_widget.cpp
+++ b/Telegram/SourceFiles/editor/photo_editor_layer_widget.cpp
@@ -82,6 +82,8 @@ void PrepareProfilePhoto(
auto image = Images::Read({
.path = result.paths.isEmpty() ? QString() : result.paths.front(),
.content = result.remoteContent,
+ .maxSize = QSize(),
+ .gzipSvg = false,
.forceOpaque = true,
}).image;
if (image.isNull()
diff --git a/Telegram/SourceFiles/history/history.cpp b/Telegram/SourceFiles/history/history.cpp
index 17e480f..87cddfd 100644
--- a/Telegram/SourceFiles/history/history.cpp
+++ b/Telegram/SourceFiles/history/history.cpp
@@ -2277,6 +2277,7 @@ void History::setChatListMessage(HistoryItem *item) {
// If we have a single message from a group, request the full album.
if (hasOrphanMediaGroupPart()
&& !item->toPreview({
+ .existing = nullptr,
.hideSender = true,
.hideCaption = true }).images.empty()) {
owner().histories().requestGroupAround(item);
diff --git a/Telegram/SourceFiles/history/history_item.h b/Telegram/SourceFiles/history/history_item.h
index 29b9825..4b7994c 100644
--- a/Telegram/SourceFiles/history/history_item.h
+++ b/Telegram/SourceFiles/history/history_item.h
@@ -324,7 +324,9 @@ public:
ToPreviewOptions options) const;
[[nodiscard]] virtual QString inReplyText() const {
return toPreview({
+ .existing = nullptr,
.hideSender = true,
+ .hideCaption = false,
.generateImages = false,
}).text;
}
diff --git a/Telegram/SourceFiles/history/history_widget.cpp b/Telegram/SourceFiles/history/history_widget.cpp
index 13efe5d..3ed9528 100644
--- a/Telegram/SourceFiles/history/history_widget.cpp
+++ b/Telegram/SourceFiles/history/history_widget.cpp
@@ -6884,6 +6884,7 @@ void HistoryWidget::updateForwardingTexts() {
if (count < 2) {
text = _toForward.items.front()->toPreview({
+ .existing = nullptr,
.hideSender = true,
.hideCaption = !keepCaptions,
.generateImages = false,
diff --git a/Telegram/SourceFiles/history/view/history_view_schedule_box.cpp b/Telegram/SourceFiles/history/view/history_view_schedule_box.cpp
index 593c292..af8222a 100644
--- a/Telegram/SourceFiles/history/view/history_view_schedule_box.cpp
+++ b/Telegram/SourceFiles/history/view/history_view_schedule_box.cpp
@@ -76,7 +76,7 @@ void ScheduleBox(
box->closeBox();
copy(result);
};
- auto descriptor = Ui::ChooseDateTimeBox(box, {
+ auto descriptor = Ui::ChooseDateTimeBox(box, Ui::ChooseDateTimeBoxArgs{
.title = (type == SendMenu::Type::Reminder
? tr::lng_remind_title()
: tr::lng_schedule_title()),
diff --git a/Telegram/SourceFiles/inline_bots/inline_bot_send_data.cpp b/Telegram/SourceFiles/inline_bots/inline_bot_send_data.cpp
index 50b96f1..e137c71 100644
--- a/Telegram/SourceFiles/inline_bots/inline_bot_send_data.cpp
+++ b/Telegram/SourceFiles/inline_bots/inline_bot_send_data.cpp
@@ -70,9 +70,10 @@ SendDataCommon::SentMessageFields SendText::getSentMessageFields() const {
}
SendDataCommon::SentMessageFields SendGeo::getSentMessageFields() const {
+ SentMessageFields result;
if (_period) {
using Flag = MTPDmessageMediaGeoLive::Flag;
- return { .media = MTP_messageMediaGeoLive(
+ result.media = MTP_messageMediaGeoLive(
MTP_flags((_heading ? Flag::f_heading : Flag(0))
| (_proximityNotificationRadius
? Flag::f_proximity_notification_radius
@@ -80,29 +81,35 @@ SendDataCommon::SentMessageFields SendGeo::getSentMessageFields() const {
_location.toMTP(),
MTP_int(_heading.value_or(0)),
MTP_int(*_period),
- MTP_int(_proximityNotificationRadius.value_or(0))) };
+ MTP_int(_proximityNotificationRadius.value_or(0)));
+ return result;
}
- return { .media = MTP_messageMediaGeo(_location.toMTP()) };
+ result.media = MTP_messageMediaGeo(_location.toMTP());
+ return result;
}
SendDataCommon::SentMessageFields SendVenue::getSentMessageFields() const {
+ SentMessageFields result;
const auto venueType = QString();
- return { .media = MTP_messageMediaVenue(
+ result.media = MTP_messageMediaVenue(
_location.toMTP(),
MTP_string(_title),
MTP_string(_address),
MTP_string(_provider),
MTP_string(_venueId),
- MTP_string(QString())) }; // venue_type
+ MTP_string(QString())); // venue_type
+ return result;
}
SendDataCommon::SentMessageFields SendContact::getSentMessageFields() const {
- return { .media = MTP_messageMediaContact(
+ SentMessageFields result;
+ result.media = MTP_messageMediaContact(
MTP_string(_phoneNumber),
MTP_string(_firstName),
MTP_string(_lastName),
MTP_string(), // vcard
- MTP_long(0)) }; // user_id
+ MTP_long(0)); // user_id
+ return result;
}
QString SendContact::getLayoutDescription(const Result *owner) const {
@@ -226,7 +233,9 @@ QString SendGame::getErrorOnSend(
}
SendDataCommon::SentMessageFields SendInvoice::getSentMessageFields() const {
- return { .media = _media };
+ SentMessageFields result;
+ result.media = _media;
+ return result;
}
QString SendInvoice::getLayoutDescription(const Result *owner) const {
diff --git a/Telegram/SourceFiles/media/audio/media_audio.cpp b/Telegram/SourceFiles/media/audio/media_audio.cpp
index fa9ac0d..a062dc3 100644
--- a/Telegram/SourceFiles/media/audio/media_audio.cpp
+++ b/Telegram/SourceFiles/media/audio/media_audio.cpp
@@ -1615,7 +1615,10 @@ public:
(const char*)packet.data,
packet.size);
auto read = Images::Read({
+ .path = QString(),
.content = coverBytes,
+ .maxSize = QSize(),
+ .gzipSvg = false,
.forceOpaque = true,
});
if (!read.image.isNull()) {
diff --git a/Telegram/SourceFiles/media/streaming/media_streaming_video_track.cpp b/Telegram/SourceFiles/media/streaming/media_streaming_video_track.cpp
index ee1da69..5de0485 100644
--- a/Telegram/SourceFiles/media/streaming/media_streaming_video_track.cpp
+++ b/Telegram/SourceFiles/media/streaming/media_streaming_video_track.cpp
@@ -1144,13 +1144,13 @@ FrameWithInfo VideoTrack::frameWithInfo(const Instance *instance) {
const auto data = _shared->frameForPaintWithIndex();
const auto i = data.frame->prepared.find(instance);
const auto none = (i == data.frame->prepared.end());
- if (none || i->second.request.requireARGB32) {
+/* if (none || i->second.request.requireARGB32) {
_wrapped.with([=](Implementation &unwrapped) {
unwrapped.updateFrameRequest(
instance,
{ .requireARGB32 = false });
});
- }
+ }*/
return {
.original = data.frame->original,
.yuv420 = &data.frame->yuv420,
diff --git a/Telegram/SourceFiles/passport/passport_form_controller.cpp b/Telegram/SourceFiles/passport/passport_form_controller.cpp
index d247168..13c5192 100644
--- a/Telegram/SourceFiles/passport/passport_form_controller.cpp
+++ b/Telegram/SourceFiles/passport/passport_form_controller.cpp
@@ -75,9 +75,12 @@ std::map<QString, QString> GetTexts(const ValueMap &map) {
QImage ReadImage(bytes::const_span buffer) {
return Images::Read({
+ .path = QString(),
.content = QByteArray::fromRawData(
reinterpret_cast<const char*>(buffer.data()),
buffer.size()),
+ .maxSize = QSize(),
+ .gzipSvg = false,
.forceOpaque = true,
}).image;
}
diff --git a/Telegram/SourceFiles/passport/passport_panel_edit_scans.cpp b/Telegram/SourceFiles/passport/passport_panel_edit_scans.cpp
index ed291b5..f3be4a8 100644
--- a/Telegram/SourceFiles/passport/passport_panel_edit_scans.cpp
+++ b/Telegram/SourceFiles/passport/passport_panel_edit_scans.cpp
@@ -40,7 +40,10 @@ static_assert(kMaxSize <= Storage::kUseBigFilesFrom);
std::variant<ReadScanError, QByteArray> ProcessImage(QByteArray &&bytes) {
auto read = Images::Read({
+ .path = QString(),
.content = base::take(bytes),
+ .maxSize = QSize(),
+ .gzipSvg = false,
.forceOpaque = true,
});
diff --git a/Telegram/SourceFiles/payments/ui/payments_edit_card.cpp b/Telegram/SourceFiles/payments/ui/payments_edit_card.cpp
index d09b6da..979668d 100644
--- a/Telegram/SourceFiles/payments/ui/payments_edit_card.cpp
+++ b/Telegram/SourceFiles/payments/ui/payments_edit_card.cpp
@@ -291,7 +291,7 @@ not_null<RpWidget*> EditCard::setupContent() {
inner->add(result->ownedWidget(), st::paymentsFieldPadding);
return result;
};
- _number = add({
+ _number = add(Ui::FieldConfig{
.type = FieldType::CardNumber,
.placeholder = tr::lng_payments_card_number(),
.validator = CardNumberValidator(),
@@ -301,12 +301,12 @@ not_null<RpWidget*> EditCard::setupContent() {
inner,
_number->widget()->height()),
st::paymentsFieldPadding);
- _expire = make(container, {
+ _expire = make(container, Ui::FieldConfig{
.type = FieldType::CardExpireDate,
.placeholder = tr::lng_payments_card_expire_date(),
.validator = ExpireDateValidator(),
});
- _cvc = make(container, {
+ _cvc = make(container, Ui::FieldConfig{
.type = FieldType::CardCVC,
.placeholder = tr::lng_payments_card_cvc(),
.validator = CvcValidator([=] { return _number->value(); }),
@@ -322,7 +322,7 @@ not_null<RpWidget*> EditCard::setupContent() {
}, container->lifetime());
if (_native.needCardholderName) {
- _name = add({
+ _name = add(Ui::FieldConfig{
.type = FieldType::Text,
.placeholder = tr::lng_payments_card_holder(),
.validator = CardHolderNameValidator(),
@@ -338,7 +338,7 @@ not_null<RpWidget*> EditCard::setupContent() {
st::paymentsBillingInformationTitlePadding);
}
if (_native.needCountry) {
- _country = add({
+ _country = add(Ui::FieldConfig{
.type = FieldType::Country,
.placeholder = tr::lng_payments_billing_country(),
.validator = RequiredFinishedValidator(),
@@ -347,7 +347,7 @@ not_null<RpWidget*> EditCard::setupContent() {
});
}
if (_native.needZip) {
- _zip = add({
+ _zip = add(Ui::FieldConfig{
.type = FieldType::Text,
.placeholder = tr::lng_payments_billing_zip_code(),
.validator = RequiredValidator(),
diff --git a/Telegram/SourceFiles/payments/ui/payments_edit_information.cpp b/Telegram/SourceFiles/payments/ui/payments_edit_information.cpp
index ab96a8a..2d4e6ff 100644
--- a/Telegram/SourceFiles/payments/ui/payments_edit_information.cpp
+++ b/Telegram/SourceFiles/payments/ui/payments_edit_information.cpp
@@ -125,26 +125,26 @@ not_null<RpWidget*> EditInformation::setupContent() {
return result;
};
if (_invoice.isShippingAddressRequested) {
- _street1 = add({
+ _street1 = add(Ui::FieldConfig{
.placeholder = tr::lng_payments_address_street1(),
.value = _information.shippingAddress.address1,
.validator = RangeLengthValidator(1, kMaxStreetSize),
});
- _street2 = add({
+ _street2 = add(Ui::FieldConfig{
.placeholder = tr::lng_payments_address_street2(),
.value = _information.shippingAddress.address2,
.validator = MaxLengthValidator(kMaxStreetSize),
});
- _city = add({
+ _city = add(Ui::FieldConfig{
.placeholder = tr::lng_payments_address_city(),
.value = _information.shippingAddress.city,
.validator = RangeLengthValidator(kMinCitySize, kMaxCitySize),
});
- _state = add({
+ _state = add(Ui::FieldConfig{
.placeholder = tr::lng_payments_address_state(),
.value = _information.shippingAddress.state,
});
- _country = add({
+ _country = add(Ui::FieldConfig{
.type = FieldType::Country,
.placeholder = tr::lng_payments_address_country(),
.value = _information.shippingAddress.countryIso2,
@@ -152,21 +152,21 @@ not_null<RpWidget*> EditInformation::setupContent() {
.showBox = showBox,
.defaultCountry = _information.defaultCountry,
});
- _postcode = add({
+ _postcode = add(Ui::FieldConfig{
.placeholder = tr::lng_payments_address_postcode(),
.value = _information.shippingAddress.postcode,
.validator = RangeLengthValidator(1, kMaxPostcodeSize),
});
}
if (_invoice.isNameRequested) {
- _name = add({
+ _name = add(Ui::FieldConfig{
.placeholder = tr::lng_payments_info_name(),
.value = _information.name,
.validator = RangeLengthValidator(1, kMaxNameSize),
});
}
if (_invoice.isEmailRequested) {
- _email = add({
+ _email = add(Ui::FieldConfig{
.type = FieldType::Email,
.placeholder = tr::lng_payments_info_email(),
.value = _information.email,
@@ -174,7 +174,7 @@ not_null<RpWidget*> EditInformation::setupContent() {
});
}
if (_invoice.isPhoneRequested) {
- _phone = add({
+ _phone = add(Ui::FieldConfig{
.type = FieldType::Phone,
.placeholder = tr::lng_payments_info_phone(),
.value = _information.phone,
diff --git a/Telegram/SourceFiles/settings/settings_chat.cpp b/Telegram/SourceFiles/settings/settings_chat.cpp
index a198b85..b077777 100644
--- a/Telegram/SourceFiles/settings/settings_chat.cpp
+++ b/Telegram/SourceFiles/settings/settings_chat.cpp
@@ -652,6 +652,8 @@ void ChooseFromFile(
auto image = Images::Read({
.path = result.paths.isEmpty() ? QString() : result.paths.front(),
.content = result.remoteContent,
+ .maxSize = QSize(),
+ .gzipSvg = false,
.forceOpaque = true,
}).image;
if (image.isNull() || image.width() <= 0 || image.height() <= 0) {
diff --git a/Telegram/SourceFiles/ui/boxes/edit_invite_link.cpp b/Telegram/SourceFiles/ui/boxes/edit_invite_link.cpp
index a9f27fe..704c94e 100644
--- a/Telegram/SourceFiles/ui/boxes/edit_invite_link.cpp
+++ b/Telegram/SourceFiles/ui/boxes/edit_invite_link.cpp
@@ -201,7 +201,7 @@ void EditInviteLinkBox(
: (state->expireValue < 0)
? (now - state->expireValue)
: (now + kDay);
- ChooseDateTimeBox(box, {
+ ChooseDateTimeBox(box, Ui::ChooseDateTimeBoxArgs{
.title = tr::lng_group_invite_expire_after(),
.submit = tr::lng_settings_save(),
.done = save,
diff --git a/Telegram/SourceFiles/ui/chat/chat_style.h b/Telegram/SourceFiles/ui/chat/chat_style.h
index 5c57bf1..22b5586 100644
--- a/Telegram/SourceFiles/ui/chat/chat_style.h
+++ b/Telegram/SourceFiles/ui/chat/chat_style.h
@@ -95,9 +95,9 @@ struct ChatPaintContext {
const BubblePattern *bubblesPattern = nullptr;
QRect viewport;
QRect clip;
+ crl::time now = 0;
TextSelection selection;
bool outbg = false;
- crl::time now = 0;
void translate(int x, int y) {
viewport.translate(x, y);
diff --git a/Telegram/SourceFiles/ui/chat/chat_theme.cpp b/Telegram/SourceFiles/ui/chat/chat_theme.cpp
index 52d87b7..4e056dd 100644
--- a/Telegram/SourceFiles/ui/chat/chat_theme.cpp
+++ b/Telegram/SourceFiles/ui/chat/chat_theme.cpp
@@ -383,11 +383,11 @@ style::colorizer ChatTheme::bubblesAccentColorizer(
value.getHsv(&hue, &saturation, &lightness);
return style::colorizer::Color{ hue, saturation, lightness };
};
- return {
- .hueThreshold = 255,
- .was = color(_palette->msgFileOutBg()->c),
- .now = color(accent),
- };
+ style::colorizer result;
+ result.hueThreshold = 255;
+ result.was = color(_palette->msgFileOutBg()->c);
+ result.now = color(accent);
+ return result;
}
void ChatTheme::set(const style::color &my, const QColor &color) {
diff --git a/Telegram/SourceFiles/ui/chat/choose_theme_controller.cpp b/Telegram/SourceFiles/ui/chat/choose_theme_controller.cpp
index beadbd4..f19653c 100644
--- a/Telegram/SourceFiles/ui/chat/choose_theme_controller.cpp
+++ b/Telegram/SourceFiles/ui/chat/choose_theme_controller.cpp
@@ -504,12 +504,13 @@ void ChooseThemeController::fill(
_cachingLifetime.destroy();
const auto old = base::take(_entries);
auto x = skip * 2;
- _entries.push_back({
- .preview = GenerateEmptyPreview(),
- .emoji = Ui::Emoji::Find(QString::fromUtf8("\xe2\x9d\x8c")),
- .geometry = QRect(QPoint(x, skip), single),
- .chosen = (_chosen == kDisableElement.utf16()),
- });
+
+ ChooseThemeController::Entry entry;
+ entry.preview = GenerateEmptyPreview();
+ entry.emoji = Ui::Emoji::Find(QString::fromUtf8("\xe2\x9d\x8c"));
+ entry.geometry = QRect(QPoint(x, skip), single);
+ entry.chosen = (_chosen == kDisableElement.utf16());
+ _entries.push_back(entry);
Assert(_entries.front().emoji != nullptr);
style::PaletteChanged(
) | rpl::start_with_next([=] {
@@ -525,12 +526,14 @@ void ChooseThemeController::fill(
const auto &used = dark ? theme.dark : theme.light;
const auto id = used.id;
const auto isChosen = (_chosen == emoji->text());
- _entries.push_back({
- .id = id,
- .emoji = emoji,
- .geometry = QRect(QPoint(x, skip), single),
- .chosen = isChosen,
- });
+
+ ChooseThemeController::Entry entry2;
+ entry2.id = id;
+ entry2.emoji = emoji;
+ entry2.geometry = QRect(QPoint(x, skip), single);
+ entry2.chosen = isChosen;
+ _entries.push_back(entry2);
+
_controller->cachedChatThemeValue(
used
) | rpl::filter([=](const std::shared_ptr<ChatTheme> &data) {
diff --git a/Telegram/SourceFiles/ui/toasts/common_toasts.h b/Telegram/SourceFiles/ui/toasts/common_toasts.h
index 7384c0a..12d4e17 100644
--- a/Telegram/SourceFiles/ui/toasts/common_toasts.h
+++ b/Telegram/SourceFiles/ui/toasts/common_toasts.h
@@ -16,9 +16,9 @@ class Instance;
} // namespace Toast
struct MultilineToastArgs {
- QWidget *parentOverride = nullptr;
TextWithEntities text;
crl::time duration = 0;
+ QWidget *parentOverride = nullptr;
};
base::weak_ptr<Toast::Instance> ShowMultilineToast(
diff --git a/Telegram/SourceFiles/ui/widgets/separate_panel.cpp b/Telegram/SourceFiles/ui/widgets/separate_panel.cpp
index ccc7559..2b37bc2 100644
--- a/Telegram/SourceFiles/ui/widgets/separate_panel.cpp
+++ b/Telegram/SourceFiles/ui/widgets/separate_panel.cpp
@@ -273,9 +273,9 @@ void SeparatePanel::showBox(
}
void SeparatePanel::showToast(const TextWithEntities &text) {
- Ui::ShowMultilineToast({
- .parentOverride = this,
+ Ui::ShowMultilineToast(Ui::MultilineToastArgs{
.text = text,
+ .parentOverride = this,
});
}
diff --git a/Telegram/SourceFiles/window/notifications_manager_default.cpp b/Telegram/SourceFiles/window/notifications_manager_default.cpp
index bfa2f5e..9f02356 100644
--- a/Telegram/SourceFiles/window/notifications_manager_default.cpp
+++ b/Telegram/SourceFiles/window/notifications_manager_default.cpp
@@ -806,7 +806,9 @@ void Notification::updateNotifyDisplay() {
p.setFont(st::dialogsTextFont);
const auto text = _item
? _item->toPreview({
+ .existing = nullptr,
.hideSender = reminder,
+ .hideCaption = false,
.generateImages = false,
}).text
: ((!_author.isEmpty()
diff --git a/Telegram/SourceFiles/window/themes/window_theme.cpp b/Telegram/SourceFiles/window/themes/window_theme.cpp
index affb0a0..2e1b28e 100644
--- a/Telegram/SourceFiles/window/themes/window_theme.cpp
+++ b/Telegram/SourceFiles/window/themes/window_theme.cpp
@@ -324,7 +324,10 @@ bool LoadTheme(
return false;
}
auto background = Images::Read({
+ .path = QString(),
.content = backgroundContent,
+ .maxSize = QSize(),
+ .gzipSvg = false,
.forceOpaque = true,
}).image;
if (background.isNull()) {
diff --git a/Telegram/SourceFiles/window/themes/window_theme_editor.cpp b/Telegram/SourceFiles/window/themes/window_theme_editor.cpp
index 8ef0714..e904511 100644
--- a/Telegram/SourceFiles/window/themes/window_theme_editor.cpp
+++ b/Telegram/SourceFiles/window/themes/window_theme_editor.cpp
@@ -792,7 +792,10 @@ void Editor::importTheme() {
_inner->recreateRows();
updateControlsGeometry();
auto image = Images::Read({
+ .path = QString(),
.content = parsed.background,
+ .maxSize = QSize(),
+ .gzipSvg = false,
.forceOpaque = true,
}).image;
if (!image.isNull() && !image.size().isEmpty()) {
--
2.30.2

View File

@@ -1,6 +1,6 @@
From 5c5fdc0c815ede9ac87f2b9151604d4b886b104e Mon Sep 17 00:00:00 2001 From d99bac8566bde4de3b22a4b1bc55eb3104f9ee84 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com> From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Sat, 9 Oct 2021 13:51:20 +1000 Date: Sat, 6 Nov 2021 22:22:40 +1000
Subject: Add Haiku support Subject: Add Haiku support

View File

@@ -1,14 +1,14 @@
From 65240913d72e70aa9652dd74fd2d3e981fb209f0 Mon Sep 17 00:00:00 2001 From 4b425710c606b47a1896a633c6cf8564525beb26 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com> From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Sat, 9 Oct 2021 13:52:13 +1000 Date: Sat, 6 Nov 2021 23:11:09 +1000
Subject: Add Haiku support Subject: Add Haiku support
diff --git a/Telegram/CMakeLists.txt b/Telegram/CMakeLists.txt diff --git a/Telegram/CMakeLists.txt b/Telegram/CMakeLists.txt
index cb92894..d72fb8b 100644 index 44e5d26..6055d91 100644
--- a/Telegram/CMakeLists.txt --- a/Telegram/CMakeLists.txt
+++ b/Telegram/CMakeLists.txt +++ b/Telegram/CMakeLists.txt
@@ -94,6 +94,15 @@ PRIVATE @@ -95,6 +95,15 @@ PRIVATE
desktop-app::external_xxhash desktop-app::external_xxhash
) )
@@ -24,7 +24,7 @@ index cb92894..d72fb8b 100644
target_precompile_headers(Telegram PRIVATE ${src_loc}/stdafx.h) target_precompile_headers(Telegram PRIVATE ${src_loc}/stdafx.h)
nice_target_sources(Telegram ${src_loc} nice_target_sources(Telegram ${src_loc}
PRIVATE PRIVATE
@@ -1189,6 +1198,16 @@ else() @@ -1215,6 +1224,16 @@ else()
) )
endif() endif()
@@ -41,7 +41,7 @@ index cb92894..d72fb8b 100644
if (DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION) if (DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
remove_target_sources(Telegram ${src_loc} remove_target_sources(Telegram ${src_loc}
platform/linux/linux_wayland_integration.cpp platform/linux/linux_wayland_integration.cpp
@@ -1323,7 +1342,7 @@ if (build_macstore) @@ -1360,7 +1379,7 @@ if (build_macstore)
else() else()
set(bundle_identifier "com.tdesktop.Telegram$<$<CONFIG:Debug>:Debug>") set(bundle_identifier "com.tdesktop.Telegram$<$<CONFIG:Debug>:Debug>")
set(bundle_entitlements "Telegram.entitlements") set(bundle_entitlements "Telegram.entitlements")
@@ -71,7 +71,7 @@ index 0fdaf4c..ea0f606 100644
if (const auto strong = weak.get()) { if (const auto strong = weak.get()) {
showBox(Box(SettingsBox, strong)); showBox(Box(SettingsBox, strong));
diff --git a/Telegram/SourceFiles/calls/group/calls_group_panel.cpp b/Telegram/SourceFiles/calls/group/calls_group_panel.cpp diff --git a/Telegram/SourceFiles/calls/group/calls_group_panel.cpp b/Telegram/SourceFiles/calls/group/calls_group_panel.cpp
index c71c522..2c3d1dc 100644 index 870d0c6..581c91f 100644
--- a/Telegram/SourceFiles/calls/group/calls_group_panel.cpp --- a/Telegram/SourceFiles/calls/group/calls_group_panel.cpp
+++ b/Telegram/SourceFiles/calls/group/calls_group_panel.cpp +++ b/Telegram/SourceFiles/calls/group/calls_group_panel.cpp
@@ -1935,7 +1935,9 @@ void Panel::updateButtonsGeometry() { @@ -1935,7 +1935,9 @@ void Panel::updateButtonsGeometry() {
@@ -156,10 +156,10 @@ index 0437363..7685881 100644
if (internal::ShowXDPOpenWithDialog(filepath)) { if (internal::ShowXDPOpenWithDialog(filepath)) {
return true; return true;
diff --git a/Telegram/SourceFiles/platform/linux/main_window_linux.cpp b/Telegram/SourceFiles/platform/linux/main_window_linux.cpp diff --git a/Telegram/SourceFiles/platform/linux/main_window_linux.cpp b/Telegram/SourceFiles/platform/linux/main_window_linux.cpp
index e7cce3a..e268de6 100644 index 54f2c94..41d942c 100644
--- a/Telegram/SourceFiles/platform/linux/main_window_linux.cpp --- a/Telegram/SourceFiles/platform/linux/main_window_linux.cpp
+++ b/Telegram/SourceFiles/platform/linux/main_window_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/main_window_linux.cpp
@@ -902,11 +902,17 @@ bool MainWindow::hasTrayIcon() const { @@ -900,11 +900,17 @@ bool MainWindow::hasTrayIcon() const {
bool MainWindow::isActiveForTrayMenu() { bool MainWindow::isActiveForTrayMenu() {
updateIsActive(); updateIsActive();
@@ -177,18 +177,18 @@ index e7cce3a..e268de6 100644
} }
void MainWindow::psTrayMenuUpdated() { void MainWindow::psTrayMenuUpdated() {
@@ -938,7 +944,9 @@ void MainWindow::psSetupTrayIcon() { @@ -943,6 +949,10 @@ void MainWindow::psSetupTrayIcon() {
if (!trayIcon) { }
trayIcon = new QSystemTrayIcon(this);
trayIcon->setIcon(TrayIconGen(counter, muted)); trayIcon->setIcon(TrayIconGen(counter, muted));
-
+#ifdef Q_OS_HAIKU +#ifdef Q_OS_HAIKU
+ trayIcon->setContextMenu(trayIconMenu); + trayIcon->setContextMenu(trayIconMenu);
+#endif +#endif
+
attachToTrayIcon(trayIcon); attachToTrayIcon(trayIcon);
} }
updateIconCounters(); updateIconCounters();
@@ -1030,8 +1038,10 @@ void MainWindow::updateIconCounters() { @@ -1033,8 +1043,10 @@ void MainWindow::updateIconCounters() {
} }
void MainWindow::initTrayMenuHook() { void MainWindow::initTrayMenuHook() {
@@ -201,10 +201,10 @@ index e7cce3a..e268de6 100644
void MainWindow::createGlobalMenu() { void MainWindow::createGlobalMenu() {
diff --git a/Telegram/SourceFiles/platform/linux/notifications_manager_haiku.cpp b/Telegram/SourceFiles/platform/linux/notifications_manager_haiku.cpp diff --git a/Telegram/SourceFiles/platform/linux/notifications_manager_haiku.cpp b/Telegram/SourceFiles/platform/linux/notifications_manager_haiku.cpp
new file mode 100644 new file mode 100644
index 0000000..1cabfe2 index 0000000..8605b28
--- /dev/null --- /dev/null
+++ b/Telegram/SourceFiles/platform/linux/notifications_manager_haiku.cpp +++ b/Telegram/SourceFiles/platform/linux/notifications_manager_haiku.cpp
@@ -0,0 +1,266 @@ @@ -0,0 +1,268 @@
+/* +/*
+This file is part of Telegram Desktop for Haiku, +This file is part of Telegram Desktop for Haiku,
+ +
@@ -453,6 +453,8 @@ index 0000000..1cabfe2
+ +
+void Manager::doClearAllFast() { } +void Manager::doClearAllFast() { }
+ +
+void Manager::doClearFromItem(not_null<HistoryItem*> item) { }
+
+void Manager::doClearFromHistory(not_null<History*> history) { } +void Manager::doClearFromHistory(not_null<History*> history) { }
+ +
+void Manager::doClearFromSession(not_null<Main::Session*> session) { } +void Manager::doClearFromSession(not_null<Main::Session*> session) { }
@@ -472,10 +474,10 @@ index 0000000..1cabfe2
+} // namespace Notifications +} // namespace Notifications
+} // namespace Platform +} // namespace Platform
diff --git a/Telegram/SourceFiles/platform/linux/specific_linux.cpp b/Telegram/SourceFiles/platform/linux/specific_linux.cpp diff --git a/Telegram/SourceFiles/platform/linux/specific_linux.cpp b/Telegram/SourceFiles/platform/linux/specific_linux.cpp
index 9c1254d..3258edf 100644 index e81b144..8054a73 100644
--- a/Telegram/SourceFiles/platform/linux/specific_linux.cpp --- a/Telegram/SourceFiles/platform/linux/specific_linux.cpp
+++ b/Telegram/SourceFiles/platform/linux/specific_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/specific_linux.cpp
@@ -38,6 +38,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL @@ -37,6 +37,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "webview/platform/linux/webview_linux_webkit2gtk.h" #include "webview/platform/linux/webview_linux_webkit2gtk.h"
#endif // !DESKTOP_APP_DISABLE_WEBKITGTK #endif // !DESKTOP_APP_DISABLE_WEBKITGTK
@@ -485,8 +487,8 @@ index 9c1254d..3258edf 100644
+ +
#include <QtWidgets/QApplication> #include <QtWidgets/QApplication>
#include <QtWidgets/QStyle> #include <QtWidgets/QStyle>
#include <QtWidgets/QDesktopWidget> #include <QtCore/QStandardPaths>
@@ -49,7 +53,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL @@ -47,7 +51,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#ifdef Q_OS_FREEBSD #ifdef Q_OS_FREEBSD
#include <malloc_np.h> #include <malloc_np.h>
@@ -495,25 +497,82 @@ index 9c1254d..3258edf 100644
#include <jemalloc/jemalloc.h> #include <jemalloc/jemalloc.h>
#endif // Q_OS_FREEBSD #endif // Q_OS_FREEBSD
@@ -591,7 +595,7 @@ void psActivateProcess(uint64 pid) { @@ -73,8 +77,36 @@ using UiWaylandIntegration = Ui::Platform::WaylandIntegration;
using Platform::internal::WaylandIntegration;
namespace Platform {
+
namespace { namespace {
-#ifdef __HAIKU__
+#ifdef Q_OS_HAIKU +#ifdef Q_OS_HAIKU
void HaikuAutostart(bool start) { +void HaikuAutostart(bool start) {
const auto home = QDir::homePath(); + const auto home = QDir::homePath();
if (home.isEmpty()) { + if (home.isEmpty()) {
@@ -616,7 +620,7 @@ void HaikuAutostart(bool start) { + return;
file.remove(); + }
} +
} + QFile file(home + "/config/settings/boot/launch/telegram-desktop");
-#endif // __HAIKU__ + if (start) {
+ if (file.open(QIODevice::WriteOnly | QIODevice::Text)) {
+ QTextStream out(&file);
+ out
+ << "#!/bin/bash" << Qt::endl
+ << "cd /system/apps" << Qt::endl
+ << "./Telegram -autostart" << " &" << Qt::endl;
+ file.close();
+ file.setPermissions(file.permissions()
+ | QFileDevice::ExeOwner
+ | QFileDevice::ExeGroup
+ | QFileDevice::ExeOther);
+ }
+ } else {
+ file.remove();
+ }
+}
+#endif // Q_OS_HAIKU +#endif // Q_OS_HAIKU
+
constexpr auto kDesktopFile = ":/misc/telegramdesktop.desktop"_cs;
constexpr auto kIconName = "telegram"_cs;
constexpr auto kDarkColorLimit = 192;
@@ -624,37 +656,6 @@ void psActivateProcess(uint64 pid) {
// objc_activateProgram();
}
} // namespace -namespace {
-
@@ -633,8 +637,11 @@ QString psAppDataPath() { -#ifdef __HAIKU__
-void HaikuAutostart(bool start) {
- const auto home = QDir::homePath();
- if (home.isEmpty()) {
- return;
- }
-
- QFile file(home + "/config/settings/boot/launch/telegram-desktop");
- if (start) {
- if (file.open(QIODevice::WriteOnly | QIODevice::Text)) {
- QTextStream out(&file);
- out
- << "#!/bin/bash" << Qt::endl
- << "cd /system/apps" << Qt::endl
- << "./Telegram -autostart" << " &" << Qt::endl;
- file.close();
- file.setPermissions(file.permissions()
- | QFileDevice::ExeOwner
- | QFileDevice::ExeGroup
- | QFileDevice::ExeOther);
- }
- } else {
- file.remove();
- }
-}
-#endif // __HAIKU__
-
-} // namespace
-
QString psAppDataPath() {
// Previously we used ~/.TelegramDesktop, so look there first.
// If we find data there, we should still use it.
@@ -668,8 +669,11 @@ QString psAppDataPath() {
return oldPath; return oldPath;
} }
} }
@@ -526,7 +585,7 @@ index 9c1254d..3258edf 100644
} }
void psDoCleanup() { void psDoCleanup() {
@@ -662,8 +669,9 @@ namespace Platform { @@ -697,8 +701,9 @@ namespace Platform {
void start() { void start() {
auto backgroundThread = true; auto backgroundThread = true;
@@ -537,7 +596,7 @@ index 9c1254d..3258edf 100644
// Prevent any later calls into setlocale() by Qt // Prevent any later calls into setlocale() by Qt
QCoreApplicationPrivate::initLocale(); QCoreApplicationPrivate::initLocale();
@@ -795,7 +803,7 @@ bool OpenSystemSettings(SystemSettingsType type) { @@ -830,7 +835,7 @@ bool OpenSystemSettings(SystemSettingsType type) {
} else if (DesktopEnvironment::IsMATE()) { } else if (DesktopEnvironment::IsMATE()) {
add("mate-volume-control"); add("mate-volume-control");
} }
@@ -612,7 +671,7 @@ index 0000000..3a57ce2
+ +
+#endif +#endif
diff --git a/Telegram/lib_base/base/platform/linux/base_file_utilities_linux.cpp b/Telegram/lib_base/base/platform/linux/base_file_utilities_linux.cpp diff --git a/Telegram/lib_base/base/platform/linux/base_file_utilities_linux.cpp b/Telegram/lib_base/base/platform/linux/base_file_utilities_linux.cpp
index b3ba5f3..a481e3b 100644 index aa65e5e..60b761f 100644
--- a/Telegram/lib_base/base/platform/linux/base_file_utilities_linux.cpp --- a/Telegram/lib_base/base/platform/linux/base_file_utilities_linux.cpp
+++ b/Telegram/lib_base/base/platform/linux/base_file_utilities_linux.cpp +++ b/Telegram/lib_base/base/platform/linux/base_file_utilities_linux.cpp
@@ -27,8 +27,58 @@ @@ -27,8 +27,58 @@
@@ -743,10 +802,10 @@ index 20aed5e..61d46fc 100644
#include <QtCore/QProcess> #include <QtCore/QProcess>
#include <QtGui/QWindow> #include <QtGui/QWindow>
diff --git a/Telegram/lib_ui/ui/platform/linux/ui_utility_linux.cpp b/Telegram/lib_ui/ui/platform/linux/ui_utility_linux.cpp diff --git a/Telegram/lib_ui/ui/platform/linux/ui_utility_linux.cpp b/Telegram/lib_ui/ui/platform/linux/ui_utility_linux.cpp
index 87c3c04..9d1ef4f 100644 index 2a7fb2d..8eaae4c 100644
--- a/Telegram/lib_ui/ui/platform/linux/ui_utility_linux.cpp --- a/Telegram/lib_ui/ui/platform/linux/ui_utility_linux.cpp
+++ b/Telegram/lib_ui/ui/platform/linux/ui_utility_linux.cpp +++ b/Telegram/lib_ui/ui/platform/linux/ui_utility_linux.cpp
@@ -612,7 +612,7 @@ TitleControls::Layout TitleControlsLayout() { @@ -609,7 +609,7 @@ TitleControls::Layout TitleControlsLayout() {
} }
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION #endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
@@ -755,7 +814,7 @@ index 87c3c04..9d1ef4f 100644
return TitleControls::Layout{ return TitleControls::Layout{
.left = { .left = {
TitleControls::Control::Close, TitleControls::Control::Close,
@@ -622,7 +622,7 @@ TitleControls::Layout TitleControlsLayout() { @@ -619,7 +619,7 @@ TitleControls::Layout TitleControlsLayout() {
TitleControls::Control::Maximize, TitleControls::Control::Maximize,
} }
}; };
@@ -764,7 +823,7 @@ index 87c3c04..9d1ef4f 100644
return TitleControls::Layout{ return TitleControls::Layout{
.right = { .right = {
TitleControls::Control::Minimize, TitleControls::Control::Minimize,
@@ -630,7 +630,7 @@ TitleControls::Layout TitleControlsLayout() { @@ -627,7 +627,7 @@ TitleControls::Layout TitleControlsLayout() {
TitleControls::Control::Close, TitleControls::Control::Close,
} }
}; };
@@ -806,7 +865,7 @@ index 092b667..204e259 100644
#include "webrtc/webrtc_create_adm.h" #include "webrtc/webrtc_create_adm.h"
diff --git a/cmake/external/CMakeLists.txt b/cmake/external/CMakeLists.txt diff --git a/cmake/external/CMakeLists.txt b/cmake/external/CMakeLists.txt
index 58ba80a..fe98397 100644 index 1460cf9..624e349 100644
--- a/cmake/external/CMakeLists.txt --- a/cmake/external/CMakeLists.txt
+++ b/cmake/external/CMakeLists.txt +++ b/cmake/external/CMakeLists.txt
@@ -37,7 +37,7 @@ if (add_hunspell_library) @@ -37,7 +37,7 @@ if (add_hunspell_library)
@@ -819,10 +878,10 @@ index 58ba80a..fe98397 100644
endif() endif()
add_checked_subdirectory(jpeg) add_checked_subdirectory(jpeg)
diff --git a/cmake/options_linux.cmake b/cmake/options_linux.cmake diff --git a/cmake/options_linux.cmake b/cmake/options_linux.cmake
index 24f0e0e..d746f55 100644 index 436266d..68dced3 100644
--- a/cmake/options_linux.cmake --- a/cmake/options_linux.cmake
+++ b/cmake/options_linux.cmake +++ b/cmake/options_linux.cmake
@@ -52,10 +52,12 @@ if (DESKTOP_APP_SPECIAL_TARGET) @@ -60,10 +60,12 @@ if (DESKTOP_APP_SPECIAL_TARGET)
target_link_options(common_options INTERFACE $<IF:$<CONFIG:Debug>,,-g -flto -fuse-linker-plugin>) target_link_options(common_options INTERFACE $<IF:$<CONFIG:Debug>,,-g -flto -fuse-linker-plugin>)
endif() endif()

View File

@@ -5,7 +5,7 @@ COPYRIGHT="2013-2021 Telegram"
LICENSE="GNU GPL v3" LICENSE="GNU GPL v3"
REVISION="1" REVISION="1"
SOURCE_URI="https://github.com/telegramdesktop/tdesktop/releases/download/v$portVersion/tdesktop-$portVersion-full.tar.gz" SOURCE_URI="https://github.com/telegramdesktop/tdesktop/releases/download/v$portVersion/tdesktop-$portVersion-full.tar.gz"
CHECKSUM_SHA256="569555194f8c8396ee21de44971709dc0d331fe9b3d99cce49977d6dd19fcecf" CHECKSUM_SHA256="f9b82a2133f8811ba465a54c70335b14c281eefe55668a7670522f3c5719fb9d"
SOURCE_FILENAME="tdesktop-$portVersion-full.tar.gz" SOURCE_FILENAME="tdesktop-$portVersion-full.tar.gz"
SOURCE_DIR="tdesktop-$portVersion-full" SOURCE_DIR="tdesktop-$portVersion-full"
srcGitRev_2="2b383fe05f8ae78ac99470b9a2b9ea22b3ee5a92" srcGitRev_2="2b383fe05f8ae78ac99470b9a2b9ea22b3ee5a92"
@@ -15,9 +15,7 @@ CHECKSUM_SHA256_2="613e7e357518739e1f7d035337f37c344b248283fd4d916ddc95df73c2ff8
PATCHES=" PATCHES="
libtgvoip-$portVersion.patchset libtgvoip-$portVersion.patchset
telegram_desktop-$portVersion.patchset telegram_desktop-$portVersion.patchset
gcc8fixes-$portVersion.patchset
" "
ADDITIONAL_FILES="telegram_desktop.rdef.in" ADDITIONAL_FILES="telegram_desktop.rdef.in"
ARCHITECTURES="all !x86_gcc2" ARCHITECTURES="all !x86_gcc2"
@@ -47,10 +45,12 @@ REQUIRES="
lib:libminizip$secondaryArchSuffix lib:libminizip$secondaryArchSuffix
lib:libopenal$secondaryArchSuffix lib:libopenal$secondaryArchSuffix
lib:libopus$secondaryArchSuffix lib:libopus$secondaryArchSuffix
lib:libQt5Core$secondaryArchSuffix lib:libQt6Core$secondaryArchSuffix
lib:libQt5Gui$secondaryArchSuffix lib:libQt6Core5Compat$secondaryArchSuffix
lib:libQt5Network$secondaryArchSuffix lib:libQt6Gui$secondaryArchSuffix
lib:libQt5Widgets$secondaryArchSuffix lib:libQt6Network$secondaryArchSuffix
lib:libQt6Svg$secondaryArchSuffix
lib:libQt6Widgets$secondaryArchSuffix
lib:librnnoise$secondaryArchSuffix lib:librnnoise$secondaryArchSuffix
lib:libsigc_2.0$secondaryArchSuffix lib:libsigc_2.0$secondaryArchSuffix
lib:libswresample$secondaryArchSuffix lib:libswresample$secondaryArchSuffix
@@ -61,6 +61,7 @@ REQUIRES="
BUILD_REQUIRES=" BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel haiku${secondaryArchSuffix}_devel
qt6_tools${secondaryArchSuffix}_devel
devel:libabsl_strings$secondaryArchSuffix devel:libabsl_strings$secondaryArchSuffix
devel:libavcodec$secondaryArchSuffix devel:libavcodec$secondaryArchSuffix
devel:libavformat$secondaryArchSuffix devel:libavformat$secondaryArchSuffix
@@ -77,10 +78,12 @@ BUILD_REQUIRES="
devel:libopenal$secondaryArchSuffix devel:libopenal$secondaryArchSuffix
devel:libopus$secondaryArchSuffix devel:libopus$secondaryArchSuffix
devel:libqrcodegen$secondaryArchSuffix devel:libqrcodegen$secondaryArchSuffix
devel:libQt5Core$secondaryArchSuffix devel:libQt6Core$secondaryArchSuffix
devel:libQt5Gui$secondaryArchSuffix devel:libQt6Core5Compat$secondaryArchSuffix
devel:libQt5Network$secondaryArchSuffix devel:libQt6Gui$secondaryArchSuffix
devel:libQt5Widgets$secondaryArchSuffix devel:libQt6Network$secondaryArchSuffix
devel:libQt6Svg$secondaryArchSuffix
devel:libQt6Widgets$secondaryArchSuffix
devel:librapidjson$secondaryArchSuffix devel:librapidjson$secondaryArchSuffix
devel:librnnoise$secondaryArchSuffix devel:librnnoise$secondaryArchSuffix
devel:libswresample$secondaryArchSuffix devel:libswresample$secondaryArchSuffix
@@ -94,7 +97,6 @@ BUILD_PREREQUIRES="
cmd:cmake cmd:cmake
cmd:gawk cmd:gawk
cmd:gcc$secondaryArchSuffix cmd:gcc$secondaryArchSuffix
cmd:lrelease$secondaryArchSuffix >= 5
cmd:make cmd:make
cmd:pkg_config$secondaryArchSuffix cmd:pkg_config$secondaryArchSuffix
cmd:python cmd:python
@@ -128,6 +130,7 @@ BUILD()
cmake .. \ cmake .. \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
-DDESKTOP_APP_QT6=ON \
-DTDESKTOP_API_TEST=OFF \ -DTDESKTOP_API_TEST=OFF \
-DTDESKTOP_DISABLE_GTK_INTEGRATION=ON \ -DTDESKTOP_DISABLE_GTK_INTEGRATION=ON \
-DDESKTOP_APP_DISABLE_CRASH_REPORTS=ON \ -DDESKTOP_APP_DISABLE_CRASH_REPORTS=ON \