mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2025-01-23 04:14:35 +08:00
Merge pull request #580 from lucky9loogn/fix/ubuntu-blur-behind-segmentation-fault
fix: 修复了在 Ubuntu 中启用亚克力效果无效且导致程序崩溃的问题
This commit is contained in:
commit
1a8e3d5ab2
@ -282,7 +282,22 @@ QString FluTools::getWallpaperFilePath() {
|
|||||||
auto path = result.mid(startIndex + 7, result.length() - startIndex - 8);
|
auto path = result.mid(startIndex + 7, result.length() - startIndex - 8);
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
} else if (type == "ubuntu") {
|
||||||
|
QProcess process;
|
||||||
|
QStringList args;
|
||||||
|
args << "get";
|
||||||
|
args << "org.gnome.desktop.background";
|
||||||
|
args << "picture-uri";
|
||||||
|
process.start("gsettings", args);
|
||||||
|
process.waitForFinished();
|
||||||
|
QByteArray result = process.readAllStandardOutput().trimmed();
|
||||||
|
result = result.mid(1, result.length() - 2);
|
||||||
|
if (result.startsWith("file:///")) {
|
||||||
|
auto path = result.mid(7);
|
||||||
|
return path;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
return {};
|
||||||
#elif defined(Q_OS_MACOS)
|
#elif defined(Q_OS_MACOS)
|
||||||
QProcess process;
|
QProcess process;
|
||||||
QStringList args;
|
QStringList args;
|
||||||
|
Loading…
Reference in New Issue
Block a user