Correct loss of previous changes.

This commit is contained in:
Seeker4 2019-06-15 15:09:04 -07:00
parent 41c7d43f7b
commit aabd97d537

View File

@ -1205,15 +1205,18 @@ void Statistics::printReport(QWidget * parent) {
#ifdef Q_OS_LINUX #ifdef Q_OS_LINUX
printer.setPrinterName("Print to File (PDF)"); printer.setPrinterName("Print to File (PDF)");
printer.setOutputFormat(QPrinter::PdfFormat); printer.setOutputFormat(QPrinter::PdfFormat);
QString name; QString name = "Statistics";
QString datestr; QString datestr = QDate::currentDate().toString(Qt::ISODate);
if (ui->tabWidget->currentWidget() == ui->statisticsTab) { // if (ui->tabWidget->currentWidget() == ui->statisticsTab) {
name = "Statistics"; // name = "Statistics";
datestr = QDate::currentDate().toString(Qt::ISODate); // datestr = QDate::currentDate().toString(Qt::ISODate);
} else { name = "Unknown"; } // } 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); printer.setOutputFileName(filename);
#endif #endif