diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-04-26 23:39:07 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-04-26 23:39:07 (GMT) |
commit | 09293f1d07b019dc7bfe95afb93364cc87774e82 (patch) | |
tree | 0bb2e3da34f6ad6898fc079e39e1e94a94da12e2 | |
parent | 0274069a9f6f011a97baf283d556b1fec388b672 (diff) | |
parent | 22c57db236d7cd72ea6c06dfd22c174d81cd8504 (diff) | |
download | Qt-09293f1d07b019dc7bfe95afb93364cc87774e82.zip Qt-09293f1d07b019dc7bfe95afb93364cc87774e82.tar.gz Qt-09293f1d07b019dc7bfe95afb93364cc87774e82.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1:
add translator comment
save a QFile::encodeName()
Don't use QList's begin() and end() where possible.
Ensure we stop the name lookups in QAbstractSocket if we abort().
Don't rely on tryStart() to do job control.
Improved workaround for new qt documentation, base on dboddie's work.
Doc: Fixed typos.
Ensure that all qthelp URLs have paths that start with /qdoc/.
Doc: Fixed the Declarative documentation set. Tweaked the others.
-rw-r--r-- | demos/sqlbrowser/browser.cpp | 2 | ||||
-rw-r--r-- | doc/src/index.qdoc | 2 | ||||
-rw-r--r-- | src/corelib/io/qfsfileengine_unix.cpp | 6 | ||||
-rw-r--r-- | src/corelib/tools/qlist.h | 4 | ||||
-rw-r--r-- | src/gui/kernel/qkeysequence.cpp | 3 | ||||
-rw-r--r-- | src/network/kernel/qhostinfo.cpp | 6 | ||||
-rw-r--r-- | src/network/socket/qabstractsocket.cpp | 4 | ||||
-rw-r--r-- | tools/assistant/tools/assistant/helpviewer.cpp | 10 | ||||
-rw-r--r-- | tools/assistant/tools/assistant/helpviewer.h | 8 | ||||
-rw-r--r-- | tools/assistant/tools/assistant/helpviewer_qwv.cpp | 7 | ||||
-rw-r--r-- | tools/qdoc3/test/qdeclarative.qdocconf | 16 |
11 files changed, 28 insertions, 40 deletions
diff --git a/demos/sqlbrowser/browser.cpp b/demos/sqlbrowser/browser.cpp index 1232428..fe699c7 100644 --- a/demos/sqlbrowser/browser.cpp +++ b/demos/sqlbrowser/browser.cpp @@ -242,6 +242,6 @@ void Browser::updateActions() void Browser::about() { QMessageBox::about(this, tr("About"), tr("The SQL Browser demonstration " - "show how a data browser can be used to visualize the results of SQL" + "shows how a data browser can be used to visualize the results of SQL" "statements on a live database")); } diff --git a/doc/src/index.qdoc b/doc/src/index.qdoc index 2f23e6e..2e6f9bd 100644 --- a/doc/src/index.qdoc +++ b/doc/src/index.qdoc @@ -75,7 +75,7 @@ <li><a href="classes.html">All classes</a></li> <li><a href="namespaces.html">All namespaces</a></li> <li><a href="functions.html">All functions</a></li> - <li><a href="platform-specific.html">Platform support & speciffics</a></li> + <li><a href="platform-specific.html">Platform support & specifics</a></li> </ul> </div> <div class="sectionlist"> diff --git a/src/corelib/io/qfsfileengine_unix.cpp b/src/corelib/io/qfsfileengine_unix.cpp index 1415e44..5762d94 100644 --- a/src/corelib/io/qfsfileengine_unix.cpp +++ b/src/corelib/io/qfsfileengine_unix.cpp @@ -122,7 +122,7 @@ void QFSFileEnginePrivate::setSymbianError(int symbianError, QFile::FileError de Returns the stdlib open string corresponding to a QIODevice::OpenMode. */ -static inline QByteArray openModeToFopenMode(QIODevice::OpenMode flags, const QString &fileName) +static inline QByteArray openModeToFopenMode(QIODevice::OpenMode flags, const QByteArray &fileName) { QByteArray mode; if ((flags & QIODevice::ReadOnly) && !(flags & QIODevice::Truncate)) { @@ -130,7 +130,7 @@ static inline QByteArray openModeToFopenMode(QIODevice::OpenMode flags, const QS if (flags & QIODevice::WriteOnly) { QT_STATBUF statBuf; if (!fileName.isEmpty() - && QT_STAT(QFile::encodeName(fileName), &statBuf) == 0 + && QT_STAT(fileName, &statBuf) == 0 && (statBuf.st_mode & S_IFMT) == S_IFREG) { mode += '+'; } else { @@ -254,7 +254,7 @@ bool QFSFileEnginePrivate::nativeOpen(QIODevice::OpenMode openMode) fh = 0; } else { - QByteArray fopenMode = openModeToFopenMode(openMode, filePath); + QByteArray fopenMode = openModeToFopenMode(openMode, nativeFilePath.constData()); // Try to open the file in buffered mode. do { diff --git a/src/corelib/tools/qlist.h b/src/corelib/tools/qlist.h index 67f63f3..722744c 100644 --- a/src/corelib/tools/qlist.h +++ b/src/corelib/tools/qlist.h @@ -267,9 +267,9 @@ public: inline int count() const { return p.size(); } inline int length() const { return p.size(); } // Same as count() inline T& first() { Q_ASSERT(!isEmpty()); return *begin(); } - inline const T& first() const { Q_ASSERT(!isEmpty()); return *begin(); } + inline const T& first() const { Q_ASSERT(!isEmpty()); return at(0); } T& last() { Q_ASSERT(!isEmpty()); return *(--end()); } - const T& last() const { Q_ASSERT(!isEmpty()); return *(--end()); } + const T& last() const { Q_ASSERT(!isEmpty()); return at(count() - 1); } inline void removeFirst() { Q_ASSERT(!isEmpty()); erase(begin()); } inline void removeLast() { Q_ASSERT(!isEmpty()); erase(--end()); } inline bool startsWith(const T &t) const { return !isEmpty() && first() == t; } diff --git a/src/gui/kernel/qkeysequence.cpp b/src/gui/kernel/qkeysequence.cpp index 9efcc4e..931bc33 100644 --- a/src/gui/kernel/qkeysequence.cpp +++ b/src/gui/kernel/qkeysequence.cpp @@ -390,6 +390,9 @@ static const struct { int key; const char* name; } keyname[] = { + //: This and all following "incomprehensible" strings in QShortcut context + //: are key names. Please use the localized names appearing on actual + //: keyboards or whatever is commonly used. { Qt::Key_Space, QT_TRANSLATE_NOOP("QShortcut", "Space") }, { Qt::Key_Escape, QT_TRANSLATE_NOOP("QShortcut", "Esc") }, { Qt::Key_Tab, QT_TRANSLATE_NOOP("QShortcut", "Tab") }, diff --git a/src/network/kernel/qhostinfo.cpp b/src/network/kernel/qhostinfo.cpp index 7e006e0..f287630 100644 --- a/src/network/kernel/qhostinfo.cpp +++ b/src/network/kernel/qhostinfo.cpp @@ -565,13 +565,11 @@ void QHostInfoLookupManager::work() } } - if (scheduled && threadPool.tryStart(scheduled)) { + if (scheduled && currentLookups.size() < threadPool.maxThreadCount()) { // runnable now running in new thread, track this in currentLookups + threadPool.start(scheduled); iterator.remove(); currentLookups.append(scheduled); - } else if (scheduled) { - // wanted to start, but could not because thread pool is busy - break; } else { // was postponed, continue iterating continue; diff --git a/src/network/socket/qabstractsocket.cpp b/src/network/socket/qabstractsocket.cpp index 21cd0fd..b604e89 100644 --- a/src/network/socket/qabstractsocket.cpp +++ b/src/network/socket/qabstractsocket.cpp @@ -2382,6 +2382,10 @@ void QAbstractSocket::disconnectFromHostImplementation() #if defined(QABSTRACTSOCKET_DEBUG) qDebug("QAbstractSocket::disconnectFromHost() aborting immediately"); #endif + if (d->state == HostLookupState) { + QHostInfo::abortHostLookup(d->hostLookupId); + d->hostLookupId = -1; + } } else { // Perhaps emit closing() if (d->state != ClosingState) { diff --git a/tools/assistant/tools/assistant/helpviewer.cpp b/tools/assistant/tools/assistant/helpviewer.cpp index 22b3f30..6499139 100644 --- a/tools/assistant/tools/assistant/helpviewer.cpp +++ b/tools/assistant/tools/assistant/helpviewer.cpp @@ -52,17 +52,15 @@ QT_BEGIN_NAMESPACE -QString AbstractHelpViewer::DocPath = QString::fromLatin1("qthelp://com." - "trolltech.qt.%1/").arg(QString(QLatin1String(QT_VERSION_STR)) - .replace(QLatin1String("."), QLatin1String(""))); +const QLatin1String AbstractHelpViewer::DocPath("qthelp://com.trolltech."); -QString AbstractHelpViewer::AboutBlank = +const QString AbstractHelpViewer::AboutBlank = QCoreApplication::translate("HelpViewer", "<title>about:blank</title>"); -QString AbstractHelpViewer::LocalHelpFile = QLatin1String("qthelp://" +const QString AbstractHelpViewer::LocalHelpFile = QLatin1String("qthelp://" "com.trolltech.com.assistantinternal-1.0.0/assistant/assistant.html"); -QString AbstractHelpViewer::PageNotFoundMessage = +const QString AbstractHelpViewer::PageNotFoundMessage = QCoreApplication::translate("HelpViewer", "<title>Error 404...</title><div " "align=\"center\"><br><br><h1>The page could not be found</h1><br><h3>'%1'" "</h3></div>"); diff --git a/tools/assistant/tools/assistant/helpviewer.h b/tools/assistant/tools/assistant/helpviewer.h index 80a6f87..def9418 100644 --- a/tools/assistant/tools/assistant/helpviewer.h +++ b/tools/assistant/tools/assistant/helpviewer.h @@ -67,10 +67,10 @@ public: virtual bool handleForwardBackwardMouseButtons(QMouseEvent *e) = 0; - static QString DocPath; - static QString AboutBlank; - static QString LocalHelpFile; - static QString PageNotFoundMessage; + static const QLatin1String DocPath; + static const QString AboutBlank; + static const QString LocalHelpFile; + static const QString PageNotFoundMessage; static bool isLocalUrl(const QUrl &url); static bool canOpenPage(const QString &url); diff --git a/tools/assistant/tools/assistant/helpviewer_qwv.cpp b/tools/assistant/tools/assistant/helpviewer_qwv.cpp index a19b29a..adaa45b 100644 --- a/tools/assistant/tools/assistant/helpviewer_qwv.cpp +++ b/tools/assistant/tools/assistant/helpviewer_qwv.cpp @@ -139,9 +139,10 @@ QNetworkReply *HelpNetworkAccessManager::createRequest(Operation /*op*/, // the virtual folder if (!helpEngine.findFile(url).isValid()) { if (url.startsWith(AbstractHelpViewer::DocPath)) { - if (!url.startsWith(AbstractHelpViewer::DocPath + QLatin1String("qdoc/"))) { - url = url.replace(AbstractHelpViewer::DocPath, - AbstractHelpViewer::DocPath + QLatin1String("qdoc/")); + QUrl newUrl = request.url(); + if (!newUrl.path().startsWith(QLatin1String("/qdoc/"))) { + newUrl.setPath(QLatin1String("qdoc") + newUrl.path()); + url = newUrl.toString(); } } } diff --git a/tools/qdoc3/test/qdeclarative.qdocconf b/tools/qdoc3/test/qdeclarative.qdocconf index 125a410..80050e3 100644 --- a/tools/qdoc3/test/qdeclarative.qdocconf +++ b/tools/qdoc3/test/qdeclarative.qdocconf @@ -100,19 +100,3 @@ imagedirs = $QT_SOURCE_TREE/doc/src/images \ outputdir = $QT_BUILD_TREE/doc-build/html-qml tagfile = $QT_BUILD_TREE/doc-build/html-qml/qt.tags base = file:$QT_BUILD_TREE/doc/html-qml - -HTML.stylesheets = classic.css - -HTML.postheader = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n" \ - "<tr>\n" \ - "<td align=\"left\" valign=\"top\">" \ - "<img src=\"images/qt-logo.png\" align=\"left\" border=\"0\"/>" \ - "</td>\n" \ - "<td width=\"1\"> </td>" \ - "<td class=\"postheader\" valign=\"center\" align=\"left\">" \ - "<a href=\"qmlreference.html\">" \ - "<font color=\"#004faf\">Home</font></a> ·" \ - " <a href=\"qmlelements.html\">" \ - "<font color=\"#004faf\">Elements</font></a>" \ - "</td>\n" \ - "</tr></table>" |