From 5058d5d1b40ad346db4df7b147b4f0e70cb1336e Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Tue, 24 Nov 2020 19:36:53 +0200 Subject: [PATCH] Provide more information about colord devices This helps a lot with identifying outputs in the color corrections kcm. --- .../colord-integration/colordintegration.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/plugins/colord-integration/colordintegration.cpp b/plugins/colord-integration/colordintegration.cpp index 4d8a37ecb3..e51df048c8 100644 --- a/plugins/colord-integration/colordintegration.cpp +++ b/plugins/colord-integration/colordintegration.cpp @@ -44,6 +44,25 @@ void ColordIntegration::handleOutputAdded(AbstractOutput *output) properties.insert(QStringLiteral("Kind"), QStringLiteral("display")); properties.insert(QStringLiteral("Colorspace"), QStringLiteral("RGB")); + const QString vendor = output->manufacturer(); + if (!vendor.isEmpty()) { + properties.insert(QStringLiteral("Vendor"), vendor); + } + + const QString model = output->model(); + if (!model.isEmpty()) { + properties.insert(QStringLiteral("Model"), model); + } + + const QString serialNumber = output->serialNumber(); + if (!serialNumber.isEmpty()) { + properties.insert(QStringLiteral("Serial"), serialNumber); + } + + if (output->isInternal()) { + properties.insert(QStringLiteral("Embedded"), QString()); + } + QDBusPendingReply reply = m_colordInterface->CreateDevice(output->name(), QStringLiteral("temp"), properties);