equal
deleted
inserted
replaced
966 } |
966 } |
967 |
967 |
968 #if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY) |
968 #if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY) |
969 void QUnixPrintWidgetPrivate::setCupsProperties() |
969 void QUnixPrintWidgetPrivate::setCupsProperties() |
970 { |
970 { |
971 if (cups && QCUPSSupport::isAvailable()) { |
971 if (cups && QCUPSSupport::isAvailable() && cups->pageSizes()) { |
972 QPrintEngine *engine = printer->printEngine(); |
972 QPrintEngine *engine = printer->printEngine(); |
973 const ppd_option_t* pageSizes = cups->pageSizes(); |
973 const ppd_option_t* pageSizes = cups->pageSizes(); |
974 QByteArray cupsPageSize; |
974 QByteArray cupsPageSize; |
975 for (int i = 0; i < pageSizes->num_choices; ++i) { |
975 for (int i = 0; i < pageSizes->num_choices; ++i) { |
976 if (static_cast<int>(pageSizes->choices[i].marked) == 1) |
976 if (static_cast<int>(pageSizes->choices[i].marked) == 1) |