diff options
author | Sergio Ahumada <sergio.ahumada@nokia.com> | 2011-11-15 16:32:31 +0100 |
---|---|---|
committer | Sergio Ahumada <sergio.ahumada@nokia.com> | 2011-11-15 16:32:31 +0100 |
commit | 22bfd2b05a72e1e7d7babcc9c5d824dd87903b6f (patch) | |
tree | bcfc42bd2c2b813b32e1ace72ea1182fae634209 /src | |
parent | 8da9881989ca55f7d5e9e74c91e3abc98ce8a1b5 (diff) | |
parent | f86ca84e783c34e701f3742902161cb365e6e940 (diff) | |
download | qt4-tools-22bfd2b05a72e1e7d7babcc9c5d824dd87903b6f.tar.gz |
Merge branch 4.7 into qt-4.8-from-4.7
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/kernel/qtranslator.cpp | 18 | ||||
-rw-r--r-- | src/gui/graphicsview/qgraphicsitem.cpp | 5 | ||||
-rw-r--r-- | src/imports/shaders/shadereffect.cpp | 4 | ||||
-rw-r--r-- | src/network/access/qhttpnetworkreply.cpp | 6 |
4 files changed, 27 insertions, 6 deletions
diff --git a/src/corelib/kernel/qtranslator.cpp b/src/corelib/kernel/qtranslator.cpp index dfc90e8ee5..692c78c1e0 100644 --- a/src/corelib/kernel/qtranslator.cpp +++ b/src/corelib/kernel/qtranslator.cpp @@ -408,13 +408,26 @@ bool QTranslator::load(const QString & filename, const QString & directory, Q_D(QTranslator); d->clear(); + QString fname = filename; QString prefix; if (QFileInfo(filename).isRelative()) { #ifdef Q_OS_SYMBIAN - if (directory.isEmpty()) + //TFindFile doesn't like path in the filename + QString dir(directory); + int slash = filename.lastIndexOf(QLatin1Char('/')); + slash = qMax(slash, filename.lastIndexOf(QLatin1Char('\\'))); + if (slash >=0) { + //so move the path component into the directory prefix + if (dir.isEmpty()) + dir = filename.left(slash + 1); + else + dir = dir + QLatin1Char('/') + filename.left(slash + 1); + fname = fname.mid(slash + 1); + } + if (dir.isEmpty()) prefix = QCoreApplication::applicationDirPath(); else - prefix = QFileInfo(directory).absoluteFilePath(); //TFindFile doesn't like dirty paths + prefix = QFileInfo(dir).absoluteFilePath(); //TFindFile doesn't like dirty paths if (prefix.length() > 2 && prefix.at(1) == QLatin1Char(':') && prefix.at(0).isLetter()) prefix[0] = QLatin1Char('Y'); #else @@ -428,7 +441,6 @@ bool QTranslator::load(const QString & filename, const QString & directory, QString nativePrefix = QDir::toNativeSeparators(prefix); #endif - QString fname = filename; QString realname; QString delims; delims = search_delimiters.isNull() ? QString::fromLatin1("_.") : search_delimiters; diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index 73e8eed6e2..9ea0b8387f 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -1157,7 +1157,6 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent, const Q if (q_ptr == fsi || q_ptr->isAncestorOf(fsi)) { parentFocusScopeItem = fsi; p->d_ptr->focusScopeItem = 0; - fsi->d_ptr->focusScopeItemChange(false); } break; } @@ -1261,6 +1260,10 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent, const Q if (!inDestructor && (transformData || (newParent && newParent->d_ptr->transformData))) transformChanged(); + // Reparenting is finished, now safe to notify the previous focusScopeItem about changes + if (parentFocusScopeItem) + parentFocusScopeItem->d_ptr->focusScopeItemChange(false); + // Restore the sub focus chain. if (subFocusItem) { subFocusItem->d_ptr->setSubFocus(newParent); diff --git a/src/imports/shaders/shadereffect.cpp b/src/imports/shaders/shadereffect.cpp index f40d6b84a9..a5164e27d3 100644 --- a/src/imports/shaders/shadereffect.cpp +++ b/src/imports/shaders/shadereffect.cpp @@ -61,6 +61,7 @@ ShaderEffect::~ShaderEffect() void ShaderEffect::prepareBufferedDraw(QPainter *painter) { +#ifndef QT_NO_DYNAMIC_CAST // This workaround needed because QGraphicsEffect seems to always utilize default painters worldtransform // instead of the active painters worldtransform. const ShaderEffectBuffer *effectBuffer = dynamic_cast<ShaderEffectBuffer*> (painter->device()); @@ -70,6 +71,9 @@ void ShaderEffect::prepareBufferedDraw(QPainter *painter) } else { savedWorldTransform = painter->worldTransform(); } +#else + Q_UNUSED(painter); +#endif } void ShaderEffect::draw (QPainter *painter) diff --git a/src/network/access/qhttpnetworkreply.cpp b/src/network/access/qhttpnetworkreply.cpp index 6173b39ff9..3dc8b2fe7b 100644 --- a/src/network/access/qhttpnetworkreply.cpp +++ b/src/network/access/qhttpnetworkreply.cpp @@ -472,8 +472,10 @@ int QHttpNetworkReplyPrivate::gunzipBodyPartially(QByteArray &compressed, QByteA void QHttpNetworkReplyPrivate::gunzipBodyPartiallyEnd() { - inflateEnd(&inflateStrm); - initInflate = false; + if (initInflate) { + inflateEnd(&inflateStrm); + initInflate = false; + } } #endif |