summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/corelib/tools/qlocale_symbian.cpp3
-rw-r--r--src/gui/kernel/qapplication.cpp3
-rw-r--r--src/gui/styles/qgtkstyle.cpp2
-rw-r--r--src/gui/styles/qgtkstyle_p.cpp2
-rw-r--r--src/script/api/qscriptcontext.cpp1
-rw-r--r--tests/auto/qscriptcontext/tst_qscriptcontext.cpp45
-rw-r--r--tools/assistant/lib/qhelpsearchindexreader_default_p.h3
7 files changed, 52 insertions, 7 deletions
diff --git a/src/corelib/tools/qlocale_symbian.cpp b/src/corelib/tools/qlocale_symbian.cpp
index 1e674af..458bb2a 100644
--- a/src/corelib/tools/qlocale_symbian.cpp
+++ b/src/corelib/tools/qlocale_symbian.cpp
@@ -159,8 +159,9 @@ static const symbianToISO symbian_to_iso_list[] = {
{ ELangEnglish_Prc, "en_CN" }, // 159 ### Not supported by CLDR
{ ELangEnglish_Japan, "en_JP"}, // 160 ### Not supported by CLDR
{ ELangEnglish_Thailand, "en_TH" }, // 161 ### Not supported by CLDR
- { ELangMalay_Apac, "ms" } // 326
+ { ELangMalay_Apac, "ms" }, // 326
#endif
+ { 327/*ELangIndonesian_Apac*/,"id_ID" } // 327 - appeared in Symbian^3
};
/*!
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index 57c4c99..0d11b27 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -666,7 +666,8 @@ void QApplicationPrivate::process_cmdline()
\o -geometry \e geometry, sets the client geometry of the first window
that is shown.
\o -fn or \c -font \e font, defines the application font. The font
- should be specified using an X logical font description.
+ should be specified using an X logical font description. Note that
+ this option is ignored when Qt is built with fontconfig support enabled.
\o -bg or \c -background \e color, sets the default background color
and an application palette (light and dark shades are calculated).
\o -fg or \c -foreground \e color, sets the default foreground color.
diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp
index 6c8d561..9d6dc9a 100644
--- a/src/gui/styles/qgtkstyle.cpp
+++ b/src/gui/styles/qgtkstyle.cpp
@@ -325,6 +325,7 @@ void QGtkStyle::polish(QApplication *app)
qt_filedialog_save_filename_hook = &QGtkStylePrivate::saveFilename;
qt_filedialog_open_filenames_hook = &QGtkStylePrivate::openFilenames;
qt_filedialog_existing_directory_hook = &QGtkStylePrivate::openDirectory;
+ qApp->installEventFilter(&d->filter);
}
}
}
@@ -345,6 +346,7 @@ void QGtkStyle::unpolish(QApplication *app)
qt_filedialog_save_filename_hook = 0;
qt_filedialog_open_filenames_hook = 0;
qt_filedialog_existing_directory_hook = 0;
+ qApp->removeEventFilter(&d->filter);
}
}
diff --git a/src/gui/styles/qgtkstyle_p.cpp b/src/gui/styles/qgtkstyle_p.cpp
index 3c6a1ef..4ed0fab 100644
--- a/src/gui/styles/qgtkstyle_p.cpp
+++ b/src/gui/styles/qgtkstyle_p.cpp
@@ -285,8 +285,6 @@ void QGtkStylePrivate::init()
{
resolveGtk();
initGtkWidgets();
- if (isThemeAvailable())
- qApp->installEventFilter(&filter);
}
GtkWidget* QGtkStylePrivate::gtkWidget(const QHashableLatin1Literal &path)
diff --git a/src/script/api/qscriptcontext.cpp b/src/script/api/qscriptcontext.cpp
index 639af80..3f08e74 100644
--- a/src/script/api/qscriptcontext.cpp
+++ b/src/script/api/qscriptcontext.cpp
@@ -742,6 +742,7 @@ void QScriptContext::pushScope(const QScriptValue &object)
*/
QScriptValue QScriptContext::popScope()
{
+ activationObject(); //ensure the creation of the normal scope for native context
JSC::CallFrame *frame = QScriptEnginePrivate::frameForContext(this);
JSC::ScopeChainNode *scope = frame->scopeChain();
Q_ASSERT(scope != 0);
diff --git a/tests/auto/qscriptcontext/tst_qscriptcontext.cpp b/tests/auto/qscriptcontext/tst_qscriptcontext.cpp
index 100e195..617c183 100644
--- a/tests/auto/qscriptcontext/tst_qscriptcontext.cpp
+++ b/tests/auto/qscriptcontext/tst_qscriptcontext.cpp
@@ -84,6 +84,7 @@ private slots:
void jsActivationObject();
void qobjectAsActivationObject();
void parentContextCallee_QT2270();
+ void popNativeContextScope();
};
tst_QScriptContext::tst_QScriptContext()
@@ -539,6 +540,50 @@ void tst_QScriptContext::pushAndPopContext()
}
}
+void tst_QScriptContext::popNativeContextScope()
+{
+ QScriptEngine eng;
+ QScriptContext *ctx = eng.pushContext();
+ QVERIFY(ctx->popScope().isObject()); // the activation object
+
+ QCOMPARE(ctx->scopeChain().size(), 1);
+ QVERIFY(ctx->scopeChain().at(0).strictlyEquals(eng.globalObject()));
+ // This was different in 4.5: scope and activation were decoupled
+ QVERIFY(ctx->activationObject().strictlyEquals(eng.globalObject()));
+
+ QVERIFY(!eng.evaluate("var foo = 123; function bar() {}").isError());
+ QVERIFY(eng.globalObject().property("foo").isNumber());
+ QVERIFY(eng.globalObject().property("bar").isFunction());
+
+ QScriptValue customScope = eng.newObject();
+ ctx->pushScope(customScope);
+ QCOMPARE(ctx->scopeChain().size(), 2);
+ QVERIFY(ctx->scopeChain().at(0).strictlyEquals(customScope));
+ QVERIFY(ctx->scopeChain().at(1).strictlyEquals(eng.globalObject()));
+ QVERIFY(ctx->activationObject().strictlyEquals(eng.globalObject()));
+ ctx->setActivationObject(customScope);
+ QVERIFY(ctx->activationObject().strictlyEquals(customScope));
+ QCOMPARE(ctx->scopeChain().size(), 2);
+ QVERIFY(ctx->scopeChain().at(0).strictlyEquals(customScope));
+ QEXPECT_FAIL("", "QTBUG-11012", Continue);
+ QVERIFY(ctx->scopeChain().at(1).strictlyEquals(eng.globalObject()));
+
+ QVERIFY(!eng.evaluate("baz = 456; var foo = 789; function barbar() {}").isError());
+ QEXPECT_FAIL("", "QTBUG-11012", Continue);
+ QVERIFY(eng.globalObject().property("baz").isNumber());
+ QVERIFY(customScope.property("foo").isNumber());
+ QVERIFY(customScope.property("barbar").isFunction());
+
+ QVERIFY(ctx->popScope().strictlyEquals(customScope));
+ QCOMPARE(ctx->scopeChain().size(), 1);
+ QEXPECT_FAIL("", "QTBUG-11012", Continue);
+ QVERIFY(ctx->scopeChain().at(0).strictlyEquals(eng.globalObject()));
+
+ // Need to push another object, otherwise we crash in popContext() (QTBUG-11012)
+ ctx->pushScope(customScope);
+ eng.popContext();
+}
+
void tst_QScriptContext::lineNumber()
{
QScriptEngine eng;
diff --git a/tools/assistant/lib/qhelpsearchindexreader_default_p.h b/tools/assistant/lib/qhelpsearchindexreader_default_p.h
index b30fa4b..27764db 100644
--- a/tools/assistant/lib/qhelpsearchindexreader_default_p.h
+++ b/tools/assistant/lib/qhelpsearchindexreader_default_p.h
@@ -61,9 +61,6 @@
QT_BEGIN_NAMESPACE
-struct Entry;
-struct PosEntry;
-
namespace fulltextsearch {
namespace std {