Changeset 94036 in vbox
- Timestamp:
- Mar 1, 2022 11:59:12 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/platform/x11/UIDesktopServices_x11.cpp
r93115 r94036 35 35 const QString strVBox = QDir::toNativeSeparators(QCoreApplication::applicationDirPath() + "/" + VBOX_GUI_VMRUNNER_IMAGE); 36 36 QTextStream out(&link); 37 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) /* defaults to UTF-8 in qt6 */ 37 38 out.setCodec("UTF-8"); 39 #endif 40 #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) 41 # define QT_ENDL Qt::endl 42 #else 43 # define QT_ENDL endl 44 #endif 38 45 /* Create a link which starts VirtualBox with the machine uuid. */ 39 out << "[Desktop Entry]" << endl40 << "Encoding=UTF-8" << endl41 << "Version=1.0" << endl42 << "Name=" << strName << endl43 << "Comment=Starts the VirtualBox machine " << strName << endl44 << "Type=Application" << endl45 << "Exec=" << strVBox << " --comment \"" << strName << "\" --startvm \"" << uUuid.toString() << "\"" << endl46 << "Icon=virtualbox-vbox.png" << endl;46 out << "[Desktop Entry]" << QT_ENDL 47 << "Encoding=UTF-8" << QT_ENDL 48 << "Version=1.0" << QT_ENDL 49 << "Name=" << strName << QT_ENDL 50 << "Comment=Starts the VirtualBox machine " << strName << QT_ENDL 51 << "Type=Application" << QT_ENDL 52 << "Exec=" << strVBox << " --comment \"" << strName << "\" --startvm \"" << uUuid.toString() << "\"" << QT_ENDL 53 << "Icon=virtualbox-vbox.png" << QT_ENDL; 47 54 /* This would be a real file link entry, but then we could also simply 48 55 * use a soft link (on most UNIX fs): 49 out << "[Desktop Entry]" << endl50 << "Encoding=UTF-8" << endl51 << "Version=1.0" << endl52 << "Name=" << strName << endl53 << "Type=Link" << endl54 << "Icon=virtualbox-vbox.png" << endl56 out << "[Desktop Entry]" << QT_ENDL 57 << "Encoding=UTF-8" << QT_ENDL 58 << "Version=1.0" << QT_ENDL 59 << "Name=" << strName << QT_ENDL 60 << "Type=Link" << QT_ENDL 61 << "Icon=virtualbox-vbox.png" << QT_ENDL 55 62 */ 56 63 link.setPermissions(link.permissions() | QFile::ExeOwner); 64 /** @todo r=bird: check status here perhaps, might've run out of disk space or 65 * some such thing... */ 57 66 return true; 58 67 }
Note:
See TracChangeset
for help on using the changeset viewer.