From 283fe0d8784f1583fab1f25db8ba0b94781865b3 Mon Sep 17 00:00:00 2001 From: p3psi Date: Sat, 29 Jan 2022 00:26:22 +0800 Subject: [PATCH] fix(about): support for non-cutefishos --- src/about.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/about.cpp b/src/about.cpp index 31bc206..8b1c21c 100644 --- a/src/about.cpp +++ b/src/about.cpp @@ -90,8 +90,11 @@ bool About::isCutefishOS() QString About::version() { - QSettings settings("/etc/cutefish", QSettings::IniFormat); - return settings.value("Version").toString(); + if (this->isCutefishOS()) { + QSettings settings("/etc/cutefish", QSettings::IniFormat); + return settings.value("Version").toString(); + } + return this->prettyProductName(); } QString About::osName()