Shane Synan [Sun, 13 May 2018 22:07:07 +0000 (17:07 -0500)]
core: Fix 64-bit ID SQLite -> Postgres migration
Change skipSteps and stepSize() from 32-bit int to qint64, avoiding
integer wraparound during backlog reading for migration.
This only gets triggered when a message with a 64-bit ID exists in
the SQLite backlog before migration. One can force this by sending
a message with the text 'MARKER_MSG', then running this on the SQLite
database before migration.
INSERT INTO backlog (messageid, time, bufferid, type, flags,
senderid, senderprefixes, message)
VALUES (
5000000000,
5000000000000,
(SELECT bufferid FROM backlog WHERE message = 'MARKER_MSG'),
1, 1,
(SELECT senderid FROM backlog WHERE message = 'MARKER_MSG'),
"", "Test 64-bit message");
> Before, debug output
SQLi::readMo - skipSteps 42948, start
2147400383, stop
2147450383
SQLi::readMo - skipSteps 42949, start
2147450383, stop -
2147466913
SQLi::readMo - skipSteps 42950, start -
2147466913, stop -
2147416913
...
SQLi::readMo - skipSteps 85898, start -66913, stop -16913
SQLi::readMo - skipSteps 85899, start -16913, stop 33087
SQLi::readMo - MsgId: 1, message: Connecting to chat.freenode.net:...
PSql::writeMo - MsgId: 1, message: Connecting to chat.freenode.net...
> After, debug output
SQLi::readMo - skipSteps 99999, start
4999950383, stop
5000000383
SQLi::readMo - MsgId:
5000000000, message: Test 64-bit message
PSql::writeMo - MsgId:
5000000000, message: Test 64-bit message
Michael Marley [Fri, 9 Mar 2018 17:17:05 +0000 (12:17 -0500)]
Use 64-bit IDs for messages
Increase the length of message IDs from 32 to 64 bits, allowing for
many more total messages be stored. Because messages are synced to
the client, this requires a protocol change. The protocol change is
guarded behind a new feature flag that will retain backwards
compatibility with existing clients, at least until the IDs go above
the maximum for a 32-bit number. At this point, legacy clients will
behave incorrectly or perhaps crash, but this is an acceptable risk
because in the current implementation, this event would cause the
core to behave incorrectly or crash. The client is also still
limited to 32 bits worth of backlog per buffer displayed at once
(due to Qt limitations), but it would be highly unlikely to hit
this limit because the client becomes unusably slow with a small
fraction of that amount of backlog loaded in a single buffer.
For SQLite, no schema change was necessary as SQLite makes no
differentiation between the bitnesses of integers.
For PostgreSQL, this patch also changes senderId to 64-bit, but
this has no effect outside the PostgreSQL database driver.
This patch only changes the message ID to 64-bit. All other IDs
are left at 32 bits because it is either exceedingly unlikely or
technically infeasible to have more than 32 bits worth of entries
in any of the other tables. If, at some point, it is decided that
other IDs should also be 64-bit, the way in which the feature flag
affects (de)serialization will need to be changed. This is because
the flag LongMessageId currently acts upon all IDs inheriting from
SignedId64 and it would be necessary to independently control the
(de)serialization of each ID if other IDs became 64-bit in order to
continue to maintain backwards compatibility. One possible method
of doing this would be to subclass the SignedId64 class for each
ID that inherits from it to allow for separately controlling
(de)serialization for each of the types. I have not implemented
this, however, because of the unlikelihood of any of the other IDs
ever being made 64-bit.
Closes GH-343.
Janne Koschinski [Tue, 8 May 2018 21:49:11 +0000 (16:49 -0500)]
core: Allow configuring DB/auth from environment
Add support for environment variables to configure database and
authenticator backends. This improves using Quassel in a container
-based system as no configuration file needs to be written.
Toggle use of environment variables via a new CLI switch,
'--config-from-environment', which will disregard the core settings
file (if it exists) and use environment variables instead.
New environment variables:
> Backend selection
DB_BACKEND = ["SQLite", "PostgreSQL"]
AUTH_AUTHENTICATOR = ["Database", "LDAP"]
> PostgreSQL connection properties
DB_PGSQL_USERNAME
DB_PGSQL_PASSWORD
DB_PGSQL_HOSTNAME
DB_PGSQL_PORT
DB_PGSQL_DATABASE
> LDAP connection properties
AUTH_LDAP_HOSTNAME
AUTH_LDAP_PORT
AUTH_LDAP_BIND_DN
AUTH_LDAP_BIND_PASSWORD
AUTH_LDAP_BASE_DN
AUTH_LDAP_FILTER
AUTH_LDAP_UID_ATTRIBUTE
Closes GH-341.
Janne Koschinski [Sat, 3 Mar 2018 07:45:31 +0000 (08:45 +0100)]
core: Store session state in database, migrate old
Store core session state in database rather than configuration file.
This improves containerization as the configuration file doesn't need
to be preserved, and also makes database restoration handle restoring
active sessions.
Migrate existing legacy sessions to database storage, ensuring that
the core state fallback is handled correctly, too.
Part of GH-341.
Janne Koschinski [Tue, 8 May 2018 20:50:41 +0000 (15:50 -0500)]
Implement type-filtered backlog fetching
Add new backlog fetching methods that only return messages of the
specified types. This allows clients to only fetch the types of
messages that they need, e.g. if join/part/quit is hidden.
This is not yet used in Quassel itself, but third-party clients
including QuasselDroid use this for better performance on limited
bandwidth networks.
Signed-off-by: Janne Koschinski <janne@kuschku.de>
Closes GH-339.
Shane Synan [Fri, 11 May 2018 06:37:55 +0000 (01:37 -0500)]
core: Fix PostgreSQL realname/avatarurl handling
In insert_message, when selecting a senderid coalesce "realname" and
"avatarurl". This fixes inserting redundant senders due to NULL
values, e.g. messages from the server during connect.
Test case: start up core, client. Connect, check PostgreSQL database
"sender" table. Disconnect, reconnect. There shouldn't be new NULL
senders in the table (e.g. sender set, but NULL realname).
NOTE: The realname/avatarurl columns can be NULL values. Due to
this, we need to coalesce them to '' in order to use the same queries
rather than "column = some value" and "column IS NULL". Both column
and the input parameter need coalesced in case one or the other is
NULL. As there's minimal functional difference in protocol handling
between '' and NULL, we consider them the same.
(This could be squashed down if preferred, I just wanted to document
what was needed to fix this for PostgreSQL, and to simplify figuring
out what to change should a better solution arise.)
Shane Synan [Fri, 11 May 2018 05:36:21 +0000 (00:36 -0500)]
core: Fix SQLite realname/avatarurl handling
In insert_message, when selecting a senderid also match on "realname"
and "avatarurl". This fixes cases where sometimes senderid would
refer to a sender without a realname after a realname was added, etc.
Test case: start up core, client. Send several messages quickly after
joining. Shut down core, check SQLite database "sender" table.
Before this fix, once a sender entry is put in, sometimes
permutations of realname/avatarurl would NOT create a new sender
entry, clearly visible in QuasselDroid's display of of the realname.
After this fix, changing realname/avatarurl causes new sender entries
to be added every single time there's a change, as expected, and they
display correctly in QuasselDroid.
PostgreSqlStorage was immune to this, but for once, not due to being
a better database, but due to how the queries are constructed. For
PostgreSQL, senders were always fetched separately, properly checking
avatarurl and realname.
NOTE: The realname/avatarurl columns can be NULL values. Due to
this, we need to coalesce them to '' in order to use the same queries
rather than "column = some value" and "column IS NULL". Both column
and the input parameter need coalesced in case one or the other is
NULL. As there's minimal functional difference in protocol handling
between '' and NULL, we consider them the same.
(This could be squashed down if preferred, I just wanted to document
what was needed to fix this and why only SQLite was changed.)
Janne Koschinski [Tue, 8 May 2018 20:17:38 +0000 (15:17 -0500)]
Implement sender realname/avatarurl storage
- Store sender realname and avatarurl in database
- Guard protocol changes behind feature flag 'RichMessages'
- Avatar URLs are not actually stored yet, as we do not implement
METADATA yet.
This is not yet used in Quassel itself, but third-party clients
including QuasselDroid use this to provide more context in messages
and allow for realname-based fallback avatar fetching to work in the
chat message backlog.
Incorporates suggestions from @mamarley.
Closes GH-351.
Janne Koschinski [Tue, 10 Apr 2018 23:58:09 +0000 (01:58 +0200)]
protocol: Implement 64-bit message timestamps
Add serialization and feature flag for 64-bit message timestamp.
Avoids a Y2038 problem and offers higher message time accuracy.
Closes GH-340.
Janne Koschinski [Tue, 8 May 2018 18:36:25 +0000 (13:36 -0500)]
Store highlight status per buffer coreside
- Add highlightCount to buffersyncer, same as with buffer activities
- If this value is increased, it is synced with clients, and they add
it to the buffer status, showing it in orange
- This allows you to see highlights even if they are not loaded in
initial backlog, but only core-side highlights.
Closes GH-333.
Michael Marley [Tue, 8 May 2018 18:49:33 +0000 (13:49 -0500)]
Persist Blowfish keys in the database
Add a new text field called "cipher" and store the hex-encoded
cipher key there whenever a new key is set or exchanged. Also,
when each network is initialized, load the ciphers out of the
database and initialize the in-memory hashmap. Then, the existing
behavior of each CoreIrcNetwork automatically using these keys
upon construction occurs.
Additionally, this makes PM buffer ciphers persistent both across
destruction/construction and across core restarts.
Note that the existing "key" field in the database is confusingly
named. It does not contain any sort of cryptographic key but
instead holds channel passwords.
Closes #1473
Closes GH-332.
Manuel Nickschas [Thu, 17 May 2018 19:37:46 +0000 (21:37 +0200)]
core: Avoid confusing log message when legacy client connects
Older clients don't report the features they support, which resulted
in a log message listing all features as missing if such a client
connected.
Handle this special case by checking if any client feature is enabled,
and if not, providing a different log message to avoid user
confusion.
Janne Koschinski [Tue, 17 Apr 2018 02:08:10 +0000 (04:08 +0200)]
Fixes the Highlight Rule Manager
- Previously, sync calls included the new HighlightNickType
- This causes deserialization trouble in older clients
- Now int is used, and the data is static_cast'd back and forth
Manuel Nickschas [Mon, 7 May 2018 20:20:10 +0000 (22:20 +0200)]
Some cleanups
* Use properly camel-cased method names
* Use override instead of virtual to avoid warnings
* Simplify some code
Closes GH-348.
Michael Marley [Wed, 4 Apr 2018 12:25:14 +0000 (08:25 -0400)]
Cache strict sysident mappings
To avoid unnecessary database hits, we store a mapping of all permitted
strict sysidents in memory. This mapping is reloaded on SIGHUP.
A miss will make a call to the database.
Co-authored-by: Sai Nane <esainane+github@gmail.com>
Co-authored-by: Michael Marley <michael@michaelmarley.com>
Michael Marley [Tue, 3 Apr 2018 18:21:11 +0000 (14:21 -0400)]
Add strict-oidentd mode
This mode is disabled by default. When specified, this restricts
authoratative ident responses to be the authuser account name.
This is a cut-down version of,
https://github.com/quassel/quassel/pull/164 which was originally
authored by @esainane. @AlD requested that the database schema
change be removed, but the request fell dormant and was eventually
closed. This version removes the schema change as requested,
always using the user's core username as the ident when enabled.
Co-authored-by: Sai Nane <esainane+github@gmail.com>
Co-authored-by: Michael Marley <michael@michaelmarley.com>
Michael Marley [Sat, 31 Mar 2018 18:06:16 +0000 (14:06 -0400)]
Add support for Elliptic Curve keys for CertFP
This functionality is controlled by a feature flag so that clients
supporting EC keys won't try to set an EC key on a core that
doesn't. As with the previous EC patch, this requires Qt 5.5 to
work but uses the QT_VERSION macro to remain compileable with Qt4.
This patch also fixes the QSsl::KeyAlgorithm indices to be correct
for both Qt4 and Qt5. In Qt4, RSA was 0 and DSA was 1, but in Qt5
0 became Opaque, 1 because RSA, and two became DSA. EC is 3 and
wasn't added until 5.5. The new macro handles all three versions
correctly. (See https://doc.qt.io/qt-5/qssl.html#KeyAlgorithm-enum
and https://doc.qt.io/archives/qt-4.8/qssl.html#KeyAlgorithm-enum.)
Thanks to @justJanne for pointing out this discrepancy.
Closes GH-347.
Manuel Nickschas [Thu, 3 May 2018 21:19:34 +0000 (23:19 +0200)]
cmake: Fix build with Qt 5.11
Qt 5.11 removes the qt5_use_modules function, so add a copy. If
present, the Qt-provided function will be used instead.
Closes GH-355.
romibi [Tue, 23 Jan 2018 00:17:42 +0000 (01:17 +0100)]
Improve channel navigation shortcut in some cases
Select first/last if nothing selected yet
Enable wrap around navigation
Closes GH-323.
genius3000 [Thu, 11 Jan 2018 04:54:41 +0000 (21:54 -0700)]
core: handleMode: Fix persistent modes reset
The check for '-reset' currently comes after a bufferName is
prepended to params, therefore never being true.
Move this check to be first and add a reply to the client.
Closes GH-322.
Janne Koschinski [Wed, 11 Apr 2018 01:16:21 +0000 (03:16 +0200)]
Fix support for extended features on Qt4
- On Qt4, Q_ENUMS can *not* handle enum class, but only enum
- This patch adds an #ifdef to only use enum class on Qt5
Closes GH-352.
Manuel Nickschas [Mon, 23 Apr 2018 21:37:04 +0000 (23:37 +0200)]
Update ChangeLog
Manuel Nickschas [Mon, 23 Apr 2018 21:36:56 +0000 (23:36 +0200)]
Update AboutData
Michael Marley [Mon, 2 Apr 2018 23:11:31 +0000 (19:11 -0400)]
Reject clients that attempt to login before the core is configured
Properly-implemented clients should never try to do this, but if it
is done, this patch prevents it from crashing the core.
Thanks to @chaign_c (https://twitter.com/chaign_c/) for finding this
issue.
Janne Koschinski [Mon, 2 Apr 2018 20:26:34 +0000 (22:26 +0200)]
Implement custom deserializer to add our own sanity checks
This is a rough first implementation in preparation of writing
proper serializers independently of QDataStream.
Thanks to @chaign_c (https://twitter.com/chaign_c/) for finding
issues with QDataStream that prompted this change.
Manuel Nickschas [Thu, 12 Apr 2018 20:38:02 +0000 (22:38 +0200)]
uisupport: Forcefully disable horizontal scrollbar in BufferView
Qt 5.10.1 severly broke QHeaderView and by extension, QTreeView,
resulting in a horizontal scrollbar being shown. In order to avoid
making this issue too obvious for people using that version of Qt
(including the builds currently generated by our CI), force the
scrollbar to be hidden in BufferView.
The contents can still be scrolled sideways e.g. with horizontal
mouse wheel emulation, but that should not hit many users in
practice.
Earlier or later versions of Qt seem to not suffer from that issue,
but always hiding the scrollbar doesn't hurt either way.
Manuel Nickschas [Tue, 10 Apr 2018 20:18:33 +0000 (22:18 +0200)]
cmake: Add exception handling support to MSVC compile flags
Since STL types may throw, MSVC needs to get told to support
exceptions by specifying the /EHsc flag. Otherwise, it warns about
the lack thereof, even though Quassel itself does not use nor handle
exceptions.
Closes GH-350.
Manuel Nickschas [Tue, 10 Apr 2018 19:59:19 +0000 (21:59 +0200)]
Semi-yearly copyright bump
It's no longer 2016.
romibi [Fri, 6 Apr 2018 17:25:17 +0000 (19:25 +0200)]
Package Mac Style plugin (for Qt 5.10+)
Closes GH-349.
Michael Marley [Tue, 27 Mar 2018 23:41:28 +0000 (19:41 -0400)]
PostgreSqlStorage: Fix apparently-incorrect index in requestAllMsgs
This function was using 1 for its date index, which is the same
index as was used for bufferid. The correct index to use is 2.
Closes GH-346.
Michael Marley [Mon, 26 Mar 2018 02:11:39 +0000 (22:11 -0400)]
SslServer: Add support for Elliptic Curve keys
If the key won't load as an RSA key, attempt to load it again as an
EC key. DSA support was not added because DSA is obsolete and no-
one should be using it.
Note that this only works with Qt5.5 and up as EC support was added
in that version (https://github.com/qt/qtbase/commit/
962ea569). An
if macro has been used to allow for continued compilation under Qt4
and Qt5<5.5.
Closes GH-344.
phuzion [Tue, 27 Feb 2018 21:25:35 +0000 (21:25 +0000)]
Change HTTP links to HTTPS for quassel-irc.org and subdomains
Closes GH-335.
Shane Synan [Tue, 27 Feb 2018 19:50:43 +0000 (13:50 -0600)]
core: Fix CAP REQ display for SASL only supported
Modify queuedCapsDisplay to only add a ", " when both
_capsQueuedIndividual and _capsQueuedBundled are not empty. This
avoids adding a spurious ", " when there's only individual caps, e.g.
SASL. Though the docs don't mention it, QStringList.join() will only
add the separator when there's more than one item in the list.
Before:
* Negotiating capabilities (requesting: sasl, )...
After:
* Negotiating capabilities (requesting: sasl)...
See https://doc.qt.io/qt-5/qstringlist.html#join
Closes GH-334.
romibi [Mon, 5 Mar 2018 17:54:15 +0000 (18:54 +0100)]
Lock Toolbars too
Closes GH-324.
romibi [Wed, 31 Jan 2018 15:13:37 +0000 (16:13 +0100)]
Lock Buffer- and Nick-Lists too
Fixes #1465
Manuel Nickschas [Thu, 5 Apr 2018 21:54:02 +0000 (23:54 +0200)]
client: Remove unused attribute
Clang warns about this.
Manuel Nickschas [Tue, 27 Feb 2018 10:33:03 +0000 (11:33 +0100)]
qa: Replace [[fallthrough]] by [[clang::fallthrough]]
The [[fallthrough]] attribute is a C++17 extension. It happens to work
in GCC 7, but causes warnings or even failures in other compilers.
In my quest to find a syntax that makes all compilers happy without
having to disable the (useful) warning, I think I have finally
found a way. Using the clang:: namespace seems to solve several
issues:
* It is marked as a compiler extension, so compilers not supporting it
should simply ignore the attribute
* It (obviously) works in Clang, which is nice when using a Clang-based
IDE like Qt Creator
* For some reason, it also seems to silence warnings in GCC; I guess one
of GCC's fancy regexes somehow matches
Daniel Silverstone [Wed, 7 Feb 2018 10:51:55 +0000 (10:51 +0000)]
Correct issue where messages were over-trimmed
In an attempt to correct a problem with quasseldroid multiline
messages (
97a9b1646bb0d6362cef14bac3a577481cc01e49) the core started
trimming leading whitespace from lines. This broke pasting of things
like formatted code.
This commit ensures that only the splitting is done, and that we skip
empty lines when handling /SAY since they sometimes cause issues on
networks and the clients which split client-side already skip empty
lines.
Closes GH-331.
Svetlana Tkachenko [Mon, 8 Jan 2018 04:44:17 +0000 (04:44 +0000)]
Support $i:account in aliases
Closes GH-321.
Svetlana Tkachenko [Mon, 8 Jan 2018 00:39:45 +0000 (00:39 +0000)]
Support $i:ident in aliases
https://bugs.quassel-irc.org/issues/1454
Implements #1454.
Manuel Nickschas [Wed, 28 Mar 2018 21:17:04 +0000 (23:17 +0200)]
client: Avoid warning for unused argument
Janne Koschinski [Fri, 22 Dec 2017 02:47:09 +0000 (03:47 +0100)]
Fix compile error with Qt4
In Qt4, signals are protected, therefore we can’t emit a signal on
Client from the ClientUserInputHandler.
Therefore we wrap the signal emitter with a function on the Client.
Closes GH-320.
Janne Koschinski [Fri, 22 Dec 2017 01:39:43 +0000 (02:39 +0100)]
Make /list open the Channel List dialog
Janne Koschinski [Sun, 18 Feb 2018 20:14:35 +0000 (21:14 +0100)]
Ignore self messages
Closes GH-317.
Janne Koschinski [Thu, 21 Dec 2017 23:20:15 +0000 (00:20 +0100)]
Per default, set local nick highlight to none
Janne Koschinski [Thu, 21 Dec 2017 22:50:26 +0000 (23:50 +0100)]
Per popular request, always enable local highlights
Janne Koschinski [Thu, 21 Dec 2017 22:48:03 +0000 (23:48 +0100)]
Fix an issue where empty elements were shown in the highlight list
- Replace clearContents with while (rowCount()) removeRow
Janne Koschinski [Thu, 21 Dec 2017 21:18:11 +0000 (22:18 +0100)]
Only enable the relevant highlight depending on core features
- If connected to a modern core, disable local highlights
- Otherwise, disable remote highlights
Janne Koschinski [Thu, 21 Dec 2017 21:07:55 +0000 (22:07 +0100)]
Add an import button to import local rules into the new page
Janne Koschinski [Thu, 21 Dec 2017 20:57:03 +0000 (21:57 +0100)]
Disable the highlights page when not connected
Manuel Nickschas [Mon, 26 Mar 2018 22:04:01 +0000 (00:04 +0200)]
common: Set sourcePeer() also for internal (mono) connections
So far, SignalProxy::sourcePeer() was only set while processing
messages from remote peers. Set this also for internal connections.
Also remove InternalPeer's special-casing for in-thread communication,
as the two connected peers always live in different threads anyways.
Closes GH-345.
Manuel Nickschas [Wed, 21 Mar 2018 23:58:46 +0000 (00:58 +0100)]
common: Represent core/client features as string list in the protocol
The previous way of representing all supported features as a bit-wise
combination of flags is reaching its limits, due to the fact that the
old Features enum didn't have a defined width, and thus the compiler
can (and does) choose to represent it as a 16 bit value even though
the serialization in the protocol is defined as a 32 bit value.
In order to solve this problem, and to make feature negotiation more
robust, a new field "FeatureList" is added to both "ClientInit"
and "ClientInitAck" handshake messages that holds a string list with
the supported features.
Clients still send both "Features" and "FeatureList" fields when
registering, in order to support older cores. The core now omits
the legacy "CoreFeatures" field if the client indicates support
for extended features. Support for extended features is indicated
as the legacy feature 0x8000.
Note that legacy features are a subset of the new extended features.
Clients supporting extended features are encouraged to send the
full list, including legacy ones, in their FeatureList field.
Internally, the string-based feature list is mapped to a
std::vector<bool> to provide for fast lookup of enabled features.
The new methods Client::isCoreFeatureEnabled() and Peer::hasFeature()
allow for convenient checking.
Both client and core now output a log message if there is a mismatch
between the peers.
Manuel Nickschas [Wed, 21 Mar 2018 00:41:28 +0000 (01:41 +0100)]
common: Make the Quassel class a proper singleton, clean up
No longer have the various application classes inherit from the
Quassel class, which is a precondition for making the latter a
QObject down the line. Enable application-specific config reload
and quit behaviors by providing the means to register handler
functions, replacing the previous inheritance-based mechanism.
Make the Quassel class a proper singleton, remove inline functions
and modernize the code.
Manuel Nickschas [Wed, 7 Mar 2018 23:53:50 +0000 (00:53 +0100)]
uistyle: Ignore format code for Monospace
Since the current rendering engine does not easily support switching
fonts in the middle of a message, we can't currently support the
Monospace format code as specified in [1].
However, to avoid weird artifacts when other clients send this, ignore
the format code for now.
[1] https://modern.ircdocs.horse/formatting.html#monospace
Closes GH-342.
Manuel Nickschas [Wed, 7 Mar 2018 23:47:39 +0000 (00:47 +0100)]
uistyle: Support rendering of strikethrough'd text
As defined in [1], format code 0x1e indicates text that is struck
through. Add support for rendering this accordingly.
Extend the stylesheet parser so the format can be defined, and
add to the default stylesheet.
[1] https://modern.ircdocs.horse/formatting.html#strikethrough
Manuel Nickschas [Wed, 7 Mar 2018 23:22:24 +0000 (00:22 +0100)]
uistyle: Support reverse color rendering
Format codes 0x12 and 0x16 toggle the swap of foreground and
background colors. In the current implementation, the color
swap only applies to custom colors, i.e. mIRC colors and hex
colors. Normal text is not affected.
Since this is not a styleable property, remove support for it
from the stylesheet parser.
Manuel Nickschas [Wed, 7 Mar 2018 19:59:37 +0000 (20:59 +0100)]
uistyle: Define via stylesheet if color codes have an effect
In certain situations, color codes should have no effect, e.g. when
selecting text. This required hacks in stylesheets; for example
when setting a foreground color for self or highlighted messages,
the mIRC colors had to be redefined in the stylesheet for that label.
Also the code had some workaround, e.g. for URLs.
With the introduction of the non-styleable extended mIRC and
hex colors, these workarounds are no longer possible.
Solve these issues by introducing two new properties that can be set
in the stylesheet:
allow-foreground-override: true|false
allow-background-override: true|false
The default stylesheet sets them to true by default, and to false
e.g. for selections.
Remove the now unneeded workaround from m4yer's stylesheet, too.
Manuel Nickschas [Wed, 7 Mar 2018 18:37:12 +0000 (19:37 +0100)]
uistyle: Support rendering of hex colors
Hex colors are a relatively new addition to IRC, as defined in
<https://modern.ircdocs.horse/formatting.html#hex-color>.
Note that there are known issues with prioritization in the theme
engine (i.e., setting the foreground explicitly in the stylesheet
will always override hex colors), which will be fixed in a follow-up
commit.
Manuel Nickschas [Wed, 7 Mar 2018 00:38:53 +0000 (01:38 +0100)]
uistyle: Fix weird way of registering Qt types
Well, maybe it didn't seem so weird a decade ago, but these days
we can do type registration in a nicer way.
Manuel Nickschas [Wed, 7 Mar 2018 00:31:34 +0000 (01:31 +0100)]
uistyle: Support extended mIRC colors
Support mIRC color values between 16 and 98, as specified in [1].
Extended color values are not styleable.
[1] https://modern.ircdocs.horse/formatting.html
Manuel Nickschas [Tue, 6 Mar 2018 20:07:42 +0000 (21:07 +0100)]
uistyle: Add more type-safety to UiStyle, and clean up a bit
Migrate all UiStyle enums to be enum classes. Enforce explicit types
instead of quint32 in most places using them, and handle MessageLabel
in a more obvious fashion. A bunch of bit-wise operators had to be
added to avoid lots of boilerplate when dealing with the enums.
FormatList now holds the formats in a struct rather than as plain enum
(or quint32) values. This will be needed for extended color support;
as the format type cannot hold the hard-coded extended color values,
the colors will be stored explicitly in the list and applied as
appropriate.
Also, in the quest to modernize the codebase, FormatList is now a
std::vector rather than a QList.
Michael Marley [Thu, 1 Mar 2018 22:19:47 +0000 (17:19 -0500)]
Update stripFormatCodes() for additional formatting characters
- \x04 for hex color (IRCCloud)
- \x11 for monospace (IRCCloud)
- \x1e for strikethrough (Textual)
This patch does not actually add support for rendering those
styles, but at least ensures that highlighting still works
correctly if they are used.
Closes GH-337.
Manuel Nickschas [Thu, 1 Mar 2018 23:06:21 +0000 (00:06 +0100)]
dcc: Disable DCC features until they're ready for public consumption
Don't advertise that we support DCC when we actually don't yet. Also,
don't create the transfer widget and settings page for now.
Manuel Nickschas [Thu, 1 Mar 2018 21:03:53 +0000 (22:03 +0100)]
proxy: Actually fix settings migration logic
Not sure what the previous code was supposed to accomplish, but
proxy settings are stored in [CoreAccounts] and thus migration needs
to happen for each configured account. Also, the UseProxy flag was
removed and thus must be translated to ProxyType::NoProxy.
Closes GH-181.
Javier Llorente [Sun, 10 Sep 2017 21:31:03 +0000 (23:31 +0200)]
Reorder includes alphabetically
Javier Llorente [Sun, 10 Sep 2017 21:28:26 +0000 (23:28 +0200)]
Move account details out of 'ManualProxy'
Javier Llorente [Sat, 7 Jan 2017 00:27:37 +0000 (01:27 +0100)]
Update VERSION_MINOR_CURRENT, realign spaces for comment (case 4)
Javier Llorente [Fri, 6 Jan 2017 23:03:12 +0000 (00:03 +0100)]
Add case 4 for new proxy type default value
Javier Llorente [Sun, 7 Feb 2016 23:36:17 +0000 (00:36 +0100)]
Add system proxy support for quassel-client
Manuel Nickschas [Tue, 27 Feb 2018 22:28:31 +0000 (23:28 +0100)]
qtui: Avoid bogus tr() context warning
lupdate in Qt versions prior to 5.6.1 has issues parsing brace-
initialization in constructors, and complains about "tr() cannot
be called without context". Work around this by explicitly giving
the class name as suggested in QTBUG-34128.
Janne Koschinski [Fri, 22 Dec 2017 02:46:12 +0000 (03:46 +0100)]
Fix compile error with Qt4
In Qt4, signals are protected, therefore we can’t emit a signal on
Client from the ClientUserInputHandler.
Therefore we wrap the signal emitter with a function on the Client.
Closes GH-318.
Janne Koschinski [Thu, 21 Dec 2017 22:22:52 +0000 (23:22 +0100)]
Implement /ignore functionality
- If /ignore <nickname> is used, a new rule for nickname!*@* is added,
with dynamic strictness, limited to the current network.
- If /ignore <rule> (where rule contains ! or @) is used, that rule is
added, with dynamic strictness, limited to the current network.
- If /ignore with no parameters is used, the ignore list is shown
Janne Koschinski [Thu, 21 Dec 2017 20:43:18 +0000 (21:43 +0100)]
Polish session list UI
- Only show disconnect button if available
- Show if client is connected securely
- Make the UI look more native
Closes GH-316.
Janne Koschinski [Thu, 21 Dec 2017 20:42:26 +0000 (21:42 +0100)]
Transmit feature flag for remote disconnecting with peer info
Janne Koschinski [Thu, 21 Dec 2017 20:42:10 +0000 (21:42 +0100)]
Introduce feature flag for remote disconnecting
Hannah von Reth [Wed, 21 Jun 2017 12:17:50 +0000 (14:17 +0200)]
Use craft on appveyor
This will use the well maintained packages from Craft.
It will reduce the maintenance cost for providing a Windows installer.
Additionally we now use up to date binaries built exactly for this compiler,
so we no longer depend on 33dparty openssl binaries etc.
Using and deploying KDE Framework 5 libaries on Windows is also possible now.
This build provides KDE Sonnet
Find out more about Craft: https://community.kde.org/Craft
Contribute to the Quassel blueprint:
https://github.com/KDE/craft-blueprints-kde/blob/master/qt-apps/quassel/quassel.py
Closes GH-312.
Manuel Nickschas [Tue, 27 Feb 2018 09:59:52 +0000 (10:59 +0100)]
uisupport: Also fix doubleclick in nick views
Since the Q_WS_* macros no longer exist in Qt5, replace them by the
appropriate Q_OS_* macros. Remove some needless ones, too.
Manuel Nickschas [Tue, 27 Feb 2018 09:23:39 +0000 (10:23 +0100)]
uisupport: Join channels on doubleclick on all but Windows and OSX
The Q_WS_* macros no longer exist in Qt5, so the OS detection for
the click behavior in bufferviews didn't work correctly. Use the
correct Q_OS_* macros to ensure that a doubleclick is required on
platforms other than Windows and OSX.
Shane Synan [Fri, 22 Sep 2017 23:56:49 +0000 (18:56 -0500)]
client: Fix Chat Monitor missing sender brackets
Always re-add hidden sender brackets for the Chat Monitor as the
normal sender prefixes get replaced with Network, Buffer, and Sender
names.
Sender brackets shown:
> Copy-pasted
Chat Monitor: <Bitlbee:#channel> digitalcircuit does things
Channel: -*- digitalcircuit does things
Before:
> Copy-pasted with sender brackets hidden (wrong)
Chat Monitor: Bitlbee:#channel digitalcircuit does things
Channel: -*- digitalcircuit does things
After:
> Copy-pasted with sender brackets hidden (correct)
Chat Monitor: <Bitlbee:#channel> digitalcircuit does things
Channel: -*- digitalcircuit does things
Closes GH-314.
romibi [Fri, 2 Feb 2018 11:45:09 +0000 (12:45 +0100)]
Package bearer plugin on OSX
Fixes #1442. Closes GH-324.
romibi [Fri, 1 Sep 2017 08:06:10 +0000 (10:06 +0200)]
Fix OSX compile and deploy
Set additional compile flag
Fix FindLdap.cmake for OSX
Fix DMG creation (sometimes fails if no volume size is provided)
Closes GH-304.
Shane Synan [Sun, 17 Sep 2017 17:54:05 +0000 (12:54 -0500)]
common: Fix typo in Network::capAvailable() docs
In Network::capAvailable(), fix typo of "guarentee" -> "guarantee".
This doesn't have any impact on running code, but should still be
fixed.
Thanks to @justJanne for finding this.
Closes GH-300.
Shane Synan [Fri, 18 Aug 2017 20:34:38 +0000 (15:34 -0500)]
core: Stop ratelimiting log spam with old client
Downgrade invalid 'setMessageRateBurstSize' and 'setMessageRateDelay'
warning messages to debugging level. This happens any time an older
client tries to configure a network for a newer core and in most
cases can be ignored.
Should an issue arise, the log level can be set to debug.
genius3000 [Thu, 27 Jul 2017 08:00:05 +0000 (02:00 -0600)]
Remove old 'remove buffer' KeyPress code
Since commit
9f33f6e4 a 'hide current buffer' shortcut is available.
This is the global application shortcut like Sput referenced in
http://bugs.quassel-irc.org/issues/668
Keeping a hard-coded KeyPress event doing the same seems unnecessary.
Users have also expressed dislike in the use of 'Backspace' for this
buffer removal. Unintentional buffer removals are often for some.
This commit removes the 'KeyPress' event and cleans up the
'hideCurrentBuffer' code, removing commented (un-needed) code.
Reference: http://bugs.quassel-irc.org/issues/1403
Fixes #1403. Closes GH-299.
Albert S [Mon, 21 Aug 2017 19:35:41 +0000 (21:35 +0200)]
core: connectToIrc: Add clarifying comment on DNS lookups
Closes GH-298.
Albert S [Mon, 24 Jul 2017 13:51:56 +0000 (15:51 +0200)]
core: connectToIrc: Prevent DNS leaks on connection when using proxy
96fe7e713 introduced a call to QHostInfo::fromName() in order to avoid
problems related to the caching of DNS queries. It however is also called
when the user has specified that a proxy should be used. This behavior
therefore introduces a DNS leak.
This commit ensures that QHostInfo::fromName() is not called when
a proxy has been specified.
Daniel Albers [Wed, 3 Jan 2018 00:41:41 +0000 (01:41 +0100)]
Explicitly disable printing signatures when running git
Make sure version parsing doesn't fail when a signed commit is at the tip and
log.showsignature is enabled.
Sven Anderson [Fri, 22 Sep 2017 21:10:51 +0000 (16:10 -0500)]
core: Add SQLite backlog idx: bufferid, messageid
Connecting to the core with a big sqlite storage (>500MB) can become
extremely slow or even time out. Adding an index over the tuples
(bufferid, messageid) speeds up the connection significantly, because
at connection time a lot of queries over these two values are
processed.
Modified by @digitalcircuit from original commit to add a new schema
upgrade.
Closes GH-313 and GH-244.
Manuel Nickschas [Thu, 21 Dec 2017 12:44:56 +0000 (13:44 +0100)]
Only enable sender prefix option if the core supports the feature
Closes GH-309.
Manuel Nickschas [Thu, 21 Dec 2017 12:44:30 +0000 (13:44 +0100)]
Minor cleanups
Janne Koschinski [Wed, 20 Dec 2017 02:22:31 +0000 (03:22 +0100)]
Implement UI and serialization logic for sender modes
Janne Koschinski [Wed, 20 Dec 2017 02:12:35 +0000 (03:12 +0100)]
Replace Protocol::Handler enum with enum class
Manuel Nickschas [Wed, 20 Dec 2017 22:16:52 +0000 (23:16 +0100)]
Minor cleanups for core-side highlight feature
Also remove some accidental fallthroughs, and fix the Qt4 build.
Closes GH-303.
Janne Koschinski [Wed, 20 Dec 2017 02:30:36 +0000 (03:30 +0100)]
Store the HighlightNickType as int instead of custom enum
Janne Koschinski [Wed, 20 Dec 2017 00:17:49 +0000 (01:17 +0100)]
Fix an issue where the table headers were invisible
Janne Koschinski [Tue, 19 Dec 2017 23:38:50 +0000 (00:38 +0100)]
Redesign the core highlight settings page
Janne Koschinski [Tue, 5 Sep 2017 16:11:51 +0000 (18:11 +0200)]
Implement sender matching for highlight rules
- Implements configuration, sync, and matching behavior for
sender-based matching in highlight rules
- The match type (regexp or wildcard) is the same as configured for
the message itself.
- The sender rule has to match exactly
Janne Koschinski [Tue, 5 Sep 2017 15:18:57 +0000 (17:18 +0200)]
Implement inverse highlight rules
- Implements configuration, sync, and matching behavior for inverse
rules
- If a message matches a positive rule (or nick), and an inverse rule,
the inverse rule takes precedence, and no highlight is generated
- Implements an "inverse rule" checkbox in the core-side highlight
rule configuration dialog.
Janne Koschinski [Fri, 1 Sep 2017 11:51:35 +0000 (13:51 +0200)]
Fix an issue with QStringList being declared differently on Qt4
Janne Koschinski [Fri, 1 Sep 2017 03:45:33 +0000 (05:45 +0200)]
Fix a potential crash