Changeset 846 for trunk/src/gui/dialogs/qprintdialog_win.cpp
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/src/gui/dialogs/qprintdialog_win.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 53 53 #include <private/qprinter_p.h> 54 54 55 #if defined(Q_CC_MINGW) &&!defined(PD_NOCURRENTPAGE)55 #if !defined(PD_NOCURRENTPAGE) 56 56 #define PD_NOCURRENTPAGE 0x00800000 57 57 #define PD_RESULT_PRINT 1 … … 129 129 pd->Flags |= PD_NOPAGENUMS; 130 130 131 // we don't have a 'current page' notion in the QPrinter API yet. 132 // Neither do we support more than one page range, so limit those 133 // options 134 pd->Flags |= PD_NOCURRENTPAGE; 131 // Disable Current Page option if not required as default is Enabled 132 if (!pdlg->isOptionEnabled(QPrintDialog::PrintCurrentPage)) 133 pd->Flags |= PD_NOCURRENTPAGE; 134 135 // Default to showing the General tab first 135 136 pd->nStartPage = START_PAGE_GENERAL; 137 138 // We don't support more than one page range in the QPrinter API yet. 136 139 pd->nPageRanges = 1; 137 140 pd->nMaxPageRanges = 1; … … 139 142 if (d->ep->printToFile) 140 143 pd->Flags |= PD_PRINTTOFILE; 141 Q_ASSERT(parent != 0 && parent->testAttribute(Qt::WA_WState_Created));144 Q_ASSERT(parent); 142 145 pd->hwndOwner = parent->window()->winId(); 143 146 pd->lpPageRanges[0].nFromPage = qMax(pdlg->fromPage(), pdlg->minPage()); … … 154 157 pdlg->setPrintRange(QPrintDialog::PageRange); 155 158 pdlg->setFromTo(pd->lpPageRanges[0].nFromPage, pd->lpPageRanges[0].nToPage); 156 } else { 159 } else if (pd->Flags & PD_CURRENTPAGE) { 160 pdlg->setPrintRange(QPrintDialog::CurrentPage); 161 pdlg->setFromTo(0, 0); 162 } else { // PD_ALLPAGES 157 163 pdlg->setPrintRange(QPrintDialog::AllPages); 158 164 pdlg->setFromTo(0, 0);
Note:
See TracChangeset
for help on using the changeset viewer.