summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorA-Team <ateam@pad.test.qt.nokia.com>2010-10-09 22:00:15 (GMT)
committerA-Team <ateam@pad.test.qt.nokia.com>2010-10-09 22:00:15 (GMT)
commitc4876f7b430246d4158528392a7a6f58bb87b23e (patch)
tree5893e5433dbd3f7c9bcbdb61c46e5be9298cf313
parente1fead7c4f877308c2cc11131c445a1f7085baf7 (diff)
parent4809920df3c3329d47f595c1287ab44b454abb88 (diff)
downloadQt-c4876f7b430246d4158528392a7a6f58bb87b23e.zip
Qt-c4876f7b430246d4158528392a7a6f58bb87b23e.tar.gz
Qt-c4876f7b430246d4158528392a7a6f58bb87b23e.tar.bz2
Merge branch '4.7-upstream' into 4.7-doc
-rw-r--r--mkspecs/common/symbian/symbian-mmp.conf10
-rw-r--r--mkspecs/common/symbian/symbian.conf8
-rw-r--r--mkspecs/features/symbian/symbian_building.prf8
-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
-rw-r--r--tests/auto/qinputdialog/tst_qinputdialog.cpp20
-rw-r--r--tests/auto/qpixmap/loadFromData/designer_indexed8_no_alpha_animated.gifbin0 -> 4075 bytes
-rw-r--r--tests/auto/qpixmap/tst_qpixmap.cpp13
12 files changed, 80 insertions, 26 deletions
diff --git a/mkspecs/common/symbian/symbian-mmp.conf b/mkspecs/common/symbian/symbian-mmp.conf
index 5292781..1fbd302 100644
--- a/mkspecs/common/symbian/symbian-mmp.conf
+++ b/mkspecs/common/symbian/symbian-mmp.conf
@@ -4,16 +4,6 @@
include(symbian.conf)
-contains(QMAKE_HOST.os, "Windows") {
- QMAKE_MOC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}moc.exe
- QMAKE_UIC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}uic.exe
- QMAKE_IDC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}idc.exe
-} else {
- QMAKE_MOC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}moc
- QMAKE_UIC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}uic
- QMAKE_IDC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}idc
-}
-
load(symbian/add_mmp_rules)
symbian-abld {
diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf
index cc5b788..d8c38f4 100644
--- a/mkspecs/common/symbian/symbian.conf
+++ b/mkspecs/common/symbian/symbian.conf
@@ -95,6 +95,10 @@ contains(QMAKE_HOST.os,Windows) {
QMAKE_DEL_DIR = rmdir
QMAKE_DEL_TREE = rmdir /s /q
QMAKE_CHK_DIR_EXISTS = if not exist
+
+ QMAKE_MOC = $$[QT_INSTALL_BINS]\\moc.exe
+ QMAKE_UIC = $$[QT_INSTALL_BINS]\\uic.exe
+ QMAKE_IDC = $$[QT_INSTALL_BINS]\\idc.exe
} else {
QMAKE_COPY = cp
QMAKE_COPY_DIR = cp -r
@@ -104,6 +108,10 @@ contains(QMAKE_HOST.os,Windows) {
QMAKE_DEL_DIR = rmdir
QMAKE_DEL_TREE = rm -rf
QMAKE_CHK_DIR_EXISTS = test -d
+
+ QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
+ QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
+ QMAKE_IDC = $$[QT_INSTALL_BINS]/idc
}
QMAKE_IDL = midl
diff --git a/mkspecs/features/symbian/symbian_building.prf b/mkspecs/features/symbian/symbian_building.prf
index 614fb65..1a51cb2 100644
--- a/mkspecs/features/symbian/symbian_building.prf
+++ b/mkspecs/features/symbian/symbian_building.prf
@@ -229,7 +229,7 @@ symbian_resources_INCLUDES = $$replace(symbian_resources_INCLUDES, ",", " -I")
symbian_resources_INCLUDES += $$join(INCLUDEPATH, " -I", "-I")
symbian_resources_DEFINES = $$join(DEFINES, " -D", "-D")
symbian_resources_RCC_DIR = $$replace(RCC_DIR, "/$", "")
-symbian_resources_INCLUDES += "-I $$symbian_resources_RCC_DIR"
+symbian_resources_INCLUDES += "-I$$symbian_resources_RCC_DIR"
for(symbian_resource, SYMBIAN_RESOURCES) {
symbian_resource = $$basename(symbian_resource)
@@ -245,7 +245,7 @@ symbianresources.commands = cpp -nostdinc -undef \
$$symbian_resources_INCLUDES \
$$symbian_resources_DEFINES \
${QMAKE_FILE_NAME} \
- -o $${symbian_resources_RCC_DIR}/${QMAKE_FILE_BASE}.rpp \
+ > $${symbian_resources_RCC_DIR}/${QMAKE_FILE_BASE}.rpp \
&& rcomp -u -m045,046,047 \
-s$${symbian_resources_RCC_DIR}/${QMAKE_FILE_BASE}.rpp \
-o$${symbianDestdir}/${QMAKE_FILE_BASE}$${QT_LIBINFIX}.rsc \
@@ -265,7 +265,7 @@ contains(TEMPLATE, "app"):!contains(CONFIG, "no_icon") {
$$symbian_resources_INCLUDES \
$$symbian_resources_DEFINES \
$${baseTarget}.rss \
- -o $${symbian_resources_RCC_DIR}/$${baseTarget}.rpp \
+ > $${symbian_resources_RCC_DIR}/$${baseTarget}.rpp \
&& rcomp -u -m045,046,047 \
-s$${symbian_resources_RCC_DIR}/$${baseTarget}.rpp \
-o$${symbianDestdir}/$${baseTarget}.rsc \
@@ -284,7 +284,7 @@ contains(TEMPLATE, "app"):!contains(CONFIG, "no_icon") {
$$symbian_resources_INCLUDES \
$$symbian_resources_DEFINES \
$${baseTarget}_reg.rss \
- -o $${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rpp \
+ > $${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rpp \
&& rcomp -u -m045,046,047 \
-s$${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rpp \
-o$${symbianDestdir}/$${baseTarget}_reg.rsc \
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;
+ }
}
}
diff --git a/tests/auto/qinputdialog/tst_qinputdialog.cpp b/tests/auto/qinputdialog/tst_qinputdialog.cpp
index 0d6644a..5d03142 100644
--- a/tests/auto/qinputdialog/tst_qinputdialog.cpp
+++ b/tests/auto/qinputdialog/tst_qinputdialog.cpp
@@ -74,6 +74,7 @@ private slots:
void getItem_data();
void getItem();
void task256299_getTextReturnNullStringOnRejected();
+ void inputMethodHintsOfChildWidget();
};
QString stripFraction(const QString &s)
@@ -404,5 +405,24 @@ void tst_QInputDialog::getItem()
delete parent;
}
+void tst_QInputDialog::inputMethodHintsOfChildWidget()
+{
+ QInputDialog dialog;
+ dialog.setInputMode(QInputDialog::TextInput);
+ QList<QObject *> children = dialog.children();
+ QLineEdit *editWidget = 0;
+ for (int c = 0; c < children.size(); c++) {
+ editWidget = qobject_cast<QLineEdit *>(children.at(c));
+ if (editWidget)
+ break;
+ }
+ QVERIFY(editWidget);
+ QCOMPARE(editWidget->inputMethodHints(), dialog.inputMethodHints());
+ QCOMPARE(editWidget->inputMethodHints(), Qt::ImhNone);
+ dialog.setInputMethodHints(Qt::ImhDigitsOnly);
+ QCOMPARE(editWidget->inputMethodHints(), dialog.inputMethodHints());
+ QCOMPARE(editWidget->inputMethodHints(), Qt::ImhDigitsOnly);
+}
+
QTEST_MAIN(tst_QInputDialog)
#include "tst_qinputdialog.moc"
diff --git a/tests/auto/qpixmap/loadFromData/designer_indexed8_no_alpha_animated.gif b/tests/auto/qpixmap/loadFromData/designer_indexed8_no_alpha_animated.gif
new file mode 100644
index 0000000..86a3a2e
--- /dev/null
+++ b/tests/auto/qpixmap/loadFromData/designer_indexed8_no_alpha_animated.gif
Binary files differ
diff --git a/tests/auto/qpixmap/tst_qpixmap.cpp b/tests/auto/qpixmap/tst_qpixmap.cpp
index 8005ec5..24cbb21 100644
--- a/tests/auto/qpixmap/tst_qpixmap.cpp
+++ b/tests/auto/qpixmap/tst_qpixmap.cpp
@@ -179,6 +179,7 @@ private slots:
void fromImageReader_data();
void fromImageReader();
+ void fromImageReaderAnimatedGif_data();
void fromImageReaderAnimatedGif();
void preserveDepth();
@@ -1605,6 +1606,8 @@ void tst_QPixmap::fromImageReader_data()
QTest::newRow("designer_indexed8_no_alpha.gif") << prefix + "/designer_indexed8_no_alpha.gif";
QTest::newRow("designer_indexed8_with_alpha.gif") << prefix + "/designer_indexed8_with_alpha.gif";
QTest::newRow("designer_rgb32.jpg") << prefix + "/designer_rgb32.jpg";
+ QTest::newRow("designer_indexed8_with_alpha_animated") << prefix + "/designer_indexed8_with_alpha_animated.gif";
+ QTest::newRow("designer_indexed8_with_alpha_animated") << prefix + "/designer_indexed8_no_alpha_animated.gif";
}
void tst_QPixmap::fromImageReader()
@@ -1621,14 +1624,22 @@ void tst_QPixmap::fromImageReader()
QVERIFY(pixmapsAreEqual(&pixmapWithCopy, &directLoadingPixmap));
}
+void tst_QPixmap::fromImageReaderAnimatedGif_data()
+{
+ QTest::addColumn<QString>("imagePath");
+ QTest::newRow("gif with alpha") << QString::fromLatin1("/designer_indexed8_with_alpha_animated.gif");
+ QTest::newRow("gif without alpha") << QString::fromLatin1("/designer_indexed8_no_alpha_animated.gif");
+}
+
void tst_QPixmap::fromImageReaderAnimatedGif()
{
+ QFETCH(QString, imagePath);
#ifdef Q_OS_SYMBIAN
const QString prefix = QLatin1String(SRCDIR) + "loadFromData";
#else
const QString prefix = QLatin1String(SRCDIR) + "/loadFromData";
#endif
- const QString path = prefix + QString::fromLatin1("/designer_indexed8_with_alpha_animated.gif");
+ const QString path = prefix + imagePath;
QImageReader referenceReader(path);
QImageReader pixmapReader(path);