2
2
Copyright 2010 Michael Zanetti <mzanetti@kde.org>
3
Copyright 2010 Lukas Tinkl <ltinkl@redhat.com>
3
Copyright 2010-2011 Lukas Tinkl <ltinkl@redhat.com>
5
5
This library is free software; you can redistribute it and/or
6
6
modify it under the terms of the GNU Lesser General Public
287
287
second = QObject::tr("/HD DVD-RW", "Second item of %1%2 Drive sentence");
289
289
if (drive_is_hotpluggable)
290
description = QObject::tr("External %1%2 Drive").arg(first).arg(second);
290
description = QObject::tr("External %1%2 Drive", "%1 is CD-ROM/CD-R/etc; %2 is '/DVD-ROM'/'/DVD-R'/etc (with leading slash)").arg(first).arg(second);
292
description = QObject::tr("%1%2 Drive").arg(first).arg(second);
292
description = QObject::tr("%1%2 Drive", "%1 is CD-ROM/CD-R/etc; %2 is '/DVD-ROM'/'/DVD-R'/etc (with leading slash)").arg(first).arg(second);
294
294
return description;
720
720
prop("IdLabel").toString() == "System Reserved" ||
721
721
( prop("IdUsage").toString().isEmpty() && !prop("OpticalDiscIsBlank").toBool());
724
QString UDisksDevice::errorToString(const QString & error) const
726
if (error == UD_ERROR_UNAUTHORIZED)
727
return QObject::tr("You are not authorized to perform this operation.");
728
else if (error == UD_ERROR_BUSY)
729
return QObject::tr("The device is currently busy.");
730
else if (error == UD_ERROR_FAILED)
731
return QObject::tr("The requested operation has failed.");
732
else if (error == UD_ERROR_CANCELED)
733
return QObject::tr("The requested operation has been canceled.");
734
else if (error == UD_ERROR_INVALID_OPTION)
735
return QObject::tr("An invalid or malformed option has been given.");
736
else if (error == UD_ERROR_MISSING_DRIVER)
737
return QObject::tr("The kernel driver for this filesystem type is not available.");
739
return QObject::tr("An unspecified error has occurred.");
742
Solid::ErrorType UDisksDevice::errorToSolidError(const QString & error) const
744
if (error == UD_ERROR_BUSY)
745
return Solid::DeviceBusy;
746
else if (error == UD_ERROR_FAILED)
747
return Solid::OperationFailed;
748
else if (error == UD_ERROR_CANCELED)
749
return Solid::UserCanceled;
750
else if (error == UD_ERROR_INVALID_OPTION)
751
return Solid::InvalidOption;
752
else if (error == UD_ERROR_MISSING_DRIVER)
753
return Solid::MissingDriver;
755
return Solid::UnauthorizedOperation;