quassel.git
6 years agoqa: Replace [[fallthrough]] by [[clang::fallthrough]]
Manuel Nickschas [Tue, 27 Feb 2018 10:33:03 +0000 (11:33 +0100)]
qa: Replace [[fallthrough]] by [[clang::fallthrough]]

The [[fallthrough]] attribute is a C++17 extension. It happens to work
in GCC 7, but causes warnings or even failures in other compilers.

In my quest to find a syntax that makes all compilers happy without
having to disable the (useful) warning, I think I have finally
found a way. Using the clang:: namespace seems to solve several
issues:

* It is marked as a compiler extension, so compilers not supporting it
  should simply ignore the attribute
* It (obviously) works in Clang, which is nice when using a Clang-based
  IDE like Qt Creator
* For some reason, it also seems to silence warnings in GCC; I guess one
  of GCC's fancy regexes somehow matches

6 years agoCorrect issue where messages were over-trimmed
Daniel Silverstone [Wed, 7 Feb 2018 10:51:55 +0000 (10:51 +0000)]
Correct issue where messages were over-trimmed

In an attempt to correct a problem with quasseldroid multiline
messages (97a9b1646bb0d6362cef14bac3a577481cc01e49) the core started
trimming leading whitespace from lines. This broke pasting of things
like formatted code.

This commit ensures that only the splitting is done, and that we skip
empty lines when handling /SAY since they sometimes cause issues on
networks and the clients which split client-side already skip empty
lines.

Closes GH-331.

6 years agoSupport $i:account in aliases
Svetlana Tkachenko [Mon, 8 Jan 2018 04:44:17 +0000 (04:44 +0000)]
Support $i:account in aliases

Closes GH-321.

6 years agoSupport $i:ident in aliases
Svetlana Tkachenko [Mon, 8 Jan 2018 00:39:45 +0000 (00:39 +0000)]
Support $i:ident in aliases

https://bugs.quassel-irc.org/issues/1454

Implements #1454.

6 years agoclient: Avoid warning for unused argument
Manuel Nickschas [Wed, 28 Mar 2018 21:17:04 +0000 (23:17 +0200)]
client: Avoid warning for unused argument

6 years agoFix compile error with Qt4
Janne Koschinski [Fri, 22 Dec 2017 02:47:09 +0000 (03:47 +0100)]
Fix compile error with Qt4

In Qt4, signals are protected, therefore we can’t emit a signal on
Client from the ClientUserInputHandler.

Therefore we wrap the signal emitter with a function on the Client.

Closes GH-320.

6 years agoMake /list open the Channel List dialog
Janne Koschinski [Fri, 22 Dec 2017 01:39:43 +0000 (02:39 +0100)]
Make /list open the Channel List dialog

6 years agoIgnore self messages
Janne Koschinski [Sun, 18 Feb 2018 20:14:35 +0000 (21:14 +0100)]
Ignore self messages

Closes GH-317.

6 years agoPer default, set local nick highlight to none
Janne Koschinski [Thu, 21 Dec 2017 23:20:15 +0000 (00:20 +0100)]
Per default, set local nick highlight to none

6 years agoPer popular request, always enable local highlights
Janne Koschinski [Thu, 21 Dec 2017 22:50:26 +0000 (23:50 +0100)]
Per popular request, always enable local highlights

6 years agoFix an issue where empty elements were shown in the highlight list
Janne Koschinski [Thu, 21 Dec 2017 22:48:03 +0000 (23:48 +0100)]
Fix an issue where empty elements were shown in the highlight list

- Replace clearContents with while (rowCount()) removeRow

6 years agoOnly enable the relevant highlight depending on core features
Janne Koschinski [Thu, 21 Dec 2017 21:18:11 +0000 (22:18 +0100)]
Only enable the relevant highlight depending on core features

- If connected to a modern core, disable local highlights
- Otherwise, disable remote highlights

6 years agoAdd an import button to import local rules into the new page
Janne Koschinski [Thu, 21 Dec 2017 21:07:55 +0000 (22:07 +0100)]
Add an import button to import local rules into the new page

6 years agoDisable the highlights page when not connected
Janne Koschinski [Thu, 21 Dec 2017 20:57:03 +0000 (21:57 +0100)]
Disable the highlights page when not connected

6 years agocommon: Set sourcePeer() also for internal (mono) connections
Manuel Nickschas [Mon, 26 Mar 2018 22:04:01 +0000 (00:04 +0200)]
common: Set sourcePeer() also for internal (mono) connections

So far, SignalProxy::sourcePeer() was only set while processing
messages from remote peers. Set this also for internal connections.

Also remove InternalPeer's special-casing for in-thread communication,
as the two connected peers always live in different threads anyways.

Closes GH-345.

6 years agocommon: Represent core/client features as string list in the protocol
Manuel Nickschas [Wed, 21 Mar 2018 23:58:46 +0000 (00:58 +0100)]
common: Represent core/client features as string list in the protocol

The previous way of representing all supported features as a bit-wise
combination of flags is reaching its limits, due to the fact that the
old Features enum didn't have a defined width, and thus the compiler
can (and does) choose to represent it as a 16 bit value even though
the serialization in the protocol is defined as a 32 bit value.

In order to solve this problem, and to make feature negotiation more
robust, a new field "FeatureList" is added to both "ClientInit"
and "ClientInitAck" handshake messages that holds a string list with
the supported features.

Clients still send both "Features" and "FeatureList" fields when
registering, in order to support older cores. The core now omits
the legacy "CoreFeatures" field if the client indicates support
for extended features. Support for extended features is indicated
as the legacy feature 0x8000.

Note that legacy features are a subset of the new extended features.
Clients supporting extended features are encouraged to send the
full list, including legacy ones, in their FeatureList field.

Internally, the string-based feature list is mapped to a
std::vector<bool> to provide for fast lookup of enabled features.
The new methods Client::isCoreFeatureEnabled() and Peer::hasFeature()
allow for convenient checking.

Both client and core now output a log message if there is a mismatch
between the peers.

6 years agocommon: Make the Quassel class a proper singleton, clean up
Manuel Nickschas [Wed, 21 Mar 2018 00:41:28 +0000 (01:41 +0100)]
common: Make the Quassel class a proper singleton, clean up

No longer have the various application classes inherit from the
Quassel class, which is a precondition for making the latter a
QObject down the line. Enable application-specific config reload
and quit behaviors by providing the means to register handler
functions, replacing the previous inheritance-based mechanism.

Make the Quassel class a proper singleton, remove inline functions
and modernize the code.

6 years agouistyle: Ignore format code for Monospace
Manuel Nickschas [Wed, 7 Mar 2018 23:53:50 +0000 (00:53 +0100)]
uistyle: Ignore format code for Monospace

Since the current rendering engine does not easily support switching
fonts in the middle of a message, we can't currently support the
Monospace format code as specified in [1].
However, to avoid weird artifacts when other clients send this, ignore
the format code for now.

[1] https://modern.ircdocs.horse/formatting.html#monospace

Closes GH-342.

6 years agouistyle: Support rendering of strikethrough'd text
Manuel Nickschas [Wed, 7 Mar 2018 23:47:39 +0000 (00:47 +0100)]
uistyle: Support rendering of strikethrough'd text

As defined in [1], format code 0x1e indicates text that is struck
through. Add support for rendering this accordingly.

Extend the stylesheet parser so the format can be defined, and
add to the default stylesheet.

[1] https://modern.ircdocs.horse/formatting.html#strikethrough

6 years agouistyle: Support reverse color rendering
Manuel Nickschas [Wed, 7 Mar 2018 23:22:24 +0000 (00:22 +0100)]
uistyle: Support reverse color rendering

Format codes 0x12 and 0x16 toggle the swap of foreground and
background colors. In the current implementation, the color
swap only applies to custom colors, i.e. mIRC colors and hex
colors. Normal text is not affected.

Since this is not a styleable property, remove support for it
from the stylesheet parser.

6 years agouistyle: Define via stylesheet if color codes have an effect
Manuel Nickschas [Wed, 7 Mar 2018 19:59:37 +0000 (20:59 +0100)]
uistyle: Define via stylesheet if color codes have an effect

In certain situations, color codes should have no effect, e.g. when
selecting text. This required hacks in stylesheets; for example
when setting a foreground color for self or highlighted messages,
the mIRC colors had to be redefined in the stylesheet for that label.
Also the code had some workaround, e.g. for URLs.

With the introduction of the non-styleable extended mIRC and
hex colors, these workarounds are no longer possible.

Solve these issues by introducing two new properties that can be set
in the stylesheet:

allow-foreground-override: true|false
allow-background-override: true|false

The default stylesheet sets them to true by default, and to false
e.g. for selections.

Remove the now unneeded workaround from m4yer's stylesheet, too.

6 years agouistyle: Support rendering of hex colors
Manuel Nickschas [Wed, 7 Mar 2018 18:37:12 +0000 (19:37 +0100)]
uistyle: Support rendering of hex colors

Hex colors are a relatively new addition to IRC, as defined in
<https://modern.ircdocs.horse/formatting.html#hex-color>.

Note that there are known issues with prioritization in the theme
engine (i.e., setting the foreground explicitly in the stylesheet
will always override hex colors), which will be fixed in a follow-up
commit.

6 years agouistyle: Fix weird way of registering Qt types
Manuel Nickschas [Wed, 7 Mar 2018 00:38:53 +0000 (01:38 +0100)]
uistyle: Fix weird way of registering Qt types

Well, maybe it didn't seem so weird a decade ago, but these days
we can do type registration in a nicer way.

6 years agouistyle: Support extended mIRC colors
Manuel Nickschas [Wed, 7 Mar 2018 00:31:34 +0000 (01:31 +0100)]
uistyle: Support extended mIRC colors

Support mIRC color values between 16 and 98, as specified in [1].
Extended color values are not styleable.

[1] https://modern.ircdocs.horse/formatting.html

6 years agouistyle: Add more type-safety to UiStyle, and clean up a bit
Manuel Nickschas [Tue, 6 Mar 2018 20:07:42 +0000 (21:07 +0100)]
uistyle: Add more type-safety to UiStyle, and clean up a bit

Migrate all UiStyle enums to be enum classes. Enforce explicit types
instead of quint32 in most places using them, and handle MessageLabel
in a more obvious fashion. A bunch of bit-wise operators had to be
added to avoid lots of boilerplate when dealing with the enums.

FormatList now holds the formats in a struct rather than as plain enum
(or quint32) values. This will be needed for extended color support;
as the format type cannot hold the hard-coded extended color values,
the colors will be stored explicitly in the list and applied as
appropriate.

Also, in the quest to modernize the codebase, FormatList is now a
std::vector rather than a QList.

6 years agoUpdate stripFormatCodes() for additional formatting characters
Michael Marley [Thu, 1 Mar 2018 22:19:47 +0000 (17:19 -0500)]
Update stripFormatCodes() for additional formatting characters

 - \x04 for hex color (IRCCloud)
 - \x11 for monospace (IRCCloud)
 - \x1e for strikethrough (Textual)

This patch does not actually add support for rendering those
styles, but at least ensures that highlighting still works
correctly if they are used.

Closes GH-337.

6 years agodcc: Disable DCC features until they're ready for public consumption
Manuel Nickschas [Thu, 1 Mar 2018 23:06:21 +0000 (00:06 +0100)]
dcc: Disable DCC features until they're ready for public consumption

Don't advertise that we support DCC when we actually don't yet. Also,
don't create the transfer widget and settings page for now.

6 years agoproxy: Actually fix settings migration logic
Manuel Nickschas [Thu, 1 Mar 2018 21:03:53 +0000 (22:03 +0100)]
proxy: Actually fix settings migration logic

Not sure what the previous code was supposed to accomplish, but
proxy settings are stored in [CoreAccounts] and thus migration needs
to happen for each configured account. Also, the UseProxy flag was
removed and thus must be translated to ProxyType::NoProxy.

Closes GH-181.

6 years agoReorder includes alphabetically
Javier Llorente [Sun, 10 Sep 2017 21:31:03 +0000 (23:31 +0200)]
Reorder includes alphabetically

6 years agoMove account details out of 'ManualProxy'
Javier Llorente [Sun, 10 Sep 2017 21:28:26 +0000 (23:28 +0200)]
Move account details out of 'ManualProxy'

6 years agoUpdate VERSION_MINOR_CURRENT, realign spaces for comment (case 4)
Javier Llorente [Sat, 7 Jan 2017 00:27:37 +0000 (01:27 +0100)]
Update VERSION_MINOR_CURRENT, realign spaces for comment (case 4)

6 years agoAdd case 4 for new proxy type default value
Javier Llorente [Fri, 6 Jan 2017 23:03:12 +0000 (00:03 +0100)]
Add case 4 for new proxy type default value

6 years agoAdd system proxy support for quassel-client
Javier Llorente [Sun, 7 Feb 2016 23:36:17 +0000 (00:36 +0100)]
Add system proxy support for quassel-client

6 years agoqtui: Avoid bogus tr() context warning
Manuel Nickschas [Tue, 27 Feb 2018 22:28:31 +0000 (23:28 +0100)]
qtui: Avoid bogus tr() context warning

lupdate in Qt versions prior to 5.6.1 has issues parsing brace-
initialization in constructors, and complains about "tr() cannot
be called without context". Work around this by explicitly giving
the class name as suggested in QTBUG-34128.

6 years agoFix compile error with Qt4
Janne Koschinski [Fri, 22 Dec 2017 02:46:12 +0000 (03:46 +0100)]
Fix compile error with Qt4

In Qt4, signals are protected, therefore we can’t emit a signal on
Client from the ClientUserInputHandler.

Therefore we wrap the signal emitter with a function on the Client.

Closes GH-318.

6 years agoImplement /ignore functionality
Janne Koschinski [Thu, 21 Dec 2017 22:22:52 +0000 (23:22 +0100)]
Implement /ignore functionality

- If /ignore <nickname> is used, a new rule for nickname!*@* is added,
  with dynamic strictness, limited to the current network.
- If /ignore <rule> (where rule contains ! or @) is used, that rule is
  added, with dynamic strictness, limited to the current network.
- If /ignore with no parameters is used, the ignore list is shown

6 years agoPolish session list UI
Janne Koschinski [Thu, 21 Dec 2017 20:43:18 +0000 (21:43 +0100)]
Polish session list UI

- Only show disconnect button if available
- Show if client is connected securely
- Make the UI look more native

Closes GH-316.

6 years agoTransmit feature flag for remote disconnecting with peer info
Janne Koschinski [Thu, 21 Dec 2017 20:42:26 +0000 (21:42 +0100)]
Transmit feature flag for remote disconnecting with peer info

6 years agoIntroduce feature flag for remote disconnecting
Janne Koschinski [Thu, 21 Dec 2017 20:42:10 +0000 (21:42 +0100)]
Introduce feature flag for remote disconnecting

6 years agoUse craft on appveyor
Hannah von Reth [Wed, 21 Jun 2017 12:17:50 +0000 (14:17 +0200)]
Use craft on appveyor

This will use the well maintained packages from Craft.
It will reduce the maintenance cost for providing a Windows installer.
Additionally we now use up to date binaries built exactly for this compiler,
so we no longer depend on 33dparty openssl binaries etc.

Using and deploying KDE Framework 5 libaries on Windows is also possible now.
This build provides KDE Sonnet

Find out more about Craft: https://community.kde.org/Craft
Contribute to the Quassel blueprint:
https://github.com/KDE/craft-blueprints-kde/blob/master/qt-apps/quassel/quassel.py

Closes GH-312.

6 years agouisupport: Also fix doubleclick in nick views
Manuel Nickschas [Tue, 27 Feb 2018 09:59:52 +0000 (10:59 +0100)]
uisupport: Also fix doubleclick in nick views

Since the Q_WS_* macros no longer exist in Qt5, replace them by the
appropriate Q_OS_* macros. Remove some needless ones, too.

6 years agouisupport: Join channels on doubleclick on all but Windows and OSX
Manuel Nickschas [Tue, 27 Feb 2018 09:23:39 +0000 (10:23 +0100)]
uisupport: Join channels on doubleclick on all but Windows and OSX

The Q_WS_* macros no longer exist in Qt5, so the OS detection for
the click behavior in bufferviews didn't work correctly. Use the
correct Q_OS_* macros to ensure that a doubleclick is required on
platforms other than Windows and OSX.

6 years agoclient: Fix Chat Monitor missing sender brackets
Shane Synan [Fri, 22 Sep 2017 23:56:49 +0000 (18:56 -0500)]
client: Fix Chat Monitor missing sender brackets

Always re-add hidden sender brackets for the Chat Monitor as the
normal sender prefixes get replaced with Network, Buffer, and Sender
names.

Sender brackets shown:
> Copy-pasted
  Chat Monitor: <Bitlbee:#channel> digitalcircuit does things
  Channel:      -*- digitalcircuit does things

Before:
> Copy-pasted with sender brackets hidden (wrong)
  Chat Monitor: Bitlbee:#channel digitalcircuit does things
  Channel:      -*- digitalcircuit does things

After:
> Copy-pasted with sender brackets hidden (correct)
  Chat Monitor: <Bitlbee:#channel> digitalcircuit does things
  Channel:      -*- digitalcircuit does things

Closes GH-314.

6 years agoPackage bearer plugin on OSX
romibi [Fri, 2 Feb 2018 11:45:09 +0000 (12:45 +0100)]
Package bearer plugin on OSX

Fixes #1442. Closes GH-324.

6 years agoFix OSX compile and deploy
romibi [Fri, 1 Sep 2017 08:06:10 +0000 (10:06 +0200)]
Fix OSX compile and deploy

Set additional compile flag
Fix FindLdap.cmake for OSX
Fix DMG creation (sometimes fails if no volume size is provided)

Closes GH-304.

6 years agocommon: Fix typo in Network::capAvailable() docs
Shane Synan [Sun, 17 Sep 2017 17:54:05 +0000 (12:54 -0500)]
common: Fix typo in Network::capAvailable() docs

In Network::capAvailable(), fix typo of "guarentee" -> "guarantee".
This doesn't have any impact on running code, but should still be
fixed.

Thanks to @justJanne for finding this.

Closes GH-300.

6 years agocore: Stop ratelimiting log spam with old client
Shane Synan [Fri, 18 Aug 2017 20:34:38 +0000 (15:34 -0500)]
core: Stop ratelimiting log spam with old client

Downgrade invalid 'setMessageRateBurstSize' and 'setMessageRateDelay'
warning messages to debugging level.  This happens any time an older
client tries to configure a network for a newer core and in most
cases can be ignored.

Should an issue arise, the log level can be set to debug.

6 years agoRemove old 'remove buffer' KeyPress code
genius3000 [Thu, 27 Jul 2017 08:00:05 +0000 (02:00 -0600)]
Remove old 'remove buffer' KeyPress code

Since commit 9f33f6e4 a 'hide current buffer' shortcut is available.
This is the global application shortcut like Sput referenced in
http://bugs.quassel-irc.org/issues/668

Keeping a hard-coded KeyPress event doing the same seems unnecessary.
Users have also expressed dislike in the use of 'Backspace' for this
buffer removal. Unintentional buffer removals are often for some.

This commit removes the 'KeyPress' event and cleans up the
'hideCurrentBuffer' code, removing commented (un-needed) code.

Reference: http://bugs.quassel-irc.org/issues/1403
Fixes #1403. Closes GH-299.

6 years agocore: connectToIrc: Add clarifying comment on DNS lookups
Albert S [Mon, 21 Aug 2017 19:35:41 +0000 (21:35 +0200)]
core: connectToIrc: Add clarifying comment on DNS lookups

Closes GH-298.

6 years agocore: connectToIrc: Prevent DNS leaks on connection when using proxy
Albert S [Mon, 24 Jul 2017 13:51:56 +0000 (15:51 +0200)]
core: connectToIrc: Prevent DNS leaks on connection when using proxy

96fe7e713 introduced a call to QHostInfo::fromName() in order to avoid
problems related to the caching of DNS queries. It however is also called
when the user has specified that a proxy should be used. This behavior
therefore introduces a DNS leak.

This commit ensures that QHostInfo::fromName() is not called when
a proxy has been specified.

6 years agoExplicitly disable printing signatures when running git
Daniel Albers [Wed, 3 Jan 2018 00:41:41 +0000 (01:41 +0100)]
Explicitly disable printing signatures when running git

Make sure version parsing doesn't fail when a signed commit is at the tip and
log.showsignature is enabled.

6 years agocore: Add SQLite backlog idx: bufferid, messageid
Sven Anderson [Fri, 22 Sep 2017 21:10:51 +0000 (16:10 -0500)]
core: Add SQLite backlog idx: bufferid, messageid

Connecting to the core with a big sqlite storage (>500MB) can become
extremely slow or even time out.  Adding an index over the tuples
(bufferid, messageid) speeds up the connection significantly, because
at connection time a lot of queries over these two values are
processed.

Modified by @digitalcircuit from original commit to add a new schema
upgrade.

Closes GH-313 and GH-244.

6 years agoOnly enable sender prefix option if the core supports the feature
Manuel Nickschas [Thu, 21 Dec 2017 12:44:56 +0000 (13:44 +0100)]
Only enable sender prefix option if the core supports the feature

Closes GH-309.

6 years agoMinor cleanups
Manuel Nickschas [Thu, 21 Dec 2017 12:44:30 +0000 (13:44 +0100)]
Minor cleanups

6 years agoImplement UI and serialization logic for sender modes
Janne Koschinski [Wed, 20 Dec 2017 02:22:31 +0000 (03:22 +0100)]
Implement UI and serialization logic for sender modes

6 years agoReplace Protocol::Handler enum with enum class
Janne Koschinski [Wed, 20 Dec 2017 02:12:35 +0000 (03:12 +0100)]
Replace Protocol::Handler enum with enum class

6 years agoMinor cleanups for core-side highlight feature
Manuel Nickschas [Wed, 20 Dec 2017 22:16:52 +0000 (23:16 +0100)]
Minor cleanups for core-side highlight feature

Also remove some accidental fallthroughs, and fix the Qt4 build.

Closes GH-303.

6 years agoStore the HighlightNickType as int instead of custom enum
Janne Koschinski [Wed, 20 Dec 2017 02:30:36 +0000 (03:30 +0100)]
Store the HighlightNickType as int instead of custom enum

6 years agoFix an issue where the table headers were invisible
Janne Koschinski [Wed, 20 Dec 2017 00:17:49 +0000 (01:17 +0100)]
Fix an issue where the table headers were invisible

6 years agoRedesign the core highlight settings page
Janne Koschinski [Tue, 19 Dec 2017 23:38:50 +0000 (00:38 +0100)]
Redesign the core highlight settings page

6 years agoImplement sender matching for highlight rules
Janne Koschinski [Tue, 5 Sep 2017 16:11:51 +0000 (18:11 +0200)]
Implement sender matching for highlight rules

- Implements configuration, sync, and matching behavior for
  sender-based matching in highlight rules
- The match type (regexp or wildcard) is the same as configured for
  the message itself.
- The sender rule has to match exactly

6 years agoImplement inverse highlight rules
Janne Koschinski [Tue, 5 Sep 2017 15:18:57 +0000 (17:18 +0200)]
Implement inverse highlight rules

- Implements configuration, sync, and matching behavior for inverse
  rules
- If a message matches a positive rule (or nick), and an inverse rule,
  the inverse rule takes precedence, and no highlight is generated
- Implements an "inverse rule" checkbox in the core-side highlight
  rule configuration dialog.

6 years agoFix an issue with QStringList being declared differently on Qt4
Janne Koschinski [Fri, 1 Sep 2017 11:51:35 +0000 (13:51 +0200)]
Fix an issue with QStringList being declared differently on Qt4

6 years agoFix a potential crash
Janne Koschinski [Fri, 1 Sep 2017 03:45:33 +0000 (05:45 +0200)]
Fix a potential crash

6 years agoImplement UI for core-side highlights
Janne Koschinski [Fri, 1 Sep 2017 03:11:45 +0000 (05:11 +0200)]
Implement UI for core-side highlights

6 years agoImplement core-side highlights
Janne Koschinski [Fri, 1 Sep 2017 01:11:39 +0000 (03:11 +0200)]
Implement core-side highlights

6 years agoAdd 'twitch.tv/membership' capability for Twitch.tv
Florent Castelli [Thu, 22 Jun 2017 16:39:12 +0000 (18:39 +0200)]
Add 'twitch.tv/membership' capability for Twitch.tv

Twitch.tv implementation doesn't send NAMES list automatically
unless supported by the client as they can be quite big.

See: https://dev.twitch.tv/docs/v5/guides/irc/#twitch-irc-capability-membership

Closes GH-296.

6 years agoOnly install the application icon if the client is being built
Adriaan de Groot [Sat, 29 Apr 2017 15:04:57 +0000 (17:04 +0200)]
Only install the application icon if the client is being built

The icon should not be installed as part of a core-only build.

Closes GH-292.

6 years agocmake: Use unquoted variables
Manuel Nickschas [Tue, 19 Dec 2017 22:22:17 +0000 (23:22 +0100)]
cmake: Use unquoted variables

Apparently, CMP0054 sometimes warns about this.

6 years agoDon't return const refs from methods
Manuel Nickschas [Tue, 19 Dec 2017 21:53:53 +0000 (22:53 +0100)]
Don't return const refs from methods

This is dangerous and should be avoided where possible.

Closes GH-302.

6 years agoImplement changes requested in review
Janne Koschinski [Tue, 19 Dec 2017 19:18:20 +0000 (20:18 +0100)]
Implement changes requested in review

- Make Peer::_connectedSince, Peer::_buildDate, Peer::_clientVersion
  private, add getters/setters
- Correct parameter naming in doxygen comment for
  SignalProxy::restrictTargetPeers
- Remove SignalProxy::_peers
- Initialize SignalProxy::_sourcePeer to nullptr
- Add Q_UNUSED for peer parameter for CoreSession::changePassword
- Correct indentation in src/qtui/CMakeLists
- Use pragma in src/qtui/coresessionwidget.h
- Fix header ordering in src/qtui/coresessionwidget.h
- Fix header ordering in src/qtui/coresessionwidget.cpp

6 years agoRemove the session area when empty; improved dialog UI code
Janne Koschinski [Mon, 28 Aug 2017 17:15:44 +0000 (19:15 +0200)]
Remove the session area when empty; improved dialog UI code

6 years agoAdd a header that MSVC requires
Janne Koschinski [Mon, 28 Aug 2017 13:42:19 +0000 (15:42 +0200)]
Add a header that MSVC requires

6 years agoImprovements to fix the build and for Doxygen
Janne Koschinski [Mon, 28 Aug 2017 13:01:42 +0000 (15:01 +0200)]
Improvements to fix the build and for Doxygen

6 years agoImplement a fallback for Qt4
Janne Koschinski [Mon, 28 Aug 2017 02:47:29 +0000 (04:47 +0200)]
Implement a fallback for Qt4

6 years agoRemove debug message
Janne Koschinski [Mon, 28 Aug 2017 02:21:25 +0000 (04:21 +0200)]
Remove debug message

6 years agoMigrate password change RPC to the new target restriction system
Janne Koschinski [Mon, 28 Aug 2017 02:17:45 +0000 (04:17 +0200)]
Migrate password change RPC to the new target restriction system

6 years agoImplement peer-specific signal sending
Janne Koschinski [Mon, 28 Aug 2017 01:56:41 +0000 (03:56 +0200)]
Implement peer-specific signal sending

6 years agoMake the UI actually emit the required signal
Janne Koschinski [Mon, 28 Aug 2017 01:56:23 +0000 (03:56 +0200)]
Make the UI actually emit the required signal

6 years agoImplement RPC call to gracefully disconnect a client
Janne Koschinski [Mon, 28 Aug 2017 01:55:55 +0000 (03:55 +0200)]
Implement RPC call to gracefully disconnect a client

6 years agoImplement a basic UI for showing connected clients
Janne Koschinski [Sun, 27 Aug 2017 22:52:32 +0000 (00:52 +0200)]
Implement a basic UI for showing connected clients

6 years agoAdd initial implementation for showing and kicking connected clients
Janne Koschinski [Sun, 27 Aug 2017 02:29:53 +0000 (04:29 +0200)]
Add initial implementation for showing and kicking connected clients

Adds the possibility to show a list of connected clients, and allow
to kick other (or your own) clients of the same user.

6 years agoqa: Add [[fallthrough]] annotations where appropriate
Manuel Nickschas [Tue, 19 Dec 2017 21:37:45 +0000 (22:37 +0100)]
qa: Add [[fallthrough]] annotations where appropriate

Newer GCCs start to warn about this, so add attributes or rearrange
code as appropriate.

While the [[fallthrough]] attribute has only been standardized in
C++17, it should simply be ignored by older compilers (and it does
shut up GCC even when compiling with -std=c++11).

6 years agocmake: Output build type information; add policy
Manuel Nickschas [Tue, 19 Dec 2017 21:05:14 +0000 (22:05 +0100)]
cmake: Output build type information; add policy

CMake 3.10 added a new policy that triggers warnings when running
automoc on generated files.

6 years agocore: Fix inconsistent override/virtual usage
Manuel Nickschas [Tue, 19 Dec 2017 20:28:46 +0000 (21:28 +0100)]
core: Fix inconsistent override/virtual usage

Avoid compiler warnings due to this.

Closes GH-301.

6 years agoInitialize new buffers in the UI with their activity
Janne Koschinski [Tue, 19 Dec 2017 18:17:22 +0000 (19:17 +0100)]
Initialize new buffers in the UI with their activity

- Make Client::bufferSyncer public
- Load activity in NetworkItem::bufferItem from BufferSyncer::activity

6 years agoMake clearing flags more explicit
Janne Koschinski [Tue, 19 Dec 2017 17:30:48 +0000 (18:30 +0100)]
Make clearing flags more explicit

6 years agoImplement changes requested in review
Janne Koschinski [Tue, 19 Dec 2017 16:43:32 +0000 (17:43 +0100)]
Implement changes requested in review

6 years agocore: Fix Postgres bufferActivities() query typo
Shane Synan [Sat, 23 Sep 2017 22:39:08 +0000 (17:39 -0500)]
core: Fix Postgres bufferActivities() query typo

In PostgreSqlStorage::bufferActivities() use query
"select_buffer_bufferactivities" instead of the query for singular
buffer activity, "select_buffer_bufferactivity".

Fixes buffer activity state being lost on core restart.

6 years agoFix test for if the core supports activity sync
Janne Koschinski [Sat, 23 Sep 2017 09:29:27 +0000 (11:29 +0200)]
Fix test for if the core supports activity sync

6 years agoFix buffer activity sync between old core and new client
Janne Koschinski [Sat, 23 Sep 2017 08:34:41 +0000 (10:34 +0200)]
Fix buffer activity sync between old core and new client

A combination of an old core and new client would not show all
buffer activity that was expected.

6 years agoFix syntax error in SQL
Janne Koschinski [Sat, 23 Sep 2017 08:33:09 +0000 (10:33 +0200)]
Fix syntax error in SQL

Migration failed because of a syntax error in an SQL file.
13 columns were to be written to, but only 11 placeholders
existed.

6 years agoCorrectly remove buffers from the buffersyncer
Janne Koschinski [Fri, 22 Sep 2017 22:37:37 +0000 (00:37 +0200)]
Correctly remove buffers from the buffersyncer

I had forgotten to also remove buffers from the bufferactivity list
when they are being removed. This is now fixed.

6 years agoMake comparison explicit
Janne Koschinski [Fri, 8 Sep 2017 02:13:21 +0000 (04:13 +0200)]
Make comparison explicit

6 years agoReadd files lost during rebasing, fix minor issues
Janne Koschinski [Thu, 31 Aug 2017 23:57:42 +0000 (01:57 +0200)]
Readd files lost during rebasing, fix minor issues

6 years agoRemove debug messages
Janne Koschinski [Sun, 27 Aug 2017 02:00:45 +0000 (04:00 +0200)]
Remove debug messages

6 years agoMove the check if the core handles activities to the right place
Janne Koschinski [Sun, 27 Aug 2017 01:54:28 +0000 (03:54 +0200)]
Move the check if the core handles activities to the right place

6 years agoClarified minor details, again
Janne Koschinski [Sun, 27 Aug 2017 00:46:52 +0000 (02:46 +0200)]
Clarified minor details, again

6 years agoClarified minor details
Janne Koschinski [Sun, 27 Aug 2017 00:43:41 +0000 (02:43 +0200)]
Clarified minor details

6 years agoSeparate highlight handling
Janne Koschinski [Sun, 27 Aug 2017 00:15:32 +0000 (02:15 +0200)]
Separate highlight handling