Hi, this patch makes Qt strings translateable again (at least when using scons).
Can I commit? Michael
Index: src/frontends/qt4/QERTDialog.h =================================================================== --- src/frontends/qt4/QERTDialog.h (Revision 15770) +++ src/frontends/qt4/QERTDialog.h (Arbeitskopie) @@ -12,6 +12,7 @@ #ifndef QERTDIALOG_H #define QERTDIALOG_H +#include "qt_helpers.h" #include "ui/QERTUi.h" #include <QCloseEvent> Index: src/frontends/qt4/QNomenclDialog.h =================================================================== --- src/frontends/qt4/QNomenclDialog.h (Revision 15770) +++ src/frontends/qt4/QNomenclDialog.h (Arbeitskopie) @@ -13,6 +13,7 @@ #ifndef QNOMENCLDIALOG_H #define QNOMENCLDIALOG_H +#include "qt_helpers.h" #include "ui/QNomenclUi.h" #include <QDialog> Index: src/frontends/qt4/QViewSourceDialog.h =================================================================== --- src/frontends/qt4/QViewSourceDialog.h (Revision 15770) +++ src/frontends/qt4/QViewSourceDialog.h (Arbeitskopie) @@ -13,6 +13,7 @@ #ifndef QVIEWSOURCEDIALOG_H #define QVIEWSOURCEDIALOG_H +#include "qt_helpers.h" #include "ui/QViewSourceUi.h" namespace lyx { Index: src/frontends/qt4/qt_helpers.C =================================================================== --- src/frontends/qt4/qt_helpers.C (Revision 15770) +++ src/frontends/qt4/qt_helpers.C (Arbeitskopie) @@ -155,7 +155,7 @@ } -QString const qt_(char const * str) +QString const qt_(char const * str, int) { return toqstr(_(str)); } Index: src/frontends/qt4/QURLDialog.h =================================================================== --- src/frontends/qt4/QURLDialog.h (Revision 15770) +++ src/frontends/qt4/QURLDialog.h (Arbeitskopie) @@ -12,6 +12,7 @@ #ifndef QURLDIALOG_H #define QURLDIALOG_H +#include "qt_helpers.h" #include "ui/QURLUi.h" #include <QDialog> Index: src/frontends/qt4/QSpellcheckerDialog.h =================================================================== --- src/frontends/qt4/QSpellcheckerDialog.h (Revision 15770) +++ src/frontends/qt4/QSpellcheckerDialog.h (Arbeitskopie) @@ -12,6 +12,7 @@ #ifndef QSPELLCHECKERDIALOG_H #define QSPELLCHECKERDIALOG_H +#include "qt_helpers.h" #include "ui/QSpellcheckerUi.h" #include <QDialog> Index: src/frontends/qt4/QVSpaceDialog.h =================================================================== --- src/frontends/qt4/QVSpaceDialog.h (Revision 15770) +++ src/frontends/qt4/QVSpaceDialog.h (Arbeitskopie) @@ -13,6 +13,7 @@ #ifndef QVSPACEDIALOG_H #define QVSPACEDIALOG_H +#include "qt_helpers.h" #include "ui/QVSpaceUi.h" #include <QDialog> Index: src/frontends/qt4/QIncludeDialog.h =================================================================== --- src/frontends/qt4/QIncludeDialog.h (Revision 15770) +++ src/frontends/qt4/QIncludeDialog.h (Arbeitskopie) @@ -12,6 +12,7 @@ #ifndef QINCLUDEDIALOG_H #define QINCLUDEDIALOG_H +#include "qt_helpers.h" #include "ui/QIncludeUi.h" #include <QDialog> Index: src/frontends/qt4/QBoxDialog.h =================================================================== --- src/frontends/qt4/QBoxDialog.h (Revision 15770) +++ src/frontends/qt4/QBoxDialog.h (Arbeitskopie) @@ -12,6 +12,7 @@ #ifndef QBOXDIALOG_H #define QBOXDIALOG_H +#include "qt_helpers.h" #include "ui/QBoxUi.h" #include <QCloseEvent> Index: src/frontends/qt4/QCharacterDialog.h =================================================================== --- src/frontends/qt4/QCharacterDialog.h (Revision 15770) +++ src/frontends/qt4/QCharacterDialog.h (Arbeitskopie) @@ -13,6 +13,7 @@ #ifndef QCHARACTERDIALOG_H #define QCHARACTERDIALOG_H +#include "qt_helpers.h" #include "ui/QCharacterUi.h" #include <QCloseEvent> #include <QDialog> Index: src/frontends/qt4/QFloatDialog.h =================================================================== --- src/frontends/qt4/QFloatDialog.h (Revision 15770) +++ src/frontends/qt4/QFloatDialog.h (Arbeitskopie) @@ -12,6 +12,7 @@ #ifndef QFLOATDIALOG_H #define QFLOATDIALOG_H +#include "qt_helpers.h" #include "ui/QFloatUi.h" #include <QCloseEvent> Index: src/frontends/qt4/QBranches.h =================================================================== --- src/frontends/qt4/QBranches.h (Revision 15770) +++ src/frontends/qt4/QBranches.h (Arbeitskopie) @@ -12,6 +12,7 @@ #ifndef QBRANCHES_H #define QBRANCHES_H +#include "qt_helpers.h" #include "ui/BranchesUi.h" #include "QDocument.h" #include "BranchList.h" Index: src/frontends/qt4/qt_helpers.h =================================================================== --- src/frontends/qt4/qt_helpers.h (Revision 15770) +++ src/frontends/qt4/qt_helpers.h (Arbeitskopie) @@ -102,15 +102,17 @@ /** * qt_ - i18nize string and convert to unicode * - * Use this in qt4/ instead of qt_() + * Use this in qt4/ instead of _() + * + * Ignore the int value passed by Qt4 */ -QString const qt_(char const * str); +QString const qt_(char const * str, int); /** * qt_ - i18nize string and convert to unicode * - * Use this in qt4/ instead of qt_() + * Use this in qt4/ instead of _() */ QString const qt_(std::string const & str); Index: src/frontends/qt4/QIndexDialog.h =================================================================== --- src/frontends/qt4/QIndexDialog.h (Revision 15770) +++ src/frontends/qt4/QIndexDialog.h (Arbeitskopie) @@ -12,6 +12,7 @@ #ifndef QINDEXDIALOG_H #define QINDEXDIALOG_H +#include "qt_helpers.h" #include "ui/QIndexUi.h" #include <QDialog> Index: src/frontends/qt4/QChangesDialog.h =================================================================== --- src/frontends/qt4/QChangesDialog.h (Revision 15770) +++ src/frontends/qt4/QChangesDialog.h (Arbeitskopie) @@ -12,6 +12,7 @@ #ifndef QCHANGESDIALOG_H #define QCHANGESDIALOG_H +#include "qt_helpers.h" #include "ui/QChangesUi.h" #include "QChanges.h" Index: src/frontends/qt4/QExternalDialog.h =================================================================== --- src/frontends/qt4/QExternalDialog.h (Revision 15770) +++ src/frontends/qt4/QExternalDialog.h (Arbeitskopie) @@ -12,6 +12,7 @@ #ifndef QEXTERNALDIALOG_H #define QEXTERNALDIALOG_H +#include "qt_helpers.h" #include "ui/QExternalUi.h" #include <QCloseEvent> Index: src/frontends/qt4/QThesaurusDialog.h =================================================================== --- src/frontends/qt4/QThesaurusDialog.h (Revision 15770) +++ src/frontends/qt4/QThesaurusDialog.h (Arbeitskopie) @@ -12,6 +12,7 @@ #ifndef QTHESAURUSDIALOG_H #define QTHESAURUSDIALOG_H +#include "qt_helpers.h" #include "ui/QThesaurusUi.h" #include <QDialog> Index: src/frontends/qt4/FloatPlacement.h =================================================================== --- src/frontends/qt4/FloatPlacement.h (Revision 15770) +++ src/frontends/qt4/FloatPlacement.h (Arbeitskopie) @@ -13,6 +13,7 @@ #ifndef QT_FLOATPLACEMENT_H #define QT_FLOATPLACEMENT_H +#include "qt_helpers.h" #include "ui/FloatPlacementUi.h" #include <QWidget> Index: src/frontends/qt4/QGraphicsDialog.h =================================================================== --- src/frontends/qt4/QGraphicsDialog.h (Revision 15770) +++ src/frontends/qt4/QGraphicsDialog.h (Arbeitskopie) @@ -13,6 +13,7 @@ #ifndef QGRAPHICSDIALOG_H #define QGRAPHICSDIALOG_H +#include "qt_helpers.h" #include "ui/QGraphicsUi.h" #include <QCloseEvent> Index: src/frontends/qt4/QMathMatrixDialog.h =================================================================== --- src/frontends/qt4/QMathMatrixDialog.h (Revision 15770) +++ src/frontends/qt4/QMathMatrixDialog.h (Arbeitskopie) @@ -14,6 +14,7 @@ #ifndef QMATHMATRIXDIALOG_H #define QMATHMATRIXDIALOG_H +#include "qt_helpers.h" #include "ui/QMathMatrixUi.h" #include <QDialog> Index: src/frontends/qt4/QTabularCreateDialog.h =================================================================== --- src/frontends/qt4/QTabularCreateDialog.h (Revision 15770) +++ src/frontends/qt4/QTabularCreateDialog.h (Arbeitskopie) @@ -13,6 +13,7 @@ #ifndef QTABULARCREATEDIALOG_H #define QTABULARCREATEDIALOG_H +#include "qt_helpers.h" #include "ui/QTabularCreateUi.h" #include <QDialog> Index: src/frontends/qt4/Alert_pimpl.C =================================================================== --- src/frontends/qt4/Alert_pimpl.C (Revision 15770) +++ src/frontends/qt4/Alert_pimpl.C (Arbeitskopie) @@ -14,8 +14,8 @@ #include "Alert_pimpl.h" #include "Alert.h" +#include "qt_helpers.h" #include "ui/QAskForTextUi.h" -#include "qt_helpers.h" #include "gettext.h" Index: src/frontends/qt4/QParagraphDialog.h =================================================================== --- src/frontends/qt4/QParagraphDialog.h (Revision 15770) +++ src/frontends/qt4/QParagraphDialog.h (Arbeitskopie) @@ -13,6 +13,7 @@ #ifndef QPARAGRAPHDIALOG_H #define QPARAGRAPHDIALOG_H +#include "qt_helpers.h" #include "ui/QParagraphUi.h" #include <QDialog> Index: src/frontends/qt4/QCitationDialog.h =================================================================== --- src/frontends/qt4/QCitationDialog.h (Revision 15770) +++ src/frontends/qt4/QCitationDialog.h (Arbeitskopie) @@ -13,6 +13,7 @@ #define QCITATIONDIALOG_H #include "Dialog.h" +#include "qt_helpers.h" #include "ui/QCitationUi.h" namespace lyx { Index: src/frontends/qt4/QAboutDialog.h =================================================================== --- src/frontends/qt4/QAboutDialog.h (Revision 15770) +++ src/frontends/qt4/QAboutDialog.h (Arbeitskopie) @@ -12,6 +12,7 @@ #ifndef QABOUTDIALOG_H #define QABOUTDIALOG_H +#include "qt_helpers.h" #include "ui/QAboutUi.h" #include <QDialog> Index: src/frontends/qt4/QBibtexDialog.h =================================================================== --- src/frontends/qt4/QBibtexDialog.h (Revision 15770) +++ src/frontends/qt4/QBibtexDialog.h (Arbeitskopie) @@ -12,6 +12,7 @@ #ifndef QBIBTEXDIALOG_H #define QBIBTEXDIALOG_H +#include "qt_helpers.h" #include "ui/QBibtexUi.h" #include "ui/QBibtexAddUi.h" Index: src/frontends/qt4/QDocumentDialog.h =================================================================== --- src/frontends/qt4/QDocumentDialog.h (Revision 15770) +++ src/frontends/qt4/QDocumentDialog.h (Arbeitskopie) @@ -13,6 +13,7 @@ #ifndef QDOCUMENTDIALOG_H #define QDOCUMENTDIALOG_H +#include "qt_helpers.h" #include "ui/QDocumentUi.h" #include "ui/FontUi.h" #include "ui/TextLayoutUi.h" Index: src/frontends/qt4/QDelimiterDialog.h =================================================================== --- src/frontends/qt4/QDelimiterDialog.h (Revision 15770) +++ src/frontends/qt4/QDelimiterDialog.h (Arbeitskopie) @@ -12,6 +12,7 @@ #ifndef QDELIMITERDIALOG_H #define QDELIMITERDIALOG_H +#include "qt_helpers.h" #include "ui/QDelimiterUi.h" #include <string> Index: src/frontends/qt4/QBibtex.C =================================================================== --- src/frontends/qt4/QBibtex.C (Revision 15770) +++ src/frontends/qt4/QBibtex.C (Arbeitskopie) @@ -15,6 +15,7 @@ #include "QBibtex.h" #include "QBibtexDialog.h" +#include "qt_helpers.h" #include "ui/QBibtexAddUi.h" #include "Qt2BC.h" #include "qt_helpers.h" Index: src/frontends/qt4/QTabularDialog.h =================================================================== --- src/frontends/qt4/QTabularDialog.h (Revision 15770) +++ src/frontends/qt4/QTabularDialog.h (Arbeitskopie) @@ -14,6 +14,7 @@ #ifndef QTABULARDIALOG_H #define QTABULARDIALOG_H +#include "qt_helpers.h" #include "ui/QTabularUi.h" #include <QDialog> Index: src/frontends/qt4/QSendtoDialog.h =================================================================== --- src/frontends/qt4/QSendtoDialog.h (Revision 15770) +++ src/frontends/qt4/QSendtoDialog.h (Arbeitskopie) @@ -12,6 +12,7 @@ #ifndef QSENDTODIALOG_H #define QSENDTODIALOG_H +#include "qt_helpers.h" #include "ui/QSendtoUi.h" #include <QDialog> Index: src/frontends/qt4/QLPrintDialog.h =================================================================== --- src/frontends/qt4/QLPrintDialog.h (Revision 15770) +++ src/frontends/qt4/QLPrintDialog.h (Arbeitskopie) @@ -13,6 +13,7 @@ #ifndef QLPRINTDIALOG_H #define QLPRINTDIALOG_H +#include "qt_helpers.h" #include "ui/QPrintUi.h" #include <QDialog> Index: src/frontends/qt4/QWrapDialog.h =================================================================== --- src/frontends/qt4/QWrapDialog.h (Revision 15770) +++ src/frontends/qt4/QWrapDialog.h (Arbeitskopie) @@ -12,6 +12,7 @@ #ifndef QWRAPDIALOG_H #define QWRAPDIALOG_H +#include "qt_helpers.h" #include "ui/QWrapUi.h" #include <QDialog> Index: src/frontends/qt4/QPrefsDialog.h =================================================================== --- src/frontends/qt4/QPrefsDialog.h (Revision 15770) +++ src/frontends/qt4/QPrefsDialog.h (Arbeitskopie) @@ -16,6 +16,7 @@ #include "LColor.h" #include "lyxrc.h" +#include "qt_helpers.h" #include "ui/QPrefsUi.h" #include <vector> Index: src/frontends/qt4/QLogDialog.h =================================================================== --- src/frontends/qt4/QLogDialog.h (Revision 15770) +++ src/frontends/qt4/QLogDialog.h (Arbeitskopie) @@ -12,6 +12,7 @@ #ifndef QLOGDIALOG_H #define QLOGDIALOG_H +#include "qt_helpers.h" #include "ui/QLogUi.h" #include <QDialog> Index: src/frontends/qt4/QTocDialog.h =================================================================== --- src/frontends/qt4/QTocDialog.h (Revision 15770) +++ src/frontends/qt4/QTocDialog.h (Arbeitskopie) @@ -13,6 +13,7 @@ #ifndef QTOCDIALOG_H #define QTOCDIALOG_H +#include "qt_helpers.h" #include "ui/QTocUi.h" #include "controllers/ControlToc.h" Index: src/frontends/qt4/QTexinfoDialog.h =================================================================== --- src/frontends/qt4/QTexinfoDialog.h (Revision 15770) +++ src/frontends/qt4/QTexinfoDialog.h (Arbeitskopie) @@ -12,6 +12,7 @@ #ifndef QTEXINFODIALOG_H #define QTEXINFODIALOG_H +#include "qt_helpers.h" #include "ui/QTexinfoUi.h" #include <QDialog> Index: src/frontends/qt4/QErrorListDialog.h =================================================================== --- src/frontends/qt4/QErrorListDialog.h (Revision 15770) +++ src/frontends/qt4/QErrorListDialog.h (Arbeitskopie) @@ -12,6 +12,7 @@ #ifndef QERRORLISTDIALOG_H #define QERRORLISTDIALOG_H +#include "qt_helpers.h" #include "ui/QErrorListUi.h" #include <QDialog> Index: src/frontends/qt4/QBranchDialog.h =================================================================== --- src/frontends/qt4/QBranchDialog.h (Revision 15770) +++ src/frontends/qt4/QBranchDialog.h (Arbeitskopie) @@ -12,6 +12,7 @@ #ifndef QBRANCHDIALOG_H #define QBRANCHDIALOG_H +#include "qt_helpers.h" #include "ui/QBranchUi.h" #include <QCloseEvent> Index: src/frontends/qt4/QNoteDialog.h =================================================================== --- src/frontends/qt4/QNoteDialog.h (Revision 15770) +++ src/frontends/qt4/QNoteDialog.h (Arbeitskopie) @@ -12,6 +12,7 @@ #ifndef QNOTEDIALOG_H #define QNOTEDIALOG_H +#include "qt_helpers.h" #include "ui/QNoteUi.h" #include <QDialog> Index: src/frontends/qt4/QRefDialog.h =================================================================== --- src/frontends/qt4/QRefDialog.h (Revision 15770) +++ src/frontends/qt4/QRefDialog.h (Arbeitskopie) @@ -13,6 +13,7 @@ #ifndef QREFDIALOG_H #define QREFDIALOG_H +#include "qt_helpers.h" #include "ui/QRefUi.h" #include <QDialog> Index: src/frontends/qt4/BulletsModule.h =================================================================== --- src/frontends/qt4/BulletsModule.h (Revision 15770) +++ src/frontends/qt4/BulletsModule.h (Arbeitskopie) @@ -13,6 +13,7 @@ #define QBULLETSMODULE_H +#include "qt_helpers.h" #include "ui/BulletsUi.h" #include "Bullet.h" #include <boost/array.hpp> Index: src/frontends/qt4/QShowFileDialog.h =================================================================== --- src/frontends/qt4/QShowFileDialog.h (Revision 15770) +++ src/frontends/qt4/QShowFileDialog.h (Arbeitskopie) @@ -12,6 +12,7 @@ #ifndef QSHOWFILEDIALOG_H #define QSHOWFILEDIALOG_H +#include "qt_helpers.h" #include "ui/QShowFileUi.h" #include <QDialog> Index: src/frontends/qt4/QMathDialog.h =================================================================== --- src/frontends/qt4/QMathDialog.h (Revision 15770) +++ src/frontends/qt4/QMathDialog.h (Arbeitskopie) @@ -12,6 +12,7 @@ #ifndef QMATHDIALOG_H #define QMATHDIALOG_H +#include "qt_helpers.h" #include "ui/QMathUi.h" #include <string> Index: src/frontends/qt4/QSearchDialog.h =================================================================== --- src/frontends/qt4/QSearchDialog.h (Revision 15770) +++ src/frontends/qt4/QSearchDialog.h (Arbeitskopie) @@ -12,6 +12,7 @@ #ifndef QSEARCHDIALOG_H #define QSEARCHDIALOG_H +#include "qt_helpers.h" #include "ui/QSearchUi.h" #include <string> Index: src/frontends/qt4/QBibitemDialog.h =================================================================== --- src/frontends/qt4/QBibitemDialog.h (Revision 15770) +++ src/frontends/qt4/QBibitemDialog.h (Arbeitskopie) @@ -12,6 +12,7 @@ #ifndef QBIBITEMDIALOG_H #define QBIBITEMDIALOG_H +#include "qt_helpers.h" #include "ui/QBibitemUi.h" #include <QDialog> Index: development/scons/qt4.py =================================================================== --- development/scons/qt4.py (Revision 15770) +++ development/scons/qt4.py (Arbeitskopie) @@ -262,7 +262,7 @@ #env['QT4_UIC4COM'] = [ # CLVar('$QT4_UIC $QT4_UICDECLFLAGS -o ${TARGETS[0]} $SOURCE'), # ] - env['QT4_UIC4COM'] = '$QT4_UIC -o $TARGET $SOURCE' + env['QT4_UIC4COM'] = '$QT4_UIC -tr lyx::qt_ -o $TARGET $SOURCE' uic4builder = Builder( action='$QT4_UIC4COM', src_suffix='$QT4_UISUFFIX',