Cosmetics
This commit is contained in:
@@ -18,7 +18,7 @@ result(true)
|
|||||||
bool CopyProcess::run()
|
bool CopyProcess::run()
|
||||||
{
|
{
|
||||||
progress->lock(true);
|
progress->lock(true);
|
||||||
progress->setInfo(tr("Copying file..."));
|
// progress->setInfo(tr("Copying file..."));
|
||||||
|
|
||||||
QEventLoop loop;
|
QEventLoop loop;
|
||||||
connect(this, SIGNAL(finished()), &loop, SLOT(quit()));
|
connect(this, SIGNAL(finished()), &loop, SLOT(quit()));
|
||||||
@@ -39,7 +39,7 @@ void CopyProcess::onTimer()
|
|||||||
if (sourceFile.open(QIODevice::ReadOnly)) {
|
if (sourceFile.open(QIODevice::ReadOnly)) {
|
||||||
QFile destinationFile(destination);
|
QFile destinationFile(destination);
|
||||||
if (destinationFile.open(QIODevice::ReadWrite)) {
|
if (destinationFile.open(QIODevice::ReadWrite)) {
|
||||||
progress->addText(tr("Writing file: "));
|
// progress->addText(tr("Writing file: "));
|
||||||
for (int i=0; i<blocks; i++) {
|
for (int i=0; i<blocks; i++) {
|
||||||
int read = sourceFile.read(buf, BLKSIZE);
|
int read = sourceFile.read(buf, BLKSIZE);
|
||||||
if (destinationFile.write(buf, read) == read) {
|
if (destinationFile.write(buf, read) == read) {
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ ui(new Ui::ProgressWidget)
|
|||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
ui->info->hide();
|
ui->info->hide();
|
||||||
|
ui->checkBox->hide();
|
||||||
|
ui->textEdit->hide();
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
QFont newFont("Courier", 13);
|
QFont newFont("Courier", 13);
|
||||||
@@ -20,11 +22,6 @@ ui(new Ui::ProgressWidget)
|
|||||||
QFont newFont("Courier", 9);
|
QFont newFont("Courier", 9);
|
||||||
ui->textEdit->setFont(newFont);
|
ui->textEdit->setFont(newFont);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (g.outputDisplayDetails())
|
|
||||||
ui->checkBox->setChecked(true);
|
|
||||||
else
|
|
||||||
ui->textEdit->setVisible(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ProgressWidget::~ProgressWidget()
|
ProgressWidget::~ProgressWidget()
|
||||||
@@ -56,6 +53,13 @@ void ProgressWidget::setValue(int value)
|
|||||||
|
|
||||||
void ProgressWidget::addText(const QString &text)
|
void ProgressWidget::addText(const QString &text)
|
||||||
{
|
{
|
||||||
|
ui->checkBox->setVisible(true);
|
||||||
|
|
||||||
|
if (g.outputDisplayDetails()) {
|
||||||
|
ui->checkBox->setChecked(true);
|
||||||
|
ui->textEdit->setVisible(true);
|
||||||
|
}
|
||||||
|
|
||||||
QTextCursor cursor(ui->textEdit->textCursor());
|
QTextCursor cursor(ui->textEdit->textCursor());
|
||||||
|
|
||||||
// is the scrollbar at the end?
|
// is the scrollbar at the end?
|
||||||
|
|||||||
Reference in New Issue
Block a user