Manuel Nickschas [Tue, 23 Sep 2014 21:42:51 +0000 (23:42 +0200)]
Bump version.inc for release
For the last time. Was nice knowing you.
Manuel Nickschas [Tue, 23 Sep 2014 21:37:14 +0000 (23:37 +0200)]
Update ChangeLog
Manuel Nickschas [Mon, 22 Sep 2014 20:31:06 +0000 (22:31 +0200)]
Small optimization
No need to copy the list around.
tecknojock [Wed, 17 Sep 2014 05:28:42 +0000 (00:28 -0500)]
Updated Encode to not run additional times.
Fixed the issue of the message being encoded twice unnessesarily on
actions that did not require splitting.
tecknojock [Thu, 14 Aug 2014 19:53:30 +0000 (14:53 -0500)]
Fixed CTCP Action Spliting
Previously /me would truncate if it was over the 512 character limit,
forming a malformed action as the last \01 character is cut off. Now the
CTCP Action should autosplit the same way that overflow on normal
messages does. Additionally the characters !? were added to the
splittable characters list, bringing the new list to " ,.-!?"
m5 [Sun, 3 Aug 2014 00:03:14 +0000 (17:03 -0700)]
fix buffer sorting for hot buffer hotkey
Michael Marley [Tue, 16 Sep 2014 23:29:12 +0000 (19:29 -0400)]
Quit on database connection failure
Previously, if a Quasselcore was configured to use PostgreSQL but
the PostgreSQL connection failed on startup, it would come up
unconfigured with SQLite. This patch makes the Quasselcore quit
with a fatal error instead.
Michael Marley [Sat, 6 Sep 2014 02:16:05 +0000 (22:16 -0400)]
Do not emit messages if storing them in the DB failed
If a message is not stored in the database, then some of its IDs
(networkId at least) will be invalid. If this message is sent to
clients, it will cause a nameless empty buffer to appear in the
desktop client and will cause Quasseldroid to crash (of course.)
Better behavior would be to simply not emit the message, since it
can't be displayed properly anyway.
Michael Marley [Wed, 17 Sep 2014 02:04:11 +0000 (22:04 -0400)]
Rename socketConnected() to socketOpen() to reduce confusion
Michael Marley [Thu, 4 Sep 2014 00:12:31 +0000 (20:12 -0400)]
Improve the odds of winning the oidentd race when using SSL for IRC
Previously, the .oidentd.conf file was not written until
socketInitialized(), which meant that when using SSL for the IRC
connection, the file would not be written until the SSL negotiation
was complete. This delay meant that, in practice, oidentd
integration almost never worked when using SSL IRC connections.
This patch adds a new socketConnected() signal that fires as soon
as the connection is open, regardless of encryption status, and
connects the call to the oidentd configuration generator to this
signal. This gives oidentd integration the same likelihood of
working with SSL connections as with non-SSL connections.
Manuel Nickschas [Sun, 14 Sep 2014 20:16:43 +0000 (22:16 +0200)]
Update ChangeLog
Manuel Nickschas [Sun, 14 Sep 2014 20:16:31 +0000 (22:16 +0200)]
Update AboutDlg
Michael Marley [Mon, 1 Sep 2014 22:42:22 +0000 (18:42 -0400)]
Use null QVariant instead of "ALL" for select limit on psql
Using "ALL" as it was before was making PostgreSQL error out when
attempting to return backlog for Quasseldroid when Quasseldroid is
in "Unread messages per chat" mode. According to
http://www.postgresql.org/docs/9.3/static/queries-limit.html,
LIMIT NULL is the same thing as having no LIMIT at all. According
to http://qt-project.org/doc/qt-4.8/qsqlquery.html, NULL values
are bound in Qt SQL prepared statements by using a null QVariant.
Allan Jude [Tue, 19 Aug 2014 14:11:49 +0000 (10:11 -0400)]
Update README re: manageusers.py
Update README to reflect the deprecation of scripts/manageusers.py in Aug 2010
ramz [Sun, 30 Mar 2014 11:07:25 +0000 (22:07 +1100)]
Retains Channel UnHiddens Status after client Restart.
Steps to Reproduce:
1. Hide channel temporarily
2. Part channel
3. Join channel (it will now be visible again, at the bottom of that network's buffer list)
Optional: talk in the channel, get other people to talk, etc but the buffer must not be blue (new message(s)) when you proceed next
4. Quit the client
5. When you'll restart it, the channel will be temporarily hidden again
Root Cause:
After step 3, we are not saving the bufferviewconfig synchronizable object right.
Fix:
Save the bufferviewconfig object correctly.
Fixes #1218.
Deniz Türkoglu [Wed, 27 Aug 2014 19:08:57 +0000 (21:08 +0200)]
Fix MainToolBar visibility not saving in OSX
The current code, although completely valid, doesn't work due to moc not
seeing built in defines. See;
https://bugreports.qt-project.org/browse/QTBUG-34593
Mattia Basaglia [Thu, 26 Jun 2014 13:23:13 +0000 (15:23 +0200)]
Use correct nick on 001 RPL_WELCOME
Fixes #1020
When the user connects to a bouncer, the bouncer will send back the
welcome message received when it first connected to the network.
This caused Quassel to display a wrong nick if it had changed
since the first connection.
otih [Thu, 3 Jul 2014 21:34:44 +0000 (23:34 +0200)]
Fix Bug #1293: --syslog option writes to emergency level
otih [Thu, 3 Jul 2014 20:58:35 +0000 (22:58 +0200)]
Fix Bug #1293: --syslog option writes to emergency level
Sebastian Meyer [Fri, 13 Jun 2014 12:52:55 +0000 (14:52 +0200)]
Checking for single char line endings
This fixes problems with IRC servers sending only single char line
endings. Before the last char on each line for thos servers would be
chopped, now Quassel checks how the line ends and chops accordingly.
Fixes #1267
Bas Pape [Mon, 26 May 2014 17:24:01 +0000 (19:24 +0200)]
Do not update activity for hidden message types
Manuel Nickschas [Thu, 24 Jul 2014 21:26:58 +0000 (23:26 +0200)]
Fix support for CMake < 3
Meh. Apparently I can't just set behavior for future policies, so we
need to ensure that we're actually running CMake 3.
Manuel Nickschas [Thu, 24 Jul 2014 21:08:29 +0000 (23:08 +0200)]
Silence deprecation warnings from CMake 3.0+
Setting COMPILE_DEFINITIONS_<Config> has been deprecated since CMake 3.0.
However, the "proper" way of doing things now (generator expressions) have
been support only since CMake 2.8.10, and we require 2.8.1 currently.
So we explicitly tell CMake to use OLD behavior for CMP0043. And for CMP0026,
which is related to our handling of genversion (no need to fix this properly,
as genversion is gone in Quassel 0.11 anyway). And while we're at it, we
remove setting CMP0003 to NEW, this hasn't been needed in a very
long time...
Manuel Nickschas [Fri, 9 May 2014 19:38:37 +0000 (21:38 +0200)]
Fix build on KDE
Oops. This wouldn't have happened with 'auto' :P
Manuel Nickschas [Mon, 5 May 2014 21:38:27 +0000 (23:38 +0200)]
Fix tab completion on exotic platforms
Turns out that using the tab key as an action shortcut in an input widget
does not work reliably on all platforms, at least on OS/2 - sometimes,
the event filter would be called instead of triggering the action.
To make this more robust, we disable the action (just using it as a container
for the custom shortcut) and always catch and handle the key in the event
filter which we need anyway.
Thanks to TeLLie for bisecting this issue and finding the culprit on OS/2.
Manuel Nickschas [Mon, 5 May 2014 18:53:41 +0000 (20:53 +0200)]
Update ChangeLog
Manuel Nickschas [Wed, 19 Mar 2014 20:08:08 +0000 (21:08 +0100)]
Don't actually build miniz if we have zlib
We don't use miniz if we have zlib; but it was still being built, because
we never actually set HAVE_ZLIB as a build system variable.
Use ZLIB_FOUND instead.
Manuel Nickschas [Mon, 5 May 2014 18:37:36 +0000 (20:37 +0200)]
Fix crash with KDE network detection
If the network connection status changed during authentication phase,
Quassel would crash. This is caused by some old bits of code that still
assume that there's always a Peer around, which is no longer the case
after splitting off the AuthHandler.
This commit fixes that issue. Thanks to shadeslayer for the report and
really useful backtrace.
Manuel Nickschas [Tue, 25 Mar 2014 22:43:10 +0000 (23:43 +0100)]
Bump version.inc for release
Manuel Nickschas [Tue, 25 Mar 2014 22:42:57 +0000 (23:42 +0100)]
Update ChangeLog
Daniel Albers [Tue, 25 Mar 2014 21:56:13 +0000 (22:56 +0100)]
Update quassel.pot
Daniel Albers [Wed, 19 Feb 2014 04:00:37 +0000 (05:00 +0100)]
Update translations from Transifex
25507 translated messages
Many thanks to:
- fi: Larso <larso@gmx.com>
- tr: volkangezer <volkangezer@gmail.com>
- uk: Yuri Chornoivan <yurchor@ukr.net>, Daniel Albers <daniel@lbe.rs>
- pt_BR: André Marcelo Alvarenga <alvarenga@kde.org>
Manuel Nickschas [Tue, 25 Mar 2014 22:13:21 +0000 (23:13 +0100)]
Use the raster rendering engine by default on OSX
Seems like using the raster engine fixes performance issues on OSX,
and there seem to be no noticeable side-effects compared to native
rendering. So let's use this by default.
If you notice issues, please let us know. Also, you can always enforce
native rendering via command line:
open Quassel\ Client.app -W --args -graphicssystem native
Thanks to rikai for figuring this out!
Manuel Nickschas [Tue, 25 Mar 2014 20:13:27 +0000 (21:13 +0100)]
Disable backlog in chatmonitor by default
This has some performance issues (the client will freeze for several
seconds after sync and on disconnect), and thus should not be enabled
by default.
We'll leave the feature in for people who don't care about the delay,
and hope that this can be optimized in a later version.
David ‘Bombe’ Roden [Sun, 2 Feb 2014 11:27:33 +0000 (12:27 +0100)]
Only create the regular expression for content/sender matches once.
Fixes #1227.
Manuel Nickschas [Sun, 16 Mar 2014 15:00:49 +0000 (16:00 +0100)]
Revert rudimentary DCC support for the 0.10 release
We've added the first bits for supporting DCC file transfers in Quassel
recently, but didn't manage to get it anywhere near ready for public
consumption before the 0.10.0 release. So in order to not have experimental
or even unused code in the final release, we'll revert it in this branch.
Manuel Nickschas [Sun, 16 Mar 2014 14:35:21 +0000 (15:35 +0100)]
Bump version.inc for release
Manuel Nickschas [Sun, 16 Mar 2014 12:46:15 +0000 (13:46 +0100)]
Yet another inxi version bump
This fixes the term-related warnings the last version had.
Manuel Nickschas [Sat, 15 Mar 2014 14:11:54 +0000 (15:11 +0100)]
Update ChangeLog
Manuel Nickschas [Fri, 14 Mar 2014 21:51:37 +0000 (22:51 +0100)]
Bump inxi version to 2.1.1
Hasn't been bumped in rather a while.
Manuel Nickschas [Fri, 14 Mar 2014 20:13:09 +0000 (21:13 +0100)]
Fix round-robin for networks that support it
Some IRC networks perform round-robin by supplying a list of IP addresses
in their DNS records. However, Qt a) always uses the first address of that
list, and b) caches DNS records for a minute. This results that users who
connect at a roughly similar time (like at core startup) will all pick the
same IP for a given round-robin network address.
We now force Qt (simply by calling QHostInfo::fromName()) to perform a fresh
lookup every time it connects to an IRC network, which solves this problem.
However, this will not help you if your OS uses a system DNS cache that does
not reshuffle the list of IPs for repeated lookups.
Manuel Nickschas [Fri, 14 Mar 2014 17:40:40 +0000 (18:40 +0100)]
Don't always add a colon to custom commands
The IRC spec mandates that spaces be used as separators between the
arguments for a command. However, the last parameter may itself contain
spaces, and to allow this, one can prefix that argument with a colon.
Instead of checking if the colon is needed, Quassel just always added
a colon to the last argument, which usually works fine. However, it broke
some uses of custom server commands.
This fix now checks if the last argument contains a space or starts with
a colon (which then needs to be escaped), and leaves it alone otherwise.
Fixes #1173 - thanks to Gunnar Beutner for providing the patch.
Manuel Nickschas [Fri, 14 Mar 2014 17:32:39 +0000 (18:32 +0100)]
Merge pull request #62 from Express50/issue_1243
Fix URL regex
Express50 [Sun, 9 Mar 2014 17:42:01 +0000 (13:42 -0400)]
Fix URL regex
Removes unwise characters from URL regex. These characters should be percent escaped according to RFC 2396.
Fixes #1243
Daniel Albers [Sat, 1 Mar 2014 18:51:29 +0000 (19:51 +0100)]
add context menu action to reset chat column widths
If a ChatScene column has been resized during the current Quassel client
session or a column is <= 10 px wide, offer to reset the columns to sane
widths.
Daniel Albers [Wed, 26 Feb 2014 23:39:56 +0000 (00:39 +0100)]
make highlight rules case-insensitive by default
Manuel Nickschas [Sun, 2 Mar 2014 20:19:34 +0000 (21:19 +0100)]
Simplify clean-up-on-network-disconnect handling
Previously, disconnecting from a network would trigger lots of unnecessary
stuff: because the NetworkModel needs to remove affected IrcChannels and
IrcUsers from its model items, we would trigger (on the core side!) an
IrcUser::quit() for every known user in that network, which would then remove
itself from all channels it's in, triggering the corresponding updates in the
related SyncableObjects, which would send lots of signals to the client which
would then perform its own cleanups per IrcUser, followed by throwing away
all IrcChannels and IrcUsers in that network anyway. By the time we reached
Network::removeChansAndUsers(), everything would actually be already all
gone triggered through syncobject updates.
Except in some rare cases when there was still something left behind, triggering
the dreaded "!_ircChannel && ircChannel" assert, that users have been reporting
for years. I still haven't figured out how that could possibly happen.
In any case, the only side effect that explicit call to IrcUser::quit() was
supposed to trigger was the removal of the relevant references in NetworkModel's
items. So now we just brutally delete all IrcUsers and IrcChannels on disconnect,
and have the NetworkModel items listen to the relevant destroyed() signals so
they can do their cleanup. This saves us from sending lots of stuff over the
network, and also should fix the assert (which we've replaced by a warning now,
just in case).
Fixes #1151 and a bunch of duplicates.
Manuel Nickschas [Sat, 1 Mar 2014 13:07:36 +0000 (14:07 +0100)]
Don't crash on very long inputs
Because our style engine uses 16 bit indexes, strings can only be
styled if they're shorter than 2^16 characters. We do check for this
in the style engine and refuse to style strings that are longer.
However, just returning an default-constructed StyledString() is wrong,
because other places rely on there being at least one format and the
plaintext be initialized. So the proper way of handling this is just
using the baseFormat and the full string as plaintext instead of an
empty StyledString.
Fixes #1257.
Manuel Nickschas [Thu, 27 Feb 2014 20:10:40 +0000 (21:10 +0100)]
Fix reconnection logic in the client
Seems like
b654b2f broke reconnecting the client to the core; it would
only try once and then stop trying. Thanks to mamarley for noticing that bug
and bisecting the culprit.
The main issue causing this was that CoreConnection called
resetConnection(false) before (re)connecting, thus clearing the reconnect
flag. This call is a remnant from before we refactored out all the socket
handling and should not be needed anymore, now that we have clean disconnected()
semantics. Before
b654b2f this was not a problem, because we would always
receive a socket error on failed reconnect that would reinstate the flag.
Because
b654b2f worked around another issue by always sending a disconnected()
when the socket goes back into UnconnectedState, and this would happen before
the socket error signal was sent, the error handling would never be called
and the reconnect flag thus not reinstated, causing this bug.
So the second fix is to spin the event loop such that the error signal can
overtake that disconnected() signal and be handled properly (so we also
get the socket error message in the status bar).
Michael Marley [Wed, 26 Feb 2014 01:53:36 +0000 (01:53 +0000)]
Use autonegotiation to choose an SSL protocol.
Previously, the user manually configured which SSL protocol to use
when connecting to IRC. The default was SSLv3. A better idea is
to allow Qt to automatically negotiate the best protocol out of
the available secure protocols, which this patch implements.
Patrick von Reth [Tue, 25 Feb 2014 23:26:06 +0000 (00:26 +0100)]
Use Snore only if building without KDE
Also use the system tray backend as default.
Michael Marley [Mon, 24 Feb 2014 14:12:27 +0000 (14:12 +0000)]
Allow for clients to negotiate whether compression is used
Previously, streaming compression would always be used for the
datastream protocol and never for the legacy protocol, regardless
of whether the client set the compression bit during the handshake.
This patch enables negotiation of compression support and also
allows for streaming compression when using the legacy protocol
with the new handshake.
As is, this patch prevents clients with streaming compression
support but without this patch from connecting to cores with this
patch. This problem occurs because the above-mentioned clients
never set the compression bit during the handshake, which didn't
cause a problem before because both sides unconditionally enabled
compression. However, when connecting to a core with this patch,
such a client will request no compression and the core will
disable compression. However, the client will still enable the
compression anyway, causing the connection to fail.
Daniel Albers [Fri, 21 Feb 2014 12:13:21 +0000 (13:13 +0100)]
update quassel.pot
Daniel Albers [Fri, 21 Feb 2014 12:13:03 +0000 (13:13 +0100)]
adapt translations to previous change
Daniel Albers [Fri, 21 Feb 2014 11:58:16 +0000 (12:58 +0100)]
move © years out of translatable text in aboutDlg
Daniel Albers [Fri, 21 Feb 2014 11:55:56 +0000 (12:55 +0100)]
remove old static versionLabel text
Manuel Nickschas [Wed, 19 Feb 2014 22:14:37 +0000 (23:14 +0100)]
Silence yet another warning
I have no clue why neither gcc nor clang throw a -Wsign-compare for me
there, but do for some other people, so... *sigh*
Manuel Nickschas [Wed, 19 Feb 2014 21:41:41 +0000 (22:41 +0100)]
Fix -Wundef warning
Was thrown on 32 bit, should be #ifdef instead of #if because the attribute
is only defined on 64 bit machines.
Manuel Nickschas [Wed, 19 Feb 2014 20:19:32 +0000 (21:19 +0100)]
Use system zlib if available
Only fall back to miniz if we don't find zlib on the system. Distro
packagers like this much more, and we use code that has seen much
more testing. Incidentally, we've already had one case where miniz was
really slow on a 32 bit box.
Still keeping miniz as fallback for the rare platform/build box that
doesn't ship zlib, since waiting a few seconds for compressing the
backlog is still probably better than transmitting a few MB of extra
data...
Manuel Nickschas [Wed, 19 Feb 2014 18:47:52 +0000 (19:47 +0100)]
Silence one more warning in miniz.c
Building on 32 bit machines causes some warnings related to undefined
macros; -Wno-undef silences that.
Daniel Albers [Tue, 18 Feb 2014 23:57:54 +0000 (00:57 +0100)]
update quassel.pot
Daniel Albers [Mon, 25 Nov 2013 04:00:37 +0000 (05:00 +0100)]
Update translations from Transifex
24961 translated messages
Many thanks to:
- es: Adolfo Jayme Barrientos <fitoschido@ubuntu.com>
- fi: Larso <larso@gmx.com>
- hi: libregeekingkid <rajuvindane@gmail.com>
- nl: Simon Philips <simon.philips@gmail.com>
- pa: A S Alam <apreet.alam@gmail.com>
- tr: volkangezer <volkangezer@gmail.com>
- uk: Yuri Chornoivan <yurchor@ukr.net>
- zh_CN: leonfeng <chaofeng111@gmail.com>
Daniel Albers [Mon, 25 Nov 2013 00:27:34 +0000 (01:27 +0100)]
i18n: add some statistics to commit messages
Manuel Nickschas [Tue, 18 Feb 2014 22:40:06 +0000 (23:40 +0100)]
Bump version.inc for release
Manuel Nickschas [Tue, 18 Feb 2014 22:28:52 +0000 (23:28 +0100)]
Update ChangeLog
Manuel Nickschas [Tue, 18 Feb 2014 22:14:02 +0000 (23:14 +0100)]
Update AboutDlg
Chris H [Sun, 16 Feb 2014 02:26:05 +0000 (21:26 -0500)]
Use a unicode string instead of the escaped version.
Compiling with MSVC Doesn't like unicode literals here.
Deniz Türkoglu [Thu, 13 Feb 2014 11:44:21 +0000 (12:44 +0100)]
Disable webpreview to avoid user interactaction
If the user interacts with the webview, for instance click a button
or type text in it, it crashes the client.
Disable the webview so we still get the previews but can't interact
with them.
Patrick von Reth [Tue, 21 Jan 2014 11:29:41 +0000 (12:29 +0100)]
Use new snore api and a bug fix
Adam Harwood [Sat, 21 Dec 2013 17:31:13 +0000 (17:31 +0000)]
Add option to include read messages in chat monitor
When the show backlog option is used, give users the option to include previously read messages.
Awad Mackie [Sat, 24 Mar 2012 15:54:22 +0000 (15:54 +0000)]
Add option for chat monitor to look in the backlog
See #734. Thanks to Adam Harwood for rebasing this. ~Sput
Pete Beardmore [Wed, 28 Aug 2013 10:42:36 +0000 (11:42 +0100)]
Add option to enable linewrap mode
Implements #1081.
Chris Le Sueur [Thu, 23 Jan 2014 00:29:04 +0000 (00:29 +0000)]
Add CoreFeatures guard for hiding inactive networks
Chris Le Sueur [Wed, 15 May 2013 22:44:26 +0000 (23:44 +0100)]
Add a setting to hide inactive networks in buffer views
Manuel Nickschas [Mon, 17 Feb 2014 22:24:20 +0000 (23:24 +0100)]
PeerFactory is not a QObject
warnings--
Manuel Nickschas [Mon, 17 Feb 2014 22:22:17 +0000 (23:22 +0100)]
Fix CFLAGS for miniz
... and make sure KDE doesn't overwrite them with something that
makes miniz not compile (apparently it's not C89 compliant...)
Manuel Nickschas [Mon, 17 Feb 2014 21:21:29 +0000 (22:21 +0100)]
Enable the DataStream protocol by default
Now that compression works, let's use the DataStream protocol
by default if both sides claim support for it.
Manuel Nickschas [Mon, 17 Feb 2014 21:18:39 +0000 (22:18 +0100)]
Implement streaming compression support
This leverages miniz in order to DEFLATE the data stream between
client and core. This is the standard format supported by zlib.
Note that streaming compression currently is unconditionally enabled
for the DataStream protocol, and unconditionally disabled for the
legacy protocol. We'll make them honor the handshake negotiation
later.
Manuel Nickschas [Mon, 17 Feb 2014 21:13:18 +0000 (22:13 +0100)]
Add miniz, a drop-in replacement for (parts of) zlib
miniz is a single-file drop-in replacement for most of zlib's
functionality. Having this bundled is quite convenient for us, so we
can rely on compression even on platforms where zlib is not readily
available.
miniz allows disabling unneeded functionality at compile time, by changing
some #defines, so we just compile the parts we really need (namely, the
basic DEFLATE routines).
We may use zlib proper in the future if we find it at compile time, though.
Manuel Nickschas [Sun, 16 Feb 2014 21:28:21 +0000 (22:28 +0100)]
Hook the Compressor into RemotePeer
Instead of reading from/writing to the socket directly, RemotePeer now
goes through a Compressor instance. At this time, no actual compression
will happen though.
Note that the legacy protocol does not support streaming compression, which
is why it sets a compression level of NoCompression.
Manuel Nickschas [Sun, 16 Feb 2014 21:22:52 +0000 (22:22 +0100)]
Introduce basic (not-yet-compressing) implementation of Compressor
This class is intended to encapsulate the streaming compression between
the socket and the rest of RemotePeer; however, actual compression is
not yet implemented.
The Compressor class sits on top of the socket, providing a rudimentary API
for reading and writing data, and will transparently handle the (de)compression
once it's finished.
Manuel Nickschas [Sun, 16 Feb 2014 16:29:28 +0000 (17:29 +0100)]
Move all socket handling into RemotePeer
Previously we had the RemotePeer subclasses reading from and writing to
the socket themselves, resulting in code duplication and also making it
hard to have a single point for implementing compression support later.
We assume that any protocol we may come up with will send the size of
a datagram followed by the datagram itself, thus there's no need to
implement that part in the individual peers. And if we ever come up
with something else, we can always make some methods virtual and
override them for the special case.
We avoid using QDataStream in RemotePeer, as we are only reading/writing
QByteArrays anyway. That way, we can also replace the direct calls to
the socket by the layer implementing compression later, without it being
a proper QIODevice.
Manuel Nickschas [Sat, 15 Feb 2014 20:58:46 +0000 (21:58 +0100)]
Don't select the DataStream protocol by default for now
Until we have streaming compression implemented, using the DataStream
is not such a brilliant idea compared to the legacy protocol which
at least individually compresses messages. Thus, we should not select
the DataStream protocol by default.
Clients wanting to play around with the new protocol are still free to
negotiate this during handshake.
Manuel Nickschas [Sat, 15 Feb 2014 20:55:30 +0000 (21:55 +0100)]
Remove the STORED attribute from Q_PROPERTY declarations
Due to some lack of documentation reading and consequential misunderstanding
of what the STORED=false attribute means for a QProperty, we still had some
really old headers wrongly declaring those.
I'm not aware of any effect on anything that having those has, but better
to just clean those up.
Manuel Nickschas [Sat, 15 Feb 2014 20:49:59 +0000 (21:49 +0100)]
Output the chosen protocol type on connect
Just some debug messages showing which protocol has been selected.
Manuel Nickschas [Sat, 15 Feb 2014 20:40:45 +0000 (21:40 +0100)]
DataStreamPeer: Optimize IrcUsersAndChannels init data
This is the only occasion where we change the actual message contents
for the DataStream protocol, as opposed to the legacy protocol.
However, it's worth it, because the init data for IrcUsers is the single
biggest offender in terms of data usage during sync, and we were wasting
lots of space by sending potentially thousands of identically-structured
QVariantMaps (one per IrcUser), each of which contains an indentical set
of key names. The same was true for IrcChannels in that same message,
although the data set tends to be smaller for that one.
We've now changed that by sending the init data for all the users and
channels as lists of attributes, which are then reassembled into individual
initData maps after receiving them. Our benchmarks show space savings
around 56%, which can amount to several megabytes in the uncompressed case,
provided you are in lots of busy channels. With compression it's less
impressive, but we can still save a few hundred kilobytes.
The legacy protocol gains a pair of translation methods for this special case,
thus there are no changes in the legacy format.
Manuel Nickschas [Wed, 29 Jan 2014 00:36:49 +0000 (01:36 +0100)]
DataStreamPeer: Optimize the InitData message
Since an InitData message consists of the usual message header
(serialized as a QVariantList) followed by a QVariantMap, we can
do what we did in a few other places already; transform the map
into a list of key-value pairs, the keys being UTF-8 strings (as
QByteArrays) instead of QStrings, and append that list to the
rest of the message.
This is just a small optimization, but straightforward to do without
changing protocol semantics or introspecting payloads. And
since we send lots of InitData messages, saving even a few bytes
per message may be worth it.
Manuel Nickschas [Tue, 28 Jan 2014 23:08:34 +0000 (00:08 +0100)]
DataStreamPeer: Optimize message serialization format
The legacy protocol serializes all messages as QVariant-in-a-QByteArray.
Except with compression, then it is QVariant-in-a-compressed-
QByteArray-in-a-QByteArray. While the actual messages either
comes as a QVariantList or a QVariantMap which is encapsulated
in above QVariant-in-a-mess.
In other words, this seems a bit excessive and causes unneeded overhead.
So for the DataStreamPeer, we're simplifying this. As all post-handshake messages
are structured as a QVariantList, we're now making this the on-wire format
as well. Since we need to know the message size for deserialization, we
first send the total message size as a quint32, followed by the number of items
as a quint32, followed by the QVariants. [1]
Since handshake messages are QVariantMaps, and we want to avoid over-nesting things,
we now send those as such a QVariantList as well, where the items are key-value
pairs - the key as UTF-8 string (as a QByteArray), and the value as a QVariant.
[1] This happens to be the same format as a QByteArray containing a QVariantList,
so the code for that gets rather simple.
Manuel Nickschas [Fri, 24 Jan 2014 22:58:51 +0000 (23:58 +0100)]
DataStreamPeer: Send QDateTime instead of QTime in heartbeat messages
This allows the lag detection to work correctly even during a day change.
Manuel Nickschas [Fri, 24 Jan 2014 22:54:25 +0000 (23:54 +0100)]
DataStreamPeer: Use UTF-8 QByteArrays instead of QString for message headers
This affects the objectName in SyncMessage, InitRequest and InitData.
While the savings should be rather small in particular with compression
enabled, we shouldn't skip this opportunity; while introspecting all
serialized data for QStrings would be too invasive, we can easily do
it for those clearly defined message fields.
Manuel Nickschas [Fri, 24 Jan 2014 22:52:17 +0000 (23:52 +0100)]
DataStreamPeer: Remove per-message compression
With the new handshake, we're going to use streaming compression, which
is negotiated and initiated before the peer is instantiated.
Manuel Nickschas [Fri, 24 Jan 2014 22:50:59 +0000 (23:50 +0100)]
DataStreamPeer: Remove obsolete stuff
Manuel Nickschas [Fri, 24 Jan 2014 22:15:02 +0000 (23:15 +0100)]
Introduce the DataStreamProtocol
This is going to be a streamlined version of the LegacyProtocol, still
using QDataStream serialization, but with some of the overhead removed
from the message formats and not supporting stuff that's deprecated.
The DataStreamProtocol will be automatically selected if both client
and core support it.
This commit simply adds a copy of the LegacyProtocol with the necessary
changes to make it compile. The optimizations are going to be in separate
commits so that the changes can be easier tracked by others implementing
it.
Manuel Nickschas [Fri, 24 Jan 2014 22:01:12 +0000 (23:01 +0100)]
Make LegacyPeer::writeSocketData() private
No longer used outside of this class.
Manuel Nickschas [Wed, 29 Jan 2014 20:54:25 +0000 (21:54 +0100)]
There won't ever be a Qt 4.9...
... and this should actually have been a check for Qt 4.7+.
Manuel Nickschas [Wed, 29 Jan 2014 19:27:48 +0000 (20:27 +0100)]
Make CTCP PING report the correct millisecond round-trip time
If we want to display latency in milliseconds, we should also make sure
our payload is set in milliseconds.
Unfortunately, millisecond resolution for QDateTime appeared only in
Qt 4.7, so it'll stay in seconds for cores built against older Qt versions.
Bas Pape [Mon, 1 Aug 2011 08:11:02 +0000 (10:11 +0200)]
Use milliseconds for CTCP PING
Manuel Nickschas [Thu, 23 Jan 2014 21:34:39 +0000 (22:34 +0100)]
Use PeerFactory instead of creating LegacyPeer directly
This means that legacypeer.h needs be included by peerfactory.cpp only,
and we can remove all references to it elsewhere.
Manuel Nickschas [Thu, 23 Jan 2014 21:30:59 +0000 (22:30 +0100)]
Have the PeerFactory provide the list of supported protocols
... and make use of that in ClientAuthHandler, instead of hardcoding
the available protocols there.
Manuel Nickschas [Thu, 23 Jan 2014 21:15:18 +0000 (22:15 +0100)]
More typedef, less typing