quassel.git
5 years agoqtui: Fix icons in the AboutDlg
Manuel Nickschas [Mon, 4 Jun 2018 20:13:12 +0000 (22:13 +0200)]
qtui: Fix icons in the AboutDlg

With the icon reorganization, no aliases are created inside resource
files anymore. Explicitly put the Breeze and Oxygen Quassel pixmaps
for the AboutDlg into pics/ and add it to the :pics/ resource.

Remove pics/quassel.png which was shipped, but not actually used
due to it missing from the resource file.

5 years agoqtui: Set proper icon for "About Quassel" menu option
Manuel Nickschas [Sun, 3 Jun 2018 23:16:01 +0000 (01:16 +0200)]
qtui: Set proper icon for "About Quassel" menu option

With the icons reorganization, we no longer have fallbacks available
on a resource path. Use QIcon::fromTheme() instead.

5 years agoqtui: Set default window icon independent of connection state
Manuel Nickschas [Sun, 3 Jun 2018 23:14:43 +0000 (01:14 +0200)]
qtui: Set default window icon independent of connection state

5 years agoqtui: Fix icon loading and improve icon theme support
Manuel Nickschas [Mon, 4 Jun 2018 22:07:01 +0000 (00:07 +0200)]
qtui: Fix icon loading and improve icon theme support

Quassel relies on quite a number of icons that are part of KDE/Plasma
icon themes such as Breeze and Oxygen, but are not specified by
freedesktop.org's Icon Naming Specification. As such, icon themes
other than the afforementioned most likely don't contain all the
icons Quassel needs.

Additionally, Quassel ships several additional icons that are not part
of any theme, but are made to fit in with Breeze/Oxygen.

In order to ensure that all required icons are available, we now
assume that at least one of Breeze, Breeze Dark or Oxygen themes is
available as a fallback, either as a system-wide installation, or by
having Quassel itself deploy the required subset in its data dir
(related build options will be adapted in a follow-up commit).

Allow the user to configure which fallback theme is to be used,
and if the system icon theme should be completely overridden (as
opposed to just filling in missing icons). If the system theme
is Breeze/Oxygen, just inject the corresponding Quassel-specific
icons. If the configured system theme doesn't match the selected
fallback (and should not be overridden), create a proxy icon theme
that inherits from first the system theme and then the selected
fallback. That way, missing icons are found through the inheritance
chain.

Note that as of Qt 5.11.0, icons from the hicolor default theme are
preferred over the ones from inherited themes, which violates the
Icon Theme Specification (cf. QTBUG-68603). This affects Quassel's
application icon, which will thus always use the Breeze variant
if a non-supported system icon theme is used. Other icons will be
picked from the selected fallback theme, as expected.

5 years agoqa: Use override in QtUi
Manuel Nickschas [Tue, 15 May 2018 22:36:44 +0000 (00:36 +0200)]
qa: Use override in QtUi

5 years agoicons: Use more common names for irc-channel-* icons
Manuel Nickschas [Tue, 15 May 2018 20:13:00 +0000 (22:13 +0200)]
icons: Use more common names for irc-channel-* icons

irc-channel-joined and irc-channel-parted are not shipped with Oxygen.
Use irc-channel-active and irc-channel-inactive instead, which are
supported by both Oxygen and Breeze (and are identical to the previous
ones in Breeze).

5 years agoicons: Fix message-quassel-tray-inverted icon
Manuel Nickschas [Mon, 4 Jun 2018 20:38:01 +0000 (22:38 +0200)]
icons: Fix message-quassel-tray-inverted icon

Use the correct base shape for this icon.

5 years agoicons: Update bundled Breeze and Breeze Dark icon themes
Manuel Nickschas [Tue, 15 May 2018 19:40:47 +0000 (21:40 +0200)]
icons: Update bundled Breeze and Breeze Dark icon themes

Update to latest upstream commit.

5 years agoicons: Adapt and improve icon import script
Manuel Nickschas [Tue, 15 May 2018 19:14:09 +0000 (21:14 +0200)]
icons: Adapt and improve icon import script

No longer require running it from inside a specific directory.
Remove theme-specific blacklists, as they are not needed anymore.
Modernize and improve the code a bit.

5 years agoicons: Remove obsolete hicolor icons
Manuel Nickschas [Mon, 14 May 2018 21:59:32 +0000 (23:59 +0200)]
icons: Remove obsolete hicolor icons

The hicolor directory should only contain the application icon
for external use. Remove other icons (which are no longer used
by Quassel anyway).

Move irc-channel-joined and irc-channel-parted into the quassel-
specific oxygen icon set, as they're not part of the upstream theme.

5 years agoicons: Reorganize icon directories
Manuel Nickschas [Mon, 14 May 2018 21:44:21 +0000 (23:44 +0200)]
icons: Reorganize icon directories

Move bundled icon themes into 3rdparty/icons for clarity. Move
Quassel-specific icons from icons/extra-icons into icons proper.
Rename breezedark to breeze-dark to match the upstream directory
name. Update corresponding qrc files accordingly.

Note that this breaks icon loading until the code is adapted to
properly support icon themes and fallback mechanisms. This will
be fixed in a follow-up commit. Since then Quassel itself will
no longer use the hicolor icons (which are only intended to contain
the application icons for use by desktop environments), there is
no need to bundle them anymore.

The import_theme.pl script also still requires adaptations that will
be delivered in a later commit.

5 years agoAdd a README to the icons folder
romibi [Sat, 17 Mar 2018 17:06:29 +0000 (18:06 +0100)]
Add a README to the icons folder

5 years agoUpdate qrc's for new Icons and update Import Script
romibi [Thu, 1 Feb 2018 22:47:30 +0000 (23:47 +0100)]
Update qrc's for new Icons and update Import Script

5 years agoUpdate Quassel-Icons based on justjannes icon-repo
romibi [Thu, 1 Feb 2018 22:42:36 +0000 (23:42 +0100)]
Update Quassel-Icons based on justjannes icon-repo

See https://github.com/justjanne/quassel-icons commit 18a8974
inkl. new slim Tray-Icons
inkl. Inverted Tray Icons (Light to Dark and vice versa)
Updated Quassel App Icon
Put Extra Icons in a separate folder in Resources/Data
Updated quassel.ico and .icns

5 years agoShip light and dark Breeze Icon theme by default
romibi [Thu, 1 Feb 2018 22:50:44 +0000 (23:50 +0100)]
Ship light and dark Breeze Icon theme by default

5 years agoMove systray animation settings to notification settings page
romibi [Mon, 5 Feb 2018 17:51:54 +0000 (18:51 +0100)]
Move systray animation settings to notification settings page

5 years agoSplit systray notification backend
romibi [Mon, 5 Feb 2018 17:40:37 +0000 (18:40 +0100)]
Split systray notification backend

into SystrayAnimationNotificationBackend for tray icon animation
and SystrayNotificationBackend for tray message popup

5 years agoqtui: Properly fix the SettingsDlg layout
Manuel Nickschas [Mon, 4 Jun 2018 21:44:32 +0000 (23:44 +0200)]
qtui: Properly fix the SettingsDlg layout

We've suffered from the page tree in the settings dialog being
squashed horizontally for a long time. A previous commit (65c463f0)
tried to fix this by calculating a minimum size and explicitly
resizing the dialog, but this didn't properly work at least on HIDPI
displays.

Instead, fix layouting properly by setting the correct size policy
for the tree widget, and removing both the afforementioned workaround
and a previous hack that tried to set the minimum width manually
(and failed due to a still-hidden widget reporting wrong size hints).

5 years agomono: Move Local Highlights -> Legacy Highlights
Shane Synan [Wed, 6 Jun 2018 19:02:40 +0000 (14:02 -0500)]
mono: Move Local Highlights -> Legacy Highlights

Rename "Local Highlights" as "Legacy Highlights", and rename
"Remote Highlights" as plain "Highlights".  Update the info-bar text
and other references as appropriate.

This reduces confusion over which highlights to configure in
Monolithic mode.

5 years agomono: Show a popup during database migration
Manuel Nickschas [Wed, 30 May 2018 23:16:47 +0000 (01:16 +0200)]
mono: Show a popup during database migration

Database upgrades may take a long while, during which the monolightic
client can not be used. Show a modal popup during migration to both
inform the user about what's going on, and preventing them from
interacting with the client until the internal core is up and running.

Show an "Initializing..." message in the status bar while the core
is starting up, so there's some indication for the user besides the
modal popup.

5 years agomono: Run the internal core in a separate thread
Manuel Nickschas [Wed, 30 May 2018 22:34:13 +0000 (00:34 +0200)]
mono: Run the internal core in a separate thread

Prevent the internal core from blocking the UI of the monolithic
client by running it in a separate thread. This is particularly
important during startup, where e.g. a database upgrade may block
the core for a significant time, preventing the main window from
being rendered, or even showing up.

5 years agocore: Only load translations if running stand-alone
Manuel Nickschas [Wed, 30 May 2018 22:25:00 +0000 (00:25 +0200)]
core: Only load translations if running stand-alone

For the monolithic client, the UI part takes care of loading the
translations configured by the user; the core should not override
them.

Only if the core is running stand-alone, it needs to load
translations itself (using the system locale, since there is no
core-side configuration for this).

5 years agocore: Properly parent QObject-derived attributes
Manuel Nickschas [Wed, 30 May 2018 20:20:17 +0000 (22:20 +0200)]
core: Properly parent QObject-derived attributes

In order to be able to move the Core instance to another thread,
all QObject-derived attributes must be properly parented, so they
move with their parent object.

5 years agocore: Change signature of Core::syncTimer()
Manuel Nickschas [Wed, 30 May 2018 20:18:55 +0000 (22:18 +0200)]
core: Change signature of Core::syncTimer()

Returning a pointer is more consistent with the rest of the code
base and established patterns than returning a non-const reference.

5 years agocommon: Make InternalPeer (more) thread-safe
Manuel Nickschas [Wed, 30 May 2018 20:01:50 +0000 (22:01 +0200)]
common: Make InternalPeer (more) thread-safe

The two internal peers used by a mono client live in different
threads. Previously, they each stored a pointer to their counterpart
to be able to send protocol messages wrapped in an event.
While this has never been observed in the wild, this may cause subtle
lifetime issues if one of the sides goes away before the other.

While currently, as the two peers are at least created in the same
thread (and thus, setting the mutual pointer should not cause issues),
this will change in the near future, since the mono core is slated
to move into its own thread.

Rather than trying to deal with this ourselves, let Qt do the work.
Instead of storing a pointer and sending events, use signal/slot
connections to transfer the messages between the peers. Qt will
ensure that this happens in a thread-safe manner, and that connections
are killed if one of the peers is destroyed.

5 years agocore: Use QCoreApplication::exit() instead of just exit()
Manuel Nickschas [Tue, 29 May 2018 22:05:07 +0000 (00:05 +0200)]
core: Use QCoreApplication::exit() instead of just exit()

Ensure that the application is cleanly terminated (by stopping
the main event loop instead of just exiting) when core
initialization fails. This allows for proper cleanup, shutting
down threads etc.

5 years agocore: Simplify core initialization logic
Manuel Nickschas [Tue, 29 May 2018 21:11:07 +0000 (23:11 +0200)]
core: Simplify core initialization logic

Move all core initialization into Core::init(), including things
that were previously done in CoreApplication and MonoApplication.
Make several functions private and non-static that no longer need
to be called from the outside.

Allow to construct and destroy the core directly, rather than
relying on Core::instance() and Core::destroy(). Explicitly
create and destroy the instance in the application to better control
lifetime.

Ensure core state is saved and storage synced on destruction, instead
of relying on explicit calls (which were partially missing for mono).

5 years agocommon: Ensure the custom config path is stored as an absolute path
Manuel Nickschas [Tue, 29 May 2018 21:18:05 +0000 (23:18 +0200)]
common: Ensure the custom config path is stored as an absolute path

This prevents creation of a bogus and empty directory inside the
custom config directory if the path given by --configdir was
relative.

5 years agocommon: Set umask in main() instead of Core::init()
Manuel Nickschas [Tue, 29 May 2018 21:15:57 +0000 (23:15 +0200)]
common: Set umask in main() instead of Core::init()

Ensure that a restricted umask is set for all binaries, before
creating any files.

This fixes the fact that client-side configuration files, including
the configuration directory itself, were created with world-readable
permissions if the system's umask was set accordingly.

5 years agoRemove ancient settings migration code
Manuel Nickschas [Tue, 29 May 2018 19:26:24 +0000 (21:26 +0200)]
Remove ancient settings migration code

Nobody should be running Quassel 0.3 anymore in this decade, so
remove ancient and messy config location migration code.

5 years agoclient: Remap "Reload Stylesheet" to Ctrl+Shift+R
Shane Synan [Fri, 1 Jun 2018 03:26:43 +0000 (22:26 -0500)]
client: Remap "Reload Stylesheet" to Ctrl+Shift+R

Move "Reload Stylesheet" to Ctrl+Shift+R instead of Ctrl+R from
QKeySequence::Refresh.  "Set Marker Line" maps to Ctrl+R by default,
resulting in conflict.

Reloading the stylesheet shouldn't be done often enough to warrant
the easier-to-press key combination.

5 years agoclient: Add keyboard shortcuts for formatting
Shane Synan [Fri, 1 Jun 2018 03:24:07 +0000 (22:24 -0500)]
client: Add keyboard shortcuts for formatting

Add keyboard shortcuts for formatting options as follows:

* Apply foreground color: Ctrl-Shift-G
* Apply background color: Ctrl-Shift-B
* Clear formatting:       Ctrl-Shift-C
* Toggle bold:            Ctrl-B       (from QKeySequence::Bold)
* Toggle italic:          Ctrl-I       (from QKeySequence::Italic)
* Toggle underline:       Ctrl-U       (from QKeySequence::Underline)

5 years agoclient: Add input tooltips, clear format, cleanup
Shane Synan [Fri, 1 Jun 2018 03:13:07 +0000 (22:13 -0500)]
client: Add input tooltips, clear format, cleanup

Add tooltips to all of the input widget items, improving
accessibility for otherwise icon-only buttons and menus.

Add button to clear formatting, making it easy to immediately remove
all those garish foreground and background colors you added, and the
italic/bold/underline, too.

Cleanup formatting options into distinct functions, paving the way
for external signals changing formatting.

5 years agoclient: Clarify QKeySequence::Quit matter in docs
Shane Synan [Fri, 1 Jun 2018 00:20:00 +0000 (19:20 -0500)]
client: Clarify QKeySequence::Quit matter in docs

QKeySequence::Quit does not set "Ctrl-Q" on Windows, while many
Windows programs use that to provide Quit, including Quassel IRC.

Modify the comment to explain the situation.

See https://doc.qt.io/qt-5/qkeysequence.html

5 years agocore: Save schema version for intermediate steps
Shane Synan [Thu, 31 May 2018 23:21:33 +0000 (18:21 -0500)]
core: Save schema version for intermediate steps

When running upgrade queries, update the schema version for each
intermediate step.  This ensures that any interrupted upgrades have a
greater chance of resuming correctly after core restart.

Almost all databases make single queries atomic (fully works or fully
fails, no partial), and with many of the longest migrations being a
single query, this makes upgrade interruptions much more likely to
leave the database in a valid intermediate schema version.

As a side effect, downgrading from a partial upgrade will now require
setting schema version manually, instead of it possibly happening to
work depending on what changed.  An unsupported operation failing in
a known, recoverable way seems better than failing in an unknown,
possibly recoverable way.

Update logging to be more explicit about what fails.

Tested by kill -9'ng Quasselcore during migration, then re-running
core afterwards.

In the future, for databases that support it (e.g. almost only
PostgreSQL), we may want to wrap upgrades in a transaction.  This
will need careful testing of potential additional space requirements
and any database modifications that might not be allowed in a
transaction.

sqlite> select * from coreinfo;
schemaversion|26
$ (sleep 0.5 && pkill -9 quasselcore ) & \
  ./run-profile.sh master core local
sqlite> select * from coreinfo;
schemaversion|30
$ ./run-profile.sh master core local
sqlite> select * from coreinfo;
schemaversion|31

5 years agocommon: Add '$i:identd', '*' for empty, tooltips
Shane Synan [Wed, 30 May 2018 00:27:37 +0000 (19:27 -0500)]
common: Add '$i:identd', '*' for empty, tooltips

Add "$i:identd" paramater variable to aliases, representing the ident
if verified, or "*" if unknown or unverified (prefixed with '~').

This allows for a general banning rule to target all idents for a
nickname that doesn't provide verified idents (e.g. general clients),
while limiting bans to specific idents for a nickname that provides a
verified ident (e.g. shared bouncer/core).

For example...
/mode channel +b *!$1:identd:$1:hostname

...would target "*!*@bad.example.com" for someone connecting without
an identd server, and "*!userid@shared.example.com" for someone
connecting with an identd server.

For all nickname-based parameters, substitute in "*" when empty
instead of leaving it blank.  This means using the variables for
nicknames that haven't been WHO'd will still provide results.

This may be dangerous if using the above example /ban alias on a
nickname that doesn't have hostname information available, e.g. if
you joined a channel after they did.

Update alias tooltips with 'identd', and totally revamp them using
the table layout for better readability and (hopefully?) easier
translation.

Update the comments in AliasManager, too, so it's a bit more
readable.

Thanks Exterminador for the suggestion/reporting, and @justJanne for
further clarifications!

5 years agocore: Include timezone for CTCP TIME replies
Shane Synan [Tue, 29 May 2018 18:36:31 +0000 (13:36 -0500)]
core: Include timezone for CTCP TIME replies

Explicitly specify the default Qt::TextDate date/time format to allow
modifying it.

On Qt 5, include the timezone data.  This doesn't reduce privacy as
timezone data could be figured out before by manually comparing with
UTC, this just makes it easier for those who want that information
shared.

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

5 years agocommon: Sort user prefix channelmodes on add/set
Shane Synan [Tue, 29 May 2018 02:17:10 +0000 (21:17 -0500)]
common: Sort user prefix channelmodes on add/set

Sort prefix channelmodes whenever adding/removing/setting per-channel
IrcUser modes.  This keeps the highest mode at the front, necessary
for backlog storage to allow only showing the highest mode.

It's not possible to get away without sorting as modes can be added
in any order.

modesToPrefixes/prefixesToModes operate in order, so sorting prefixes
results in sorted modes for free.  IrcUser modes don't need sorted as
they're not hierarchical and not stored anywhere.

5 years agoRename strict-ident, apply to non-identd response
Shane Synan [Tue, 29 May 2018 16:51:35 +0000 (11:51 -0500)]
Rename strict-ident, apply to non-identd response

Rename "--oidentd-strict" to "--strict-ident", better representing
what it now does - makes all ident replies strict.

Apply strict ident matching to normal (non-identd-enabled) ident,
too.  This allows strict ident to be enforced on IRC networks that do
not check identd responses.

(Yes, some IRC networks behave this way, expecting your shared user
bouncer to enforce ident.  ZNC allows this, so Quassel probably
should too.  No need to run an ident server for those networks.)

Clean up functions, making them a little more generic.  This also
sets the stage for exposing the strict ident mode to the client later
on.

5 years agoFix crash caused by repeated kicks of an already-kicked client
Michael Marley [Wed, 9 May 2018 03:17:21 +0000 (23:17 -0400)]
Fix crash caused by repeated kicks of an already-kicked client

As it turns out, the QHash[] operator implicitly adds nullptrs to
the map when called with a nonexistent key.  If a user clicked the
button to kick another client multiple times, this would cause a
nullptr to be inserted into the peerMap, then causing a crash later
on at least when another client connected.  To solve the problem,
the value() method is used instead, which has no such side-effect.
A big thanks to @digitalcircuit for discovering this behavior.

5 years agoclient: Fix core sessions unsupported warning
Shane Synan [Mon, 14 May 2018 06:00:19 +0000 (01:00 -0500)]
client: Fix core sessions unsupported warning

Move core session supported check to CoreInfoDlg, and show a
warning bar if sessions aren't supported.  A "Details" button
offers additional information on needing to upgrade.

Older core versions didn't provide any core session information, so
the individual session widgets would have never shown up.

Thanks to @justjanne for reporting this.

5 years agoclient: Fix Core Info session widget spacing
Shane Synan [Wed, 9 May 2018 01:28:29 +0000 (20:28 -0500)]
client: Fix Core Info session widget spacing

Fix spacing for Core Info session widget by keeping only one stretch
layout item and inserting before it, rather than manually adding
stretches after every client list update.

See https://doc.qt.io/qt-5/qboxlayout.html#insertWidget

5 years agoAutomatically synchronize CoreInfo when on connect and disconnect
Janne Koschinski [Fri, 2 Mar 2018 03:04:50 +0000 (21:04 -0600)]
Automatically synchronize CoreInfo when on connect and disconnect

This refactors CoreInfo to be a single common class rather than
separate classes for the core and client, adjusts it to properly
use the SyncableObject infrastructure, and adds support for
dynamically updating the list on both the client and core when a
client connects or disconnects, keeping the list up-to-date at all
times.  Forwards and backwards compatibility is maintained, though
the updated client is required in order for the automatic updating
to work.

Signed-off-by: Janne Koschinski <janne@kuschku.de>
Co-authored-by: Janne Koschinski <janne@kuschku.de>
Co-authored-by: Michael Marley <michael@michaelmarley.com>
5 years agoclient: Show when End Session unavailable, polish
Shane Synan [Wed, 28 Mar 2018 21:42:02 +0000 (16:42 -0500)]
client: Show when End Session unavailable, polish

Show when the End Session option is unavailable, adding a tooltip to
either point out an outdated core, or a client that doesn't support
it.

Before RemoteDisconnect was added to the core, it didn't share any
client features with other connected clients, so there's no way to
tell if a client supports a feature or not.

See 78b37c1a0610d9a4fb26ba0dec7337d6f7960041
"Transmit feature flag for remote disconnecting with peer info"

Disable and rename the End Session button when clicked, giving
immediate feedback when Quassel's used with a high-latency connection.

5 years agoclient: Migrate old highlight Channels to RegEx
Shane Synan [Mon, 14 May 2018 04:53:57 +0000 (23:53 -0500)]
client: Migrate old highlight Channels to RegEx

Add new settings minor version 8 to migrate existing local highlight
rules to the new format.  Specifically, any highlight rule with a
specified "Channel" filter is adapted into a regular-expression rule.

> Before
Name: a word
RegEx: disabled
Channel: (ChannelA|AnotherPlace)
> After
Name: (^|\W)a word(\W|$)
RegEx: enabled
Channel: (ChannelA|AnotherPlace)

This way RegEx channel rules will work by default now that the RegEx
flag controls wildcard vs. reg-ex for channel names, too.  And this
specific migration is backwards-compatible with previous client
versions, so downgrading won't break highlight rules.

(Functionality changed in other migration steps might break on
 downgrade, however.)

5 years agocommon: Apply RegEx, CS column to sender, channel
Shane Synan [Mon, 28 May 2018 20:33:05 +0000 (15:33 -0500)]
common: Apply RegEx, CS column to sender, channel

Modify scopeMatch to optionally treat the rule as a regular
expression, and to treat it as case-sensitive or not.

Modify highlight rule processing to...
* Use scopeMatch for "Sender", allowing easy multi-sender rules
* Treat both "Sender" and "Channel" as regular expressions if "RegEx"
  is checked, allowing for full regular expression power.
  (Breaks existing rules with RegEx matching, but in a different way)

This means it is no longer possible to use RegEx matching for the
"Sender" and "Channel" yet not on the phrase itself.  However, it
should be easy enough to work around this by using the same phrase
regular expression Quassel does.

This should simplify common highlight rules without limiting those
who know regular expressions.  Win-win, hopefully?

Update tooltips to reflect these changes.

5 years agoclient: Show feedback for Local Highlights import
Shane Synan [Fri, 2 Mar 2018 00:51:32 +0000 (18:51 -0600)]
client: Show feedback for Local Highlights import

Prompt before importing local highlight rules to guard against
accidental clicks.

Show a success message at the end indicating how many highlight rules
were imported.

Show an information message if no local highlight rules exist to
import.

5 years agoclient: Explain Local Highlights vs. Remote
Shane Synan [Fri, 2 Mar 2018 00:25:49 +0000 (18:25 -0600)]
client: Explain Local Highlights vs. Remote

Add footer to "Local Highlights" page to note that local highlights
apply to the current device only, including a "Details..." button.

Add a "Details..." dialog with a brief explanation and points out
where to configure highlights for all devices.

For Monolithic builds, indicate that "Remote Highlights" replaces
"Local Highlights" to help avoid confusion.  There's no remote core,
so local highlights have no reason to exist other than to provide a
path for upgrades.

5 years agoclient: Show when Remote Highlights unsupported
Shane Synan [Fri, 2 Mar 2018 16:20:12 +0000 (10:20 -0600)]
client: Show when Remote Highlights unsupported

Add a header to "Remote Highlights" page to warn when the Quassel
core is too old to support core-side highlights, including a
"Details..." to explain the purpose and what version is required.
Core connection is still required to make the UI selectable,
following the convention set by other panels.

This should help avoid people asking about "Remote Highlights" when
their core is too old.

Wrap the rest of the settings page in a widget to simplify enabling
and disabling all of it.

5 years agoclient: Add Highlight Rules tooltips, UI polish
Shane Synan [Thu, 1 Mar 2018 12:48:47 +0000 (06:48 -0600)]
client: Add Highlight Rules tooltips, UI polish

Add tooltips to every element of Highlight/Highlight Ignore tables,
and to the Local Highlight table.

Update the "Channel" tooltip to describe the non-regular-expression
approach used now.

Rename "Import" to "Import Local", add tooltip to better describe
purpose.

Move "Highlight Ignore Rules" table into QGroupBox to place at even
height with "Highlight Rules" box, making it less jarring to switch
between the two.

5 years agoclient: Unify Local/Remote Highlights table order
Shane Synan [Thu, 1 Mar 2018 10:06:22 +0000 (04:06 -0600)]
client: Unify Local/Remote Highlights table order

Put "Enabled" at front of Local Highlights table column order,
matching the ordering and name of Remote Highlights.

5 years agoclient: Fix Local Highlights import to remote
Shane Synan [Thu, 1 Mar 2018 08:29:29 +0000 (02:29 -0600)]
client: Fix Local Highlights import to remote

Make "importRules()" a private slot, not just a private function.
This allows the button signal to connect to this function, making
imports work.

5 years agoReally use Remote Highlights for nick, not Local
Shane Synan [Thu, 1 Mar 2018 23:59:50 +0000 (17:59 -0600)]
Really use Remote Highlights for nick, not Local

Really disable local nick highlights by default.  This will affect
those who upgrade and haven't changed the default highlight settings.
No settings migration provided since we intend to migrate to
core-side highlights entirely in the future.

Really enable remote nick highlights by default, setting a default
value for when highlights are not yet set up.  Fixes behavior of no
nickname highlighting by default.

5 years agocommon: Put scopeMatch in util, use in highlights
Shane Synan [Thu, 1 Mar 2018 08:06:42 +0000 (02:06 -0600)]
common: Put scopeMatch in util, use in highlights

Move ignore rule scopeMatch() to util to share usage with highlight
rule scope matching.

Use scopeMatch() in highlight rule channel name processing.

Advantages:
> Simpler to manage common cases
> Shares the same rules as ignore lists, already-learned behavior
Disadvantages:
> No way to escape ';' in rules
> No longer able to use full regular expressions
> Breaks existing channel name rules (also applies to local!)

(Another approach is to keep only local highlight rules inconsistent)

5 years agocommon: Add inverted scope match rules to ignores
Shane Synan [Thu, 1 Mar 2018 05:54:10 +0000 (23:54 -0600)]
common: Add inverted scope match rules to ignores

Add support for inverted scope matching subrules to ignore entries.
A match now only happens when the string does NOT match ANY inverted
rules and matches AT LEAST one normal rule, unless no normal rules
exist (implicit wildcard match).

Example:
> #quassel*; #foobar; !#quasseldroid

Matches "#foobar" and anything "#quassel...", except for
"#quasseldroid"

Example:
> !#quassel*; !#foobar

Matches anything except for "#foobar" or anything "#quassel..."

5 years agoclient: Disable case-sensitive check for no nick
Shane Synan [Wed, 28 Feb 2018 01:34:10 +0000 (19:34 -0600)]
client: Disable case-sensitive check for no nick

Disable "Case sensitive" highlight checkbox when highlight nicks is
set to "No nicks", as it has no effect on outcome.

5 years agoAdd a Configure menu item to Networks in the buffer list
genius3000 [Wed, 23 Nov 2016 09:04:46 +0000 (02:04 -0700)]
Add a Configure menu item to Networks in the buffer list

Add 'Configure' above 'Disconnect' in the right-click menu from a
network in the buffer list. Clicking 'Configure' will open the
Configure Networks dialog to the selected network.
Fixes #607

5 years agocommon: Notify if key was removed from settings
Manuel Nickschas [Sun, 3 Jun 2018 22:04:47 +0000 (00:04 +0200)]
common: Notify if key was removed from settings

Settings have a notification feature so consumers can subscribe to
value changes. This notification should also be emitted in case
a settings key is removed altogether.

5 years agocommon: Improve logger configuration
Manuel Nickschas [Wed, 23 May 2018 22:24:28 +0000 (00:24 +0200)]
common: Improve logger configuration

Initialize logging earlier, so output during core initialization
gets routed properly.

Enable the logging options also for quasselclient; there's no good
reason to limit this to the core and monolithic client. However, as
a side-effect, the default log level is now Info also for the client,
so "-l Debug" must be specified on the command line to get debug
output.

5 years agocommon: Use override instead of virtual
Manuel Nickschas [Wed, 23 May 2018 21:08:54 +0000 (23:08 +0200)]
common: Use override instead of virtual

Avoids a warning for inconsistent overrides.

This commit finishes up the giant rollup PR provided by
@digitalcircuit to consolidate a number of conflicting and
interdepending PRs. Thanks a lot for all the work!

Closes GH-357.

5 years agocommon: Remove the lastAwayMessage Q_PROPERTY declaration
Manuel Nickschas [Wed, 23 May 2018 21:01:41 +0000 (23:01 +0200)]
common: Remove the lastAwayMessage Q_PROPERTY declaration

Since this property is only synced by pre-0.13 cores, and not used
by any released clients, it doesn't need to be marked as a Q_PROPERTY.

Also avoids a warning for the property not having a getter.

5 years agocore: Migrate SQLite schema to MSec, warn of slow
Shane Synan [Sun, 13 May 2018 20:46:11 +0000 (15:46 -0500)]
core: Migrate SQLite schema to MSec, warn of slow

Migrate SQLite schema to read and store time in milliseconds,
offering greater precision matching that of PostgreSQL.

On upgrade, run "UPDATE backlog SET time = time * 1000" to adjust
existing times.  This is a full backlog update, potentially taking
minutes to hours.

Based on testing, this was the fastest "proper" way to migrate an
existing database.  A pessimistic scenario, 328 MB database on a
Raspberry Pi 2 with Ubuntu 16.04 running from a Class 10 SD card
takes...
> In-place update (chosen method): 361.991s
> Create new table, multiply int:  905.749s
> Create new table, numeric:       983.501s

A normal HDD is much faster, e.g. 97.686s for the same database on a
5400 RPM drive, Seagate ST96812AS.
(Thanks @romibi for testing!)

Other methods may be faster, but may be more prone to mistakes down
the road.

Update the schema upgrade message to warn of delays for major
upgrades, and provide feedback when upgrade succeeds.

> Installed Schema (version %1) is not up to date. Upgrading to
> version %2...  This may take a while for major upgrades.

> Installed Schema successfully upgraded to version %1.

CAUTION:  Monolithic does not show any migration GUI.  Monolithic
installs with large databases on slower computers may appear to not
be responsive.  Include a mention of upgrade time in the release
notes.

5 years agoIrcUser: Rename lastAwayMessage to lastAwayMessageTime
Michael Marley [Sat, 12 May 2018 20:20:58 +0000 (16:20 -0400)]
IrcUser: Rename lastAwayMessage to lastAwayMessageTime

This will make it easier for clients to implement both at the same
time.  Also, add a backwards-compatibility function to allow old
cores to set the lastAwayMessageTime.  There is still no forwards-
compatibility (support for old clients on new cores) since no
existing clients do anything with lastAwayMessage.

5 years agoIrcUser: Use QDateTime for lastAwayMessage, not int
Michael Marley [Thu, 10 May 2018 18:32:31 +0000 (14:32 -0400)]
IrcUser: Use QDateTime for lastAwayMessage, not int

This converts the lastAwayTime to a 64-bit time.  Backwards-
compatibility is also included in Network to convert back and forth
between the old 32-bit type for legacy peers.  No backwards-
compatibility is provided for the SYNC call because the value is
never actually used in any existing clients.  New clients that want
to implement this functionality would need to implement the
LongTime feature.

5 years agoFinish 64-bit time conversion, modify protocol
Shane Synan [Fri, 11 May 2018 00:20:12 +0000 (19:20 -0500)]
Finish 64-bit time conversion, modify protocol

Convert the remaining uses of 32-bit quint-based
"[to|from|set]Time_t()" to the modern 64-bit qint64-based
"[to|from|set]MSecsSinceEpoch()", handling the Y2038 problem while
also gaining higher precision in some places.

For places where seconds are needed, e.g. converting incoming time
from the IRC protocol, make use of "[to|set|from]SecsSinceEpoch()"
instead.  As this was only added in Qt 5.8, use the "QT_VERSION"
macro for backwards compatibility, manually dividing by 1000 for the
"MSecs" function equivalents.

Beware, all new code should use "[to|from|set]MSecsSinceEpoch()" and
NOT use "[to|from|set]Time_t()", or you'll re-introduce Y2038 bugs!

Modify protocol to rename "LongMessageTime" to "LongTime", and
send/receive all times as "qint64" instead of "quint64" or "quint".
"LongMessageTime" was never in Quassel git master, so renaming it
should have no impact.

Modify Event timing to be 64-bit compatible, too.

"IrcUser::lastAwayMessage()" will be fixed in a follow-up commit.

SQLite millisecond precision will be fixed in a follow-up commit.

See https://doc.qt.io/qt-5/qdatetime.html
And https://doc.qt.io/qt-5/datastreamformat.html
And https://doc.qt.io/qt-5/qdatetime-obsolete.html

5 years agoChange Message::Flags/Type cast to Int, not UInt
Shane Synan [Tue, 8 May 2018 23:24:38 +0000 (18:24 -0500)]
Change Message::Flags/Type cast to Int, not UInt

Use toInt() for casting `Message::Flags` and `Message::Type`, instead
of toUint().

MSVC has trouble with uint-based enums, so Quassel switched to int
enums.  However, not all of the enum casts were converted, resulting
in needless unsigned-to-signed casting.

Thanks to @justJanne for reporting this.

5 years agocore: Fix 64-bit ID SQLite -> Postgres migration
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 (50000000005000000000000,
        (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

5 years agoUse 64-bit IDs for messages
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.

5 years agocore: Allow configuring DB/auth from environment
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.

5 years agocore: Store session state in database, migrate old
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.

5 years agoImplement type-filtered backlog fetching
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.

5 years agocore: Fix PostgreSQL realname/avatarurl handling
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.)

5 years agocore: Fix SQLite realname/avatarurl handling
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.)

5 years agoImplement sender realname/avatarurl storage
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.

5 years agoprotocol: Implement 64-bit message timestamps
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.

5 years agoStore highlight status per buffer coreside
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.

5 years agoPersist Blowfish keys in the database
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.

5 years agocore: Avoid confusing log message when legacy client connects
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.

5 years agoFixes the Highlight Rule Manager
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

5 years agoSome cleanups
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.

5 years agoCache strict sysident mappings
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>
5 years agoAdd strict-oidentd mode
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>
5 years agoAdd support for Elliptic Curve keys for CertFP
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.

5 years agocmake: Fix build with Qt 5.11
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.

5 years agoImprove channel navigation shortcut in some cases
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.

5 years agocore: handleMode: Fix persistent modes reset
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.

5 years agoFix support for extended features on Qt4
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.

5 years agoUpdate ChangeLog
Manuel Nickschas [Mon, 23 Apr 2018 21:37:04 +0000 (23:37 +0200)]
Update ChangeLog

5 years agoUpdate AboutData
Manuel Nickschas [Mon, 23 Apr 2018 21:36:56 +0000 (23:36 +0200)]
Update AboutData

5 years agoReject clients that attempt to login before the core is configured
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.

5 years agoImplement custom deserializer to add our own sanity checks
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.

6 years agouisupport: Forcefully disable horizontal scrollbar in BufferView
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.

6 years agocmake: Add exception handling support to MSVC compile flags
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.

6 years agoSemi-yearly copyright bump
Manuel Nickschas [Tue, 10 Apr 2018 19:59:19 +0000 (21:59 +0200)]
Semi-yearly copyright bump

It's no longer 2016.

6 years agoPackage Mac Style plugin (for Qt 5.10+)
romibi [Fri, 6 Apr 2018 17:25:17 +0000 (19:25 +0200)]
Package Mac Style plugin (for Qt 5.10+)

Closes GH-349.

6 years agoPostgreSqlStorage: Fix apparently-incorrect index in requestAllMsgs
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.

6 years agoSslServer: Add support for Elliptic Curve keys
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.

6 years agoChange HTTP links to HTTPS for quassel-irc.org and subdomains
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.

6 years agocore: Fix CAP REQ display for SASL only supported
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.

6 years agoLock Toolbars too
romibi [Mon, 5 Mar 2018 17:54:15 +0000 (18:54 +0100)]
Lock Toolbars too

Closes GH-324.