Update to 2.1.13
PR: 247527 Submitted by: Volodymyr Kostyrko <arcade@b1t.name> Approved by: Henry Hu <henry.hu.sh@gmail.com (maintainer)
This commit is contained in:
parent
560100738a
commit
592772e9c3
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=540676
@ -1,7 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= telegram-desktop
|
||||
DISTVERSION= 2.1.7
|
||||
DISTVERSION= 2.1.13
|
||||
CATEGORIES= net-im
|
||||
MASTER_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/releases/download/v${DISTVERSION}/
|
||||
DISTNAME= tdesktop-${DISTVERSION}-full
|
||||
|
@ -1,3 +1,3 @@
|
||||
TIMESTAMP = 1590358574
|
||||
SHA256 (tdesktop-2.1.7-full.tar.gz) = c944b07f1a7d600a32cea9e4ce45b4954fe0d18176a7491c2f1e98f3425cca62
|
||||
SIZE (tdesktop-2.1.7-full.tar.gz) = 36509059
|
||||
TIMESTAMP = 1593031017
|
||||
SHA256 (tdesktop-2.1.13-full.tar.gz) = d1653a386107836a0808c3d828341ad54aa962f167d8b2e17430d8aedc710357
|
||||
SIZE (tdesktop-2.1.13-full.tar.gz) = 36549505
|
||||
|
@ -1,11 +0,0 @@
|
||||
--- Telegram/SourceFiles/_other/packer.cpp.orig 2019-07-07 13:34:35 UTC
|
||||
+++ Telegram/SourceFiles/_other/packer.cpp
|
||||
@@ -254,7 +254,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
QByteArray inner = f.readAll();
|
||||
stream << name << quint32(inner.size()) << inner;
|
||||
-#if defined Q_OS_MAC || defined Q_OS_LINUX
|
||||
+#if defined Q_OS_MAC || defined Q_OS_LINUX || defined Q_OS_FREEBSD
|
||||
stream << (QFileInfo(fullName).isExecutable() ? true : false);
|
||||
#endif
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
--- Telegram/SourceFiles/core/launcher.cpp.orig 2020-05-24 07:59:19 UTC
|
||||
+++ Telegram/SourceFiles/core/launcher.cpp
|
||||
@@ -275,7 +275,7 @@ void Launcher::init() {
|
||||
|
||||
QApplication::setApplicationName(qsl("TelegramDesktop"));
|
||||
|
||||
-#if defined(Q_OS_LINUX) && QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
|
||||
+#if (defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD)) && QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
|
||||
QApplication::setDesktopFileName(Platform::GetLauncherFilename());
|
||||
#endif
|
||||
|
@ -11,12 +11,12 @@
|
||||
if (!QFile(readyFilePath).exists() || cExeName().isEmpty()) {
|
||||
if (QDir(cWorkingDir() + qsl("tupdates/ready")).exists() || QDir(cWorkingDir() + qsl("tupdates/temp")).exists()) {
|
||||
@@ -1512,6 +1515,9 @@ bool checkReadyUpdate() {
|
||||
#elif defined Q_OS_LINUX // Q_OS_MAC
|
||||
#elif defined Q_OS_UNIX // Q_OS_MAC
|
||||
QString curUpdater = (cExeDir() + qsl("Updater"));
|
||||
QFileInfo updater(cWorkingDir() + qsl("tupdates/temp/Updater"));
|
||||
+#elif defined Q_OS_FREEBSD
|
||||
+ QString curUpdater;
|
||||
+ QFileInfo updater;
|
||||
#endif // Q_OS_LINUX
|
||||
#endif // Q_OS_UNIX
|
||||
if (!updater.exists()) {
|
||||
QFileInfo current(curUpdater);
|
||||
|
@ -1,18 +0,0 @@
|
||||
--- Telegram/SourceFiles/history/admin_log/history_admin_log_inner.cpp.orig 2020-05-24 07:59:19 UTC
|
||||
+++ Telegram/SourceFiles/history/admin_log/history_admin_log_inner.cpp
|
||||
@@ -1458,13 +1458,13 @@ void InnerWidget::mouseActionFinish(const QPoint &scre
|
||||
_mouseSelectType = TextSelectType::Letters;
|
||||
//_widget->noSelectingScroll(); // TODO
|
||||
|
||||
-#if defined Q_OS_LINUX32 || defined Q_OS_LINUX64
|
||||
+#if defined Q_OS_LINUX32 || defined Q_OS_LINUX64 || defined Q_OS_FREEBSD
|
||||
if (_selectedItem && _selectedText.from != _selectedText.to) {
|
||||
TextUtilities::SetClipboardText(
|
||||
_selectedItem->selectedText(_selectedText),
|
||||
QClipboard::Selection);
|
||||
}
|
||||
-#endif // Q_OS_LINUX32 || Q_OS_LINUX64
|
||||
+#endif // Q_OS_LINUX32 || Q_OS_LINUX64 || Q_OS_FREEBSD
|
||||
}
|
||||
|
||||
void InnerWidget::updateSelected() {
|
@ -1,20 +0,0 @@
|
||||
--- Telegram/SourceFiles/history/history_inner_widget.cpp.orig 2020-05-24 07:59:19 UTC
|
||||
+++ Telegram/SourceFiles/history/history_inner_widget.cpp
|
||||
@@ -1421,7 +1421,7 @@ void HistoryInner::mouseActionFinish(
|
||||
_widget->noSelectingScroll();
|
||||
_widget->updateTopBarSelection();
|
||||
|
||||
-#if defined Q_OS_LINUX32 || defined Q_OS_LINUX64
|
||||
+#if defined Q_OS_LINUX32 || defined Q_OS_LINUX64 || defined Q_OS_FREEBSD
|
||||
if (!_selected.empty() && _selected.cbegin()->second != FullSelection) {
|
||||
const auto [item, selection] = *_selected.cbegin();
|
||||
if (const auto view = item->mainView()) {
|
||||
@@ -1430,7 +1430,7 @@ void HistoryInner::mouseActionFinish(
|
||||
QClipboard::Selection);
|
||||
}
|
||||
}
|
||||
-#endif // Q_OS_LINUX32 || Q_OS_LINUX64
|
||||
+#endif // Q_OS_LINUX32 || Q_OS_LINUX64 || Q_OS_FREEBSD
|
||||
}
|
||||
|
||||
void HistoryInner::mouseReleaseEvent(QMouseEvent *e) {
|
@ -1,20 +0,0 @@
|
||||
--- Telegram/SourceFiles/history/view/history_view_list_widget.cpp.orig 2020-05-24 07:59:19 UTC
|
||||
+++ Telegram/SourceFiles/history/view/history_view_list_widget.cpp
|
||||
@@ -2072,7 +2072,7 @@ void ListWidget::mouseActionFinish(
|
||||
_mouseSelectType = TextSelectType::Letters;
|
||||
//_widget->noSelectingScroll(); // #TODO select scroll
|
||||
|
||||
-#if defined Q_OS_LINUX32 || defined Q_OS_LINUX64
|
||||
+#if defined Q_OS_LINUX32 || defined Q_OS_LINUX64 || defined Q_OS_FREEBSD
|
||||
if (_selectedTextItem
|
||||
&& _selectedTextRange.from != _selectedTextRange.to) {
|
||||
if (const auto view = viewForItem(_selectedTextItem)) {
|
||||
@@ -2081,7 +2081,7 @@ void ListWidget::mouseActionFinish(
|
||||
QClipboard::Selection);
|
||||
}
|
||||
}
|
||||
-#endif // Q_OS_LINUX32 || Q_OS_LINUX64
|
||||
+#endif // Q_OS_LINUX32 || Q_OS_LINUX64 || Q_OS_FREEBSD
|
||||
}
|
||||
|
||||
void ListWidget::mouseActionUpdate() {
|
@ -1,41 +0,0 @@
|
||||
--- Telegram/SourceFiles/logs.cpp.orig 2020-05-24 07:59:19 UTC
|
||||
+++ Telegram/SourceFiles/logs.cpp
|
||||
@@ -343,7 +343,7 @@ void start(not_null<Core::Launcher*> launcher) {
|
||||
workingDirChosen = true;
|
||||
} else {
|
||||
|
||||
-#if defined Q_OS_MAC || defined Q_OS_LINUX
|
||||
+#if defined Q_OS_MAC || defined Q_OS_LINUX || defined Q_OS_FREEBSD
|
||||
|
||||
if (!cWorkingDir().isEmpty()) {
|
||||
// This value must come from TelegramForcePortable
|
||||
@@ -358,16 +358,16 @@ void start(not_null<Core::Launcher*> launcher) {
|
||||
}
|
||||
workingDirChosen = true;
|
||||
|
||||
-#if defined Q_OS_LINUX && !defined _DEBUG // fix first version
|
||||
+#if (defined Q_OS_LINUX || defined Q_OS_FREEBSD) && !defined _DEBUG // fix first version
|
||||
moveOldDataFrom = initialWorkingDir;
|
||||
-#endif // Q_OS_LINUX && !_DEBUG
|
||||
+#endif // (Q_OS_LINUX || Q_OS_FREEBSD) && !_DEBUG
|
||||
|
||||
-#elif defined Q_OS_WINRT // Q_OS_MAC || Q_OS_LINUX
|
||||
+#elif defined Q_OS_WINRT // Q_OS_MAC || Q_OS_LINUX || Q_OS_FREEBSD
|
||||
|
||||
cForceWorkingDir(psAppDataPath());
|
||||
workingDirChosen = true;
|
||||
|
||||
-#elif defined OS_WIN_STORE // Q_OS_MAC || Q_OS_LINUX || Q_OS_WINRT
|
||||
+#elif defined OS_WIN_STORE // Q_OS_MAC || Q_OS_LINUX || Q_OS_WINRT || Q_OS_FREEBSD
|
||||
|
||||
#ifdef _DEBUG
|
||||
cForceWorkingDir(cExeDir());
|
||||
@@ -385,7 +385,7 @@ void start(not_null<Core::Launcher*> launcher) {
|
||||
workingDirChosen = true;
|
||||
}
|
||||
|
||||
-#endif // Q_OS_MAC || Q_OS_LINUX || Q_OS_WINRT || OS_WIN_STORE
|
||||
+#endif // Q_OS_MAC || Q_OS_LINUX || Q_OS_WINRT || OS_WIN_STORE || Q_OS_FREEBSD
|
||||
|
||||
}
|
||||
|
@ -1,20 +0,0 @@
|
||||
--- Telegram/SourceFiles/platform/platform_audio.h.orig 2018-08-04 18:53:40 UTC
|
||||
+++ Telegram/SourceFiles/platform/platform_audio.h
|
||||
@@ -19,7 +19,7 @@ void DeInit();
|
||||
|
||||
// Platform dependent implementations.
|
||||
|
||||
-#if defined Q_OS_MAC || defined Q_OS_LINUX
|
||||
+#if defined Q_OS_MAC || defined Q_OS_LINUX || defined Q_OS_FREEBSD
|
||||
namespace Platform {
|
||||
namespace Audio {
|
||||
|
||||
@@ -31,6 +31,6 @@ inline void DeInit() {
|
||||
|
||||
} // namespace Audio
|
||||
} // namespace Platform
|
||||
-#elif defined Q_OS_WINRT || defined Q_OS_WIN // Q_OS_MAC || Q_OS_LINUX
|
||||
+#elif defined Q_OS_WINRT || defined Q_OS_WIN // Q_OS_MAC || Q_OS_LINUX || Q_OS_FREEBSD
|
||||
#include "platform/win/audio_win.h"
|
||||
-#endif // Q_OS_MAC || Q_OS_LINUX || Q_OS_WINRT || Q_OS_WIN
|
||||
+#endif // Q_OS_MAC || Q_OS_LINUX || Q_OS_WINRT || Q_OS_WIN || Q_OS_FREEBSD
|
@ -1,14 +0,0 @@
|
||||
--- Telegram/SourceFiles/platform/platform_file_utilities.h.orig 2020-05-24 07:59:19 UTC
|
||||
+++ Telegram/SourceFiles/platform/platform_file_utilities.h
|
||||
@@ -46,8 +46,8 @@ bool Get(
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
#include "platform/mac/file_utilities_mac.h"
|
||||
-#elif defined Q_OS_LINUX // Q_OS_MAC
|
||||
+#elif defined Q_OS_LINUX || defined Q_OS_FREEBSD // Q_OS_MAC
|
||||
#include "platform/linux/file_utilities_linux.h"
|
||||
-#elif defined Q_OS_WINRT || defined Q_OS_WIN // Q_OS_MAC || Q_OS_LINUX
|
||||
+#elif defined Q_OS_WINRT || defined Q_OS_WIN // Q_OS_MAC || Q_OS_LINUX || Q_OS_FREEBSD
|
||||
#include "platform/win/file_utilities_win.h"
|
||||
-#endif // Q_OS_MAC || Q_OS_LINUX || Q_OS_WINRT || Q_OS_WIN
|
||||
+#endif // Q_OS_MAC || Q_OS_LINUX || Q_OS_WINRT || Q_OS_WIN || Q_OS_FREEBSD
|
@ -1,14 +0,0 @@
|
||||
--- Telegram/SourceFiles/platform/platform_launcher.h.orig 2018-08-04 18:53:40 UTC
|
||||
+++ Telegram/SourceFiles/platform/platform_launcher.h
|
||||
@@ -23,8 +23,8 @@ namespace Platform {
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
#include "platform/mac/launcher_mac.h"
|
||||
-#elif defined Q_OS_LINUX // Q_OS_MAC
|
||||
+#elif defined Q_OS_LINUX || defined Q_OS_FREEBSD // Q_OS_MAC
|
||||
#include "platform/linux/launcher_linux.h"
|
||||
-#elif defined Q_OS_WINRT || defined Q_OS_WIN // Q_OS_MAC || Q_OS_LINUX
|
||||
+#elif defined Q_OS_WINRT || defined Q_OS_WIN // Q_OS_MAC || Q_OS_LINUX || Q_OS_FREEBSD
|
||||
#include "platform/win/launcher_win.h"
|
||||
-#endif // Q_OS_MAC || Q_OS_LINUX || Q_OS_WINRT || Q_OS_WIN
|
||||
+#endif // Q_OS_MAC || Q_OS_LINUX || Q_OS_WINRT || Q_OS_WIN || Q_OS_FREEBSD
|
@ -1,14 +0,0 @@
|
||||
--- Telegram/SourceFiles/platform/platform_main_window.h.orig 2018-08-04 18:53:40 UTC
|
||||
+++ Telegram/SourceFiles/platform/platform_main_window.h
|
||||
@@ -19,8 +19,8 @@ class MainWindow;
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
#include "platform/mac/main_window_mac.h"
|
||||
-#elif defined Q_OS_LINUX // Q_OS_MAC
|
||||
+#elif defined Q_OS_LINUX || defined Q_OS_FREEBSD // Q_OS_MAC
|
||||
#include "platform/linux/main_window_linux.h"
|
||||
-#elif defined Q_OS_WIN // Q_OS_MAC || Q_OS_LINUX
|
||||
+#elif defined Q_OS_WIN // Q_OS_MAC || Q_OS_LINUX || Q_OS_FREEBSD
|
||||
#include "platform/win/main_window_win.h"
|
||||
-#endif // Q_OS_MAC || Q_OS_LINUX || Q_OS_WIN
|
||||
+#endif // Q_OS_MAC || Q_OS_LINUX || Q_OS_WIN || Q_OS_FREEBSD
|
@ -1,14 +0,0 @@
|
||||
--- Telegram/SourceFiles/platform/platform_notifications_manager.h.orig 2020-05-24 07:59:19 UTC
|
||||
+++ Telegram/SourceFiles/platform/platform_notifications_manager.h
|
||||
@@ -27,8 +27,8 @@ namespace Notifications {
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
#include "platform/mac/notifications_manager_mac.h"
|
||||
-#elif defined Q_OS_LINUX // Q_OS_MAC
|
||||
+#elif defined Q_OS_LINUX || defined Q_OS_FREEBSD // Q_OS_MAC
|
||||
#include "platform/linux/notifications_manager_linux.h"
|
||||
-#elif defined Q_OS_WIN // Q_OS_MAC || Q_OS_LINUX
|
||||
+#elif defined Q_OS_WIN // Q_OS_MAC || Q_OS_LINUX || Q_OS_FREEBSD
|
||||
#include "platform/win/notifications_manager_win.h"
|
||||
-#endif // Q_OS_MAC || Q_OS_LINUX || Q_OS_WIN
|
||||
+#endif // Q_OS_MAC || Q_OS_LINUX || Q_OS_WIN || Q_OS_FREEBSD
|
@ -1,14 +0,0 @@
|
||||
--- Telegram/SourceFiles/platform/platform_specific.h.orig 2019-10-07 15:58:21 UTC
|
||||
+++ Telegram/SourceFiles/platform/platform_specific.h
|
||||
@@ -51,8 +51,8 @@ void finish();
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
#include "platform/mac/specific_mac.h"
|
||||
-#elif defined Q_OS_LINUX // Q_OS_MAC
|
||||
+#elif defined Q_OS_LINUX || defined Q_OS_FREEBSD // Q_OS_MAC
|
||||
#include "platform/linux/specific_linux.h"
|
||||
-#elif defined Q_OS_WIN // Q_OS_MAC || Q_OS_LINUX
|
||||
+#elif defined Q_OS_WIN // Q_OS_MAC || Q_OS_LINUX || Q_OS_FREEBSD
|
||||
#include "platform/win/specific_win.h"
|
||||
-#endif // Q_OS_MAC || Q_OS_LINUX || Q_OS_WIN
|
||||
+#endif // Q_OS_MAC || Q_OS_LINUX || Q_OS_WIN || Q_OS_FREEBSD
|
@ -1,17 +0,0 @@
|
||||
--- Telegram/SourceFiles/platform/platform_window_title.h.orig 2019-10-07 15:58:21 UTC
|
||||
+++ Telegram/SourceFiles/platform/platform_window_title.h
|
||||
@@ -26,7 +26,7 @@ void PreviewWindowFramePaint(QImage &preview, const st
|
||||
#include "platform/mac/window_title_mac.h"
|
||||
#elif defined Q_OS_WIN // Q_OS_MAC
|
||||
#include "platform/win/window_title_win.h"
|
||||
-#elif defined Q_OS_WINRT || defined Q_OS_LINUX // Q_OS_MAC || Q_OS_WIN
|
||||
+#elif defined Q_OS_WINRT || defined Q_OS_LINUX || defined Q_OS_FREEBSD // Q_OS_MAC || Q_OS_WIN
|
||||
|
||||
namespace Platform {
|
||||
|
||||
@@ -44,4 +44,4 @@ inline void PreviewWindowFramePaint(QImage &preview, c
|
||||
|
||||
} // namespace Platform
|
||||
|
||||
-#endif // Q_OS_MAC || Q_OS_WIN || Q_OS_WINRT || Q_OS_LINUX
|
||||
+#endif // Q_OS_MAC || Q_OS_WIN || Q_OS_WINRT || Q_OS_LINUX || Q_OS_FREEBSD
|
@ -1,24 +0,0 @@
|
||||
--- Telegram/SourceFiles/qt_static_plugins.cpp.orig 2020-05-24 07:59:19 UTC
|
||||
+++ Telegram/SourceFiles/qt_static_plugins.cpp
|
||||
@@ -20,7 +20,7 @@ Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)
|
||||
#elif defined Q_OS_MAC // Q_OS_WIN
|
||||
Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin)
|
||||
Q_IMPORT_PLUGIN(QGenericEnginePlugin)
|
||||
-#elif defined Q_OS_LINUX // Q_OS_WIN | Q_OS_MAC
|
||||
+#elif defined Q_OS_LINUX || defined Q_OS_FREEBSD // Q_OS_WIN | Q_OS_MAC
|
||||
Q_IMPORT_PLUGIN(ShmServerBufferPlugin)
|
||||
Q_IMPORT_PLUGIN(DmaBufServerBufferPlugin)
|
||||
Q_IMPORT_PLUGIN(DrmEglServerBufferPlugin)
|
||||
@@ -44,10 +44,10 @@ Q_IMPORT_PLUGIN(QNetworkManagerEnginePlugin)
|
||||
Q_IMPORT_PLUGIN(QIbusPlatformInputContextPlugin)
|
||||
Q_IMPORT_PLUGIN(QXdgDesktopPortalThemePlugin)
|
||||
#endif // !TDESKTOP_DISABLE_DBUS_INTEGRATION
|
||||
-#endif // Q_OS_WIN | Q_OS_MAC | Q_OS_LINUX
|
||||
+#endif // Q_OS_WIN | Q_OS_MAC | Q_OS_LINUX | Q_OS_FREEBSD
|
||||
#endif // !DESKTOP_APP_USE_PACKAGED
|
||||
|
||||
-#ifdef Q_OS_LINUX
|
||||
+#if defined Q_OS_LINUX || defined Q_OS_FREEBSD
|
||||
#if !defined DESKTOP_APP_USE_PACKAGED || defined DESKTOP_APP_USE_PACKAGED_LAZY
|
||||
Q_IMPORT_PLUGIN(QWaylandMaterialDecorationPlugin)
|
||||
Q_IMPORT_PLUGIN(NimfInputContextPlugin)
|
@ -1,17 +0,0 @@
|
||||
--- Telegram/SourceFiles/settings/settings_notifications.cpp.orig 2020-02-18 08:28:06 UTC
|
||||
+++ Telegram/SourceFiles/settings/settings_notifications.cpp
|
||||
@@ -495,11 +495,11 @@ void NotificationsCount::SampleWidget::destroyDelayed(
|
||||
_deleted = true;
|
||||
|
||||
// Ubuntu has a lag if deleteLater() called immediately.
|
||||
-#if defined Q_OS_LINUX32 || defined Q_OS_LINUX64
|
||||
+#if defined Q_OS_LINUX32 || defined Q_OS_LINUX64 || defined Q_OS_FREEBSD
|
||||
QTimer::singleShot(1000, [this] { delete this; });
|
||||
-#else // Q_OS_LINUX32 || Q_OS_LINUX64
|
||||
+#else // Q_OS_LINUX32 || Q_OS_LINUX64 || Q_OS_FREEBSD
|
||||
deleteLater();
|
||||
-#endif // Q_OS_LINUX32 || Q_OS_LINUX64
|
||||
+#endif // Q_OS_LINUX32 || Q_OS_LINUX64 || Q_OS_FREEBSD
|
||||
}
|
||||
|
||||
void SetupAdvancedNotifications(
|
@ -1,20 +0,0 @@
|
||||
--- Telegram/SourceFiles/window/main_window.cpp.orig 2020-05-24 07:59:19 UTC
|
||||
+++ Telegram/SourceFiles/window/main_window.cpp
|
||||
@@ -603,7 +603,7 @@ bool MainWindow::minimizeToTray() {
|
||||
}
|
||||
|
||||
void MainWindow::reActivateWindow() {
|
||||
-#if defined Q_OS_LINUX32 || defined Q_OS_LINUX64
|
||||
+#if defined Q_OS_LINUX32 || defined Q_OS_LINUX64 || defined Q_OS_FREEBSD
|
||||
const auto reActivate = [=] {
|
||||
if (const auto w = App::wnd()) {
|
||||
if (auto f = QApplication::focusWidget()) {
|
||||
@@ -618,7 +618,7 @@ void MainWindow::reActivateWindow() {
|
||||
};
|
||||
crl::on_main(this, reActivate);
|
||||
base::call_delayed(200, this, reActivate);
|
||||
-#endif // Q_OS_LINUX32 || Q_OS_LINUX64
|
||||
+#endif // Q_OS_LINUX32 || Q_OS_LINUX64 || Q_OS_FREEBSD
|
||||
}
|
||||
|
||||
void MainWindow::showRightColumn(object_ptr<TWidget> widget) {
|
@ -1,13 +0,0 @@
|
||||
--- Telegram/lib_base/base/platform/base_platform_file_utilities.h.orig 2020-05-12 13:19:31 UTC
|
||||
+++ Telegram/lib_base/base/platform/base_platform_file_utilities.h
|
||||
@@ -26,8 +26,8 @@ void FlushFileData(QFile &file);
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
#include "base/platform/mac/base_file_utilities_mac.h"
|
||||
-#elif defined Q_OS_LINUX // Q_OS_MAC
|
||||
+#elif defined Q_OS_LINUX || defined Q_OS_FREEBSD // Q_OS_MAC
|
||||
#include "base/platform/linux/base_file_utilities_linux.h"
|
||||
-#elif defined Q_OS_WINRT || defined Q_OS_WIN // Q_OS_MAC || Q_OS_LINUX
|
||||
+#elif defined Q_OS_WINRT || defined Q_OS_WIN // Q_OS_MAC || Q_OS_LINUX || Q_OS_FREEBSD
|
||||
#include "base/platform/win/base_file_utilities_win.h"
|
||||
#endif // Q_OS_MAC || Q_OS_LINUX || Q_OS_WINRT || Q_OS_WIN
|
@ -1,14 +0,0 @@
|
||||
--- Telegram/lib_base/base/platform/base_platform_info.h.orig 2020-01-29 09:41:30 UTC
|
||||
+++ Telegram/lib_base/base/platform/base_platform_info.h
|
||||
@@ -53,8 +53,8 @@ void Finish();
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
#include "base/platform/mac/base_info_mac.h"
|
||||
-#elif defined Q_OS_LINUX // Q_OS_MAC
|
||||
+#elif defined Q_OS_LINUX || defined Q_OS_FREEBSD // Q_OS_MAC
|
||||
#include "base/platform/linux/base_info_linux.h"
|
||||
-#elif defined Q_OS_WIN // Q_OS_MAC || Q_OS_LINUX
|
||||
+#elif defined Q_OS_WIN // Q_OS_MAC || Q_OS_LINU || Q_OS_FREEBSD X
|
||||
#include "base/platform/win/base_info_win.h"
|
||||
-#endif // Q_OS_MAC || Q_OS_LINUX || Q_OS_WIN
|
||||
+#endif // Q_OS_MAC || Q_OS_LINUX || Q_OS_WIN || Q_OS_FREEBSD X
|
@ -1,11 +1,53 @@
|
||||
--- Telegram/lib_base/base/platform/linux/base_info_linux.cpp.orig 2020-03-30 09:44:51 UTC
|
||||
+++ Telegram/lib_base/base/platform/linux/base_info_linux.cpp
|
||||
@@ -65,7 +65,7 @@ QString SystemVersionPretty() {
|
||||
const auto result = getenv("XDG_CURRENT_DESKTOP");
|
||||
--- Telegram/lib_base/base/platform/linux/base_info_linux.cpp.orig 2020-06-24 20:32:27.483667000 +0300
|
||||
+++ Telegram/lib_base/base/platform/linux/base_info_linux.cpp 2020-06-24 20:45:44.399296000 +0300
|
||||
@@ -13,7 +13,6 @@
|
||||
#include <QtCore/QVersionNumber>
|
||||
#include <QtCore/QDate>
|
||||
#include <QtGui/QGuiApplication>
|
||||
-#include <gnu/libc-version.h>
|
||||
|
||||
namespace Platform {
|
||||
namespace {
|
||||
@@ -72,11 +71,9 @@
|
||||
const auto value = result ? QString::fromLatin1(result) : QString();
|
||||
const auto list = value.split(':', QString::SkipEmptyParts);
|
||||
- return list.isEmpty() ? "Linux" : "Linux " + list[0];
|
||||
+ return list.isEmpty() ? "FreeBSD" : "FreeBSD " + list[0];
|
||||
|
||||
- return "Linux "
|
||||
+ return "FreeBSD "
|
||||
+ (list.isEmpty() ? QString() : list[0] + ' ')
|
||||
- + (IsWayland() ? "Wayland " : "X11 ")
|
||||
- + "glibc "
|
||||
- + GetGlibCVersion();
|
||||
+ + (IsWayland() ? "Wayland " : "X11 ");
|
||||
}
|
||||
|
||||
QString SystemCountry() {
|
||||
@@ -92,13 +89,6 @@
|
||||
}
|
||||
|
||||
QDate WhenSystemBecomesOutdated() {
|
||||
- if (IsLinux32Bit()) {
|
||||
- return QDate(2020, 9, 1);
|
||||
- } else if (const auto version = GetGlibCVersion(); !version.isEmpty()) {
|
||||
- if (QVersionNumber::fromString(version) < QVersionNumber(2, 23)) {
|
||||
- return QDate(2020, 9, 1); // Older than Ubuntu 16.04.
|
||||
- }
|
||||
- }
|
||||
return QDate();
|
||||
}
|
||||
|
||||
@@ -120,14 +110,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
-QString GetGlibCVersion() {
|
||||
- static const auto result = [&] {
|
||||
- const auto version = QString::fromLatin1(gnu_get_libc_version());
|
||||
- return QVersionNumber::fromString(version).isNull() ? QString() : version;
|
||||
- }();
|
||||
- return result;
|
||||
-}
|
||||
-
|
||||
bool IsWayland() {
|
||||
return QGuiApplication::platformName().startsWith("wayland", Qt::CaseInsensitive);
|
||||
}
|
||||
|
@ -1,11 +0,0 @@
|
||||
--- Telegram/lib_ui/ui/platform/ui_platform_utility.h.orig 2020-02-10 08:12:05 UTC
|
||||
+++ Telegram/lib_ui/ui/platform/ui_platform_utility.h
|
||||
@@ -37,7 +37,7 @@ void DrainMainQueue(); // Needed only if UseMainQueueG
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
#include "ui/platform/mac/ui_utility_mac.h"
|
||||
-#elif defined Q_OS_LINUX // Q_OS_MAC
|
||||
+#elif defined Q_OS_LINUX || defined Q_OS_FREEBSD // Q_OS_MAC
|
||||
#include "ui/platform/linux/ui_utility_linux.h"
|
||||
#elif defined Q_OS_WINRT || defined Q_OS_WIN // Q_OS_MAC || Q_OS_LINUX
|
||||
#include "ui/platform/win/ui_utility_win.h"
|
@ -1,11 +0,0 @@
|
||||
--- Telegram/lib_ui/ui/style/style_core_font.cpp.orig 2020-05-24 07:44:41 UTC
|
||||
+++ Telegram/lib_ui/ui/style/style_core_font.cpp
|
||||
@@ -24,7 +24,7 @@ void style_InitFontsResource() {
|
||||
Q_INIT_RESOURCE(win);
|
||||
#elif defined Q_OS_MAC // Q_OS_WIN
|
||||
Q_INIT_RESOURCE(mac);
|
||||
-#elif defined Q_OS_LINUX && !defined DESKTOP_APP_USE_PACKAGED // Q_OS_WIN || Q_OS_MAC
|
||||
+#elif (defined Q_OS_LINUX || defined Q_OS_FREEBSD) && !defined DESKTOP_APP_USE_PACKAGED // Q_OS_WIN || Q_OS_MAC
|
||||
Q_INIT_RESOURCE(linux);
|
||||
#endif // Q_OS_WIN || Q_OS_MAC || (Q_OS_LINUX && !DESKTOP_APP_USE_PACKAGED)
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
--- Telegram/lib_ui/ui/widgets/labels.cpp.orig 2020-02-10 08:12:05 UTC
|
||||
+++ Telegram/lib_ui/ui/widgets/labels.cpp
|
||||
@@ -454,13 +454,13 @@ Text::StateResult FlatLabel::dragActionFinish(const QP
|
||||
}
|
||||
}
|
||||
|
||||
-#if defined Q_OS_LINUX32 || defined Q_OS_LINUX64
|
||||
+#if defined Q_OS_LINUX32 || defined Q_OS_LINUX64 || defined Q_OS_FREEBSD
|
||||
if (!_selection.empty()) {
|
||||
TextUtilities::SetClipboardText(
|
||||
_text.toTextForMimeData(_selection),
|
||||
QClipboard::Selection);
|
||||
}
|
||||
-#endif // Q_OS_LINUX32 || Q_OS_LINUX64
|
||||
+#endif // Q_OS_LINUX32 || Q_OS_LINUX64 || Q_OS_FREEBSD
|
||||
|
||||
return state;
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
--- cmake/external/qt/CMakeLists.txt.orig 2020-02-18 08:27:33 UTC
|
||||
+++ cmake/external/qt/CMakeLists.txt
|
||||
@@ -10,8 +10,10 @@ add_library(desktop-app::external_qt ALIAS external_qt
|
||||
if (LINUX)
|
||||
if (NOT build_linux32)
|
||||
target_compile_definitions(external_qt INTERFACE Q_OS_LINUX64)
|
||||
+ target_compile_definitions(external_qt INTERFACE Q_OS_FREEBSD)
|
||||
else()
|
||||
target_compile_definitions(external_qt INTERFACE Q_OS_LINUX32)
|
||||
+ target_compile_definitions(external_qt INTERFACE Q_OS_FREEBSD)
|
||||
endif()
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user