quassel.git
5 years agoqt4-b-gone: Remove bundled sha512 implementation
Manuel Nickschas [Tue, 17 Jul 2018 23:00:58 +0000 (01:00 +0200)]
qt4-b-gone: Remove bundled sha512 implementation

Qt5 supports SHA512 natively, so we no longer need to ship an
external implementation.

5 years agoqt4-b-gone: Remove all code supporting Qt < 5.5 and KDE4
Manuel Nickschas [Tue, 17 Jul 2018 22:42:45 +0000 (00:42 +0200)]
qt4-b-gone: Remove all code supporting Qt < 5.5 and KDE4

Remove compatibility code for Qt versions we no longer support.

5 years agoqt4-b-gone: Remove support for Phonon
Manuel Nickschas [Tue, 17 Jul 2018 20:11:01 +0000 (22:11 +0200)]
qt4-b-gone: Remove support for Phonon

Phonon is superseded by QtMultimedia, which offers everything we need
for playing audio notifications.

5 years agoqt4-b-gone: Remove support for libindicate
Manuel Nickschas [Tue, 17 Jul 2018 20:07:03 +0000 (22:07 +0200)]
qt4-b-gone: Remove support for libindicate

libindicate-qt only exists for the dead Qt4, so remove support
for it.

5 years agocmake: Bump minimum required version of Qt to 5.5.0
Manuel Nickschas [Tue, 17 Jul 2018 21:23:27 +0000 (23:23 +0200)]
cmake: Bump minimum required version of Qt to 5.5.0

This version of Qt is provided in Ubuntu "Xenial" 16.04, which is our
new baseline for distro support.

5 years agocmake: Remove build system support for Qt4/KDE4
Manuel Nickschas [Mon, 16 Jul 2018 22:11:57 +0000 (00:11 +0200)]
cmake: Remove build system support for Qt4/KDE4

In our quest to modernize the codebase, remove support for the
long-dead Qt4 libraries (and consequently, also for integration
into KDE4) from the build system.

5 years agotravis: Add bionic as target distro
Manuel Nickschas [Mon, 18 Jun 2018 17:50:49 +0000 (19:50 +0200)]
travis: Add bionic as target distro

This allows us to test building Quassel against a recent release
of Ubuntu, as well.

5 years agotravis: Add jobs for building against KDE Frameworks
Manuel Nickschas [Mon, 18 Jun 2018 17:27:15 +0000 (19:27 +0200)]
travis: Add jobs for building against KDE Frameworks

Define CMake options in a more generic way, and use this to define
builds against KDE Frameworks.

5 years agotravis: Use docker-based builds, new baseline
Manuel Nickschas [Sun, 17 Jun 2018 17:52:12 +0000 (19:52 +0200)]
travis: Use docker-based builds, new baseline

Perform Linux builds in docker images, which allows us to freely
define the build environment rather than relying on the Travis host
system.

Use Ubuntu 16.04 "Xenial" as the new baseline for Quassel, allowing
us to make use of a more modern toolchain.

Reorganize and modernize travis.yml in general.

5 years agoPost-release version bump 0.14-pre
Manuel Nickschas [Sat, 17 Nov 2018 19:49:54 +0000 (20:49 +0100)]
Post-release version bump

5 years agoBump version for release 0.13.0
Manuel Nickschas [Thu, 15 Nov 2018 23:46:16 +0000 (00:46 +0100)]
Bump version for release

5 years agoUpdate ChangeLog
Manuel Nickschas [Thu, 15 Nov 2018 23:44:51 +0000 (00:44 +0100)]
Update ChangeLog

5 years agoMinor cleanup of BufferView
Manuel Nickschas [Fri, 16 Nov 2018 19:04:01 +0000 (20:04 +0100)]
Minor cleanup of BufferView

Fix some nitpicks.

5 years agoAllow selecting the search result when searching for buffers
Martin T. H. Sandsmark [Mon, 29 Oct 2018 11:52:17 +0000 (12:52 +0100)]
Allow selecting the search result when searching for buffers

If multiple buffers are displayed when filtering by name, allow
selecting one of the using the up/down keys. This makes it possible
to jump to a buffer other than the topmost.

5 years agocommon: Fix syncing of BufferViewManager
Manuel Nickschas [Wed, 7 Nov 2018 20:01:39 +0000 (21:01 +0100)]
common: Fix syncing of BufferViewManager

Two syncable methods where accidentally demoted from being slots,
so adding/removing buffer views would not be synced anymore.

Fix this by making those methods slots again.

5 years agoqtui: Make the debug log a proper dialog
Manuel Nickschas [Tue, 6 Nov 2018 22:46:33 +0000 (23:46 +0100)]
qtui: Make the debug log a proper dialog

For some reason unbeknownst and shrouded in ancient mystery, the
debug log was displayed in a naked widget, which caused it to not
be rendered in a window when using not-so-smart window managers
(such as Windows™).

Make the debug log a proper dialog, and also fix the close button
not being part of a platform-agnostic QDialogButtonBox, while we're
at it.

5 years agocore: Avoid Clang warning for inconsistent override
Manuel Nickschas [Thu, 1 Nov 2018 09:09:35 +0000 (10:09 +0100)]
core: Avoid Clang warning for inconsistent override

5 years agoircuser: Fix setting of away message time by pre-0.13 cores
Manuel Nickschas [Tue, 30 Oct 2018 16:26:43 +0000 (17:26 +0100)]
ircuser: Fix setting of away message time by pre-0.13 cores

IrcUser::setLastAwayMessage() is called by pre-0.13 cores (newer
cores call setLastAwayMessageTime() instead). Fix wrong use of
QDateTime::from[M]SecsSinceEpoch(), which is a static method returning
a new QDateTime instance rather than a modifying setter.

Also fix signatures passing primitive types as const refs.

5 years agoqtui: Disable web preview by default
Manuel Nickschas [Tue, 30 Oct 2018 19:07:44 +0000 (20:07 +0100)]
qtui: Disable web preview by default

Upon popular request, disable the web preview by default. This
feature tends to surprise unwitting new users that just happen
to hover over a questionable link, and the preview's functionality
is limited anyway with today's complex websites.

The web preview can still be enabled explicitly in chatview settings.
Existing configurations are unaffected by this change.

5 years agoFix the order of the Davids
David ‘Bombe’ Roden [Mon, 22 Oct 2018 14:04:16 +0000 (16:04 +0200)]
Fix the order of the Davids

5 years agoBump version for release 0.13-rc2 build/0.13-rc2
Manuel Nickschas [Mon, 15 Oct 2018 17:51:51 +0000 (19:51 +0200)]
Bump version for release

5 years agoUpdate ChangeLog
Manuel Nickschas [Mon, 15 Oct 2018 17:51:00 +0000 (19:51 +0200)]
Update ChangeLog

5 years agocommon: Remove left-overs from signal handling rework
Manuel Nickschas [Sun, 14 Oct 2018 19:39:03 +0000 (21:39 +0200)]
common: Remove left-overs from signal handling rework

Remove some remnants of the old code that were missed when pushing
the reworked implementation.

5 years agoclient: For filter, prioritize exact, startsWith
Shane Synan [Sat, 6 Oct 2018 18:53:59 +0000 (13:53 -0500)]
client: For filter, prioritize exact, startsWith

When filtering buffer view results, prioritize exact string matches,
then prioritize startsWith matches, both case-insensitive.  Within
these results, sort normally (e.g. alphabetical).

This gives weight to exact matches and the start of the string.  When
no filter string is specified, sorting goes back to normal.

Search string: "car"
Before:
> acar
> bcar
> careful
> caring
> racecar
> car [hidden]

After:
> car [hidden]
> careful
> caring
> acar
> bcar
> racecar

Where [hidden] represents a buffer that's temporarily or permanently
hidden.

5 years agoclient: Sort network name case-insensitively
Shane Synan [Sat, 6 Oct 2018 17:48:20 +0000 (12:48 -0500)]
client: Sort network name case-insensitively

Set BufferViewFilter to sort case-insensitively.  This results in
network names being sorted regardless of case.  Channel/nickname
sorting is handled elsewhere.

Before:
> Alpha
> Freenode
> beta

After:
> Alpha
> beta
> Freenode

This probably matches expectations better, and hopefully doesn't
break existing workflows too much...  https://xkcd.com/1172/

5 years agocommon: Don't use unsafe functions when handling POSIX signals
Manuel Nickschas [Fri, 5 Oct 2018 21:07:04 +0000 (23:07 +0200)]
common: Don't use unsafe functions when handling POSIX signals

The set of functions we're allowed to safely use in a POSIX signal
handler is very limited, and certainly does not include anything Qt.
While our previous implementation seemingly worked anyway as long as
all it did was quitting the application, we now start seeing issues
when doing a proper shutdown.

Fix this by providing a generic API for watching signal-like external
events that can be specialized for the various platforms we support.
Provide PosixSignalWatcher, which uses socket notification to safely
hand over control from the signal handler to the Qt event loop.

Also provide an implementation for Windows that still uses the
previous approach; since Windows doesn't support socketpair(), we
can't easily reuse the POSIX implementation. On the bright side, so
far we don't know if signal handlers on Windows face the same
limitations as on POSIX anyway...
Also on Windows we now support console events, i.e. Ctrl+C as well
as closing the console window.

5 years agoqtui: Don't parent dialogs created on the stack
Manuel Nickschas [Thu, 4 Oct 2018 10:52:42 +0000 (12:52 +0200)]
qtui: Don't parent dialogs created on the stack

Dialogs that are created on the stack should not have a parent,
lest they get double-deleted if the main window is destroyed while
such a dialog is still open.

5 years agoRevert "qtui: Don't create parented dialogs on the stack"
Manuel Nickschas [Thu, 4 Oct 2018 10:19:54 +0000 (12:19 +0200)]
Revert "qtui: Don't create parented dialogs on the stack"

Auto-deleting dialogs is a bad idea if we're accessing the instance
after exec(). We could work around this in the affected cases,
however it may be easier and cleaner to create the dialogs on the
stack again, but don't parent them to avoid the crashes we intended
to fix with this commit.

This reverts commit 4e452ee828fdb411e6b1db07c18e02681a30ff27.

5 years agocommon: Don't warn on unknown user in IrcChannel
Manuel Nickschas [Sat, 29 Sep 2018 17:47:05 +0000 (19:47 +0200)]
common: Don't warn on unknown user in IrcChannel

When quitting a channel, the IrcChannel instance may still be
receiving pending events for IrcUsers that have already been removed.
Don't log a warning in this case, because it doesn't help and confuses
users.

5 years agocore: Fix quitting from networks on shutdown
Manuel Nickschas [Sat, 29 Sep 2018 17:38:43 +0000 (19:38 +0200)]
core: Fix quitting from networks on shutdown

The previous implementation relied on processEvents() to let the
QUIT command be sent to the IRC server. However, processEvents()
does not guarantee that it processes all events (also in other
threads), and indeed, the previous approach was not reliable.

Fix this by waiting for the networks to emit the disconnected()
signal after requesting the quit. There already is a 10 second
timeout in case the IRC server does not close the socket within
a reasonable time, so rely on that. Also ensure that connect requests
are ignored during shutdown.

With the CoreSession requesting a clean shutdown, we no longer need
a similar handling in CoreNetwork's dtor, so remove this.

See also GH-203 and GH-207, which were previous attempts on getting
this right.

5 years agocore: Allow clean shutdown of the core
Manuel Nickschas [Sat, 29 Sep 2018 15:31:42 +0000 (17:31 +0200)]
core: Allow clean shutdown of the core

Relying on things to happen while the core is being destroyed is
fragile (and does not work in practice), because events are no
longer delivered to objects that are scheduled for deletion.

Add an explicit call for shutting down the core, its sessions and
their networks. Wait for everything to be cleaned up properly before
quitting the session threads, and ultimately shutting down the main
event loop.

While we're at it, refactor SessionThread to follow the worker
pattern, rather than inheriting from QThread. This avoids accidentally
calling slots in the wrong thread. Ensure that all cross-thread
communication happens through queued signals. Simplify the API, too.

5 years agoqtui: Fix quit sequence and lifetime issues
Manuel Nickschas [Sat, 29 Sep 2018 09:52:12 +0000 (11:52 +0200)]
qtui: Fix quit sequence and lifetime issues

Make use of the Singleton mixin for Client and GraphicalUi. Fix
ownership and explicitly construct and destroy the pseudo singletons.
Remove some static init methods in favor of initializing in the
constructor where possible. We still need delayed initialization
of the main UI however, so GraphicalUi::init() has to stay.

Simply calling QCoreApplication::quit() doesn't clean up properly,
because it immediately stops event processing, which means that
any deferred deletions won't be processed anymore.

Since we perform some important and asynchronous tasks during
shutdown, such as saving settings and properly unregistering from
IRC, we really want proper cleanup, though.

Fix this by relying on Quassel::quit() instead, and registering
appropriate quit handlers that shut down the client in orderly
and controlled fashion. Ensure that all open windows and dialogs
are closed prior to MainWin's destruction.

Core shutdown warrants a more complex approach, which will be
implemented in a follow-up commit.

5 years agogit: Update .gitignore
Manuel Nickschas [Fri, 28 Sep 2018 20:54:15 +0000 (22:54 +0200)]
git: Update .gitignore

Actually hide project files from Qt Creator, as well as KDevelop.

5 years agocore: Use the Singleton mixin for the Core instance
Manuel Nickschas [Fri, 28 Sep 2018 20:28:33 +0000 (22:28 +0200)]
core: Use the Singleton mixin for the Core instance

Instead of implementing the instance pointer manually, use the
Singleton mixin.

5 years agocommon: Prepare Quassel::quit() to be used more widely
Manuel Nickschas [Fri, 28 Sep 2018 20:24:33 +0000 (22:24 +0200)]
common: Prepare Quassel::quit() to be used more widely

In the future we want to use Quassel::quit() as the central entry
point for cleanly quitting the application, instead of relying
on QCoreApplication::quit(), which directly stops the event loop
and thus won't process any asynchronous cleanup tasks.

Make the slot public, and protect against multiple invocations.

5 years agocommon: Use the Singleton mixin for the Quassel instance
Manuel Nickschas [Fri, 28 Sep 2018 19:41:31 +0000 (21:41 +0200)]
common: Use the Singleton mixin for the Quassel instance

Make use of the newly added Singleton mixon to remove the custom
handling of Quassel's instance pointer. Clearly define Quassel's
lifetime by making it a local instance in main(), rather than
relying on someone to call Quassel::instance() at the right time.

Now it is also clear that the instance is deleted after main()
returns (which was the case before, however there still was a no-op
Quassel::destroy() method too, which has now been removed). This
is fine, because Quassel does not own resources that should be deleted
before exiting the event loop.

5 years agocommon: Provide Singleton mixin for handling pseudo singletons
Manuel Nickschas [Fri, 28 Sep 2018 19:17:32 +0000 (21:17 +0200)]
common: Provide Singleton mixin for handling pseudo singletons

We have several singleton and pseudo-singleton classes in Quassel.
A pseudo singleton can be constructed and destroyed in a controlled
manner, but can be accessed through a static instance pointer while
it is alive. As an example, QCoreApplication behaves like this.

In order to avoid duplication and unify the behavior of our singletons
in the future, provide a mixin. Classes can inherit from this and gain
an instance() method, as well as protection against multiple
instantiation and access outside of the object's lifetime.

5 years agocommon: Don't warn when "closing" InternalPeer
Manuel Nickschas [Thu, 27 Sep 2018 22:56:35 +0000 (00:56 +0200)]
common: Don't warn when "closing" InternalPeer

InternalPeer may be closed legitimately like any other peer type.
Although for InternalPeer this just sets a flag, it should not
produce a warning claiming that the method is not implemented.

Also actually report the open status for InternalPeer. Ensure that
it is constructed in open state, otherwise a signalproxy cannot
be set.

5 years agoqtui: Don't create parented dialogs on the stack
Manuel Nickschas [Wed, 26 Sep 2018 22:09:26 +0000 (00:09 +0200)]
qtui: Don't create parented dialogs on the stack

Create dialogs in MainWin on the heap, rather than on the stack.
This avoids crashes when MainWin is destroyed while a dialog is
open (in which case a double free would happen).

Set the WA_DeleteOnClose attribute on affected dialogs so they will
be deleted upon close, rather than hanging around in memory until
shutdown.

5 years agocommon: Avoid crash on SignalProxy destruction
Manuel Nickschas [Tue, 25 Sep 2018 22:47:14 +0000 (00:47 +0200)]
common: Avoid crash on SignalProxy destruction

Since SignalProxy itself attaches a slot, it will try to detach
itself on destruction, leading to a crash. Avoid this by checking
for self-detachment.

5 years agoClean up translator attributions
Daniel Albers [Mon, 24 Sep 2018 20:58:52 +0000 (22:58 +0200)]
Clean up translator attributions

5 years agoRemove empty translation files
Daniel Albers [Tue, 12 Sep 2017 22:06:01 +0000 (00:06 +0200)]
Remove empty translation files

- es_AR
- et_EE
- id_ID
- uz@Latn
- zh_TW

5 years agoUpdate quassel.pot
Daniel Albers [Wed, 20 Dec 2017 04:00:06 +0000 (05:00 +0100)]
Update quassel.pot

5 years agoUpdate translations from Transifex
Daniel Albers [Tue, 5 Sep 2017 03:00:24 +0000 (05:00 +0200)]
Update translations from Transifex

  27958 translated messages

Many thanks to:
 - cs: Jaroslav Lichtblau <dragonlord@seznam.cz>
 - da: Joe Hansen <joedalton2@yahoo.dk>
 - de: Steve M <transifex@lostinweb.eu>
 - el: Theofilos Intzoglou <int.teo@gmail.com>
 - eo: Tinjo Kohen <tiffypet@yahoo.com>
 - es: Chris Egeland <chris@chrisegeland.com>, Javier Llorente
   <javier@opensuse.org>
 - fi: Lasse Liehu <larso@gmx.com>
 - fr: Guillaume Gay <guillaume.gay@gmail.com>, Olivier Caron
   <crn.olivier@gmail.com>, Zoddo <transifex.com@zoddo.fr>
 - hi: Raju Devidas Vindane <rajuvindane@gmail.com>
 - ko: Tae-Hoon KWON <zerolaunch@naver.com>, Sungjin Kang <potopro@gmail.com>
 - lt: Liudas Ališauskas <liudas.alisauskas@gmail.com>
 - mr: Raju Devidas Vindane <rajuvindane@gmail.com>
 - nb: Chris Egeland <chris@chrisegeland.com>, sandsmark
   <inactive+sandsmark@transifex.com>
 - nl: Joep Seuren <joepseuren1@gmail.com>
 - pa: A S Alam <apreet.alam@gmail.com>
 - pl: Miłosz Rachwał <transifex@milek7.pl>, derpella <matwa@poczta.pl>
 - pt: Vitor Luis <ptirc@protonmail.com>
 - pt_BR: André Marcelo Alvarenga <alvarenga@kde.org>, Lucas A. V. Dantas
   <lucasdantas@yandex.com>
 - ro: Arthur Țițeică <arthur.titeica@gmail.com>, Sergiu Bivol <sergiu@cip.md>
 - ru: Svetlana Tkachenko <svetlana@members.fsf.org>, Viktor Suprun
   <popsul1993@gmail.com>, Yaroslav Veremenko <yaroslav@veremenko.info>
 - sl: Andrej Mernik <andrejm@ubuntu.si>
 - tr: Demiray “tulliana” Muhterem <mdemiray@msn.com>, Volkan Gezer
   <volkangezer@gmail.com>
 - uk: Yuri Chornoivan <yurchor@ukr.net>
 - zh_CN: leonfeng <chaofeng111@qq.com>

5 years agoUpdate Transifex URL
Daniel Albers [Thu, 29 Mar 2018 11:39:05 +0000 (13:39 +0200)]
Update Transifex URL

5 years agoqtui: Fix load/save states of SonnetSettingsPage
Manuel Nickschas [Mon, 17 Sep 2018 21:50:18 +0000 (23:50 +0200)]
qtui: Fix load/save states of SonnetSettingsPage

Call the base class functions to ensure that the changed state is
reset properly.

Unfortunately, the Sonnect::ConfigWidget does not allow for direct
comparison of settings, so toggling a setting will still not
reset the changed state; but at least loading or resetting now will.

5 years agocore: Remove away-notify hack for non-spec server
Shane Synan [Fri, 14 Sep 2018 19:54:31 +0000 (14:54 -0500)]
core: Remove away-notify hack for non-spec server

Remove the AutoWho-on-JOIN hack for IRC servers that do not fully
comply with the "away-notify" spec by not sending ":AWAY :message"
when a user marked /away joins a channel.

Advantages:
* Less network traffic (no WHO for every nickname that joins)
* Less likely to expose other bugs where an IRC server returns
  something unexpected causing auto-who output to go in the status
  buffer

Disadvantages:
* On non-compliant IRC servers, Quassel will no longer accurately
  know the away status of someone that joins a channel while /away
* On IRC servers that implement "away-notify" but not
  "extended-join", Quassel will no longer learn the logged-in account
  and realname for someone that joins a channel
  (This will break showing realname, fallback avatar fetching)

Remove all functions related to automatic nickname WHO'ng as they are
no longer needed.  Leaving them in wouldn't cause any issues other
than unnecessary work and code clutter.

Add a comment pointing to this commit in case someone decides to
resurrect this workaround.

See https://ircv3.net/specs/extensions/away-notify-3.1.html
And https://bugs.unrealircd.org/view.php?id=5144

5 years agocore: Clean up AutoWho comments, variable names
Shane Synan [Fri, 14 Sep 2018 18:51:40 +0000 (13:51 -0500)]
core: Clean up AutoWho comments, variable names

Clean up AutoWho variable names using the "name" convention from
RFC 1459.

Clean up AutoWho comments likewise, referring to "name" instead of
"channel" where appropriate.

See https://tools.ietf.org/html/rfc1459#section-4.5.1

5 years agocore: Cancel nickname AutoWho on IrcUser quit
Shane Synan [Thu, 13 Sep 2018 06:34:44 +0000 (01:34 -0500)]
core: Cancel nickname AutoWho on IrcUser quit

Remove any queued AutoWho for <nickname> if <nickname> quits.  This
avoids sending a needless AutoWho for <nickname> that'll only either
result in "No such nickname" if we're lucky, or random results for
non-extended WHO if <nickname> happens to match the realname/etc of
other IRC users.

This should fix any remaining cases of join/quit resulting in AutoWho
output in the Status Buffer for a network.

5 years agocore: AutoWhoX, only search nickname by nickname
Shane Synan [Thu, 13 Sep 2018 07:00:17 +0000 (02:00 -0500)]
core: AutoWhoX, only search nickname by nickname

When running automatic WhoX, explicitly specify "n" to search by
nickname only.  Don't rely on server defaults.  This fixes an issue
with Quassel's autoWHO causing noise in the Status Buffer uncovered
by InspIRCd 3.0's implementation of WhoX that follows the spec.

Fix up incorrect attempt to escape "%" as "%%".  Apparently,
QString::arg() doesn't need to escape this.

Before: WHO <nickname> %%chtsunfra,<unique_number>
After:  WHO <nickname> n%chtsunfra,<unique_number>

See https://github.com/quakenet/snircd/blob/master/doc/readme.who
And https://doc.qt.io/qt-5/qstring.html#arg

Thanks to @genius3000 for reporting and tracking down this issue!

Fixes #1487

5 years agosettings: Fix NetworkAddDlg states on type change
Shane Synan [Wed, 12 Sep 2018 23:57:44 +0000 (18:57 -0500)]
settings: Fix NetworkAddDlg states on type change

Add check for button states when changing between "Use preset" and
"Manually specify network settings".

This fixes the "OK" button remaining enabled when adding a network
and selecting manual, and also fixes re-enabling the "OK" after
switching back to presets.

5 years agoutil: Remove T separator from ISO 8601 (RFC 3339)
Shane Synan [Wed, 12 Sep 2018 22:54:25 +0000 (17:54 -0500)]
util: Remove T separator from ISO 8601 (RFC 3339)

Remove the "T" separator when formatting ISO 8601 date/time to
strings.  This improves readability without sacrificing machine
parsing, remaining compliant with RFC 3339.

Technically ISO 8601 specification states "T" can only be omitted,
but that makes readability even worse.

Example:
> Before: 2018-08-22T18:43:10-05:00
> After:  2018-08-22 18:43:10-05:00
          ..........^ (10th character)

NOTE:  Qt's own ISO 8601 parsing of strings to QDateTime will not
handle this correctly.  Custom format strings can be used, or just
replace the " " with "T" again.

See https://en.wikipedia.org/wiki/ISO_8601#cite_note-32

4.3.2 NOTE: By mutual agreement of the partners in information
interchange, the character [T] may be omitted in applications where
there is no risk of confusing a date and time of day representation
with others defined in this International Standard.

And https://www.ietf.org/rfc/rfc3339.txt

NOTE: ISO 8601 defines date and time separated by "T".
      Applications using this syntax may choose, for the sake of
      readability, to specify a full-date and full-time separated by
      (say) a space character.

Fixes #1456

5 years agoqa: Don't return a const ref from Settings::localValue()
Manuel Nickschas [Mon, 10 Sep 2018 21:24:07 +0000 (23:24 +0200)]
qa: Don't return a const ref from Settings::localValue()

Stumbled on this by accident because one particular CI configuration
warned about Settings::localValue() returning a stack reference
(may happen if the default value (which is a const ref itself) is
returned).

Not sure why I don't see this warning in my own setup, but it's
legitimate; thus fix the issue.

5 years agoChange to an early continue for a NULL IrcUser
Matt Schatz [Sun, 9 Sep 2018 18:27:37 +0000 (12:27 -0600)]
Change to an early continue for a NULL IrcUser

Commit e9096505f07fc0c08a7c36f3680c1fde975d4f80 changed the behaviour
in joinIrcUsers() from skipping a NULL IrcUser or an already tracked
IrcUser to updating the usermodes of said IrcUser. The call to
addUserMode() will call isKnownUser() which will log a warning
of 'received IrcUser Nullpointer' and return false. This is safe
from crashing, but shouldn't be allowed to happen.

5 years agoqa: Avoid warning about missing field initializers
Manuel Nickschas [Wed, 5 Sep 2018 20:17:16 +0000 (22:17 +0200)]
qa: Avoid warning about missing field initializers

Some compiler setups throw a warning when default-brace-initializing
UiStyle::Format. Avoid this by explicitly constructing an instance.

5 years agoqa: Try to avoid fall-through warnings
Manuel Nickschas [Wed, 5 Sep 2018 21:12:04 +0000 (23:12 +0200)]
qa: Try to avoid fall-through warnings

GCC8 warns again about some intentional fallthroughs. Try to fix this
by adding comments.

5 years agoqa: Don't compile the expression match tests
Manuel Nickschas [Wed, 5 Sep 2018 20:11:56 +0000 (22:11 +0200)]
qa: Don't compile the expression match tests

Those are not used unless manually hacked in, and compiling them
causes warnings in some compiler setups, so don't compile the
tests at all.

They're still referenced in the CMakeLists.txt and can easily be
added back if desired. Longer term, they'll move into a real
test framework.

5 years agoclang-tidy: Avoid another bogus warning about a potential leak
Manuel Nickschas [Wed, 5 Sep 2018 19:09:19 +0000 (21:09 +0200)]
clang-tidy: Avoid another bogus warning about a potential leak

False positive, fixed by assigning to an attribute. Seems like
clang-tidy really doesn't like ephemeral objects even if they
have a parent.

5 years agoclang-tidy: Avoid memory leak in MainWin
Manuel Nickschas [Wed, 5 Sep 2018 18:58:46 +0000 (20:58 +0200)]
clang-tidy: Avoid memory leak in MainWin

This one is legitimate: If no network is selected, the freshly
created ChannelListDlg instance is never deleted. Move instantiation
after the network ID check, so the dialog is shown (and self-deletes
on close). Set a parent for good measure, too.

5 years agoclang-tidy: Avoid another warning about potential memory leak
Manuel Nickschas [Wed, 5 Sep 2018 18:53:24 +0000 (20:53 +0200)]
clang-tidy: Avoid another warning about potential memory leak

This is a false positive (since the newly created QFormLayout takes
a widget as its parent), however some slight rearrangement of
code shuts up clang-tidy without resorting to NOLINT.

5 years agoclang-tidy: Avoid potential memory leak in QtUi
Manuel Nickschas [Wed, 5 Sep 2018 18:39:12 +0000 (20:39 +0200)]
clang-tidy: Avoid potential memory leak in QtUi

Clean up the instance handling in QtUi (and GraphicalUi) to ensure
that a newly created QtUi instance is always assigned to the local
_instance variable. Otherwise, clang-tidy warns about a potential
memory leak (although this would not happen in practice).

5 years agoclang-tidy: Remove dead stores
Manuel Nickschas [Tue, 4 Sep 2018 23:13:11 +0000 (01:13 +0200)]
clang-tidy: Remove dead stores

5 years agoclang-tidy: Avoid warnings for calling virtual methods from ctor
Manuel Nickschas [Tue, 4 Sep 2018 22:37:25 +0000 (00:37 +0200)]
clang-tidy: Avoid warnings for calling virtual methods from ctor

MessageFilter and its derivatives call their idString() method
during construction in order to access their settings. This is fine,
but causes (legitimate) warnings in static analysis.

Make the scope explicit when calling idString() to avoid the warning,
and make it clear to readers that we're not interested in the derived
version.

5 years agoclang-tidy: Don't make methods virtual for no reason in SslServer
Manuel Nickschas [Tue, 4 Sep 2018 21:47:44 +0000 (23:47 +0200)]
clang-tidy: Don't make methods virtual for no reason in SslServer

SslServer was calling virtual methods during construction, which is
dangerous. Turns out those methods don't even need to be virtual, so
unvirtualize them.

5 years agoclang-tidy: Add nullptr check
Manuel Nickschas [Tue, 4 Sep 2018 21:26:08 +0000 (23:26 +0200)]
clang-tidy: Add nullptr check

5 years agoclang-tidy: Avoid potential memory leak in BufferViewManager
Manuel Nickschas [Tue, 4 Sep 2018 21:19:22 +0000 (23:19 +0200)]
clang-tidy: Avoid potential memory leak in BufferViewManager

Explicitly delete a freshly created BufferViewConfig in case it cannot
be added, rather than relying on QObject parentship - clang-tidy
warns about that. I'm rather sure that this is a false positive, but
better safe than sorry.

Simplify and clean-up related code a bit.

5 years agoclang-tidy: Reorder NetworkMO attributes to avoid excessive padding
Manuel Nickschas [Mon, 3 Sep 2018 23:31:22 +0000 (01:31 +0200)]
clang-tidy: Reorder NetworkMO attributes to avoid excessive padding

Use a more optimal attribute order to avoid excessive padding in the
NetworkMO struct.

5 years agoclang-tidy: Reorder NetworkInfo attributes to avoid excessive padding
Manuel Nickschas [Mon, 3 Sep 2018 23:18:10 +0000 (01:18 +0200)]
clang-tidy: Reorder NetworkInfo attributes to avoid excessive padding

Use a more optimal attribute order to avoid excessive padding in the
NetworkInfo struct.
Remove the default constructor in favor of direct initialization.
Rewrite the comparison operator using a boolean expression instead
of a bunch of conditions.

5 years agocipher.cpp: Default to CBC instead of ECB
alturiak [Mon, 3 Sep 2018 18:35:20 +0000 (20:35 +0200)]
cipher.cpp: Default to CBC instead of ECB

For security reasons (and compatibility to other irc-client's implementations), default to CBC for blowfish encryption.

5 years agocommon: Add "--debug-irc" to log raw IRC messages
Shane Synan [Mon, 3 Sep 2018 04:36:23 +0000 (23:36 -0500)]
common: Add "--debug-irc" to log raw IRC messages

Add "--debug-irc" command-line option to Core and Monolithic to log
raw IRC messages to the log at Debug level.

Check for raw IRC logging in CoreNetwork and IrcParser, logging
anything sent and received with the Network ID and "<<" for received,
">>" for sent.

Add "--debug-irc-id" to limit raw logging to a specific Network ID,
handy for cores with multiple networks.  This option automatically
applies "--debug-irc".

These usually should be combined with "--loglevel Debug", though the
Monolithic build can show raw IRC messages in the "Debug Log" GUI
without setting that parameter.

CAUTION:  "--debug-irc" will leak all IRC passwords in plain text via
any configured logging receivers (file, syslog, etc) and should not
be used on production servers without taking special care to limit
access to logging output.

Note: The ideal approach is to have the core maintain the most recent
raw IRC logs on a rotating basis, allowing any client to request this
portion of logs on demand.  However, there's a lot more changes
involved, which might not be wise with the goal of stabilizing 0.13.

We should revisit this in the future.

5 years agoclient: Don't store the list of properties in every PropertyMapItem
Manuel Nickschas [Wed, 29 Aug 2018 20:11:46 +0000 (22:11 +0200)]
client: Don't store the list of properties in every PropertyMapItem

It's rather inefficient to store a QStringList in every item, since
it is the same for every type of item anyway. Use a pure virtual
accessor in the base class instead, and return a static QStringList
in every item type.

This prevents the usecase of adding properties dynamically after
creation, but we didn't use that feature anyway, so remove it.

5 years agoclient: Don't send dataChanged() before actually changing the data
Manuel Nickschas [Wed, 29 Aug 2018 19:02:41 +0000 (21:02 +0200)]
client: Don't send dataChanged() before actually changing the data

The PropertyMapItem didn't set a changed property before sending
the signal, so consumers synchronously reacting to dataChanged()
would still access the old value.

Not sure if this issue is the cause for some of the weird model
behavior we tend to see at times...

5 years agocommon: Port local nicks to NickHighlightMatcher
Shane Synan [Sat, 1 Sep 2018 21:37:32 +0000 (16:37 -0500)]
common: Port local nicks to NickHighlightMatcher

Port QtUiMessageProcessor nick highlights to NickHighlightMatcher
class, providing easy caching and simplifying expression handling.

This fixes nickname caching being reset when switching between
networks.

Add SIGNAL/SLOT traversal to pass on information about network
removal to clean up per-network nickname highlight caches, avoiding
memory leaks.

5 years agocommon: Port remote nicks to NickHighlightMatcher
Shane Synan [Sat, 1 Sep 2018 21:36:45 +0000 (16:36 -0500)]
common: Port remote nicks to NickHighlightMatcher

Port HighlightRuleManager nick highlights to NickHighlightMatcher
class, providing easy caching and simplifying expression handling.

This fixes nickname caching being reset when switching between
networks.

Add SIGNAL/SLOT traversal to pass on information about network
removal to clean up per-network nickname highlight caches, avoiding
memory leaks.

5 years agocommon: Add auto-caching NickHighlightMatcher
Shane Synan [Sat, 1 Sep 2018 21:33:03 +0000 (16:33 -0500)]
common: Add auto-caching NickHighlightMatcher

Add NickHighlightMatcher class to unify handling of nick highlight
matching in Quassel, including automatically updating the expression
matcher instance as needed per network.

Cached ExpressionMatch objects are updated on demand after any change
in nickname configuration or active/configured nicks.

This lays the foundation for performance and readibility improvements
in future commits.

5 years agoutil: Remove unused and broken scopeMatch()
Shane Synan [Sat, 1 Sep 2018 21:30:51 +0000 (16:30 -0500)]
util: Remove unused and broken scopeMatch()

Remove scopeMatch() from util.cpp - not only is it no longer needed,
superseded by ExpressionMatch, the scopeMatch behavior broke previous
Quassel functionality.

Details: Channel names can begin with "!", and scopeMatch() does not
support escaping "!" in the beginning of rules.  Escaping support
needs to be added.. but ExpressionMatch can now handle this.  Let us
keep the ugly parser loops confined to one place...

5 years agoclient: Port old HighlightRule to ExpressionMatch
Shane Synan [Sat, 1 Sep 2018 21:29:02 +0000 (16:29 -0500)]
client: Port old HighlightRule to ExpressionMatch

Port QtUiMessageProcessor HighlightRule objects to ExpressionMatch
class, providing easy caching and simplifying expression handling.

Migrate HighlightRule struct into a full-blown class for easier
management and greater assurance over automatic internal cache
management.

Port QtUiMessageProcessor to ExpressionMatch for nickname matching,
providing easy caching and simplifying expression handling.

Add tons of documentation comments, too, and fix up line lengths.

NOTE: Legacy highlight rules lack support for "sender", "ID", and
inverse rules.  There's no technical reason for this, just lack of
developer time.  Feel free to add support in the future!  Just make
sure to not miss any part - I'd suggest simply replacing the legacy
LegacyHighlightRule class in QtUiMessageProcessor with the full one
from HighlightRuleManager, and don't forget to fix
> QtUiMessageProcessor::HighlightRule::operator!=()
...and...
> QtUiMessageProcessor::HighlightRule::determineExpressions()

5 years agocommon: Fix whitespace CTCP ignore invalid index
Shane Synan [Sat, 1 Sep 2018 21:17:33 +0000 (16:17 -0500)]
common: Fix whitespace CTCP ignore invalid index

When constructing a CTCP ignore, check that splitting on whitespace
results in non-empty list before taking from the list.  If it's
empty, fall back to assuming any valid sender, i.e. "*"/".*"
depending on whether the rule is set as wildcard or regex.

This fixes issues when receiving a CTCP with an invalid CTCP ignore
rule such as "  ".

5 years agocommon: Port IgnoreListManager to ExpressionMatch
Shane Synan [Sat, 1 Sep 2018 21:40:21 +0000 (16:40 -0500)]
common: Port IgnoreListManager to ExpressionMatch

Port IgnoreListItem objects to ExpressionMatch class, providing easy
caching and simplifying expression handling.

Migrate IgnoreListItem struct into a full-blown class for easier
management and greater assurance over automatic internal cache
management.

Add tons of documentation comments, too, and fix up line lengths.

Thanks to @sandsmark for the initial efforts towards the
QRegularExpression migration; it helped a lot!

5 years agocommon: Port HighlightRule to ExpressionMatch
Shane Synan [Sat, 1 Sep 2018 21:02:00 +0000 (16:02 -0500)]
common: Port HighlightRule to ExpressionMatch

Port HighlightRule objects to ExpressionMatch class, providing easy
caching and simplifying expression handling.

Migrate HighlightRule struct into a full-blown class for easier
management and greater assurance over automatic internal cache
management.

Port HighlightRuleManager to ExpressionMatch for nickname matching,
providing easy caching and simplifying expression handling.
(Noticing a theme?)

Add tons of documentation comments, too, and fix up line lengths.

5 years agoclient: Handle newlines in Ignore rule scope edit
Shane Synan [Sat, 1 Sep 2018 20:53:16 +0000 (15:53 -0500)]
client: Handle newlines in Ignore rule scope edit

Handle "\n" and ";" as separator in scope rules.  This fixes using
newlines in the Configure Ignore Rule dialog.

Make use of ExpressionMatch::trimMultiWildcardWhitespace() to handle
all of the arcane details, unifying code into one place.

5 years agocommon: Add ExpressionMatchTests unit tests
Shane Synan [Sun, 2 Sep 2018 07:39:30 +0000 (02:39 -0500)]
common: Add ExpressionMatchTests unit tests

Add ExpressionMatchTests class to test the functionality of
ExpressionMatch, helping ensure it works across Qt 4 and Qt 5.

This is implemented as a series of Q_ASSERT()'s as Quassel does not
yet have an actual testing framework.  Once a test framework is
settled on, this class can be migrated to unit tests.

To use ExpressionMatchTests:

1.  Include it in "quassel.cpp"

2.  Call ExpressionMatchTests::runTests() near end of Quassel::init()
// DEBUG: Run tests!
ExpressionMatchTests::runTests();

5 years agocommon: Add auto-caching ExpressionMatch class
Shane Synan [Sun, 2 Sep 2018 16:52:12 +0000 (11:52 -0500)]
common: Add auto-caching ExpressionMatch class

Add ExpressionMatch class to unify handling of various search
expressions in Quassel, including automatically caching the regular
expression instances and providing Qt 4/5 compatibility.

The source expression depends on the matching mode:
* ExpressionMatch::MatchPhrase
Match the entire phrase, looking for whitespace or beginning/end
around either side of the phrase.  No further processing.
* ExpressionMatch::MatchMultiPhrase
Same as MatchPhrase, but split the expression on newlines ("\n") and
treat as match successful if any phrase is found.  This avoids having
to create multiple ExpressionMatch classes just to match multiple
phrases.
* ExpressionMatch::MatchWildcard
Split on ";" and newlines ("\n"), and apply basic wildcard globbing,
with "*" representing any characters and "?" a single character.
Prefixing a section with "!" turns it into an invert-match, negating
any other matching rules.  If only invert-match rules exist, matching
is true unless an invert-rule applies.  "\[...]" escapes the given
character.
* ExpressionMatch::MatchRegEx
Treat expression as a regular expression, inverting if prefixed with
"!" (and not escaped as "\!").

Cached regular expression objects are updated whenever changing any
parameters.

When Qt 4 support is dropped, the QT_VERSION macros can be adjusted.

This lays the foundation for performance and readibility improvements
in future commits.

5 years agoclient: Fix .ui reference to oxygen_icons.qrc
Shane Synan [Thu, 23 Aug 2018 03:41:23 +0000 (22:41 -0500)]
client: Fix .ui reference to oxygen_icons.qrc

Fix ignorelisteditdlg.ui's reference to oxygen_icons.qrc, pointing it
to the new location.

5 years agoWe don't need dbus on Windows
Hannah von Reth [Thu, 30 Aug 2018 21:04:53 +0000 (23:04 +0200)]
We don't need dbus on Windows

5 years agoDon't install clang on appveyor
Hannah von Reth [Thu, 30 Aug 2018 21:02:15 +0000 (23:02 +0200)]
Don't install clang on appveyor

5 years agomacos client: Fix copyright year in Info.plist
Manuel Nickschas [Wed, 29 Aug 2018 20:35:18 +0000 (22:35 +0200)]
macos client: Fix copyright year in Info.plist

5 years agomacos client: fix automatic GPU switching
Davide `rainbow` Gerhard [Wed, 29 Aug 2018 14:37:06 +0000 (16:37 +0200)]
macos client: fix automatic GPU switching

see https://codereview.qt-project.org/#/c/73839/

5 years agocore: Limit "User is away" to 1hr or when changed
Shane Synan [Thu, 23 Aug 2018 02:36:47 +0000 (21:36 -0500)]
core: Limit "User is away" to 1hr or when changed

Increase the "* User is away" silencing to one hour, and add tracking
for changes in away state.  Only print the "* User is away" if away
state has changed since last away message (including removing and
applying the same away message), or if 1 hour has elapsed.

This reduces the spamming of "* User is away" when one often knows
that, yes, the user is away.  Any change in away state or message
will still be shown.

5 years agocommon: Unify Date/Time formatting, UTC offset
Shane Synan [Thu, 23 Aug 2018 00:34:40 +0000 (19:34 -0500)]
common: Unify Date/Time formatting, UTC offset

Unify date/time formatting for the client UI, using
Qt::DateFormat::DefaultLocaleShortDate to respect the operating
system's configured locale.  This avoids Qt's kind-of-weird default
date/time format that mixes numbers and named short months/days.

See https://doc.qt.io/qt-5/qt.html#DateFormat-enum

Modify AM/PM detection to use application locale, which currently
defaults to system locale.  This avoids any inconsistencies should
Quassel later allow specifying an application-wide locale different
from the system locale.

In CTCP VERSION replies, always use UTC time in ISO8601 date format,
avoiding locale-specific replies and timezone differences.  This
fixes client version statistic-tracking software from treating
different languages and different timezones as unique versions of
Quassel IRC.

In CTCP TIME replies, use local time in ISO8601 date format with
timezone offset.  This provides a consistent format for others to
parse and still provides the timezone information.

Work around a Qt bug for the latter.

See https://bugreports.qt.io/browse/QTBUG-26161
And https://stackoverflow.com/questions/18750569/qdatetime-isodate-with-timezone

5 years agosettings: Fix defaults caching, cache key exists
Shane Synan [Wed, 22 Aug 2018 21:46:01 +0000 (16:46 -0500)]
settings: Fix defaults caching, cache key exists

Add separate cache of whether or not a settings key is persisted to
disk, separate from the cache of settings key values.  Modify
localKeyExists() to make use of this cache, offering a potential
slight performance boost.

Fix caching of default values as actual settings values by always
checking if the key is persisted to disk, returning the default value
if not.

This fixes ChatMonitorSettings's "OperationMode" getting set to
"InvalidMode" by ChatMonitorFilter::_operationMode's reading of a
default "InvalidMode", then when loading settings,
ChatMonitorSettingsPage::settings["OperationMode"] would incorrectly
default to "InvalidMode" instead of "OptOut".

Test case:
1.  Start with a fresh configuration.
2.  Open Chat Monitor settings, skipping first-run wizard/etc
3.  Check that "Opt Out" is the default mode
4.  Via qDebug() prints, check that ChatMonitorFilter still sees the
    default value as InvalidMode

5 years agosettings: Unify ChatMonitor defaults
Shane Synan [Wed, 22 Aug 2018 20:43:23 +0000 (15:43 -0500)]
settings: Unify ChatMonitor defaults

Sync ChatMonitor defaults among the three different places to specify
them.  Add a comment to explain.

Unify on disabling showing read messages, enabling showing own
messages.

5 years agoclient: Fix duplicated query quit messages
Shane Synan [Tue, 7 Aug 2018 17:01:39 +0000 (12:01 -0500)]
client: Fix duplicated query quit messages

Replace the .contains() check with std::binary_search on message
timestamps, passing a custom comparator that provides +/- 1000 ms of
fuzzy matching.  If a quit message is received and doesn't exist
within this time range, it gets forwarded to the query, otherwise
discarded.

Remove the QMultiHash method that tracked quit nicknames.  Each query
gets a unique MessageFilter, so there's no need to store and filter
that.  This will need modified if e.g. adding an option for quit
messages in the Chat Monitor.

This fixes an existing bug made much worse with millisecond timestamp
precision.  Before the 64-bit time changes, quit messages would only
be duplicated if they got split over the turn of a second, a rare
occurrence.  Afterwards, they'd get duplicated if split over the turn
of a millisecond, a much more common occurrence.

Fixes regression from commit 6a63070246d89aa2a2474e3a9a1035fa889ad77e

5 years agoqtui: Properly render hovered-upon clickables
Manuel Nickschas [Tue, 24 Jul 2018 21:20:45 +0000 (23:20 +0200)]
qtui: Properly render hovered-upon clickables

Additional formats given to QTextLayout::draw() are not cumulative.
Since we were using this feature for rendering both selections and
active (hovered-upon) clickables, things would break when both
overlapped. In particular, a highlighted *and* selected URL would
vanish while being hovered.

Fix this by explicitly calculating the range of affected formats
for both selections and active clickables, taking overlap into
account. Remove special handling in ContentsChatItem in favor of
the more generic solution.

Use the newly-introduced "hovered" message label to determine how
an active clickable should be rendered, rather than hardcoding
an underline.

5 years agoqss: Introduce new message label "hovered"
Manuel Nickschas [Tue, 24 Jul 2018 21:19:27 +0000 (23:19 +0200)]
qss: Introduce new message label "hovered"

In order to make the appearance of hovered-upon URLs controllable
by stylesheet, add support for a new message label "hovered".

Extend the default stylesheet to underline hovered-upon URLs.

5 years agoqss: Disable color codes in highlighted messages in the default QSS
Manuel Nickschas [Tue, 24 Jul 2018 21:29:18 +0000 (23:29 +0200)]
qss: Disable color codes in highlighted messages in the default QSS

Colored text in highlighted messages may be hard to read due to
the changed background color. Disable overriding the highlight
text color in the default stylesheet.

Custom stylesheets can still enable color codes again by setting
the allow-foreground-override property to true.

5 years agoqa: Remove [[clang::fallthrough]] annotations again
Manuel Nickschas [Wed, 22 Aug 2018 23:46:43 +0000 (01:46 +0200)]
qa: Remove [[clang::fallthrough]] annotations again

These cause warnings in most compilers, so remove them again until
we can use C++17 and the official attribute.

Add comments, so we know the fallthroughs are intentional anyway.

5 years agocore: Remove leftover getAuthUserName and SQL
Shane Synan [Wed, 22 Aug 2018 01:51:40 +0000 (20:51 -0500)]
core: Remove leftover getAuthUserName and SQL

Remove Storage::getAuthUserName(), including PostgreSQL and SQLite.
Remove the corresponding select_authusername.sql files, too.

This avoids unused code and may avoid confusion in the future.  Any
time a username-for-ID is needed, Core::_authUserNames should be
consulted instead.

NOTE: Before using Core::_authUserNames, public functions should be
created and caching should always be done on core startup, instead of
only when --strict-ident mode is enabled.

5 years agosettings: Reset Network SASL status on load
Shane Synan [Tue, 7 Aug 2018 22:25:16 +0000 (17:25 -0500)]
settings: Reset Network SASL status on load

Explicitly reset IRCv3 capability-based network settings whenever
loading network IDs.  This should help guard against situations where
setNetworkCapStates() does not get called with a NetworkId when
loading, resulting in the template text being left visible.

5 years agosettings: Local Highlights, default Current nick
Shane Synan [Mon, 6 Aug 2018 21:31:48 +0000 (16:31 -0500)]
settings: Local Highlights, default Current nick

Re-enable nickname highlighting in Local Highlights by default.  This
fixes the issue of upgrading the client before the core resulting in
loss of nickname highlighting.

Many other options were discussed, such as unifying these settings
(new UI work), automatically toggling/disabling local based on core
features, auto-importing, etc, and though all better approaches, they
will take a good bit more time to implement correctly.  The focus is
on fixing client-side settings properly in 0.14+, with profiles
allowing for different settings per groups of clients, allowing
deprecation of local highlights entirely.

Partial revert of f2e4560b71a1888599ca2153eee36a9b4136c902 and 5fcc2f000757bb7c2578e09c8fc8c86a288c3cb5