From 7feefe9d5c922481081d31b12e02f42d9e028ef9 Mon Sep 17 00:00:00 2001 From: aqua Date: Wed, 1 May 2024 11:17:07 +0300 Subject: Drop python-kcofiglib build time dependency --- lib/configuration/qt_specialization.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'lib/configuration/qt_specialization.cpp') diff --git a/lib/configuration/qt_specialization.cpp b/lib/configuration/qt_specialization.cpp index a97ed2b..cd7a99a 100644 --- a/lib/configuration/qt_specialization.cpp +++ b/lib/configuration/qt_specialization.cpp @@ -1,23 +1,23 @@ #include "configuration.h" template <> -[[nodiscard]] std::optional Configuration::value(const char *path) const +[[nodiscard]] std::optional Configuration::value(const char *path, std::source_location location) const { - const auto result = value(path); + const auto result = value(path, location); return result ? std::make_optional(QString::fromStdString(result.value())) : std::nullopt; } template <> -[[nodiscard]] std::optional Configuration::value(const char *path) const +[[nodiscard]] std::optional Configuration::value(const char *path, std::source_location location) const { - const auto result = value(path); + const auto result = value(path, location); return result ? std::make_optional(QString::fromStdString(result.value()).split(';')) : std::nullopt; } template <> -QAction &Configuration::shortcut(QAction &action, const char *name) const +QAction &Configuration::shortcut(QAction &action, const char *name, const std::source_location location) const { - if(const auto result = value(name)) { + if(const auto result = value(name, location)) { const QString old_tooltip = action.toolTip(); const auto &result_value = result.value(); @@ -28,9 +28,9 @@ QAction &Configuration::shortcut(QAction &action, const char *name) const } template <> -QKeySequence &Configuration::shortcut(QKeySequence &sequence, const char *name) const +QKeySequence &Configuration::shortcut(QKeySequence &sequence, const char *name, const std::source_location location) const { - if(const auto result = value(name)) { + if(const auto result = value(name, location)) { const auto &result_value = result.value(); sequence = QKeySequence::fromString(result_value); -- cgit v1.2.1