Skip to content

Conversation

@kwsantiago
Copy link

@kwsantiago kwsantiago commented Oct 12, 2025

Replace QtWinExtras (removed in Qt6) with native Windows ITaskbarList3 COM API, making the Windows taskbar progress feature compatible with both Qt5 and Qt6.

Closes #191

Changes

  • Replace QtWinExtras with direct ITaskbarList3 COM interface
  • Create new WinTaskbarProgress class using Windows COM API
  • Use consistent Q_OS_WIN macro for Windows platform detection
  • Update CMakeLists.txt to link ole32 instead of Qt WinExtras

Implementation

The new WinTaskbarProgress class uses Windows ITaskbarList3 directly, maintaining full feature parity with the Qt5 implementation while working with both Qt5 and Qt6.

@luke-jr
Copy link
Collaborator

luke-jr commented Nov 4, 2025

I think this would be easier to review if the Qt6 depends changes were split to a separate PR, and the fixups squashed.

@kwsantiago kwsantiago force-pushed the kwsantiago/191-win-taskbar-progress-qt6 branch from 3c0a6ca to 9757d00 Compare November 4, 2025 21:53
@kwsantiago
Copy link
Author

I've split this PR as requested:

@luke-jr
Copy link
Collaborator

luke-jr commented Nov 5, 2025

My thought was more of having this PR just port win_taskbar_progress to native Windows, and have the Qt6 PR independently change depends builds, neither depending on each other.

@kwsantiago kwsantiago force-pushed the kwsantiago/191-win-taskbar-progress-qt6 branch from 9757d00 to 8986737 Compare November 6, 2025 21:16
@kwsantiago
Copy link
Author

Gotcha @luke-jr I've updated both PRs to reflect.

@kwsantiago kwsantiago force-pushed the kwsantiago/191-win-taskbar-progress-qt6 branch 2 times, most recently from bdc4742 to 52502ef Compare November 7, 2025 16:53
@kwsantiago kwsantiago requested a review from luke-jr November 7, 2025 16:55
@kwsantiago kwsantiago force-pushed the kwsantiago/191-win-taskbar-progress-qt6 branch from 52502ef to 0dc86b2 Compare November 7, 2025 17:26
@kwsantiago kwsantiago force-pushed the kwsantiago/191-win-taskbar-progress-qt6 branch from 0dc86b2 to b895717 Compare November 7, 2025 19:18
@kwsantiago kwsantiago requested a review from luke-jr November 7, 2025 19:27
@kwsantiago kwsantiago force-pushed the kwsantiago/191-win-taskbar-progress-qt6 branch from b895717 to c527b35 Compare November 7, 2025 19:36
Comment on lines 371 to 372
"Qt${WITH_QT_VERSION}::WinExtras"
$<$<PLATFORM_ID:Windows>:dwmapi>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are still needed?

Comment on lines +260 to +261
$<$<AND:$<PLATFORM_ID:Windows>,$<BOOL:${BITCOIN_QT_WIN_TASKBAR}>>:wintaskbarprogress.cpp>
$<$<AND:$<PLATFORM_ID:Windows>,$<BOOL:${BITCOIN_QT_WIN_TASKBAR}>>:wintaskbarprogress.h>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably cleaner to just move this below with the if(WITH_TASKBAR_PROGRESS)?

Comment on lines +12 to +13
#pragma comment(lib, "ole32.lib")
#pragma comment(lib, "shell32.lib")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't be necessary, right?

QWindow* m_window = nullptr;
int m_value = 0;
bool m_visible = false;
void* m_taskbar_button = nullptr; // ITaskbarList3*
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this a void*? Better to avoid casting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Port win_taskbar_progress (#14137) to Qt6

2 participants