+void PlacesItemModel::slotStorageSetupDone(Solid::ErrorType error,
+ const QVariant& errorData,
+ const QString& udi)
+{
+ Q_UNUSED(udi);
+
+ const int index = m_storageSetupInProgress.take(sender());
+ const PlacesItem* item = placesItem(index);
+ if (!item) {
+ return;
+ }
+
+ if (error) {
+ // TODO: Request message-freeze exception
+ if (errorData.isValid()) {
+ // emit errorMessage(i18nc("@info", "An error occurred while accessing '%1', the system responded: %2",
+ // item->text(),
+ // errorData.toString()));
+ emit errorMessage(QString("An error occurred while accessing '%1', the system responded: %2")
+ .arg(item->text()).arg(errorData.toString()));
+ } else {
+ // emit errorMessage(i18nc("@info", "An error occurred while accessing '%1'",
+ // item->text()));
+ emit errorMessage(QString("An error occurred while accessing '%1'").arg(item->text()));
+ }
+ emit storageSetupDone(index, false);
+ } else {
+ emit storageSetupDone(index, true);
+ }
+}
+