Fix#3124Fix#3004
Instead of loading a set 7 days of history. Better performance when there are lots of messages, and better context when friends haven't talked in over a week.
Removed historyBaselineDate, introduced in deb8440c6a to fix duplicate messages, but duplicate messages were very likely fixed by https://github.com/qTox/qTox/pull/4607.
Also refactored history loading.
Fix#4853Fix#4295
*Instead of searching strictly valid URIs, allow anything characters following scheme. This allows for UTF-8 characters used in other languages, as well as parentheses and other ASCII characters. This will over-match some invalid URLs.
*Ignored surrounding characters of URIs and ending punctuation
*Fix www-only links by adding http scheme to href
Brief list of changes:
- changed way of getting count of formatting symbols for captured
string: patternSignsCount() function replaced with constant index
which points to regex group that captures formatting symbols.
Regexes updated accordingly;
- updated docs for applyMarkdown() function;
- applyMarkdown() function refactored:
* changed var names;
* logic is more strict: get captured string -> crop formatting symbols
if necessary -> wrap captured string into HTML and replace in result.
Brief list of changes:
- removed several headers;
- added single array of pairs for direct mapping regexes to HTML
wrapper strings;
- COMMON_PATTERN splitted into two regexes;
- wrapper for hrefs is a single constant.
Brief list of changes:
- removed workarounds while applying markdown;
- URL highlighting now is independent for markdown support;
- URL patterns reverted to the state they were before.
The original reason that the Qt picker was used instead of the native
picker was that the native option would cause Nautilus/GNOME-based
pickers to hang.
This turned out to be due with a Qt bug with parenting Gtk windows. As a
result the parent of each file dialog window has been set to NULL,
eliminating the crash. As far as tests have shown, this produces no
adverse effects on either floating or tiling wms.
Fixes#3494
Fix#4275
I did not consider that replacing one substring with another will point
to shifting position of next URL found with regexp. That's the behavior
of Qt's "QRegularExpression" class - it takes a string into constructor
and seems to make its copy inside so changing source string does not
affect this regex object
Fix#4242
Just running in a loop through all of markdown symbols in found URL's,
replacing them with their associated HTML character code before the code
formatting to avoid any chance of interception
Brief list of changes:
- names of some variables and constants were replaced for reading
convenience;
- URL-highlighting method moved to TextFormatter so URL's don't
conflict with italic text formatting;
- as I understand, in previous version 'file://' URL does not work
because of bad regex. I fix this with help of wiki page that
referenced in comment for old code. Important note: there are two
equal 'file://' URL syntax: 'file:///...' and 'file://localhost/...'
and the second one does NOT work in KDE but works in Gnome so that's
not a bug
Fix#4233
Added class provides text font formatting with HTML font tags
Supported stuff:
- nested formatting;
- several text pieces formatted with the same formatting style at the
one message;
- styling applies only if non-whitespace symbol follows opening
formatting symbol and also non-whitespace symbol preceds closing
symbol;
- only multiline code font formatting supports new line inside of
message text.
Also fix#3804
Revert needed, since otherwise there is no way to do automatic sorting
of includes.
Also reverted change to the docs, as leaving it would make incorrect
docs.
In case of conflicts, includes were sorted according to the coding
standards from #3839.
This reverts commit b4a9f04f92.
This reverts commit 5921122960.