Ignore:
Timestamp:
May 5, 2011, 5:36:53 AM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/tools/linguist/lupdate/ui.cpp

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    4444#include <translator.h>
    4545
     46#include <QtCore/QCoreApplication>
    4647#include <QtCore/QDebug>
    4748#include <QtCore/QFile>
     
    5556
    5657QT_BEGIN_NAMESPACE
     58
     59class LU {
     60    Q_DECLARE_TR_FUNCTIONS(LUpdate)
     61};
    5762
    5863class UiReader : public QXmlDefaultHandler
     
    153158bool UiReader::fatalError(const QXmlParseException &exception)
    154159{
    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);
    160164    return false;
    161165}
     
    182186    QFile file(filename);
    183187    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()));
    186189        return false;
    187190    }
     
    197200    bool result = reader.parse(in);
    198201    if (!result)
    199         cd.appendError(QLatin1String("Parse error in UI file"));
     202        cd.appendError(LU::tr("Parse error in UI file"));
    200203    reader.setContentHandler(0);
    201204    reader.setErrorHandler(0);
Note: See TracChangeset for help on using the changeset viewer.