summaryrefslogtreecommitdiffstats
path: root/Swift
AgeCommit message (Collapse)Author
2015-02-23Fix chat window title showing wrong chat titleswift-3.0beta1Tobias Markmann
Setup an application wide focus handler which updates the title if a focus change to a QtTabWidget happened. Test-Information: Tested on OS X 10.9.5 with Qt 5.4.0. Change-Id: Ib2e2f4c4a93deddb286350bdef685eb7aee504c9
2015-02-20Fix Ctrl/Cmd + Page Up/PageDown shortcutsTobias Markmann
Test-Information: Tested on OS X 10.9.5 with Qt 5.4.0. Change-Id: Ia60808f5ae371db6b438b7396fa1f999f4572a96
2015-02-18Fix crash when a tab drag is aborted in trellis modeTobias Markmann
To prevent an infinite recurison during when a tab is returned (added again) to the original QTabWidget. The recursion was caused by a show event that is emmitted during insert and our QtChatTabs::handleWidgetShown function trying to add the tab again because it is not in the QTabWidget yet; it would be if the show event would be emitted after the insert is done and not somewhere during the insert. Test-Information: Dragging a tab in trellis mode and *not* dropping it on a tab bar. Previously this would cause an infinite recursion. Now it just returns the tab to its previous place. Tested on OS X 10.9.5 with Qt 5.4.0. Change-Id: Icd54b95b6f0542b6a9d3921fa1b0ab4df409950a
2015-02-17Fix shortcut handling for chat window navigationTobias Markmann
This commit fixes CTRL-Tab, CTRL-Backtab and CTRL-W shortcuts on Mac, Windows and Linux. These shortcuts work in all mode except --no-tabs mode. This will be fixed in a future commit. There is still different behavior across platforms: on Windows and Linux they are handled on key press and repeat, and on Mac they are handled on key release and do not repeat. Test-Information: Tested on OS X 10.9.5, Windows 7 and Elementary OS. Change-Id: I2179f234cfd76b86cf261f2cf7500fc1cf0439a4
2015-02-17Fix terminology: 'join room' -> 'enter room'Tobias Markmann
Test-Information: None. Change-Id: I022a65c64e73e1ae70ee21673fa5cce7afbe51a6
2015-02-16Show a warning notice when trying to enter a blocked roomTobias Markmann
When the user tries to enter a blocked room, we now show a warning notice and describing how the room can be unblocked. Swift will not send the joining presence when trying to enter a blocked room. Test-Information: Tested on Mac OS X 10.9.5 against a popular open source server and its MUC and Blocking Command implementation. Change-Id: I875db056f21f97845c5a9a43167b0f2a16bdaa36
2015-02-11Do not try highlight words if no text and background colours are specifiedTobias Markmann
The tests have been adjusted so a colour is set in their highlight actions. Test-Information: Tested with a "own nick" highlight rule with a "No highlight" action and one with highlights colours set. The cases now work as expected. Added a unit test that checks that no highlighting happens when no colour is specified. Change-Id: Ied48d8c2e033531c1b0532348b9380e1bd884b44
2015-02-11Fix missing removable icon in contact listing of "Start Chat…" dialogTobias Markmann
QtRemovableItemDelegate only renders the icon if the data for the cell is empty. This is to enable persistent entries. With this commit the model only returns the expected data for the first column. Test-Information: Tested on OS X 10.9.5 with Qt 5.4.0. Change-Id: I5cacebcc47323280b689badf2ba90b3503c17061
2015-02-11Fix code styleTobias Markmann
Test-Information: None. Change-Id: Iaff0108547658e1b103905c78fac5d1faf3a15e1
2015-02-11Fix --no-tabs mode brokenTobias Markmann
Trellis changes introduced a bug for the --no-tabs mode. Test-Information: Tested on Mac OS X 10.9.5. Change-Id: Ic918a38cda00a64f8eca496ede0190fbef6b6602
2015-02-09Fix unused parameter warnings in some testing headersKevin Smith
Test-Information: Warnings went away in another project using these headers Change-Id: I336925153a4a549bb33cc977c6a483ec81cd1ff6
2015-02-09Fix sender text that is used for matching highlight rulesTobias Markmann
Old behavior: MUC group messages are matched against the nickname as sender. MUC 1-to-1 messages and classic 1-to-1 messages are matched against the display name as sender. New behavior: MUC group messages are matched against the nickname as sender. MUC 1-to-1 messages are matched against the nickname as sender. Classic 1-to-1 messages are matched against the bare JID as sender. Test-Information: Tested on Mac OS X 10.9.5 that a chat rule matching a nickname string and a rule matching a full JID are highlighted correctly. Change-Id: Icaee2c946e34fceb6b1d40561674030740555de1
2015-02-09Fix focus handling bug with regard to tab changingTobias Markmann
QtChatWindow: Require now parameter is set in QtChatWindow::qAppFocusChanged which is required so only the visible tab that is changed to gets focus. QtDynamicGridLayout: A change of tab in a QTabWidget set focus on the new tab even if the QTabWidget has no keyboard focus. Test-Information: Tested on Mac OS X 10.9.5 and Qt 5.4.0. Change-Id: I3d9d230c7753f1898b251b49c06fe7318ad953fb
2015-02-09Fix UI update issue and enabled state of "Display Notice" in Notices viewTobias Markmann
EventModel was missing calls to endResetModel() in two return-paths. In addition the limit for inactiveEvents was out-of-sync in different places. The "Display Notice" button is now disabled if there is no notice left to display. Test-Information: Tested on Mac OS X 10.9.5. Change-Id: I2b74b942f58e80a9c1a46f434ffcebf8e1ce64bf
2015-02-09Fix memory leaks reported by LSANTobias Markmann
Qt models are not owned by their widgets. They must be deleted manually or a parent has to be specified for them which will take care of deletion. The same goes for delegates and their views. Test-Information: Tested with Clang's leak sanitizer (part of address sanitizer). The leak reports for the respective lines are gone with this fix. Change-Id: Ia7407cb20ae9e4ccc2e1cf48c88877c2f87352e1
2015-02-06Use windeployqt.exe if available and Win distribution documentation fixTobias Markmann
If windeployqt.exe is available for Qt5, it will be used to detect which Qt DLLs to put in the Windows distribution and its dependencies correctly. Added a note to our Windows building documentation about the VS redistributable. Test-Information: Tested building a MSI package on Windows 8.1 Pro with Qt 5.3.2 32-bit msvc2013_opengl which successfully installs and runs. Change-Id: I786da40d6467f1de8e64bfae275f8363ac1d5ba8
2015-02-06Document the less self-explaining setting constantsTobias Markmann
Test-Information: None required. Change-Id: If267201ea28e894a9f79335972b71611b0058912
2015-02-05Fix typoKevin Smith
Thanks Zash Change-Id: I696ab1e44b24e6b3fe2f829b854af3dbffcc0beb
2015-02-05Fix ASAN reported use-after-free errorTobias Markmann
The class connects to SettingsProvider::onSettingChanged in its c-tor but never disconnects from the signal. When an instance is deleted and the signal is called afterwards it will call the method which will try to access class members which have already been deleted. Test-Information: Tested on OS X 10.9.5. ASAN reported it sometimes on exit. Have not been able to reproduc it anymore with this fix. Change-Id: I7f1d815dca87f84a4ae93a5455307e261a1ee329
2015-02-05Correctly render MUC system messages as system messagesTobias Markmann
Messages received from a MUC bare JID in a MUC have been rendered as user messages in the past. They are now rendered as system messages. Test-Information: Tested with a MUC component that sends a bare message on login. Change-Id: I9a548ec9b81db8ba329182e08446d72c3518c7cb
2015-02-05Add default hightlight rule that matches for the own nicknameTobias Markmann
Test-Information: Tested on OS X 10.9.5. Change-Id: I2ed72f0147a1dacd6e146e4d3b4c2d05ea1c7a85
2015-02-05Add "Reset defaults" button to highlight editor window.Tobias Markmann
The button is only shown if the current rules are *not* the default set of rules. Test-Information: Tested on Mac OS X 10.9.5. Change-Id: Ibf1856af04c6bdacf6102d240e6fe5f6071cb46a
2015-02-03Fix chat log system messages related to entering a roomTobias Markmann
In the past MUCController added a "trying to enter..." message and later tried to replace this with "entered room as..." message. However, any message received in between, like a system message about room topic, came in between since MUCController replaced the *last* message added to the log. The new code also adds message IDs to system messages. This way the correct message can be replaced on successful login, no matter how many messages came in between. Test-Information: Tested against a MUC component that send a system message before sending the join presence back to a user. Change-Id: I3bcb5d78de680494965d837b2ad3edb847ff7f99
2014-12-15Update copyright in missed fileKevin Smith
Change-Id: I9cc7b3805b7de972adfef4952f4841c21603542f
2014-12-15Update Copyright in SwiftKevin Smith
Change-Id: Idb6ef5fa191b1465c0bf46c47e63b695de07fa0b
2014-12-14Add support for new trellis layout for chat windows.Tobias Markmann
This includes dynamic customizable grid layouting of chat tabs including: - arrengement of tabs via menu, keyboard shortcuts or drag'n'drop - change of grid size via mouse or keyboard - save/restore of grid size and positions of chats inside the grid Test-Information: Tested on OS X 10.9.8. Change-Id: I43f94293a1c672971640c3000abfc6530f2ea7a8
2014-12-10Fix spell checking by using QSyntaxHighlighter.Tobias Markmann
This fixes spell checking not interfering with Qt's undo stack management anymore. Test-Information: Tested on OS X 10.9.5 with Qt 5.3.2. Change-Id: Icc3aa9f7213856388e4da317525c75ac97da72e3
2014-12-10Fix typos in "Edit Blocking List..." dialog.Tobias Markmann
Test-Information: Tested it now shows the corrected text. Change-Id: Id4d768428064608ba8e034cefdbbe6530e5ee8ef
2014-11-13Correct notification of Qt in EventModel about changes in the model.Tobias Markmann
Test-Information: UI still updates when events are added. Change-Id: Id37a5291ae7a63a46741781298549b9e87f73b8c
2014-11-06Wording improvements in 'Start chat'/'Invite'-dialogs.Tobias Markmann
Test-Information: Builds on OS X and the text changes fit in both usage scenarios from the UX perspecitve. Change-Id: I8c9fe4e5dc3cde9db1c8f852b0b40853a6a861b8
2014-11-06Open context menu for the roster on menu key you find on Windows keyboards.Tobias Markmann
Test-Information: Tested on Windows 8.1. Change-Id: Iec6273023289f2da4de2f22cdbabd8a157830633
2014-11-04Remove old suggestions from contact edit dialog before adding new ones.Tobias Markmann
Previously if we received an updated VCard after the suggestions have already been set we would have duplicate suggestions. Test-Information: Tested by running Swift and editing a contact. Change-Id: I960392fb76a574304d75a358af3f3cfcc9ca3adb
2014-10-31Fix uninitialized members in whiteboard's GView.Tobias Markmann
Test-Information: Still builds with clang (3.6.0) on OS X (10.9.5). Change-Id: I857b66b08d684d08ed8e0c99fb7a981e6842c6a8
2014-10-31Enable unblocking contacts from cog menu.Tobias Markmann
Renamed ChatWindow::setInputEnabled to ChatWindow::setOnline. Moved some input return key disabling logic into QtChatWindow. Test-Information: Tested in Swift, blocking a contact and unblokcing it from cog menu. Return still does not do anything on blocked contacts or when offline. Change-Id: I42faffb8618598fcc7c0bd44148902ea7028258e
2014-10-31Fix source code layout.Tobias Markmann
Change-Id: I5042943377bbb09bc46b416975f546e011c313ee
2014-10-31Fix uninitialized member in Contact.Tobias Markmann
Test-Information: Still builds with clang (3.6.0) under OS X (10.9.5). Change-Id: I56f53dbb3b16354f2afdde5abc1fed5cf0f85f51
2014-10-31Pass QString arguments by reference and not value.Tobias Markmann
Test-Information: Still builds with clang (3.6.0) on OS X (10.9.5). Change-Id: I3382e2165a5f14e13ecd48277baefaf728edbbe1
2014-10-30Prevent user from adding contacts twice to a roster.Tobias Markmann
This removes roster JIDs from the suggesting in the 'Add User'-dialog. In addition, an indication is added when a manually entered JID is invalid or already on the roster. Test-Information: Tested scenarios with recent JIDs and JIDs from the roster. Tested that 'Start Chat'-dialog suggestions still work. Change-Id: I1ff51637adb4224184b78a1af9090a04b1e18fff
2014-10-30Add missing virtual and SWIFTEN_OVERRIDE annotations to reduce warnings with ↵Tobias Markmann
C++11. Test-Information: Tested with Clang 3.6.0. Change-Id: I1f9ae8ae535d90f92b7263e86b51fe64b15524b4
2014-10-28Only handle impromptu MUC invites once.Tobias Markmann
Added missing return-statement after handling the conversion from 1-to-1 to MUC. This lead to an additional tab being opened. In addition the indentation of the relevant block was wrong and is fixed now. Test-Information: Before there was a reproducible scenario: test@A starts to chat with test2@A. toast@A is on test@A's roster, but not on test2@A's roster. test@A drops toast@A on the running chat between test@A and test2@A. test@A and test2@A end up with the chat converted into a MUC. toast@A automatically joins the MUC. test2@A additionally has a new tab. Now test2@A does not have the additional tab anymore. Only the MUC tab which previously was a 1-to-1 tab. Change-Id: I32045812952c840f0f9c6da3a9aecf5c63797b64
2014-10-23Fix code in response to clang warnings.Tobias Markmann
Removes some unused private members and restructure switch statement to handle all cases. Test-Information: Fixed code does not emit the clang warnings anymore. Change-Id: I06a9036b307014e2f882e3cee45a6881b24c3f70
2014-10-20Change old C-style cast to static_cast.Tobias Markmann
Test-Information: Before clang produced a warning about old C-style cast; not anymore. Change-Id: I0f381ea0cd1a015cc1774dd1878aaa2736c66059
2014-10-17Disable online only actions when offline.Tobias Markmann
Disabling action, menu items and drag 'n' drop which require an online connection when the user is offline. Test-Information: Checked by going offline and checking the relevant actions and menu items. Change-Id: Iacfa2c9f815d3b9bbad9ca4c2d0d04f95ce9a9e4
2014-10-17Implement support for displaying nickname changes.Tobias Markmann
This implements Swiften API for changing nicknames in MUC and correctly detecting nick name changes. In addition Swift now displays nickname changes as such and not as join/leave of a user. In addition, handling of nickname changes is integrated in ChatsManager and ChatControllers so that they are forwarded to PM chats of MUCs. Test-Information: Added unit tests for change of own nickname and nickname changes of others. Tested correct detection of nickname changes in a MUC with a Psi user changing its nickname and Swift correctly detecting and displaying it. Change-Id: I3287ba6ceeccd3be5cfb591acd6f88bffc9a43b2
2014-10-16Change text in blocking list editor from 'click' to 'double-click' to reflectTobias Markmann
actual behavior. Test-Information: Swift's blocking list UI works as descibed in the text displayed in the UI. Change-Id: Ic10d907d89dfc43b97aa21132ceb58210de807b4
2014-10-16Fix user experience issues related to blocking list editor.Tobias Markmann
This commit enables complete keyboard accessibility for editing the block list including list navigation via cursor keys, editing via enter key and deletion via backspace. The placeholder item for adding new items is now non-removable and is indicated as such. The 'Save'-button is disabled during processing of a request. The window is closed on 'Save' if no changes have been made or the changes have been applied successfully. On failure the error message is shown in the window. A description text has been added at the top to tell the user about the use of the dialog. Test-Information: Success cases have been tested by running Swift and do change the blocking list via mouse and keyboard and doing no changes at all. Error cases have been tested using a server adjustment which replys with IQ errors on any blocklist change. Change-Id: I028a9dd15e66ba7363a30b66c5d5a15ba2a5a518
2014-10-14Remove empty fields from XEP-0055 search query before sending it over the wire.Tobias Markmann
This clears both, empty fields of XEP-0004 data forms and the XEP-0055 predefiened fixed form. Test-Information: Verified using Swift's debug console and M-Link. Change-Id: I3cd2314abfe5111f66569d39aae9b8587157ec07
2014-10-14Fix tab order of join room dialog.Tobias Markmann
Test-Information: Run Swift and verify that tabbing through the join room dialog goes through the widgets from left to right and from top to buttom. Change-Id: I8acb0e10860970e758ff66318760dceeda9cfe0b
2014-10-10Fix JID auto-complete item select not working when adding a contact.Richard Maudsley
Test-Information: Confirm that clicking a suggested user fills the JID box on the "Add User" dialog. Confirm that JID suggestion functions normally in other places. Change-Id: Ic1a5c30b95416fd46bc22a612793621e9501d770
2014-10-09Prevent renaming of 'Contacts' roster group used for groupless contacts.Tobias Markmann
Test-Information: Verified by running Swift and checking that you cannot rename 'Contacts' group anymore. Other groups are still renameable. Change-Id: I97a79feb92d65d6dcdf914fb47b13ee268d271c3