summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-08-11 18:35:41 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-08-11 18:35:41 (GMT)
commit263bdc38f494e5d0be69b61c92ca6456fc4db330 (patch)
treec18351b345ff69c3d412ebd9d5802e00e91fb8c2 /src
parent0bbc19d5721c8c00f2b3c6cb28cca2d0adfda315 (diff)
parent319f4f07c80664d6e244daf22d9b4c13e5d4e69a (diff)
downloadQt-263bdc38f494e5d0be69b61c92ca6456fc4db330.zip
Qt-263bdc38f494e5d0be69b61c92ca6456fc4db330.tar.gz
Qt-263bdc38f494e5d0be69b61c92ca6456fc4db330.tar.bz2
Merge branch 'qt-4.7-from-4.6' of scm.dev.nokia.troll.no:qt/qt-integration into 4.7-integration
* 'qt-4.7-from-4.6' of scm.dev.nokia.troll.no:qt/qt-integration: (22 commits) QSslSocket: fix security vulnerability with wildcard IP addresses fix build for -no-qt3support Fix handling of SSL certificates with wildcard domain names Doc: typo fixed in qlibraryinfo.cpp Fixes for combining multiple Qt::ImhXXXOnly with S60 FEP fix compile error Test code for input method hints Make input methods work correctly with Symbian^3 FEP in numeric mode Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( bbff6182e525fcf58dbc7426a1fbbf8f31588214 ) Improving text coordinate rounding in the OpenVG paint engine Add QDir::homePath() for the log file in QTestFileLogger in testlib on Symbian, both hardware and emulator. Fixed test regression on Mac Don't resolve GLSL extensions if no shaders setUniformValue(QSize) was setting (w,w) not (w,h) Fixed build break on Symbian versions earlier than S^3 Enabled tst_mediaobject::testPlayFromResource on Symbian Added support to Phonon MMF backend for playback of Qt resource files Updated tst_mediaobject resource playback test cases Added support to Phonon MMF backend for playback of Qt resource files Fix proxy widgets with the OpenVG paint engine. ...
Diffstat (limited to 'src')
-rw-r--r--src/corelib/global/qlibraryinfo.cpp2
-rw-r--r--src/gui/inputmethod/qcoefepinputcontext_s60.cpp49
-rw-r--r--src/opengl/qglextensions.cpp4
-rw-r--r--src/opengl/qglshaderprogram.cpp2
-rw-r--r--src/openvg/qpaintengine_vg.cpp26
-rw-r--r--src/testlib/qtestfilelogger.cpp16
6 files changed, 71 insertions, 28 deletions
diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
index 3515777..ea7e2e4 100644
--- a/src/corelib/global/qlibraryinfo.cpp
+++ b/src/corelib/global/qlibraryinfo.cpp
@@ -476,7 +476,7 @@ QLibraryInfo::location(LibraryLocation loc)
\value PrefixPath The default prefix for all paths.
\value DocumentationPath The location for documentation upon install.
\value HeadersPath The location for all headers.
- \value LibrariesPath The location of installed librarires.
+ \value LibrariesPath The location of installed libraries.
\value BinariesPath The location of installed Qt binaries (tools and applications).
\value PluginsPath The location of installed Qt plugins.
\value ImportsPath The location of installed QML extensions to import.
diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
index 394d374..c4d60a5 100644
--- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
+++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
@@ -364,10 +364,10 @@ void QCoeFepInputContext::applyHints(Qt::InputMethodHints hints)
commitTemporaryPreeditString();
- bool numbersOnly = hints & ImhDigitsOnly || hints & ImhFormattedNumbersOnly
- || hints & ImhDialableCharactersOnly;
- bool noOnlys = !(numbersOnly || hints & ImhUppercaseOnly
- || hints & ImhLowercaseOnly);
+ const bool anynumbermodes = hints & (ImhDigitsOnly | ImhFormattedNumbersOnly | ImhDialableCharactersOnly);
+ const bool anytextmodes = hints & (ImhUppercaseOnly | ImhLowercaseOnly | ImhEmailCharactersOnly | ImhUrlCharactersOnly);
+ const bool numbersOnly = anynumbermodes && !anytextmodes;
+ const bool noOnlys = !(hints & ImhExclusiveInputMask);
TInt flags;
Qt::InputMethodHints oldHints = hints;
@@ -379,8 +379,7 @@ void QCoeFepInputContext::applyHints(Qt::InputMethodHints hints)
}
if (!noOnlys) {
// Make sure that the preference is within the permitted set.
- if (hints & ImhPreferNumbers && !(hints & ImhDigitsOnly || hints & ImhFormattedNumbersOnly
- || hints & ImhDialableCharactersOnly)) {
+ if (hints & ImhPreferNumbers && !anynumbermodes) {
hints &= ~ImhPreferNumbers;
} else if (hints & ImhPreferUppercase && !(hints & ImhUppercaseOnly)) {
hints &= ~ImhPreferUppercase;
@@ -393,8 +392,7 @@ void QCoeFepInputContext::applyHints(Qt::InputMethodHints hints)
hints |= ImhPreferLowercase;
} else if (hints & ImhUppercaseOnly) {
hints |= ImhPreferUppercase;
- } else if (hints & ImhDigitsOnly || hints & ImhFormattedNumbersOnly
- || hints & ImhDialableCharactersOnly) {
+ } else if (numbersOnly) {
hints |= ImhPreferNumbers;
}
}
@@ -408,13 +406,21 @@ void QCoeFepInputContext::applyHints(Qt::InputMethodHints hints)
m_fepState->SetCurrentInputMode(EAknEditorTextInputMode);
}
flags = 0;
- if (numbersOnly) {
+ if (noOnlys || (anynumbermodes && anytextmodes)) {
+ flags = EAknEditorAllInputModes;
+ }
+ else if (anynumbermodes) {
flags |= EAknEditorNumericInputMode;
+ if (QSysInfo::s60Version() > QSysInfo::SV_S60_5_0
+ && ((hints & ImhFormattedNumbersOnly) || (hints & ImhDialableCharactersOnly))) {
+ //workaround - the * key does not launch the symbols menu, making it impossible to use these modes unless text mode is enabled.
+ flags |= EAknEditorTextInputMode;
+ }
}
- if (hints & ImhUppercaseOnly || hints & ImhLowercaseOnly) {
+ else if (anytextmodes) {
flags |= EAknEditorTextInputMode;
}
- if (flags == 0) {
+ else {
flags = EAknEditorAllInputModes;
}
m_fepState->SetPermittedInputModes(flags);
@@ -461,24 +467,33 @@ void QCoeFepInputContext::applyHints(Qt::InputMethodHints hints)
if (hints & ImhNoPredictiveText || hints & ImhHiddenText) {
flags |= EAknEditorFlagNoT9;
}
+ // if alphanumeric input, or if multiple incompatible number modes are selected;
+ // then make all symbols available in numeric mode too.
+ if (!numbersOnly || ((hints & ImhFormattedNumbersOnly) && (hints & ImhDialableCharactersOnly)))
+ flags |= EAknEditorFlagUseSCTNumericCharmap;
m_fepState->SetFlags(flags);
ReportAknEdStateEvent(MAknEdStateObserver::EAknEdwinStateFlagsUpdate);
- if (hints & ImhFormattedNumbersOnly) {
+ if (hints & ImhDialableCharactersOnly) {
+ // This is first, because if (ImhDialableCharactersOnly | ImhFormattedNumbersOnly)
+ // is specified, this one is more natural (# key enters a #)
+ flags = EAknEditorStandardNumberModeKeymap;
+ } else if (hints & ImhFormattedNumbersOnly) {
+ // # key enters decimal point
flags = EAknEditorCalculatorNumberModeKeymap;
} else if (hints & ImhDigitsOnly) {
+ // This is last, because it is most restrictive (# key is inactive)
flags = EAknEditorPlainNumberModeKeymap;
} else {
- // ImhDialableCharactersOnly is the fallback as well, so we don't need to check for
- // that flag.
flags = EAknEditorStandardNumberModeKeymap;
}
m_fepState->SetNumericKeymap(static_cast<TAknEditorNumericKeymap>(flags));
- if (hints & ImhEmailCharactersOnly) {
- m_fepState->SetSpecialCharacterTableResourceId(R_AVKON_EMAIL_ADDR_SPECIAL_CHARACTER_TABLE_DIALOG);
- } else if (hints & ImhUrlCharactersOnly) {
+ if (hints & ImhUrlCharactersOnly) {
+ // URL characters is everything except space, so a superset of the other restrictions
m_fepState->SetSpecialCharacterTableResourceId(R_AVKON_URL_SPECIAL_CHARACTER_TABLE_DIALOG);
+ } else if (hints & ImhEmailCharactersOnly) {
+ m_fepState->SetSpecialCharacterTableResourceId(R_AVKON_EMAIL_ADDR_SPECIAL_CHARACTER_TABLE_DIALOG);
} else {
m_fepState->SetSpecialCharacterTableResourceId(R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG);
}
diff --git a/src/opengl/qglextensions.cpp b/src/opengl/qglextensions.cpp
index 8e2bbd4..6aec8ae 100644
--- a/src/opengl/qglextensions.cpp
+++ b/src/opengl/qglextensions.cpp
@@ -255,6 +255,10 @@ bool qt_resolve_glsl_extensions(QGLContext *ctx)
glFramebufferTextureLayerEXT = (_glFramebufferTextureLayerEXT) ctx->getProcAddress(QLatin1String("glFramebufferTextureLayerEXT"));
glFramebufferTextureFaceEXT = (_glFramebufferTextureFaceEXT) ctx->getProcAddress(QLatin1String("glFramebufferTextureFaceEXT"));
+ // Must at least have the FragmentShader extension to continue.
+ if (!(QGLExtensions::glExtensions() & QGLExtensions::FragmentShader))
+ return false;
+
glCreateShader = (_glCreateShader) ctx->getProcAddress(QLatin1String("glCreateShader"));
if (glCreateShader) {
glShaderSource = (_glShaderSource) ctx->getProcAddress(QLatin1String("glShaderSource"));
diff --git a/src/opengl/qglshaderprogram.cpp b/src/opengl/qglshaderprogram.cpp
index c7689b8..74382b0 100644
--- a/src/opengl/qglshaderprogram.cpp
+++ b/src/opengl/qglshaderprogram.cpp
@@ -2121,7 +2121,7 @@ void QGLShaderProgram::setUniformValue(int location, const QSize& size)
Q_D(QGLShaderProgram);
Q_UNUSED(d);
if (location != -1) {
- GLfloat values[4] = {GLfloat(size.width()), GLfloat(size.width())};
+ GLfloat values[4] = {GLfloat(size.width()), GLfloat(size.height())};
glUniform2fv(location, 1, values);
}
}
diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp
index 1d633ed..75e5a60 100644
--- a/src/openvg/qpaintengine_vg.cpp
+++ b/src/openvg/qpaintengine_vg.cpp
@@ -77,6 +77,9 @@ QT_BEGIN_NAMESPACE
#if !defined(QVG_NO_DRAW_GLYPHS)
+// use the same rounding as in qrasterizer.cpp (6 bit fixed point)
+static const qreal aliasedCoordinateDelta = 0.5 - 0.015625;
+
Q_DECL_IMPORT extern int qt_defaultDpiX();
Q_DECL_IMPORT extern int qt_defaultDpiY();
@@ -102,6 +105,7 @@ private:
class QVGPaintEnginePrivate : public QPaintEngineExPrivate
{
+ Q_DECLARE_PUBLIC(QVGPaintEngine)
public:
// Extra blending modes from VG_KHR_advanced_blending extension.
// Use the QT_VG prefix to avoid conflicts with any definitions
@@ -132,7 +136,7 @@ public:
QT_VG_BLEND_XOR_KHR = 0x2026
};
- QVGPaintEnginePrivate();
+ QVGPaintEnginePrivate(QVGPaintEngine *q_ptr);
~QVGPaintEnginePrivate();
void init();
@@ -153,6 +157,7 @@ public:
void setBrushTransform(const QBrush& brush, VGMatrixMode mode);
void setupColorRamp(const QGradient *grad, VGPaint paint);
void setImageOptions();
+ void systemStateChanged();
#if !defined(QVG_SCISSOR_CLIP)
void ensureMask(QVGPaintEngine *engine, int width, int height);
void modifyMask
@@ -281,6 +286,9 @@ public:
// Clear all lazily-set modes.
void clearModes();
+
+private:
+ QVGPaintEngine *q;
};
inline void QVGPaintEnginePrivate::setImageMode(VGImageMode mode)
@@ -332,7 +340,7 @@ void QVGPaintEnginePrivate::clearModes()
imageQuality = (VGImageQuality)0;
}
-QVGPaintEnginePrivate::QVGPaintEnginePrivate()
+QVGPaintEnginePrivate::QVGPaintEnginePrivate(QVGPaintEngine *q_ptr) : q(q_ptr)
{
init();
}
@@ -1431,7 +1439,7 @@ QVGPainterState::~QVGPainterState()
}
QVGPaintEngine::QVGPaintEngine()
- : QPaintEngineEx(*new QVGPaintEnginePrivate)
+ : QPaintEngineEx(*new QVGPaintEnginePrivate(this))
{
}
@@ -2974,6 +2982,11 @@ void QVGPaintEnginePrivate::setImageOptions()
}
}
+void QVGPaintEnginePrivate::systemStateChanged()
+{
+ q->updateScissor();
+}
+
static void drawVGImage(QVGPaintEnginePrivate *d,
const QRectF& r, VGImage vgImg,
const QSize& imageSize, const QRectF& sr)
@@ -3432,9 +3445,10 @@ void QVGPaintEngine::drawStaticTextItem(QStaticTextItem *textItem)
// Set the transformation to use for drawing the current glyphs.
QTransform glyphTransform(d->pathTransform);
if (d->transform.type() <= QTransform::TxTranslate) {
- // Prevent blurriness of unscaled, unrotated text by using integer coordinates.
- // Using ceil(x-0.5) instead of qRound() or int-cast, behave like other paint engines.
- glyphTransform.translate(ceil(p.x() - 0.5), ceil(p.y() - 0.5));
+ // Prevent blurriness of unscaled, unrotated text by forcing integer coordinates.
+ glyphTransform.translate(
+ floor(p.x() + glyphTransform.dx() + aliasedCoordinateDelta) - glyphTransform.dx(),
+ floor(p.y() - glyphTransform.dy() + aliasedCoordinateDelta) + glyphTransform.dy());
} else {
glyphTransform.translate(p.x(), p.y());
}
diff --git a/src/testlib/qtestfilelogger.cpp b/src/testlib/qtestfilelogger.cpp
index a5cdc80..9d1ee6a 100644
--- a/src/testlib/qtestfilelogger.cpp
+++ b/src/testlib/qtestfilelogger.cpp
@@ -44,6 +44,8 @@
#include "QtTest/private/qtestlog_p.h"
#include "QtTest/private/qtestresult_p.h"
+#include <QtCore/qdir.h>
+
#include <stdlib.h>
#include <stdio.h>
@@ -69,11 +71,19 @@ QTestFileLogger::~QTestFileLogger()
void QTestFileLogger::init()
{
char filename[100];
+ int index = 0;
+#if defined(Q_OS_SYMBIAN)
+ QByteArray ba(QDir::toNativeSeparators(QString(QDir::homePath()+QDir::separator())).toUtf8());
+ index = ba.length();
+ QTest::qt_snprintf(filename, sizeof(filename), "%s%s.log",
+ ba.constData(), QTestResult::currentTestObjectName());
+#else
QTest::qt_snprintf(filename, sizeof(filename), "%s.log",
QTestResult::currentTestObjectName());
-
- // Keep filenames simple
- for (uint i = 0; i < sizeof(filename) && filename[i]; ++i) {
+#endif
+
+ // Keep filenames simple
+ for (uint i = index; i < sizeof(filename) && filename[i]; ++i) {
char& c = filename[i];
if (!((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')
|| (c >= '0' && c <= '9') || c == '-' || c == '.')) {