summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWater-Team <water@pad.test.qt.nokia.com>2011-09-16 23:00:14 (GMT)
committerWater-Team <water@pad.test.qt.nokia.com>2011-09-16 23:00:14 (GMT)
commit84ace02a016ded4752b6711166dd16dd8bfb4330 (patch)
tree5139697f5441ee32183b801798e846f364e53f28
parent2fa6d410c6733863b19393c13efbdcb7efd59fc0 (diff)
parente1de7eda203cef794bb48c01155a7eaea24f902d (diff)
downloadQt-84ace02a016ded4752b6711166dd16dd8bfb4330.zip
Qt-84ace02a016ded4752b6711166dd16dd8bfb4330.tar.gz
Qt-84ace02a016ded4752b6711166dd16dd8bfb4330.tar.bz2
Merge branch '4.8-upstream' into master-water
-rw-r--r--dist/changes-4.8.03
-rw-r--r--src/corelib/global/qnamespace.qdoc2
-rw-r--r--src/declarative/graphicsitems/qdeclarativegridview.cpp6
-rw-r--r--src/declarative/graphicsitems/qdeclarativelistview.cpp7
-rw-r--r--src/gui/text/qtextengine.cpp12
-rw-r--r--src/gui/text/qtextengine_p.h2
-rw-r--r--src/gui/text/qtextlayout.cpp4
-rw-r--r--src/network/access/qhttpnetworkconnection.cpp20
-rw-r--r--src/network/access/qnetworkreplyimpl.cpp5
-rw-r--r--src/opengl/opengl.pro.user.2.1pre183
-rw-r--r--src/plugins/bearer/corewlan/corewlan.pro3
-rw-r--r--src/testlib/qtestxmlstreamer.h2
-rw-r--r--tools/qdoc3/cppcodemarker.cpp18
-rw-r--r--tools/runonphone/codasignalhandler.cpp2
14 files changed, 51 insertions, 118 deletions
diff --git a/dist/changes-4.8.0 b/dist/changes-4.8.0
index b8e3842..2d46a26 100644
--- a/dist/changes-4.8.0
+++ b/dist/changes-4.8.0
@@ -223,7 +223,8 @@ Qt for Windows CE
- qmake
-
+ * Implemented "aux" template that allows making use of the INSTALLS variable
+ without building anything. Needed for projects with QML entry point.
- configure
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc
index 4974aef..03e0d1f 100644
--- a/src/corelib/global/qnamespace.qdoc
+++ b/src/corelib/global/qnamespace.qdoc
@@ -2560,7 +2560,7 @@
will imply to use the layout direction set on the parent widget or QApplication. This
has the same effect as QWidget::unsetLayoutDirection().
- When LayoutDirectoinAuto is used in conjunction with text layouting, it will imply that the text
+ When LayoutDirectionAuto is used in conjunction with text layouting, it will imply that the text
directionality is determined from the content of the string to be layouted.
\sa QApplication::setLayoutDirection(), QWidget::setLayoutDirection(), QTextOption::setTextDirection(), QString::isRightToLeft()
diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp
index e53472d..023737d 100644
--- a/src/declarative/graphicsitems/qdeclarativegridview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp
@@ -1066,6 +1066,8 @@ void QDeclarativeGridViewPrivate::fixup(AxisData &data, qreal minExtent, qreal m
highlightEnd = highlightRangeEnd;
}
+ bool strictHighlightRange = haveHighlightRange && highlightRange == QDeclarativeGridView::StrictlyEnforceRange;
+
if (snapMode != QDeclarativeGridView::NoSnap) {
qreal tempPosition = isRightToLeftTopToBottom() ? -position()-size() : position();
if (snapMode == QDeclarativeGridView::SnapOneRow && moveReason == Mouse) {
@@ -1083,7 +1085,7 @@ void QDeclarativeGridViewPrivate::fixup(AxisData &data, qreal minExtent, qreal m
FxGridItem *topItem = snapItemAt(tempPosition+highlightStart);
FxGridItem *bottomItem = snapItemAt(tempPosition+highlightEnd);
qreal pos;
- if (topItem && bottomItem && haveHighlightRange && highlightRange == QDeclarativeGridView::StrictlyEnforceRange) {
+ if (topItem && bottomItem && strictHighlightRange) {
qreal topPos = qMin(topItem->rowPos() - highlightStart, -maxExtent);
qreal bottomPos = qMax(bottomItem->rowPos() - highlightEnd, -minExtent);
pos = qAbs(data.move + topPos) < qAbs(data.move + bottomPos) ? topPos : bottomPos;
@@ -1091,7 +1093,7 @@ void QDeclarativeGridViewPrivate::fixup(AxisData &data, qreal minExtent, qreal m
qreal headerPos = 0;
if (header)
headerPos = isRightToLeftTopToBottom() ? header->rowPos() + cellWidth - headerSize() : header->rowPos();
- if (topItem->index == 0 && header && tempPosition+highlightStart < headerPos+headerSize()/2) {
+ if (topItem->index == 0 && header && tempPosition+highlightStart < headerPos+headerSize()/2 && !strictHighlightRange) {
pos = isRightToLeftTopToBottom() ? - headerPos + highlightStart - size() : headerPos - highlightStart;
} else {
if (isRightToLeftTopToBottom())
diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp
index f0fc96b..6a91e5f 100644
--- a/src/declarative/graphicsitems/qdeclarativelistview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp
@@ -1295,6 +1295,7 @@ void QDeclarativeListViewPrivate::fixup(AxisData &data, qreal minExtent, qreal m
correctFlick = false;
fixupMode = moveReason == Mouse ? fixupMode : Immediate;
+ bool strictHighlightRange = haveHighlightRange && highlightRange == QDeclarativeListView::StrictlyEnforceRange;
qreal highlightStart;
qreal highlightEnd;
@@ -1327,9 +1328,9 @@ void QDeclarativeListViewPrivate::fixup(AxisData &data, qreal minExtent, qreal m
FxListItem *topItem = snapItemAt(tempPosition+highlightStart);
FxListItem *bottomItem = snapItemAt(tempPosition+highlightEnd);
qreal pos;
- bool isInBounds = -position() > maxExtent && -position() < minExtent;
+ bool isInBounds = -position() > maxExtent && -position() <= minExtent;
if (topItem && isInBounds) {
- if (topItem->index == 0 && header && tempPosition+highlightStart < header->position()+header->size()/2) {
+ if (topItem->index == 0 && header && tempPosition+highlightStart < header->position()+header->size()/2 && !strictHighlightRange) {
pos = isRightToLeft() ? - header->position() + highlightStart - size() : header->position() - highlightStart;
} else {
if (isRightToLeft())
@@ -1358,7 +1359,7 @@ void QDeclarativeListViewPrivate::fixup(AxisData &data, qreal minExtent, qreal m
}
vTime = timeline.time();
}
- } else if (currentItem && haveHighlightRange && highlightRange == QDeclarativeListView::StrictlyEnforceRange
+ } else if (currentItem && strictHighlightRange
&& moveReason != QDeclarativeListViewPrivate::SetIndex) {
updateHighlight();
qreal pos = currentItem->itemPosition();
diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp
index 4886006..2fc1dbd 100644
--- a/src/gui/text/qtextengine.cpp
+++ b/src/gui/text/qtextengine.cpp
@@ -1386,6 +1386,7 @@ QTextEngine::~QTextEngine()
if (!stackEngine)
delete layoutData;
delete specialData;
+ resetFontEngineCache();
}
const HB_CharAttributes *QTextEngine::attributes() const
@@ -1446,6 +1447,13 @@ static inline void releaseCachedFontEngine(QFontEngine *fontEngine)
}
}
+void QTextEngine::resetFontEngineCache()
+{
+ releaseCachedFontEngine(feCache.prevFontEngine);
+ releaseCachedFontEngine(feCache.prevScaledFontEngine);
+ feCache.reset();
+}
+
void QTextEngine::invalidate()
{
freeMemory();
@@ -1454,9 +1462,7 @@ void QTextEngine::invalidate()
if (specialData)
specialData->resolvedFormatIndices.clear();
- releaseCachedFontEngine(feCache.prevFontEngine);
- releaseCachedFontEngine(feCache.prevScaledFontEngine);
- feCache.reset();
+ resetFontEngineCache();
}
void QTextEngine::clearLineData()
diff --git a/src/gui/text/qtextengine_p.h b/src/gui/text/qtextengine_p.h
index 0a86886..067e81d 100644
--- a/src/gui/text/qtextengine_p.h
+++ b/src/gui/text/qtextengine_p.h
@@ -630,6 +630,8 @@ public:
int positionAfterVisualMovement(int oldPos, QTextCursor::MoveOperation op);
void insertionPointsForLine(int lineNum, QVector<int> &insertionPoints);
+ void resetFontEngineCache();
+
private:
void setBoundary(int strPos) const;
void addRequiredBoundaries() const;
diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp
index 4595ef5..83c3676 100644
--- a/src/gui/text/qtextlayout.cpp
+++ b/src/gui/text/qtextlayout.cpp
@@ -375,7 +375,7 @@ QTextLayout::~QTextLayout()
void QTextLayout::setFont(const QFont &font)
{
d->fnt = font;
- d->feCache.reset();
+ d->resetFontEngineCache();
}
/*!
@@ -515,7 +515,7 @@ void QTextLayout::setAdditionalFormats(const QList<FormatRange> &formatList)
}
if (d->block.docHandle())
d->block.docHandle()->documentChange(d->block.position(), d->block.length());
- d->feCache.reset();
+ d->resetFontEngineCache();
}
/*!
diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp
index 6101eea..4f2145e 100644
--- a/src/network/access/qhttpnetworkconnection.cpp
+++ b/src/network/access/qhttpnetworkconnection.cpp
@@ -48,6 +48,7 @@
#include <private/qauthenticator_p.h>
#include <qnetworkproxy.h>
#include <qauthenticator.h>
+#include <qcoreapplication.h>
#include <qbuffer.h>
#include <qpair.h>
@@ -665,32 +666,31 @@ QString QHttpNetworkConnectionPrivate::errorDetail(QNetworkReply::NetworkError e
QString errorString;
switch (errorCode) {
case QNetworkReply::HostNotFoundError:
- errorString = QString::fromLatin1(QT_TRANSLATE_NOOP("QHttp", "Host %1 not found"))
- .arg(socket->peerName());
+ errorString = QCoreApplication::translate("QHttp", "Host %1 not found").arg(socket->peerName());
break;
case QNetworkReply::ConnectionRefusedError:
- errorString = QLatin1String(QT_TRANSLATE_NOOP("QHttp", "Connection refused"));
+ errorString = QCoreApplication::translate("QHttp", "Connection refused");
break;
case QNetworkReply::RemoteHostClosedError:
- errorString = QLatin1String(QT_TRANSLATE_NOOP("QHttp", "Connection closed"));
+ errorString = QCoreApplication::translate("QHttp", "Connection closed");
break;
case QNetworkReply::TimeoutError:
- errorString = QLatin1String(QT_TRANSLATE_NOOP("QAbstractSocket", "Socket operation timed out"));
+ errorString = QCoreApplication::translate("QAbstractSocket", "Socket operation timed out");
break;
case QNetworkReply::ProxyAuthenticationRequiredError:
- errorString = QLatin1String(QT_TRANSLATE_NOOP("QHttp", "Proxy requires authentication"));
+ errorString = QCoreApplication::translate("QHttp", "Proxy requires authentication");
break;
case QNetworkReply::AuthenticationRequiredError:
- errorString = QLatin1String(QT_TRANSLATE_NOOP("QHttp", "Host requires authentication"));
+ errorString = QCoreApplication::translate("QHttp", "Host requires authentication");
break;
case QNetworkReply::ProtocolFailure:
- errorString = QLatin1String(QT_TRANSLATE_NOOP("QHttp", "Data corrupted"));
+ errorString = QCoreApplication::translate("QHttp", "Data corrupted");
break;
case QNetworkReply::ProtocolUnknownError:
- errorString = QLatin1String(QT_TRANSLATE_NOOP("QHttp", "Unknown protocol specified"));
+ errorString = QCoreApplication::translate("QHttp", "Unknown protocol specified");
break;
case QNetworkReply::SslHandshakeFailedError:
- errorString = QLatin1String(QT_TRANSLATE_NOOP("QHttp", "SSL handshake failed"));
+ errorString = QCoreApplication::translate("QHttp", "SSL handshake failed");
break;
default:
// all other errors are treated as QNetworkReply::UnknownNetworkError
diff --git a/src/network/access/qnetworkreplyimpl.cpp b/src/network/access/qnetworkreplyimpl.cpp
index 58eb0d8..0b568d4 100644
--- a/src/network/access/qnetworkreplyimpl.cpp
+++ b/src/network/access/qnetworkreplyimpl.cpp
@@ -275,6 +275,11 @@ void QNetworkReplyImplPrivate::_q_networkSessionConnected()
if (session->state() != QNetworkSession::Connected)
return;
+ #ifndef QT_NO_NETWORKPROXY
+ // Re-set proxies here as new session might have changed them
+ proxyList = manager->d_func()->queryProxy(QNetworkProxyQuery(request.url()));
+ #endif
+
switch (state) {
case QNetworkReplyImplPrivate::Buffering:
case QNetworkReplyImplPrivate::Working:
diff --git a/src/opengl/opengl.pro.user.2.1pre1 b/src/opengl/opengl.pro.user.2.1pre1
deleted file mode 100644
index 0c38724..0000000
--- a/src/opengl/opengl.pro.user.2.1pre1
+++ /dev/null
@@ -1,83 +0,0 @@
-<!DOCTYPE QtCreatorProject>
-<qtcreator>
- <data>
- <variable>ProjectExplorer.Project.ActiveTarget</variable>
- <value type="int">0</value>
- </data>
- <data>
- <variable>ProjectExplorer.Project.EditorSettings</variable>
- <valuemap type="QVariantMap">
- <value key="EditorConfiguration.Codec" type="QByteArray">UTF-8</value>
- </valuemap>
- </data>
- <data>
- <variable>ProjectExplorer.Project.Target.0</variable>
- <valuemap type="QVariantMap">
- <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Desktop</value>
- <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Target.DesktopTarget</value>
- <value key="ProjectExplorer.Target.ActiveBuildConfiguration" type="int">0</value>
- <value key="ProjectExplorer.Target.ActiveRunConfiguration" type="int">0</value>
- <valuemap key="ProjectExplorer.Target.BuildConfiguration.0" type="QVariantMap">
- <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.0" type="QVariantMap">
- <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">qmake</value>
- <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
- <valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList">
- <value type="QString">QMAKE_ABSOLUTE_SOURCE_PATH=/home/jlind/dev/qt/lighthouse-master/src/opengl</value>
- </valuelist>
- </valuemap>
- <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.1" type="QVariantMap">
- <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value>
- <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
- <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
- <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList">
- <value type="QString">-j9</value>
- </valuelist>
- <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
- </valuemap>
- <value key="ProjectExplorer.BuildConfiguration.BuildStepsCount" type="int">2</value>
- <valuemap key="ProjectExplorer.BuildConfiguration.CleanStep.0" type="QVariantMap">
- <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value>
- <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
- <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
- <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList">
- <value type="QString">clean</value>
- </valuelist>
- <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
- </valuemap>
- <value key="ProjectExplorer.BuildConfiguration.CleanStepsCount" type="int">1</value>
- <value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
- <valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
- <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Debug</value>
- <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
- <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">2</value>
- <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/home/jlind/builds/master-lighthouse/src/opengl</value>
- <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">23</value>
- <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">0</value>
- <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
- </valuemap>
- <value key="ProjectExplorer.Target.BuildConfigurationCount" type="int">1</value>
- <valuemap key="ProjectExplorer.Target.RunConfiguration.0" type="QVariantMap">
- <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">headers</value>
- <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4RunConfiguration</value>
- <value key="Qt4ProjectManager.Qt4RunConfiguration.BaseEnvironmentBase" type="int">2</value>
- <valuelist key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments" type="QVariantList"/>
- <value key="Qt4ProjectManager.Qt4RunConfiguration.ProFile" type="QString">../../../../../builds/master-lighthouse/include/QtOpenGL/headers.pri</value>
- <value key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix" type="bool">false</value>
- <value key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal" type="bool">false</value>
- <valuelist key="Qt4ProjectManager.Qt4RunConfiguration.UserEnvironmentChanges" type="QVariantList"/>
- <value key="Qt4ProjectManager.Qt4RunConfiguration.UserSetName" type="bool">false</value>
- <value key="Qt4ProjectManager.Qt4RunConfiguration.UserSetWorkingDirectory" type="bool">false</value>
- <value key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory" type="QString"></value>
- </valuemap>
- <value key="ProjectExplorer.Target.RunConfigurationCount" type="int">1</value>
- </valuemap>
- </data>
- <data>
- <variable>ProjectExplorer.Project.TargetCount</variable>
- <value type="int">1</value>
- </data>
- <data>
- <variable>ProjectExplorer.Project.Updater.FileVersion</variable>
- <value type="int">4</value>
- </data>
-</qtcreator>
diff --git a/src/plugins/bearer/corewlan/corewlan.pro b/src/plugins/bearer/corewlan/corewlan.pro
index 90078e9..590a85b 100644
--- a/src/plugins/bearer/corewlan/corewlan.pro
+++ b/src/plugins/bearer/corewlan/corewlan.pro
@@ -5,9 +5,8 @@ QT = core network
LIBS += -framework Foundation -framework SystemConfiguration
contains(QT_CONFIG, corewlan) {
- isEmpty(QMAKE_MAC_SDK)|contains(QMAKE_MAC_SDK, "/Developer/SDKs/MacOSX10.6.sdk") {
+ isEmpty(QMAKE_MAC_SDK)|contains(QMAKE_MAC_SDK, "/Developer/SDKs/MacOSX10\.[67]\.sdk") {
LIBS += -framework CoreWLAN -framework Security
- DEFINES += MAC_SDK_10_6
}
}
diff --git a/src/testlib/qtestxmlstreamer.h b/src/testlib/qtestxmlstreamer.h
index 46318a9..d4a9079 100644
--- a/src/testlib/qtestxmlstreamer.h
+++ b/src/testlib/qtestxmlstreamer.h
@@ -40,7 +40,7 @@
****************************************************************************/
#ifndef QTESTXMLSTREAMER_H
-#define QTESXMLSTREAMER_H
+#define QTESTXMLSTREAMER_H
#include <QtTest/qtestbasicstreamer.h>
diff --git a/tools/qdoc3/cppcodemarker.cpp b/tools/qdoc3/cppcodemarker.cpp
index 37c2c3a..743688f 100644
--- a/tools/qdoc3/cppcodemarker.cpp
+++ b/tools/qdoc3/cppcodemarker.cpp
@@ -919,7 +919,7 @@ QString CppCodeMarker::addMarkUp(const QString &in,
int i = 0;
int start = 0;
int finish = 0;
- char ch;
+ QChar ch;
QRegExp classRegExp("Qt?(?:[A-Z3]+[a-z][A-Za-z]*|t)");
QRegExp functionRegExp("q([A-Z][a-z]+)+");
@@ -929,13 +929,13 @@ QString CppCodeMarker::addMarkUp(const QString &in,
QString tag;
bool target = false;
- if (isalpha(ch) || ch == '_') {
+ if (ch.isLetter() || ch == '_') {
QString ident;
do {
- ident += ch;
- finish = i;
- readChar();
- } while (ch >= 0 && isalnum(ch) || ch == '_');
+ ident += ch;
+ finish = i;
+ readChar();
+ } while (ch.isLetterOrNumber() || ch == '_');
if (classRegExp.exactMatch(ident)) {
tag = QLatin1String("type");
@@ -952,14 +952,14 @@ QString CppCodeMarker::addMarkUp(const QString &in,
tag = QLatin1String("func");
target = true;
}
- } else if (isdigit(ch)) {
+ } else if (ch.isDigit()) {
do {
finish = i;
readChar();
- } while (isalnum(ch) || ch == '.');
+ } while (ch.isLetterOrNumber() || ch == '.');
tag = QLatin1String("number");
} else {
- switch (ch) {
+ switch (ch.unicode()) {
case '+':
case '-':
case '!':
diff --git a/tools/runonphone/codasignalhandler.cpp b/tools/runonphone/codasignalhandler.cpp
index 0d086b5..3d524dd 100644
--- a/tools/runonphone/codasignalhandler.cpp
+++ b/tools/runonphone/codasignalhandler.cpp
@@ -168,7 +168,7 @@ int CodaSignalHandler::run()
QString deviceError = "No such port";
if (d->codaDevice)
deviceError = d->codaDevice->device()->errorString();
- reportError(tr("Could not open serial device: ").arg(deviceError));
+ reportError(tr("Could not open serial device: %1").arg(deviceError));
SymbianUtils::SymbianDeviceManager::instance()->releaseCodaDevice(d->codaDevice);
return 1;
}