From 917890e0777d9b06c66330d556f4953e7e2e5631 Mon Sep 17 00:00:00 2001 From: Phil Olynyk Date: Wed, 12 Jun 2019 23:27:46 -0400 Subject: [PATCH] Fix errors in linux conditional code --- oscar/statistics.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/oscar/statistics.cpp b/oscar/statistics.cpp index a0601bdb..afa30ed4 100644 --- a/oscar/statistics.cpp +++ b/oscar/statistics.cpp @@ -1202,18 +1202,18 @@ void Statistics::printReport(QWidget * parent) { #ifdef Q_OS_LINUX printer.setPrinterName("Print to File (PDF)"); printer.setOutputFormat(QPrinter::PdfFormat); - QString name; - QString datestr; + QString name = "Statistics"; + QString datestr = QDate::currentDate().toString(Qt::ISODate); - if (ui->tabWidget->currentWidget() == ui->statisticsTab) { - name = "Statistics"; - datestr = QDate::currentDate().toString(Qt::ISODate); - } else if (ui->tabWidget->currentWidget() == ui->helpTab) { - name = "Help"; - datestr = QDateTime::currentDateTime().toString(Qt::ISODate); - } else { name = "Unknown"; } +// if (ui->tabWidget->currentWidget() == ui->statisticsTab) { +// name = "Statistics"; +// datestr = QDate::currentDate().toString(Qt::ISODate); +// } else if (ui->tabWidget->currentWidget() == ui->helpTab) { +// name = "Help"; +// datestr = QDateTime::currentDateTime().toString(Qt::ISODate); +// } else { name = "Unknown"; } - QString filename = p_pref->Get("{home}/" + name + "_" + p_profile->user->userName() + "_" + datestr + ".pdf"); + QString filename = p_pref->Get("{home}/") + name + "_" + p_profile->user->userName() + "_" + datestr + ".pdf"; printer.setOutputFileName(filename); #endif