summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/dialogs/qinputdialog.cpp6
-rw-r--r--src/gui/image/qimage.cpp4
-rw-r--r--src/gui/kernel/qapplication_s60.cpp7
-rw-r--r--src/gui/kernel/qwidget.cpp11
-rw-r--r--src/gui/kernel/qwidget_p.h3
-rw-r--r--src/gui/text/qtextengine.cpp16
6 files changed, 36 insertions, 11 deletions
diff --git a/src/gui/dialogs/qinputdialog.cpp b/src/gui/dialogs/qinputdialog.cpp
index e996ee9..700b234 100644
--- a/src/gui/dialogs/qinputdialog.cpp
+++ b/src/gui/dialogs/qinputdialog.cpp
@@ -244,6 +244,9 @@ void QInputDialogPrivate::ensureLineEdit()
Q_Q(QInputDialog);
if (!lineEdit) {
lineEdit = new QLineEdit(q);
+#ifndef QT_NO_IM
+ qt_widget_private(lineEdit)->inheritsInputMethodHints = 1;
+#endif
lineEdit->hide();
QObject::connect(lineEdit, SIGNAL(textChanged(QString)),
q, SLOT(_q_textChanged(QString)));
@@ -255,6 +258,9 @@ void QInputDialogPrivate::ensureComboBox()
Q_Q(QInputDialog);
if (!comboBox) {
comboBox = new QComboBox(q);
+#ifndef QT_NO_IM
+ qt_widget_private(comboBox)->inheritsInputMethodHints = 1;
+#endif
comboBox->hide();
QObject::connect(comboBox, SIGNAL(editTextChanged(QString)),
q, SLOT(_q_textChanged(QString)));
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index ac148ee..1157b93 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -6607,6 +6607,10 @@ bool QImageData::convertInPlace(QImage::Format newFormat, Qt::ImageConversionFla
if (format == newFormat)
return true;
+ // No in-place conversion if we have to detach
+ if (ref > 1)
+ return false;
+
const InPlace_Image_Converter *const converterPtr = &inplace_converter_map[format][newFormat];
InPlace_Image_Converter converter = *converterPtr;
if (converter)
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index 296f24f..5ff2fd4 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -1237,10 +1237,11 @@ void QSymbianControl::FocusChanged(TDrawNow /* aDrawNow */)
qwidget->d_func()->setWindowTitle_sys(qwidget->windowTitle());
#ifdef Q_WS_S60
// If widget is fullscreen/minimized, hide status pane and button container otherwise show them.
- const bool visible = !(qwidget->windowState() & (Qt::WindowFullScreen | Qt::WindowMinimized));
+ QWidget *const window = qwidget->window();
+ const bool visible = !(window->windowState() & (Qt::WindowFullScreen | Qt::WindowMinimized));
const bool statusPaneVisibility = visible;
- const bool isFullscreen = qwidget->windowState() & Qt::WindowFullScreen;
- const bool cbaVisibilityHint = qwidget->windowFlags() & Qt::WindowSoftkeysVisibleHint;
+ const bool isFullscreen = window->windowState() & Qt::WindowFullScreen;
+ const bool cbaVisibilityHint = window->windowFlags() & Qt::WindowSoftkeysVisibleHint;
const bool buttonGroupVisibility = (visible || (isFullscreen && cbaVisibilityHint));
S60->setStatusPaneAndButtonGroupVisibility(statusPaneVisibility, buttonGroupVisibility);
#endif
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index 2f85cd0..f7c795e 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -273,6 +273,9 @@ QWidgetPrivate::QWidgetPrivate(int version)
, isMoved(0)
, isGLWidget(0)
, usesDoubleBufferedGLContext(0)
+#ifndef QT_NO_IM
+ , inheritsInputMethodHints(0)
+#endif
#if defined(Q_WS_X11)
, picture(0)
#elif defined(Q_WS_WIN)
@@ -9228,9 +9231,13 @@ QVariant QWidget::inputMethodQuery(Qt::InputMethodQuery query) const
*/
Qt::InputMethodHints QWidget::inputMethodHints() const
{
- Q_D(const QWidget);
#ifndef QT_NO_IM
- return d->imHints;
+ const QWidgetPrivate *priv = d_func();
+ while (priv->inheritsInputMethodHints) {
+ priv = priv->q_func()->parentWidget()->d_func();
+ Q_ASSERT(priv);
+ }
+ return priv->imHints;
#else //QT_NO_IM
return 0;
#endif //QT_NO_IM
diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h
index 4a79dc7..6c89659 100644
--- a/src/gui/kernel/qwidget_p.h
+++ b/src/gui/kernel/qwidget_p.h
@@ -748,6 +748,9 @@ public:
uint isMoved : 1;
uint isGLWidget : 1;
uint usesDoubleBufferedGLContext : 1;
+#ifndef QT_NO_IM
+ uint inheritsInputMethodHints : 1;
+#endif
// *************************** Platform specific ************************************
#if defined(Q_WS_X11) // <----------------------------------------------------------- X11
diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp
index 05de8f5..3bd6122 100644
--- a/src/gui/text/qtextengine.cpp
+++ b/src/gui/text/qtextengine.cpp
@@ -1949,9 +1949,11 @@ void QTextEngine::justify(const QScriptLine &line)
if (kashida_pos >= 0) {
// qDebug("kashida position at %d in word", kashida_pos);
set(&justificationPoints[nPoints], kashida_type, g.mid(kashida_pos), fontEngine(si));
- minKashida = qMin(minKashida, justificationPoints[nPoints].kashidaWidth);
- maxJustify = qMax(maxJustify, justificationPoints[nPoints].type);
- ++nPoints;
+ if (justificationPoints[nPoints].kashidaWidth > 0) {
+ minKashida = qMin(minKashida, justificationPoints[nPoints].kashidaWidth);
+ maxJustify = qMax(maxJustify, justificationPoints[nPoints].type);
+ ++nPoints;
+ }
}
kashida_pos = -1;
kashida_type = HB_Arabic_Normal;
@@ -1975,9 +1977,11 @@ void QTextEngine::justify(const QScriptLine &line)
}
if (kashida_pos >= 0) {
set(&justificationPoints[nPoints], kashida_type, g.mid(kashida_pos), fontEngine(si));
- minKashida = qMin(minKashida, justificationPoints[nPoints].kashidaWidth);
- maxJustify = qMax(maxJustify, justificationPoints[nPoints].type);
- ++nPoints;
+ if (justificationPoints[nPoints].kashidaWidth > 0) {
+ minKashida = qMin(minKashida, justificationPoints[nPoints].kashidaWidth);
+ maxJustify = qMax(maxJustify, justificationPoints[nPoints].type);
+ ++nPoints;
+ }
}
}