summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorA-Team <ateam@pad.test.qt.nokia.com>2010-09-10 22:00:11 (GMT)
committerA-Team <ateam@pad.test.qt.nokia.com>2010-09-10 22:00:11 (GMT)
commitfd570dca1319cd92daf0f73b10ea4e090ea15c23 (patch)
tree9de1035b83cd857340e30e82e781f80cd1abc6ef /src/gui
parent99e4ba7cb0700eb1a68d6db9fa8d058ddb59f233 (diff)
parent3dc18b19ee2a02b93cc509a9162bf0a3900c6fd0 (diff)
downloadQt-fd570dca1319cd92daf0f73b10ea4e090ea15c23.zip
Qt-fd570dca1319cd92daf0f73b10ea4e090ea15c23.tar.gz
Qt-fd570dca1319cd92daf0f73b10ea4e090ea15c23.tar.bz2
Merge branch '4.7-upstream' into 4.7-doc
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/egl/qeglcontext_p.h3
-rw-r--r--src/gui/graphicsview/qgraphicslayoutitem.cpp2
-rw-r--r--src/gui/inputmethod/qcoefepinputcontext_s60.cpp11
-rw-r--r--src/gui/kernel/qapplication.cpp24
-rw-r--r--src/gui/painting/qgraphicssystem_runtime_p.h1
-rw-r--r--src/gui/text/qfontengine_win.cpp3
-rw-r--r--src/gui/text/qstatictext.cpp3
7 files changed, 40 insertions, 7 deletions
diff --git a/src/gui/egl/qeglcontext_p.h b/src/gui/egl/qeglcontext_p.h
index cae8164..5bc8f09 100644
--- a/src/gui/egl/qeglcontext_p.h
+++ b/src/gui/egl/qeglcontext_p.h
@@ -107,6 +107,9 @@ private:
static QEglContext *currentContext(QEgl::API api);
static void setCurrentContext(QEgl::API api, QEglContext *context);
+
+ friend class QMeeGoGraphicsSystem;
+ friend class QMeeGoPixmapData;
};
QT_END_NAMESPACE
diff --git a/src/gui/graphicsview/qgraphicslayoutitem.cpp b/src/gui/graphicsview/qgraphicslayoutitem.cpp
index 3707591..634f68c 100644
--- a/src/gui/graphicsview/qgraphicslayoutitem.cpp
+++ b/src/gui/graphicsview/qgraphicslayoutitem.cpp
@@ -234,7 +234,7 @@ void QGraphicsLayoutItemPrivate::setSize(Qt::SizeHint which, const QSizeF &size)
if (userSizeHints) {
if (size == userSizeHints[which])
return;
- } else if (!size.isValid()) {
+ } else if (size.width() < 0 && size.height() < 0) {
return;
}
diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
index b08b9a9..af86d77 100644
--- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
+++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
@@ -382,6 +382,9 @@ void QCoeFepInputContext::applyHints(Qt::InputMethodHints hints)
const bool anytextmodes = hints & (ImhUppercaseOnly | ImhLowercaseOnly | ImhEmailCharactersOnly | ImhUrlCharactersOnly);
const bool numbersOnly = anynumbermodes && !anytextmodes;
const bool noOnlys = !(hints & ImhExclusiveInputMask);
+ // if alphanumeric input, or if multiple incompatible number modes are selected;
+ // then make all symbols available in numeric mode too.
+ const bool needsCharMap= !numbersOnly || ((hints & ImhFormattedNumbersOnly) && (hints & ImhDialableCharactersOnly));
TInt flags;
Qt::InputMethodHints oldHints = hints;
@@ -481,9 +484,7 @@ 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)))
+ if (needsCharMap)
flags |= EAknEditorFlagUseSCTNumericCharmap;
m_fepState->SetFlags(flags);
ReportAknEdStateEvent(MAknEdStateObserver::EAknEdwinStateFlagsUpdate);
@@ -508,8 +509,10 @@ void QCoeFepInputContext::applyHints(Qt::InputMethodHints hints)
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 {
+ } else if (needsCharMap) {
m_fepState->SetSpecialCharacterTableResourceId(R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG);
+ } else {
+ m_fepState->SetSpecialCharacterTableResourceId(0);
}
if (hints & ImhHiddenText) {
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index 82dd83a..e99f6ca 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -94,6 +94,10 @@
#include <stdlib.h>
+#if defined(Q_WS_X11) && !defined(QT_NO_EGL)
+#include <link.h>
+#endif
+
#include "qapplication_p.h"
#include "qevent_p.h"
#include "qwidget_p.h"
@@ -768,6 +772,13 @@ QApplication::QApplication(int &argc, char **argv, Type type , int _internal)
: QCoreApplication(*new QApplicationPrivate(argc, argv, type))
{ Q_D(QApplication); d->construct(); QApplicationPrivate::app_compile_version = _internal;}
+#if defined(Q_WS_X11) && !defined(QT_NO_EGL)
+static int qt_matchLibraryName(dl_phdr_info *info, size_t, void *data)
+{
+ const char *name = static_cast<const char *>(data);
+ return strstr(info->dlpi_name, name) != 0;
+}
+#endif
/*!
\internal
@@ -785,6 +796,19 @@ void QApplicationPrivate::construct(
// the environment variable has the lowest precedence of runtime graphicssystem switches
if (graphics_system_name.isEmpty())
graphics_system_name = QString::fromLocal8Bit(qgetenv("QT_GRAPHICSSYSTEM"));
+
+#if defined(Q_WS_X11) && !defined(QT_NO_EGL)
+ if (graphics_system_name.isEmpty()) {
+ bool linksWithMeeGoTouch = dl_iterate_phdr(qt_matchLibraryName, const_cast<char *>("libmeegotouchcore"));
+ bool linksWithMeeGoGraphicsSystemHelper = dl_iterate_phdr(qt_matchLibraryName, const_cast<char *>("libQtMeeGoGraphicsSystemHelper"));
+
+ if (linksWithMeeGoTouch && !linksWithMeeGoGraphicsSystemHelper) {
+ qWarning("Running non-meego graphics system enabled MeeGo touch, forcing native graphicssystem\n");
+ graphics_system_name = QLatin1String("native");
+ }
+ }
+#endif
+
// Must be called before initialize()
qt_init(this, qt_appType
#ifdef Q_WS_X11
diff --git a/src/gui/painting/qgraphicssystem_runtime_p.h b/src/gui/painting/qgraphicssystem_runtime_p.h
index 0232241..421fbeb 100644
--- a/src/gui/painting/qgraphicssystem_runtime_p.h
+++ b/src/gui/painting/qgraphicssystem_runtime_p.h
@@ -177,6 +177,7 @@ private:
friend class QRuntimePixmapData;
friend class QRuntimeWindowSurface;
+ friend class QMeeGoGraphicsSystem;
};
QT_END_NAMESPACE
diff --git a/src/gui/text/qfontengine_win.cpp b/src/gui/text/qfontengine_win.cpp
index 82de0d5..ef1b504 100644
--- a/src/gui/text/qfontengine_win.cpp
+++ b/src/gui/text/qfontengine_win.cpp
@@ -1296,6 +1296,7 @@ QFontEngineMultiWin::QFontEngineMultiWin(QFontEngineWin *first, const QStringLis
engines[0] = first;
first->ref.ref();
fontDef = engines[0]->fontDef;
+ cache_cost = first->cache_cost;
}
void QFontEngineMultiWin::loadEngine(int at)
@@ -1317,6 +1318,8 @@ void QFontEngineMultiWin::loadEngine(int at)
engines[at] = new QFontEngineWin(fam, hfont, stockFont, lf);
engines[at]->ref.ref();
engines[at]->fontDef = fontDef;
+
+ // TODO: increase cost in QFontCache for the font engine loaded here
}
QT_END_NAMESPACE
diff --git a/src/gui/text/qstatictext.cpp b/src/gui/text/qstatictext.cpp
index b950b13..7a5dec4 100644
--- a/src/gui/text/qstatictext.cpp
+++ b/src/gui/text/qstatictext.cpp
@@ -448,7 +448,6 @@ namespace {
currentItem.font = ti.font();
currentItem.charOffset = m_chars.size();
currentItem.numChars = ti.num_chars;
- currentItem.numGlyphs = ti.glyphs.numGlyphs;
currentItem.glyphOffset = m_glyphs.size(); // Store offset into glyph pool
currentItem.positionOffset = m_glyphs.size(); // Offset into position pool
currentItem.useBackendOptimizations = m_useBackendOptimizations;
@@ -463,8 +462,8 @@ namespace {
ti.fontEngine->getGlyphPositions(ti.glyphs, matrix, ti.flags, glyphs, positions);
int size = glyphs.size();
- Q_ASSERT(size == ti.glyphs.numGlyphs);
Q_ASSERT(size == positions.size());
+ currentItem.numGlyphs = size;
m_glyphs.resize(m_glyphs.size() + size);
m_positions.resize(m_glyphs.size());