Esempio n. 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";
        }
    }
}
Esempio 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";
        }
    }
}
Esempio n. 3
0
File: ts.cpp Progetto: 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;
}