比较提交
3 次代码提交
d9b0be5063
...
master
作者 | SHA1 | 提交日期 | |
---|---|---|---|
8a47838d94 | |||
89c9cc573e | |||
7c15d7b145 |
@ -30,15 +30,17 @@ EntryConfig EntryProvider::readFromDesktopFile(const QString &path)
|
|||||||
QTextStream stream(&file);
|
QTextStream stream(&file);
|
||||||
// There should be nothing preceding this group in the desktop entry file but possibly one or more comments.
|
// There should be nothing preceding this group in the desktop entry file but possibly one or more comments.
|
||||||
// https://standards.freedesktop.org/desktop-entry-spec/latest/ar01s03.html#group-header
|
// https://standards.freedesktop.org/desktop-entry-spec/latest/ar01s03.html#group-header
|
||||||
QString firstLine;
|
// Ignore that as there some that violate that in the wild
|
||||||
|
const QString startSection = "[Desktop Entry]";
|
||||||
|
QString line;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
firstLine = stream.readLine().trimmed();
|
line = stream.readLine().trimmed();
|
||||||
} while(!stream.atEnd() && (firstLine.isEmpty() || firstLine[0] == '#'));
|
} while(!stream.atEnd() && line != startSection);
|
||||||
|
|
||||||
if(firstLine != "[Desktop Entry]")
|
if(line != startSection)
|
||||||
{
|
{
|
||||||
throw ConfigFormatException(".desktop file does not start with [Desktop Entry]: " + path.toStdString());
|
throw ConfigFormatException(".desktop file does not contain [Desktop Entry] section: " + path.toStdString());
|
||||||
}
|
}
|
||||||
|
|
||||||
while(!stream.atEnd())
|
while(!stream.atEnd())
|
||||||
|
二进制
screenshots/calc.png
普通文件
二进制
screenshots/calc.png
普通文件
二进制文件未显示。
之后 宽度: | 高度: | 大小: 31 KiB |
二进制
screenshots/search-libreoffice.png
普通文件
二进制
screenshots/search-libreoffice.png
普通文件
二进制文件未显示。
之后 宽度: | 高度: | 大小: 48 KiB |
二进制文件未显示。
之前 宽度: | 高度: | 大小: 112 KiB |
二进制
screenshots/startview.png
普通文件
二进制
screenshots/startview.png
普通文件
二进制文件未显示。
之后 宽度: | 高度: | 大小: 205 KiB |
@ -125,7 +125,7 @@ void Window::executeConfig(const EntryConfig &config)
|
|||||||
QString cmd = settingsProvider->getTerminalCommand();
|
QString cmd = settingsProvider->getTerminalCommand();
|
||||||
cmd.replace("%c", config.command);
|
cmd.replace("%c", config.command);
|
||||||
QStringList args = QProcess::splitCommand(cmd);
|
QStringList args = QProcess::splitCommand(cmd);
|
||||||
QProcess::startDetached(cmd, args);
|
QProcess::startDetached(args[0], args);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
在新工单中引用
屏蔽一个用户