Skip to content

Commit 8f97e61

Browse files
capezotteCarterLi
andauthored
Theme (QT): ignore QVariant format (fastfetch-cli#1054)
Closes: fastfetch-cli#1053 --------- Co-authored-by: Carter Li <[email protected]>
1 parent 0b943bb commit 8f97e61

File tree

1 file changed

+8
-3
lines changed
  • src/detection/gtk_qt

1 file changed

+8
-3
lines changed

src/detection/gtk_qt/qt.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,16 @@ static void detectQtCt(char qver, FFQtResult* result)
144144
ffParsePropFileConfigValues(file, 3, (FFpropquery[]) {
145145
{"style=", &result->widgetStyle},
146146
{"icon_theme=", &result->icons},
147-
// FIXME: on older versions this was hex-encoded binary format
148-
// (See QVariant notes on https://doc.qt.io/qt-5/qsettings.html)
149-
// Thankfully, newer versions use the more common font encoding.
150147
{"general=", &result->font}
151148
});
149+
150+
if (ffStrbufStartsWithC(&result->font, '@'))
151+
{
152+
// See QVariant notes on https://doc.qt.io/qt-5/qsettings.html and
153+
// https://github.com/fastfetch-cli/fastfetch/issues/1053#issuecomment-2197254769
154+
// Thankfully, newer versions use the more common font encoding.
155+
ffStrbufSetNS(&result->font, 5, file);
156+
}
152157
}
153158

154159
static void detectKvantum(FFQtResult* result)

0 commit comments

Comments
 (0)