From 959122042200d093b10a0ee550405089673720a8 Mon Sep 17 00:00:00 2001 From: pangwa Date: Wed, 16 Jan 2013 12:02:26 +0800 Subject: [PATCH] add a test that could produce wrong tranlsation section --- .../lupdate/testdata/good/parsecpp/project.pro | 12 ++++-- .../lupdate/testdata/good/parsecpp/testtrans.cpp | 27 +++++++++++++++ .../lupdate/testdata/good/parsecpp/testtrans.h | 35 ++++++++++++++++++++ 3 files changed, 70 insertions(+), 4 deletions(-) create mode 100644 tests/auto/linguist/lupdate/testdata/good/parsecpp/testtrans.cpp create mode 100644 tests/auto/linguist/lupdate/testdata/good/parsecpp/testtrans.h diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.pro b/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.pro index bbabdfb..3d02c7d 100644 --- a/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.pro +++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.pro @@ -1,4 +1,8 @@ -SOURCES += main.cpp -SOURCES += finddialog.cpp - -TRANSLATIONS = project.ts +SOURCES += main.cpp \ + testtrans.cpp +SOURCES += finddialog.cpp + +TRANSLATIONS = project.ts + +HEADERS += \ + testtrans.h diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp/testtrans.cpp b/tests/auto/linguist/lupdate/testdata/good/parsecpp/testtrans.cpp new file mode 100644 index 0000000..8926cf0 --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp/testtrans.cpp @@ -0,0 +1,27 @@ +#include "testtrans.h" + + +TOFPage::TOFPage(QWidget* parent /*= 0*/) : + QWidget(parent) + +{ + QString title = tr("Load a TOF File"); + QString m_labelText = tr("Please pick the TOF file"); + QString m_pickPrompt = tr("Select TOF File"); +} + +FstPage::FstPage(QWidget* parent /*= 0*/) : + QWidget(parent) +{ + QString m_title = tr("Why this happen???", "c"); + QString m_labelText = tr("Please pick the FST file"); + QString m_pickPrompt = tr("Select Fst File"); +} + +FndPage::FndPage(QWidget* parent /*= 0*/) : + QWidget(parent) +{ + QString m_title = tr("Load a Fnd File", "b"); + QString m_labelText = tr("Please pick the Fnd file"); + QString m_pickPrompt = tr("Select Fnd File"); +} diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp/testtrans.h b/tests/auto/linguist/lupdate/testdata/good/parsecpp/testtrans.h new file mode 100644 index 0000000..c4eb90b --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp/testtrans.h @@ -0,0 +1,35 @@ +#ifndef TESTTRANS_H +#define TESTTRANS_H + +#include + +class TOFPage : public QWidget +{ + Q_OBJECT +public: + TOFPage (QWidget* parent = 0); + +protected: +}; + +class FstPage : public QWidget +{ + Q_OBJECT + +public: + FstPage (QWidget* parent = 0); + +protected: +}; + +class FndPage : public QWidget +{ + Q_OBJECT + +public: + FndPage (QWidget* parent = 0); + +protected: +}; + +#endif // TESTTRANS_H -- 1.7.3.1.msysgit.0