tools/linguist/lrelease/main.cpp
branchRCL_3
changeset 4 3b1da2848fc7
parent 3 41300fa6a67c
child 5 d3bac044e0f0
equal deleted inserted replaced
3:41300fa6a67c 4:3b1da2848fc7
     1 /****************************************************************************
     1 /****************************************************************************
     2 **
     2 **
     3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     4 ** All rights reserved.
     4 ** All rights reserved.
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     6 **
     6 **
     7 ** This file is part of the Qt Linguist of the Qt Toolkit.
     7 ** This file is part of the Qt Linguist of the Qt Toolkit.
     8 **
     8 **
   109         qWarning("lrelease error: %s\n", qPrintable(cd.error()));
   109         qWarning("lrelease error: %s\n", qPrintable(cd.error()));
   110     } else {
   110     } else {
   111         if (!cd.errors().isEmpty())
   111         if (!cd.errors().isEmpty())
   112             printOut(cd.error());
   112             printOut(cd.error());
   113     }
   113     }
       
   114     cd.clearErrors();
   114     return ok;
   115     return ok;
   115 }
   116 }
   116 
   117 
   117 static bool releaseTranslator(Translator &tor, const QString &qmFileName,
   118 static bool releaseTranslator(Translator &tor, const QString &qmFileName,
   118     ConversionData &cd, bool removeIdentical)
   119     ConversionData &cd, bool removeIdentical)
   139     file.close();
   140     file.close();
   140 
   141 
   141     if (!ok) {
   142     if (!ok) {
   142         qWarning("lrelease error: cannot save '%s': %s\n",
   143         qWarning("lrelease error: cannot save '%s': %s\n",
   143                  qPrintable(qmFileName), qPrintable(cd.error()));
   144                  qPrintable(qmFileName), qPrintable(cd.error()));
   144         return false;
       
   145     } else if (!cd.errors().isEmpty()) {
   145     } else if (!cd.errors().isEmpty()) {
   146         printOut(cd.error());
   146         printOut(cd.error());
   147     }
   147     }
   148     return true;
   148     cd.clearErrors();
       
   149     return ok;
   149 }
   150 }
   150 
   151 
   151 static bool releaseTsFile(const QString& tsFileName,
   152 static bool releaseTsFile(const QString& tsFileName,
   152     ConversionData &cd, bool removeIdentical)
   153     ConversionData &cd, bool removeIdentical)
   153 {
   154 {