qt: Fix strings in enumeration of host drives
This commit is contained in:
@@ -157,10 +157,10 @@ MediaMenu::refresh(QMenu *parentMenu)
|
|||||||
#ifdef Q_OS_WINDOWS
|
#ifdef Q_OS_WINDOWS
|
||||||
/* Loop through each Windows drive letter and test to see if
|
/* Loop through each Windows drive letter and test to see if
|
||||||
it's a CDROM */
|
it's a CDROM */
|
||||||
for (auto &letter : driveLetters) {
|
for (const auto &letter : driveLetters) {
|
||||||
auto drive = QString::asprintf("%c:\\", letter).toUtf8().constData();
|
auto drive = QString("%1:\\").arg(letter);
|
||||||
if (GetDriveType(drive) == DRIVE_CDROM)
|
if (GetDriveType(drive.toUtf8().constData()) == DRIVE_CDROM)
|
||||||
menu->addAction(QApplication::style()->standardIcon(QStyle::SP_DriveCDIcon), tr("Host CD/DVD Drive (%1:)").arg(letter), [this, i, letter]() { cdromMount(i, 2, QString::asprintf(R"(\\.\%c:)", letter).toUtf8().constData()); })->setCheckable(false);
|
menu->addAction(QApplication::style()->standardIcon(QStyle::SP_DriveCDIcon), tr("Host CD/DVD Drive (%1:)").arg(letter), [this, i, letter] { cdromMount(i, 2, QString(R"(\\.\%1:)").arg(letter)); })->setCheckable(false);
|
||||||
}
|
}
|
||||||
menu->addSeparator();
|
menu->addSeparator();
|
||||||
#endif // Q_OS_WINDOWS
|
#endif // Q_OS_WINDOWS
|
||||||
|
Reference in New Issue
Block a user