quassel.git
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

6 years agoImplement client UI integration, add feature flag (0x400)
Janne Koschinski [Sun, 27 Aug 2017 00:02:29 +0000 (02:02 +0200)]
Implement client UI integration, add feature flag (0x400)

6 years agoChange buffer activity iterator initialization
Janne Koschinski [Sat, 26 Aug 2017 19:13:42 +0000 (21:13 +0200)]
Change buffer activity iterator initialization

6 years agoImplement buffer activity sync
Janne Koschinski [Sat, 26 Aug 2017 18:25:20 +0000 (20:25 +0200)]
Implement buffer activity sync

6 years agoUse Message::Types (which is QFlags<Message::Type>) instead of int
Janne Koschinski [Sat, 26 Aug 2017 00:07:23 +0000 (02:07 +0200)]
Use Message::Types (which is QFlags<Message::Type>) instead of int

6 years agoImplement database backend for buffer-activity patch
Janne Koschinski [Fri, 25 Aug 2017 21:09:00 +0000 (23:09 +0200)]
Implement database backend for buffer-activity patch

6 years agosql: Fix population of lastmsgid for empty buffers
Manuel Nickschas [Thu, 9 Nov 2017 22:23:22 +0000 (23:23 +0100)]
sql: Fix population of lastmsgid for empty buffers

Buffers may be empty, in which case the query to determine the last
message ID in them returns NULL, violating the constraint for the
newly introduced column. Use 0 instead.

Closes GH-315.

6 years ago Update translations from Transifex
Daniel Albers [Mon, 4 Sep 2017 22:06:39 +0000 (00:06 +0200)]
Update translations from Transifex

      26838 translated messages

    Many thanks to:
     - cs: Jaroslav Lichtblau <dragonlord@seznam.cz>
     - da: Joe Hansen <joedalton2@yahoo.dk>
     - el: Kostas Koudaras <warlordfff@gmail.com>
     - fi: Lasse Liehu <larso@gmx.com>
     - fr: Zoddo <transifex.com@zoddo.fr>
     - mr: Raju Devidas Vindane <rajuvindane@gmail.com>
     - pa: A S Alam <apreet.alam@gmail.com>
     - pt_BR: André Marcelo Alvarenga <alvarenga@kde.org>
     - ro: Sergiu Bivol <sergiu@cip.md>
     - ru: Viktor Suprun <popsul1993@gmail.com>
     - sl: Andrej Mernik <andrejm@ubuntu.si>
     - tr: Volkan Gezer <volkangezer@gmail.com>
     - uk: Yuri Chornoivan <yurchor@ukr.net>

6 years agoFix minor stylistic issues with the code 278/head
Janne Koschinski [Sun, 3 Sep 2017 20:41:00 +0000 (22:41 +0200)]
Fix minor stylistic issues with the code

Closes GH-278.

6 years agoAdd comment requested by @digitalcircuit
Janne Koschinski [Thu, 31 Aug 2017 23:14:05 +0000 (01:14 +0200)]
Add comment requested by @digitalcircuit

6 years agoImplement sender prefix storage in the database
Janne Koschinski [Thu, 31 Aug 2017 23:11:50 +0000 (01:11 +0200)]
Implement sender prefix storage in the database

* When processing a new message, find the mode the user that
  sent this message has in a channel (for example o or hv)
* Convert it to a prefix (for example @ or +%)
* Store this in a new sendermode column in the backlog table

Schema for both SQLite and PostgreSQL is updated.

6 years agoqtui: Add missing include
Manuel Nickschas [Mon, 4 Sep 2017 19:18:29 +0000 (21:18 +0200)]
qtui: Add missing include

QDir seems to be transitively pulled in on some, but not all Qt
versions we've encountered...

6 years agocommon: Fix isChannelName crash on empty string
Shane Synan [Mon, 4 Sep 2017 08:52:25 +0000 (03:52 -0500)]
common: Fix isChannelName crash on empty string

Add check to isChannelName for an empty string; return false if so
and don't try to index it.  This avoids crashing on connect for some
situations.

Closes GH-307.

6 years agocommon: Fix build with Qt4 and/or MSVC
Manuel Nickschas [Sun, 3 Sep 2017 23:43:24 +0000 (01:43 +0200)]
common: Fix build with Qt4 and/or MSVC

The previous commit caused a build failure for some combinations of
our build matrix, as QChar is not actually a literal usable in a
constexpr (unless you enable Qt5, for some bizarre reason...).

6 years agocommon: Make frequently called util methods more efficient
Manuel Nickschas [Sun, 3 Sep 2017 23:04:25 +0000 (01:04 +0200)]
common: Make frequently called util methods more efficient

Remove unnecessary temporary allocations and string copies in the
various methods in util.*, and avoid calling API functions that do
more than we need them to do in favor of an efficient implementation.

Ensure that frequently used QRegExp instances are created statically
and reused between invocations, so they can make use of JIT and other
optimizations.

As some of the affected methods are called *very* frequently, this
provides significant savings in terms of allocations, and
significantly reduces memory fragmentation as well.

Modernize some of the related code. Clean up includes, too.

6 years agoTrivia: Update URLs for Qt
Adriaan de Groot [Sat, 29 Apr 2017 14:55:26 +0000 (16:55 +0200)]
Trivia: Update URLs for Qt

Closes GH-291.

6 years agoDefault to unread backlog fetch if not changed
Shane Synan [Thu, 8 Sep 2016 02:08:49 +0000 (21:08 -0500)]
Default to unread backlog fetch if not changed

Use PerBufferUnread by default for backlog fetching rather than
PerBufferFixed.  In cases with many slow channels or multiple PMs,
this reduces the amount of backlog fetched on connect by ignoring
content already read.  This also increases the chances of seeing
highlights past the previous fixed limit of 500 lines.

This modifies new installs and existing configurations if the prior
default value wasn't changed.

In most cases, this should speed up connecting.  However, if
problematic, the version upgrade system should be used to preserve
old defaults for existing installs.

Closes GH-247.

6 years agoDon't terminate the core due to backend issues while setting up
Manuel Nickschas [Wed, 30 Aug 2017 21:50:54 +0000 (23:50 +0200)]
Don't terminate the core due to backend issues while setting up

If the authenticator or storage backend selected by the user during
core setup cannot be initialized, the problem shall be communicated
to the client and the user can start over; the core shall not exit
in this case. Ensure that failure to initialize the selected backends
only terminates the core if it's not being setup.

6 years agoFix layout issues in CoreConfigWizard; cleanup
Manuel Nickschas [Wed, 30 Aug 2017 21:43:45 +0000 (23:43 +0200)]
Fix layout issues in CoreConfigWizard; cleanup

Qt has trouble layouting widgets dynamically added to wizard pages,
so switch to using QStackedWidget for storage and authenticator
settings. Add size policies as needed and explicitly set the size of
all pages to fit the largest one to ensure that the wizard is large
enough.

While we're at it, clean up related code a bit.

Closes GH-170.

6 years agoLDAP authenticator now logs server address as info message
Ben Rosser [Mon, 19 Jun 2017 18:38:47 +0000 (14:38 -0400)]
LDAP authenticator now logs server address as info message

As requested by Zhoriel, the core now prints the full address and port
of the LDAP server it is connecting to, in order to make debugging
a little easier.

6 years agoFix issue from rebase; migrateTo now needs writer.get().
Ben Rosser [Sat, 27 May 2017 18:19:09 +0000 (14:19 -0400)]
Fix issue from rebase; migrateTo now needs writer.get().

6 years agoLDAP username case-insensivity
Tuetuopay [Mon, 6 Feb 2017 13:51:42 +0000 (14:51 +0100)]
LDAP username case-insensivity

This patches a case sensitivity issue in the core.

LDAP itself is case insensitive, but the LDAP module of the core will
keep the case of the usename when creating a local Quassel account.
Thus, if you login with the same username but using a different casing,
a new internal Quassel account will be creating, resulting in an
apparent settings loss (networks, ...).

The patch converts the username to lowercase before handing it to the
core.

6 years agoFix quasseluser table setup on PostgreSQL and sort sql.qrc
Ben Rosser [Thu, 24 Nov 2016 23:51:11 +0000 (18:51 -0500)]
Fix quasseluser table setup on PostgreSQL and sort sql.qrc

It seems that at some point the DEFAULT option for a varchar()
column has become sensitive to whether or not single or double quotation
marks are used. In particular when ""s were used, core setup failed
with the message 'ERROR:  column "Database" does not exist'. Changing
to single quotation marks (''s) resolved the issue.

Also include @digitalcircuit's sorted version of sql.qrc.

Fix the upgrade script too.

6 years agotravis: Try to work around a build issue with LDAP on OSX
Manuel Nickschas [Tue, 1 Nov 2016 20:39:51 +0000 (21:39 +0100)]
travis: Try to work around a build issue with LDAP on OSX

Seems like the headers found in the OSX Frameworks are broken, so
try giving the include path explicitly.

6 years agoRework the handling of storage/auth backends and config
Manuel Nickschas [Tue, 1 Nov 2016 16:34:16 +0000 (17:34 +0100)]
Rework the handling of storage/auth backends and config

The legacy way of transmitting backend settings to the client
for initial core configuration was pretty weird, especially regarding
the setupKeys/setupDefaults mess that required guesswork on the
client side as of the property types. With the introduction of
authenticators, an opportunity presented itself to improve this.

Upon fixing this, I realized that lots of pretty crazy legacy code
was involved, and partially even duplicated for authenticator
handling. I could not keep myself from cleaning that up.
In the process, the affected parts of the code were modernized too,
leveraging Modern C++ and the STL where possible.

The setupKeys/setupDefaults properties of the backend info structs
are now deprecated and replaced by a setupData list of field IDs,
translatable display names, and default values/types. To keep
legacy clients working, the old properties are still transmitted
until the next protocol break.

6 years agocommon: Add Deferred{Unique|Shared}Ptr and helpers
Manuel Nickschas [Tue, 1 Nov 2016 16:23:44 +0000 (17:23 +0100)]
common: Add Deferred{Unique|Shared}Ptr and helpers

This commit adds smart pointers for holding QObject derivatives.
On destruction, they will deleteLater() the object they're holding.
This is the recommended and safe way for deleting QObject instances.
Be careful with using such smart pointers outside of the scope of
their parent, for objects that are owned. The parent will delete
its children, and any outside reference still held by a smart pointer
will lead to a double free!

6 years agoldap: Don't use the backend's display name as identifier
Manuel Nickschas [Sun, 23 Oct 2016 23:03:16 +0000 (01:03 +0200)]
ldap: Don't use the backend's display name as identifier

We'd like to have the display name translatable, so it should not
be used as an identifer. Instead, introduce a backendId property
for this purpose.

6 years agoldap: Use correct authenticator name for mono client
Manuel Nickschas [Sun, 23 Oct 2016 22:23:34 +0000 (00:23 +0200)]
ldap: Use correct authenticator name for mono client

Should be "Database" instead of "StorageAuth".

6 years agoldap: ConnectionProperties -> AuthProperties
Manuel Nickschas [Sun, 23 Oct 2016 22:21:05 +0000 (00:21 +0200)]
ldap: ConnectionProperties -> AuthProperties

This commit changes the settings key to something making slightly
more sense in the context of authentication.

6 years agoldap: Some cleanups for GH-170
Manuel Nickschas [Wed, 19 Oct 2016 21:17:47 +0000 (23:17 +0200)]
ldap: Some cleanups for GH-170

Mostly formatting and a few other bits.

6 years agoldap: Remove warnings
Manuel Nickschas [Thu, 13 Oct 2016 21:25:12 +0000 (23:25 +0200)]
ldap: Remove warnings

6 years agoRe-add the ":authenticator" property to insert_quasseluser.sql
Ben Rosser [Fri, 9 Sep 2016 06:29:06 +0000 (02:29 -0400)]
Re-add the ":authenticator" property to insert_quasseluser.sql

This was removed during the rebase commits.

6 years agoAuthenticator code cleanup as per review
Ben Rosser [Fri, 9 Sep 2016 05:27:27 +0000 (01:27 -0400)]
Authenticator code cleanup as per review

* Standardized on "authenticator" rather than "authBackend"
* Removed XXXs and replaced with TODO or FIXME comments appropriately
* Fixed a couple whitespace errors
* Cleared up some comments in the ldap cmake
* In the authenticator code, renamed displayName to backendId
* Added missing newline at the end of authenticator.cpp

6 years agoAttempt to link against openldap on Windows, too
Ben Rosser [Tue, 2 Feb 2016 18:28:00 +0000 (13:28 -0500)]
Attempt to link against openldap on Windows, too

Rewrite cmake module to remove special case for Windows.

Added some (commented out) example code to ldapauthenticator as
how we'd need to link against winldap.h, but the implementations
are sufficiently different that it's probably a waste of time.

6 years agoAdd --select-authenticator switch to core
Ben Rosser [Mon, 1 Feb 2016 00:17:46 +0000 (19:17 -0500)]
Add --select-authenticator switch to core

The select-authenticator switch now behaves exactly like the
select-backend switch for storage backends, allowing the user to
reconfigure their authenticator from the commandline or do initial
core setup.

Initial core setup should look something like this now:
quasselcore -c _dir_ --select-backend=SQLite --select-authenticator=Database

6 years agoFix a couple of whitespace errors in core.{cpp,h}
Ben Rosser [Mon, 4 Jan 2016 22:00:22 +0000 (17:00 -0500)]
Fix a couple of whitespace errors in core.{cpp,h}

6 years agoAdd authenticator column to quasseluser migration table
Ben Rosser [Sat, 2 Jan 2016 20:18:04 +0000 (15:18 -0500)]
Add authenticator column to quasseluser migration table

Commit these too.

6 years agoAdd password changing checks
Ben Rosser [Fri, 1 Jan 2016 20:43:07 +0000 (15:43 -0500)]
Add password changing checks

Don't allow passwords to be changed if it's forbidden by the auth
provider.

6 years agoAdd authenticator column to quasseluser table
Ben Rosser [Wed, 30 Dec 2015 06:23:26 +0000 (01:23 -0500)]
Add authenticator column to quasseluser table

... as additional cross-check when logging in a user.

This will default to storage-based auth.

6 years agoFirst attempt local auth, then try external provider
Ben Rosser [Mon, 28 Dec 2015 22:18:45 +0000 (17:18 -0500)]
First attempt local auth, then try external provider

6 years agoDelete authenticators in core destructor too
Ben Rosser [Thu, 24 Dec 2015 21:37:40 +0000 (16:37 -0500)]
Delete authenticators in core destructor too

6 years agoMake authenticator changes to protocol backwards-compatible
Ben Rosser [Thu, 24 Dec 2015 03:30:48 +0000 (22:30 -0500)]
Make authenticator changes to protocol backwards-compatible

An older client setting up a newer core will cause the core to
default to using the SqlAuthenticator class.

An newer client setting up an older core won't show the auth
selection dialog.

6 years agoAdd LdapAuthenticator class for logging in users via LDAP
Ben Rosser [Wed, 23 Dec 2015 04:31:43 +0000 (23:31 -0500)]
Add LdapAuthenticator class for logging in users via LDAP

This is based on abustany's pull request #4, refactored into an
authenticator.

LDAP bindings now only get built if WITH_LDAP is set.

Added filters, also added -DHAVE_LDAP flag to compilation from cmake.

6 years agoImplement authenticator class used for logging in users
Ben Rosser [Sat, 14 Nov 2015 19:44:36 +0000 (14:44 -0500)]
Implement authenticator class used for logging in users

Added authenticator setup info to the core, also added a new core
setup dialog page for authenticators.

Wrote a SqlAuthenticator that simply wraps the existing
storage-based auth.

6 years agocore: Fix timestamps in manual /away messages
Shane Synan [Fri, 14 Apr 2017 00:26:08 +0000 (19:26 -0500)]
core: Fix timestamps in manual /away messages

Change handleAway() to NOT skip timestamp formatting by default.
This is the intended behavior as the one situation where it should be
skipped already manually sets skipFormatting to true.  All other
places deal with unformatted input strings (either from identity or
set by the client).

Remove now-redundant call to formatCurrentDateTimeInString() as the
handleAway command now uses it by default.

Fixes sending "/away Away since %%hh:mm%% on %%dd.MM%%" on the client
not getting formatted as "Away since 07:43 on 22.10" or some such.

Resolves GH-288.

6 years agocore: connectToIrc: Pick first IRC server specified when not failed
genius3000 [Fri, 14 Apr 2017 00:01:36 +0000 (18:01 -0600)]
core: connectToIrc: Pick first IRC server specified when not failed

When connecting to the IRC network, only clear the
'_previousConnectionAttemptFailed' flag when trying the next server
in the list. Otherwise, reset server index to start from the top.

Currently, Quassel will continue to use the last used (working)
server (or a random server if set to). This doesn't match the
intention of having an ordered list of servers to use. The change
here just makes Quassel start with the first server in the list
unless it's a failed attempt, in which it continues down the list
(same as currently).

This fixes the issue of getting "stuck" on a specific server even if
you manually disconnect and connect.

Reference: http://bugs.quassel-irc.org/issues/693
And: http://bugs.quassel-irc.org/issues/1006
Fixes #693 and #1006
Resolves GH-287

6 years agoPoint to github in Core Info
esainane [Tue, 4 Apr 2017 05:59:41 +0000 (17:59 +1200)]
Point to github in Core Info

Resolves GH-285.

6 years agocore: Drop the 'update_lastmsgid' statements
Shane Synan [Sun, 16 Apr 2017 04:28:44 +0000 (23:28 -0500)]
core: Drop the 'update_lastmsgid' statements

Remove the 'update_lastmsgid.sql' queries from PostgreSQL and SQLite
and remove the 'setBufferLastMsgId()' functions from
PostgreSqlStorage and SqliteStorage.  These are no longer needed now
that database triggers handle updating the 'lastmsgid' for buffers.

This removes redundancy and might improve performance.

Resolves GH-290.

6 years agocore: Add backlog trigger to update lastmsgid
Shane Synan [Sun, 16 Apr 2017 04:13:59 +0000 (23:13 -0500)]
core: Add backlog trigger to update lastmsgid

Add PostgreSQL function 'backlog_lastmsgid_update()' that sets the
'lastmsgid' of a buffer according to the latest message ID available.
Also add a PostgreSQL trigger 'backlog_lastmsgid_update' that acts
whenever a new message is inserted to or updated in the backlog
table.

Add two SQLite triggers, 'backlog_lastmsgid_update_trigger_insert'
for inserting messages into the backlog, and
'backlog_lastmsgid_update_trigger_update' for updating messages in
the backlog.  Both triggers update the 'lastmsgid' of a buffer
according to the latest message ID available.

Unfortunately, SQLite lacks niceties such as functions or complex
triggers, requiring two separate triggers to do the same thing.  Ah
well, SQLite is much easier to bundle and set up.

This fixes some cases where 'update_lastmsgid' was not being called
when it should, namely when inserting multiple messages.

NOTE:  Currently Quassel does not offer an option to delete
specific messages without deleting a buffer, nor to update the
message ID of existing messages (this would break many assumptions).
However, for completion-sake, the UPDATE triggers are included.
DELETE triggers should be added if individual message deletion is
added.

Thanks to justJanne for the suggestion and PostgreSQL code!

6 years agocore: Separate SQL current and upgrade scripts
Shane Synan [Sun, 16 Apr 2017 05:50:33 +0000 (00:50 -0500)]
core: Separate SQL current and upgrade scripts

Move the current SQL queries into the 'SQL/[database]' top folder,
move all database schema upgrade scripts into the
'SQL/[database]/version/##' subfolders.  This preserves repository
history for the general SQL queries when adding a new schema version,
and simplifies rebasing a branch if the master schema version changes
in the meantime (e.g. managing multiple pull requests).

Thanks to justJanne and others for the suggestion!

Update 'sql.qrc' with the moved SQL files.

Modify AbstractSqlStorage 'setupQueries()' and 'upgradeQueries()' to
use these new folder locations, and modify 'queryString()' to pick
either the current SQL schema folder or the versioned schema folder
according to whether a version was specified when calling it.

Update 'updateSQLResource.sh' with the new folder locations,
including fixing the 'sort' command to sort independent of the
current operating system language settings.

Update 'upgradeSchema.sh' with the new locations and stop moving the
non-upgrade '*.sql' scripts.  Now, it just adds a new folder and
prints a message on how to use it.  Also send error messages to
standard error.

Add more documentation on schema upgrades.  You can never have enough
testing...

6 years agoFix icon import to not lose channel icons in breeze
romibi [Fri, 14 Apr 2017 14:11:20 +0000 (16:11 +0200)]
Fix icon import to not lose channel icons in breeze

Resolves GH-289.

7 years agoicons: Add missing dialog-warning icon
Manuel Nickschas [Thu, 13 Apr 2017 23:02:18 +0000 (01:02 +0200)]
icons: Add missing dialog-warning icon

That one was introduced in a recent commit.

7 years agoicons: Fix import script
Manuel Nickschas [Thu, 13 Apr 2017 22:59:37 +0000 (00:59 +0200)]
icons: Fix import script

Make it work with newer Perl, and some other tweaks.

7 years agoUpdate Icons
romibi [Sat, 25 Mar 2017 18:10:18 +0000 (19:10 +0100)]
Update Icons

Resolves GH-283.

7 years agoSupport extra theme dependent icons via import-script
romibi [Sat, 25 Mar 2017 15:42:35 +0000 (16:42 +0100)]
Support extra theme dependent icons via import-script

7 years agoAdd new connect/disconnect hicolor icons
romibi [Sat, 25 Mar 2017 15:41:32 +0000 (16:41 +0100)]
Add new connect/disconnect hicolor icons

7 years agoFix Icon fallback issue
romibi [Sat, 25 Mar 2017 10:30:46 +0000 (11:30 +0100)]
Fix Icon fallback issue

and make the connect/disconnect to core buttons 'themeable'
and fix some wrong inactive icon fallback in code

7 years agoSave Core settings synchronously and report errors.
Christian Schwarz [Sat, 18 Mar 2017 19:05:43 +0000 (20:05 +0100)]
Save Core settings synchronously and report errors.

Resolves GH-281.

7 years agoAssert Settings backing store is writable if core is unconfigured.
Christian Schwarz [Sat, 18 Mar 2017 19:03:57 +0000 (20:03 +0100)]
Assert Settings backing store is writable if core is unconfigured.

7 years agoFix an issue in the .gitignore
Janne Koschinski [Thu, 16 Mar 2017 21:07:01 +0000 (22:07 +0100)]
Fix an issue in the .gitignore

Resolves GH-279.

7 years agoUpdated gitignore to ignore files generated by JetBrains IDEs
Janne Koschinski [Fri, 17 Mar 2017 17:34:26 +0000 (18:34 +0100)]
Updated gitignore to ignore files generated by JetBrains IDEs

Resolves GH-280.

7 years agoFix handling systray notifications
György Balló [Thu, 16 Feb 2017 07:41:08 +0000 (08:41 +0100)]
Fix handling systray notifications

Only toggle/activate the main window if the notification message comes
from quassel.

This fixes the problem that Quassel's main window is opened when the
user clicks on any notification bubbles from other applications.

Resolves GH-272.

7 years agoFix expanding networks in Chat Monitor settings
Shane Synan [Sat, 14 Jan 2017 20:54:53 +0000 (14:54 -0600)]
Fix expanding networks in Chat Monitor settings

Update the network expanded/collapsed state when setting a model,
including filtered models.

This fixes the Chat Monitor settings page not updating the expanded
and collapsed networks on first load.  It might be excessive to apply
on every model change; if performance issues arise, it can be moved
to BufferView::setFilteredModel() or elsewhere.

Add comments!

Resolves GH-271.

7 years agocommon: Don't return a bool from main()
Manuel Nickschas [Thu, 13 Apr 2017 20:01:30 +0000 (22:01 +0200)]
common: Don't return a bool from main()

gcc now warns about this (rightfully).

7 years agoShow timestamp format tooltips when core supports
Shane Synan [Sun, 8 Jan 2017 19:30:38 +0000 (13:30 -0600)]
Show timestamp format tooltips when core supports

Only change tooltip for away messages when supported by the core.
Restore original tooltip and concatenate together to reuse existing
translations (can be split apart if not a good idea).

Add new feature flag "AwayFormatTimestamp" to indicate when the core
supports parsing timestamp formats in away messages.

This isn't strictly required and if needed can be left out.  It just
might be confusing for the UI to say you can do something.. and it
doesn't work.

Resolves GH-270.

7 years agoUse timestamp format for manual away, not restore
Shane Synan [Sun, 8 Jan 2017 22:52:38 +0000 (16:52 -0600)]
Use timestamp format for manual away, not restore

Apply the timestamp formatting to manual /away commands, too.  This
offers consistency between the auto-away settings and manual away.

Add skipFormatting flag to handleAway/issueAway commands to skip
applying timestamp formatting.  This avoids re-processing timestamp
formatting when restarting the core, leaving any '%%' as '%%'.  The
message should already be processed once stored.

More comments!

7 years agoHandle multiple timestamp formats, escape code
Shane Synan [Sun, 8 Jan 2017 22:53:06 +0000 (16:53 -0600)]
Handle multiple timestamp formats, escape code

Move search and replace into a loop to handle multiple timestamp
format strings.  Include a limit on maximum number of iterations to
avoid any potential infinite loops (512 ought be enough for anybody).

Add check for empty %% group to allow using '%%%%' as '%%', two
literal percent signs.

Comments!  Document all the things.

Examples:
All Quassel clients vanished from the face of the earth... %%hh:mm:ss%%
> All Quassel clients vanished from the face of the earth... 23:20:34
Away since %%hh:mm%% on %%dd.MM%% - %%%% not here %%%%
> Away since 23:20 on 21.05 - %% not here %%