Route desktop codec diagnostics through the shared log

Quiet capability probes, preserve runtime errors, and register the desktop portal application. Add logging and desktop launcher regression coverage.
This commit is contained in:
evgeny committed 2026-10-21 15:45:40 +02:00
1 parent 9ba78c084b
commit 7c814f5cb9
17 files changed
+349 -44

No files matched your search

+7
View File
@@ -21,6 +21,8 @@
#include "call_camera_capture.h"
#include "call_video_engine.h"
#include "single_instance.h"
#include "desktop_integration.h"
#include "gui_log.h"
#include "config_parser.h"
#include <cstdio>
#include <cstring>
@@ -112,10 +114,13 @@ int main(int argc, char *argv[]) {
debug_config_init();
/* До чтения конфига видны запуск и IPC; затем уровень заменяет настройка профиля. */
debug_set_level(DEBUG_LEVEL_INFO);
installGuiLogHandler();
#ifdef _WIN32
const bool consoleAttached = attach_parent_console();
#endif
#ifdef Q_OS_LINUX
/* libva пишет INFO напрямую в stderr; ошибки сохраняем, явную настройку пользователя не заменяем. */
if (!qEnvironmentVariableIsSet("LIBVA_MESSAGING_LEVEL")) qputenv("LIBVA_MESSAGING_LEVEL", "1");
/* На Wayland композитор владеет позицией окна (move() игнорируется) —
* для полноценного ручного move/resize с пропорцией запускаемся через XWayland. */
if (!qEnvironmentVariableIsSet("QT_QPA_PLATFORM"))
@@ -125,6 +130,7 @@ int main(int argc, char *argv[]) {
app.setApplicationName("vibechat");
app.setApplicationVersion(QStringLiteral(VIBECHAT_VERSION));
app.setDesktopFileName("org.utun.vibechat");
registerDesktopApplication(QCoreApplication::applicationFilePath());
app.setWindowIcon(QIcon(":/icons/app_icon.png"));
app.setQuitOnLastWindowClosed(false);
const bool minimized = app.arguments().contains(QStringLiteral("--minimized"));
@@ -332,6 +338,7 @@ int main(int argc, char *argv[]) {
QString lvl = cfg.debugLevel().trimmed();
if (lvl.isEmpty()) lvl = QStringLiteral("info");
debug_apply_global_level(lvl.toUtf8().constData());
if (!cfg.debugCategories().trimmed().isEmpty()) debug_parse_config(cfg.debugCategories().toUtf8().constData());
DEBUG_INFO(DEBUG_CATEGORY_GENERAL, "vibechat: version=%s", qPrintable(app.applicationVersion()));
DEBUG_INFO(DEBUG_CATEGORY_GENERAL, "GUI dark palette: window=%s base=%s alternate=%s button=%s light=%s",
qPrintable(p.color(QPalette::Window).name()), qPrintable(p.color(QPalette::Base).name()),