3

I use QSettings to edit the .desktop menu entries. I do it like that: dfile is a QString - absolute file path

QSettings set(dfile, QSettings::IniFormat);
qDebug() << "Editing " << set.fileName();
set.beginGroup("Desktop Entry");
// set whatever I need
set.endGroup();

But when the .desktop file is saved, I get

[Desktop%20Entry]
Encoding=UTF-8
Version=1.0
# and etc.

instead of

[Desktop Entry]
Encoding=UTF-8
Version=1.0
# and etc.

What am I doing wrong? Thanks

4

1 回答 1

1

你没有做错任何事。该空间只是使用HTML URL encoding编码为 %20 。你可以读回设置,对吧?

于 2013-02-09T13:36:01.137 回答