Changeset 846 for trunk/tools/linguist/lupdate/ui.cpp
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/tools/linguist/lupdate/ui.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 44 44 #include <translator.h> 45 45 46 #include <QtCore/QCoreApplication> 46 47 #include <QtCore/QDebug> 47 48 #include <QtCore/QFile> … … 55 56 56 57 QT_BEGIN_NAMESPACE 58 59 class LU { 60 Q_DECLARE_TR_FUNCTIONS(LUpdate) 61 }; 57 62 58 63 class UiReader : public QXmlDefaultHandler … … 153 158 bool UiReader::fatalError(const QXmlParseException &exception) 154 159 { 155 QString msg; 156 msg.sprintf("XML error: Parse error at line %d, column %d (%s).", 157 exception.lineNumber(), exception.columnNumber(), 158 exception.message().toLatin1().data()); 159 m_cd.appendError(msg); 160 QString msg = LU::tr("XML error: Parse error at line %1, column %2 (%3).") 161 .arg(exception.lineNumber()).arg(exception.columnNumber()) 162 .arg(exception.message()); 163 m_cd.appendError(msg); 160 164 return false; 161 165 } … … 182 186 QFile file(filename); 183 187 if (!file.open(QIODevice::ReadOnly)) { 184 cd.appendError(QString::fromLatin1("Cannot open %1: %2") 185 .arg(filename, file.errorString())); 188 cd.appendError(LU::tr("Cannot open %1: %2").arg(filename, file.errorString())); 186 189 return false; 187 190 } … … 197 200 bool result = reader.parse(in); 198 201 if (!result) 199 cd.appendError( QLatin1String("Parse error in UI file"));202 cd.appendError(LU::tr("Parse error in UI file")); 200 203 reader.setContentHandler(0); 201 204 reader.setErrorHandler(0);
Note:
See TracChangeset
for help on using the changeset viewer.