summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/src/declarative/extending.qdoc70
-rwxr-xr-xdoc/src/template/scripts/functions.js17
-rwxr-xr-xdoc/src/template/style/style.css39
-rw-r--r--src/network/kernel/qnetworkproxy_win.cpp37
-rw-r--r--src/network/ssl/qsslsocket_openssl.cpp14
-rw-r--r--src/network/ssl/qsslsocket_p.h4
-rw-r--r--tools/assistant/tools/qcollectiongenerator/main.cpp2
-rw-r--r--tools/qdoc3/htmlgenerator.cpp7
-rw-r--r--tools/qdoc3/htmlgenerator.h2
-rw-r--r--tools/qdoc3/test/qt-html-templates.qdocconf2
-rw-r--r--tools/qdoc3/tree.cpp3
11 files changed, 161 insertions, 36 deletions
diff --git a/doc/src/declarative/extending.qdoc b/doc/src/declarative/extending.qdoc
index 6476dfb..28d4ed4 100644
--- a/doc/src/declarative/extending.qdoc
+++ b/doc/src/declarative/extending.qdoc
@@ -65,20 +65,22 @@ template<typename T>
int qmlRegisterType(const char *uri, int versionMajor, int versionMinor, const char *qmlName)
\endcode
-Calling qmlRegisterType() registers the C++ type \a T with the QML system, and makes it available in QML
-under the name \a qmlName in library \a uri version \a versionMajor.versionMinor.
-The \a qmlName can be the same as the C++ type name.
+Calling qmlRegisterType() registers the C++ type \a T with the QML
+system, and makes it available in QML under the name \a qmlName in
+library \a uri version \a versionMajor.versionMinor. The \a qmlName
+can be the same as the C++ type name.
Type \a T must be a concrete type that inherits QObject and has a default
constructor.
+
\endquotation
-Types can be registered by libraries (such as Qt does), application code,
-or by plugins (see QDeclarativeExtensionPlugin).
+Types can be registered by libraries, application code, or by plugins
+(see QDeclarativeExtensionPlugin).
-Once registered, all of the \l {Qt's Property System}{properties} of a supported
-type are available for use within QML. QML has intrinsic support for properties
-of these types:
+Once registered, all \l {Qt's Property System}{properties} of the
+supported types are available in QML. QML has intrinsic support for
+properties of these types:
\list
\o bool
@@ -94,9 +96,14 @@ of these types:
\o QVariant
\endlist
-QML is typesafe. Attempting to assign an invalid value to a property will
-generate an error. For example, assuming the name property of the \c Person
-element had a type of QString, this would cause an error:
+When a property of a supported type is added to a C++ class, in a QML
+element based on the C++ class, a \e{value-changed} signal handler
+will be available. See \l{Signal Support} below.
+
+QML is typesafe. Attempting to assign an invalid value to a property
+will generate an error. For example, assuming the \e{name} property
+of the \c Person element had a type of QString, this would cause an
+error:
\code
Person {
@@ -412,7 +419,28 @@ value will not be accessible from script.
implement the onPartyStarted signal property.
If you want to use signals from items not created in QML, you can access their
-signals with the \l {Connections} element.
+signals with the \l {Connections} element.
+
+Additionally, if a property is added to a C++ class, all QML elements
+based on that C++ class will have a \e{value-changed} signal handler
+for that property. The name of the signal handler is \e{on<Property
+name>Changed}, with the first letter of the property name being upper
+cased.
+
+\note If the NOTIFY signal for the added property is not simply
+\c{<property_name>Changed()}, then you will get two equivalent signal
+handlers, one because of the signal, one because of the property. For
+example, if the property \c{test_property} with NOTIFY signal
+\c{testPropChanged()} is added to a C++ class, then QML elements based
+on that C++ class will have two signal handlers:
+\c{onTest_propertyChanged} because of the property, and
+\c{onTestPropChanged} because of the NOTIFY signal. For clarity, we
+suggest that for properties exposed to QML in this way, the name of
+the NOTIFY signal should be just \c{<property_name>Changed()}, so that
+there will be just one signal handler in QML and one naming
+convention used.
+
+See also \l {Extending types from QML}.
\section1 Property Value Sources
@@ -705,6 +733,24 @@ controls the color of the inner rectangle.
}
\endcode
+Adding a property to an item automatically adds a \e{value-changed}
+signal handler to the item. The signal hander is named
+\c{on<Property_name>Changed}, with the first letter of the property
+name being upper case.
+
+Signal handlers can have arbitrary JavaScript code assigned. The following
+example shows how to output to a text console a new value of property
+\c{innerColor} whenever the value of this property changes.
+
+\code
+ Rectangle {
+ id: rect
+ property color innerColor: "black"
+
+ onInnerColorChanged: { console.log(rect.innerColor); }
+ }
+\endcode
+
\target qml-property-aliases
\section2 Property aliases
diff --git a/doc/src/template/scripts/functions.js b/doc/src/template/scripts/functions.js
index 2723ff2..faa4ca4 100755
--- a/doc/src/template/scripts/functions.js
+++ b/doc/src/template/scripts/functions.js
@@ -63,11 +63,9 @@ function processNokiaData(response){
if(propertyTags[i].getElementsByTagName('pageType')[0].firstChild.nodeValue == 'APIPage'){
lookupCount++;
-
for (var j=0; j< propertyTags[i].getElementsByTagName('pageWords').length; j++){
full_li_element = linkStart + propertyTags[i].getElementsByTagName('pageUrl')[j].firstChild.nodeValue;
full_li_element = full_li_element + "'>" + propertyTags[i].getElementsByTagName('pageTitle')[0].firstChild.nodeValue + linkEnd;
-
$('#ul001').append(full_li_element);
$('#ul001 .defaultLink').css('display','none');
@@ -77,7 +75,6 @@ function processNokiaData(response){
if(propertyTags[i].getElementsByTagName('pageType')[0].firstChild.nodeValue == 'Article'){
articleCount++;
-
for (var j=0; j< propertyTags[i].getElementsByTagName('pageWords').length; j++){
full_li_element = linkStart + propertyTags[i].getElementsByTagName('pageUrl')[j].firstChild.nodeValue;
full_li_element =full_li_element + "'>" + propertyTags[i].getElementsByTagName('pageTitle')[0].firstChild.nodeValue + linkEnd ;
@@ -103,10 +100,13 @@ function processNokiaData(response){
if(i==propertyTags.length){$('#pageType').removeClass('loading');}
}
+ if(lookupCount > 0){$('#ul001 .menuAlert').remove();$('#ul001').prepend('<li class=\"menuAlert liveResult hit\">Found ' + lookupCount + ' hits</li>');$('#ul001 li').css('display','block');$('.sidebar .search form input').removeClass('loading');}
+ if(articleCount > 0){$('#ul002 .menuAlert').remove();$('#ul002').prepend('<li class=\"menuAlert liveResult hit\">Found ' + articleCount + ' hits</li>');$('#ul002 li').css('display','block');}
+ if(exampleCount > 0){$('#ul003 .menuAlert').remove();$('#ul003').prepend('<li class=\"menuAlert liveResult hit\">Found ' + articleCount + ' hits</li>');$('#ul003 li').css('display','block');}
- if(lookupCount == 0){$('#ul001').prepend('<li class=\"menuAlert liveResult noMatch\">Found no result</li>');$('#ul001 li').css('display','block');$('.sidebar .search form input').removeClass('loading');}
- if(articleCount == 0){$('#ul002').prepend('<li class=\"menuAlert liveResult noMatch\">Found no result</li>');$('#ul002 li').css('display','block');}
- if(exampleCount == 0){$('#ul003').prepend('<li class=\"menuAlert liveResult noMatch\">Found no result</li>');$('#ul003 li').css('display','block');}
+ if(lookupCount == 0){$('#ul001 .menuAlert').remove();$('#ul001').prepend('<li class=\"menuAlert liveResult noMatch\">Found no result</li>');$('#ul001 li').css('display','block');$('.sidebar .search form input').removeClass('loading');}
+ if(articleCount == 0){$('#ul002 .menuAlert').remove();$('#ul002').prepend('<li class=\"menuAlert liveResult noMatch\">Found no result</li>');$('#ul002 li').css('display','block');}
+ if(exampleCount == 0){$('#ul003 .menuAlert').remove();$('#ul003').prepend('<li class=\"menuAlert liveResult noMatch\">Found no result</li>');$('#ul003 li').css('display','block');}
// reset count variables;
lookupCount=0;
articleCount = 0;
@@ -121,6 +121,7 @@ function CheckEmptyAndLoadList()
var pageVal = $('title').html();
$('#feedUrl').remove();
$('#pageVal').remove();
+ $('.menuAlert').remove();
$('#feedform').append('<input id="feedUrl" name="feedUrl" value="'+pageUrl+'" style="display:none;">');
$('#feedform').append('<input id="pageVal" name="pageVal" value="'+pageVal+'" style="display:none;">');
$('.liveResult').remove();
@@ -170,6 +171,7 @@ else
if (this.timer) clearTimeout(this.timer);
this.timer = setTimeout(function () {
$('#pageType').addClass('loading');
+ $('.searching').remove();
$('.list ul').prepend('<li class="menuAlert searching">Searching...</li>');
$.ajax({
contentType: "application/x-www-form-urlencoded",
@@ -180,7 +182,8 @@ else
success: function (response, textStatus) {
$('.liveResult').remove();
- $('#pageType').removeClass('loading');
+ $('.searching').remove();
+ $('#pageType').removeClass('loading');
$('.list ul').prepend('<li class="menuAlert searching">Searching...</li>');
processNokiaData(response);
diff --git a/doc/src/template/style/style.css b/doc/src/template/style/style.css
index b174622..299806b 100755
--- a/doc/src/template/style/style.css
+++ b/doc/src/template/style/style.css
@@ -239,7 +239,7 @@
width: 158px;
height: 19px;
padding: 0;
- border: none;
+ border: 0px;
outline: none;
font: 13px/1.2 Verdana;
}
@@ -328,13 +328,18 @@
{
background: url(../images/box_bg.png) repeat-x 0 bottom;
}
- .sidebar .box ul li.menuAlert
+ .sidebar .box ul li.noMatch
{
background: none;
- color:gray;
+ color:#FF2A00;
font-style:italic;
}
-
+ .sidebar .box ul li.hit
+ {
+ background: none;
+ color:#AAD2F0;
+ font-style:italic;
+ }
.wrap
{
@@ -857,7 +862,7 @@
position: fixed;
top: 100px;
left: 33%;
- height: 190px;
+ height: 230px;
width: 400px;
padding: 5px;
background-color: #e6e7e8;
@@ -881,12 +886,25 @@
height: 120px;
margin: 0px 25px 10px 15px;
}
+ #noteHead
+ {
+ font-weight:bold;
+ padding:10px 10px 10px 20px;
+ }
#feedsubmit
{
display: inline;
float: right;
margin: 4px 32px 0 0;
}
+
+ .note
+ {
+ font-size:7pt;
+ padding-bottom:3px;
+ padding-left:20px;
+ }
+
#blurpage
{
display: none;
@@ -1233,12 +1251,19 @@ pre.highlightedCode {
.navTop{
float:right;
padding-right:5px;
- padding-top:15px;
+ margin-top:15px;
}
.wrap .content .toc h3{
- border-bottom:none;
+ border-bottom:0px;
+ margin-top:0px;
}
+
+ .wrap .content .toc h3 a:hover{
+ color:#00732F;
+ text-decoration:none;
+ }
+
/* end of screen media */
/* start of print media */
diff --git a/src/network/kernel/qnetworkproxy_win.cpp b/src/network/kernel/qnetworkproxy_win.cpp
index e801738..537107e 100644
--- a/src/network/kernel/qnetworkproxy_win.cpp
+++ b/src/network/kernel/qnetworkproxy_win.cpp
@@ -100,6 +100,10 @@ typedef struct {
#define WINHTTP_NO_PROXY_NAME NULL
#define WINHTTP_NO_PROXY_BYPASS NULL
+#define WINHTTP_ERROR_BASE 12000
+#define ERROR_WINHTTP_LOGIN_FAILURE (WINHTTP_ERROR_BASE + 15)
+#define ERROR_WINHTTP_AUTODETECTION_FAILED (WINHTTP_ERROR_BASE + 180)
+
QT_BEGIN_NAMESPACE
typedef BOOL (WINAPI * PtrWinHttpGetProxyForUrl)(HINTERNET, LPCWSTR, WINHTTP_AUTOPROXY_OPTIONS*, WINHTTP_PROXY_INFO*);
@@ -320,7 +324,7 @@ void QWindowsSystemProxy::init()
isAutoConfig = true;
memset(&autoProxyOptions, 0, sizeof autoProxyOptions);
- autoProxyOptions.fAutoLogonIfChallenged = true;
+ autoProxyOptions.fAutoLogonIfChallenged = false;
if (ieProxyConfig.fAutoDetect) {
autoProxyOptions.dwFlags = WINHTTP_AUTOPROXY_AUTO_DETECT;
autoProxyOptions.dwAutoDetectFlags = WINHTTP_AUTO_DETECT_TYPE_DHCP |
@@ -377,10 +381,26 @@ QList<QNetworkProxy> QNetworkProxyFactory::systemProxyForQuery(const QNetworkPro
// change the scheme to https, maybe it'll work
url.setScheme(QLatin1String("https"));
}
- if (ptrWinHttpGetProxyForUrl(sp->hHttpSession,
- (LPCWSTR)url.toString().utf16(),
- &sp->autoProxyOptions,
- &proxyInfo)) {
+
+ bool getProxySucceeded = ptrWinHttpGetProxyForUrl(sp->hHttpSession,
+ (LPCWSTR)url.toString().utf16(),
+ &sp->autoProxyOptions,
+ &proxyInfo);
+ DWORD getProxyError = GetLastError();
+
+ if (!getProxySucceeded
+ && (ERROR_WINHTTP_LOGIN_FAILURE == getProxyError)) {
+ // We first tried without AutoLogon, because this might prevent caching the result.
+ // But now we've to enable it (http://msdn.microsoft.com/en-us/library/aa383153%28v=VS.85%29.aspx)
+ sp->autoProxyOptions.fAutoLogonIfChallenged = TRUE;
+ getProxySucceeded = ptrWinHttpGetProxyForUrl(sp->hHttpSession,
+ (LPCWSTR)url.toString().utf16(),
+ &sp->autoProxyOptions,
+ &proxyInfo);
+ getProxyError = GetLastError();
+ }
+
+ if (getProxySucceeded) {
// yes, we got a config for this URL
QString proxyBypass = QString::fromWCharArray(proxyInfo.lpszProxyBypass);
QStringList proxyServerList = splitSpaceSemicolon(QString::fromWCharArray(proxyInfo.lpszProxy));
@@ -395,6 +415,13 @@ QList<QNetworkProxy> QNetworkProxyFactory::systemProxyForQuery(const QNetworkPro
}
// GetProxyForUrl failed
+
+ if (ERROR_WINHTTP_AUTODETECTION_FAILED == getProxyError) {
+ //No config file could be retrieved on the network.
+ //Don't search for it next time again.
+ sp->isAutoConfig = false;
+ }
+
return sp->defaultResult;
}
diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp
index 54a580d..cad8ca7 100644
--- a/src/network/ssl/qsslsocket_openssl.cpp
+++ b/src/network/ssl/qsslsocket_openssl.cpp
@@ -515,9 +515,15 @@ void QSslSocketPrivate::ensureInitialized()
#elif defined(Q_OS_WIN)
HINSTANCE hLib = LoadLibraryW(L"Crypt32");
if (hLib) {
+#if defined(Q_OS_WINCE)
+ ptrCertOpenSystemStoreW = (PtrCertOpenSystemStoreW)GetProcAddress(hLib, L"CertOpenStore");
+ ptrCertFindCertificateInStore = (PtrCertFindCertificateInStore)GetProcAddress(hLib, L"CertFindCertificateInStore");
+ ptrCertCloseStore = (PtrCertCloseStore)GetProcAddress(hLib, L"CertCloseStore");
+#else
ptrCertOpenSystemStoreW = (PtrCertOpenSystemStoreW)GetProcAddress(hLib, "CertOpenSystemStoreW");
ptrCertFindCertificateInStore = (PtrCertFindCertificateInStore)GetProcAddress(hLib, "CertFindCertificateInStore");
ptrCertCloseStore = (PtrCertCloseStore)GetProcAddress(hLib, "CertCloseStore");
+#endif
if (!ptrCertOpenSystemStoreW || !ptrCertFindCertificateInStore || !ptrCertCloseStore)
qWarning("could not resolve symbols in crypt32 library"); // should never happen
} else {
@@ -601,7 +607,15 @@ QList<QSslCertificate> QSslSocketPrivate::systemCaCertificates()
#elif defined(Q_OS_WIN)
if (ptrCertOpenSystemStoreW && ptrCertFindCertificateInStore && ptrCertCloseStore) {
HCERTSTORE hSystemStore;
+#if defined(Q_OS_WINCE)
+ hSystemStore = ptrCertOpenSystemStoreW(CERT_STORE_PROV_SYSTEM_W,
+ 0,
+ 0,
+ CERT_STORE_NO_CRYPT_RELEASE_FLAG|CERT_SYSTEM_STORE_CURRENT_USER,
+ L"ROOT");
+#else
hSystemStore = ptrCertOpenSystemStoreW(0, L"ROOT");
+#endif
if(hSystemStore) {
PCCERT_CONTEXT pc = NULL;
while(1) {
diff --git a/src/network/ssl/qsslsocket_p.h b/src/network/ssl/qsslsocket_p.h
index 09775bc..72b3ef7 100644
--- a/src/network/ssl/qsslsocket_p.h
+++ b/src/network/ssl/qsslsocket_p.h
@@ -77,7 +77,11 @@ QT_BEGIN_NAMESPACE
#ifndef HCRYPTPROV_LEGACY
#define HCRYPTPROV_LEGACY HCRYPTPROV
#endif
+#if defined(Q_OS_WINCE)
+ typedef HCERTSTORE (WINAPI *PtrCertOpenSystemStoreW)(LPCSTR, DWORD, HCRYPTPROV_LEGACY, DWORD, const void*);
+#else
typedef HCERTSTORE (WINAPI *PtrCertOpenSystemStoreW)(HCRYPTPROV_LEGACY, LPCWSTR);
+#endif
typedef PCCERT_CONTEXT (WINAPI *PtrCertFindCertificateInStore)(HCERTSTORE, DWORD, DWORD, DWORD, const void*, PCCERT_CONTEXT);
typedef BOOL (WINAPI *PtrCertCloseStore)(HCERTSTORE, DWORD);
#endif
diff --git a/tools/assistant/tools/qcollectiongenerator/main.cpp b/tools/assistant/tools/qcollectiongenerator/main.cpp
index 7fcb4e1..b3f6bd9 100644
--- a/tools/assistant/tools/qcollectiongenerator/main.cpp
+++ b/tools/assistant/tools/qcollectiongenerator/main.cpp
@@ -459,6 +459,8 @@ int main(int argc, char *argv[])
return -1;
}
}
+ if (!config.filesToRegister().isEmpty())
+ CollectionConfiguration::updateLastRegisterTime(helpEngine);
if (!config.title().isEmpty())
CollectionConfiguration::setWindowTitle(helpEngine, config.title());
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
index e1916b4..49ba5f6 100644
--- a/tools/qdoc3/htmlgenerator.cpp
+++ b/tools/qdoc3/htmlgenerator.cpp
@@ -61,6 +61,7 @@ QT_BEGIN_NAMESPACE
#define COMMAND_VERSION Doc::alias("version")
int HtmlGenerator::id = 0;
+bool HtmlGenerator::debugging_on = false;
QString HtmlGenerator::sinceTitles[] =
{
@@ -2703,6 +2704,7 @@ void HtmlGenerator::generateQmlItem(const Node *node,
marked.replace("</@type>", "");
}
out() << highlightedCode(marked, marker, relative);
+ debugging_on = false;
}
#endif
@@ -3097,9 +3099,8 @@ QString HtmlGenerator::highlightedCode(const QString& markedCode,
for (int k = 0; k != 3; ++k) {
if (parseArg(src, typeTags[k], &i, n, &arg, &par1)) {
par1 = QStringRef();
- QString link = linkForNode(
- marker->resolveTarget(arg.toString(), myTree, relative),
- relative);
+ const Node* n = marker->resolveTarget(arg.toString(), myTree, relative);
+ QString link = linkForNode(n,relative);
addLink(link, arg, &html);
handled = true;
break;
diff --git a/tools/qdoc3/htmlgenerator.h b/tools/qdoc3/htmlgenerator.h
index e060257..aad5021 100644
--- a/tools/qdoc3/htmlgenerator.h
+++ b/tools/qdoc3/htmlgenerator.h
@@ -341,6 +341,8 @@ class HtmlGenerator : public PageGenerator
NewClassMaps newClassMaps;
NewClassMaps newQmlClassMaps;
static int id;
+ public:
+ static bool debugging_on;
};
#define HTMLGENERATOR_ADDRESS "address"
diff --git a/tools/qdoc3/test/qt-html-templates.qdocconf b/tools/qdoc3/test/qt-html-templates.qdocconf
index e888bc4..31c9d5a 100644
--- a/tools/qdoc3/test/qt-html-templates.qdocconf
+++ b/tools/qdoc3/test/qt-html-templates.qdocconf
@@ -160,7 +160,7 @@ HTML.footer = " <!-- /div -->\n" \
" <div id=\"feedbackBox\">\n" \
" <div id=\"feedcloseX\" class=\"feedclose t_button\">X</div>\n" \
" <form id=\"feedform\" action=\"http://doc.qt.nokia.com/docFeedbck/feedback.php\" method=\"get\">\n" \
- " <p>Thank you for giving your feedback. <div class=\"note\">Make sure it is related the page. For more general bugs and \n" \
+ " <p id=\"noteHead\">Thank you for giving your feedback. <div class=\"note\">Make sure it is related the page. For more general bugs and \n" \
" requests, please use the <a href=\"http://bugreports.qt.nokia.com/secure/Dashboard.jspa\">Qt Bug Tracker</a></div></p>\n" \
" <p><textarea id=\"feedbox\" name=\"feedText\" rows=\"5\" cols=\"40\"></textarea></p>\n" \
" <p><input id=\"feedsubmit\" class=\"feedclose\" type=\"submit\" name=\"feedback\" /></p>\n" \
diff --git a/tools/qdoc3/tree.cpp b/tools/qdoc3/tree.cpp
index d31de4d..d3de46c 100644
--- a/tools/qdoc3/tree.cpp
+++ b/tools/qdoc3/tree.cpp
@@ -171,7 +171,8 @@ const Node *Tree::findNode(const QStringList &path,
if (node && i == path.size()
&& (!(findFlags & NonFunction) || node->type() != Node::Function
|| ((FunctionNode *)node)->metaness() == FunctionNode::MacroWithoutParams))
- return node;
+ if (node->subType() != Node::QmlPropertyGroup)
+ return node;
relative = relative->parent();
} while (relative);