From 14fd0465a12a61348e1ba3b19da56b0ff911e6a6 Mon Sep 17 00:00:00 2001 From: Reion Wong Date: Fri, 2 Aug 2024 03:24:47 +0800 Subject: [PATCH] fix(screen): API changes --- .vscode/settings.json | 5 +++++ screen/confighandler.cpp | 2 +- screen/outputmodel.cpp | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..3e839bf --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "files.associations": { + "variant": "cpp" + } +} \ No newline at end of file diff --git a/screen/confighandler.cpp b/screen/confighandler.cpp index b4838d1..96d24d8 100644 --- a/screen/confighandler.cpp +++ b/screen/confighandler.cpp @@ -65,7 +65,7 @@ void ConfigHandler::setConfig(KScreen::ConfigPtr config) connect(m_config.data(), &KScreen::Config::outputRemoved, this, [this]() { Q_EMIT outputConnect(false); }); - connect(m_config.data(), &KScreen::Config::primaryOutputChanged, this, &ConfigHandler::primaryOutputChanged); + // connect(m_config.data(), &KScreen::Config::primaryOutputChanged, this, &ConfigHandler::primaryOutputChanged); Q_EMIT outputModelChanged(); } diff --git a/screen/outputmodel.cpp b/screen/outputmodel.cpp index 71e8daa..4e16013 100644 --- a/screen/outputmodel.cpp +++ b/screen/outputmodel.cpp @@ -223,7 +223,7 @@ void OutputModel::add(const KScreen::OutputPtr &output) } m_outputs.insert(i, Output(output, pos)); - connect(output.data(), &KScreen::Output::isPrimaryChanged, + connect(output.data(), &KScreen::Output::priorityChanged, this, [this, output](){ roleChanged(output->id(), PrimaryRole); });