Skip to content
This repository was archived by the owner on Feb 27, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions recovery/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1583,6 +1583,7 @@ void MainWindow::startImageWrite()
connect(imageWriteThread, SIGNAL(statusUpdate(QString)), _qpd, SLOT(setLabelText(QString)));
connect(imageWriteThread, SIGNAL(runningMKFS()), _qpd, SLOT(pauseIOaccounting()), Qt::BlockingQueuedConnection);
connect(imageWriteThread, SIGNAL(finishedMKFS()), _qpd , SLOT(resumeIOaccounting()), Qt::BlockingQueuedConnection);
connect(imageWriteThread, SIGNAL(newDrive(const QString&)), _qpd , SLOT(changeDrive(const QString&)), Qt::BlockingQueuedConnection);
imageWriteThread->start();
hide();
_qpd->exec();
Expand Down
1 change: 1 addition & 0 deletions recovery/multiimagewritethread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,7 @@ bool MultiImageWriteThread::processImage(OsInfo *image)
}
}
QByteArray partdevice = p->partitionDevice();
emit newDrive(partdevice);

if (fstype == "raw")
{
Expand Down
3 changes: 2 additions & 1 deletion recovery/multiimagewritethread.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ class MultiImageWriteThread : public QThread
void completed();
void runningMKFS();
void finishedMKFS();

void newDrive(const QString&);

public slots:

};
Expand Down
7 changes: 7 additions & 0 deletions recovery/progressslideshowdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,13 @@ void ProgressSlideshowDialog::resumeIOaccounting()
_iotimer.start(1000);
}

void ProgressSlideshowDialog::changeDrive(const QString &drive)
{
pauseIOaccounting();
_drive = drive;
resumeIOaccounting();
}

void ProgressSlideshowDialog::setMaximum(qint64 bytes)
{
_maxSectors = bytes/512;
Expand Down
1 change: 1 addition & 0 deletions recovery/progressslideshowdialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public slots:
void updateIOstats();
void pauseIOaccounting();
void resumeIOaccounting();
void changeDrive(const QString &drive);

protected:
QString _drive;
Expand Down