summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2016-04-01Specifically handle Slimber/Limber in FixIncludes.pyTobias Markmann
Additionally improve handling of the corresponding header. Test-Information: This version of FixIncludes has been used in the recent include fixing of all source files in the repository. Change-Id: I70c8ef0a51d8e1a3b458fbd6f886c7d5b5259949
2016-03-31Convert tabs to 4 spaces for all source filesTobias Markmann
Removed trailing spaces and whitespace on empty lines in the process. Changed CheckTabs.py tool to disallow hard tabs in source files. Test-Information: Manually checked 30 random files that the conversion worked as expected. Change-Id: I874f99d617bd3d2bb55f02d58f22f58f9b094480
2016-03-31Stop building some TLS providers as always staticKevin Smith
Thanks to Manfred Urban for reporting that dynamic libraries weren't working. Test-Information: Swiften Builds on OS X with swiften_dll=True Change-Id: I31e40ac118b9be6b43803a2bbcbfef3a9f9f9d21
2016-03-30Apply consistent #include grouping and sorting styleTobias Markmann
Changed "" style includes to <> style. Test-Information: Build with Clang 3.9.0 and ran all tests on OS X 10.11.4. Change-Id: Ic05e53f2e5dba39cc1307b116fc5f17b62ab9eb8
2016-03-29Refactored keyword highlightingTobias Markmann
This commit changes the ChatWindow/ChatView APIs to not pass highlights actions as additional parameters but instead they are now part of the ChatWindow::ChatMessage and its parts. This allows the controllers to do highlighting in one single place and play sound actions on the highlighted message in a single place. On a highlighted message only unique sounds are played and they are played in sequence of the rules that matched the message. Test-Information: Adjusted the existing unit tests accordingly. Added unit tests that check reduplication of highlight action sounds and that the sound actions are emitted correctly. Manually verified that highlight sound actions with and without duplicated sounds are audible on OS X 10.11.3. Change-Id: I68c88e0d285d79d87b2997ed29d92b140480b394
2016-03-29Replace chat view theme with one based on the new designTobias Markmann
This also removes the old chat theme resources and some code in QtWebKitChatView that was required for compatibility to Adium-style themes. The new code uses a CSS style in the header to change the font size and does not iterate the whole DOM tree itself anymore. Added new resources for failed and successful asks. Test-Information: Tested MUCs, PMs, message correction and file-transfers with the new chat theme. Change-Id: If922a972c658189444e60a7b00e5e5e96661620d
2016-03-17Tidy XEP-0141 codeTim Robbings
This change addresses some feedback the previous XEP-0141 commit (a39d650). Test-information: Ran the CPPUnit tests, these completed successfully. Change-Id: I2caf1eb1349f7527bd9af8ce8adfb194391253e4
2016-03-17Put Sluift headers in their own group with FixIncludes.pyTobias Markmann
Test-Information: Ran FixIncludes over some Sluift files and it sorted them as expected, meaning not grouped together with project external includes. Change-Id: I035381f4560b3c13f1a1feaefad7ecd8e268640b
2016-03-17Cleanup #pragma pollution in Sluift element convertorsTobias Markmann
There were a lot #pramas to ignore unused private field warnings. The pragmas and the unused fields have been removed. Test-Information: Build on OS X 10.11.3 with XCode Clang. Change-Id: Ie2f5398771088f93631c0f2c03d3cfdcca94cee6
2016-03-17Don't allow JIDs with explicitly empty resourcesKevin Smith
A JID may have no resource, but may not have an empty resource. Mark such JIDs as invalid. Test-Information: Added a unit test for the failure case (and made it pass). Other unit tests still pass Change-Id: I4fb300f716e635a3f8f02843891f25218da77130
2016-03-17Add .clang-format configuration file for Swift projectsTobias Markmann
Test-Information: Applied it on 50 random source and header files. The result looked pretty much like the style we currently use. Change-Id: I23806261a22330acfcbb8f197f76d35227e32d6d
2016-03-15Explicitly convert between nullable and non-nullable on OS XTobias Markmann
Clang was complaining about implicit conversions between nullable and non-nullable NSString pointers. Adjusted our std::string -> NSString* conversion utilities to check for nil and return an empty std::string in that case. Replaced uses of [NSString stringWithUTF8String] with our STD2NSSTRING macro. Turned std::string <-> NSString* conversion macros into functions. Test-Information: Builds without the warning on OS X 10.11.3 and Swift runs without issues. Change-Id: I949f2f3332018391aead58ef362764f4b7955b01
2016-03-14Build all Swift projects as C++11Tobias Markmann
Added a SCons compiler test so that the build process fails early if C++11 is not supported. Remove C++11 checks as we now default to C++11 and they are not needed anymore. Ignore a Clang warning if building 3rdParty Boost. Test-Information: Tested build and unit tests on OS X 10.11.3. Change-Id: Icbecbd1e25e8d8bbe5f402f75355373a86b5f8a1
2016-03-11Fix translatability of vCard editor popup menu itemsTobias Markmann
Previously a preprocess macro expansion variable was passed into Qt's tr() function. Qt's translation tool did not pick these stings up. Test-Information: Builds on OS X 10.11.3 with Qt 5.4.2. Provided german translations for some of the items in the popup menu and then ran Swift with --language de. The translated popup menu items were correctly translated in the UI as expected. Change-Id: I50aeac9dd7277e1ce07b5a362c7474962dbcfad4
2016-03-10Fix crashes in spellchecking code in case of broken backendTobias Markmann
If Swift uses Hunspell as spellchecking backend its configuration can fail, because a dictionary is missing or a wrong path was specified. Instead of crashing, spellchecking will be disabled and a warning is printed to the terminal. Test-Information: Tested on Debian 8 with Qt 5.3.2. Tested enabling/disabling of spellchecking in the UI, selecting different dictionaries and broken dictionaries. Change-Id: Ib6d73ed3d7a6a3701410b0f6dc983d41e807df82
2016-03-09Improve profile editing UX when vCard is not supportedTobias Markmann
Previously, when editing your own vCard and the server responded with an error, the user would indefinitely see a spinner. With this commit, the user will see an error message instead. Test-Information: Tested on OS X 10.11.3, with a XMPP server with enabled and disabled vCards. The enabled case still works as expected and in the disabled case the error message is shown, instead of the indefinite spinner. Change-Id: Ic9167ee633a2f9a9fa3b520f6067dc2c94857c07
2016-03-09Fix FixIncludes.py script to handle Objective C (.mm)Tobias Markmann
Test-Information: Ran it on Slimber/Cocoa/CocoaMenulet.mm. It was sorted correctly. Change-Id: I197e84c9bfb5ec2619c43f98fcaa927f85425083
2016-03-09Fix using external OpenSSL on Mac OS XTobias Markmann
This commit changes our TLS backend configuration behavior. It introduces the tls_backend Scons argument, which defaults to the native backend, but can also explicitly set to 'openssl' to use a project external OpenSSL installation or 'openssl_bundled' to build and configure with the OpenSSL source in the 3rdParty directory. Test-Information: Tested on OS X 10.11.3. ./scons ends up using Secure Transport. ./scons tls_backend=openssl \ openssl_include=/usr/local/opt/openssl/include \ openssl_libdir=/usr/local/opt/openssl/lib \ openssl=/usr/local/opt/openssl successfully builds with openssl from Homebrew. ./scons tls_backend=openssl_bundled successfully builds with OpenSSL in 3rdParty. Change-Id: I4fb0ef9d197609afe793554f86e54fe67fc1cab5
2016-03-09Fix warning coloring of chat input fieldTobias Markmann
The previous stylesheet was too generic, as it applied on all widgets and sub widgets, including a potential context menu. This fix will only color alerts and the text input in the warning color. Potential context menus are colored according to the application style. Test-Information: Tested alert colors and text input color on OS X 10.11.3 with Qt 5.4.2. Change-Id: I0d1f704f4eacddf41befb7dfbc8bbf7ef28f88ce
2016-03-08Remove superfluous implementation filesTobias Markmann
Test-Information: Builds on OS X 10.11.3. Change-Id: I3177f158c959944c89a028ac0c4cc79a45ed1ac3
2016-03-04Fix small issues around Swiften/QA/TLSTestTobias Markmann
The jabber_org.crt was falsely modified in commit 0297fa1; reverted the file to its previous version. Fixed a syntax error in CertificateErrorTest. Fixed compilation of TLS stack with external OpenSSL. Test-Information: Tested compilation ./scons test=system Swiften/QA/TLSTest with OpenSSL on OS X 10.11.3. Change-Id: I58caf94dded128d3ee725b1961e54ad2955d70aa
2016-03-04Remove unneeded files from old highlight editor UITobias Markmann
Test-Information: ./scons test=unit passed without errors on OS X 10.11.3. Change-Id: I9303fd2d5a08a17d1e8f2ca015bec7c883aeedad
2016-02-29Add workaround for building with Boost 1.60 as C++11Tobias Markmann
Test-Information: Successfully built Swiften as C++11 with external Boost 1.60 on OS X 10.11.3. Change-Id: I2c5a7c22f5f8c14ee7befcaeb84b7d1f093932f6
2016-02-29Fix compilation with Boost 1.60Tobias Markmann
Building with Boost 1.60 showed a bug in WindowsGSSAPIClientAuthenticator.cpp, passing NULL to a method expecting a const boost::optional reference. Passing a default constructed boost::optional here instead now. Test-Information: Compiles with VS 2015 and Windows 10 and externally built Boost 1.60. Change-Id: I5c67d706dade21c60b006b13d441355714a42ec2
2016-02-29Fix scons2ninja toolingTobias Markmann
scons2ninja was broken since our last update to SCons in 3rdParty. This commit fixes it. This also includes a workaround to AppBundle.py working around an SCons encoding bug. Test-Information: Successfully run ./BuildTools/scons2ninja.py followed by ninja. Change-Id: I2f9dbbb33dc559ca339bb26ba11b885b39135011
2016-02-29Fix possible race condition between Connection and ConnectorsTobias Markmann
The issue occurs with ProxiedConnection that started connecting but do not have an external reference anymore. As soon as the handlers of the ProxiedConnection are disconnected from the signals of the connection_ object, the remaining references to a shared ProxiedConnection vanish and the ProxiedConnection is deleted, while it still requires access to its members in ProxiedConnection::handleConnectFinished(). Test-Information: All tests pass on OS X 10.11.3. No TSAN reports on Debian 8 in a scenario with randomly connecting/disconnecting Client instances that use a HTTP proxy. Change-Id: I4d6d2c85013e066d9ed298aa9b913afc83949e35
2016-02-29Fix data race in BoostConnection reported by TSANswift-4.0alphaTobias Markmann
ThreadSanitizer reported a data-race between Boost's socket close() and async_read_some(). Test-Information: Verified all tests still pass and that TSAN does not report an error anymore in a scenario where a Client connects/dis- connects randomly. Tested on Debian 8 and OS X 10.11.3. Change-Id: I5e705efb15bee767dd5a55539854b5e488b3bf64
2016-02-26Fix minor gripes in Dutch translationswift-3.0Edwin Mons
After living with it for a few days, some translations popped out as clumsy. Redoing those. Test-Information: Less annoyance when running Swift RC3 with this translation Change-Id: I7f5b07468e395ad2fe125c173185199f292af7f4
2016-02-26Update German translationTobias Markmann
The user is now addressed in a formal way ("Sie" instead of "Du"). Also removed obsolete strings. Test-Information: Ran Swift in German and saw the correct translation strings. Change-Id: I2755775f40c63f8d42f293b97d7aab4f0f05277b
2016-02-26Add Barun to COPYING.thirdpartyTobias Markmann
Test-Information: None. Change-Id: I1228bbd3bb75b3d692663b8eb8ea10258dceb8f3
2016-02-26Fixed a typo in InstallSwiftDependencies.shbarun511
License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details. The file displayed Unspupported System when you ran ./BuildTools/InstallSwiftDependencies.sh on a system not included in the Unix Distribution. The typo was fixed, and it now shows Unsupported System. Change-Id: I1a57f0d3e33d58b21b27e76bdd52c57f9831df50
2016-02-25Disable Hunspell support by default as it is not finished yetTobias Markmann
Our Hunspell support has not been finished and thoroughly tested yet. This commit disabled building with Hunspell by default, even if the dependencies for it are installed on the system. Remove libhunspell-dev from the build depends in Debian packaging. Test-Information: Tested on Debian 8. Tested with and without the hunspell_enable=True flag. With the spellchecking options are shown and however spell checking is not stable. Without it the spellchecking options are not shown and spellchecking is disabled in general, as expected. Change-Id: I100582852cbe128149fdb2e2a28d4ae407398be6
2016-02-15Disable file-transfers to MUC PM contactsswift-3.0rc3Tobias Markmann
Currently the file-transfers to MUC PM contacts fail because the from JID does not match the initiator JID. The initiator JID is always the real client JID at the moment. Disabling file-transfer for MUC PM contacts provides a better UX for now. Test-Information: Tested file-transfer to normal contacts still works. Tested file-transfers to MUC PMs do not start. Change-Id: If5f59eb313a25ca919393f497a57fd339eb17e3e
2016-02-15Update Dutch translationEdwin Mons
The non-writable patch added a string, adding a translation for that. This commit also removes vanished and obsolete strings: they have served their purpose. Test-Information: Ran Swift in Dutch on OS X 10.11, received a file and tried to save it to a non-writable location, saw the message. Change-Id: I94de949f5f0b331ee4f633268729faa7265e32d3
2016-02-15Support early IBB use in Jingle File TransferTobias Markmann
Previously Jingle File Transfer in Swiften only used IBB transport as fallback mechanism. With this patch Swiften will use IBB transport candidates directly in the first session-initate/session-accept message if the other party only supports IBB. Fixed a ASAN reported heap-use-after-free in SOCKS5BytestreamServerManager.cpp while testing. Test-Information: ./scons test=system passed without error. Testing all sender/receiver file-transfer option configurations with FileTransferTest resulting in expected behavior. Successfully transferring a file between two Swift instances. Change-Id: Ia0ffeaa1fd54fc0da23db75344c9e94f9d03a774
2016-02-15Fix crash when saving a received file to non-writable locationTobias Markmann
WriteBytestream::write(…) now returns a boolean indicating its success state (false in case of an error). Adjusted FileWriteBytestream accordingly. The QtWebKitChatView will test if the file path selected by the user is writable before accepting it and starting the transfer. If it is not writable a red warning message will be added to the file-transfer element in the chat view. Test-Information: Added an integration test that tests the new behavior for the FileWriteBytestream class. Tested two file transfers on OS X 10.11.3, one to a write protected location and another to /tmp. The first is not accepted by the UI, and without the UI sanity check it results in a file-transfer error. The second succeeds as expected. Change-Id: I5aa0c617423073feb371365a23a294c149c88036
2016-02-15Fix file-transfer UI replace after presence change glitchTobias Markmann
Forgot to reset the lastWasPresence_ flag when file-transfer UI is added to a chat view. The flag is used to amend the existing presence change log in a chat view in case of consecutive presence changes. Test-Information: Transfer a file to a Swift user and go offline afterwards. Without this patch the file-transfer UI is replaced by a presence change message. With this patch a new presence change message is added instead. Change-Id: I54a5cfd398bd4ba79eb15a1b14b08db3377233a4
2016-02-15Improve SCons reporting on missing Qt toolsTobias Markmann
This will print errors like missing Qt linguist tools. Test-Information: Tested on Fedora 22 and OS X 10.11.3. Change-Id: I0817f368920b839805597d8eb2f3297b1fbd90e6
2016-02-15Update Dutch translationEdwin Mons
Updated all strings, except for the ones in QtPlainChatView. Test-Information: Verified all strings I could find in Dutch translation with Swift running in normal, trellis and netbook mode. Change-Id: I77e01e42206c19728c9d06f9cfbc98d6f980df9e
2016-02-15Move QApplication instantiation in QtUI/main.cpp downEdwin Mons
If there is no X11 display set, bits in libqxcb as used by the plaform integration bits called by QApplication will trigger an abort. Moving this down to just before where the app object is needed allows --help or --version even if there's no DISPLAY, and also improves runtime of these GUI-less operations quite a bit. Test-Information: Test platform Debian 8 x64 with Qt5 Starting swift-im with DISPLAY set works as expected Asking for --version or --help without DISPLAY now works Actually starting the UI still aborts. Change-Id: Id8eeee90598fe2a8e3b26ba042835a0ea928932f
2016-02-12Fix bug in OS X Notification Center backend on empty callbackTobias Markmann
Checked Growl and Snarl backends which both already do the check for empty callbacks. Test-Information: Tested clicking on an disconnect notification of Swift on OS X 10.11.3 which previously caused a crash. Now it does not crash anymore in this case. Change-Id: I7045ab22a0322cc7a50761640a9b89ba2302acef
2016-02-11Add support for Fedora to InstallSwiftDependencies.shTobias Markmann
Test-Information: Tested on clean Fedora 22 system and successfully built Swift afterwards. Change-Id: I7451d03e1d88907d8356e4b43b837d5514bf32a0
2016-02-11Make Add <field> in the VCard wizard translatableEdwin Mons
Used to use simple string contactenation, but that's unsuitable to at least Dutch. Test-Information: Test platform OS X 10.11 Untranslated VCard field dropdown looks as before. Change-Id: I371b47d570032deffa0ed662ba13964d96b22633
2016-02-10Sluift: Add timeout to roster receiving operationsRoger Planas
This avoids Sluift indefinitely waiting if the server does not respond Test-Information: Before the patch, a sluift client would wait indefinitely if a buggy XMPP server does not respond. With this patch, sluift clients now timeout and through an exception after SLUIFT_TIMEOUT when the server does not respond. Change-Id: I9d36f53a8f4d5b3d594cef68c42de38fd5a1c296
2016-02-10Sluift: Ensure that message event body is retrieved correctlyRoger Planas
As a result of commit "Change stanza body to boost::optional<std::string> type" (commit 1b9ccc1fef6104eaf951153ddccdc6bb15899e9a), Sluift was not populating the 'body' part of the message event, casting it to a bool instead. By adding get_value_or("") to that body part, the actual body value is retrieved, and the message event ends up containing the right information. Test-Information: Without the patch, Sluift's message event body is 'true'. With the patch, Sluift's message event body contains the actual message. Component messages also tested and event body as expected. Change-Id: I366202aa5bf28a3315a81d909ea08f0933aa06d7
2016-02-10Add more tests for JID validityKevin Smith
Test-Information: Tests pass locally (OS/X 10.11.3) Change-Id: I223cdf213f87a4efd574bdd917556aec23e4fd4c
2016-02-10Fix update_translationsEdwin Mons
As of Qt5, lupdate doesn't accept the -codecfortr option anymore. Qt sources are now expected to always use UTF-8. Fixed the lupdate command line so that this option is now only used when building against Qt4. Test-Information: Tested on OS X 10.11 using Qt 5.4 Tested on CentOS 6 using Qt 4.6 Change-Id: Ie5bcb383bc2ebded6dc1deb65d988d3b268dc293
2016-02-09Update copyright in COPYING and COPYING.gpl to 2016swift-3.0rc2Tobias Markmann
Test-Information: Verified that the license in the about window shows 2016 as copyright year. Change-Id: I648cd3ecf818a22af3e535701f15f8e0ac166320
2016-02-08Fix and adjust TLSTest to Windows SChannel backendTobias Markmann
Test-Information: ./scons test=system Swiften/QA/TLSTest passes on Windows 8. Change-Id: I688ec5d0022c02879ff56029d724e6dd30b89a99
2016-02-08Treat cert verify errors as non-fatal in OS X TLS backendTobias Markmann
Our TLS backends need to tread TLS verification errors, e.g. outdated certificate, untrusted CA, non-matching host, etc., as non-fatal, so the application can apply custom key pinning verification or similar. This patch changes the OS X SecureTransport backend to behave accordingly and adjusts the CertificateErrorTest to mirror this behavior. This commit also fixes a double-free in SecureTransportCertificate. Test-Information: Connected to a host with an untrusted CA and non-matching domain in the certificate and was prompted with the Swift certificate trust dialog on OS X 10.11.3. Swiften/QA/TLSTest run successfully on OS X 10.11.3. Change-Id: I4c8ce2178540d79a5f328e2e0558d4deb4295134