Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-89564

Clean up QtWinExtras for Qt 6

    XMLWordPrintable

Details

    • Task
    • Resolution: Done
    • P2: Important
    • None
    • None
    • Extras: Win
    • None
    • Windows

    Description

      QtWin namespace

      to/fromHBITMAP/ICON

      Covered by existing QImage conversion functions.

      QtWin::createMask() is equivalent to image.convertToFormat(QImage::Format_Mono).invertPixels().toHBITMAP().

      to/fromHRGN

      Covered by existing QRegion conversion functions.

      stringFromHresult

      Simple wrapper around _com_error::ErrorMessage(). Duplicated in QtCore and a few other places. Can't add direct QDebug overload due to HRESULT being a typedef long, but functionality already covered by QSystemError::NativeError and qt_error_string() (API is in itself in need of some cleanups, but that's another story).

      errorStringFromHresult

      Giant mapping from error codes to literal error name, .e.g 0x80004004 to "E_ABORT". Only used internally in WinExtras, not in any other Qt module or on code on GitHub.

      colorizationColor/isCompositionOpaque

      Functionality around the Windows theme accent color. Concept exists on other platforms too, should be exposed in a cross platform manner, e.g. a new QPalette role or platform theme property.

      (set)WindowExcludedFromPeek

      Functionality to opt out of the Windows desktop peek feature. The feature is disabled by default in Windows 10. Fringe use-case that can be solved by calling DwmSetWindowAttribute with DWMWA_EXCLUDED_FROM_PEEK directly.

      (set)WindowDisallowPeek

      Functionality to opt out of showing a preview of the window when hovering over it in the Window task bar. Fringe use-case that can be solved by calling DwmSetWindowAttribute with DWMWA_DISALLOW_PEEK directly.

      setWindowFlip3DPolicy

      Windows 7 feature, no longer supported in Windows 10.

      extendFrameIntoClientArea

      Extends the glass frame into the client area of the specified window. Similar functionality exists as private APIs on macOS. Should be replaced by cross platform QWindow API to control the relationship between the client area and the non-client area (frame/titlebar). QTBUG-94010

      setWindowNonClientAreaRenderingPolicy

      Introduced in Qt 6.0 (for a module that was not part of Qt 6). Fringe use-case that can be solved by calling DwmSetWindowAttribute with DWMWA_NCRENDERING_POLICY directly. Should be reconsidered and aligned with cross platform solution to extendFrameIntoClientArea.

      enableBlurBehind

      Deprecated as of Windows 8. If needed or still relevant, it should be aligned with similar features on e.g. macOS, perhaps as QWindow flags/API.

      setCurrentProcessExplicitAppUserModelID

      Minimal wrapper around SetCurrentProcessExplicitAppUserModelID. Can be replaced in user code by SetCurrentProcessExplicitAppUserModelID(id.toStdWString().c_str()); Not used in any Qt module.

      markFullscreenWindow

      Documented as "You do not usually need to call this function". Shouldn't be needed, should be automatically handled based on a QWindow's window state.

      taskbarActivateTab(Alt)

      API around ITaskbarList to activate the tab button of a window programatically without activating the associated Window. Fringe use-case. Not used in any Qt module or by code on GitHub.

      taskbar(Add/Delete)Tab

      API around ITaskbarList to manage additional toolbar buttons. Associated to a window, so would seem a better API to control the window tab-bar visibility of the window directly. Fringe use-case. Not used in any Qt module or by code on GitHub.

      QWidget overloads of all of the above

      Should expect people who interact with native API wrappers like these to work at the QWindow level.

      QML wrappers for all of the above.

      Should expect people who interact with native API wrappers like these to to expose the relevant functionality from C++ to QML.

      Classes

      QWinMime

      Windows specific mapping to QMimeData mimetypes. Overlaps with similar use-case for macOS. Should have cross platform api. QTBUG-93632

      QWinJumpList (QWinJumpListCategory/QWinJumpListItem)

      Ability to add entries to the Windows taskbar right-click menu. Overlaps with use-case handled by QMenu:: setAsDockMenu() on macOS. Should be exposed as cross platform API, e.g. QGuiApplication::setMenu(). QTBUG-94007

      QWinTaskbarButton (QWinTaskbarProgress)

      Manage taskbar overlay icon and progress. Useful use-case for other platforms (https://github.com/sindresorhus/DockProgress), should be cross platform API. Moved to native interface for QWindowsWindow if needed. QTBUG-94009 and QTBUG-94008

      QWinThumbnailToolBar (QWinThumbnailToolBarButton)

      Used to add additional controls to the windows task bar peek menu. Not used in any Qt module or in code on GitHub.
       

      Attachments

        1. screenshot-2.png
          screenshot-2.png
          68 kB
        2. screenshot-1.png
          screenshot-1.png
          105 kB

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              owolff Oliver Wolff
              owolff Oliver Wolff
              Veli-Pekka Heinonen Veli-Pekka Heinonen
              Votes:
              2 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes