Skip to content

Commit

Permalink
Bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
trufanov-nok committed Jul 7, 2021
1 parent 746694b commit a641f5f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ QString add_opt(const QChar& c, QString val, const QSet<QChar>& supported, bool
QString opt2cmd(const Options& opt, const QSet<QChar>& supported)
{
QString res;
res += add_opt('d', QString::number(opt.dpi), supported);
res += add_opt('p', QString::number(opt.pagesPerDict), supported);
res += add_opt('t', QString::number(opt.threads), supported);
res += add_opt('C', QString::number(opt.classifier), supported);
res += add_opt('d', QString::number(opt.dpi), supported, opt.dpi > 0);
res += add_opt('p', QString::number(opt.pagesPerDict), supported, opt.pagesPerDict > 0);
res += add_opt('t', QString::number(opt.threads), supported, opt.threads > 0);
res += add_opt('C', QString::number(opt.classifier), supported, opt.classifier > 0);
res += add_opt('i', "", supported, opt.indirect);
res += add_opt('X', opt.ext, supported, !opt.ext.isEmpty());
res += add_opt('l', "", supported, opt.lossy);
Expand Down Expand Up @@ -135,7 +135,6 @@ void MainWindow::process_ready_read()
#endif
for (const QString& s: sl) {
if (s.startsWith("[") && s.endsWith("%]")) {
qDebug() << s.mid(1,s.length()-3).toFloat();
float progress = s.mid(1,s.length()-3).toFloat() /100.;
ui->progressBar->setValue(ui->progressBar->maximum()*progress);
}
Expand Down

0 comments on commit a641f5f

Please sign in to comment.