summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2017-03-29Initialise timerId member in QtGridSelectionDialogTobias Markmann
Coverity raised this issue. Test-Information: All unit tests passed on macOS 10.12.4. Change-Id: Id65cdc5e0175ba7773d32b6dddbc9b4af6789019
2017-03-29Remove nullptr checks that are not neededTobias Markmann
One must pass a valid AvatarManager instance to the MUCController. Asserted the fact at the beginning of the actor. Coverity raised this issue. Test-Information: All unit tests pass on macOS 10.12.4 and Swift client can join MUC conversations without crashing or other noticeable issues. Change-Id: Ibc643f907a31fd1253c63c9a4cef79407d1f96ec
2017-03-28Modified XMLBeautifier to handle split payloadsJoanna Hulboj
When receiving network data we were processing it in chunks. Sometimes one XML message got split across multiple chunks. XMLBeautifier was stateless and would create a new parser for every single chunk. This was causing multi-chunk messages to be truncated in the beautified output. The change I made in XMLBeautifier allows it to maintain the state. Test-Information: Tested unger Windows 10 and CentOS. Unit tests pass OK. Change-Id: Idad2a8e0248ed3cbe2b47a12718b909e56ac1279
2017-03-23Add Client State Indication Element, its Parser and SerializerTarun Gupta
License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details. Test-Information: Adds tests for Client State Parser and Serializer, which passes. Tests performed on Ubuntu 16.04 LTS. Change-Id: I60c63f63e1c0fdd55600ef42faa95989ca5ab75b
2017-03-21Fix #43 : Add LinuxMint to supported distrosBarun Parruck
Test-Information: Built on LinuxMint 18 with Qt 5.5.1 successfully. License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details. Change-Id: Ibbe234937e1c1d58080236833f1c3a6cf08ebf8f
2017-03-15Add link to https://swift.im/ to about dialogTobias Markmann
In addition, fix display of Swift icon in about dialog. Test-Information: Build on macOS 10.12.3 with Qt 5.4.2 and verified that the icon is display in the about dialog and clicking the link opens the Swift website in the default browser. Change-Id: If13e03bfa976354aeba1de9be4bcb1edabaa5403
2017-03-15Add automatic man generation to the Linux build for SwiftJoanna Hulboj
Test-Information: Tested under CentOS. Run script to generate a package under Linux, swift-im.1 and swiften-config.1 are generated. Change-Id: Idf0b159a94e05349b196f019bbc91127095a1d16
2017-03-15Do no emit onXMPPDataRead when the session is terminatedTobias Markmann
On a bosh error BOSHSessionStream, posts an event to the event loop that closes the XMPP stream. If onXMPPDataRead is emitted, that data is handled before the close of the stream though, which can cause another BOSH request to be sent. Test-Information: Added a unit test verifying the behaviour. Wrote a custom python script replicating the original error and verified that Swift does not stay connected on a BOSH error with additional text data. Tested on macOS 10.12.3 with recent clang trunk. Change-Id: Ie90099afa0934707a6758b00706a65227ceb48b8
2017-03-14Show correct avatars for file-transfer messagesTobias Markmann
Previously we simply showed our default avatar. With this change we will use the same avatar as we use for normal chat messages. Test-Information: Tested on macOS 10.12.3 with Qt 5.5.1 by exchanging files between two Swift instances. Change-Id: I20b953a67a290820900b5b35861c1e17f72148bd
2017-03-14Fix incorrect default chat view font sizeTobias Markmann
A chat font size value of 2 represents the native default font size on the system, which should be the default font size for the chat view on first install. We allow this to be reduced to 0 and increased without a limit. Furthermore the settings key was changed so that Swift 3 users will automatically use the default size when they first open a newer Swift. Test-Information: Tested on Ubuntu 16.04.02 after clearing the local Swift config. Change-Id: I3426001eb302e22134c40bc4a479f15684ca2001
2017-03-14Fix default avatar rendering on WindowsTobias Markmann
Swift installed from our Windows installer packages would not display the default avatar, due to missing Qt5Svg module. Test-Information: Build Windows installer package on Windows 8, with VS 2013 and Qt 5.4.2. Qt5Svg.dll is installed and default avatars are displayed in the roster. Change-Id: Iaa0fb0b013fc32d9d84897e83902ae7487fe72d7
2017-03-13Add LogSerializer for BOSHErrorTobias Markmann
Test-Information: Tested and used it during a recent debugging session on macOS 10.12.3 with recent clang. Change-Id: Ia4883a69a94f962006a39b294d6b9b67e0990541
2017-03-08Use standard algorithm instead of custom codeTobias Markmann
Test-Information: Builds on macOS 10.12.3 and unit tests pass. Roster filtering still works and does not crash in an ASAN-enabled build. Change-Id: I545a582b003cd0c15dff43b73b0922dcbf4055af
2017-03-07Use text-based emoticons on Linux and WindowsTobias Markmann
The new unicode-based emoji dialog currently only provides a good experience on macOS. This commit enables the unicode-based emoji dialog on macOS and uses the text-based emoticons on Linux and Windows. Test-Information: Tested on macOS 10.12.3 with Qt 5.5.1 and Windows 8 with Qt 5.5.1. Change-Id: Ibee20eacafa5788bcdf5a46e1ceac713a28a0383
2017-03-07Do not color highlight mentions of the own nickname by defaultTobias Markmann
In the default highlight configuration, mentions of the own nickname should only cause a notification sound and a system notification. Test-Information: Tested mention notifications in a test MUC room and verified that only sound and system notifications are issued in the default highlight configurations. Tested on macOS 10.12.3 with Qt 5.5.1. Change-Id: I44a276ab740d7495930c935a89a2ef81219e24df
2017-03-07Do not highlight in own room join system messagesTobias Markmann
Test-Information: Tested by joining a MUC room and verified that the ‘You have entered room foo as bar.’ message does not contain any highlights. Tested on macOS 10.12.3 with Qt 5.5.1. Change-Id: Ib830d081e74c4289be4bb1469bf005a2e4c4e298
2017-03-06Fix emoji dialog crash when there are no recent emojisTobias Markmann
The dialog would crash if the user has not selected an emoji ever before through the dialog. Test-Information: Cleared recent list and opened the dialog. Without this patch it would crash, since there are no items in the emojiLayout. Now it does not crash anymore, on macOS 10.12.3 with Qt 5.5.1. Change-Id: Ie736b5af7fe8b2b2c14fcac94b7e4f3bc13f4b84
2017-03-03Allow pasting a newline separated list of JIDs in blocking dialogTobias Markmann
Furthermore the dialog will alphabetically sort the list of blocked JIDs before showing it in the dialog. Test-Information: Tested on macOS 10.12.3 with Qt 5.7.1 that it sorts the list it receives from the server before presenting it in the UI. Successfully pasted a newline spereated list of JIDs in the dialog. Change-Id: I8fe6969821bccad0193180cee9433da43285aaef
2017-03-03Change Enter Room... QWidget to QDialogJoanna Hulboj
Test-Information: Tested under Linux i3 tiling windows manager. Run Swift, from the menu choose Actions, Enter Room... Enter Room... dialog is displayed as a floating window in a tiling manager. Change-Id: I31dc4f8caa04fe137e89f2bcb12852cd0b709bab
2017-03-03Do not clear join/leave queue for MUC rooms on CSN messagesTobias Markmann
Previously chat-state notification messages would cause the join/leave queue of a MUC room to be cleared, resulting in taking up more vertical space than it had to. Test-Information: Compared two Swift builds (one with this patch and one without) in a room where some occupants would send CSN messages from time to time. With this patch, a CSN message clearly does not cause the join/leave queue to be cleared. Added unit test to verify new behaviour. Tested on macOS 10.12.3 with Qt 5.7.1. Change-Id: I0aee733fa5d16bbfb497a17b3d7a3ffe3fea8f26
2017-03-02Fix keyword highlights not issuing system notificationsTobias Markmann
Adjusted the MUCController tests accordingly, as self-mentions in group chats have been case insensitive and are now case sensitive. Test-Information: Tested on macOS 10.12.3 with Qt 5.7.1, that with a highlight rule for the ‘Swift’ keyword, a system notification is generated when the app is inactive. Change-Id: I325b682c5afa81e05eec8cf3a8a15b2ff0303e5c
2017-03-01Remove support for selecting custom notification soundsTobias Markmann
Test-Information: Tested on macOS 10.12.3 with Qt 5.7.1 that the custom sound menu item was gone. Change-Id: I75186d1a3b74db751fbdd5aaf54402f23f74661b
2017-02-28Do not reset font size when clearing chat viewJoanna Hulboj
Test-Information: From Swift open any chat window, type something, right click on chat view and increase font size 3 times, then right click on chat view and choose Clear. Chat log in a view will be cleared, again type something the form size stays the same as before clearing the log view. Change-Id: I8c057dbd4ed52e5d1efce7064d79b9f7244b3d32
2017-02-27Handle boost::bad_lexical_cast exception in HostAddressPort::toString()Tobias Markmann
Test-Information: Builds and unit tests pass on macOS 10.12.3 with Qt 5.7.1. Change-Id: I258ea7a70a025bc0ebf61eea7acd636e90fc8b1e
2017-02-27Redesign highlight logic and processingTobias Markmann
The new highlight logic follows a simpler model. It supports: * highlighting of whole words in a message * highlighting messages by sender name * highlighting if the user’s name is mentioned Possible actions for these highlights are text colouring, sound playback of WAV files, and system notifications. In addition the user can decide to receive sound and system notification on general incoming direct and group messages. Redesigned the highlight configuration UI dialog for this new model. ChatMessageParser class now deals with all parsing and marking up the chat message with the matching HighlightActions. Highlighter class has been extended to deal with all sound and system notification highlights that should be emitted by a specified chat message. Moved some tests over to gtest in the process. Test-Information: Tested UI on macOS 10.12.3 with Qt 5.7.1. Manually tested that correct system notification are emitted on mentions, keyword highlights and general messages. Added new unit tests to cover new highlighting behaviour. Change-Id: I1c89e29d81022174187fb44af0d384036ec51594
2017-02-24Add Sparkle license to about dialog COPYING file on demandTobias Markmann
If scons detects a Sparkle release in the 3rdParty folder, it will add the containing LICENSE file at the end of the dynamically generated COPYING file. Test-Information: Tested that the contents of Sparkle’s LICENSE file are at the end of the text in the license window of the about dialog, if the Sparkle folder, with a Sparkle release inside, is present in 3rdParty. Tested that Swift builds fine, if the Sparkle folder is missing in 3rdParty. Change-Id: I89db155b5bb3eef4d632997fd99ff270b4720a16
2017-02-24Fix sorting of emoji categories in the emoji dialogTobias Markmann
This also changes the minimal height of the emoji dialog to hold about 8 emoji rows. Test-Information: Tested on macOS 10.12.3 with Qt 5.7.1 that the categories are sorted in a more sensible manner and that the dialog at least shows about 8 emoji rows. Change-Id: I8c5518f8d552a581d5073b5f155425580f72938a
2017-02-24Use FlowLayout instead of QGridLayout in QtEmojiGridTobias Markmann
FlowLayout is an official BSD-licensed Qt example showing how to implement custom layouts. It will layout items dynamically in rows. This way we don’t need static column/row calculations for QGridLayout and it looks better. Test-Information: Build and ran on macOS 10.12.3 with Qt 5.7 to test that it has a better, less spacious look. Change-Id: Ief1299b0d3fb1e516a1973469f4f9a26824942f2
2017-02-24Remove ‘regional’ category from emoji dialogTobias Markmann
Test-Information: Build and ran on macOS 10.12.3 with Qt 5.7.1 and verified the ‘regional’ category was gone from the dialog. Change-Id: I664d5b8600037b42453c12ea0f180d0acd29361f
2017-02-23Change the logic of displaying chat room subjectJoanna Hulboj
Test-Information: Run Swift and join any MUC room, on join there is no information displayed regarding room subject. Choose "Change subject", the following information is displayed in the chat window: "The room subject has been removed" after the subject was removed, or "The room subject is now: some subject" after the room subject was set to "some subject". Run Swift join any MUC room, disconnect from server (using another Swift client change subject to "Test") after reconnecting the following information is displayed in chat window: "The room subject is now: Test" Change-Id: Ice901697a6a381464d694147b17830b4e62c8198
2017-02-23Fix crash in Swift about dialog if build w/o auto update supportTobias Markmann
Test-Information: Previously Swift crashed on QtAboutWidget.cpp:175 when build without any auto update support. Now it does not anymore. Tested on macOS 10.12.3 with Qt 5.5.1. Change-Id: Ia58ec3679d107cfd6b736e54e90a4167cf1adc47
2017-02-23Disconnect signals in ComponentSessionStanzaChannel dtorTobias Markmann
This is similar to what is currently already done in the dtor of ClientSessionStanzaChannel. This should fix potential crashes that have been reported in Sluift with ASAN enabled, showing a heap-use-after-free in ComponentSessionStanzaChannel::handleSessionFinished. Test-Information: All unit tests pass successfully on macOS 10.12.3 with clang-5.0. Change-Id: Id1e95894f9d5fe85922c0e11d18a38d46bd08e3c
2017-02-22Fix double entries in MUC participant lists after merging nicksJoanna Hulboj
Test-Information: Tested using Psi and Swift. Log in to Psi and Swift as UserOne. Enter Room (e.g. testRoom) using Swift and join the same room from Psi using drop down menu Join Groupchat. Splitting: change nick from UserOne to UserTwo. Swift correctly displays: UserOne, UserTwo. Merging: change nick back from UserTwo to UsetOne. Swift correctly displays: UserOne. Change-Id: I291eddd5aed154fb0babe1b0ada0a15a317eacdb
2017-02-22Cache some recently used entity capability lookups in memoryTobias Markmann
Previously any entity capability lookup was only cached on the disk. This meant that even for a cache hit, you would read from disk and parse the disco info XML in the cache, to return the result. This commit adds an addition LRUCache based in-memory cache. This extends the EntityCapsProvider API with a non-const method, i.e. getCapsCached, which allows active caching of results from the disk cache. Test-Information: All unit tests pass on macOS 10.12.3. This noticeably speeds up the duration of a join of a large MUC room, i.e. about 160 occupants, to about half of the previous duration. Change-Id: I0fc254cda962860416713822ddcad15ae13085f1
2017-02-22Improve Swift about window regarding auto update UXTobias Markmann
The dialog will automatically initiate a check for updates when opened. It will show the current state of the auto updater backend, e.g. whether it is downloading or already at the latest version. This also fixes update channel selection being shown on Windows and Linux. Test-Information: Ran Swift and opening the dialog shows a short progress bar indicating it checking for updates. Afterwards it shows that it is already running the latest version, which is sensible for a dev build. Change-Id: Ie08cd2a8852e468d6007122604b532fedc24bcfe
2017-02-22Add LRUCache utility class to SwiftenTobias Markmann
This implements a simple lookup cache with least recently used replacement strategy. This also adds Boost.MultiIndex from version 1.56 to 3rdParty. Test-Information: Added some unit tests for LRUCache, which pass on macOS 10.12.3 with clang-5.0 Change-Id: I0567945b1197d3fe786bf9d82fdb5e755743b975
2017-02-21Add checks to verify if the input data is a valid XML/XMPPJoanna Hulboj
Test-Information: Unit tests pass OK. Change-Id: Ibd7897c1c1249af7ac60a6549afd4c2362fcf0c0
2017-02-21Improve README.md regarding Windows build instructionsTobias Markmann
Described 64-bit Windows build and the QtWebKit situation for Qt 5.7 and later. Test-Information: None. Change-Id: I33740e81c27b2dddbd00f058e49c18fefed75843
2017-02-20Add alternative zoom shortcuts on macOS and workaround Qt bugTobias Markmann
This adds the Ctrl + Minus and Ctrl + Equal shortcuts for zoom out and zoom in respectively. In addition, this commit provides a workaround for QTBUG-56571. Test-Information: Tested on macOS 10.12.3 with Qt 5.7.1. Tested with German and UK keyboard layout. On UK layout both shortcuts, Ctrl + (+/-) and Ctrl + (=/-) work. On German layout only Ctrl + (+/-) works. Change-Id: Ifbcab308c9a8f4c88b51978969c73c3c1138a9ba
2017-02-20New Unicode Emojis DialogThibault Meunier
The new selector behaves like the old one. However, selection of an emoji results in the corresponding UTF-8 sequence to be inserted into the input widget instead of a ASCII emoticon. The code is based on the Emojione library which is MIT licensed. Emojione provides a mapping from shortnames to relevant Unicode codepoint, as well as mappings from textual emoticons (e.g. ). This commit does not modify the existing emoticon parser and so does not include any ability to enter emojis via text entry. The part of the Emojione library required to generate the mappings in C++ is included in this patch, specifically the emoji.json file. It is used to generate a corresponding .cpp file. Mapping code can be generated as follows: * cd BuildTools/EmojisGenerator/ * (optional) update emoji.json from https://github.com/Ranks/emojione/blob/master/emoji.json) - Version used with this commit: ba845a7 * npm install * node generate.js Test-information: General * Click the emoji button opens the selector * Change tab * Click an emoji and check it appears correctly * Click outside emoji dialog hides it Emojis * Emojis are well printed on macOS with Qt 5.7.1 * Emojis are black/white on Windows 10 with Qt 5.7.1 * Emojis have the right tooltip (when mouse is hover) * Check emojis are rendered appropriately by the receiving client Tabs * Tabs have the right tooltip * Click an emoji adds to recent tab * Emojis in the Recent tab are ordered by last click date (with a maximum of 50 "recent" emojis) * Recent emojis are saved in the QtSetting under "recentEmojis" Change-Id: Ibd07b8713d6272da6a8a4c9c35ddf866473f662b
2017-02-16Remove redundant UIEventStream* member from (MUC|Chat)ControllerTobias Markmann
Clang’s -Wshadow-field rightfully complained about it. Test-Information: Builds on macOS 10.12.3 with clang5 and Qt 5.7.1. All unit tests passed. Change-Id: Ib0705d518298e666c73d84150a043688a9d925ce
2017-02-14Sluift: Add shortcut for get disco_infoRoger Planas
So instead of doing something like this local features = client:get({ to = to, query = "<query xmlns='"..sluift.disco.features.DISCO_INFO.."'"..node.."/>" })['features'] we can now do something like this local features = client:get_disco_info({ to = to })['features'] That is, avoid raw calls. Test-information: Updated test calls to use new API and noticed no different behaviour to old code. Change-Id: I0d9a7c25c0f56499487f8aa0e67e30e9fa1b56ac
2017-02-10Display error message in profile window if vCard request failedTobias Markmann
Also fixed an typo error in GConfProxyProvider.cpp that prevented compilation on Linux. Test-Information: Tested with an XMPP server with vCard support disabled and also with vCard support enabled. Tested profile window and profile editor window. The profile window will show cached vCard data if present and the error message. The profile editor window will only show the error message in case of an error. Tested profile window and profile editor window in a scenario where vCard support is first enabled in the server, then disabled, and finally enabled again, and opening the editors in between. Potential error messages were always correctly cleared before showing the dialog. Tested on macOS 10.12.3 with Qt 5.7.1. Change-Id: I3958c35286f6f0096d1605c29816f666530aae03
2017-02-09Fix mouse movement when resizing trellis layout.Joanna Hulboj
Test-Information: From view menu choose "Change Layout", move mouse to resize trellis. Trellis resizing works fine. Change-Id: I112c0bd84dc57abb3bb95f825f74b2efa1f8e183
2017-02-09Update GConfProxyProvider to new string to HostAddress functionTobias Markmann
This change was missing in commit 43479ef. glib is automatically initialised nowadays and g_type_init() is a deprecated function. Surrounded the relevant code with a GLIB_CHECK_VERSION macro. Test-Information: Tested build on Ubuntu 16.04.1 LTS. Change-Id: Iea7242f6366d827b2cc6ce355cb923872f774a6c
2017-02-07Remove trusty and add yakkety to package_all_platforms.shTobias Markmann
Test-Information: None. Change-Id: Iaa0bad47c104b9407329d69329f3409af0d62e6d
2017-01-31Sluift: Add client methods for adding and removing JIDs from blocklistRoger Planas
A previous commit added a get_block_list() client method to retrieve the list of blocked items. This patch extends that and adds capabilities to add and remove items to such list. Test-information: Tested with client and was able to successfully add items to list, delete and delete all Also tried to delete a non existing item and it rightly complained. Change-Id: Iabbfdbd9e74ddc9740db5c9871b8355210aa0727
2017-01-27Sluift: Add handling of block/unblock eventsRoger Planas
Swiften handles blocklist event notifications, but those were not passed to Sluift, so a Sluift client, when querying events, would not be aware if an XMPP server pushes block/unblock. This patch adds an extra event type to Sluift so that method for_each_event reports block/unblock notifications, in addition to a new API 'get_block_list' to retrieve the blocklist from the server. Test-information: Used Sluift client to retrieve blocklist and it is as expected. Also used client to retrieve all items after adding, removing and removing all items in the blocklist, and Sluift clients can now see these events. Change-Id: I0b76289ebd9e63505ff8a99cd9c0aa0e93af0c22
2017-01-18Set cursor position to the center of the screen to show layout window in the ↵Joanna Hulboj
middle of the screen Test-Information: Tested with multiple screen setup. Tested only on Windows. From view menu choose "Change Layout", the layout window appears in the middle of the screen. Change-Id: Iab4ba64d54766426be39926773aa5b5bb628b9e9
2017-01-17Add Qt bin path to SCons process' PATH environment variableTobias Markmann
Test-Information: Tested scons dist=1 successfully on Windows 10 with Visual Studio 2015 and Qt 5.7.1. Change-Id: I41271f10367249e2e89fdba85f1d5c5305c548ff