diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/painting/qdrawhelper.cpp | 2 | ||||
-rw-r--r-- | src/printsupport/dialogs/qprintdialog_unix.cpp | 5 | ||||
-rw-r--r-- | src/widgets/itemviews/qtableview.cpp | 8 | ||||
-rw-r--r-- | src/widgets/itemviews/qtreeview.cpp | 4 | ||||
-rw-r--r-- | src/widgets/util/qcompleter.h | 2 |
5 files changed, 16 insertions, 5 deletions
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index 674f52678d..55d69221f5 100644 --- a/src/gui/painting/qdrawhelper.cpp +++ b/src/gui/painting/qdrawhelper.cpp @@ -4544,7 +4544,7 @@ void blend_color_generic_rgb64(int count, const QSpan *spans, void *userData) while (count--) { int x = spans->x; int length = spans->len; - if (solidFill && bpp >= QPixelLayout::BPP8 && spans->coverage == 255 && length) { + if (solidFill && bpp >= QPixelLayout::BPP8 && spans->coverage == 255 && length && op.destStore64) { // If dest doesn't matter we don't need to bother with blending or converting all the identical pixels op.destStore64(data->rasterBuffer, x, spans->y, &color, 1); spanfill_from_first(data->rasterBuffer, bpp, x, spans->y, length); diff --git a/src/printsupport/dialogs/qprintdialog_unix.cpp b/src/printsupport/dialogs/qprintdialog_unix.cpp index 5136ba13e5..c7328d9732 100644 --- a/src/printsupport/dialogs/qprintdialog_unix.cpp +++ b/src/printsupport/dialogs/qprintdialog_unix.cpp @@ -727,6 +727,11 @@ void QPrintDialogPrivate::selectPrinter(const QPrinter::OutputFormat outputForma else options.pageSetCombo->setEnabled(true); + // Disable complex page ranges widget when printing to pdf + // It doesn't work since it relies on cups to do the heavy lifting and cups + // is not used when printing to PDF + options.pagesRadioButton->setEnabled(outputFormat != QPrinter::PdfFormat); + #if QT_CONFIG(cups) // Disable color options on main dialog if not printing to file, it will be handled by CUPS advanced dialog options.colorMode->setVisible(outputFormat == QPrinter::PdfFormat); diff --git a/src/widgets/itemviews/qtableview.cpp b/src/widgets/itemviews/qtableview.cpp index e706af1a42..c50156bbce 100644 --- a/src/widgets/itemviews/qtableview.cpp +++ b/src/widgets/itemviews/qtableview.cpp @@ -3186,14 +3186,18 @@ void QTableView::sortByColumn(int column) /*! \since 4.2 - Sorts the model by the values in the given \a column in the given \a order. + Sorts the model by the values in the given \a column and \a order. + + \a column may be -1, in which case no sort indicator will be shown + and the model will return to its natural, unsorted order. Note that not + all models support this and may even crash in this case. \sa sortingEnabled */ void QTableView::sortByColumn(int column, Qt::SortOrder order) { Q_D(QTableView); - if (column < 0) + if (column < -1) return; // If sorting is enabled it will emit a signal connected to // _q_sortIndicatorChanged, which then actually sorts diff --git a/src/widgets/itemviews/qtreeview.cpp b/src/widgets/itemviews/qtreeview.cpp index 23a530821f..53e546bb4d 100644 --- a/src/widgets/itemviews/qtreeview.cpp +++ b/src/widgets/itemviews/qtreeview.cpp @@ -2619,7 +2619,7 @@ void QTreeView::sortByColumn(int column) /*! \since 4.2 - Sets the model up for sorting by the values in the given \a column and \a order. + Sorts the model by the values in the given \a column and \a order. \a column may be -1, in which case no sort indicator will be shown and the model will return to its natural, unsorted order. Note that not @@ -2630,7 +2630,7 @@ void QTreeView::sortByColumn(int column) void QTreeView::sortByColumn(int column, Qt::SortOrder order) { Q_D(QTreeView); - if (column < 0) + if (column < -1) return; // If sorting is enabled it will emit a signal connected to // _q_sortIndicatorChanged, which then actually sorts diff --git a/src/widgets/util/qcompleter.h b/src/widgets/util/qcompleter.h index 5620b55589..5448fc313c 100644 --- a/src/widgets/util/qcompleter.h +++ b/src/widgets/util/qcompleter.h @@ -75,12 +75,14 @@ public: UnfilteredPopupCompletion, InlineCompletion }; + Q_ENUM(CompletionMode) enum ModelSorting { UnsortedModel = 0, CaseSensitivelySortedModel, CaseInsensitivelySortedModel }; + Q_ENUM(ModelSorting) QCompleter(QObject *parent = nullptr); QCompleter(QAbstractItemModel *model, QObject *parent = nullptr); |