Changeset 846 for trunk/demos/qtdemo/examplecontent.cpp
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/demos/qtdemo/examplecontent.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 80 80 { 81 81 QByteArray ba = MenuManager::instance()->getHtml(this->name); 82 QString errorMsg; 83 int errorLine, errorColumn; 82 84 83 85 QDomDocument exampleDoc; 84 exampleDoc.setContent(ba, false); 86 if (!exampleDoc.setContent(ba, false, &errorMsg, &errorLine, &errorColumn)) { 87 qDebug() << errorMsg << errorLine << errorColumn; 88 } 85 89 86 90 QDomNodeList paragraphs = exampleDoc.elementsByTagName("p"); 87 91 if (paragraphs.length() < 1 && Colors::verbose) 88 qDebug() << "- ExampleContent::loadDescription(): Could not load description:" << MenuManager::instance()->info[this->name]["docfile"]; 89 QString description = Colors::contentColor + QLatin1String("Could not load description. Ensure that the documentation for Qt is built."); 92 qDebug() << "- ExampleContent::loadDescription(): Could not load description:" 93 << MenuManager::instance()->info[this->name]["docfile"]; 94 QString description = Colors::contentColor + QLatin1String(""); 95 //QLatin1String("Could not load description. Ensure that the documentation for Qt is built."); // QTBUG-12522: If there is no description why show an error to the user when qDebug above communications the issue (if it is indeed an issue at all) when demos are built? 90 96 for (int p = 0; p < int(paragraphs.length()); ++p) { 91 97 description = this->extractTextFromParagraph(paragraphs.item(p)); … … 100 106 { 101 107 return (!text.contains("[") && 102 text.indexOf(QRegExp(QString("(In )?((The|This) )?(%1 )?.*(tutorial|example|demo|application)").arg(this->name), Qt::CaseInsensitive)) != -1); 108 text.indexOf(QRegExp(QString("(In )?((The|This) )?(%1 )?.*(tutorial|example|demo|application)").arg(this->name), 109 Qt::CaseInsensitive)) != -1); 103 110 } 104 111
Note:
See TracChangeset
for help on using the changeset viewer.