src: Yearly copyright bump This time on time!
Add button and bindings for striking through text This includes icons and a small regex fix from @digitalcircuit
src: Yearly copyright bump Let's welcome 2020.
multilineedit: handle unterminated mIRC codes Currently, if an unterminated mIRC code is pasted into Quassel, trying to go through input line history will cause a deadlock. This breaks the loop at the cost of possibly mangling the formatting of the line somewhat. This is seen as more acceptable than locking up, and the line is invalid anyway. Reproducer: ```sh printf '\00303,08HONK' | xclip -selection clipboard ``` Paste into Quassel, send, press Up arrow key. Bug originally found by @sroracle, reported to Adélie Linux, patched by yours truly.
src: Yearly copyright bump ... and it's still January!
modernize: Reformat ALL the source... again! It's been more than six years since we last used an autoformatter on the codebase. Tooling has progressed, so has the language and of course our personal preferences. Use clang-format this time to reformat the whole codebase, following the rules laid out in .clang-format (which one can use for configuring an IDE, too, if it supports autoformatting). Overall, the new style is not too different from what we used before, with one significant change: We now attach pointer/reference indicators (*&) to the type rather than the name, i.e. we left-align. While this is a major deviation from the Qt style which we use for almost everything else, it aligns more closely with many other projects, as well as the C++ documentation and STL. It also makes more sense semantically, because */& are really part of the type. Other changes include (but are not limited to): - Use only one blank line between function definitions - Categorize includes from generic/system to local, sorting each category alphabetically. The generic-to-local sort order seems to be more common than the other way round, so we use that. - In .cpp files, the corresponding header is always included first. This is a general recommendation, because it makes it harder to accidentally introduce a reliance on transitive includes in headers. - Consistently break initializers in ctors before the comma, so the commas are left-aligned together with the colon. - Use two spaces between code and trailing comments. Note that sometimes even clang-format gets things wrong. In a few places, formatting was manually fixed; however, reviewing a diff of almost 80k lines is a rather boring task, so we didn't thoroughly go through all the changes. Wrong formatting can always be fixed in follow-up commits, anyway. Note also that we don't intend to re-run clang-format on a regular basis, nor do we want to religiously follow a hardcoded set of rules for new code in the future. Where it makes sense, the rules may be bent in favor of better readability or more pleasing code.
clazy: Convert many old-style connects into function pointer based Since Qt5, signal/slot connections can be expressed using function pointers rather than the SIGNAL/SLOT macros. This is a) much more efficient, and b) provides a compile-time check for the sender and receiver being compatible. Let clazy auto-fix old-style connects where it can. However, a lot of occurrences remain where we'll need manual intervention for one reason or another.
modernize: Use auto where the type is clear from context Apply clang-tidy's modernize-use-auto fix, which uses auto where the type would otherwise be duplicated in the line (e.g. when casting a type, or creating an instance with 'new').
modernize: Use '= default' instead of empty ctor/dtor bodies Also remove lots of unnecessary, empty ctors and dtors.
modernize: Prefer default member init over ctor init Where appropriate, initialize class members in the header rather than in the constructor.
qt4-b-gone: Remove all code supporting Qt < 5.5 and KDE4 Remove compatibility code for Qt versions we no longer support.
uisupport: Allow to disable spell checking Apparently, Sonnet, when used standalone (i.e. not in KTextEdit), does not honor its own setting to disable it by default. Explicitly read the setting when initializing the highlighter, and set its active state accordingly. Provide a context menu option to enable/disable spell check on-the-fly as well. Remove the bogus/unused checkbox in the InputWidget settings page; there is a dedicated settings page for configuring spell checking. Explicitly depend on Sonnet when building with KDE Frameworks (it was transitively depended upon anyway), so we can be sure to offer the Sonnet settings page even when using Frameworks.
Semi-yearly copyright bump It's no longer 2016.
Avoid deprecation warnings with Qt 5.7 The versioned QStyleOption derivatives are deprecated in Qt 5, and Qt 5.7 actually gets noisy about that. So remove these by the unversioned class names.
Prevent the spelling highlighter from disabling itself Resolves GH-241.
Fix multiline textedit not expanding on OS X Fixes #1212. Resolves GH-240.
Bring copyright headers into 2016 That took some time...
Merge pull request #136 from sandsmark/sonnet Add spell-checking support via the Sonnet framework
Merge pull request #151 from Tucos/ws-hist Preserve white-space in the input history.
Preserve white-space in the input history. By default QTextHtmlImporter::appendNodeText replaces white-space characters with a single space and leading white-space is removed. When white-space is set to pre-wrap in the style of the node, it is preserved instead. Given that contents are in a span element, setting white-space to pre-wrap on span makes the setHtml call do the expected thing.