Skip to content

Commit

Permalink
fix: dconfig frequent construction and destruction
Browse files Browse the repository at this point in the history
Frequent construction and destruction will connect / disconnect dbus...
  • Loading branch information
kegechen committed Mar 1, 2024
1 parent c0f0268 commit b62220b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/widgets/dstyle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ void DStyle::setShortcutUnderlineVisible(bool visible)

static inline bool hasConfig(const QString &key, bool fallback = false)
{
DConfig config("org.deepin.dtk.preference");
static DConfig config("org.deepin.dtk.preference");
return config.value(key, fallback).toBool();
}

Expand Down

0 comments on commit b62220b

Please sign in to comment.