Fixed print on Windows

--HG--
branch : develop
This commit is contained in:
Valentina Zhuravska 2015-11-06 17:42:52 +02:00
parent 7eb7cddea9
commit bfc6a525ed

View File

@ -867,7 +867,11 @@ void MainWindowsNoGUI::SetPrinterSettings(QPrinter *printer)
FromPixel(paper->rect().height(), Unit::Mm)), QPrinter::Millimeter );
}
#ifdef Q_OS_WIN
printer->setOutputFileName(QDir::homePath() + QDir::separator() + FileName());
#else
printer->setOutputFileName(QDir::homePath() + QDir::separator() + FileName() + QLatin1Literal(".pdf"));
#endif
printer->setDocName(FileName());
IsLayoutGrayscale() ? printer->setColorMode(QPrinter::GrayScale) : printer->setColorMode(QPrinter::Color);