summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rwxr-xr-xbin/syncqt3
-rw-r--r--demos/interview/model.cpp2
-rw-r--r--demos/interview/model.h2
-rw-r--r--doc/src/qt4-intro.qdoc25
-rw-r--r--src/corelib/io/qdatastream.h1
-rw-r--r--src/corelib/tools/qsimd_p.h3
-rw-r--r--src/declarative/qml/qdeclarativebinding_p.h3
-rw-r--r--src/declarative/util/qdeclarativeutilmodule.cpp2
-rw-r--r--src/gui/kernel/qapplication_mac.mm20
-rw-r--r--src/gui/painting/qcolor.cpp30
-rw-r--r--src/gui/painting/qcolor.h3
-rw-r--r--src/plugins/mediaservices/mediaservices.pro2
-rw-r--r--src/script/api/qscriptengine.cpp44
-rw-r--r--src/script/api/qscriptengine_p.h38
-rw-r--r--src/script/api/qscriptvalue.cpp2
-rw-r--r--src/script/api/qscriptvalue_p.h4
-rw-r--r--src/script/bridge/qscriptqobject.cpp22
-rw-r--r--tools/assistant/tools/assistant/findwidget.cpp1
-rw-r--r--tools/qdoc3/test/qdeclarative.qdocconf (renamed from tools/qdoc3/test/qml.qdocconf)0
-rw-r--r--tools/qml/qml.pro4
21 files changed, 152 insertions, 61 deletions
diff --git a/.gitignore b/.gitignore
index 548e69e..7fe33b9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -83,7 +83,7 @@ bin/kmap2qmap*
bin/qlalr*
bin/qmlconv*
bin/qmldebugger*
-bin/qmlviewer*
+bin/qml*
bin/qttracereplay*
configure.cache
config.status
diff --git a/bin/syncqt b/bin/syncqt
index 6fb21dd..be4af2a 100755
--- a/bin/syncqt
+++ b/bin/syncqt
@@ -356,12 +356,13 @@ sub fixPaths {
#setup
my $ret = $file;
+ $ret =~ s,/cygdrive/([a-zA-Z])/,$1:/,g;
my $file_dir = dirname($file);
if($file_dir eq ".") {
$file_dir = getcwd();
$file_dir =~ s=\\=/=g;
}
- $file_dir =~ s,/cygdrive/([a-zA-Z])/,$1:,g;
+ $file_dir =~ s,/cygdrive/([a-zA-Z])/,$1:/,g;
if($dir eq ".") {
$dir = getcwd();
$dir =~ s=\\=/=g;
diff --git a/demos/interview/model.cpp b/demos/interview/model.cpp
index 3f9548a..840bc60 100644
--- a/demos/interview/model.cpp
+++ b/demos/interview/model.cpp
@@ -45,6 +45,7 @@
Model::Model(int rows, int columns, QObject *parent)
: QAbstractItemModel(parent),
+ services(QPixmap(":/images/services.png")),
rc(rows), cc(columns),
tree(new QVector<Node>(rows, Node(0)))
{
@@ -105,7 +106,6 @@ QVariant Model::data(const QModelIndex &index, int role) const
QVariant Model::headerData(int section, Qt::Orientation orientation, int role) const
{
- static QIcon services(QPixmap(":/images/services.png"));
if (role == Qt::DisplayRole)
return QString::number(section);
if (role == Qt::DecorationRole)
diff --git a/demos/interview/model.h b/demos/interview/model.h
index bad83a8..c7c15f7 100644
--- a/demos/interview/model.h
+++ b/demos/interview/model.h
@@ -44,6 +44,7 @@
#include <QAbstractItemModel>
#include <QFileIconProvider>
+#include <QIcon>
#include <QVector>
class Model : public QAbstractItemModel
@@ -80,6 +81,7 @@ private:
Node *parent(Node *child) const;
int row(Node *node) const;
+ QIcon services;
int rc, cc;
QVector<Node> *tree;
QFileIconProvider iconProvider;
diff --git a/doc/src/qt4-intro.qdoc b/doc/src/qt4-intro.qdoc
index cf53df0..c670c51 100644
--- a/doc/src/qt4-intro.qdoc
+++ b/doc/src/qt4-intro.qdoc
@@ -473,6 +473,29 @@
\section1 Declarative UI development with Qt Quick
+ Qt 4.7 introduces Quick, the Qt UI Creation Kit. that enables the creation
+ of dynamic user interfaces, easier and more effective than possible
+ with existing UI technologies. This UI Creation Kit consist of three
+ technologies:
+
+ \list
+ \i QML is a declarative language oriented on JavaScript that utilizes
+ Qt's Meta-Object capabilities to enable designers and developers to
+ collaborate tightly and create animated and fluid user experiences,
+ using existing knowledge in script language and design.
+
+ \i QtDeclarative is a C++ library that provides the underlying engine,
+ which translates the declarative description of the UI in QML into
+ items on a QGraphicsScene. The library also provides APIs to bind
+ custom C++ types and elements to QML, and to connect the QML UI with
+ the underlying application logic written in C++.
+
+ \i Qt Creator has been improved to support interactive editing of
+ QML UIs through drag-and-drop. The text editor supports the QML
+ syntax and provides authoring assistance such as auto-completion,
+ error lookup, help lookup and easy preview of QML UI's.
+ \endlist
+
\section1 Network Bearer Management
Bearer Management controls the connectivity state of the system.
@@ -494,7 +517,7 @@
\section1 New Classes, Functions, Macros, etc.
- Links to new classes, functions, macros, and other items
+ Links to new classes, elements, functions, macros, and other items
introduced in Qt 4.7.
\sincelist 4.7
diff --git a/src/corelib/io/qdatastream.h b/src/corelib/io/qdatastream.h
index ec4ba2f..222ba8f 100644
--- a/src/corelib/io/qdatastream.h
+++ b/src/corelib/io/qdatastream.h
@@ -243,6 +243,7 @@ QDataStream& operator>>(QDataStream& s, QList<T>& l)
l.clear();
quint32 c;
s >> c;
+ l.reserve(c);
for(quint32 i = 0; i < c; ++i)
{
T t;
diff --git a/src/corelib/tools/qsimd_p.h b/src/corelib/tools/qsimd_p.h
index 44c1798..724f3e0 100644
--- a/src/corelib/tools/qsimd_p.h
+++ b/src/corelib/tools/qsimd_p.h
@@ -116,11 +116,10 @@ enum CPUFeatures {
NEON = 0x100
};
+Q_CORE_EXPORT uint qDetectCPUFeatures();
QT_END_NAMESPACE
QT_END_HEADER
-Q_CORE_EXPORT uint qDetectCPUFeatures();
-
#endif // QSIMD_P_H
diff --git a/src/declarative/qml/qdeclarativebinding_p.h b/src/declarative/qml/qdeclarativebinding_p.h
index f66b9c7..ec5809d 100644
--- a/src/declarative/qml/qdeclarativebinding_p.h
+++ b/src/declarative/qml/qdeclarativebinding_p.h
@@ -130,8 +130,9 @@ protected:
private:
Q_DECLARE_PRIVATE(QDeclarativeBinding)
};
-Q_DECLARE_METATYPE(QDeclarativeBinding*);
QT_END_NAMESPACE
+Q_DECLARE_METATYPE(QDeclarativeBinding*);
+
#endif // QDECLARATIVEBINDING_P_H
diff --git a/src/declarative/util/qdeclarativeutilmodule.cpp b/src/declarative/util/qdeclarativeutilmodule.cpp
index 2b8c7de..1f85b89 100644
--- a/src/declarative/util/qdeclarativeutilmodule.cpp
+++ b/src/declarative/util/qdeclarativeutilmodule.cpp
@@ -70,7 +70,9 @@
#include "qdeclarativetransitionmanager_p_p.h"
#include "qdeclarativetransition_p.h"
#include "qdeclarativeview.h"
+#ifndef QT_NO_XMLPATTERNS
#include "qdeclarativexmllistmodel_p.h"
+#endif
#include "qnumberformat_p.h"
#include "qperformancelog_p_p.h"
diff --git a/src/gui/kernel/qapplication_mac.mm b/src/gui/kernel/qapplication_mac.mm
index e511c3a..babfc72 100644
--- a/src/gui/kernel/qapplication_mac.mm
+++ b/src/gui/kernel/qapplication_mac.mm
@@ -1222,9 +1222,16 @@ void qt_init(QApplicationPrivate *priv, int)
#endif
if (!app_proc_ae_handlerUPP) {
app_proc_ae_handlerUPP = AEEventHandlerUPP(QApplicationPrivate::globalAppleEventProcessor);
- for(uint i = 0; i < sizeof(app_apple_events) / sizeof(QMacAppleEventTypeSpec); ++i)
- AEInstallEventHandler(app_apple_events[i].mac_class, app_apple_events[i].mac_id,
- app_proc_ae_handlerUPP, SRefCon(qApp), false);
+ for(uint i = 0; i < sizeof(app_apple_events) / sizeof(QMacAppleEventTypeSpec); ++i) {
+ // Install apple event handler, but avoid overwriting an already
+ // existing handler (it means a 3rd party application has installed one):
+ SRefCon refCon = 0;
+ AEEventHandlerUPP current_handler = NULL;
+ AEGetEventHandler(app_apple_events[i].mac_class, app_apple_events[i].mac_id, &current_handler, &refCon, false);
+ if (!current_handler)
+ AEInstallEventHandler(app_apple_events[i].mac_class, app_apple_events[i].mac_id,
+ app_proc_ae_handlerUPP, SRefCon(qApp), false);
+ }
}
if (QApplicationPrivate::app_style) {
@@ -2495,6 +2502,13 @@ void QApplicationPrivate::setupAppleEvents()
// finished initialization, which appears to be just after [NSApplication run] has
// started to execute. By setting up our apple events handlers this late, we override
// the ones set up by NSApplication.
+
+ // If Qt is used as a plugin, we let the 3rd party application handle events
+ // like quit and open file events. Otherwise, if we install our own handlers, we
+ // easily end up breaking functionallity the 3rd party application depend on:
+ if (QApplication::testAttribute(Qt::AA_MacPluginApplication))
+ return;
+
QT_MANGLE_NAMESPACE(QCocoaApplicationDelegate) *newDelegate = [QT_MANGLE_NAMESPACE(QCocoaApplicationDelegate) sharedDelegate];
NSAppleEventManager *eventManager = [NSAppleEventManager sharedAppleEventManager];
[eventManager setEventHandler:newDelegate andSelector:@selector(appleEventQuit:withReplyEvent:)
diff --git a/src/gui/painting/qcolor.cpp b/src/gui/painting/qcolor.cpp
index d6d288e..0b735a2 100644
--- a/src/gui/painting/qcolor.cpp
+++ b/src/gui/painting/qcolor.cpp
@@ -532,25 +532,48 @@ QString QColor::name() const
void QColor::setNamedColor(const QString &name)
{
+ if (!setColorFromString(name))
+ qWarning("QColor::setNamedColor: Unknown color name '%s'", name.toLatin1().constData());
+}
+
+/*!
+ \since 4.7
+
+ Returns true if the \a name is a valid color name and can
+ be used to construct a valid QColor object, otherwise returns
+ false.
+
+ The algorithm used is the same as with \a setNamedColor().
+ \sa setNamedColor()
+*/
+bool QColor::isValidColor(const QString &name)
+{
+ return QColor().setColorFromString(name);
+}
+
+bool QColor::setColorFromString(const QString &name)
+{
if (name.isEmpty()) {
invalidate();
- return;
+ return false;
}
if (name.startsWith(QLatin1Char('#'))) {
QRgb rgb;
if (qt_get_hex_rgb(name.constData(), name.length(), &rgb)) {
setRgb(rgb);
+ return true;
} else {
invalidate();
+ return false;
}
- return;
}
#ifndef QT_NO_COLORNAMES
QRgb rgb;
if (qt_get_named_rgb(name.constData(), name.length(), &rgb)) {
setRgba(rgb);
+ return true;
} else
#endif
{
@@ -561,11 +584,12 @@ void QColor::setNamedColor(const QString &name)
&& QX11Info::display()
&& XParseColor(QX11Info::display(), QX11Info::appColormap(), name.toLatin1().constData(), &result)) {
setRgb(result.red >> 8, result.green >> 8, result.blue >> 8);
+ return true;
} else
#endif
{
- qWarning("QColor::setNamedColor: Unknown color name '%s'", name.toLatin1().constData());
invalidate();
+ return false;
}
}
}
diff --git a/src/gui/painting/qcolor.h b/src/gui/painting/qcolor.h
index 332dc25..0ac828d 100644
--- a/src/gui/painting/qcolor.h
+++ b/src/gui/painting/qcolor.h
@@ -225,6 +225,8 @@ public:
QT3_SUPPORT uint pixel(int screen = -1) const;
#endif
+ static bool isValidColor(const QString &name);
+
private:
#ifndef QT3_SUPPORT
// do not allow a spec to be used as an alpha value
@@ -232,6 +234,7 @@ private:
#endif
void invalidate();
+ bool setColorFromString(const QString &name);
Spec cspec;
union {
diff --git a/src/plugins/mediaservices/mediaservices.pro b/src/plugins/mediaservices/mediaservices.pro
index d84b276..19d678b 100644
--- a/src/plugins/mediaservices/mediaservices.pro
+++ b/src/plugins/mediaservices/mediaservices.pro
@@ -1,7 +1,7 @@
TEMPLATE = subdirs
contains(QT_CONFIG, mediaservice) {
- win32:!wince: SUBDIRS += directshow
+ win32:!wince*: SUBDIRS += directshow
mac: SUBDIRS += qt7
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp
index d2e96d1..9cd5c63 100644
--- a/src/script/api/qscriptengine.cpp
+++ b/src/script/api/qscriptengine.cpp
@@ -563,7 +563,7 @@ JSC::JSValue JSC_HOST_CALL functionDisconnect(JSC::ExecState *exec, JSC::JSObjec
slot = arg1;
else {
QScript::SaveFrameHelper saveFrame(engine, exec);
- QString propertyName(QScriptEnginePrivate::toString(exec, arg1));
+ JSC::UString propertyName = QScriptEnginePrivate::toString(exec, arg1);
slot = QScriptEnginePrivate::property(exec, arg0, propertyName, QScriptValue::ResolvePrototype);
}
}
@@ -645,7 +645,7 @@ JSC::JSValue JSC_HOST_CALL functionConnect(JSC::ExecState *exec, JSC::JSObject *
slot = arg1;
else {
QScript::SaveFrameHelper saveFrame(engine, exec);
- QString propertyName = QScriptEnginePrivate::toString(exec, arg1);
+ JSC::UString propertyName = QScriptEnginePrivate::toString(exec, arg1);
slot = QScriptEnginePrivate::property(exec, arg0, propertyName, QScriptValue::ResolvePrototype);
}
}
@@ -723,19 +723,19 @@ JSC::JSValue JSC_HOST_CALL functionQsTranslate(JSC::ExecState *exec, JSC::JSObje
if ((args.size() > 4) && !args.at(4).isNumber())
return JSC::throwError(exec, JSC::GeneralError, "qsTranslate(): fifth argument (n) must be a number");
#ifndef QT_NO_QOBJECT
- QString context(args.at(0).toString(exec));
+ JSC::UString context = args.at(0).toString(exec);
#endif
- QString text(args.at(1).toString(exec));
+ JSC::UString text = args.at(1).toString(exec);
#ifndef QT_NO_QOBJECT
- QString comment;
+ JSC::UString comment;
if (args.size() > 2)
comment = args.at(2).toString(exec);
QCoreApplication::Encoding encoding = QCoreApplication::CodecForTr;
if (args.size() > 3) {
- QString encStr(args.at(3).toString(exec));
- if (encStr == QLatin1String("CodecForTr"))
+ JSC::UString encStr = args.at(3).toString(exec);
+ if (encStr == "CodecForTr")
encoding = QCoreApplication::CodecForTr;
- else if (encStr == QLatin1String("UnicodeUTF8"))
+ else if (encStr == "UnicodeUTF8")
encoding = QCoreApplication::UnicodeUTF8;
else
return JSC::throwError(exec, JSC::GeneralError, QString::fromLatin1("qsTranslate(): invalid encoding '%s'").arg(encStr));
@@ -744,11 +744,11 @@ JSC::JSValue JSC_HOST_CALL functionQsTranslate(JSC::ExecState *exec, JSC::JSObje
if (args.size() > 4)
n = args.at(4).toInt32(exec);
#endif
- QString result;
+ JSC::UString result;
#ifndef QT_NO_QOBJECT
- result = QCoreApplication::translate(context.toLatin1().constData(),
- text.toLatin1().constData(),
- comment.toLatin1().constData(),
+ result = QCoreApplication::translate(QScript::convertToLatin1(context).constData(),
+ QScript::convertToLatin1(text).constData(),
+ QScript::convertToLatin1(comment).constData(),
encoding, n);
#else
result = text;
@@ -774,25 +774,25 @@ JSC::JSValue JSC_HOST_CALL functionQsTr(JSC::ExecState *exec, JSC::JSObject*, JS
if ((args.size() > 2) && !args.at(2).isNumber())
return JSC::throwError(exec, JSC::GeneralError, "qsTranslate(): third argument (n) must be a number");
#ifndef QT_NO_QOBJECT
- QString context;
+ JSC::UString context;
QScriptContext *ctx = QScriptEnginePrivate::contextForFrame(exec);
if (ctx && ctx->parentContext())
context = QFileInfo(QScriptContextInfo(ctx->parentContext()).fileName()).baseName();
#endif
- QString text(args.at(0).toString(exec));
+ JSC::UString text = args.at(0).toString(exec);
#ifndef QT_NO_QOBJECT
- QString comment;
+ JSC::UString comment;
if (args.size() > 1)
comment = args.at(1).toString(exec);
int n = -1;
if (args.size() > 2)
n = args.at(2).toInt32(exec);
#endif
- QString result;
+ JSC::UString result;
#ifndef QT_NO_QOBJECT
- result = QCoreApplication::translate(context.toLatin1().constData(),
- text.toLatin1().constData(),
- comment.toLatin1().constData(),
+ result = QCoreApplication::translate(QScript::convertToLatin1(context).constData(),
+ QScript::convertToLatin1(text).constData(),
+ QScript::convertToLatin1(comment).constData(),
QCoreApplication::CodecForTr, n);
#else
result = text;
@@ -1580,9 +1580,9 @@ QRegExp QScriptEnginePrivate::toRegExp(JSC::ExecState *exec, JSC::JSValue value)
{
if (!isRegExp(value))
return QRegExp();
- QString pattern = toString(exec, property(exec, value, QLatin1String("source"), QScriptValue::ResolvePrototype));
+ QString pattern = toString(exec, property(exec, value, "source", QScriptValue::ResolvePrototype));
Qt::CaseSensitivity kase = Qt::CaseSensitive;
- if (toBool(exec, property(exec, value, QLatin1String("ignoreCase"), QScriptValue::ResolvePrototype)))
+ if (toBool(exec, property(exec, value, "ignoreCase", QScriptValue::ResolvePrototype)))
kase = Qt::CaseInsensitive;
return QRegExp(pattern, kase, QRegExp::RegExp2);
}
@@ -1637,7 +1637,7 @@ JSC::JSValue QScriptEnginePrivate::propertyHelper(JSC::ExecState *exec, JSC::JSV
}
if (!result && (resolveMode & QScriptValue::ResolveScope)) {
// ### check if it's a function object and look in the scope chain
- JSC::JSValue scope = property(exec, value, QString::fromLatin1("__qt_scope__"), QScriptValue::ResolveLocal);
+ JSC::JSValue scope = property(exec, value, "__qt_scope__", QScriptValue::ResolveLocal);
if (isObject(scope))
result = property(exec, scope, id, resolveMode);
}
diff --git a/src/script/api/qscriptengine_p.h b/src/script/api/qscriptengine_p.h
index d0d020a..5166d89 100644
--- a/src/script/api/qscriptengine_p.h
+++ b/src/script/api/qscriptengine_p.h
@@ -123,6 +123,9 @@ namespace QScript
inline QScriptEnginePrivate *scriptEngineFromExec(const JSC::ExecState *exec);
bool isFunction(JSC::JSValue value);
+ inline void convertToLatin1_helper(const UChar *i, int length, char *s);
+ inline QByteArray convertToLatin1(const JSC::UString &str);
+
class UStringSourceProviderWithFeedback;
struct GlobalClientData : public JSC::JSGlobalData::ClientData
@@ -165,7 +168,7 @@ public:
static inline qint32 toInt32(JSC::ExecState *, JSC::JSValue);
static inline quint32 toUInt32(JSC::ExecState *, JSC::JSValue);
static inline quint16 toUInt16(JSC::ExecState *, JSC::JSValue);
- static inline QString toString(JSC::ExecState *, JSC::JSValue);
+ static inline JSC::UString toString(JSC::ExecState *, JSC::JSValue);
static inline QDateTime toDateTime(JSC::ExecState *, JSC::JSValue);
#ifndef QT_NO_REGEXP
@@ -181,8 +184,8 @@ public:
static inline JSC::JSValue property(JSC::ExecState*, JSC::JSValue, quint32 index,
int resolveMode = QScriptValue::ResolvePrototype);
static JSC::JSValue propertyHelper(JSC::ExecState*, JSC::JSValue, quint32, int resolveMode);
- static inline JSC::JSValue property(JSC::ExecState*, JSC::JSValue, const QString &, int resolveMode);
- static inline void setProperty(JSC::ExecState*, JSC::JSValue object, const QString &name, JSC::JSValue,
+ static inline JSC::JSValue property(JSC::ExecState*, JSC::JSValue, const JSC::UString &, int resolveMode);
+ static inline void setProperty(JSC::ExecState*, JSC::JSValue object, const JSC::UString &name, JSC::JSValue,
const QScriptValue::PropertyFlags &flags = QScriptValue::KeepExistingFlags);
static void setProperty(JSC::ExecState*, JSC::JSValue object, const JSC::Identifier &id, JSC::JSValue,
const QScriptValue::PropertyFlags &flags = QScriptValue::KeepExistingFlags);
@@ -191,7 +194,7 @@ public:
static QScriptValue::PropertyFlags propertyFlags(JSC::ExecState*, JSC::JSValue value,
const JSC::Identifier &id, const QScriptValue::ResolveFlags &mode);
static inline QScriptValue::PropertyFlags propertyFlags(JSC::ExecState*, JSC::JSValue value,
- const QString &name, const QScriptValue::ResolveFlags &mode);
+ const JSC::UString &name, const QScriptValue::ResolveFlags &mode);
static bool convertValue(JSC::ExecState*, JSC::JSValue value,
int type, void *ptr);
@@ -516,6 +519,21 @@ inline bool ToBool(const QString &value)
return !value.isEmpty();
}
+inline void convertToLatin1_helper(const UChar *i, int length, char *s)
+{
+ const UChar *e = i + length;
+ while (i != e)
+ *(s++) = (uchar) *(i++);
+ *s = '\0';
+}
+
+inline QByteArray convertToLatin1(const JSC::UString &str)
+{
+ QByteArray ba(str.size(), Qt::Uninitialized);
+ convertToLatin1_helper(str.data(), str.size(), ba.data());
+ return ba;
+}
+
} // namespace QScript
inline QScriptValuePrivate *QScriptEnginePrivate::allocateScriptValuePrivate(size_t size)
@@ -629,7 +647,7 @@ inline void QScriptValuePrivate::initFrom(const QString &value)
engine->registerScriptValue(this);
}
-inline JSC::JSValue QScriptEnginePrivate::property(JSC::ExecState *exec, JSC::JSValue value, const QString &name, int resolveMode)
+inline JSC::JSValue QScriptEnginePrivate::property(JSC::ExecState *exec, JSC::JSValue value, const JSC::UString &name, int resolveMode)
{
return property(exec, value, JSC::Identifier(exec, name), resolveMode);
}
@@ -655,13 +673,13 @@ inline JSC::JSValue QScriptEnginePrivate::property(JSC::ExecState *exec, JSC::JS
}
inline QScriptValue::PropertyFlags QScriptEnginePrivate::propertyFlags(JSC::ExecState *exec, JSC::JSValue value,
- const QString &name,
+ const JSC::UString &name,
const QScriptValue::ResolveFlags &mode)
{
return propertyFlags(exec, value, JSC::Identifier(exec, name), mode);
}
-inline void QScriptEnginePrivate::setProperty(JSC::ExecState *exec, JSC::JSValue objectValue, const QString &name,
+inline void QScriptEnginePrivate::setProperty(JSC::ExecState *exec, JSC::JSValue objectValue, const JSC::UString &name,
JSC::JSValue value, const QScriptValue::PropertyFlags &flags)
{
setProperty(exec, objectValue, JSC::Identifier(exec, name), value, flags);
@@ -677,7 +695,7 @@ inline JSC::JSValue QScriptValuePrivate::property(quint32 index, int resolveMode
return QScriptEnginePrivate::property(engine->currentFrame, jscValue, index, resolveMode);
}
-inline JSC::JSValue QScriptValuePrivate::property(const QString &name, int resolveMode) const
+inline JSC::JSValue QScriptValuePrivate::property(const JSC::UString &name, int resolveMode) const
{
JSC::ExecState *exec = engine->currentFrame;
return QScriptEnginePrivate::property(exec, jscValue, JSC::Identifier(exec, name), resolveMode);
@@ -701,7 +719,7 @@ inline void QScriptValuePrivate::setProperty(quint32 index, const JSC::JSValue &
QScriptEnginePrivate::setProperty(engine->currentFrame, jscValue, index, value, flags);
}
-inline void QScriptValuePrivate::setProperty(const QString &name, const JSC::JSValue &value,
+inline void QScriptValuePrivate::setProperty(const JSC::UString &name, const JSC::JSValue &value,
const QScriptValue::PropertyFlags &flags)
{
JSC::ExecState *exec = engine->currentFrame;
@@ -919,7 +937,7 @@ inline quint16 QScriptEnginePrivate::toUInt16(JSC::ExecState *exec, JSC::JSValue
return QScript::ToUInt16(toNumber(exec, value));
}
-inline QString QScriptEnginePrivate::toString(JSC::ExecState *exec, JSC::JSValue value)
+inline JSC::UString QScriptEnginePrivate::toString(JSC::ExecState *exec, JSC::JSValue value)
{
JSC::JSValue savedException;
saveException(exec, &savedException);
diff --git a/src/script/api/qscriptvalue.cpp b/src/script/api/qscriptvalue.cpp
index 7f1fdaa..414a45c 100644
--- a/src/script/api/qscriptvalue.cpp
+++ b/src/script/api/qscriptvalue.cpp
@@ -562,7 +562,7 @@ QScriptValue QScriptValue::scope() const
if (!d || !d->isObject())
return QScriptValue();
// ### make hidden property
- JSC::JSValue result = d->property(QLatin1String("__qt_scope__"), QScriptValue::ResolveLocal);
+ JSC::JSValue result = d->property("__qt_scope__", QScriptValue::ResolveLocal);
return d->engine->scriptValueFromJSCValue(result);
}
diff --git a/src/script/api/qscriptvalue_p.h b/src/script/api/qscriptvalue_p.h
index 77b7330..089b923 100644
--- a/src/script/api/qscriptvalue_p.h
+++ b/src/script/api/qscriptvalue_p.h
@@ -88,8 +88,8 @@ public:
inline JSC::JSValue property(const JSC::Identifier &id, int resolveMode) const;
inline JSC::JSValue property(quint32 index, int resolveMode) const;
- inline JSC::JSValue property(const QString &, int resolveMode) const;
- inline void setProperty(const QString &name, const JSC::JSValue &value,
+ inline JSC::JSValue property(const JSC::UString &, int resolveMode) const;
+ inline void setProperty(const JSC::UString &name, const JSC::JSValue &value,
const QScriptValue::PropertyFlags &flags);
inline void setProperty(const JSC::Identifier &id, const JSC::JSValue &value,
const QScriptValue::PropertyFlags &flags);
diff --git a/src/script/bridge/qscriptqobject.cpp b/src/script/bridge/qscriptqobject.cpp
index 30e5a26..8d111f9 100644
--- a/src/script/bridge/qscriptqobject.cpp
+++ b/src/script/bridge/qscriptqobject.cpp
@@ -654,8 +654,8 @@ static JSC::JSValue callQtMethod(JSC::ExecState *exec, QMetaMethod::MethodType c
matchDistance += 10;
}
} else {
- QString sval = QScriptEnginePrivate::toString(exec, actual);
- int ival = m.keyToValue(sval.toLatin1());
+ JSC::UString sval = QScriptEnginePrivate::toString(exec, actual);
+ int ival = m.keyToValue(convertToLatin1(sval));
if (ival != -1) {
qVariantSetValue(v, ival);
converted = true;
@@ -1168,7 +1168,7 @@ bool QObjectDelegate::getOwnPropertySlot(QScriptObject *object, JSC::ExecState *
{
//Note: this has to be kept in sync with getOwnPropertyDescriptor
#ifndef QT_NO_PROPERTIES
- QByteArray name = QString(propertyName.ustring()).toLatin1();
+ QByteArray name = convertToLatin1(propertyName.ustring());
QObject *qobject = data->value;
if (!qobject) {
QString message = QString::fromLatin1("cannot access member `%0' of deleted QObject")
@@ -1285,7 +1285,7 @@ bool QObjectDelegate::getOwnPropertyDescriptor(QScriptObject *object, JSC::ExecS
{
//Note: this has to be kept in sync with getOwnPropertySlot abd getPropertyAttributes
#ifndef QT_NO_PROPERTIES
- QByteArray name = QString(propertyName.ustring()).toLatin1();
+ QByteArray name = convertToLatin1(propertyName.ustring());
QObject *qobject = data->value;
if (!qobject) {
QString message = QString::fromLatin1("cannot access member `%0' of deleted QObject")
@@ -1419,7 +1419,7 @@ void QObjectDelegate::put(QScriptObject *object, JSC::ExecState* exec,
JSC::JSValue value, JSC::PutPropertySlot &slot)
{
#ifndef QT_NO_PROPERTIES
- QByteArray name = ((QString)propertyName.ustring()).toLatin1();
+ QByteArray name = convertToLatin1(propertyName.ustring());
QObject *qobject = data->value;
if (!qobject) {
QString message = QString::fromLatin1("cannot access member `%0' of deleted QObject")
@@ -1517,7 +1517,7 @@ bool QObjectDelegate::deleteProperty(QScriptObject *object, JSC::ExecState *exec
bool checkDontDelete)
{
#ifndef QT_NO_PROPERTIES
- QByteArray name = ((QString)propertyName.ustring()).toLatin1();
+ QByteArray name = convertToLatin1(propertyName.ustring());
QObject *qobject = data->value;
if (!qobject) {
QString message = QString::fromLatin1("cannot access member `%0' of deleted QObject")
@@ -1567,7 +1567,7 @@ bool QObjectDelegate::getPropertyAttributes(const QScriptObject *object,
{
#ifndef QT_NO_PROPERTIES
//Note: this has to be kept in sync with getOwnPropertyDescriptor and getOwnPropertySlot
- QByteArray name = ((QString)propertyName.ustring()).toLatin1();
+ QByteArray name = convertToLatin1(propertyName.ustring());
QObject *qobject = data->value;
if (!qobject)
return false;
@@ -1853,7 +1853,7 @@ bool QMetaObjectWrapperObject::getOwnPropertySlot(
return true;
}
- QByteArray name = QString(propertyName.ustring()).toLatin1();
+ QByteArray name = convertToLatin1(propertyName.ustring());
for (int i = 0; i < meta->enumeratorCount(); ++i) {
QMetaEnum e = meta->enumerator(i);
@@ -1881,7 +1881,7 @@ void QMetaObjectWrapperObject::put(JSC::ExecState* exec, const JSC::Identifier&
}
const QMetaObject *meta = data->value;
if (meta) {
- QByteArray name = QString(propertyName.ustring()).toLatin1();
+ QByteArray name = convertToLatin1(propertyName.ustring());
for (int i = 0; i < meta->enumeratorCount(); ++i) {
QMetaEnum e = meta->enumerator(i);
for (int j = 0; j < e.keyCount(); ++j) {
@@ -1901,7 +1901,7 @@ bool QMetaObjectWrapperObject::deleteProperty(
return false;
const QMetaObject *meta = data->value;
if (meta) {
- QByteArray name = QString(propertyName.ustring()).toLatin1();
+ QByteArray name = convertToLatin1(propertyName.ustring());
for (int i = 0; i < meta->enumeratorCount(); ++i) {
QMetaEnum e = meta->enumerator(i);
for (int j = 0; j < e.keyCount(); ++j) {
@@ -1923,7 +1923,7 @@ bool QMetaObjectWrapperObject::getPropertyAttributes(JSC::ExecState *exec,
}
const QMetaObject *meta = data->value;
if (meta) {
- QByteArray name = QString(propertyName.ustring()).toLatin1();
+ QByteArray name = convertToLatin1(propertyName.ustring());
for (int i = 0; i < meta->enumeratorCount(); ++i) {
QMetaEnum e = meta->enumerator(i);
for (int j = 0; j < e.keyCount(); ++j) {
diff --git a/tools/assistant/tools/assistant/findwidget.cpp b/tools/assistant/tools/assistant/findwidget.cpp
index 2e40ab0..60318d4 100644
--- a/tools/assistant/tools/assistant/findwidget.cpp
+++ b/tools/assistant/tools/assistant/findwidget.cpp
@@ -72,6 +72,7 @@ FindWidget::FindWidget(QWidget *parent)
toolClose = setupToolButton(QLatin1String(""),
resourcePath + QLatin1String("/closetab.png"));
hboxLayout->addWidget(toolClose);
+ connect(toolClose, SIGNAL(clicked()), SLOT(hide()));
editFind = new QLineEdit(this);
hboxLayout->addWidget(editFind);
diff --git a/tools/qdoc3/test/qml.qdocconf b/tools/qdoc3/test/qdeclarative.qdocconf
index 3b5d8dc..3b5d8dc 100644
--- a/tools/qdoc3/test/qml.qdocconf
+++ b/tools/qdoc3/test/qdeclarative.qdocconf
diff --git a/tools/qml/qml.pro b/tools/qml/qml.pro
index 9c9c398..9b68dbc 100644
--- a/tools/qml/qml.pro
+++ b/tools/qml/qml.pro
@@ -41,9 +41,11 @@ INSTALLS += target
wince* {
QT += scripttools \
xml \
- xmlpatterns \
phonon
+ contains(QT_CONFIG, xmlpatterns) {
+ QT += xmlpatterns
+ }
contains(QT_CONFIG, webkit) {
QT += webkit
}