From f71cade8e2948abaede9c7a5447c4f902709fe7b Mon Sep 17 00:00:00 2001 From: Sergey Chupligin Date: Wed, 5 Feb 2025 18:49:23 +0300 Subject: [PATCH] MGCongig is deplecated --- src/core/sizing.cpp | 10 +++++----- src/core/theme.cpp | 4 ++-- src/core/theme.h | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/core/sizing.cpp b/src/core/sizing.cpp index 11127d0..dcc1ed0 100644 --- a/src/core/sizing.cpp +++ b/src/core/sizing.cpp @@ -20,7 +20,7 @@ #include "sizing.h" #include "logging.h" -#include +#include #include #include #include @@ -32,8 +32,8 @@ Sizing::Sizing(QObject* parent) , m_screenDPI(0) { // All sizes we get from LipstickSettings::exportScreenProperties() - MGConfItem* physicalDotsPerInchConf = new MGConfItem("/lipstick/screen/primary/physicalDotsPerInch"); - connect(physicalDotsPerInchConf, &MGConfItem::valueChanged, this, &Sizing::recalcConstants); + MDConfItem* physicalDotsPerInchConf = new MDConfItem("/lipstick/screen/primary/physicalDotsPerInch"); + connect(physicalDotsPerInchConf, &MDConfItem::valueChanged, this, &Sizing::recalcConstants); if (physicalDotsPerInchConf->value().isNull()) { QScreen* primaryScreen = QGuiApplication::primaryScreen(); physicalDotsPerInchConf->set(primaryScreen->physicalDotsPerInch()); @@ -45,7 +45,7 @@ Sizing::Sizing(QObject* parent) void Sizing::setDpScaleFactor() { - MGConfItem* dpScaleFactorValue = new MGConfItem(QStringLiteral("/nemo/apps/libglacier/dpScaleFactor")); + MDConfItem* dpScaleFactorValue = new MDConfItem(QStringLiteral("/nemo/apps/libglacier/dpScaleFactor")); float value = dpScaleFactorValue->value("0").toFloat(); if (value != m_dpScaleFactor && value != 0) { @@ -74,7 +74,7 @@ float Sizing::mm(float value) void Sizing::recalcConstants() { - qreal dpi = MGConfItem("/lipstick/screen/primary/physicalDotsPerInch").value().toReal(); + qreal dpi = MDConfItem("/lipstick/screen/primary/physicalDotsPerInch").value().toReal(); if (dpi == m_screenDPI) { return; diff --git a/src/core/theme.cpp b/src/core/theme.cpp index e2a0a72..6efc686 100644 --- a/src/core/theme.cpp +++ b/src/core/theme.cpp @@ -33,10 +33,10 @@ Theme::Theme(QObject* parent) loadDefaultValue(); - m_themeValue = new MGConfItem(QStringLiteral("/nemo/apps/libglacier/themePath")); + m_themeValue = new MDConfItem(QStringLiteral("/nemo/apps/libglacier/themePath")); m_theme = m_themeValue->value().toString(); - connect(m_themeValue, &MGConfItem::valueChanged, this, &Theme::themeValueChanged); + connect(m_themeValue, &MDConfItem::valueChanged, this, &Theme::themeValueChanged); connect(size, &Sizing::dpScaleFactorChanged, this, &Theme::setThemeValues); if (!m_theme.isEmpty()) { diff --git a/src/core/theme.h b/src/core/theme.h index 2b00a56..61db35e 100644 --- a/src/core/theme.h +++ b/src/core/theme.h @@ -1,7 +1,7 @@ #ifndef THEME_H #define THEME_H -#include +#include #include class Sizing; @@ -184,7 +184,7 @@ private slots: void loadDefaultValue(); void setThemeValues(); - MGConfItem* m_themeValue; + MDConfItem* m_themeValue; }; #endif // THEME_H