summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWater-Team <water@pad.test.qt.nokia.com>2011-12-13 00:00:13 (GMT)
committerWater-Team <water@pad.test.qt.nokia.com>2011-12-13 00:00:13 (GMT)
commit84845ef01c821b9111b436fb4a809b1e192d920c (patch)
tree560d5d8bd7e9c2de0f0f662aaeb8022424986b10
parent2ead9985accc317d893d5daf209663b189b03986 (diff)
parent8203fbfc9e6762dc08676538d82d14709658d275 (diff)
downloadQt-84845ef01c821b9111b436fb4a809b1e192d920c.zip
Qt-84845ef01c821b9111b436fb4a809b1e192d920c.tar.gz
Qt-84845ef01c821b9111b436fb4a809b1e192d920c.tar.bz2
Merge branch '4.8-upstream' into master-water
-rw-r--r--qmake/generators/symbian/symmake_sbsv2.cpp4
-rw-r--r--src/gui/inputmethod/qcoefepinputcontext_s60.cpp26
-rw-r--r--src/opengl/qgl_egl.cpp20
-rw-r--r--src/opengl/qgl_symbian.cpp21
4 files changed, 55 insertions, 16 deletions
diff --git a/qmake/generators/symbian/symmake_sbsv2.cpp b/qmake/generators/symbian/symmake_sbsv2.cpp
index cc32f8d..5077be5 100644
--- a/qmake/generators/symbian/symmake_sbsv2.cpp
+++ b/qmake/generators/symbian/symmake_sbsv2.cpp
@@ -650,7 +650,11 @@ void SymbianSbsv2MakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t
foreach(QString targetItem, project->values(QLatin1String("QMAKE_INTERNAL_ET_PARSED_TARGETS.") + item)) {
// Make sure targetpath is absolute
QString absoluteTarget = QDir::cleanPath(outputDir.absoluteFilePath(targetItem));
+#if defined(Q_OS_WIN)
+ if (allPreDeps.contains(absoluteTarget, Qt::CaseInsensitive)) {
+#else
if (allPreDeps.contains(absoluteTarget)) {
+#endif
QStringList deps = project->values(QLatin1String("QMAKE_INTERNAL_ET_PARSED_DEPS.") + item + targetItem);
QString commandItem = project->values(QLatin1String("QMAKE_INTERNAL_ET_PARSED_CMD.") + item + targetItem).join(" ");
diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
index 3bcac62..02bc4d0 100644
--- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
+++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
@@ -1388,15 +1388,25 @@ void QCoeFepInputContext::StartFepInlineEditL(const TDesC& aInitialInlineText,
// but FEP requires that selected text is always removed at StartFepInlineEditL.
// Let's remove the selected text if aInitialInlineText is empty and there is selected text
if (m_preeditString.isEmpty()) {
- int anchor = w->inputMethodQuery(Qt::ImAnchorPosition).toInt();
- int cursorPos = w->inputMethodQuery(Qt::ImCursorPosition).toInt();
- int replacementLength = qAbs(cursorPos-anchor);
- if (replacementLength > 0) {
- int replacementStart = cursorPos < anchor ? 0 : -replacementLength;
- QList<QInputMethodEvent::Attribute> clearSelectionAttributes;
- QInputMethodEvent clearSelectionEvent(QLatin1String(""), clearSelectionAttributes);
- clearSelectionEvent.setCommitString(QLatin1String(""), replacementStart, replacementLength);
+ QString currentSelection = w->inputMethodQuery(Qt::ImCurrentSelection).toString();
+ if (!currentSelection.isEmpty()) {
+ // To correctly remove selection in cases where we have multiple lines selected,
+ // we must rely on the control's own selection removal mechanism, as surrounding
+ // text contains only one line. It's also impossible to accurately detect
+ // these overselection cases as the anchor and cursor positions are limited to the
+ // surrounding text.
+ // Solution is to clear the selection by faking a preedit. Use a dummy character
+ // from the current selection just to be safe.
+ QString dummyText = currentSelection.left(1);
+ QList<QInputMethodEvent::Attribute> attributes;
+ QInputMethodEvent clearSelectionEvent(dummyText, attributes);
+ clearSelectionEvent.setCommitString(QLatin1String(""), 0, 0);
sendEvent(clearSelectionEvent);
+
+ // Now that selection is taken care of, clear the fake preedit.
+ QInputMethodEvent clearPreeditEvent(QLatin1String(""), attributes);
+ clearPreeditEvent.setCommitString(QLatin1String(""), 0, 0);
+ sendEvent(clearPreeditEvent);
}
}
diff --git a/src/opengl/qgl_egl.cpp b/src/opengl/qgl_egl.cpp
index 0b96350..21047d7 100644
--- a/src/opengl/qgl_egl.cpp
+++ b/src/opengl/qgl_egl.cpp
@@ -64,6 +64,25 @@ void qt_eglproperties_set_glformat(QEglProperties& eglProperties, const QGLForma
int stencilSize = glFormat.stencilBufferSize();
int sampleCount = glFormat.samples();
+#ifdef Q_OS_SYMBIAN
+ // on Symbian we prefer 32-bit configs
+ if (glFormat.alpha() && alphaSize <= 0)
+ alphaSize = 8;
+ if (glFormat.depth() && depthSize <= 0)
+ depthSize = 24;
+ if (glFormat.stencil() && stencilSize <= 0)
+ stencilSize = 8;
+ if (glFormat.sampleBuffers() && sampleCount <= 0)
+ sampleCount = 1;
+
+ redSize = redSize > 0 ? redSize : 8;
+ greenSize = greenSize > 0 ? greenSize : 8;
+ blueSize = blueSize > 0 ? blueSize : 8;
+ alphaSize = alphaSize > 0 ? alphaSize : 8;
+ depthSize = depthSize > 0 ? depthSize : 24;
+ stencilSize = stencilSize > 0 ? stencilSize : 8;
+ sampleCount = sampleCount > 0 ? sampleCount : 4;
+#else
// QGLFormat uses a magic value of -1 to indicate "don't care", even when a buffer of that
// type has been requested. So we must check QGLFormat's booleans too if size is -1:
if (glFormat.alpha() && alphaSize <= 0)
@@ -101,6 +120,7 @@ void qt_eglproperties_set_glformat(QEglProperties& eglProperties, const QGLForma
depthSize = depthSize > 0 ? depthSize : 0;
stencilSize = stencilSize > 0 ? stencilSize : 0;
sampleCount = sampleCount > 0 ? sampleCount : 0;
+#endif
eglProperties.setValue(EGL_RED_SIZE, redSize);
eglProperties.setValue(EGL_GREEN_SIZE, greenSize);
diff --git a/src/opengl/qgl_symbian.cpp b/src/opengl/qgl_symbian.cpp
index 0148304..7d343f6 100644
--- a/src/opengl/qgl_symbian.cpp
+++ b/src/opengl/qgl_symbian.cpp
@@ -181,14 +181,19 @@ bool QGLContext::chooseContext(const QGLContext* shareContext) // almost same as
d->ownsEglContext = true;
d->eglContext->setApi(QEgl::OpenGL);
- // Allow apps to override ability to use multisampling by setting an environment variable. Eg:
- // qputenv("QT_SYMBIAN_DISABLE_GL_MULTISAMPLE", "1");
- // Added to allow camera app to start with limited memory.
- if (!QSymbianGraphicsSystemEx::hasBCM2727() && !qgetenv("QT_SYMBIAN_DISABLE_GL_MULTISAMPLE").toInt()) {
- // Most likely we have hw support for multisampling
- // so let's enable it.
- d->glFormat.setSampleBuffers(1);
- d->glFormat.setSamples(4);
+ if (d->glFormat.samples() == EGL_DONT_CARE) {
+ // Allow apps to override ability to use multisampling by setting an environment variable. Eg:
+ // qputenv("QT_SYMBIAN_DISABLE_GL_MULTISAMPLE", "1");
+ // Added to allow camera app to start with limited memory.
+ if (!QSymbianGraphicsSystemEx::hasBCM2727() && !qgetenv("QT_SYMBIAN_DISABLE_GL_MULTISAMPLE").toInt()) {
+ // Most likely we have hw support for multisampling
+ // so let's enable it.
+ d->glFormat.setSampleBuffers(1);
+ d->glFormat.setSamples(4);
+ } else {
+ d->glFormat.setSampleBuffers(0);
+ d->glFormat.setSamples(1);
+ }
}
// If the device is a widget with WA_TranslucentBackground set, make sure the glFormat