Exemple #1
0
QString QDomCommentProto::toString() const
{
  QDomComment *item = qscriptvalue_cast<QDomComment*>(thisObject());
  if (item)
    return QString("[QDomComment(%1)").arg(item->data().left(25));
  return QString("[QDomComment(unknown)]");
}
Exemple #2
0
int QDomCommentProto:: nodeType() const
{
  QDomComment *item = qscriptvalue_cast<QDomComment*>(thisObject());
  if (item)
    return item->nodeType();
  return 0;
}
Exemple #3
0
int TOC::cachedCTime() const
{
    QFile f( m_cacheFile );
    if ( !f.open( QIODevice::ReadOnly ) )
        return 0;

    QDomDocument doc;
    if ( !doc.setContent( &f ) )
        return 0;

    QDomComment timestamp = doc.documentElement().lastChild().toComment();

    return timestamp.data().trimmed().toInt();
}