Commit Graph

94 Commits

Author SHA1 Message Date
John Preston f3eac6b259 Version 1.2.16: Fix text processing crash in OS X 10.6. 2018-04-08 18:21:40 +04:00
John Preston 811fc43b63 Fix Qt text processing crash.
Fixes #4551.
2018-03-30 18:18:35 +04:00
John Preston c6efb588dc Fix crash in digit-only hashtag skipping. 2018-03-08 15:02:34 +03:00
John Preston 7940ef24ab Disallow hashtags of digits only. 2018-03-06 18:29:45 +03:00
John Preston 00aa6d5ac3 Allow monospace block to end on ellipsis. 2018-02-22 21:16:01 +03:00
John Preston 3c4c466f8e Add cashtags and bot allowed service messages. 2018-02-08 12:20:55 +03:00
John Preston 681b9b5ba3 Improve text selection in bubbles. 2018-02-08 12:20:53 +03:00
John Preston 63c1212ef1 Allow multiple items selection in HistoryView. 2018-02-08 12:20:52 +03:00
John Preston fe1a90bd39 Move message context menu to a separate module. 2018-02-08 12:20:52 +03:00
John Preston 7425e80f05 Use HistoryMedia as view, add Data::Media. 2018-02-08 12:20:48 +03:00
John Preston 97a9089ebf Move draw / getState code to HistoryView::Message.
Item dimensions broken for now.
Also remove history.h from pch.
2018-02-08 12:20:48 +03:00
John Preston f88cbf3d4b Fix crash in case of incorrect Text entities. 2018-02-08 12:20:45 +03:00
John Preston ea7441ae77 Use single LEGAL file with license and copyright. 2018-01-03 13:23:14 +03:00
John Preston 57351dd42a Remove QTextLayout that appears to be not needed. 2017-12-26 19:20:07 +03:00
John Preston 2e421e8aed Allow unicode quotes as markdown entry separators.
Fixes #3867.
2017-12-18 21:06:44 +04:00
John Preston afe9d38c48 Don't ruin links by markdown parsing.
Fixes #3851.
2017-12-18 20:49:40 +04:00
John Preston 14034c255e Replace QSharedPointer with std::shared_ptr. 2017-12-18 13:07:18 +04:00
John Preston 97c15865a5 Move some code around.
Move logs:SignalHandlers to core/crash_reports:CrashReports.
Move all pre-launch windows to core/crash_report_window module.
Move some global code to core/launcher:Launcher.
It should replace settings / platform_specific module in some way.
2017-12-12 16:47:32 +04:00
John Preston d6f7cae024 Fix two crashes in OS X 10.6.
Disable rtl control chars (harfbuzz-ng crashes on them).
Disable creating state of not yet created top level windows.
2017-12-02 16:10:52 +04:00
John Preston 5c12b0e5fa Use /permissive- flag for Visual Studio builds. 2017-11-16 07:59:10 +04:00
John Preston 54cc3e6315 Shared media multiple items selection. 2017-11-16 07:59:07 +04:00
John Preston 21b1ba1f88 Move build to Ubuntu 14.04 and GCC 7.2.
To be able to run on the same distributions as before we need to have
the same GLIBC version dependency as in Ubuntu 12.04, which is 2.15.

For that we need to remove all usages of GLIBC features from 2.16 and above.
Currently there are three methods used, so they're wrapped in a separate
static library, linux_glibc_wraps.

It is a separate library because it must be compiled without '-flto' flag,
otherwise the inline __asm__ is not working and we get unresolved symbols.
2017-11-16 07:59:05 +04:00
John Preston ffc20e4492 Divide structs into several data/ modules. 2017-11-16 07:59:04 +04:00
John Preston 088d23d557 Start new Info section (profile + shared media). 2017-11-16 07:59:02 +04:00
visuve 8c92f42de3 Fix uninitialized values
- Use C++11 default member initializers

Signed-off-by: Veli-Matti Visuri <veli-matti.visuri@cerescon.fi> (github: visuve)
2017-09-28 18:23:42 +03:00
John Preston 2e374e68c5 Fix working with layers.
Regression was introduced in df64c97.

New base::flags work correctly only if all mutually exclusive flag
values use mutually exclusive bits (a & b == 0 for exclusive (a, b)).

Closes #3856.
2017-09-03 22:49:33 +03:00
John Preston df64c972d8 Replace QFlags with base::flags. 2017-09-03 15:45:47 +03:00
John Preston f7359093b4 Replace ContactsBox with PeerListBox in two cases.
- View contacts list in PeerListBox.
- Add participants when creating group / channel in PeerListBox.
2017-08-30 19:15:27 +03:00
John Preston ab35829358 Remove App::app(), App::uploader(), App::api().
Also use Auth() instead of AuthSession::Current*().
2017-08-25 14:39:18 +03:00
John Preston 65371ec1b8 Fix selected text render on Retina.
QPainter::viewport() can be a too large rect to be passed as a
clipping region to QPainter on Retina displays.

QPainter in case of Retina displays tries to transform QRegion using
scale matrix and fails with "QRegion: creating region from big
polygon failed" warning message and disables painting completely.
2017-07-26 15:51:24 +03:00
John Preston 0402b4f5f4 Add X / V vector icon to checkbox Toggle view.
Also use them in the admin rights / restrictions boxes.
2017-07-09 18:06:27 +03:00
John Preston 28f7dc73a5 Optimize markdown parser, use less regex matches. 2017-07-06 19:57:19 +03:00
John Preston 8d43bdb084 Use std::unique_ptrs for ITextBlocks. 2017-07-06 18:59:47 +03:00
John Preston 8550099110 Improve markdown parsing. 2017-07-06 18:59:38 +03:00
John Preston 921c27c9b1 Apply markdown bold/italic when editing a message. 2017-07-06 18:19:50 +03:00
John Preston 148c04fb41 Fix multiline monospace pre blocks editing.
Now we pass current flags and lnkIndex to the NewlineBlock, so that
we don't get one multiline pre block split to separate line blocks.
2017-07-06 17:10:33 +03:00
John Preston eaf91bba58 Parse bold / italic markdown entities. 2017-07-06 16:44:11 +03:00
John Preston da0d78135d Some refactoring in working with text entities.
Also move this code to TextUtilities namespace.
2017-07-06 14:37:42 +03:00
John Preston 816ee794e8 Event log context menu + improved text selection. 2017-06-30 09:21:43 +03:00
John Preston 624f33c5e2 Allow to select and copy text in the events log.
Also better handle window resize in the events log.
2017-06-30 09:21:42 +03:00
John Preston e39b95175b Handle channel event log mouse events. 2017-06-30 09:21:42 +03:00
John Preston 4962fdf5ae Add phrases and layout for all events in log. 2017-06-30 09:21:41 +03:00
John Preston 110e7c8074 Finalize rename / move. 2017-06-29 11:39:38 +03:00
John Preston 297856db32 Load and use Segoe UI [Semibold] if no Open Sans.
Sometimes Open Sans Semibold fails to load properly on the latest
Windows Creators Update. In that case try to load Segoe UI instead.

An attempt to fix #3276.
2017-04-30 19:03:12 +03:00
John Preston 5444b8166c Finalize rename / move of files. 2017-04-07 18:13:18 +03:00
John Preston 3b373e236e Make all owned MTPD types immutable.
Remove custom refcounting in mtpData, use std::shared_ptr instead.
2017-03-10 23:27:23 +03:00
John Preston 83720d8789 Finalizing file renaming. 2017-03-04 13:23:56 +03:00
John Preston 08167a6a91 Removed #include "stdafx.h" from all files.
Currently the build without implicitly included precompiled header
is not supported anyway (because Qt MOC source files do not include
stdafx.h, they include plain headers).

So when we decide to support building without implicitly included
precompiled headers we'll have to fix all the headers anyway.
2017-03-04 12:27:52 +03:00
John Preston fb230a443e Fixed text with right bearings display.
Sometimes Text::_maxWidth was not accumulated correctly because
the intermediate text blocks had negative right bearing larger
than the whole width of the next text block, so the final computed
line width was less than some intermediate value. Now we accumulate
the _maxWidth value after each block making this value correct.
2017-02-28 19:38:23 +03:00
John Preston 5195b4d3ef RTL strings with trailing spaces render fix.
Commit 8d354382a4 introduced a regression in RTL phrases display.
When an RTL line had trailing spaces we started displaying them in
front of the text still assuming counted line width value that did
not include those trailing spaces.

Line width is not including trailing spaces width because it is
allowed to fit in the line any number of spaces.

Also text block "left padding" entity was eliminated. If we have
some spaces in the start of the text block (for example a text block
after a link) we just add an empty word and mark those spaces as its
right padding.
2017-02-26 21:02:45 +03:00