summaryrefslogtreecommitdiff
path: root/development/translation/shared/metatranslator.h
Unidiff
Diffstat (limited to 'development/translation/shared/metatranslator.h') (more/less context) (ignore whitespace changes)
-rw-r--r--development/translation/shared/metatranslator.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/development/translation/shared/metatranslator.h b/development/translation/shared/metatranslator.h
index d35b202..a13f462 100644
--- a/development/translation/shared/metatranslator.h
+++ b/development/translation/shared/metatranslator.h
@@ -3,20 +3,26 @@
3** 3**
4** This file is part of Qt Linguist. 4** This file is part of Qt Linguist.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
12** licenses may use this file in accordance with the Qt Commercial License
13** Agreement provided with the Software.
14**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 15** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 16** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 17**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 18** See http://www.trolltech.com/gpl/ for GPL licensing information.
19** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
20** information about Qt Commercial License Agreements.
15** 21**
16** Contact info@trolltech.com if any conditions of this licensing are 22** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 23** not clear to you.
18** 24**
19**********************************************************************/ 25**********************************************************************/
20 26
21#ifndef METATRANSLATOR_H 27#ifndef METATRANSLATOR_H
22#define METATRANSLATOR_H 28#define METATRANSLATOR_H
@@ -65,19 +71,21 @@ private:
65class MetaTranslator 71class MetaTranslator
66{ 72{
67public: 73public:
68 MetaTranslator(); 74 MetaTranslator();
69 MetaTranslator( const MetaTranslator& tor ); 75 MetaTranslator( const MetaTranslator& tor );
70 76
71 MetaTranslator& operator=( const MetaTranslator& tor ); 77 MetaTranslator& operator=( const MetaTranslator& tor );
72 78
79 void clear();
73 bool load( const QString& filename ); 80 bool load( const QString& filename );
74 bool save( const QString& filename ) const; 81 bool save( const QString& filename ) const;
75 bool release( const QString& filename, bool verbose = FALSE ) const; 82 bool release( const QString& filename, bool verbose = FALSE,
83 QTranslator::SaveMode mode = QTranslator::Stripped ) const;
76 84
77 bool contains( const char *context, const char *sourceText, 85 bool contains( const char *context, const char *sourceText,
78 const char *comment ) const; 86 const char *comment ) const;
79 void insert( const MetaTranslatorMessage& m ); 87 void insert( const MetaTranslatorMessage& m );
80 88
81 void stripObsoleteMessages(); 89 void stripObsoleteMessages();
82 void stripEmptyContexts(); 90 void stripEmptyContexts();
83 91
@@ -91,9 +99,15 @@ private:
91 typedef QMap<MetaTranslatorMessage, int> TMM; 99 typedef QMap<MetaTranslatorMessage, int> TMM;
92 typedef QMap<int, MetaTranslatorMessage> TMMInv; 100 typedef QMap<int, MetaTranslatorMessage> TMMInv;
93 101
94 TMM mm; 102 TMM mm;
95 QCString codecName; 103 QCString codecName;
96 QTextCodec *codec; 104 QTextCodec *codec;
97}; 105};
98 106
107/*
108 This is a quick hack. The proper way to handle this would be
109 to extend MetaTranslator's interface.
110*/
111#define ContextComment "QT_LINGUIST_INTERNAL_CONTEXT_COMMENT"
112
99#endif 113#endif