Ignore:
Timestamp:
May 5, 2011, 5:36:53 AM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/demos/qtdemo/examplecontent.cpp

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    8080{
    8181    QByteArray ba = MenuManager::instance()->getHtml(this->name);
     82    QString errorMsg;
     83    int errorLine, errorColumn;
    8284
    8385    QDomDocument exampleDoc;
    84     exampleDoc.setContent(ba, false);
     86    if (!exampleDoc.setContent(ba, false, &errorMsg, &errorLine, &errorColumn)) {
     87        qDebug() << errorMsg << errorLine << errorColumn;
     88    }
    8589
    8690    QDomNodeList paragraphs = exampleDoc.elementsByTagName("p");
    8791    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?
    9096    for (int p = 0; p < int(paragraphs.length()); ++p) {
    9197        description = this->extractTextFromParagraph(paragraphs.item(p));
     
    100106{
    101107    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);
    103110}
    104111
Note: See TracChangeset for help on using the changeset viewer.