summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
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-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
2016-10-04Handle boost::bad_lexical_cast exception in StatusCacheTobias Markmann
Modernised code to C++11 lambdas and range-based for loops, and cleaned up includes in the process. Test-Information: All unit tests pass with ASAN-enabled built on macOS 10.12. Verified recent status list is still loaded in Swift UI. Change-Id: I44fe09a079cfae15ed9fb2860e7352badedf6c1c
2016-09-30Change custom memory copy loop to std::memcpyTobias Markmann
Test-Information: Swift builds with test=all on macOS 10.12 and all tests pass. Change-Id: I9d7e8c49e65ac272a7ee672a95da5e24609d0a22
2016-09-30Add missing error check in HostAddress::toStringTobias Markmann
In the process converted try/catch use to Boost's error code for more explicit error checking and added log output. Test-Information: Swift builds with test=all on macOS 10.12 and all tests pass. Change-Id: I6e465354dbb38c7178b0406b9a544ebd3be62ddd
2016-09-30Only scale avatars that are not embedded Qt resourcesTobias Markmann
The default avatar is a embedded SVG which doesn't need to be scaled specifically. Test-Information: Builds on macOS 10.12 with Qt 5.6.1 and tooltip avatars are still shown without an error message being logged. Change-Id: I5aff38856e97dee9133b1daf9039cabc063dc01c
2016-09-29Fix uninitialised class membersTobias Markmann
Initialised previously uninitialised class members. Changed some raw pointers to std::unique_ptr for clearer and automatically initialised code. Test-Information: Builds on macOS 10.12 and unit tests pass in ASAN-enabled build. Change-Id: I7900fe6131119c228ca92c79c0ee8125137f2e48
2016-09-29Explicitly handle all possible SecTrustResultType enum valuesTobias Markmann
Test-Information: Unit tests pass on macOS 10.12. Change-Id: I32f884e2525b6200e5fb3f04d58f77304d16daa0
2016-09-29Fix potential resource leaksTobias Markmann
IDGenerator was missing the virtual keyword on its method which is reimplemented by SimpleIDGenerator. Some other classes were missing destructors or virtual destructors. Test-Information: Builds on macOS 10.12 with Qt 5.5.1, all unit tests pass. Change-Id: I482bc249578d38a922256d1fa5241515ce45d0c0
2016-09-29Support building against newer QtWebKit on macOSTobias Markmann
Test-Information: Tested with official Qt/QtWebKit 5.4.2 and Qt/QtWebKit 5.5.1. Tested with official Qt 5.6.1 and QtWebKit from https://github.com/annulen/webkit . Change-Id: I2b8258faec71296591095e998e61da55ba0ca67c
2016-09-27Add setting to disable automatic software updatesTobias Markmann
The automatic software update feature is enabled by default. Test-Information: Created system-settings.xml disabling the automatic software update feature and verified no Sparkle log output is produced, showing Sparkle is not initialised and run. Tested on macOS 10.12 with Qt 5.5.1. Change-Id: Ief1f4030505a2a3961ac18cd4774863584489727
2016-09-26Use const std::unique_ptr for pimpl idiom usageTobias Markmann
All our pimpl idiom usage used std::shared_ptr due to being written in C++03. Now we use C++11 and const std::unique_ptr is more sensible. Test-Information: Builds on macOS 10.12 and unit tests pass. Change-Id: I1b9b3fbb22e337d53ae71e5a5e03118998cc3376
2016-09-26Update and tidy up Sparkle software update supportTobias Markmann
Sparkle is configured to do silent automatic background updates based on the provide appcast feed. When a new update was downloaded and is ready to be installed Swift notifies the user that they can restart to take advantage of the newly available version. Test-Information: Setup a custom appcast feed with a newer Swift dev release. Tested updating with Sparkle 1.14.0 binary release using DSA keys and signatures. Did not test Sparkle update with code signed Swift builds. Tested on macOS 10.12. Change-Id: Idad461ec53963c80990e51a502cb6e28bc7b6b4e
2016-09-21Fix crash in Sluift CommandConvertorEdwin Mons
If a command table contained actions or notes, an extraneous lua_pushnil happened, leading to a crash. Test-Information: Rendering a command using to_xml with actions or notes now works as expected on OS X 10.11 Change-Id: Ic99b2546ac261edf6b52b92e63701f397fc6201a
2016-09-08Improve visibility of currently focused chat input in trellis modeTobias Markmann
The default focus indicator on the text input fields in chat windows becomes harder to notice in trellis mode as there are many similar looking chat windows visible at the same time. This change increases the visibility of the focus indication border on Windows and will enable the standard blue focus halo on OS X for focused chat inputs in trellis mode. Test-Information: Tested with Qt 5.5.1 on OS X 10.11.6 and Qt 5.5.1 on Windows 8. Change-Id: If9fe9edea6fef292bb99eabbb125c7a9ec20dcc2
2016-09-07Add ability to filter results in "Search Room" dialogTobias Markmann
This is implemented with the help of an implementation of QSortFilterProxyModel which filters room names based on a user search string. Test-Information: Tested on OS X 10.11.6 with Qt 5.5.1. Tested UX with different MUC services and search strings. Change-Id: I88085d089493008b2197a4aeb45d8c4d75724b9c
2016-09-07Explicitly set layout direction based on QT_LAYOUT_DIRECTIONTobias Markmann
This is supposed to happen automatically according to Qt documentation but it does not. Qt also changed the context of QT_LAYOUT_DIRECTION from Application to QGuiApplication. This commit adjusts our translations accordingly. Test-Information: Tested with Qt 5.4.2 and Qt 5.5.1 on OS X 10.11.6 with German and Hebrew translations. Change-Id: I0b6a8bf35487e95f5186fd4fa09d4dcb92ba0c01
2016-09-05Add simple versioning to QtScaledAvatarCacheTobias Markmann
The cache for each version is stored in a dedicated directory that exists next to the raw avatar images. This allows running different Swift versions which use different versions of the QtScaledAvatarCache. Test-Information: Tested on OS X 10.11.6 with Qt 5.5.1 and Windows 8 with Qt 5.5.1. Verified that the avatar paths changed to the new versioned cache path in the web views. Change-Id: I12cb46c4d6750ae7ad82c719eef290f721d1d131
2016-09-01Remove translator's pseudonymKevin Smith
Change-Id: Ic3d735c39fa278eb8e168eb7f0cd140ecb445b5c
2016-08-26Improve API clarity of MUCSearchItem::setParentTobias Markmann
Change MUCSearchItem::setParent to take weak_ptr over shared_ptr and converting it to weak_ptr in the method. Test-Information: Builds on OS X 10.11.6. Tested that various MUC room searches still work. Change-Id: I26d62861c99957759127c18a629bdda3635012c7
2016-08-25Alphabetically sort MUC search resultTobias Markmann
This also changes the classes around MUCSearchModel to C++11 smart pointer based memory management. Test-Information: Verified that dtors of MUCSearch*Items are called when old search results are replaced by new search results. This was not the case previously. All unit tests and manual testing with an ASAN enabled build succeeded. Change-Id: I84d62f3b86138728401b98d3774f47c72fdf9a4c
2016-08-24Add script to test Swift compilation across Linux distributionsTobias Markmann
This adds the VagrantCrossDistributionTest.py script. The script allows testing the BuildTools/InstallSwiftDependencies.sh script, Swift compilation and the unit tests across different OSs. It is based on Vagrant, used publicly available VM boxes of different Linux distributions, uses Ansible to prepare the environment for compilation and finally installs the build dependencies, builds Swift and runs the unit tests. Test-Information: Ran the script on OS X 10.11.6 with Vagrant 1.8.5. It successfully build Swift and ran the tests on Ubuntu 16.04, Ubuntu 15.04, Debian 8.5, OpenSUSE Leap 42.1 and Fedora 24. Change-Id: I78e196f1a97a4fe2b5c9224f4ba19f6c7bdee03a
2016-08-24Fixed to InstallSwiftDependencies.shTobias Markmann
Added ability to pass additional options to executed package management commands. Test-Information: Tested InstallSwiftDependencies.sh and successful compilation of Swift on Ubuntu 16.04, Ubuntu 15.04, Debian 8.5, OpenSUSE Leap 42.1 and Fedora 24. Change-Id: I36e14cfa6ce1a05edb29ea61cb713f66b0c95943
2016-08-24Use SSL_CTX_set_default_verify_paths to set trusted CAs for OpenSSLTobias Markmann
This fixes setup of trusted CAs on Fedora. Test-Information: Tested successful login to two different hosts with different CAs. Previously the there was no certificate warning on Debian 8 and a certificate warning on Fedora 24. With this patch there is no certificate warning anymore on Debian 8 and Fedora 24. Change-Id: I70e71eb9734f2012bcd5c4b784bab47917b44234
2016-08-24Improve readability of message receipt iconsTobias Markmann
This changes the icons for delivery success and delivery failure to vector graphics in SVG format. Added a slight white circle around the graphics for better readability on backgrounds with low contrast. Test-Information: Tested with Qt 5.4.2 and Qt 5.5.1 on OS X 10.11.6 on retina and non-retina systems. Noticeable better rendering due to SVG over PNG. Noticeable but not attracting attention white circle. Change-Id: I3c9be99854a300a4e40161a74964514aa47d292a
2016-08-23Only use Lato font for rosters and the chat viewTobias Markmann
This sets the font family to Lato for QtTreeWidgets. The font size or other settings are not changed. Test-Information: Tested on OS X 10.11.6 with Qt 5.5.1. Change-Id: I235ae1b4e98e903872cb21ce41eca5f08955042d