Skip to content

Commit 7578f84

Browse files
committed
update aui
1 parent 6929b08 commit 7578f84

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/MainWindow.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ using namespace declarative;
1111
MainWindow::MainWindow(_<MyUpdater> updater)
1212
: AWindow("Project template app", 300_dp, 200_dp), mUpdater(std::move(updater)) {
1313
setContents(Centered { Vertical {
14-
Centered { Icon { ":img/icon.svg" } with_style { FixedSize(64_dp) } },
14+
Centered { Icon { ":img/icon.svg" } AUI_WITH_STYLE { FixedSize(64_dp) } },
1515
Centered { Label { "Hello world from AUI!" } },
1616
_new<AButton>("Visit GitHub repo")
1717
.connect(&AView::clicked, this, [] { APlatform::openUrl("https://github.com/aui-framework/aui"); }),
@@ -22,7 +22,7 @@ MainWindow::MainWindow(_<MyUpdater> updater)
2222
&AView::clicked, this, [] { APlatform::openUrl("https://github.com/aui-framework/aui/issues/new"); }),
2323
CustomLayout {} & mUpdater->status.readProjected([&updater = mUpdater](const std::any& status) -> _<AView> {
2424
if (std::any_cast<AUpdater::StatusIdle>(&status)) {
25-
return _new<AButton>("Check for updates").connect(&AView::clicked, slot(updater)::checkForUpdates);
25+
return _new<AButton>("Check for updates").connect(&AView::clicked, AUI_SLOT(updater)::checkForUpdates);
2626
}
2727
if (std::any_cast<AUpdater::StatusCheckingForUpdates>(&status)) {
2828
return Label { "Checking for updates..." };
@@ -35,7 +35,7 @@ MainWindow::MainWindow(_<MyUpdater> updater)
3535
}
3636
if (std::any_cast<AUpdater::StatusWaitingForApplyAndRestart>(&status)) {
3737
return _new<AButton>("Apply update and restart")
38-
.connect(&AView::clicked, slot(updater)::applyUpdateAndRestart);
38+
.connect(&AView::clicked, AUI_SLOT(updater)::applyUpdateAndRestart);
3939
}
4040
return nullptr;
4141
}),

src/MyUpdater.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
static constexpr auto LOG_TAG = "MyUpdater";
1616

1717
AFuture<void> MyUpdater::checkForUpdatesImpl() {
18-
return async {
18+
return AUI_THREADPOOL {
1919
try {
2020
auto githubLatestRelease = aui::updater::github::latestRelease("aui-framework", "example_app");
2121
ALogger::info(LOG_TAG) << "Found latest release: " << githubLatestRelease.tag_name;
@@ -71,7 +71,7 @@ AFuture<void> MyUpdater::checkForUpdatesImpl() {
7171
}
7272

7373
AFuture<void> MyUpdater::downloadUpdateImpl(const APath& unpackedUpdateDir) {
74-
return async {
74+
return AUI_THREADPOOL {
7575
try {
7676
AUI_ASSERTX(!mDownloadUrl.empty(), "make a successful call to checkForUpdates first");
7777
downloadAndUnpack(mDownloadUrl, unpackedUpdateDir);

0 commit comments

Comments
 (0)