Skip to content

Commit

Permalink
Return part of the taskbar indicator
Browse files Browse the repository at this point in the history
  • Loading branch information
winseros committed May 29, 2024
1 parent 60658a2 commit 9bcdc9a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pbom/ui/taskwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace pboman3::ui {
log_(nullptr),
doneText_("Done") {
ui_->setupUi(this);
// taskbar_ = QSharedPointer<TaskbarIndicator>(new TaskbarIndicator(winId()));
taskbar_ = QSharedPointer<TaskbarIndicator>(new TaskbarIndicator(winId()));
setupConnections();
}

Expand Down
2 changes: 1 addition & 1 deletion pbom/ui/taskwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ namespace pboman3::ui {
QHash<ThreadId, ProgressWidget*> progressBars_;
QPlainTextEdit* log_;
QString doneText_;
// QSharedPointer<TaskbarIndicator> taskbar_;
QSharedPointer<TaskbarIndicator> taskbar_;

void setupConnections();

Expand Down
5 changes: 2 additions & 3 deletions pbom/ui/win32/win32taskbarindicator.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
#include "win32taskbarindicator.h"
#include <Windows.h>

namespace pboman3::ui {
Win32TaskbarIndicator::Win32TaskbarIndicator(WId windowId)
: window_(reinterpret_cast<HWND>(windowId)), // NOLINT(performance-no-int-to-ptr)
isErr_(false) {
const HRESULT hr = CoCreateInstance(CLSID_TaskbarList, NULL, CLSCTX_INPROC_SERVER, IID_ITaskbarList3,
const HRESULT hr = CoCreateInstance(CLSID_TaskbarList, nullptr, CLSCTX_INPROC_SERVER, IID_ITaskbarList3,
reinterpret_cast<LPVOID*>(&progress_));
if (!SUCCEEDED(hr))
progress_ = 0;
progress_ = nullptr;
}

Win32TaskbarIndicator::~Win32TaskbarIndicator() {
Expand Down

0 comments on commit 9bcdc9a

Please sign in to comment.