예제 #1
0
static void writeExtras(QTextStream &t, const char *indent,
                        const TranslatorMessage::ExtraData &extras, const QRegExp &drops)
{
    for (Translator::ExtraData::ConstIterator it = extras.begin(); it != extras.end(); ++it) {
        if (!drops.exactMatch(it.key())) {
            t << indent << "<extra-" << it.key() << '>'
              << protect(it.value())
              << "</extra-" << it.key() << ">\n";
        }
    }
}
예제 #2
0
static void writeExtras(QTextStream &ts, int indent,
                        const TranslatorMessage::ExtraData &extras, const QRegExp &drops)
{
    for (Translator::ExtraData::ConstIterator it = extras.begin(); it != extras.end(); ++it) {
        if (!drops.exactMatch(it.key())) {
            writeIndent(ts, indent);
            ts << "<trolltech:" << it.key() << '>'
               << protect(it.value())
               << "</trolltech:" << it.key() << ">\n";
        }
    }
}
예제 #3
0
파일: ts.cpp 프로젝트: RobinWuDev/Qt
static void writeExtras(QTextStream &t, const char *indent,
                        const TranslatorMessage::ExtraData &extras, QRegExp drops)
{
    QStringList outs;
    for (Translator::ExtraData::ConstIterator it = extras.begin(); it != extras.end(); ++it) {
        if (!drops.exactMatch(it.key())) {
            outs << (QStringLiteral("<extra-") + it.key() + QLatin1Char('>')
                     + protect(it.value())
                     + QStringLiteral("</extra-") + it.key() + QLatin1Char('>'));
        }
    }
    outs.sort();
    foreach (const QString &out, outs)
        t << indent << out << endl;
}