summaryrefslogtreecommitdiffstats
path: root/tools/linguist/shared
diff options
context:
space:
mode:
Diffstat (limited to 'tools/linguist/shared')
-rw-r--r--tools/linguist/shared/abstractproitemvisitor.h2
-rw-r--r--tools/linguist/shared/numerus.cpp2
-rw-r--r--tools/linguist/shared/po.cpp2
-rw-r--r--tools/linguist/shared/profileevaluator.cpp2
-rw-r--r--tools/linguist/shared/profileevaluator.h2
-rw-r--r--tools/linguist/shared/proitems.cpp2
-rw-r--r--tools/linguist/shared/proitems.h2
-rw-r--r--tools/linguist/shared/proparserutils.h2
-rw-r--r--tools/linguist/shared/proreader.cpp2
-rw-r--r--tools/linguist/shared/proreader.h2
-rw-r--r--tools/linguist/shared/qm.cpp2
-rw-r--r--tools/linguist/shared/qph.cpp2
-rw-r--r--tools/linguist/shared/simtexth.cpp2
-rw-r--r--tools/linguist/shared/simtexth.h2
-rw-r--r--tools/linguist/shared/translator.cpp14
-rw-r--r--tools/linguist/shared/translator.h2
-rw-r--r--tools/linguist/shared/translatormessage.cpp2
-rw-r--r--tools/linguist/shared/translatormessage.h2
-rw-r--r--tools/linguist/shared/ts.cpp2
-rw-r--r--tools/linguist/shared/xliff.cpp2
20 files changed, 32 insertions, 20 deletions
diff --git a/tools/linguist/shared/abstractproitemvisitor.h b/tools/linguist/shared/abstractproitemvisitor.h
index b875bba..97908a6 100644
--- a/tools/linguist/shared/abstractproitemvisitor.h
+++ b/tools/linguist/shared/abstractproitemvisitor.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tools/linguist/shared/numerus.cpp b/tools/linguist/shared/numerus.cpp
index 377baa5..d45dfed 100644
--- a/tools/linguist/shared/numerus.cpp
+++ b/tools/linguist/shared/numerus.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tools/linguist/shared/po.cpp b/tools/linguist/shared/po.cpp
index fc5f26f..3354d61 100644
--- a/tools/linguist/shared/po.cpp
+++ b/tools/linguist/shared/po.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tools/linguist/shared/profileevaluator.cpp b/tools/linguist/shared/profileevaluator.cpp
index d652ada..5e1ee1f 100644
--- a/tools/linguist/shared/profileevaluator.cpp
+++ b/tools/linguist/shared/profileevaluator.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tools/linguist/shared/profileevaluator.h b/tools/linguist/shared/profileevaluator.h
index 25c3ccf..53f3b9b 100644
--- a/tools/linguist/shared/profileevaluator.h
+++ b/tools/linguist/shared/profileevaluator.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tools/linguist/shared/proitems.cpp b/tools/linguist/shared/proitems.cpp
index d2f171c..a59e3d9 100644
--- a/tools/linguist/shared/proitems.cpp
+++ b/tools/linguist/shared/proitems.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tools/linguist/shared/proitems.h b/tools/linguist/shared/proitems.h
index ca33a92..159e01f 100644
--- a/tools/linguist/shared/proitems.h
+++ b/tools/linguist/shared/proitems.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tools/linguist/shared/proparserutils.h b/tools/linguist/shared/proparserutils.h
index 1ed3d6c..b246535 100644
--- a/tools/linguist/shared/proparserutils.h
+++ b/tools/linguist/shared/proparserutils.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tools/linguist/shared/proreader.cpp b/tools/linguist/shared/proreader.cpp
index b13a0ff..4a621a8 100644
--- a/tools/linguist/shared/proreader.cpp
+++ b/tools/linguist/shared/proreader.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tools/linguist/shared/proreader.h b/tools/linguist/shared/proreader.h
index 47bb509..70421d7 100644
--- a/tools/linguist/shared/proreader.h
+++ b/tools/linguist/shared/proreader.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tools/linguist/shared/qm.cpp b/tools/linguist/shared/qm.cpp
index e4c26bc..8118576 100644
--- a/tools/linguist/shared/qm.cpp
+++ b/tools/linguist/shared/qm.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tools/linguist/shared/qph.cpp b/tools/linguist/shared/qph.cpp
index 32bdabb..5beb135 100644
--- a/tools/linguist/shared/qph.cpp
+++ b/tools/linguist/shared/qph.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tools/linguist/shared/simtexth.cpp b/tools/linguist/shared/simtexth.cpp
index 552d8a6..d8c9b8f 100644
--- a/tools/linguist/shared/simtexth.cpp
+++ b/tools/linguist/shared/simtexth.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tools/linguist/shared/simtexth.h b/tools/linguist/shared/simtexth.h
index 63d6570..f958019 100644
--- a/tools/linguist/shared/simtexth.h
+++ b/tools/linguist/shared/simtexth.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tools/linguist/shared/translator.cpp b/tools/linguist/shared/translator.cpp
index 8a071d3..4331ce6 100644
--- a/tools/linguist/shared/translator.cpp
+++ b/tools/linguist/shared/translator.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -44,6 +44,10 @@
#include "simtexth.h"
#include <stdio.h>
+#ifdef Q_OS_WIN
+#include <io.h> // required for _setmode, to avoid _O_TEXT streams...
+#include <fcntl.h> // for _O_BINARY
+#endif
#include <QtCore/QDebug>
#include <QtCore/QDir>
@@ -207,6 +211,10 @@ bool Translator::load(const QString &filename, ConversionData &cd, const QString
QFile file;
if (filename.isEmpty() || filename == QLatin1String("-")) {
+#ifdef Q_OS_WIN
+ // QFile is broken for text files
+ ::_setmode(0, _O_BINARY);
+#endif
if (!file.open(stdin, QIODevice::ReadOnly)) {
cd.appendError(QString::fromLatin1("Cannot open stdin!? (%1)")
.arg(file.errorString()));
@@ -243,6 +251,10 @@ bool Translator::save(const QString &filename, ConversionData &cd, const QString
{
QFile file;
if (filename.isEmpty() || filename == QLatin1String("-")) {
+#ifdef Q_OS_WIN
+ // QFile is broken for text files
+ ::_setmode(1, _O_BINARY);
+#endif
if (!file.open(stdout, QIODevice::WriteOnly)) {
cd.appendError(QString::fromLatin1("Cannot open stdout!? (%1)")
.arg(file.errorString()));
diff --git a/tools/linguist/shared/translator.h b/tools/linguist/shared/translator.h
index fa447a3..0fcd598 100644
--- a/tools/linguist/shared/translator.h
+++ b/tools/linguist/shared/translator.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tools/linguist/shared/translatormessage.cpp b/tools/linguist/shared/translatormessage.cpp
index 5151ebd..7971595 100644
--- a/tools/linguist/shared/translatormessage.cpp
+++ b/tools/linguist/shared/translatormessage.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tools/linguist/shared/translatormessage.h b/tools/linguist/shared/translatormessage.h
index 60b60c5..3737630 100644
--- a/tools/linguist/shared/translatormessage.h
+++ b/tools/linguist/shared/translatormessage.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tools/linguist/shared/ts.cpp b/tools/linguist/shared/ts.cpp
index d6ae7c8..491c201 100644
--- a/tools/linguist/shared/ts.cpp
+++ b/tools/linguist/shared/ts.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tools/linguist/shared/xliff.cpp b/tools/linguist/shared/xliff.cpp
index 989279f..20303ec 100644
--- a/tools/linguist/shared/xliff.cpp
+++ b/tools/linguist/shared/xliff.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**