Hi all,

I'm trying to add internationalization to my app, and I found that this:
DEFINES += QT_NO_CAST_FROM_ASCII
can be added to .pro file to ensure that no string is omitted from tr function.

However, I'm using XML's inside my app, to communicate with server, and these 
xml's should not be translated, I mean I have code like this:

QDomDocument Helper::createBasicXml(QString type,QString moduleName) {
    QDomDocument xml;
    QDomElement update=xml.createElement(type);
    xml.appendChild(update);
    QDomElement module=xml.createElement("module");
    module.setAttribute("name",moduleName);
    update.appendChild(module);
    return xml;
}
And there are also setProperty calls and many others that should not be 
translated.

is there some trick to have this QT_NO_CAST_FROM_ASCII in .pro file and also 
some strings like "module" "name" not being translated by Qt ?

I have found:
#undef QT_NO_CAST_FROM_ASCII
#define QT_NO_CAST_FROM_ASCII
but it appears that this does not work in my code, I mean there are still 
errors that:
QString::QString(const char*)' is private
between undef and define

best regards
Marek
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to