Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-34345

setOutputFormat(NativeFormat) doesn't check for available printers, crashes dialog

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.2.1
    • 5.1.1
    • GUI: Printing
    • None
    • Windows Vista 64
    • 42fa59b151eb4a6fecbe5b5672112c9f78b856a9, e8a45152b5e2e99e757e91a5d42a6dce609ff583

    Description

      Circumstances:
      -a QPrintDialog is instanciated without passing a QPrinter pointer
      -there are no printer available (for example when the windowsprintersupport.dll has not been deployed)
      -we try to force the printer used by the QPrintDialog to be a native printer

      Consequence: calling QPrintDialog::show() results in a crash

      Pseudocode:

      QPrinterInfo::availablePrinters().size() == 0;
      QPrintDialog printDialog;
      printDialog.printer()->setOutputFormat(QPrinter::NativeFormat);
      printDialog.show();

      this could be a duplicate of QTBUG-24716

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            johnlayt John Layt
            ericlemanissier Eric Lemanissier
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes