summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-03-21 09:52:00 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-03-21 09:52:00 (GMT)
commit55fb13a62a531a7400f8dc602fde5f2529aaaad4 (patch)
treeb942a39f3cdb37ecf5556a2e065853d6c77a81b8 /src/gui
parent78b2e9421c47371b68f4c65a181a077ba3a226ac (diff)
parentb7a0a8dced26daf895fa9932e5a8c81e59fd7b84 (diff)
downloadQt-55fb13a62a531a7400f8dc602fde5f2529aaaad4.zip
Qt-55fb13a62a531a7400f8dc602fde5f2529aaaad4.tar.gz
Qt-55fb13a62a531a7400f8dc602fde5f2529aaaad4.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Let QImageReader open the device if it is not open already Make an attemt to upload QPixmap in the most optimal format on 16-bit clicking on a non focused ItemView would change the cirrent item twice
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/image/qimagereader.cpp2
-rw-r--r--src/gui/itemviews/qabstractitemview.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/image/qimagereader.cpp b/src/gui/image/qimagereader.cpp
index 9320cfc..27f9627 100644
--- a/src/gui/image/qimagereader.cpp
+++ b/src/gui/image/qimagereader.cpp
@@ -503,7 +503,7 @@ QImageReaderPrivate::~QImageReaderPrivate()
bool QImageReaderPrivate::initHandler()
{
// check some preconditions
- if (!device || (!deleteDevice && !device->isOpen())) {
+ if (!device || (!deleteDevice && !device->isOpen() && !device->open(QIODevice::ReadOnly))) {
imageReaderError = QImageReader::DeviceError;
errorString = QLatin1String(QT_TRANSLATE_NOOP(QImageReader, "Invalid device"));
return false;
diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp
index dd9a7e6..0f99949 100644
--- a/src/gui/itemviews/qabstractitemview.cpp
+++ b/src/gui/itemviews/qabstractitemview.cpp
@@ -2090,7 +2090,7 @@ void QAbstractItemView::focusInEvent(QFocusEvent *event)
bool autoScroll = d->autoScroll;
d->autoScroll = false;
QModelIndex index = moveCursor(MoveNext, Qt::NoModifier); // first visible index
- if (index.isValid() && d->isIndexEnabled(index))
+ if (index.isValid() && d->isIndexEnabled(index) && event->reason() != Qt::MouseFocusReason)
selectionModel()->setCurrentIndex(index, QItemSelectionModel::NoUpdate);
d->autoScroll = autoScroll;
}