Jay Colson [Sun, 19 Jul 2020 20:18:01 +0000 (16:18 -0400)]
sql: Remove PostgreSQL text limits, fixes hangs
Modify all PostgreSQL text column limits to the unlimited TEXT type
instead of VARCHAR. Modern PostgreSQL versions (year 2000 onward) do
not store text any differently depending on whether or not it's TEXT
or VARCHAR.
https://www.postgresql.org/message-id/20667.
971213689%40sss.pgh.pa.us
This avoids having the core fail to save values or hang entirely, and
also addresses migration issues from SQLite where text limits aren't
applied.
See https://bugs.quassel-irc.org/issues/1526
This shouldn't introduce any noticeable performance impact:
https://stackoverflow.com/questions/
1067061/does-a-varchar-fields-declared-size-have-any-impact-in-postgresql
Fix up a spurious length-limited field for SQLite in case length
limits are applied in newer SQLite versions.
The proper long-term fix is to implement length checks throughout the
Quassel core (sanitizing data) and client (to warn of length issues),
rather than relying on the database to enforce limits.
Sponsored by Postgres Phone Plans. UNLIMITED TEXT, TALK, and DATA for
$9.99 a month! Some restrictions apply. This is not serious.
[Commit squashed from "jcolson", thanks!]
See https://github.com/quassel/quassel/pull/478
Fixes GH-478
Fixes #1526
Shane Synan [Mon, 9 Nov 2020 04:21:49 +0000 (23:21 -0500)]
ci: Workaround macOS hdiutil out of space errors
Workaround "hdiutil: create failed - No space left on device" by
letting hdiutil auto-detect the required disk space. Keep the old
method around via documentation in case this issue arises again.
https://stackoverflow.com/questions/
18621467/error-creating-disk-image-using-hdutil
https://apple.stackexchange.com/questions/156994/yosemite-hdiutil-create-failed-error-5341
https://asmaloney.com/2013/07/howto/packaging-a-mac-os-x-application-using-a-dmg/
https://github.com/autopkg/jps3-recipes/issues/57
Make this issue easier to detect by changing the build script
macosx_makePackage.sh to fail early if any individual command fails.
This includes fixing up optional parameters to use default values.
Re-enable the "Check artifacts" step of the "Post-Build" process now
that macOS builds are hopefully more reliable.
alturiak [Tue, 4 Sep 2018 19:10:37 +0000 (21:10 +0200)]
core: Improve setkey usage output
Provide information about available encryption modes and prefixes
in /setkey's usage output.
Manuel Nickschas [Sun, 4 Oct 2020 15:44:33 +0000 (17:44 +0200)]
qtui: Fix missing default value for backlog fetching
If EnsureBacklogOnBufferShow is not configured in the settings, it
should be defaulted to true. Otherwise, Quassel will show empty
buffers until manually scrolled.
Shane Synan [Sun, 28 Jun 2020 08:41:44 +0000 (04:41 -0400)]
client: Workaround initial backlog fetch scrolling
Workaround ChatView scrolling somewhere into the middle when first
fetching enough backlog for the vertical scrollbar to become visible.
This happened before when fetching backlog by scrolling, but due to
initial backlog fetching was less noticeable.
A proper fix would be nicer, but this workaround seems to work for
now. Feel free to tear this out later!
Shane Synan [Sun, 28 Jun 2020 05:54:36 +0000 (01:54 -0400)]
client: Default to AsNeeded backlog fetching
Default to the AsNeeded backlog requester for better performance with
modern (v0.13.0 or newer) Quassel cores. Legacy cores are handled
as well.
This modifies new installs and existing configurations if the prior
default value wasn't changed. Might be worth a mention in the release
notes given the potential performance improvement.
Shane Synan [Sun, 28 Jun 2020 05:49:43 +0000 (01:49 -0400)]
client: Add AsNeededBacklogRequester, faster login
Add AsNeededBacklogRequester, which behaves exactly like the
FixedBacklogRequester for legacy cores older than v0.13.0
(lacking Feature::BufferActivitySync). For modern cores, no backlog
is initially fetched. This should speed up logging in with no loss of
buffer activity signaling.
This breaks the "Show messages from backlog" feature as no backlog is
fetched. The original always-fetch backlog requesters remain
available for those who prefer having the backlog in the Chat Monitor.
Add a warning to the Chat Monitor settings page when
"Only fetch when needed" Backlog Fetching is enabled.
Don't allow BacklogSettings to return the GlobalUnread backlog
requester type. The UI for choosing it has been disabled, but it
could have accidentally been selected in the past. If this had
happened before this change, AsNeeded will be selected instead.
Shane Synan [Sun, 28 Jun 2020 05:41:00 +0000 (01:41 -0400)]
client: Optionally ensure backlog on buffer show
Add a default-enabled option to ensure backlog is available when
showing a buffer, using the same logic as scrolling up in a buffer
whenever switching to a buffer. No additional messages will be
fetched if the scrollbar is already visible.
This makes using Quassel without any initial backlog fetching more
convenient, as you don't need to scroll upon clicking every buffer.
Note: if all loaded messages are filtered out, nothing will appear to
be visible on the first showing, and more backlog will be fetched the
next time the buffer is shown (or if scrolled, like before). This
happens with Quassel today already, anyways, but implementing
"fetch until visible" be a good future improvement, mirroring what
Quasseldroid does.
Shane Synan [Thu, 25 Jun 2020 19:37:24 +0000 (15:37 -0400)]
client: Fix backlog requests with 0 initial fetch
If no available messages in a buffer exist, try fetching the newest
messages. This fixes requesting additional backlog for a buffer when
the initial backlog fetching has been disabled (set to zero).
Shane Synan [Wed, 15 Jul 2020 23:08:41 +0000 (19:08 -0400)]
uisupport: Fix invalid model segfault from index
The Qt implementation of QModelIndex::child(...) automatically checks
if the QAbstractItemModel is valid, and if not, it returns an invalid
QModelIndex. Quassel relied upon this in several places, checking if
the QModelIndex was valid without checking the QAbstractItemModel
itself, which introduced crashes upon migrating away from the
deprecated QModelIndex::child(...) function.
Specifically...
#if QT_DEPRECATED_SINCE(5, 8)
inline QModelIndex QModelIndex::child(int arow, int acolumn) const
{ return m ? m->index(arow, acolumn, *this) : QModelIndex(); }
#endif
To address this, check the QModelIndex's model to verify it's valid
wherever Quassel had previously relied upon a check to
QModelIndex::isValid() to ensure validity. Places without a validity
check aren't adjusted under the assumption it won't ever be an issue.
Follow-up to the Qt deprecation fixes in
a453c963cf1872e14c83adf1d40a31821c166805
(It's unfortunate that Qt's deprecation warning mentioned this, but
only in the detailed documentation and not as clearly as expected:
https://doc.qt.io/qt-5/qmodelindex-obsolete.html )
Special thanks to oprypin for reporting this with a detailed,
reproducible test case!
Fixes #1583
Shane Synan [Sat, 11 Jul 2020 21:51:45 +0000 (17:51 -0400)]
common: Fix IrcUser::quitInternal not syncing quit
Fix the new IrcUser::quitInternal() function to call IrcUser::quit()
over the network, restoring compatibility with both old and new
Quassel clients.
Only the core needs upgraded to fix this; the client does not sync
calls to IrcUser::quit().
> Before, core + client latest
<-- kiwipre-68 ([...]) has quit (Client Quit)
2020-07-11 17:53:26 [Warn ] "no matching slot for sync call: IrcUser::quitInternal (objectName=\"2/kiwipre-68\"). Params are:" ()
> After, core + client latest
IrcUser is successfully marked as having quit, removed from nick list.
Fixes the fix in
7298446b3e86140c4bbbfe7aeeb959c16c53363c
Shane Synan [Fri, 10 Jul 2020 21:50:59 +0000 (17:50 -0400)]
core: Fix SQL defaults for filtered backlog fetch
Modify the SQL queries for *_filtered.sql backlog fetching to allow
specifying an invalid type of "0" or "-1" to match any message type.
This allows filtering backlog fetching by flag without restricting by
type.
Also modify the "= 0" check for :flag to "<= 0". This matches the
function definitions and fixes specifying "-1" instead of "0".
Without this change, specifying "-1" will result in missing messages!
Committed separately from the new forward backlog fetching in case
issues are found, making reverting easier.
Shane Synan [Fri, 10 Jul 2020 21:23:18 +0000 (17:23 -0400)]
core: Fix/unify SQL for forward message fetch
NOTE: This commit should be squashed into the previous commit from
justJanne. It's committed separately just to make it easier to see
what I changed.
Fixup the SQLite and PostgreSQL queries to treat "<= 0" as any
type/flag instead of just "= 0". This matches the function
definitions and fixes specifying "-1" instead of "0". Without this
change, specifying "-1" will result in missing messages!
Janne Mareike Koschinski [Thu, 2 Jul 2020 20:01:26 +0000 (22:01 +0200)]
Apply suggestions from code review
Co-authored-by: Shane Synan <digitalcircuit36939@gmail.com>
Janne Koschinski [Sun, 28 Jun 2020 09:32:39 +0000 (11:32 +0200)]
[PR-540] Add a new feature flag
Janne Koschinski [Sun, 28 Jun 2020 09:29:37 +0000 (11:29 +0200)]
[PR-540] Allow loading backlog in reverse direction
Vitor Luis [Sat, 1 Feb 2020 11:36:02 +0000 (12:36 +0100)]
common: Use /quote by default for aliases
Sending `/quote` instead of `/msg` is probably the most widely used
method by other IRC clients and will also make them work out of the
box with DALnet that requires that commands to NickServ (as example)
to be sent explicitly as `/msg NickServ@services.dal.net` to work.
I've tested this myself in DALnet, Freenode and some other networks
with different IRCd flavours and all worked without any problems.
Shane Synan [Sat, 20 Jun 2020 03:04:59 +0000 (23:04 -0400)]
client: Deprecate local highlight, migrate cleanup
Deprecate "Local Highlights" for client and core setups, adapting the
name "Legacy Highlights" as used with monolithic installs. Make the
legacy nature more prominent, but keep support enabled. In the
future, legacy highlights should be disabled and invisible except when
connected to older cores.
Rename "Remote Highlights" to "Highlights" and place first in the
settings list.
When using the "Import Legacy" button, migrate nickname highlight
settings and offer to remove the old local highlight rules, avoiding
redundant highlight rules.
This should help reduce the cases where Highlight Ignore Rules are
configured, but don't seem to respond due to client highlights
overriding the core-side highlight ignore rules.
Shane Synan [Sat, 20 Jun 2020 00:14:17 +0000 (20:14 -0400)]
Revert "settings: Local Highlights, default Current nick"
This reverts commit
8fb51dcb129db8399209e9d07b518063d1a910f1.
Quassel 0.13 with core-side highlight support ("Remote Highlights")
has been out for roughly 1.5 years (2018-11-17). Users have gotten
confused by why highlight ignore rules don't work, only to find out
client-side ("Local Highlights") were enabled instead. Disable local
highlights by default to avoid this issue. Those using old cores can
re-enable this.
Shane Synan [Sun, 21 Jun 2020 23:36:38 +0000 (19:36 -0400)]
common: Exclude ignored messages in buffer activity
Add a new message flag, 'Ignored', tracking if the message matched an
ignore rule when received. In practice, this refers to dynamic ignore
rules (SoftStrictness), as permanent ignore rules (HardStrictness)
will drop the message entirely. Simple clients/bots may use this to
apply ignore rules without having to implement the entire regular
expression rules.
Exclude messages that match an ignore rule when updating
bufferActivity and highlightCount, fixing the appearance of new
activity/highlights from ignored messages.
Fixes #1511
NOTE: Using the 'Ignored' flag is not recommended for full clients as
they will need to locally reveal hidden messages when specific dynamic
ignore rules are disabled.
Clean up leftover comment on serializing sender prefixes.
Co-authored-by: Janne Koschinski <janne@kuschku.de>
Hannah von Reth [Tue, 9 Jun 2020 20:02:44 +0000 (22:02 +0200)]
Include XDG search dirs on mac
Manuel Nickschas [Sat, 3 Oct 2020 15:01:30 +0000 (17:01 +0200)]
ci: Make artifact sanity checks non-fatal for now
Currently, macOS packaging is unreliable due to a race condition in
the ancient scripts, sporadically leading to a missing QuasselCore
package. A proper fix would require a modernization of the packaging
process.
Mark the artifact sanity check non-fatal for now, until a proper
solution can be implemented.
Shane Synan [Fri, 19 Jun 2020 23:18:18 +0000 (19:18 -0400)]
common: Default Away on Detach for new identities
Change default for newly created identities to enable Detach on Away.
This more closely follows other modern chat networks, and can always
be disabled.
Alex McGrath [Thu, 1 Aug 2019 16:07:46 +0000 (17:07 +0100)]
Add button and bindings for striking through text
This includes icons and a small regex fix from @digitalcircuit
Shane Synan [Mon, 22 Jun 2020 01:48:29 +0000 (21:48 -0400)]
docs: README.md note login to download auto-builds
Add note to README.md explaining that one must log into GitHub to
download artifacts, i.e. the automated Windows and macOS builds. This
does not impact full releases.
This commit can be reverted once the GitHub issue is addressed.
See https://github.com/actions/upload-artifact/issues/51
Shane Synan [Fri, 19 Jun 2020 20:52:02 +0000 (16:52 -0400)]
docs: Update README.md badge, download for Actions
Update the badges in README.md to point to the new GitHub Actions CI
integration, removing the old Travis and AppVeyor badges.
Update the "Downloading" text to point to the new Windows and macOS
build artifacts provided by GH Actions. Now we can limit shown builds
to the 'master' branch, hooray!
See: https://help.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow#adding-a-workflow-status-badge-to-your-repository
And: https://stackoverflow.com/questions/
57719605/official-badge-for-github-actions
Shane Synan [Fri, 19 Jun 2020 20:48:53 +0000 (16:48 -0400)]
docs: Inline important URLs in README.md
Move all single-use, important URLs in README.md from the bottom index
to where the link is used. This makes the document easier to navigate
when reading it as a plain text file. There's no differences to the
rendered Markdown view.
Steve Groesz [Sat, 23 Mar 2019 23:56:57 +0000 (18:56 -0500)]
Update custom time format tooltip
Provide reference to Qt::QDateTime::toString method used to convert
timestamp in the custom timestamp format ToolTip text.
Daniel Albers [Thu, 25 Jun 2020 20:46:32 +0000 (22:46 +0200)]
Add rough instructions for synchronizing the i18n repository
Daniel Albers [Thu, 25 Jun 2020 20:31:58 +0000 (22:31 +0200)]
Update translations from Transifex
28868 translated messages
Many thanks to:
- cs: Jaroslav Lichtblau <jlichtblau@seznam.cz>
- da: Joe Hansen <joedalton2@yahoo.dk>
- de: Hightension <Jonathanfriedrich@live.de>
- el: differentreality <differentreality@gmail.com>,
Theofilos Intzoglou <int.teo@gmail.com>
- en_US: Chris <chris@chrisegeland.com>
- eo: Tinjo Kohen <tiffypet@yahoo.com>
- es: Chris <chris@chrisegeland.com>, Javier Llorente <javier@opensuse.org>
- fi: Lasse Liehu <larso@gmx.com>
- fr: Olivier Caron <crn.olivier@gmail.com>
- hi: Raju Devidas Vindane <rajuvindane@gmail.com>
- it: Francesco <rbrfnc@ymail.com>
- ko: Tae-Hoon KWON <zerolaunch@naver.com>,
Thomas Sungjin Kang <potopro@gmail.com>
- lt: Liudas Alisauskas <liudas.alisauskas@gmail.com>
- mr: Raju Devidas Vindane <rajuvindane@gmail.com>
- nb: Chris <chris@chrisegeland.com>,
sandsmark <inactive+sandsmark@transifex.com>
- pa: A S Alam <alam.yellow@gmail.com>
- pl: derpella <matwa@poczta.pl>, Miłosz Rachwał <transifex@milek7.pl>
- pt: Vitor Luis <droider.pc@gmail.com>
- ro: Sergiu Bivol <sergiu@cip.md>, Arthur Țițeică <arthur.titeica@gmail.com>
- ru: Andrei Stepanov <adem4ik@gmail.com>
- sl: Andrej Mernik <andrejm@ubuntu.si>
- sr: Jovan Jojkić <jovanjojkic@gmail.com>
- uk: Yuri Chornoivan <yurchor@ukr.net>
- zh_CN: Feng Chao <chaofeng111@qq.com>
Manuel Nickschas [Thu, 18 Jun 2020 19:50:55 +0000 (21:50 +0200)]
ci: Add sanity check for artifacts to post-build job
Check if expected artifacts have been created for every workflow run,
not only for tagged commits. While this is just a rudimentary
sanity check, it would at least cause a CI failure if one of the
build jobs didn't produce artifacts for some reason.
A nice side effect is that unlike the former create-release job,
the new post-build job is not completely skipped for non-tagged
commits, and thus shows up as successful for every good CI run
(even though the individual steps required for creating a draft
release are skipped, of course).
This causes the GitHub UI to automatically collapse the (giant)
list of checks after they are all complete.
Manuel Nickschas [Thu, 18 Jun 2020 17:28:27 +0000 (19:28 +0200)]
ci: Replace Travis and Appveyor CIs by a GitHub Workflow
Replace the previous CI systems by a GitHub Workflow for all supported
platforms. This unifies the full CI setup in a single place, and
provides better integration into GitHub itself via the checks API.
Additionally, GitHub provides us with more resources than the other
systems, enabling more parallel and faster build jobs. As a result,
we can afford a larger build matrix than before, and now cover
additional Linux baselines. Unlike Appveyor, GitHub also parallelizes
Windows build jobs, which resolves the huge bottleneck we had
when pushing multiple PRs or branches.
The total turnaround time is still dominated by the Windows build,
but at around 15 minutes it is much faster than before.
GitHub also has a sane retention policy that keeps temporary artifacts
around for several months, and won't run out of space during active
development times like Appyevor did.
For tagged commits, a draft release is automatically created and the
source archive as well as packages for Windows and macOS are attached.
The tag annotation is used for the release notes. Releasing as a
draft allows for final, manual changes before publishing the release.
Note that this change should also enable CI runs in forks, so
contributors can enjoy CI feedback while developing, prior to creating
a pull request.
Manuel Nickschas [Mon, 15 Jun 2020 23:51:34 +0000 (01:51 +0200)]
cmake: Allow deprecation warnings
In recent releases, Qt deprecated a whole bunch of APIs, probably
in preparation of the advent of Qt 6. Unfortunately, avoiding those
is not straightforward, since Quassel has to support a broad range
of older Qt releases, and not all deprecated APIs are easy to replace
in those older versions. Some APIs, such as bearer management, don't
even have a replacement yet.
Since Qt 5.13, deprecation warnings cannot be disabled at all. To
avoid breaking the CI builds, make deprecation warnings non-fatal
even if FATAL_WARNINGS is enabled. This allows us to remove the
WARN_QT_DEPRECATION option, which only had an effect when building
against Qt < 5.13 anyway, and unconditionally enable the warnings
when compiling with GCC or Clang.
For MSVC, disable deprecation warnings completely, since there
seems to be no way to selectively make warnings non-fatal, and we
still want to fail for anything other than deprecations.
Disable the use of APIs completely that were deprecated in Qt 5.5
(our current baseline) or earlier to prevent accidental use.
This threshold can be raised in the future as we can rely on newer
Qt versions and modernize affected code.
Manuel Nickschas [Sat, 30 May 2020 13:18:59 +0000 (15:18 +0200)]
travis: Add Debian Stable and Testing to the list of CI distros
In addition to have a recent Ubuntu LTS as a baseline (we'll
switch to Bionic after the next Quassel release), supporting Debian
Stable also seems prudent. Add this distro to the CI system to
ensure that we don't break the build on Debian Stable.
Also enable Debian Testing, which should provide us with an early
warning system in case toolchain or dependency changes are about
to break Quassel.
Manuel Nickschas [Tue, 26 May 2020 16:57:08 +0000 (18:57 +0200)]
travis: Remove Ubuntu Cosmic, add Eoan and Focal
Remove the EOL'd Ubuntu 18.10 "Cosmic Cattlefish" release, add
Ubuntu 19.10 "Eoan Ermine" and Ubuntu 20.04 LTS "Focal Fossa".
Reflect the change of naming scheme in the quassel-build-env
repository, where branches (and docker tags) are now prefixed
with distro name to prepare for adding additional distros to CI.
Manuel Nickschas [Sun, 15 Mar 2020 19:26:53 +0000 (20:26 +0100)]
ssl: Remove legacy useSsl account setting
The UI for disabling client-side SSL support has been removed a long
time ago, but the setting still existed in CoreAccount and related
classes.
Since SSL is now always support in the client, remove the remnants
of the legacy setting.
Note that cores still must be able to cope with legacy clients that
have SSL disabled.
Manuel Nickschas [Sun, 15 Mar 2020 19:24:59 +0000 (20:24 +0100)]
ssl: Use QSslSocket directly to avoid redundant qobject_casts
Use QSslSocket in the AuthHandler API to avoid having to cast
QTcpSocket to the SSL version in several places.
Manuel Nickschas [Sun, 15 Mar 2020 19:18:20 +0000 (20:18 +0100)]
ssl: Use Pending Connections mechanism for SslServer
Since Qt 4.7, it is no longer necessary to manage incoming connections
manually in specializations of QTcpServer. Instead, newly created
sockets can be added to the internal queue.
Manuel Nickschas [Sun, 15 Mar 2020 17:59:20 +0000 (18:59 +0100)]
ssl: Remove HAVE_SSL define
With fallback code for missing SSL support removed from the code base,
the HAVE_SSL define is no longer needed.
Janne Koschinski [Mon, 5 Aug 2019 17:34:45 +0000 (19:34 +0200)]
ssl: Remove fallback code for missing SSL support
Manuel Nickschas [Sun, 15 Mar 2020 17:55:01 +0000 (18:55 +0100)]
ssl: Require SSL support in Qt
There is no sane reason for not using SSL in the year 2020, plus
every distro should be shipping the Qt libraries with SSL support
enabled. Thus, make it mandatory for Quassel, too.
Going forward, this allows us to remove lots of fallback code paths
that make the code much more complex in many places, and that have
not been tested (or even been built) in a long time.
Svetlana T [Sat, 7 Mar 2020 20:46:19 +0000 (07:46 +1100)]
Removed mozilla IRC network from networks.ini
Mozilla IRC has shut down this month. Mozilla moved their chat services to matrix. I am removing it from the default preset now.
Janne Koschinski [Thu, 11 Jun 2020 09:09:49 +0000 (11:09 +0200)]
[Followup PR-495] Fixes backwards compatibility issues
- Moves functionality to an internal function
- Restores original sync slots
Manuel Nickschas [Thu, 28 May 2020 14:39:37 +0000 (16:39 +0200)]
core: Remove slots from storage APIs
Remove the deprecated slots declaratiosn from the storage APIs. This
avoids problems with the now non-copyable SyncableObject with ancient
versions of Qt, where the MOC generated code for slots that required
arguments to be copyable.
Manuel Nickschas [Wed, 27 May 2020 21:21:20 +0000 (23:21 +0200)]
common: Make SyncableObject non-copyable
QObjects are non-copyable for good reasons. SyncableObject, although
deriving from QObject, was made sort-of copyable by adding custom copy
ctor and copy assignment operator that did not make a full copy of the
underlying QObject, but just copied (most) properties. Several classes
deriving from SyncableObject then implemented their own versions of
those special member functions on top of that. This was not only
rather unexpected and intransparent behavior due to the incomplete
copy functionality, but also a most fragile hack since one had to
remember to update those functions when adding or modifying
properties.
In addition, newer compilers apply a somewhat stricter interpretation
of the C++ standard, basically enforcing the Rule of Three by omitting
implicit generation of copy ctor and/or copy assignment operating
in case certain user-defined special member functions exist. In
particular, Clang 10 started to emit several warnings (and we already
worked around a similar warning from GCC 9+ in
cc21148).
Instead of adding more workarounds further obfuscating matters, remove
the relevant special member functions altogether and thus make
SyncableObject and its derivatives non-copyable as they should be.
Modify affected code to cope with this cleanly, and without abusing
unexpected behavior.
Shane Synan [Mon, 27 Jan 2020 06:53:16 +0000 (01:53 -0500)]
core: Clarify name of capsPendingNegotiation flag
Rename "capNegotiationInProgress()" to "capsPendingNegotiation()"
to better clarify the meaning of the function. This checks if any
capabilities are queued for an ongoing negotiation; it does not
represent whether or not "CAP LS" has been sent.
Shane Synan [Mon, 27 Jan 2020 06:24:06 +0000 (01:24 -0500)]
core: Fix capability messages for repeat CAP LS
Fix capability negotiation messages for manually running "/CAP LS",
and for when the server provides capabilities but Quassel does not
support any of them.
Before, running "/CAP LS" after negotiation would erroneously print
"* No capabilities available"
Now, running "/CAP LS" provides a summary of the current situation,
"* No additional capabilities are supported (found: a-aa, b-bb, c-cc;
currently enabled: a-aa, b-bb)"
Janne Koschinski [Thu, 30 May 2019 06:39:06 +0000 (08:39 +0200)]
Sync last message id per buffer
Janne Koschinski [Thu, 30 May 2019 06:36:55 +0000 (08:36 +0200)]
Fix buffersyncer state when merging buffers
Janne Mareike Koschinski [Fri, 6 Dec 2019 09:44:50 +0000 (10:44 +0100)]
Implement support for the HAProxy proxy protocol
Janne Koschinski [Tue, 3 Sep 2019 17:35:17 +0000 (19:35 +0200)]
Minor cleanup of metrics server
- Remove unused raw login metric
- We won't ever have more than 4 billion sessions at a time per user
Manuel Nickschas [Sun, 15 Mar 2020 15:24:01 +0000 (16:24 +0100)]
src: Yearly copyright bump
Let's welcome 2020.
A. Wilcox [Mon, 3 Jun 2019 05:16:30 +0000 (00:16 -0500)]
multilineedit: handle unterminated mIRC codes
Currently, if an unterminated mIRC code is pasted into Quassel, trying to
go through input line history will cause a deadlock. This breaks the loop
at the cost of possibly mangling the formatting of the line somewhat.
This is seen as more acceptable than locking up, and the line is invalid
anyway.
Reproducer:
```sh
printf '\00303,08HONK' | xclip -selection clipboard
```
Paste into Quassel, send, press Up arrow key.
Bug originally found by @sroracle, reported to Adélie Linux, patched by
yours truly.
Janne Koschinski [Tue, 28 May 2019 11:04:06 +0000 (13:04 +0200)]
Fix protocol spam on part/quit/disconnect
Janne Koschinski [Mon, 26 Aug 2019 14:51:18 +0000 (16:51 +0200)]
Improve identd
- add debug output
- improve formatting of identd responses
Hannah von Reth [Sat, 19 Oct 2019 17:34:48 +0000 (19:34 +0200)]
Use correct data Path on Windows
Hannah von Reth [Sat, 19 Oct 2019 17:32:58 +0000 (19:32 +0200)]
Install notifyrc on all platforms if WITH_KF5 is True
Manuel Nickschas [Tue, 7 Jan 2020 19:40:01 +0000 (20:40 +0100)]
qa: Use QProcess::errorOccurred instead of QProcess::error if possible
To avoid an overloaded signal name, Qt 5.6 introduced the signal
QProcess::errorOccurred() to replace QProcess::error(). The latter one
is deprecated since Qt 5.14, so avoid using it if possible.
Manuel Nickschas [Tue, 7 Jan 2020 19:39:38 +0000 (20:39 +0100)]
qa: Replace deprecated QString::sprintf() by QString::asprintf()
Manuel Nickschas [Tue, 7 Jan 2020 19:31:31 +0000 (20:31 +0100)]
qa: Avoid deprecation warnings for QList/QSet conversions
Qt 5.14 deprecated the explicit functions for converting between
QSet and QList, preferring instead the use of range-based ctors.
Unfortunately, those ctors were only added in Qt 5.14, so we can't
use them when compiling against older versions.
Add a util function for QList->QSet to keep the version check in
a single place. Replace the other direction by using QSet::values().
In some cases, conversions could be avoided altogether, or an STL
container be used easily, so do that.
Manuel Nickschas [Tue, 7 Jan 2020 18:25:38 +0000 (19:25 +0100)]
qa: Replace deprecated qVariantFromValue() by QVariant::fromValue()
Deprecated since Qt 5.14.
Manuel Nickschas [Tue, 7 Jan 2020 17:39:48 +0000 (18:39 +0100)]
common: Always let QVariant::fromValue() deduce the type
In some places, we would explicitly give the type to
QVariant::fromValue(), forgoing automatic type deduction. This is
almost always redundant, and in the cases where it is not, the
input type should be explicitly cast.
Additionally, the implementation of QVariant::fromValue() subtly changed
in Qt 5.14, leading to compile errors when giving a non-decayed type
(as we did in SignalProxy::attachSignal()).
Manuel Nickschas [Tue, 7 Jan 2020 17:34:54 +0000 (18:34 +0100)]
common: Disable enum type stream operators for Qt >= 5.14
Starting from version 5.14, Qt provides stream operators for enum
types, which collide with the ones we ship in types.h. Disable
Quassel's stream operators when compiling against Qt 5.14 or later.
Add a unit test that ensures that enum serialization honors the width
of the underlying type.
Hannah von Reth [Fri, 6 Dec 2019 08:29:44 +0000 (09:29 +0100)]
Remove broken 32 bit Windows builds
Hannah von Reth [Fri, 6 Sep 2019 13:10:11 +0000 (15:10 +0200)]
Fix deprecation warning, to fix Werror build
Janne Mareike Koschinski [Thu, 5 Dec 2019 17:18:35 +0000 (18:18 +0100)]
Fix builds for cosmic/disco/eoan
Issue:
quassel builds for ubuntu cosmic, disco and eoan fail if running in docker on a xenial host
Reason:
cosmic, disco and eoan use Qt 5.11 and 5.12 respectively, which makes use of the new syscall statx (introduced in Qt 5.10, bionic and xenial are still on 5.9 and 5.5 respectively).
xenial supports statx, as does docker, which is up to date on these distros. but sadly libseccomp, which is used to filter syscalls, is too old on these distros.
so code sees that statx is available, tries to run it, and it returns with an error, which is considered file not existing
Solution:
update the host for our build to at least bionic, where this issue doesn’t exist
Manuel Nickschas [Fri, 30 Aug 2019 19:54:47 +0000 (21:54 +0200)]
common: Remove the copy assignment operator from DccConfig
Since C++11 the standard no longer mandates the existence of an
implicit copy constructor if there is a user-supplied copy assignment
operator, and GCC 9 warns about that:
src/qtui/settingspages/dccsettingspage.cpp: In member function ‘virtual void DccSettingsPage::load()’:
src/qtui/settingspages/dccsettingspage.cpp:91:71: warning: implicitly-declared ‘DccConfig::DccConfig(const DccConfig&)’ is deprecated [-Wdeprecated-copy]
Remove the copy assignment operator altogether and rely on the
implicitly generated one, which does the same thing.
Manuel Nickschas [Fri, 30 Aug 2019 19:48:32 +0000 (21:48 +0200)]
core: Don't store a reference in CoreCertManager
Storing references violates all sorts of Best Practices, and also
prevents the compiler from implicitly declaring a copy assignment
operator. Store a pointer instead, and clean up the API a bit.
Manuel Nickschas [Fri, 30 Aug 2019 19:43:21 +0000 (21:43 +0200)]
core: Remove copy assignment operator from CoreIdentity
The operator is no longer needed due to the switch from QList
to std::vector that was done in the previous commit.
This avoids a warning in GCC 9:
src/core/coreidentity.cpp: In member function ‘CoreIdentity& CoreIdentity::operator=(const CoreIdentity&)’:
src/core/coreidentity.cpp:91:23: warning: implicitly-declared ‘Identity& Identity::operator=(const Identity&)’ is deprecated [-Wdeprecated-copy]
The warning is caused by relying on the implicit copy assignment
operator in the base class, which is no longer required by the
standard since C++11, and may be removed in the future.
Manuel Nickschas [Fri, 30 Aug 2019 19:36:09 +0000 (21:36 +0200)]
core: Replace QList by std::vector in the storage API
QList is inefficient and deprecated; also Qt containers have
issues with ranged-for and STL algorithms. Use std::vector instead in
the storage API and fix affected code.
Modernize some affected bits by replacing weird loops with STL
algorithms.
Manuel Nickschas [Fri, 30 Aug 2019 18:28:10 +0000 (20:28 +0200)]
qa: Replace Qt module includes by class ones
Including whole Qt modules is less efficient than including only
the classes that are needed. Remove module includes and add class
ones as needed.
Manuel Nickschas [Wed, 28 Aug 2019 18:24:48 +0000 (20:24 +0200)]
cmake: Don't needlessly sync translations
A mismatch in the stamp file name for syncing translations caused
the sync to be run for every make. Fix the naming so we don't
re-run the syncing needlessly.
Janne Koschinski [Sun, 4 Aug 2019 20:46:26 +0000 (22:46 +0200)]
Remove debug console and QtScript, which was deprecated with Qt5
- reduces dependencies, allows building quasselcore on most distros
without pulling in X11
- removes unused code and dependencies, reduces size
Manuel Nickschas [Wed, 28 Aug 2019 18:13:43 +0000 (20:13 +0200)]
core: Use QLatin1String in a few places
It is recommended to use QLatin1String as an efficient wrapper
around const char*. Use this in the places recently touched.
Manuel Nickschas [Wed, 28 Aug 2019 18:06:17 +0000 (20:06 +0200)]
Add missing includes
For std::sort we should include <algorithm>.
Janne Koschinski [Mon, 5 Aug 2019 10:44:27 +0000 (12:44 +0200)]
Add a flag to enable Qt deprecation warnings on Qt < 5.13
Janne Koschinski [Mon, 5 Aug 2019 10:34:46 +0000 (12:34 +0200)]
Replace deprecated additionalFormats with formats
Janne Koschinski [Mon, 5 Aug 2019 11:44:45 +0000 (13:44 +0200)]
Replace deprecated QComboBox::currentIndexChanged with currentTextChanged
Janne Koschinski [Mon, 5 Aug 2019 11:22:02 +0000 (13:22 +0200)]
Replace usage of deprecated QDir::operator=
Janne Koschinski [Mon, 5 Aug 2019 10:42:32 +0000 (12:42 +0200)]
Replace deprecated QSqlError::number with ::nativeErrorCode
Janne Koschinski [Mon, 5 Aug 2019 10:37:13 +0000 (12:37 +0200)]
Replace deprecated QModelIndex::child with QAbstractItemModel::index
Janne Koschinski [Mon, 5 Aug 2019 10:33:47 +0000 (12:33 +0200)]
Replace QSignalMapper with new-style lambda signals
Janne Koschinski [Mon, 5 Aug 2019 10:30:19 +0000 (12:30 +0200)]
Replace deprecated qSort with std::sort
Jan Alexander Steffens (heftig) [Fri, 22 Mar 2019 21:37:22 +0000 (22:37 +0100)]
qtui: Set desktop file name
The XCB platform plugin defaults the WM class to the executable name,
which already matches our desktop file name. Unfortunately, the Wayland
platform plugin prepends the inverted organization domain, resulting in
an app ID of "org.quassel-irc.quasselclient", thus breaking the
association.
Set the desktop file name explicitly so the Wayland platform doesn't get
confused.
Rafael Kitover [Sat, 1 Jun 2019 09:48:02 +0000 (09:48 +0000)]
cmake: fix build on MSYS2
Some minor changes to allow building easily on MSYS2:
- don't check for snorenotify on MSYS2 because it segfaults on startup
- don't use -fstack-protector-strong (libssp) on MinGW because it
currently causes segfaults during static initialization
https://sourceforge.net/p/mingw-w64/bugs/755/
- use the `cat` command to read files when using the 'MSYS Makefiles'
generator, and not the cmd.exe `type` command
- update doc for the quassel_add_module function wrt.
7d0879ab
Tested to build correctly on MSYS2 with both the 'MSYS Makefiles'
generator and the Ninja generator using a native ninja.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Kai Uwe Broulik [Tue, 30 Apr 2019 12:28:21 +0000 (14:28 +0200)]
Check for KNotifications version
setDefaultAction was introduced in KDE Frameworks version 5.31
Kai Uwe Broulik [Tue, 30 Apr 2019 12:28:21 +0000 (14:28 +0200)]
Set default action on notification
This makes the entire notification popup clickable.
Also, mark the text for translation.
Janne Koschinski [Tue, 19 Mar 2019 11:53:46 +0000 (12:53 +0100)]
Implement a metrics daemon to expose Prometheus metrics
- logs IRC and client sessions, IRC traffic in/out, login attempts per user
- logs certificate expiry time
Manuel Nickschas [Sun, 4 Aug 2019 18:53:07 +0000 (20:53 +0200)]
tests: Fix include order
Daniel Albers [Fri, 2 Aug 2019 10:48:39 +0000 (12:48 +0200)]
Merge branch 'simplify-time-formatting' of https://github.com/justjanne/quassel
Closes #504.
Daniel Albers [Fri, 2 Aug 2019 09:57:15 +0000 (11:57 +0200)]
Merge branch 'select-account-from-cli' of https://github.com/justjanne/quassel
Closes #503.
Janne Koschinski [Fri, 26 Jul 2019 13:28:11 +0000 (15:28 +0200)]
Simplify the time formatting used in formatDateTimeToISO
- Previously, a convoluted workaround using deprecated functionality was
used to ensure we would format all types of QDateTime objects
correctly
- A new workaround has been found which ensures this works reliably
without using deprecated functionality
Janne Koschinski [Fri, 26 Jul 2019 12:19:48 +0000 (14:19 +0200)]
Allow selecting the core account to connect to from CLI
- adds new --account option
- if an account id is specified, connects to that account instead of
asking or using any other defaults
Kai Uwe Broulik [Tue, 30 Apr 2019 12:27:08 +0000 (14:27 +0200)]
Send icon name instead of pixmap
Lets the notification server load an appropriate crisp pixmap depending on the size it wants to display it at
Kai Uwe Broulik [Tue, 30 Apr 2019 12:19:18 +0000 (14:19 +0200)]
Add DesktopEntry to notifyrc
This allows the new notification KCM to identify Quassel as an application
Rafael Kitover [Thu, 24 Jan 2019 09:29:59 +0000 (01:29 -0800)]
cmake: Lower Boost dep version 1.56 -> 1.54
Require Boost 1.54 instead of 1.56.
Tested to compile and work correctly on OpenSUSE Leap 42.3.
Fixes #1510.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Rafael Kitover [Thu, 24 Jan 2019 09:31:02 +0000 (01:31 -0800)]
cmake: Add ENABLE_SHARED option, default ON
Add an ENABLE_SHARED option, defaults to ON, when set to OFF
quassel_add_module() will build modules as static (does not affect
platforms where modules would be built as static anyway.)
The option name ENABLE_SHARED is frequently used for this purpose in
cmake.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Ben Rosser [Thu, 14 Feb 2019 16:28:02 +0000 (11:28 -0500)]
Core: in LDAP authenticator, don't try database auth with blank password
In the LDAP authenticator, we were trying to do database auth against
the core with a blank password (QString()), after LDAP auth has succeeded.
This was done because there was not another way to retrieve a quassel
UserId object for a given string username.
However, if we want to support migrating a user from Database to LDAP
auth, this causes problems-- we'd need to set the password column to
whatever an empty QString() maps to in the hashing algorithm.
It seems much simpler to just add a new method to core.h to look up
a UserId object in the current storage provider when we pass it
a string username. Then we can just call that method in the LDAP
authenticator.
Ben Rosser [Thu, 7 Feb 2019 19:47:50 +0000 (14:47 -0500)]
Core: only try local auth if a user has the "database" auth provider set
This commit attempts to resolve issue #1501; currently, quassel will
always attempt to do local authentication, and *then* try LDAP auth. This
makes it difficult to migrate a core from local auth to LDAP auth; users
who have local passwords can always use those passwords to log in, and there
is not a simple way to migrate them to non-local auth.
There is an "authenticator" column in the database for each user, but it
is currently only used to stop passwords from being changed for LDAP users.
This commit modifies the login flow to first check that database field--
if authenticator is not "Database", we don't try local authentication and
proceed directly to non-local authentication.
This is a bit clumsy-- I added a method to the core to look up a user's
authenticator by string. But there's no way to map that to the actual
authenticator object, because we only store one configured authenticator
per core-- so we then just check if that authenticator is "Database" or
not. I think this is something that should be improved in the future,
but as a quick fix to #1501 this is probably good enough.
Shane Synan [Thu, 30 May 2019 20:19:18 +0000 (16:19 -0400)]
tests: Verify ExpressionMatch test data won't OOB
Verify that the ExpressionMatch test data for test
trimMultiWildcardWhitespace won't try to access out of bounds data by
changing EXPECT to ASSERT for patternPair.size() == 2.
If the test data is wrong, the results will be undefined, so there's
no point in continuing the test.
Alternative: use std::vector's .at() function, which will raise a
runtime error if out of bounds.