Device: allow status updates from all methods

turned statusCallback into a member of Device (instead of a parameter to
download() and preview(). This allows all methods to access it, directly
and provide better feedback during open/close/erase.
This commit is contained in:
Rainer Clasen
2012-02-11 15:07:31 +01:00
parent e3d6c17288
commit 1490102e8d
9 changed files with 32 additions and 38 deletions

View File

@@ -26,9 +26,9 @@ static bool powerTapRegistered =
Devices::addType("PowerTap", DevicesPtr(new PowerTapDevices()) );
DevicePtr
PowerTapDevices::newDevice( CommPortPtr dev )
PowerTapDevices::newDevice( CommPortPtr dev, Device::StatusCallback cb)
{
return DevicePtr( new PowerTapDevice( dev ));
return DevicePtr( new PowerTapDevice( dev, cb ));
}
QString
@@ -123,7 +123,6 @@ bool
PowerTapDevice::download( const QDir &tmpdir,
QList<DeviceDownloadFile> &files,
CancelCallback cancelCallback,
StatusCallback statusCallback,
ProgressCallback progressCallback,
QString &err)
{