Commit Graph

17 Commits

Author SHA1 Message Date
Jarek Kobus
eaba657d90 Fix warnings about possible detach of temporary objects
Calling first() or last() on temporary container may
unnecessarily detach the container. Fix it by calling
constFirst() and constLast().

Change-Id: I2460efd5dbee1534eec8a514d9bff2a947bfddf9
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-11-16 22:11:46 +00:00
Eike Ziller
3ee70780b4 Qt6: Sprinkle QLatin1Strings for QStringView comparisons
Task-number: QTCREATORBUG-24098
Change-Id: I2fb79bcfd0537a6704a1ee8db840401d6beca7a0
Reviewed-by: hjk <hjk@qt.io>
2020-10-08 10:38:47 +00:00
Federico Guerinoni
5e486c601f Fix TODO with qAsConst
Change-Id: I457a51ad5c6069fc8b27e3074296189f1a8087c9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-07-13 08:15:07 +00:00
Henning Gruendl
131b672f55 QmlDesigner: Fix initial workspace change
Task-number: QDS-1766
Task-number: QDS-2207
Change-Id: Ibc86b4cf5914cb10e8917198095b90073b159290
Reviewed-by: Aleksei German <aleksei.german@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-25 13:35:20 +00:00
Henning Gruendl
a98c254c59 ADS: Integrate newest base repository commits
* Activate new ADS feature focus highlight
* Remove resources.qrc and related *.svg files
* Clean up new and existing source

Base repository was merged until commit
3de877fe5635ff51a6d1205ca98aad85d204427f

Merged changes from base repository include the following:

* Fix wrong current index when removing a widget from DockAreaLayout
* Fix invisible TabWidget for DockWidgets that are not part of a
  restored state
* Enable ClickFocus for DockWidget to support focussing in case the
  content does not support it
* Move focus related functionality into DockFocusController class
* Add new DockManger config flag FocusStyling
* Add support for focus styling of FloatingWidgetTitleBar
* Improve focus handling when dropping a DockWidget
* Improve highlighting focused DockWidget
* Improve setting of DockWidgetTab focus
* Add styling of focused DockWidget
* Fix docking of floating widgets for macOS
* Fix setting of DockingStateReader file version - use internal file
  version instead of user file version
* Fix saveState() and restoreState() version handling to work like the
  function from QMainWindow
* Fix escape key handling in native window event function if event
  WM_EXITSIZEMOVE occurs
* Implement windows drag handling with native WM_ nonclient area
  messages
* Fix showing DockArea when inserting a DockWidget in a hidden DockArea
* Fix setting DockAreaTabBar index to prevent showing of tab 0 when
  inserting a DockWidget into an area with no current index tab
* Fix wrong insertion order of DockWidget when dropping a floating
  widget to the left or top container drop area
* Fix tab changes position when redocking it to the same position
* Add nullptr check to fix potential nullptr access when closing a
  FloatingDockContainer
* Fix single DockArea cannot be split
* Fix visibility issue when adding dock widget after all other dock
  widgets have ben closed
* Fix FloatingDragPreview flashing of hidden overlay when dragging the
  last visible DockWidget in non opaque docking mode
* Fix FloatingDragPreview preventing dock widget from floating when
  dragging over another dock widget
* Fix DockWidget::setWidget function to test for QAbstractScrollArea
  instead of QScrollArea. Now setWidget properly supports ItemViews like
  QTreeView or QTableView
* Fix wrong display of center drop area when dragging over invisible
  dock area title bar
* Fix bug that drop overlay sometimes was not visible when moving the
  drag preview over a floating window
* Fix dropping of FloatingDragPreview into center of dock container with
  only one single visible dock area. If this happens the dropped dock
  widget needs to get tabified
* Fix crash when trying to make a DockWidget floating in non-opaque mode
  if the DockWidget is not floatable
* Fix DockWidgetTab to provide the right size when starting floating
* Add DockWidget functions setAsCurrentTab, raise, isCurrentTab,
  isTabbed
* Add new config flag HideSingleCentralWidgetTitleBar to enable a
  central single dock widget in the main dock container (dock manager)
  without titlebar
* Fix DockContainerWidget::hasTopLevelDockWidget() and
  DockContainerWidget::topLevelDockArea() to work properly also for the
  main non floating dock container
* Fix ElidingLabel to properly support Qt::ElideNone
* Add setElideMode function to DockWidgetTab
* Add setFullScreen(), setNormal() and isFullScreen() function to
  DockWidget
* Fix takeWidget() function and fixed setWidget() function to handle
  case when there is already a content widget

Task-number: QDS-2180
Change-Id: Ie30648ba329016c91fd19e9b4e12e31e47614b18
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-24 07:56:37 +00:00
Henning Gruendl
95475156e3 QmlDesigner: Add import/export of workspaces
* Add import/export functionality to the workspace manager
* Remove checkFormat functionality
* Add utility functions for workspace and file name conversion
* Use workspace file name extension from DockManager
* Fix a few DockManager comments

Task-number: QDS-1553
Change-Id: I1fa99d3ad85e282b3b11be2425faa4458d8a7778
Reviewed-by: Aleksei German <aleksei.german@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-05-13 09:39:27 +00:00
Henning Gruendl
04265b2651 QmlDesigner: Fix workspace list update on clone
Adds a missing emit of workspaceListChanged when cloning a workspace in
the workspace manager. It will fix a missing update of the workspace
ComboBox in the toolbar.

Change-Id: Ic2eb3fe516841ba13456c7d94fe699518988ff7a
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-04-21 09:45:08 +00:00
Henning Gruendl
e3e62d852f ADS: Fix workspace dialog on removal
- Fix an issue where the list of workspaces is not correctly updated
  after removal of a workspace in the dialog
- Fix initial sorting of the workspace model

Change-Id: I0c16aabc1fdcc2690fcb83e40b0d5d16cb6c72ba
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-03-13 14:34:53 +00:00
Henning Gruendl
9d4a6092d2 ADS: Fix Preset sync failure if directory missing
Change-Id: I23ed2a12753058b36a708c9aff64291782b73809
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-03-09 14:28:21 +00:00
Henning Gruendl
73aaa2a381 ADS: Hide detached window if not in design mode
Task-number: QDS-1672
Change-Id: Ia20113cb9025c19194d87920cf060d2b9791e52a
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-03-09 11:40:19 +00:00
Henning Gruendl
5683f2df85 ADS: Cleanup workspace manager workflow
- Add workspace presets
- Add reset button to workspace manager
- Fix last workspace settings save/restore
- Move functionality from DesignModeWidget to DockManager
- Remove factory default workspace
- Cleanup a few if statements

Task-number: QDS-1699
Change-Id: I282dd6162a5a36041f8cd2aacd7407750d54cc22
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-03-05 11:12:51 +00:00
Tobias Hunger
b5ba4dcb16 ADS: Properly initialize DockManager
Change-Id: I2728c6d7dd6db736be14efc71a5ab62efc40d6ee
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-03-03 16:01:53 +00:00
Tobias Hunger
95182dc6b9 ADS: Remove struct from DockManager
We do not use struct in Qt Creator.

Change-Id: I7755d66bc7b77825ab17ed333b23cbe36e52ff72
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-03-03 16:00:50 +00:00
Tim Jenssen
805cc24bec ADS: DockManager: Handle potential read errors for XML data
Change-Id: I63f6dee64a26abb4f5102faad2b914b844847f14
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-03-03 15:53:39 +00:00
Christian Kandeler
21ab7e59d7 AdvandedDockingSystem: Fix deprecation warnings
Change-Id: I21193c2b275f9c11d25eef11bdbe2931ad2ea4ff
Reviewed-by: hjk <hjk@qt.io>
2020-02-21 13:47:44 +00:00
Christian Stenger
bd428b2f13 ADS: Do not enable debug log by default
Change-Id: I9e3f9608b5710b03c3e6089b5bfa40b651a865dc
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-02-21 09:07:52 +00:00
Henning Gruendl
8f686e985c Add Advanced Docking System library
This library is a fork of the following repository
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System
Development started from the following commit
1de42a9766134eecd2611c2b4e209d3e0ede74d2
Incorporate all commits until
3ffbbfb6d01ff211d8349027221a19b1419296b5

 - Rename variables and files to follow the Qt style guide
 - General code cleanup (remove goto, fix typos, add overrides, remove
   explicit slots specifier, replace string-based with functor-based
   connections, replace dynamic_cast with qobject_cast)
 - Replace most preprocessor instructions Q_OS_LINUX/Q_OS_MACOS with
   Utils::HostOsInfo
 - Remove all QT_VERSION preprocessor instructions below 5.11
 - Change loading and storage of workspaces. Store workspaces in
   separate file instead of a list in the Settings.ini
 - Add workspace dialog, model and view for managing workspaces
 - Rename XML tags and use enum/bool instead of ascii art/numbers as
   attribute values. Use base64 instead of hex for storing geometry info
 - Remove internal style sheets
 - Add more build systems (qmake, qbs)
 - Adapt copyright header
 - Remove unix specific build rules
 - Replace ADS_PRINT with QLoggingCategory
 - Replace Java-style with STL-style iterators

Change-Id: Icf8c2fbaccec9680df83c6e2100e3446a090a437
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-02-20 16:14:52 +00:00