fix: fixed item from launcher
This commit is contained in:
parent
d8bda78a3b
commit
aa7762c176
1 changed files with 5 additions and 2 deletions
|
@ -107,8 +107,11 @@ void ApplicationModel::addItem(const QString &desktopFile)
|
||||||
item->desktopPath = desktopFile;
|
item->desktopPath = desktopFile;
|
||||||
item->isPinned = true;
|
item->isPinned = true;
|
||||||
|
|
||||||
// First use exec as the id of the item.
|
// First use filename as the id of the item.
|
||||||
item->id = desktopInfo.value("Exec");
|
// Why not use exec? Because exec contains the file path,
|
||||||
|
// QSettings will have problems, resulting in unrecognized next time.
|
||||||
|
QFileInfo fi(desktopFile);
|
||||||
|
item->id = fi.baseName();
|
||||||
|
|
||||||
m_appItems << item;
|
m_appItems << item;
|
||||||
endInsertRows();
|
endInsertRows();
|
||||||
|
|
Loading…
Reference in a new issue