Tags: ksnip/ksnip
Tags
Fix: "Print to File" pre-checked by default on Windows (#1184) * Fix: don't pre-enable print-to-file before showing the print dialog CapturePrinter::print() and printPreview() called printer.setOutputFileName(defaultPath) with a real .pdf path before opening QPrintDialog, even though setOutputFormat(NativeFormat) was called right after. On Windows, Qt's PPK_OutputFileName property handler in qprintengine_win.cpp sets the internal printToFile flag to true for any non-empty filename, independent of the later setOutputFormat() call. That flag drives the PD_PRINTTOFILE flag, which pre-checks "Print to File" in the native dialog regardless of printer or Windows settings (see discussion #1111). Removed the setOutputFileName() calls; defaultPath is now unused (Q_UNUSED) to keep the function signature stable. * Refactor print methods to remove defaultPath parameter Removed unused parameter 'defaultPath' from print and printPreview methods. * Refactor print methods in CapturePrinter class * Refactor print methods to remove save path Removed save path parameter from print and print preview methods.
PreviousNext