Skip to content

Commit

Permalink
sync: from linuxdeepin/dtkcore
Browse files Browse the repository at this point in the history
Synchronize source files from linuxdeepin/dtkcore.

Source-pull-request: linuxdeepin/dtkcore#426
  • Loading branch information
deepin-ci-robot authored and kegechen committed Jun 18, 2024
1 parent 9af97d6 commit d66066b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions include/util/dutil.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ inline QString unescapeFromObjectPath(const QString &str)
{
auto ret = str;
for (int i = 0; i < str.size(); ++i) {
if (str[i] == '_' and i + 2 < str.size()) {
if (str[i] == '_' && i + 2 < str.size()) {
auto hexStr = str.mid(i + 1, 2);
ret.replace(QString{"_%1"}.arg(hexStr), QChar::fromLatin1(hexStr.toUInt(nullptr, 16)));
i += 2;
Expand All @@ -91,7 +91,7 @@ inline QString getAppIdFromAbsolutePath(const QString &path)
{
static QString desktopSuffix{u8".desktop"};
const auto &appDirs = QStandardPaths::standardLocations(QStandardPaths::ApplicationsLocation);
if (!path.endsWith(desktopSuffix) or
if (!path.endsWith(desktopSuffix) ||
!std::any_of(appDirs.cbegin(), appDirs.constEnd(), [&path](const QString &dir) { return path.startsWith(dir); })) {
return {};
}
Expand Down
2 changes: 1 addition & 1 deletion src/log/LogManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ void DLogManagerPrivate::updateLoggingRules()
var = m_dsgConfig->value(RULES_KEY);
} else if (m_fallbackConfig && !m_fallbackConfig->isDefaultValue(RULES_KEY)) {
var = m_fallbackConfig->value(RULES_KEY);
} else {
} else if (m_dsgConfig) {
var = m_dsgConfig->value(RULES_KEY);
}

Expand Down

0 comments on commit d66066b

Please sign in to comment.