mirror of
https://github.com/altlinux/ALTMediaWriter.git
synced 2024-10-26 08:55:03 +03:00
Fixed progress bar display.
An Issue with upstream fixes - FedoraQt/MediaWriter Issues #640.
This commit is contained in:
parent
d5e97cfaac
commit
a1699b6748
@ -259,6 +259,12 @@ Progress *Drive::progress() const {
|
||||
return m_progress;
|
||||
}
|
||||
|
||||
void Drive::updateDrive(const QString &name, uint64_t size, bool containsLive) {
|
||||
m_name = name;
|
||||
m_size = size;
|
||||
setRestoreStatus(containsLive ? CONTAINS_LIVE : CLEAN);
|
||||
}
|
||||
|
||||
QString Drive::name() const {
|
||||
return QString("%1 (%2)").arg(m_name).arg(readableSize());
|
||||
}
|
||||
|
@ -164,6 +164,8 @@ public:
|
||||
|
||||
Progress *progress() const;
|
||||
|
||||
virtual void updateDrive(const QString &name, uint64_t size, bool containsLive = false);
|
||||
|
||||
virtual QString name() const;
|
||||
virtual QString readableSize() const;
|
||||
virtual qreal size() const;
|
||||
|
@ -97,11 +97,9 @@ QDBusObjectPath LinuxDriveProvider::handleObject(const QDBusObjectPath &object_p
|
||||
qDebug() << this->metaObject()->className() << "New drive" << driveId.path() << "-" << name << "(" << size << "bytes;" << (isValid ? "removable;" : "nonremovable;") << connectionBus << ")";
|
||||
|
||||
if (isValid) {
|
||||
|
||||
// TODO find out why do I do this
|
||||
if (m_drives.contains(object_path)) {
|
||||
LinuxDrive *tmp = m_drives[object_path];
|
||||
emit DriveProvider::driveRemoved(tmp);
|
||||
m_drives[object_path]->updateDrive(name, size, isoLayout);
|
||||
return object_path;
|
||||
}
|
||||
LinuxDrive *d = new LinuxDrive(this, object_path.path(), name, size, isoLayout);
|
||||
m_drives[object_path] = d;
|
||||
|
Loading…
Reference in New Issue
Block a user