summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2019-11-19Remove std::endl from SWIFT_LOG callsEdwin Mons
The std::endl is now added by ~Log, but only for output to stderr or a log file. Calls to the Android logging system or manually set callbacks will not include the newline in the logging output. JIRA: SWIFT-430 Test-Information: Unit tests pass on Debian 9 Checked that running Swift with logging to stderr still had a newline. Change-Id: I096fdba78a3b8f87db2097951c28c528592183e8
2018-05-04Fix issues raised by some warnings and reenable them in SwiftTobias Markmann
Test-Information: Builds and test pass on macOS 10.13.4 with clang trunk. Change-Id: Ib4826c38a85fd2097137c09014ba4da6c98879da
2018-04-27Add a new merged roster/chats/MUCs viewKevin Smith
This is hidden behind the FUTURE flag, and is not ready for release yet, but is pretty usable. The three top filters (all/people/rooms) aren't plumbed in yet, recents need to be reinstated, and a favourites system would be very desirable. The code for the existing roster/chatlist is largely unchanged and with FUTURE disabled behaviour should not have changed. Lots of this code has now been put inside #ifndef NOT_YET blocks, to make it easy to find and remove later. When making this default later, all instances of NOT_YET should be inspected, unit tests should be added, and use of RECENT should be inspected - those related to this patch should be removed. Not all code is behind NOT_YET, so references to the old recents and chat lists will need to be manually checked and removed. Test-Information: Existing unit tests pass. New unit tests have not been added yet, and need to be before it's removed from FUTURE guards. Firing up Swift with future enabled shows the new view, and disabled doesn't. In both cases clicking around various things in the rosters opens the expected chats. Change-Id: I0e1ce98e4c644fa5b09ef65986cc826b6b564a7b
2018-02-27Fix a crash that occurs with closed chat tabs after resizing trellisThanos Doukoudakis
This patch address an issue where, after resizing trellis in a smaller grid size, all closed tabs widgets (ChatWindows, Debug Console etc) that were in a grid cell that got removed, were being destroyed leading to some crashes whenever the widget was used again. Test-Information: Tested the changes in windows with Qt 5.8 and Ubuntu 17.10 with Qt 5.9.1. Tested the client behaviour when opening, closing and re-opening multiple tabs (chat windows, debug console, File transfer overview), before and after resizing the trellis. Change-Id: I923299fe90aa39737d6a3e0ace107018f126880e
2017-07-06Fix a crash that occurs when resizing chat layoutThanos Doukoudakis
This patch fixes a client crash that was caused when the chat layout was resized to a size that would make some of the chat window out of range. Test-Information: Tested on Ubuntu 16.04 LTS (Qt5.5.1) and Windows 10 (Qt5.7.1) Change-Id: I900c1efcf3c9ae3c416fb4e2d19bd47bf27bbaee
2017-04-04Remove superfluous duplicated variable in QtDNDTabBar codeTobias Markmann
Coverity raised this issue. Test-Information: Swift and unit tests still build on macOS 10.12.4. Drag and drop of tabs still work. Change-Id: I64bdb973da73a4f2b5ed514583c4f8740adc77b4
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-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-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-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-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-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-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-08-19Fix crash during trellis size change on WindowsTobias Markmann
Due to Windows focus handling, the handleApplicationFocusChanged method was called during the relayout process while the dynamic grid layout is not in a consistent state. With this change a call to handleApplicationFocusChanged will just be ignored during the relayout process when changing the layout. Now it also remembers the current active widget in the layout and activates it after the relayouting is done. Test-Information: The crash happened in a scenario where you had a few rows and columns and with many tabs randomly distributed, leaving some trellis cells without a widget. When changing back to a 1x1 grid in this situation it sometimes crashed. Now it does not anymore. Tested on Windows 8 with Qt 5.4.2. Change-Id: I829bac2ba050cf320e15ab48b49bbb9606a82831
2016-08-19Support dropping tabs on tab widgetsTobias Markmann
Previously users could only drag and drop tabs on other tab bars. With this change the user can simply drop the tab on another tab widgets. This works on all QtTabWidgets that have a QtDNDTabBar set, regardless of their number of child widgets. This works by forwarding dragEnverEvent() and dropEvent() calls on the QtTabWidget to the corresponding QtDNDTabBar. Tabs dropped on the tab widget instead of the tab bar are added at the end of the tab bar. Test-Information: Tested with Qt 5.5.1 on OS X 10.11.6 and Windows 7. Change-Id: Ie73e02de24472eab2d20a89c937fb6630b1ef7b8
2016-08-18Tweak grid selection dialog renderingTobias Markmann
Recent testing on Debian 8 showed two rendering issues: 1. CE_MenuBarItem in the selected state shows drawing artifacts for our drawing size with Debian's default style. 2. CE_SizeGrip shows drawing artifacts unless it's drawn at position (0,0). Removed size grip as the resizability signification is also provided by the description text. Cells are drawn as simple squares in the palette's highlight color. Test-Information: Verified that there are no artifacts and the dialog is usable on Debian 8, Windows 8 and OS X 10.11.6. Change-Id: I9eaf1e1fd34d035ec3dffcb0dc29efca40d6da24
2016-08-15Improve UX of grid selection dialogTobias Markmann
This fixes UI drawing quirks on Windows and improves the margins. It also adds a descriptive text on how to use the dialog. It adjusts the cursor position when changing the size via keyboard so switches between keyboard and mouse usage of the dialog are fluid. Test-Information: Verified usage and looks on Windows 8 with Qt 5.4.2 and on OS X 10.11.6 with Qt 5.5.1. Change-Id: I983656d7d08d49ac4914380ae42ed5ce49fcea12
2016-04-01Modernize code to use C++11 nullptr using clang-tidyTobias Markmann
Run 'clang-tidy -fix -checks=modernize-use-nullptr' on all source code files on OS X. This does not modernize platform specific code on Linux and Windows Test-Information: Code builds and unit tests pass on OS X 10.11.4. Change-Id: Ic43ffeb1b76c1a933a55af03db3c54977f5f60dd
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-01-18Remove unused variable reported by GCCTobias Markmann
Test-Information: Unit tests pass on Debian 8. Change-Id: I648f97a3ebd2c798df809a1f2cb37b689df94f42
2015-11-30Workaround QTabBar early eliding bug on OS XTobias Markmann
The issue is visible when having two chat windows with the same label. One of them is elided even though enough horizontal space is available. Test-Information: Tested multiple chats including some with the same tab label. Tested many open chat windows overflowing the horizontal space of the tab bar to test scroll behavior on overflow. Verified that the code stops the early eliding bug on OS X 10.10.5 with Qt 5.4.2. Verified that workaround is not needed on Debian 8.2 with Qt 5.4.2. Change-Id: I2dc0d417fb6f402dda2f7575a83ca3faf4eb63cf
2015-08-11Fix crash on trellis shortcuts if no chat window is openTobias Markmann
Test-Information: Verified that using trellis shortcuts does not crash Swift anymore if no chat window is open. Change-Id: Ie5c7b4675c89c8481cad48f2a348e6520ac42b13
2015-05-26Fix trellis related bugsTobias Markmann
Bugs like: * Tab title not matching shown chat window * Duplicated tab titles after tab movement Swift is also subject to QTBUG-36455, which is fixed for Qt >= 5.3.0. This commit removes the use of application wide focus handlers in QtChatWindow class, the QtChatWindow::qAppFocusChanged method. The reason for this is due to the way QTabBar::moveTab is implemented in Qt which we use for the Trellis feature. Internally QTabBar::moveTab first adjusts its tab bar labels, then removes the tab from its old location in the internal QStackedLayout and then inserts it in the new location. After the remove Qt gives focus to another widget via a focus change that does not go through the event loop of the application and is not interceptable with eventFilters. Previously we would set the focus and call other signals in the application wide focus change handler which then used the currently inconsistent QTabBar/QTabWidget. Test-Information: Tested tab switching and movement on Windows 8 (Qt 5.3.2), OS X 10.9.5 (Qt 5.4.3) and Ubuntu 14.04.2 LTS (Qt 5.4.3). Change-Id: Ief423c4add58a90279109f72fac95fc58cb71111
2015-05-26Set QtGetridSelectionDialog to frameless window to enable cursor changesTobias Markmann
Popup windows cannot change the mouse cursor on OS X. A frameless window looks the same. Test-Information: Tested on OS X 10.9.5 with Qt 5.4. Change-Id: Ia97e645be2ad1e5063f0cd8ef54344b63274b2d1
2015-05-26Add visual resize indicator in bottom right corner of QtGridSelectionDialogTobias Markmann
Test-Information: Tested on Mac OS X 10.9.5 with Qt 5.4. Change-Id: I7581ae478fb347bb468b28997be963799b82b2cb
2015-04-03Use SizeAllCursor for trellis resize dialogTobias Markmann
This is should be a union of the two diagonal resize cursors on most systems and is provided by Qt. Test-Information: Tested on Windows 7 and OS X 10.9.5. On OS X the cursor does not look like the union of the two diagonal resize cursors with Qt 5.4.1. Change-Id: I442f7e25b9bf0a3e6868cbcc9bd0a48d24da718d
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-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-11Fix code styleTobias Markmann
Test-Information: None. Change-Id: Iaff0108547658e1b103905c78fac5d1faf3a15e1
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
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