Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/4.7' into 4.7
Browse files Browse the repository at this point in the history
Conflicts:
	src/gui/inputmethod/qcoefepinputcontext_s60.cpp
  • Loading branch information
Sergio Ahumada committed Oct 27, 2011
2 parents 6937461 + 7a0cdd8 commit 5c02fd9
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 2 deletions.
2 changes: 1 addition & 1 deletion doc/src/getting-started/gettingstartedqt.qdoc
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@
\code
25 Notepad::Notepad()
26 {
27 saveAction = new QAction(tr("&Open"), this);
27 openAction = new QAction(tr("&Open"), this);
28 saveAction = new QAction(tr("&Save"), this);
29 exitAction = new QAction(tr("E&xit"), this);
30
Expand Down
10 changes: 10 additions & 0 deletions src/declarative/graphicsitems/qdeclarativegridview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2852,6 +2852,11 @@ void QDeclarativeGridView::itemsInserted(int modelIndex, int count)
addedVisible = true;
}
FxGridItem *item = d->createItem(modelIndex + i);
if (!item) {
// broken or no delegate
d->clear();
return;
}
d->visibleItems.insert(index, item);
item->setPosition(colPos, rowPos);
added.append(item);
Expand Down Expand Up @@ -3042,6 +3047,11 @@ void QDeclarativeGridView::itemsMoved(int from, int to, int count)
FxGridItem *movedItem = moved.take(item->index);
if (!movedItem)
movedItem = d->createItem(item->index);
if (!movedItem) {
// broken or no delegate
d->clear();
return;
}
it = d->visibleItems.insert(it, movedItem);
if (it == d->visibleItems.begin() && firstItem)
movedItem->setPosition(firstItem->colPos(), firstItem->rowPos());
Expand Down
15 changes: 15 additions & 0 deletions src/declarative/graphicsitems/qdeclarativelistview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3283,6 +3283,11 @@ void QDeclarativeListView::itemsInserted(int modelIndex, int count)
addedVisible = true;
}
FxListItem *item = d->createItem(modelIndex + i);
if (!item) {
// broken or no delegate
d->clear();
return;
}
d->visibleItems.insert(insertionIdx, item);
pos -= item->size() + d->spacing;
item->setPosition(pos);
Expand Down Expand Up @@ -3313,6 +3318,11 @@ void QDeclarativeListView::itemsInserted(int modelIndex, int count)
addedVisible = true;
}
FxListItem *item = d->createItem(modelIndex + i);
if (!item) {
// broken or no delegate
d->clear();
return;
}
d->visibleItems.insert(index, item);
item->setPosition(pos);
added.append(item);
Expand Down Expand Up @@ -3516,6 +3526,11 @@ void QDeclarativeListView::itemsMoved(int from, int to, int count)
FxListItem *movedItem = moved.take(item->index);
if (!movedItem)
movedItem = d->createItem(item->index);
if (!movedItem) {
// broken or no delegate
d->clear();
return;
}
if (item->index <= firstVisible->index)
moveBy -= movedItem->size();
it = d->visibleItems.insert(it, movedItem);
Expand Down
2 changes: 1 addition & 1 deletion src/gui/inputmethod/qcoefepinputcontext_s60.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ void QCoeFepInputContext::reset()
// text.
if (m_cachedPreeditString.isEmpty() && !(currentHints & Qt::ImhNoPredictiveText)) {
m_cachedPreeditString = m_preeditString;
if (focusWidget()) {
if (focusWidget() && !m_cachedPreeditString.isEmpty()) {
int cursor = focusWidget()->inputMethodQuery(Qt::ImCursorPosition).toInt();
int anchor = focusWidget()->inputMethodQuery(Qt::ImAnchorPosition).toInt();
if (cursor == anchor)
Expand Down

0 comments on commit 5c02fd9

Please sign in to comment.