[delegate release];
}
- void statusChanged()
+ void statusChanged(const QString &statusString)
{
+ q->_statusString = statusString;
emit q->statusChanged();
}
return YES;
}
-- (void)notifyChange
+- (void)notifyChange:(const QString&)statusString
{
- _owner->statusChanged();
+ qCDebug(OCC::lcUpdater) << statusString;
+ _owner->statusChanged(statusString);
}
// Sent when a valid update is found by the update driver.
{
Q_UNUSED(updater)
Q_UNUSED(update)
- qCDebug(OCC::lcUpdater) << "Found a valid update.";
- [self notifyChange];
+ [self notifyChange:QStringLiteral("Found a valid update.")];
}
// Sent when a valid update is not found.
- (void)updaterDidNotFindUpdate:(SUUpdater *)update
{
Q_UNUSED(update)
- qCDebug(OCC::lcUpdater) << "No valid update found.";
- [self notifyChange];
+ [self notifyChange:QStringLiteral("No valid update found.")];
}
// Sent immediately before installing the specified update.
{
Q_UNUSED(updater)
Q_UNUSED(update)
- qCDebug(OCC::lcUpdater) << "About to install update.";
- [self notifyChange];
+ [self notifyChange:QStringLiteral("About to install update.")];
}
- (void)updater:(SUUpdater *)updater didAbortWithError:(NSError *)error
{
Q_UNUSED(updater)
- qCDebug(OCC::lcUpdater) << error.description;
- [self notifyChange];
+ const QString message(QStringLiteral("Aborted with error: ") + QString::fromNSString(error.description));
+ [self notifyChange:message];
}
- (void)updater:(SUUpdater *)updater didFinishLoadingAppcast:(SUAppcast *)appcast
{
Q_UNUSED(updater)
Q_UNUSED(appcast)
-
- qCDebug(OCC::lcUpdater) << "Finished loading appcast.";
- [self notifyChange];
+ [self notifyChange:QStringLiteral("Finished loading appcast.")];
}
QString SparkleUpdater::statusString()
{
- // FIXME Show the real state depending on the callbacks
- return QString();
+ return _statusString;
}
} // namespace OCC