diff options
Diffstat (limited to 'src/helpers/AsyncDialogBox.cpp')
| -rw-r--r-- | src/helpers/AsyncDialogBox.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/helpers/AsyncDialogBox.cpp b/src/helpers/AsyncDialogBox.cpp index b3688680..4cef4252 100644 --- a/src/helpers/AsyncDialogBox.cpp +++ b/src/helpers/AsyncDialogBox.cpp @@ -12,7 +12,7 @@ static std::vector<std::pair<pid_t, WP<CAsyncDialogBox>>> asyncDialogBoxes; // SP<CAsyncDialogBox> CAsyncDialogBox::create(const std::string& title, const std::string& description, std::vector<std::string> buttons) { if (!NFsUtils::executableExistsInPath("hyprland-dialog")) { - Debug::log(ERR, "CAsyncDialogBox: cannot create, no hyprland-dialog"); + Log::logger->log(Log::ERR, "CAsyncDialogBox: cannot create, no hyprland-dialog"); return nullptr; } @@ -63,7 +63,7 @@ void CAsyncDialogBox::onWrite(int fd, uint32_t mask) { // TODO: can we avoid this without risking a blocking read()? int fdFlags = fcntl(fd, F_GETFL, 0); if (fcntl(fd, F_SETFL, fdFlags | O_NONBLOCK) < 0) { - Debug::log(ERR, "CAsyncDialogBox::onWrite: fcntl 1 failed!"); + Log::logger->log(Log::ERR, "CAsyncDialogBox::onWrite: fcntl 1 failed!"); return; } @@ -73,13 +73,13 @@ void CAsyncDialogBox::onWrite(int fd, uint32_t mask) { // restore the flags (otherwise libwayland won't give us a hangup) if (fcntl(fd, F_SETFL, fdFlags) < 0) { - Debug::log(ERR, "CAsyncDialogBox::onWrite: fcntl 2 failed!"); + Log::logger->log(Log::ERR, "CAsyncDialogBox::onWrite: fcntl 2 failed!"); return; } } if (mask & (WL_EVENT_HANGUP | WL_EVENT_ERROR)) { - Debug::log(LOG, "CAsyncDialogBox: dialog {:x} hung up, closed."); + Log::logger->log(Log::DEBUG, "CAsyncDialogBox: dialog {:x} hung up, closed."); m_promiseResolver->resolve(m_stdout); std::erase_if(asyncDialogBoxes, [this](const auto& e) { return e.first == m_dialogPid; }); @@ -102,7 +102,7 @@ SP<CPromise<std::string>> CAsyncDialogBox::open() { int outPipe[2]; if (pipe(outPipe)) { - Debug::log(ERR, "CAsyncDialogBox::open: failed to pipe()"); + Log::logger->log(Log::ERR, "CAsyncDialogBox::open: failed to pipe()"); return nullptr; } @@ -113,14 +113,14 @@ SP<CPromise<std::string>> CAsyncDialogBox::open() { m_readEventSource = wl_event_loop_add_fd(g_pEventLoopManager->m_wayland.loop, m_pipeReadFd.get(), WL_EVENT_READABLE, ::onFdWrite, this); if (!m_readEventSource) { - Debug::log(ERR, "CAsyncDialogBox::open: failed to add read fd to loop"); + Log::logger->log(Log::ERR, "CAsyncDialogBox::open: failed to add read fd to loop"); return nullptr; } m_selfReference = m_selfWeakReference.lock(); if (!proc.runAsync()) { - Debug::log(ERR, "CAsyncDialogBox::open: failed to run async"); + Log::logger->log(Log::ERR, "CAsyncDialogBox::open: failed to run async"); wl_event_source_remove(m_readEventSource); return nullptr; } |
