diff --git a/src/platform/qt/CoreController.cpp b/src/platform/qt/CoreController.cpp index 40951bec6..014493a74 100644 --- a/src/platform/qt/CoreController.cpp +++ b/src/platform/qt/CoreController.cpp @@ -868,7 +868,7 @@ void CoreController::startVideoLog(const QString& path, bool compression) { if (!vf) { return; } - startVideoLog(vf); + startVideoLog(vf, compression); } void CoreController::startVideoLog(VFile* vf, bool compression) { diff --git a/src/platform/qt/LogConfigModel.cpp b/src/platform/qt/LogConfigModel.cpp index 0320d2497..aa9ab1e81 100644 --- a/src/platform/qt/LogConfigModel.cpp +++ b/src/platform/qt/LogConfigModel.cpp @@ -56,7 +56,12 @@ bool LogConfigModel::setData(const QModelIndex& index, const QVariant& value, in if (levels < 0) { levels = m_levels; } - levels ^= 1 << (index.column() - 1); + int bit = 1 << (index.column() - 1); + if (value.value() == Qt::Unchecked) { + levels &= ~bit; + } else { + levels |= bit; + } } if (index.row() == 0) { beginResetModel(); @@ -102,18 +107,27 @@ QVariant LogConfigModel::headerData(int section, Qt::Orientation orientation, in } QModelIndex LogConfigModel::index(int row, int column, const QModelIndex& parent) const { + if (parent.isValid()) { + return QModelIndex(); + } return createIndex(row, column, nullptr); } -QModelIndex LogConfigModel::parent(const QModelIndex& index) const { +QModelIndex LogConfigModel::parent(const QModelIndex&) const { return QModelIndex(); } int LogConfigModel::columnCount(const QModelIndex& parent) const { + if (parent.isValid()) { + return 0; + } return 8; } int LogConfigModel::rowCount(const QModelIndex& parent) const { + if (parent.isValid()) { + return 0; + } return m_cache.size() + 1; } @@ -146,4 +160,4 @@ void LogConfigModel::save(ConfigController* config) { } m_controller->setLevels(m_levels); m_controller->save(config); -} \ No newline at end of file +} diff --git a/src/platform/qt/Window.cpp b/src/platform/qt/Window.cpp index 0e48ac28a..7e68dbfdb 100644 --- a/src/platform/qt/Window.cpp +++ b/src/platform/qt/Window.cpp @@ -1511,7 +1511,7 @@ void Window::setupMenu(QMenuBar* menubar) { addGameAction(tr("View &tiles..."), "tileWindow", openControllerTView(), "tools"); addGameAction(tr("View &map..."), "mapWindow", openControllerTView(), "tools"); - Action* frameWindow = addGameAction(tr("&Frame inspector..."), "frameWindow", [this]() { + addGameAction(tr("&Frame inspector..."), "frameWindow", [this]() { if (!m_frameView) { m_frameView = new FrameView(m_controller); connect(this, &Window::shutdown, this, [this]() {