diff options
author | Sergio Ahumada <sergio.ahumada@nokia.com> | 2011-08-31 11:54:04 (GMT) |
---|---|---|
committer | Sergio Ahumada <sergio.ahumada@nokia.com> | 2011-08-31 11:54:04 (GMT) |
commit | 9f51c31a0f492c20e6d882b2ae1e036b29c2755c (patch) | |
tree | cbb3beed71735514632b4f2788b63e72667cfc04 /tools | |
parent | 0e10b8dbb7d84694cbdeb57bf42df52b12d79f47 (diff) | |
parent | 4f933036a0ecbc6e6174b312ec2fd6078cea5b70 (diff) | |
download | Qt-9f51c31a0f492c20e6d882b2ae1e036b29c2755c.zip Qt-9f51c31a0f492c20e6d882b2ae1e036b29c2755c.tar.gz Qt-9f51c31a0f492c20e6d882b2ae1e036b29c2755c.tar.bz2 |
Merge remote-tracking branch 'upstream/4.8' into qt-4.8-from-4.7
Conflicts:
src/network/ssl/qsslcertificate.cpp
Diffstat (limited to 'tools')
36 files changed, 77 insertions, 115 deletions
diff --git a/tools/designer/src/plugins/plugins.pro b/tools/designer/src/plugins/plugins.pro index bcebb82..64763a9 100644 --- a/tools/designer/src/plugins/plugins.pro +++ b/tools/designer/src/plugins/plugins.pro @@ -3,7 +3,7 @@ CONFIG += ordered REQUIRES = !CONFIG(static,shared|static) contains(QT_CONFIG, qt3support): SUBDIRS += widgets -win32: SUBDIRS += activeqt +win32:!win32-g++*: SUBDIRS += activeqt # contains(QT_CONFIG, opengl): SUBDIRS += tools/view3d contains(QT_CONFIG, webkit): SUBDIRS += qwebview contains(QT_CONFIG, phonon): SUBDIRS += phononwidgets diff --git a/tools/macdeployqt/shared/shared.cpp b/tools/macdeployqt/shared/shared.cpp index 1a9a6ab..156f1de 100644 --- a/tools/macdeployqt/shared/shared.cpp +++ b/tools/macdeployqt/shared/shared.cpp @@ -127,7 +127,7 @@ FrameworkInfo parseOtoolLibraryLine(const QString &line, bool useDebugLibs) while (part < parts.count()) { const QString currentPart = parts.at(part).simplified() ; ++part; - if (currentPart == "") + if (currentPart.isEmpty()) continue; if (state == QtPath) { diff --git a/tools/macdeployqt/tests/tst_deployment_mac.cpp b/tools/macdeployqt/tests/tst_deployment_mac.cpp index 858dc45..5921199 100644 --- a/tools/macdeployqt/tests/tst_deployment_mac.cpp +++ b/tools/macdeployqt/tests/tst_deployment_mac.cpp @@ -230,4 +230,4 @@ void tst_deployment_mac::testFindAppBinarty() QTEST_MAIN(tst_deployment_mac) -#include "tst_deployment_mac.moc"
\ No newline at end of file +#include "tst_deployment_mac.moc" diff --git a/tools/qdoc3/cppcodemarker.cpp b/tools/qdoc3/cppcodemarker.cpp index 585d6ce..3617be6 100644 --- a/tools/qdoc3/cppcodemarker.cpp +++ b/tools/qdoc3/cppcodemarker.cpp @@ -878,26 +878,6 @@ static const char * const keywordTable[] = { "signals", "slots", "emit", 0 }; -static QString untabified(const QString &in) -{ - QString res; - int col = 0; - int i = 0; - - for (; i < (int) in.length(); i++) { - if (in[i] == QChar('\t')) { - res += QString(" " + (col & 0x7)); - col = (col + 8) & ~0x7; - } else { - res += in[i]; - if (in[i] == QChar('\n')) - col = 0; - } - } - - return res; -} - /* @char @class diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index 64f12d6..840761c 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -2101,9 +2101,10 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark generateSince(qcn, marker); enterSection("h2","Detailed Description"); generateBody(qcn, marker); - if (cn) + if (cn) { generateQmlText(cn->doc().body(), cn, marker, qcn->name()); - generateAlsoList(cn, marker); + generateAlsoList(cn, marker); + } leaveSection(); leaveSection(); // </apiDesc> diff --git a/tools/qdoc3/doc/config/images/arrow_down.png b/tools/qdoc3/doc/config/images/arrow_down.png Binary files differnew file mode 100644 index 0000000..9d01e97 --- /dev/null +++ b/tools/qdoc3/doc/config/images/arrow_down.png diff --git a/tools/qdoc3/doc/config/images/bg_l.png b/tools/qdoc3/doc/config/images/bg_l.png Binary files differnew file mode 100755 index 0000000..90b1da1 --- /dev/null +++ b/tools/qdoc3/doc/config/images/bg_l.png diff --git a/tools/qdoc3/doc/config/images/bg_l_blank.png b/tools/qdoc3/doc/config/images/bg_l_blank.png Binary files differnew file mode 100755 index 0000000..5a9673d --- /dev/null +++ b/tools/qdoc3/doc/config/images/bg_l_blank.png diff --git a/tools/qdoc3/doc/config/images/bg_ll_blank.png b/tools/qdoc3/doc/config/images/bg_ll_blank.png Binary files differnew file mode 100644 index 0000000..95a1c45 --- /dev/null +++ b/tools/qdoc3/doc/config/images/bg_ll_blank.png diff --git a/tools/qdoc3/doc/config/images/bg_r.png b/tools/qdoc3/doc/config/images/bg_r.png Binary files differnew file mode 100755 index 0000000..f0fb121 --- /dev/null +++ b/tools/qdoc3/doc/config/images/bg_r.png diff --git a/tools/qdoc3/doc/config/images/bg_ul_blank.png b/tools/qdoc3/doc/config/images/bg_ul_blank.png Binary files differnew file mode 100644 index 0000000..7051261 --- /dev/null +++ b/tools/qdoc3/doc/config/images/bg_ul_blank.png diff --git a/tools/qdoc3/doc/config/images/box_bg.png b/tools/qdoc3/doc/config/images/box_bg.png Binary files differnew file mode 100755 index 0000000..3322f92 --- /dev/null +++ b/tools/qdoc3/doc/config/images/box_bg.png diff --git a/tools/qdoc3/doc/config/images/breadcrumb.png b/tools/qdoc3/doc/config/images/breadcrumb.png Binary files differnew file mode 100755 index 0000000..0ded551 --- /dev/null +++ b/tools/qdoc3/doc/config/images/breadcrumb.png diff --git a/tools/qdoc3/doc/config/images/bullet_dn.png b/tools/qdoc3/doc/config/images/bullet_dn.png Binary files differnew file mode 100644 index 0000000..f776247 --- /dev/null +++ b/tools/qdoc3/doc/config/images/bullet_dn.png diff --git a/tools/qdoc3/doc/config/images/bullet_gt.png b/tools/qdoc3/doc/config/images/bullet_gt.png Binary files differnew file mode 100755 index 0000000..7561b4e --- /dev/null +++ b/tools/qdoc3/doc/config/images/bullet_gt.png diff --git a/tools/qdoc3/doc/config/images/bullet_sq.png b/tools/qdoc3/doc/config/images/bullet_sq.png Binary files differnew file mode 100755 index 0000000..a84845e --- /dev/null +++ b/tools/qdoc3/doc/config/images/bullet_sq.png diff --git a/tools/qdoc3/doc/config/images/bullet_up.png b/tools/qdoc3/doc/config/images/bullet_up.png Binary files differnew file mode 100644 index 0000000..7de2f06 --- /dev/null +++ b/tools/qdoc3/doc/config/images/bullet_up.png diff --git a/tools/qdoc3/doc/config/images/feedbackground.png b/tools/qdoc3/doc/config/images/feedbackground.png Binary files differnew file mode 100755 index 0000000..3a38d99 --- /dev/null +++ b/tools/qdoc3/doc/config/images/feedbackground.png diff --git a/tools/qdoc3/doc/config/images/header_bg.png b/tools/qdoc3/doc/config/images/header_bg.png Binary files differnew file mode 100644 index 0000000..a436aa6 --- /dev/null +++ b/tools/qdoc3/doc/config/images/header_bg.png diff --git a/tools/qdoc3/doc/config/images/horBar.png b/tools/qdoc3/doc/config/images/horBar.png Binary files differnew file mode 100755 index 0000000..100fe91 --- /dev/null +++ b/tools/qdoc3/doc/config/images/horBar.png diff --git a/tools/qdoc3/doc/config/images/page.png b/tools/qdoc3/doc/config/images/page.png Binary files differnew file mode 100644 index 0000000..1db151b --- /dev/null +++ b/tools/qdoc3/doc/config/images/page.png diff --git a/tools/qdoc3/doc/config/images/page_bg.png b/tools/qdoc3/doc/config/images/page_bg.png Binary files differnew file mode 100755 index 0000000..9b3bd99 --- /dev/null +++ b/tools/qdoc3/doc/config/images/page_bg.png diff --git a/tools/qdoc3/doc/config/images/spinner.gif b/tools/qdoc3/doc/config/images/spinner.gif Binary files differnew file mode 100644 index 0000000..1ed786f --- /dev/null +++ b/tools/qdoc3/doc/config/images/spinner.gif diff --git a/tools/qdoc3/doc/config/images/sprites-combined.png b/tools/qdoc3/doc/config/images/sprites-combined.png Binary files differnew file mode 100755 index 0000000..3a48b21 --- /dev/null +++ b/tools/qdoc3/doc/config/images/sprites-combined.png diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp index 189c28f..4fc8946 100644 --- a/tools/qdoc3/node.cpp +++ b/tools/qdoc3/node.cpp @@ -1694,37 +1694,6 @@ bool QmlPropertyNode::fromTrool(Trool troolean, bool defaultValue) } } -static QString valueType(const QString &n) -{ - if (n == "QPoint") - return "QDeclarativePointValueType"; - if (n == "QPointF") - return "QDeclarativePointFValueType"; - if (n == "QSize") - return "QDeclarativeSizeValueType"; - if (n == "QSizeF") - return "QDeclarativeSizeFValueType"; - if (n == "QRect") - return "QDeclarativeRectValueType"; - if (n == "QRectF") - return "QDeclarativeRectFValueType"; - if (n == "QVector2D") - return "QDeclarativeVector2DValueType"; - if (n == "QVector3D") - return "QDeclarativeVector3DValueType"; - if (n == "QVector4D") - return "QDeclarativeVector4DValueType"; - if (n == "QQuaternion") - return "QDeclarativeQuaternionValueType"; - if (n == "QMatrix4x4") - return "QDeclarativeMatrix4x4ValueType"; - if (n == "QEasingCurve") - return "QDeclarativeEasingValueType"; - if (n == "QFont") - return "QDeclarativeFontValueType"; - return QString(); -} - /*! Returns true if a QML property or attached property is read-only. The algorithm for figuring this out is long diff --git a/tools/qdoc3/puredocparser.cpp b/tools/qdoc3/puredocparser.cpp index c7db1bf..0f21cbc 100644 --- a/tools/qdoc3/puredocparser.cpp +++ b/tools/qdoc3/puredocparser.cpp @@ -55,6 +55,11 @@ PureDocParser::~PureDocParser() { } +QString PureDocParser::language() +{ + return "qdoc"; +} + QStringList PureDocParser::sourceFileNameFilter() { return QStringList("*.qdoc"); diff --git a/tools/qdoc3/puredocparser.h b/tools/qdoc3/puredocparser.h index 7f0434d..814c829 100644 --- a/tools/qdoc3/puredocparser.h +++ b/tools/qdoc3/puredocparser.h @@ -64,6 +64,7 @@ public: PureDocParser(); virtual ~PureDocParser(); + virtual QString language(); virtual QStringList sourceFileNameFilter(); }; diff --git a/tools/qdoc3/qmlvisitor.cpp b/tools/qdoc3/qmlvisitor.cpp index 98e188d..a8886de 100644 --- a/tools/qdoc3/qmlvisitor.cpp +++ b/tools/qdoc3/qmlvisitor.cpp @@ -69,18 +69,30 @@ QmlDocVisitor::~QmlDocVisitor() QDeclarativeJS::AST::SourceLocation QmlDocVisitor::precedingComment(quint32 offset) const { - QDeclarativeJS::AST::SourceLocation currentLoc; + QListIterator<QDeclarativeJS::AST::SourceLocation> it(engine->comments()); + it.toBack(); - foreach (const QDeclarativeJS::AST::SourceLocation &loc, engine->comments()) { - if (loc.begin() >= offset) + while (it.hasPrevious()) { + + QDeclarativeJS::AST::SourceLocation loc = it.previous(); + + if (loc.begin() <= lastEndOffset) + // Return if we reach the end of the preceding structure. break; - else if (loc.begin() > lastEndOffset && loc.end() < offset) - currentLoc = loc; - } - if (currentLoc.isValid()) { - QString comment = document.mid(currentLoc.offset, currentLoc.length); - if (comment.startsWith("!") || comment.startsWith("*")) - return currentLoc; + + else if (usedComments.contains(loc.begin())) + // Return if we encounter a previously used comment. + break; + + else if (loc.begin() > lastEndOffset && loc.end() < offset) { + + // Only examine multiline comments in order to avoid snippet markers. + if (document.mid(loc.offset - 1, 1) == "*") { + QString comment = document.mid(loc.offset, loc.length); + if (comment.startsWith("!") || comment.startsWith("*")) + return loc; + } + } } return QDeclarativeJS::AST::SourceLocation(); @@ -93,20 +105,18 @@ void QmlDocVisitor::applyDocumentation(QDeclarativeJS::AST::SourceLocation locat if (loc.isValid()) { QString source = document.mid(loc.offset, loc.length); - if (source.startsWith(QLatin1String("!")) || - (source.startsWith(QLatin1String("*")) && - source[1] != QLatin1Char('*'))) { - - Location start(filePath); - start.setLineNo(loc.startLine); - start.setColumnNo(loc.startColumn); - Location finish(filePath); - finish.setLineNo(loc.startLine); - finish.setColumnNo(loc.startColumn); - - Doc doc(start, finish, source.mid(1), commands); - node->setDoc(doc); - } + + Location start(filePath); + start.setLineNo(loc.startLine); + start.setColumnNo(loc.startColumn); + Location finish(filePath); + finish.setLineNo(loc.startLine); + finish.setColumnNo(loc.startColumn); + + Doc doc(start, finish, source.mid(1), commands); + node->setDoc(doc); + + usedComments.insert(loc.offset); } } @@ -152,6 +162,11 @@ bool QmlDocVisitor::visit(QDeclarativeJS::AST::UiImportList *imports) return true; } +void QmlDocVisitor::endVisit(QDeclarativeJS::AST::UiImportList *definition) +{ + lastEndOffset = definition->lastSourceLocation().end(); +} + /*! Visits public member declarations, such as signals and properties. These only include custom signals and properties. diff --git a/tools/qdoc3/qmlvisitor.h b/tools/qdoc3/qmlvisitor.h index 1d3a401..28821a9 100644 --- a/tools/qdoc3/qmlvisitor.h +++ b/tools/qdoc3/qmlvisitor.h @@ -57,6 +57,7 @@ public: virtual ~QmlDocVisitor(); bool visit(QDeclarativeJS::AST::UiImportList *imports); + void endVisit(QDeclarativeJS::AST::UiImportList *definition); bool visit(QDeclarativeJS::AST::UiObjectDefinition *definition); void endVisit(QDeclarativeJS::AST::UiObjectDefinition *definition); @@ -77,6 +78,7 @@ private: QString document; QList<QPair<QString, QString> > importList; QSet<QString> commands; + QSet<quint32> usedComments; Tree *tree; InnerNode *current; }; diff --git a/tools/qdoc3/test/qt-cpp-ignore.qdocconf b/tools/qdoc3/test/qt-cpp-ignore.qdocconf index 044eef4..5b41ae3 100644 --- a/tools/qdoc3/test/qt-cpp-ignore.qdocconf +++ b/tools/qdoc3/test/qt-cpp-ignore.qdocconf @@ -73,7 +73,8 @@ Cpp.ignoretokens = QAXFACTORY_EXPORT \ Q_DECLARATIVE_EXPORT \ Q_GADGET \ QWEBKIT_EXPORT \ - Q_INVOKABLE + Q_INVOKABLE \ + Q_DECL_CONSTEXPR Cpp.ignoredirectives = Q_DECLARE_HANDLE \ Q_DECLARE_INTERFACE \ Q_DECLARE_METATYPE \ diff --git a/tools/qdoc3/test/qt-html-templates-online.qdocconf b/tools/qdoc3/test/qt-html-templates-online.qdocconf index 03ed6fa..3584b68 100644 --- a/tools/qdoc3/test/qt-html-templates-online.qdocconf +++ b/tools/qdoc3/test/qt-html-templates-online.qdocconf @@ -181,16 +181,4 @@ HTML.footer = \ " <div id=\"blurpage\">\n" \ " </div>\n" \ "\n" \ - " <script src=\"scripts/functions.js\" type=\"text/javascript\"></script>\n" \ - " <script type=\"text/javascript\">\n" \ - " var _gaq = _gaq || [];\n" \ - " _gaq.push(['_setAccount', 'UA-4457116-5']);\n" \ - " _gaq.push(['_trackPageview']);\n" \ - " (function() {\n" \ - " var ga = document.createElement('script'); " \ - "ga.type = 'text/javascript'; ga.async = true;\n" \ - " ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + " \ - "'.google-analytics.com/ga.js';\n" \ - " var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);\n" \ - " })();\n" \ - " </script>\n" + " <script src=\"scripts/functions.js\" type=\"text/javascript\"></script>\n" diff --git a/tools/qdoc3/test/qt-project.qdocconf b/tools/qdoc3/test/qt-project.qdocconf index fca6545..57bf797 100644 --- a/tools/qdoc3/test/qt-project.qdocconf +++ b/tools/qdoc3/test/qt-project.qdocconf @@ -105,7 +105,7 @@ exampledirs = $QT_SOURCE_TREE/doc/src \ $QT_SOURCE_TREE/examples/tutorials \ $QT_SOURCE_TREE \ $QT_SOURCE_TREE/qmake/examples \ - $QT_SOURCE_TREE/src/3rdparty/webkit/WebKit/qt/docs + $QT_SOURCE_TREE/src/3rdparty/webkit/Source/WebKit/qt/docs imagedirs = $QT_SOURCE_TREE/doc/src/images \ $QT_SOURCE_TREE/examples \ $QT_SOURCE_TREE/doc/src/declarative/pics \ diff --git a/tools/qtconcurrent/codegenerator/src/codegenerator.cpp b/tools/qtconcurrent/codegenerator/src/codegenerator.cpp index b8436b9..c81fe97 100644 --- a/tools/qtconcurrent/codegenerator/src/codegenerator.cpp +++ b/tools/qtconcurrent/codegenerator/src/codegenerator.cpp @@ -134,7 +134,7 @@ const Compound operator+(const Item &a, const char * const text) const Compound operator+(const char * const text, const Item &b) { - return Compound(Text(text), b); + return Compound(Text(text), b); } -}
\ No newline at end of file +} diff --git a/tools/qtestlib/wince/cetest/deployment.h b/tools/qtestlib/wince/cetest/deployment.h index f3645e0..a5ef32d 100644 --- a/tools/qtestlib/wince/cetest/deployment.h +++ b/tools/qtestlib/wince/cetest/deployment.h @@ -72,4 +72,4 @@ private: inline void DeploymentHandler::setConnection(AbstractRemoteConnection *connection) { m_connection = connection; } inline AbstractRemoteConnection* DeploymentHandler::connection() const { return m_connection; } -#endif
\ No newline at end of file +#endif diff --git a/tools/runonphone/main.cpp b/tools/runonphone/main.cpp index 868a2a8..af349eb 100644 --- a/tools/runonphone/main.cpp +++ b/tools/runonphone/main.cpp @@ -65,7 +65,7 @@ void printUsage(QTextStream& outstream, QString exeName) << "-t, --timeout <milliseconds> terminate test if timeout occurs" << endl << "-v, --verbose show debugging output" << endl << "-q, --quiet hide progress messages" << endl - << "-u, --upload <local file> upload executable file to phone" << endl + << "-u, --upload <local file> <remote file> upload file to phone" << endl << "-d, --download <remote file> <local file> copy file from phone to PC after running test" << endl << "--nocrashlog Don't capture call stack if test crashes" << endl << "--crashlogpath <dir> Path to save crash logs (default=working dir)" << endl @@ -91,6 +91,7 @@ int main(int argc, char *argv[]) QTextStream outstream(stdout); QTextStream errstream(stderr); QString uploadLocalFile; + QString uploadRemoteFile; QString downloadRemoteFile; QString downloadLocalFile; int loglevel=1; @@ -127,10 +128,8 @@ int main(int argc, char *argv[]) errstream << "Executable file (" << uploadLocalFile << ") doesn't exist" << endl; return 1; } - if (!(QFileInfo(uploadLocalFile).suffix() == "exe")) { - errstream << "File (" << uploadLocalFile << ") must be an executable" << endl; - return 1; - } + CHECK_PARAMETER_EXISTS + uploadRemoteFile = it.next(); } else if (arg == "--download" || arg == "-d") { CHECK_PARAMETER_EXISTS @@ -174,7 +173,8 @@ int main(int argc, char *argv[]) } } - if (exeFile.isEmpty() && sisFile.isEmpty() && uploadLocalFile.isEmpty() && + if (exeFile.isEmpty() && sisFile.isEmpty() && + (uploadLocalFile.isEmpty() || uploadRemoteFile.isEmpty()) && (downloadLocalFile.isEmpty() || downloadRemoteFile.isEmpty())) { printUsage(outstream, args[0]); return 1; @@ -230,8 +230,7 @@ int main(int argc, char *argv[]) } else if (!uploadLocalFile.isEmpty() && uploadInfo.exists()) { codaHandler.setActionType(ActionCopy); - QString dstName = QString("c:\\sys\\bin\\") + uploadInfo.fileName(); - codaHandler.setCopyFileName(uploadLocalFile, dstName); + codaHandler.setCopyFileName(uploadLocalFile, uploadRemoteFile); } if (!exeFile.isEmpty()) { codaHandler.setActionType(ActionRun); @@ -254,19 +253,20 @@ int main(int argc, char *argv[]) } else { launcher.reset(new trk::Launcher(trk::Launcher::ActionPingOnly)); + QStringList srcNames, dstNames; if (!sisFile.isEmpty()) { launcher->addStartupActions(trk::Launcher::ActionCopyInstall); - QStringList srcName(sisFile); - QStringList dstName("c:\\data\\testtemp.sis"); - launcher->setCopyFileNames(srcName, dstName); - launcher->setInstallFileNames(dstName); + srcNames.append(sisFile); + QLatin1String dstName("c:\\data\\testtemp.sis"); + dstNames.append(dstName); + launcher->setInstallFileNames(QStringList(dstName)); } - else if (!uploadLocalFile.isEmpty() && uploadInfo.exists()) { + if (!uploadLocalFile.isEmpty() && uploadInfo.exists()) { launcher->addStartupActions(trk::Launcher::ActionCopy); - QStringList srcName(uploadLocalFile); - QStringList dstName(QString("c:\\sys\\bin\\") + uploadInfo.fileName()); - launcher->setCopyFileNames(srcName, dstName); + srcNames.append(uploadLocalFile); + dstNames.append(uploadRemoteFile); } + launcher->setCopyFileNames(srcNames, dstNames); if (!exeFile.isEmpty()) { launcher->addStartupActions(trk::Launcher::ActionRun); launcher->setFileName(QString("c:\\sys\\bin\\") + info.fileName()); diff --git a/tools/tools.pro b/tools/tools.pro index 7eecebd..b23df4b 100644 --- a/tools/tools.pro +++ b/tools/tools.pro @@ -21,7 +21,7 @@ TEMPLATE = subdirs } } unix:!symbian:!mac:!embedded:!qpa:SUBDIRS += qtconfig - win32:!wince*:SUBDIRS += activeqt + win32:!wince*:!win32-g++*:SUBDIRS += activeqt } contains(QT_CONFIG, declarative) { SUBDIRS += qml |