优化PowerMonitor输出
This commit is contained in:
parent
2ec185654f
commit
29d988cd7f
|
|
@ -23,14 +23,18 @@ void PowerMonitor::initLogin1Dbus() {
|
|||
);
|
||||
|
||||
if (connectOk) {
|
||||
qDebug() << "=================================================";
|
||||
qDebug() << "✅ 成功连接 login1 电源管理接口";
|
||||
qDebug() << "=================================================";
|
||||
} else {
|
||||
qDebug() << "=================================================";
|
||||
qDebug() << "❌ 连接 login1 信号失败:" << QDBusConnection::systemBus().lastError().message();
|
||||
qDebug() << "=================================================";
|
||||
}
|
||||
} else {
|
||||
qDebug() << "=================================================";
|
||||
qDebug() << "❌ 无法创建 login1 接口:" << m_login1Interface->lastError().message();
|
||||
// 可选:fallback 到 GNOME 专用会话管理接口(见下文)
|
||||
// initGnomeSessionManager();
|
||||
qDebug() << "=================================================";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -38,11 +42,13 @@ void PowerMonitor::initLogin1Dbus() {
|
|||
void PowerMonitor::onPrepareForSleep(bool enteringSleep) {
|
||||
if (enteringSleep) {
|
||||
// 系统即将进入 休眠/待机 状态
|
||||
qDebug() << "=================================================";
|
||||
qDebug() << "\n📥 系统即将进入睡眠(休眠/待机)";
|
||||
emit aboutToSleep();
|
||||
} else {
|
||||
// 系统从睡眠中唤醒
|
||||
qDebug() << "📤 系统已从睡眠中唤醒";
|
||||
qDebug() << "📤 系统已从睡眠中唤醒\n";
|
||||
qDebug() << "=================================================";
|
||||
emit aboutToWakeUp();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -788,7 +788,7 @@ void VulkanWidget::renderFrame()
|
|||
recreateSwapchain();
|
||||
return;
|
||||
} else if (result != VK_SUCCESS && result != VK_SUBOPTIMAL_KHR) {
|
||||
qDebug() << "Failed to acquire swapchain image";
|
||||
//qDebug() << "Failed to acquire swapchain image";
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -817,7 +817,7 @@ void VulkanWidget::renderFrame()
|
|||
|
||||
result = vkQueueSubmit(m_queue, 1, &submitInfo, m_inFlightFences[m_currentFrame]);
|
||||
if (result != VK_SUCCESS) {
|
||||
qDebug() << "Failed to submit draw command buffer";
|
||||
qDebug() << "Failed to submit draw command buffer! Error code = " << result;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue