summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
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
2017-01-16Prevent cursor from jumping to the wrong position when using Change Layout ↵Joanna Hulboj
dialog Test-Information: Tested only on Windows with two monitors. Tested by opening Swift App on the first screen, next choose View->Change Layout, mouse cursor appears correctly on Change Layout dialog, next move Swift App to the second screen choose View->Change layout, mouse cursor appears correctly on Change Layout dialog. Change-Id: Ibb3e2ca1de6bcdb620104ff6b0940005ab85a827
2017-01-11Integrate googletest and googlemock libraries to 3rdPartyTobias Markmann
googletest and googlemock from release 1.8.0 have been copied to the 3rdParty folder. With this commit tests for Swift project can also written using googletest and googlemock APIs. The test runners will execute test suites written to either test library. Passing —-xml to a test runner will now create two test report XML files, namely $programName-report.cppunit.xml and $programName-report.gtest.xml. The ByteArrayTest has been converted to use googletest instead of googlemock to serve as an example and test the integration. Test-Information: Build all tests via ‘./scons test=all’ and verified all tests are run. Build all tests via ‘./scons test=all checker_report=1’ and verified that two report XML files are generated per test runner executed. Change-Id: I81a9fb2c7ea5612fc1b34eef70ed7e711bfeea81
2017-01-11Allow cancelling trellis resize window with escape keyJoanna Hulboj
Test-Information: From view menu chose "Change Layout". Cancelled the trellis resizer using Escape. Change-Id: I82e196f813cf34db9b50d812ce0597975432869f
2016-12-16Add missing libqt5svg5-dev to debian/config.inTobias Markmann
Test-Information: Tested this manually on our Debian builder. With this fix it stops complaining about missing Qt packages. Change-Id: I5fb25714f7e1b726f893f9475fded17c36677cef
2016-12-15Merge branch 'swift-3.x’Tobias Markmann
* swift-3.x: - Fix building Swift on 32-bit Linux distributions - Remove optional_fwd.hpp use; workaround for Boost Bug #12179 - Split COPYING.thirdparty in contributions/dependencies - Fixes for building packages on Debian Conflicts: BuildTools/SCons/SConstruct Sluift/Console.h Sluift/ITunesInterface.h Sluift/Terminal.h Swift/Packaging/Debian/debian/control.in Swift/QtUI/SConscript Swiften/Elements/Stanza.h Swiften/FileTransfer/FileTransferTransporter.h Swiften/FileTransfer/IBBReceiveSession.h Swiften/JID/JID.h Swiften/Network/BoostConnectionServer.h Swiften/Network/ConnectionServer.h Swiften/Parser/AttributeMap.h Test-Information: Builds on macOS 10.12.1 with clang trunk. Change-Id: I9f41ab199f227bc106721627ea994313c68e5cfe
2016-12-09Fix overly bright rendering of status text in contact listTobias Markmann
Instead of adjusting the color lightness for the second line, the new code just draws the second line with 70% opacity. This provides a more consistent and predictable effect. Test-Information: Checked rendering of available, away, and busy contact rendering on macOS 10.12.1 and Windows 10. Change-Id: I417b80bdf8ea01db7a6e0e680b488d6a52c297dd
2016-12-09Do not emit windowClosing signal in QtTabbable dtorTobias Markmann
Instead, handle the QCloseEvent and emit the windowClosing signal there. This is an attempt to fix a crash I am unable to reproduce but which crash stack includes the signal emit in ~QtTabbable. Test-Information: Builds on macOS 10.12.1 with clang master. All unit and integration tests pass. Manual login and close of Swift worked without a crash. Change-Id: I470f3c5362fd0f502c542560854424e87fc0727e
2016-12-09Improve documentation of code related to impromptu chatsTobias Markmann
Test-Information: Builds and all tests pass on macOS 10.12.1. Change-Id: I58ca7ba27736d27426350f636dfe910f4f2f1b17
2016-12-09Fix issue with invites to MUC if a MUC PM for that room is openTobias Markmann
Previously if you wanted to invite people to a MUC and had a PM window for a MUC occupant open at the same time, the InviteToMUCUIEvent would be handled by the PM window, by the ChatController of the PM window and not the MUCController of the MUC window. Test-Information: Verified that some scenarios work correctly: - Tested a drop to a MUC window while a MUC PM window is open to an occupant in the MUC. Previously this crashed due to ChatsManager::localMUCServiceJID_ being empty. - Test that impromptu MUC creation to a normal chat works. - Test that impromptu MUC creation to a MUC PM chat works. All unit and integration tests pass on macOS 10.12.1. Change-Id: Ib20de7e925e3503308211936ee47d4ba829d0394
2016-11-30Show MUC PM item-not-found error in MUC PM windowTobias Markmann
Previously, if one would send a MUC PM to a user that has left a room the error response from the MUC would be shown in the MUC room. Now the error will show in the MUC PM window, if the MUC PM full JID has a ChatController. Test-Information: Added unit test verifying new behaviour. Manually verified that the error is shown in the MUC PM window instead of the MUC room window. Change-Id: I1b259d5eee9e22217bbe7e5c09294d2166a77895
2016-11-28Correctly handle server initiated closing of streamTobias Markmann
If a server closes the XMPP stream, it sends a </stream:stream> tag. The client is supposed to respond with the same tag and then both parties can close the TLS/TCP socket. Previously Swift(-en) would simply ignore </stream:stream> tag if it was not directly followed by a shutdown of the TCP connection. In addition there is now a timeout timer started as soon as Swiften or the server initiates a shutdown. It will close the socket and cleanup the ClientSession if the server does not respond in time or the network is faulty. Refactored some code in ClientSession in the process. Moved ClientSession::State to a C++11 strongly typed enum class. This also fixes issues where duplicated </stream:stream> tags would be send by Swift. Test-Information: Tested against Prosody ba782a093b14 and M-Link 16.3v6-0, which provide ad-hoc commands to end a user session. Previously this was ignored by Swift. Now it correctly responds to the server, detects it as a disconnect and tries to reconnect afterwards. Added unit test for the case where the server closes the session stream. Change-Id: I59dfde3aa6b50dc117f340e5db6b9e58b54b3c60
2016-11-23Fix building with Avahi support on LinuxTobias Markmann
This was broken in commit 43479ef. Test-Information: Build with Avahi support on Ubuntu 16.04.1. Unit tests passed. Change-Id: If7ee5f740510956d89f6c406e68b92ddeb61cf85
2016-11-23Migrate remaining Swiften/Base/foreach.h use to range-based for loopTobias Markmann
Test-Information: Build on macOS 10.12.1 and all tests pass. Change-Id: Iedaa3fa7e7672c77909fd0568bf30e9393cb87e0
2016-11-22Add missing dependency for Debian unstable/sid in control.inswift-3.xTobias Markmann
Test-Information: Ran package.sh on Debian unstable/sid. Without this fix, building in package.sh failed due to missing zlib header files. With this patch it complains about missing zlib1g-dev package, and after installation of it successfully builds Swiften/Swift. Change-Id: I9babcd1a5f9e21c01b9c6e9a51a80200d7998538
2016-11-18Add scons options forcing for bundled Boost, libminiupnpc, libnatpmpTobias Markmann
Test-Information: Build Swiften on Debian 8.6 with all installed dependencies with and without passing these new options to scons. Either case built fine. Change-Id: I4867c0479a0d44b15e12918c5075e9039945ed95
2016-11-18Improve string to HostAddress conversion APITobias Markmann
Previously HostAddress had a constructor which allowed initialisation via a std::string. This initialisation can fail and this is heavily used for checking whether a string is a valid IP address. This constructor is removed in this commit and replaced by a static method HostAddress::fromString, taking a string and returning an optional HostAddress. This clearly communicates that the conversion can fail. Test-Information: ./scons test=all passes on macOS 10.12.1. Change-Id: Idaafee6f84010ce541c55f267ac77ad6ac8f02b4
2016-11-17Fix typo in update feed selection dialogTobias Markmann
Test-Information: None. Change-Id: I6a734918b48e512726344d5812642473067e40a9
2016-11-17Fix version strings generated by GenerateAppCastFeeds.pyTobias Markmann
Check for updates on start. Test-Information: Manually verified a random sample of 50 Swift version string pairs, that Sparkle currently compares them and detects the new version. Change-Id: Ic88a5fdc5feab42cdcb4cc3c2740d4c24718eb7b
2016-11-16Add output folder option to GenerateAppCastFeeds.pyTobias Markmann
Test-Information: Verified that the tool writes to the specified output folder on macOS 10.12.1. Change-Id: I91157dda1031632c1e536ae6b509f08a69dce6c3
2016-11-16Update GenerateAppCastFeeds.py according to recent discussionsTobias Markmann
The script will now take stable/testing releases from the …/downloads/releases path using per-release folders inside, and only dev builds from the …/downloads/development/mac path without per-release folder. Test-Information: Ran the script on macOS 10.12.1 on a mirror and verified that it generated the correct feeds. Change-Id: I9b2f5780cfcdafb64d0d75d1483643b522ea7bb2
2016-11-14Add script generating Sparkle appcast feedsTobias Markmann
This Python script parses the folder structure of Swift downloads locally and generates three appcast feeds to use for Sparkle updater. The three appcast feeds are written to the downloads folder supplied to the script. Test-Information: Ran script with Python 2.7.12 and manually checked the output. Change-Id: Ie1e71eecad4f65e48694b805878765806a3465ae
2016-11-11Add update channel configuration dialog to the about windowTobias Markmann
If software updates are enabled the about dialog will show the currently configured update channel and provides a link to a dialog to change the update channel. Test-Information: Builds on macOS 10.12.1, unit tests pass, and dialogs behave as expected. Did not test Sparkle updating. Change-Id: I05d5014f0d719ba9b2146c1e599db4f7fde80558
2016-11-10Move Qt specific setting constants to QtUISettingConstants.hTobias Markmann
Test-Information: Builds on macOS 10.12.1, ./scons test=all passes, Swift successfully logins and remembered Trellis configuration. Change-Id: Id94d6af1448d44d7d46ba2b8606f3e5ebe98be7a
2016-11-10Use FeatureOracle to detect file-transfer support in rosterTobias Markmann
The FeatureOracle provides tri-state feature lookup functionality for bare JIDs. It returns Yes if a feature is supported by all resources of the bare JID, Maybe if some support it, and No if none of the resources support it. If passed a full JID, it returns the specific features supported by that end-point. Sending a file to a bare JID, will send a file to the resource of the bare JID with the highest availability by presence, show status and priority and which supports the features required for a Jingle file-transfer. Test-Information: Added unit test verifying new behavior. All tests pass on OS X 10.11.6. Added new unit tests for FeatureOracle. Manually verified that the roster and chat window both use the same mechanism to detect support for file-transfers. Manually verified that file-transfers via the contact list goes to already bound full JIDs if there is an existing ChatController. Change-Id: I0175ac42ecb73f1d54f9c96ffbba773eb5e24296
2016-11-07Sluift: Added Carbons element convertorsRoger Planas
Sluift was showing payloads coming from a carbon copied message as a series of dom payloads, which was not really usable. With these ElementConvertors, the payload is translated into a much more sensible table Also a minor update to both presence/message events, which now will report the 'to' as well. Seemed handy to have. Test-information: Carbons sent/received messages are formated into a meaningful table now. Change-Id: I5b8943636e09e5377bde76d16970c01df29164d6
2016-11-07Log address when failing to initialise HostAddress from stringTobias Markmann
Test-Information: Builds on macOS 10.12.1. Change-Id: Id06e66171cbc5b6417701a8de57b901b0d80f17c
2016-11-07Improve roster item readability for selected itemsTobias Markmann
Due to the style independent fixed text color for the status message of non-compact roster item, it was barely readable on Windows 7. This commit has the color for the status message in non-compact roster items depend on the used text color for the name. It uses a brightness adjusted highlight text color for the second line. Test-Information: Tested on OS X 10.11.6 with Qt 5.5.1 and Windows 8 with Qt 5.5.1. Change-Id: I41beb0f3eaede3f9413a39662c213a4e904bdd69
2016-11-04Change logging output to use SWIFT_LOGTobias Markmann
Test-Information: Builds on macOS 10.12 and unit tests pass. Change-Id: Icc1bce9a0e0e85377eef0c8b87bf82d37943d3a5
2016-11-04Provide explanation for empty trellis cells to userTobias Markmann
This shows a short descriptive text in empty trellis cells, that describes the current state to the user and suggests actions on how to get rid of the empty trellis cell, e.g. by changing the layout or moving chats to the empty cells. Test-Information: Tested with Qt 5.5.1 on macOS 10.12. Change-Id: Ibc7d3a327cf32b8a21304b37e79534773b5d3761
2016-11-04Cleanup headers in Base64(.h, .cpp)Tobias Markmann
Test-Information: Builds on macOS 10.12.1. Change-Id: Ifbaf78c4b95a4baac767667c7df367c6508a3e85
2016-11-01Explicitly synchronize chat view font sizes on font size changeTobias Markmann
Test-Information: Unit tests pass with Qt 5.7.0. Chat view sizes are synchronised on change. ASAN does not complain when opening/closing lots of chat windows and then closing Swift. Change-Id: Ib00260d2331f48f0ca3c47a2340311dcff85c5ed
2016-10-26Exclude the Notification Center code from iOS buildsGurmeen Bindra
Test-information: Build from Xcode for iOS works. Change-Id: I77f5333839d42dcb4dd4c0e62ffc0de6b5cb4131
2016-10-24Add missing check of QFile::open return value in about dialogTobias Markmann
Test-Information: Build successfully with Qt 5.6.1 on macOS 10.12 and opening about dialog, license window and change log window still works. Change-Id: I4a91b41f3848ee8049c179598b1b8e498d8ed35d
2016-10-24Reduce width of sidebar in chat theme; move time inlineTobias Markmann
The moves the timestamps from the sidebar into the message block to the right, after the nickname, floating right-aligned at the top of a message. This reduces the width of the sidebar. Test-Information: Tested with Qt 5.7.0 and QtWebKit TP4 on macOS 10.12. Tested MUC and 1-to-1 chat views. Tested last message correction UI behaviour. Change-Id: Ibd899e9017ac5654b3eb3fe909c9be1524d4b50b
2016-10-24Make avatar size relative to font sizeTobias Markmann
A recent change to web view scaling to have equal font sizes in and outside the web view cause the pixel sized avatars to be half the usual size. With this fix the avatar is as high as The the nickname plus the first line of the first message. Test-Information: Tested on macOS 10.12 with Qt 5.7.0 and QtWebKit TP4. Change-Id: I13e3c83fdb00e0dc9079c3ad5d6a380f6db5a499
2016-10-21Add delivery-warning SVG icon with a matching styleTobias Markmann
The delviery-warning.svg matches the style of delivery-failure.svg and delivery-success.svg. It is a yellowish circle with a white border and a white exclamation mark in it. Test-Information: Build and checked the new icon is shown when a message receipt is requested but no receipt is received. Tested on macOS 10.12 with Qt 5.7.0 and QtWebKit TP4. Change-Id: Ie715993eabd8f853ea0a6983645d7d89259f61a7
2016-10-21Fix package generation on macOS 10.12Tobias Markmann
This removes resource forks from our template disk image. Add custom InstallWithSymLinks command that does behave similar to the default env.Install command, however preserves relative symbolic links inside an installed directory. This is needed because the Sparkle.framework internally uses symbolic links and codesign utility fails if these links are replaced by copies of the original files. Test-Information: Verified dist=1 builds with and without code signing on macOS 10.12. Verified that on change of presence of the codesign_identity SCons argument or its value, a new package is build. If it does not change nothing is built again. Change-Id: Iade94811b7d608cb7520662e2820be3b128ee90b
2016-10-21Fix potential nullptr dereference in QtVCardWidgetTobias Markmann
Test-Information: Unit tests pass in ASAN-enabled build on macOS 10.12. Change-Id: I2dd2ab79e70b0613550fd0eacb739f50627a192f
2016-10-21Fix version number for libminiupnpc version switchTobias Markmann
Test-Information: Without this building failed under Gentoo Linux distribution. Verified this on Sabayon, a desktop Linux distribution based on Gentoo, by adding it to our cross distribution test. With this fix it builds on all platforms, including Sabayon. Change-Id: I23aec19b9755244dd3dbe6f581cf170eaf334dfc
2016-10-21Fix data-race in DummyEventLoop::processEvents()Tobias Markmann
Previously DummyEventLoop::processEvents() wrote to the hasEvents_ member without having locked the corresponding mutex. Changed code to use C++11 atomics instead. Test-Information: All unit tests pass on macOS 10.12. Change-Id: I13aa1566d55b7c0098f927e9c8061547f7056f5d
2016-10-21Use unique_ptr instead of manual deleteTobias Markmann
Changed the code to use range-based for loop were possible. Test-Information: Builds and unit tests pass on macOS 10.12 with Qt 5.5.1. Change-Id: I118aa4ac5887544a1b2d8fb6ee2910b44447467a
2016-10-20Add code-signing of macOS releases to Swift changelogsTobias Markmann
Test-Information: None. Change-Id: I2514d83fdec851db9874f2f0160493435e7240f8
2016-10-20Fix focus rect vanishing in trellis mode after sending a messageTobias Markmann
QtChatWindow was setting and resetting the Qt stylesheet for the chat input for message correction UI. This conflicted with the focus rectangle styling. Moved correction styling inside QtTextEdit which can handle focus rectangle and correction background styling together without overriding each other. On OS X, the native focus rectangle drawing, i.e. setting the Qt::WA_MacShowFocusRect widget attribute on the input, can not be used anymore, as it conflicts with setting the stylesheet for the correction background color. Test-Information: Tested message correction, trellis and security label UI on OS X 10.11.6 and Windows 8 with Qt 5.5.1. Change-Id: I0b771a2d47d5437512e870a9887b0b6e7262b359
2016-10-19Fix presence handling of own contact in rosterTobias Markmann
Previously, presence from your own full JID was not applied to your own roster entry. With this commit all presence changes are applied. Test-Information: Added unit test verifying new behavior. All unit tests pass on OS X 10.11.6. Change-Id: Ib93f487329aa1eec0e876857541780ff44b8cac9
2016-10-19Always add a fields table member in FormConvertorEdwin Mons
The fields member of the forms generated by FormConvertor is used for lookups in the __index metafunction. If a form is parsed with no fields (and possibly no items), there wouldn't be a member 'fields', causing another __index lookup, triggering infinite recursion. There will now always be a fields array, which may be empty. Sluift/Tests/FormTest.lua has been updated to test against an empty form. Test-Information: Updated FormTest.lua works without issues. Change-Id: Idee98f23bf42e1213ca3d03707f908ed5317dad6
2016-10-19Scale QWebView DPI resolution to match desktop DPI resolutionTobias Markmann
Test-Information: Tested that at 1em scaling, the default, the main text in the chat style has the same height as the nicknames in the roster. Tested with Qt 5.4.2 on macOS 10.12 on a retina system, with Qt 5.4.2 on macOS 10.12 on a non-retina system, and Windows 8 with Qt 5.7.0 with QtWebKit Technology Preview 4. Change-Id: I10701c411d9f787bf497eb6aab208a0f3fda621c
2016-10-18Auto extend copyright year in app bundles and fix copyrightTobias Markmann
Test-Information: Build Swift and verified that Info.plist inside Swift.app has the updated year and copyright on macOS 10.12. Change-Id: I84f921edf0b555a102dfb207d8fc3ee5f5f59eb9
2016-10-11Fix building Swift on 32-bit Linux distributionsTobias Markmann
Some distributions ship Qt configured so it requires your application to be build with the -fPIC flag. This adds a SCons check for this so the flag is automatically added if required. Test-Information: Successfully build Swift and ran unit tests on Ubuntu 16.04 (32 bit and 64 bit) and Debian 8.6 (32 bit and 64 bit). Change-Id: I8016bcb43fa36a3becf946ec179d74cdceb1d147
2016-10-05Add missing sensible asserts to testing and QtMainWindowTobias Markmann
Test-Information: Unit tests pass in ASAN-enabled build on macOS 10.12. Change-Id: I7a8dae7d06e5e1d3dc9391f9c9a342df384d90fc