@@ -283,7 +283,7 @@ class GuiContextMenus : public QObject {
283
283
#ifdef Q_OS_WIN
284
284
if (createShortcutWin (linkPath, ebootPath, icoPath, exePath)) {
285
285
#else
286
- if (createShortcutLinux (linkPath, ebootPath, iconPath)) {
286
+ if (createShortcutLinux (linkPath, m_games[itemID]. name , ebootPath, iconPath)) {
287
287
#endif
288
288
QMessageBox::information (
289
289
nullptr , tr (" Shortcut creation" ),
@@ -301,7 +301,7 @@ class GuiContextMenus : public QObject {
301
301
#ifdef Q_OS_WIN
302
302
if (createShortcutWin (linkPath, ebootPath, iconPath, exePath)) {
303
303
#else
304
- if (createShortcutLinux (linkPath, ebootPath, iconPath)) {
304
+ if (createShortcutLinux (linkPath, m_games[itemID]. name , ebootPath, iconPath)) {
305
305
#endif
306
306
QMessageBox::information (
307
307
nullptr , tr (" Shortcut creation" ),
@@ -510,8 +510,8 @@ class GuiContextMenus : public QObject {
510
510
return SUCCEEDED (hres);
511
511
}
512
512
#else
513
- bool createShortcutLinux (const QString& linkPath, const QString& targetPath ,
514
- const QString& iconPath) {
513
+ bool createShortcutLinux (const QString& linkPath, const std::string& name ,
514
+ const QString& targetPath, const QString& iconPath) {
515
515
QFile shortcutFile (linkPath);
516
516
if (!shortcutFile.open (QIODevice::WriteOnly | QIODevice::Text)) {
517
517
QMessageBox::critical (nullptr , " Error" ,
@@ -522,7 +522,7 @@ class GuiContextMenus : public QObject {
522
522
QTextStream out (&shortcutFile);
523
523
out << " [Desktop Entry]\n " ;
524
524
out << " Version=1.0\n " ;
525
- out << " Name=" << QFileInfo (linkPath). baseName ( ) << " \n " ;
525
+ out << " Name=" << QString::fromStdString (name ) << " \n " ;
526
526
out << " Exec=" << QCoreApplication::applicationFilePath () << " \" " << targetPath << " \"\n " ;
527
527
out << " Icon=" << iconPath << " \n " ;
528
528
out << " Terminal=false\n " ;
0 commit comments