Menu

Help for refactoring

Help
2010-04-09
2013-05-09
  • Olaf Radicke

    Olaf Radicke - 2010-04-09

    Hi!

    Where in the source code is " tr" defines? For example in "MainAct.cpp":

    mOpenForComboBox->insertItem(tr("View"),VerseAct::MODE_VIEW);

    I cannot find it!

    cu

    Olaf

     
  • Jeremy Erickson

    Jeremy Erickson - 2010-04-10

    It's defined by Qt.  Any class that defines the Q_OBJECT macro can use it, as it's part of the basic QObject class.  That would be why it is not present in my source code - it's just a library call.

    You may have figured out that it's a translation function, like "i18n()" in programs that use GNU gettext.  Right now, since there are no extra translations, it just returns its argument, but with the help of a translation file it can be used to internationalize the program.

     

Log in to post a comment.