qt6-bb10/src/widgets/itemviews
Marc Mutz 0325842b99 QtWidgets: use Q_UNLIKELY for every qWarning() (2)
If, after checking a condition, we issue a qWarning(),
by definition that check is unlikely to be true.

Tell the compiler so it can move the error handling
code out of the normal code path to increase the
effective icache size.

This change contains the changes to the accessible/,
effects/, kernel/, styles/ and itemviews/ subdirs.

Moved conditional code around where possible so that
we could always use Q_UNLIKELY, instead of having to
revert to Q_LIKELY here and there.

In QWidgetPrivate::setWindowModified_helper(), as a
drive-by, I swapped the evaluation order of an
&&-expression (newly wrapped in Q_UNLIKELY) to be
more readable and more efficient (cheaper check
first) at the same time.

In qDraw* (qdrawutil.cpp), simplified boolean
expressions (sometimes by skipping re-checking
conditions already checked in a previous guard clause).

Change-Id: I58be22be0a33522c2629a66c2f6c795771a99f3f
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-11-25 16:27:11 +00:00
..
itemviews.pri widgets: add missing qheaderview_p.h to itemviews.pri 2015-07-13 10:37:57 +00:00
qabstractitemdelegate.cpp Clean up cancel operation handling on OS X 2015-09-27 20:44:17 +00:00
qabstractitemdelegate.h QtWidgets: Use Q_NULLPTR instead of 0 in all public headers 2015-07-06 11:33:05 +00:00
qabstractitemdelegate_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qabstractitemview.cpp QtWidgets: use Q_UNLIKELY for every qWarning() (2) 2015-11-25 16:27:11 +00:00
qabstractitemview.h QtWidgets: Use Q_NULLPTR instead of 0 in all public headers 2015-07-06 11:33:05 +00:00
qabstractitemview_p.h QAbstractItemView: don't hold QItemViewPaintPair in a QList 2015-07-13 10:37:52 +00:00
qbsptree.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qbsptree_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qcolumnview.cpp Use QVector::reserve() all over the place. 2015-06-29 19:31:59 +00:00
qcolumnview.h QtWidgets: Use Q_NULLPTR instead of 0 in all public headers 2015-07-06 11:33:05 +00:00
qcolumnview_p.h QColumnView: re-enable scrolling of the preview widget 2015-05-07 22:24:17 +00:00
qcolumnviewgrip.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qcolumnviewgrip_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qdatawidgetmapper.cpp QDataWidgetMapper: use QList::reverse_iterator 2015-06-28 15:56:12 +00:00
qdatawidgetmapper.h QtWidgets: Use Q_NULLPTR instead of 0 in all public headers 2015-07-06 11:33:05 +00:00
qdirmodel.cpp QtWidgets: use Q_UNLIKELY for every qWarning() (2) 2015-11-25 16:27:11 +00:00
qdirmodel.h QtWidgets: Use Q_NULLPTR instead of 0 in all public headers 2015-07-06 11:33:05 +00:00
qfileiconprovider.cpp Remove gtk2 style from qtbase, it will be moved to qtstyleplugins 2015-08-26 08:40:38 +00:00
qfileiconprovider.h Update copyright headers 2015-02-11 06:49:51 +00:00
qfileiconprovider_p.h Use own QIconEngine in QFileIconProvider 2015-03-11 17:04:55 +00:00
qheaderview.cpp QHeaderView - fix a logical / visual index mismatch 2015-06-27 07:08:46 +00:00
qheaderview.h QtWidgets: Use Q_NULLPTR instead of 0 in all public headers 2015-07-06 11:33:05 +00:00
qheaderview_p.h QtWidgets: mark some private types movable or primitive 2015-07-13 22:27:08 +00:00
qitemdelegate.cpp Long live QString::asprintf()! 2015-02-12 09:58:00 +00:00
qitemdelegate.h QtWidgets: Use Q_NULLPTR instead of 0 in all public headers 2015-07-06 11:33:05 +00:00
qitemeditorfactory.cpp Save one full iteration and memory allocation with std::find() 2015-09-25 21:44:30 +00:00
qitemeditorfactory.h Update copyright headers 2015-02-11 06:49:51 +00:00
qitemeditorfactory_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qlistview.cpp QtWidgets: use Q_UNLIKELY for every qWarning() (2) 2015-11-25 16:27:11 +00:00
qlistview.h QtWidgets: Use Q_NULLPTR instead of 0 in all public headers 2015-07-06 11:33:05 +00:00
qlistview_p.h QtWidgets: mark some private types movable or primitive 2015-07-13 22:27:08 +00:00
qlistwidget.cpp widgets: Use QList::reserve(), reduces reallocations. 2015-06-23 15:35:59 +00:00
qlistwidget.h QtWidgets: Use Q_NULLPTR instead of 0 in all public headers 2015-07-06 11:33:05 +00:00
qlistwidget_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qstyleditemdelegate.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qstyleditemdelegate.h QtWidgets: Use Q_NULLPTR instead of 0 in all public headers 2015-07-06 11:33:05 +00:00
qtableview.cpp QtWidgets: use Q_UNLIKELY for every qWarning() (2) 2015-11-25 16:27:11 +00:00
qtableview.h QtWidgets: Use Q_NULLPTR instead of 0 in all public headers 2015-07-06 11:33:05 +00:00
qtableview_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qtablewidget.cpp QtWidgets: use Q_UNLIKELY for every qWarning() (2) 2015-11-25 16:27:11 +00:00
qtablewidget.h QtWidgets: Use Q_NULLPTR instead of 0 in all public headers 2015-07-06 11:33:05 +00:00
qtablewidget_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qtreeview.cpp QTreeView: add size hint handling information to uniformRowHeights 2015-08-06 20:50:02 +00:00
qtreeview.h QtWidgets: Use Q_NULLPTR instead of 0 in all public headers 2015-07-06 11:33:05 +00:00
qtreeview_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qtreewidget.cpp QtWidgets: use Q_UNLIKELY for every qWarning() (2) 2015-11-25 16:27:11 +00:00
qtreewidget.h QtWidgets: Use Q_NULLPTR instead of 0 in all public headers 2015-07-06 11:33:05 +00:00
qtreewidget_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qtreewidgetitemiterator.cpp Update copyright headers 2015-02-11 06:49:51 +00:00
qtreewidgetitemiterator.h Update copyright headers 2015-02-11 06:49:51 +00:00
qtreewidgetitemiterator_p.h Update copyright headers 2015-02-11 06:49:51 +00:00
qwidgetitemdata_p.h QtWidgets: mark some private types movable or primitive 2015-07-13 22:27:08 +00:00