1
0

Accepting request 746365 from server:messaging

OBS-URL: https://build.opensuse.org/request/show/746365
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/telegram-desktop?expand=0&rev=24
This commit is contained in:
Dominique Leuenberger 2019-11-26 15:52:06 +00:00 committed by Git OBS Bridge
commit 21af28e346
18 changed files with 289 additions and 11831 deletions

3
Catch2-master.zip Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6e0b36fa3f2b9f84a6304c614cae80a12e90e3c2e06a844c6d073d7921620512
size 475613

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0ae0694c50b51e5c150625be71316a44929a7741e4a883b2713f303a09cd0461
size 78172
oid sha256:4c93c502b7309fec8a9fb02455a3d9fffe1b8c30032e9d5961360074507e78a1
size 89821

11606
catch.hpp

File diff suppressed because it is too large Load Diff

37
default-gtk2.patch Normal file
View File

@ -0,0 +1,37 @@
diff --git a/Telegram/SourceFiles/platform/linux/linux_libs.cpp b/Telegram/SourceFiles/platform/linux/linux_libs.cpp
index 5071d63..f8c0f20 100644
--- a/Telegram/SourceFiles/platform/linux/linux_libs.cpp
+++ b/Telegram/SourceFiles/platform/linux/linux_libs.cpp
@@ -237,15 +237,15 @@ void start() {
bool indicatorLoaded = false;
bool isWayland = QGuiApplication::platformName().startsWith(qsl("wayland"), Qt::CaseInsensitive);
QLibrary lib_gtk, lib_indicator;
- if (loadLibrary(lib_indicator, "ayatana-appindicator3", 1) || loadLibrary(lib_indicator, "appindicator3", 1)) {
- if (loadLibrary(lib_gtk, "gtk-3", 0)) {
+ if (loadLibrary(lib_indicator, "ayatana-appindicator", 1) || loadLibrary(lib_indicator, "appindicator", 1)) {
+ if (loadLibrary(lib_gtk, "gtk-x11-2.0", 0)) {
gtkLoaded = setupGtkBase(lib_gtk);
indicatorLoaded = setupAppIndicator(lib_indicator);
}
}
if ((!gtkLoaded || !indicatorLoaded) && !isWayland) {
- if (loadLibrary(lib_indicator, "ayatana-appindicator", 1) || loadLibrary(lib_indicator, "appindicator", 1)) {
- if (loadLibrary(lib_gtk, "gtk-x11-2.0", 0)) {
+ if (loadLibrary(lib_indicator, "ayatana-appindicator3", 1) || loadLibrary(lib_indicator, "appindicator3", 1)) {
+ if (loadLibrary(lib_gtk, "gtk-3", 0)) {
gtkLoaded = indicatorLoaded = false;
gtkLoaded = setupGtkBase(lib_gtk);
indicatorLoaded = setupAppIndicator(lib_indicator);
@@ -255,10 +255,10 @@ void start() {
// If no appindicator, try at least load gtk.
if (!gtkLoaded && !indicatorLoaded) {
- if (loadLibrary(lib_gtk, "gtk-3", 0)) {
+ if (loadLibrary(lib_gtk, "gtk-x11-2.0", 0)) {
gtkLoaded = setupGtkBase(lib_gtk);
}
- if (!gtkLoaded && !isWayland && loadLibrary(lib_gtk, "gtk-x11-2.0", 0)) {
+ if (!gtkLoaded && !isWayland && loadLibrary(lib_gtk, "gtk-3", 0)) {
gtkLoaded = setupGtkBase(lib_gtk);
}
}

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f107a414eca8b881809f9c2854f95e634f4f05094192316c53ef348d46258dff
size 627010
oid sha256:52ede0aefd66b3fb7f436de71ece3bc8f7c5bef3724dbede7ef5705548689b59
size 627211

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:186cbe3325bf0464fecc1b3fab2a639c1f3e8e7e831cc9ba48a3c173ec85793a
size 2042747
oid sha256:c5bd3f278ab58bfbb3128277ace5f297559c1f401fc9b24739c2802f4bf154a3
size 2031848

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:70957e71cf27b788b9680324ff70ef19a243668a2fcf0466e8e2f3acb1b7c6ef
size 34552
oid sha256:12f822a811b97fdafc3b3c0709da3c5b6384b73bd5fa6b2d39c1be2684753b30
size 34554

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:94de55c83beb867bf947493d4b1aa255e6fb40bdd940dd1e166218f6e549a5f8
size 380587
oid sha256:c0a39cf34f25e35b3f850ea790a3df22fb8a57ff7b56d41752365522abd5e73b
size 396034

View File

@ -93,7 +93,6 @@ def load_json(filename):
return json.loads(read_file_to_proper_json(open(filename)))
def save_json(jsonobj, filename):
# pass
j = transform_back(jsonobj)
# backup = filename + ".orig"
# copyfile(filename, backup)
@ -118,51 +117,20 @@ def process_telegram_linux(jsonobj):
child.append("'zlib'")
child.append("'minizip'")
child.append("'openssl'")
child = jsonobj["'conditions'"][0][1]["'variables'"]["'linux_path_opus_include%'"]
child = "'/usr/include/opus'"
child = jsonobj["'conditions'"][0][1]["'variables'"]["'linux_path_breakpad%'"]
child = "'<(libs_loc)/breakpad'"
child = jsonobj["'conditions'"][0][1]["'include_dirs'"]
child.remove("'/usr/local/include'")
child.remove("'<(linux_path_ffmpeg)/include'")
child.remove("'<(linux_path_openal)/include'")
child.append("'/usr/include/openssl'")
child.append("'/usr/include'")
child = jsonobj["'conditions'"][0][1]["'library_dirs'"]
child.remove("'/usr/local/lib'")
child.remove("'<(linux_path_ffmpeg)/lib'")
child.remove("'<(linux_path_openal)/lib'")
child.remove("'<(linux_path_va)/lib'")
child.remove("'<(linux_path_vdpau)/lib'")
child.append("'/usr/lib64/'")
child = jsonobj["'conditions'"][0][1]["'libraries'"]
child.remove("'breakpad_client'")
child.remove("'composeplatforminputcontextplugin'")
child.remove("'ibusplatforminputcontextplugin'")
child.remove("'fcitxplatforminputcontextplugin'")
child.remove("'himeplatforminputcontextplugin'")
child.remove("'nimfplatforminputcontextplugin'")
child.remove("'liblzma.a'")
child.remove("'libopenal.a'")
child.remove("'libavformat.a'")
child.remove("'libavcodec.a'")
child.remove("'libswresample.a'")
child.remove("'libswscale.a'")
child.remove("'libavutil.a'")
child.remove("'libopus.a'")
child.remove("'libva-x11.a'")
child.remove("'libva-drm.a'")
child.remove("'libva.a'")
child.remove("'libvdpau.a'")
child.remove("'libdrm.a'")
child.remove("'libz.a'")
child.append("'libbreakpad_client.a'")
child.append("'<!(pkg-config 2> /dev/null --libs <@(pkgconfig_libs))'")
child.remove("'-lcomposeplatforminputcontextplugin'")
child.remove("'-lfcitxplatforminputcontextplugin'")
child.remove("'-lhimeplatforminputcontextplugin'")
child.remove("'-libusplatforminputcontextplugin'")
child.remove("'-lnimfplatforminputcontextplugin'")
child = jsonobj["'conditions'"][0][1]["'cflags_cc'"]
child.append("'<!(pkg-config --cflags <@(pkgconfig_libs))'")
child = jsonobj["'conditions'"][0][1]["'conditions'"][1][1]["'cflags_cc'"]
child.remove("'<!(pkg-config 2> /dev/null --cflags dee-1.0)'")
child = jsonobj["'conditions'"][0][1]["'ldflags'"]
child.remove("'-Wl,-Bstatic'")
return json.dumps(jsonobj)
def process_qt(jsonobj):
@ -214,6 +182,7 @@ def process_qt(jsonobj):
child = jsonobj["'include_dirs'"]
del child[:]
child.append("'/usr/include/ffmpeg'")
child.append("'/usr/include/qt5'")
child.append("'/usr/include/qt5/QtCore'")
child.append("'/usr/include/qt5/QtGui'")
@ -269,7 +238,7 @@ def process_telegram(jsonobj):
child.append("'TDESKTOP_DISABLE_AUTOUPDATE'")
child.append("'TDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME'")
child.append("'TDESKTOP_DISABLE_UNITY_INTEGRATION'")
child.append("'TDESKTOP_DISABLE_GTK_INTEGRATION'")
# child.append("'TDESKTOP_DISABLE_GTK_INTEGRATION'")
child.append("'TDESKTOP_DISABLE_OPENAL_EFFECTS'")
child.remove("'AL_LIBTYPE_STATIC'")
child = jsonobj["'targets'"][0]["'include_dirs'"]
@ -284,14 +253,13 @@ def process_telegram(jsonobj):
child.remove("'<(sp_media_key_tap_loc)'")
child.append("'<(libs_loc)/breakpad/include/breakpad'")
child.append("'/usr/include/minizip'")
child.append("'/usr/include/ffmpeg'")
return json.dumps(jsonobj)
def process_moc(jsonobj):
jsonobj["'rules'"][0]["'action'"][0] = "'/usr/bin/moc-qt5'"
return json.dumps(jsonobj)
def process_rcc(jsonobj):
jsonobj["'rules'"][0]["'action'"][0] = "'/usr/bin/rcc-qt5'"
def process_libffmpeg(jsonobj):
include_dirs = jsonobj["'targets'"][0]["'include_dirs'"]
include_dirs.remove("'<(libs_loc)/ffmpeg'")
include_dirs.append("'/usr/include/ffmpeg'")
return json.dumps(jsonobj)
def process(filename, op):
@ -299,13 +267,14 @@ def process(filename, op):
json = op(json)
save_json(json, filename)
tl_path = './Telegram/gyp/telegram_linux.gypi'
settings_path = './Telegram/gyp/settings_linux.gypi'
qt_path = './Telegram/gyp/qt.gypi'
tg_path = './Telegram/gyp/Telegram.gyp'
moc_path = './Telegram/gyp/qt_moc.gypi'
rcc_path = './Telegram/gyp/qt_rcc.gypi'
tg_srcs = './Telegram/gyp/telegram_sources.txt'
tl_path = './Telegram/gyp/telegram/linux.gypi'
tg_srcs = './Telegram/gyp/telegram/sources.txt'
settings_path = './Telegram/gyp/common/linux.gypi'
tg_path = './Telegram/gyp/telegram/telegram.gypi'
qt_path = './Telegram/gyp/modules/qt.gypi'
moc_path = './Telegram/gyp/modules/qt_moc.gypi'
rcc_path = './Telegram/gyp/modules/qt_rcc.gypi'
libffmpeg_path="./Telegram/gyp/lib_ffmpeg.gyp"
print("Patching %s ..." % tl_path)
process(tl_path, process_telegram_linux)
@ -313,11 +282,9 @@ print("Patching %s ..." % settings_path)
process(settings_path, process_settings_linux)
print("Patching %s ..." % qt_path)
process(qt_path, process_qt)
print("Patching %s ..." % moc_path)
process(moc_path, process_moc)
print("Patching %s ..." % rcc_path)
process(rcc_path, process_rcc)
print("Patching %s ..." % tg_path)
process(tg_path, process_telegram)
print("Patching %s ..." % libffmpeg_path)
process(libffmpeg_path, process_libffmpeg)
print("Patching complete!")

99
qt_functions.cpp Normal file
View File

@ -0,0 +1,99 @@
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file contains some parts of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see http://www.qt.io/terms-conditions. For further
** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 or version 3 as published by the Free
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
** following information to ensure the GNU Lesser General Public License
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** As a special exception, The Qt Company gives you certain additional
** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include <private/qtextengine_p.h>
#include <QStringList>
#include <QString>
#include <QFont>
#include <QTextCharFormat>
#include <QChar>
/* Debian maintainer: this function is taken from qfiledialog.cpp */
/*
Makes a list of filters from ;;-separated text.
Used by the mac and windows implementations
*/
QStringList qt_make_filter_list(const QString &filter)
{
QString f(filter);
if (f.isEmpty())
return QStringList();
QString sep(QLatin1String(";;"));
int i = f.indexOf(sep, 0);
if (i == -1) {
if (f.indexOf(QLatin1Char('\n'), 0) != -1) {
sep = QLatin1Char('\n');
i = f.indexOf(sep, 0);
}
}
return f.split(sep);
}
/* Debian maintainer: this constructor is taken from qtextengine.cpp for TextPainter::drawLine */
QTextItemInt::QTextItemInt(const QGlyphLayout &g, QFont *font, const QChar *chars_, int numChars, QFontEngine *fe, const QTextCharFormat &format)
: flags(0), justified(false), underlineStyle(QTextCharFormat::NoUnderline), charFormat(format),
num_chars(numChars), chars(chars_), logClusters(0), f(font), glyphs(g), fontEngine(fe)
{
}
/* Debian maintainer: this method is also taken from qtextengine.cpp */
// Fix up flags and underlineStyle with given info
void QTextItemInt::initWithScriptItem(const QScriptItem &si)
{
// explicitly initialize flags so that initFontAttributes can be called
// multiple times on the same TextItem
flags = 0;
if (si.analysis.bidiLevel %2)
flags |= QTextItem::RightToLeft;
ascent = si.ascent;
descent = si.descent;
if (charFormat.hasProperty(QTextFormat::TextUnderlineStyle)) {
underlineStyle = charFormat.underlineStyle();
} else if (charFormat.boolProperty(QTextFormat::FontUnderline)
|| f->d->underline) {
underlineStyle = QTextCharFormat::SingleUnderline;
}
// compat
if (underlineStyle == QTextCharFormat::SingleUnderline)
flags |= QTextItem::Underline;
if (f->d->overline || charFormat.fontOverline())
flags |= QTextItem::Overline;
if (f->d->strikeOut || charFormat.fontStrikeOut())
flags |= QTextItem::StrikeOut;
}

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c6a70d7c70ec3e2a725600a06c1497719f17078527b4c534c2d66b17b2e2653e
size 833965
oid sha256:617d0ef9f9f03fb07ab2136ce41c20a431f81c7db55d049fcc7e21d8f1f13175
size 959772

View File

@ -1,120 +1,43 @@
Index: tdesktop-1.2.6/Telegram/Resources/qrc/telegram_linux.qrc
===================================================================
--- tdesktop-1.2.6.orig/Telegram/Resources/qrc/telegram_linux.qrc
+++ tdesktop-1.2.6/Telegram/Resources/qrc/telegram_linux.qrc
@@ -1,5 +1,4 @@
diff --git a/Telegram/Resources/qrc/linux.qrc b/Telegram/Resources/qrc/linux.qrc
index 164e8d4f2..12319be14 100644
--- a/Telegram/Resources/qrc/linux.qrc
+++ b/Telegram/Resources/qrc/linux.qrc
@@ -1,6 +1,5 @@
<RCC>
<qresource prefix="/qt">
- <file alias="etc/qt.conf">../etc/qt_linux.conf</file>
</qresource>
<qresource prefix="/fc">
Index: tdesktop-1.2.6/Telegram/SourceFiles/qt_functions.cpp
===================================================================
--- /dev/null
+++ tdesktop-1.2.6/Telegram/SourceFiles/qt_functions.cpp
@@ -0,0 +1,97 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file contains some parts of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** As a special exception, The Qt Company gives you certain additional
+** rights. These rights are described in The Qt Company LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
<file alias="fc-custom.conf">../fc-custom.conf</file>
diff --git a/Telegram/SourceFiles/core/launcher.cpp b/Telegram/SourceFiles/core/launcher.cpp
index 3ba28309b..e280c44fa 100644
--- a/Telegram/SourceFiles/core/launcher.cpp
+++ b/Telegram/SourceFiles/core/launcher.cpp
@@ -272,6 +272,19 @@ int Launcher::exec() {
Logs::start(this); // must be started before Platform is started
Platform::start(); // must be started before Sandbox is created
+ // I don't know why path is not in QT_PLUGIN_PATH by default
+ QCoreApplication::addLibraryPath("/usr/lib64/qt5/plugins");
+ // without this Telegram doesn't start on Ubuntu 17.04 due to GTK errors
+ setenv("QT_STYLE_OVERRIDE", "qwerty", false);
+ // Telegram doesn't start when extraordinary theme is set, see launchpad.net/bugs/1680943
+ unsetenv("QT_QPA_PLATFORMTHEME");
+
+/* TODO: find a dynamic library with these symbols. */
+ // unset QT screen scale related envvars
+ unsetenv("QT_SCREEN_SCALE_FACTORS");
+ unsetenv("QT_AUTO_SCREEN_SCALE_FACTOR");
+ unsetenv("QT_SCALE_FACTOR");
+ unsetenv("QT_DEVICE_PIXEL_RATIO");
+
+/* Debian maintainer: this function is taken from qfiledialog.cpp */
+/*
+ Makes a list of filters from ;;-separated text.
+ Used by the mac and windows implementations
+*/
+
+#include <private/qfontengine_p.h>
+
+QStringList qt_make_filter_list(const QString &filter)
+{
+ QString f(filter);
+
+ if (f.isEmpty())
+ return QStringList();
+
+ QString sep(QLatin1String(";;"));
+ int i = f.indexOf(sep, 0);
+ if (i == -1) {
+ if (f.indexOf(QLatin1Char('\n'), 0) != -1) {
+ sep = QLatin1Char('\n');
+ i = f.indexOf(sep, 0);
+ }
+ }
+
+ return f.split(sep);
+}
+
+/* Debian maintainer: this constructor is taken from qtextengine.cpp for TextPainter::drawLine */
+QTextItemInt::QTextItemInt(const QGlyphLayout &g, QFont *font, const QChar *chars_, int numChars, QFontEngine *fe, const QTextCharFormat &format)
+ : flags(0), justified(false), underlineStyle(QTextCharFormat::NoUnderline), charFormat(format),
+ num_chars(numChars), chars(chars_), logClusters(0), f(font), glyphs(g), fontEngine(fe)
+{
+}
+
+/* Debian maintainer: this method is also taken from qtextengine.cpp */
+// Fix up flags and underlineStyle with given info
+void QTextItemInt::initWithScriptItem(const QScriptItem &si)
+{
+ // explicitly initialize flags so that initFontAttributes can be called
+ // multiple times on the same TextItem
+ flags = 0;
+ if (si.analysis.bidiLevel %2)
+ flags |= QTextItem::RightToLeft;
+ ascent = si.ascent;
+ descent = si.descent;
+
+ if (charFormat.hasProperty(QTextFormat::TextUnderlineStyle)) {
+ underlineStyle = charFormat.underlineStyle();
+ } else if (charFormat.boolProperty(QTextFormat::FontUnderline)
+ || f->d->underline) {
+ underlineStyle = QTextCharFormat::SingleUnderline;
+ }
+
+ // compat
+ if (underlineStyle == QTextCharFormat::SingleUnderline)
+ flags |= QTextItem::Underline;
+
+ if (f->d->overline || charFormat.fontOverline())
+ flags |= QTextItem::Overline;
+ if (f->d->strikeOut || charFormat.fontStrikeOut())
+ flags |= QTextItem::StrikeOut;
+}
Index: tdesktop-1.2.6/Telegram/SourceFiles/qt_static_plugins.cpp
===================================================================
--- tdesktop-1.2.6.orig/Telegram/SourceFiles/qt_static_plugins.cpp
+++ tdesktop-1.2.6/Telegram/SourceFiles/qt_static_plugins.cpp
@@ -28,14 +28,4 @@ Q_IMPORT_PLUGIN(QWebpPlugin)
auto result = executeApplication();
DEBUG_LOG(("Telegram finished, result: %1").arg(result));
diff --git a/Telegram/SourceFiles/qt_static_plugins.cpp b/Telegram/SourceFiles/qt_static_plugins.cpp
index a757d085f..122ff0f5d 100644
--- a/Telegram/SourceFiles/qt_static_plugins.cpp
+++ b/Telegram/SourceFiles/qt_static_plugins.cpp
@@ -15,14 +15,4 @@ Q_IMPORT_PLUGIN(QWebpPlugin)
Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin)
Q_IMPORT_PLUGIN(QGenericEnginePlugin)
#elif defined Q_OS_LINUX // Q_OS_WIN | Q_OS_MAC
@ -129,45 +52,58 @@ Index: tdesktop-1.2.6/Telegram/SourceFiles/qt_static_plugins.cpp
-Q_IMPORT_PLUGIN(QHimePlatformInputContextPlugin)
-Q_IMPORT_PLUGIN(NimfInputContextPlugin)
#endif // Q_OS_WIN | Q_OS_MAC | Q_OS_LINUX
Index: tdesktop-1.2.6/Telegram/gyp/PrecompiledHeader.cmake
===================================================================
--- tdesktop-1.2.6.orig/Telegram/gyp/PrecompiledHeader.cmake
+++ tdesktop-1.2.6/Telegram/gyp/PrecompiledHeader.cmake
@@ -112,7 +112,7 @@ function(add_precompiled_header _target _input)
diff --git a/Telegram/SourceFiles/ui/text/text.cpp b/Telegram/SourceFiles/ui/text/text.cpp
index 7891995be..eaeb52b35 100644
--- a/Telegram/SourceFiles/ui/text/text.cpp
+++ b/Telegram/SourceFiles/ui/text/text.cpp
@@ -1968,11 +1968,11 @@ private:
if (item == -1)
return;
-#ifdef OS_MAC_OLD
+#if defined(OS_MAC_OLD) || QT_VERSION < QT_VERSION_CHECK(5, 6, 0)
auto end = _e->findItem(line.from + line.length - 1);
-#else // OS_MAC_OLD
+#else
auto end = _e->findItem(line.from + line.length - 1, item);
-#endif // OS_MAC_OLD
+#endif
auto blockIndex = _lineStartBlock;
auto currentBlock = _t->_blocks[blockIndex].get();
diff --git a/Telegram/SourceFiles/ui/text/text_block.cpp b/Telegram/SourceFiles/ui/text/text_block.cpp
index 29173c5c2..b47a53d76 100644
--- a/Telegram/SourceFiles/ui/text/text_block.cpp
+++ b/Telegram/SourceFiles/ui/text/text_block.cpp
@@ -334,6 +334,9 @@ TextBlock::TextBlock(const style::font &font, const QString &str, QFixed minResi
QStackTextEngine engine(part, blockFont->f);
BlockParser parser(&engine, this, minResizeWidth, _from, part);
+ QTextLayout layout(part, blockFont->f);
+ layout.beginLayout();
+ layout.createLine();
}
}
diff --git a/Telegram/gyp/PrecompiledHeader.cmake b/Telegram/gyp/PrecompiledHeader.cmake
index dfe1193be..0b13fc098 100644
--- a/Telegram/gyp/PrecompiledHeader.cmake
+++ b/Telegram/gyp/PrecompiledHeader.cmake
@@ -114,7 +114,7 @@ function(add_precompiled_header _target _input)
set(_compiler_FLAGS "@${_pch_c_flags_file}")
add_custom_command(
OUTPUT "${_output_c}"
- COMMAND "${CMAKE_C_COMPILER}" ${_compiler_FLAGS} -x c-header -o "${_output_c}" -c "${_pchfile}"
+ COMMAND "${CMAKE_C_COMPILER}" "$(C_DEFINES)" "$(C_INCLUDES)" "$(C_FLAGS)" -x c-header -o "${_output_c}" -c "${_pchfile}"
+ COMMAND "${CMAKE_C_COMPILER}" ${_compiler_FLAGS} "$(C_DEFINES)" "$(C_INCLUDES)" "$(C_FLAGS)" -x c-header -o "${_output_c}" -c "${_pchfile}"
DEPENDS "${_pchfile}" "${_pch_c_flags_file}"
IMPLICIT_DEPENDS C "${_pch_header}"
COMMENT "Precompiling ${_name} for ${_target} (C)")
@@ -123,7 +123,7 @@ function(add_precompiled_header _target _input)
@@ -125,7 +125,7 @@ function(add_precompiled_header _target _input)
set(_compiler_FLAGS "@${_pch_cpp_flags_file}")
add_custom_command(
OUTPUT "${_output_cxx}"
- COMMAND "${CMAKE_CXX_COMPILER}" ${_compiler_FLAGS} -x c++-header -o "${_output_cxx}" -c "${_pchfile}"
+ COMMAND "${CMAKE_CXX_COMPILER}" "$(CXX_DEFINES)" "$(CXX_INCLUDES)" "$(CXX_FLAGS)" -x c++-header -o "${_output_cxx}" -c "${_pchfile}"
+ COMMAND "${CMAKE_CXX_COMPILER}" ${_compiler_FLAGS} "$(CXX_DEFINES)" "$(CXX_INCLUDES)" "$(CXX_FLAGS)" -x c++-header -o "${_output_cxx}" -c "${_pchfile}"
DEPENDS "${_pchfile}" "${_pch_cpp_flags_file}"
IMPLICIT_DEPENDS CXX "${_pch_header}"
COMMENT "Precompiling header ${_name} for ${_target} (C++)")
Index: tdesktop-1.2.6/Telegram/gyp/telegram_sources.txt
===================================================================
--- tdesktop-1.2.6.orig/Telegram/gyp/telegram_sources.txt
+++ tdesktop-1.2.6/Telegram/gyp/telegram_sources.txt
@@ -713,14 +713,7 @@
<(emoji_suggestions_loc)/emoji_suggestions.cpp
<(emoji_suggestions_loc)/emoji_suggestions.h
-platforms: !win
-<(minizip_loc)/crypt.h
-<(minizip_loc)/ioapi.c
-<(minizip_loc)/ioapi.h
-<(minizip_loc)/zip.c
-<(minizip_loc)/zip.h
-<(minizip_loc)/unzip.c
-<(minizip_loc)/unzip.h
+<(src_loc)/qt_functions.cpp
platforms: win
<(res_loc)/winrc/Telegram.rc

View File

@ -1,3 +1,18 @@
-------------------------------------------------------------------
Tue Nov 5 20:51:58 UTC 2019 - Xu Zhao <i@xuzhao.net>
- Remove the TDESKTOP_DISABLE_GTK_INTEGRATION macro in patch.py
* Enable the native notification on all platforms.
- Add default-gtk2.patch: Use GTK 2 theme by default to harmonize
the libqt5-prioritise-gtk2-platformtheme.patch (boo#1149986)
in libqt5-qtbase.
-------------------------------------------------------------------
Sat Nov 2 11:54:41 UTC 2019 - Xu Zhao <i@xuzhao.net>
- Update to 1.8.15
* Bug fixes and other minor improvements.
-------------------------------------------------------------------
Sat Sep 28 11:04:43 UTC 2019 - Marcel Kuehlhorn <tux93@opensuse.org>

View File

@ -29,7 +29,7 @@
%endif
Name: telegram-desktop
Version: 1.8.9
Version: 1.8.15
Release: 0
Summary: Messaging application with a focus on speed and security
License: GPL-3.0-only
@ -49,8 +49,8 @@ Source5: GSL-master.zip
Source6: variant-master.zip
# curl https://codeload.github.com/grishka/libtgvoip/zip/public -o libtgvoip.zip
Source7: libtgvoip.zip
# curl https://raw.githubusercontent.com/philsquared/Catch/master/single_include/catch.hpp -o catch.hpp
Source8: catch.hpp
# curl https://codeload.github.com/catchorg/Catch2/master -o Catch2-master.zip
Source8: Catch2-master.zip
# curl https://codeload.github.com/ericniebler/range-v3/zip/master -o range-v3-master.zip
Source9: range-v3-master.zip
# curl https://codeload.github.com/telegramdesktop/crl/zip/master -o crl-master.zip
@ -61,8 +61,10 @@ Source11: xxHash-master.zip
Source12: lz4-dev.zip
# curl https://codeload.github.com/john-preston/rlottie/zip/master -o rlottie-master.zip
Source13: rlottie-master.zip
Source14: qt_functions.cpp
Patch0: tdesktop.patch
Patch1: default-gtk2.patch
BuildRequires: chrpath
BuildRequires: cmake
BuildRequires: desktop-file-utils
@ -91,6 +93,7 @@ BuildRequires: pkgconfig(Qt5Network)
BuildRequires: pkgconfig(Qt5Widgets)
BuildRequires: pkgconfig(alsa)
BuildRequires: pkgconfig(ayatana-appindicator3-0.1)
BuildRequires: pkgconfig(dee-1.0)
BuildRequires: pkgconfig(expat)
BuildRequires: pkgconfig(fontconfig)
BuildRequires: pkgconfig(freetype2)
@ -128,6 +131,7 @@ BuildRequires: pkgconfig(opusurl)
BuildRequires: pkgconfig(portaudio-2.0)
BuildRequires: pkgconfig(portaudiocpp)
BuildRequires: pkgconfig(tslib)
BuildRequires: pkgconfig(vdpau)
BuildRequires: pkgconfig(xcb-ewmh)
BuildRequires: pkgconfig(xcb-icccm)
BuildRequires: pkgconfig(xcb-image)
@ -142,6 +146,7 @@ BuildRequires: pkgconfig(zlib)
Requires: ffmpeg
Requires: hicolor-icon-theme
Requires: icu
Requires: libappindicator1
Requires: openssl
ExclusiveArch: x86_64
@ -156,9 +161,6 @@ The service also provides APIs to independent developers.
%setup -q -n tdesktop-%{version}
cp %{SOURCE8} Telegram/SourceFiles/base
# Already included in %{S:8}
sed -i "/catch_reporter_compact.hpp/d" Telegram/SourceFiles/base/tests_main.cpp
cp %{_sourcedir}/GSL-master.zip . && unzip GSL-master.zip
mv GSL-master GSL
mv GSL %{_builddir}/tdesktop-%{version}/Telegram/ThirdParty/
@ -192,13 +194,18 @@ cp %{_sourcedir}/xxHash-master.zip . && unzip xxHash-master.zip
mv xxHash-master xxHash
mv xxHash %{_builddir}/tdesktop-%{version}/Telegram/ThirdParty/
cp %{_sourcedir}/Catch2-master.zip . && unzip Catch2-master.zip
mv Catch2-master Catch
mv Catch %{_builddir}/tdesktop-%{version}/Telegram/ThirdParty/
cp %{_sourcedir}/tdesktop.patch %{_builddir}/tdesktop-%{version}
cd %{_builddir}/tdesktop-%{version}
%patch0 -p1
%patch1 -p1
cp %{_sourcedir}/patch.py . && python3 ./patch.py
cp %{_sourcedir}/catch.hpp ./Telegram/SourceFiles/
cp %{_sourcedir}/qt_functions.cpp Telegram/SourceFiles/
sed -i '1i<(src_loc)/qt_functions.cpp' Telegram/gyp/telegram/sources.txt
%setup -q -T -c -n breakpad -a 1
%setup -q -T -c -n breakpad-lss -a 2

3
v1.8.15.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:68bb6c3d007fe21847286815f22c2532a7cf9c247dc2781d749ebeb40f02ed99
size 14416530

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2df035cc4a582660b612656c22ff10d37eb34dbece958f9c99f6a0bd4e2fb61b
size 14407939

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1819b21acaf9fc836f2b383a3b06a5cd00844a70c2ca2e1a0b86be8b5a58cfa5
size 141553
oid sha256:51a2ec343b43e0baedd785315e7691be87689235c5cced4626f95732ee9c4ecb
size 125044

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:554c8f8b5a36156b0b53258093e806657135b455860043f24a271b1cfee197a5
size 57956
oid sha256:6b864f7fdee91a5adb67f1bb65927e571573f5cb8a7b719ea2ae3f269045bb70
size 96813