Skip to content

Commit

Permalink
Merge "Merge remote-tracking branch 'origin/5.13' into 5.14"
Browse files Browse the repository at this point in the history
  • Loading branch information
Qt Forward Merge Bot committed Oct 3, 2019
2 parents 5ab8efd + e9f10df commit 74a33df
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 8 deletions.
6 changes: 5 additions & 1 deletion src/corelib/global/qlibraryinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -851,10 +851,14 @@ QT_END_NAMESPACE

#include "private/qcoreapplication_p.h"

QT_WARNING_DISABLE_GCC("-Wattributes")
QT_WARNING_DISABLE_CLANG("-Wattributes")
QT_WARNING_DISABLE_INTEL(2621)

extern const char qt_core_interpreter[] __attribute__((section(".interp")))
= ELF_INTERPRETER;

extern "C" void qt_core_boilerplate();
extern "C" void qt_core_boilerplate() __attribute__((force_align_arg_pointer));
void qt_core_boilerplate()
{
printf("This is the QtCore library version " QT_BUILD_STR "\n"
Expand Down
2 changes: 1 addition & 1 deletion src/corelib/tools/qlist.h
Original file line number Diff line number Diff line change
Expand Up @@ -1051,7 +1051,7 @@ int lastIndexOf(const QList<T> &list, const U &u, int from)
Node *n = reinterpret_cast<Node *>(list.p.at(from + 1));
while (n-- != b) {
if (n->t() == u)
return typename QList<T>::difference_type(n - b);
return int(n - b);
}
}
return -1;
Expand Down
2 changes: 1 addition & 1 deletion src/widgets/itemviews/qabstractitemview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1776,8 +1776,8 @@ void QAbstractItemView::mousePressEvent(QMouseEvent *event)
QItemSelectionModel::SelectionFlags command = selectionCommand(index, event);
d->noSelectionOnMousePress = command == QItemSelectionModel::NoUpdate || !index.isValid();
QPoint offset = d->offset();
d->pressedPosition = pos + offset;
if ((command & QItemSelectionModel::Current) == 0) {
d->pressedPosition = pos + offset;
d->currentSelectionStartIndex = index;
}
else if (!d->currentSelectionStartIndex.isValid())
Expand Down
13 changes: 8 additions & 5 deletions src/widgets/itemviews/qtreewidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -748,11 +748,14 @@ QMimeData *QTreeModel::internalMimeData() const

QMimeData *QTreeModel::mimeData(const QModelIndexList &indexes) const
{
QList<QTreeWidgetItem*> items;
for (const auto &index : indexes) {
if (index.column() == 0) // only one item per row
items << item(index);
}
QList<QTreeWidgetItem *> items;
std::transform(indexes.begin(), indexes.end(), std::back_inserter(items),
[this](const QModelIndex &idx) -> QTreeWidgetItem * { return item(idx); });

// Ensure we only have one item as an item may have more than
// one index selected if there is more than one column
std::sort(items.begin(), items.end());
items.erase(std::unique(items.begin(), items.end()), items.end());

// cachedIndexes is a little hack to avoid copying from QModelIndexList to
// QList<QTreeWidgetItem*> and back again in the view
Expand Down
1 change: 1 addition & 0 deletions src/widgets/kernel/qgesturemanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ Qt::GestureType QGestureManager::registerGestureRecognizer(QGestureRecognizer *r
void QGestureManager::unregisterGestureRecognizer(Qt::GestureType type)
{
QList<QGestureRecognizer *> list = m_recognizers.values(type);
m_recognizers.remove(type);
foreach (QGesture *g, m_gestureToRecognizer.keys()) {
QGestureRecognizer *recognizer = m_gestureToRecognizer.value(g);
if (list.contains(recognizer)) {
Expand Down

0 comments on commit 74a33df

Please sign in to comment.