summaryrefslogtreecommitdiffstats
path: root/tools/linguist
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-04-12 05:59:01 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-04-12 05:59:01 (GMT)
commit9eab27889b1e14385f9428417e048da960ca06de (patch)
tree9de48fdfac4cf0129520922cb9b1660dde29d65c /tools/linguist
parent27f8facfea87d7c4669852e7aa0fe5d9ca828eb3 (diff)
parent3769a716e1e472bb1ab00d5f67268f001ab8645e (diff)
downloadQt-9eab27889b1e14385f9428417e048da960ca06de.zip
Qt-9eab27889b1e14385f9428417e048da960ca06de.tar.gz
Qt-9eab27889b1e14385f9428417e048da960ca06de.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (54 commits) Apply f176759fc41abc4cb901c2cbaa15264f2a9ac85b to stdout too. Autotest: add some debugging, just in case there's something wrong Autotest: fix the fix for the rounding error. Fix compile error with QT_NO_LIBRARY in QtMultimedia the _setmode() prototype is different on win ce qdoc: Changed qdoc to output the new doc format. Doc: update 'developing on mac' fcntl.h doesn't seem to exist, either - contrary to an example on msdn Autotest: fix paths on the test server after update. Force the repaint during a window resize. fix compile on wince remove CONFIG += ordered again Assistant: Check namespace and virtual folder syntax of help projects. QtHelp: Fix auto tests. Fix a crash when unloading libQtCore Introduce a qconfig feature for QtDBus Fix build after MR 543 merged. Compile on 10.4. revert "Fix the Qt build on Mac OS X/Cocoa 64-bit" Remove expected failures after JavaScriptCore bug fix ...
Diffstat (limited to 'tools/linguist')
-rw-r--r--tools/linguist/linguist.pro2
-rw-r--r--tools/linguist/shared/translator.cpp17
2 files changed, 16 insertions, 3 deletions
diff --git a/tools/linguist/linguist.pro b/tools/linguist/linguist.pro
index 85ecd5a..248c89e 100644
--- a/tools/linguist/linguist.pro
+++ b/tools/linguist/linguist.pro
@@ -1,6 +1,6 @@
TEMPLATE = subdirs
SUBDIRS = \
- linguist \
lrelease \
lupdate \
lconvert
+!no-png:!contains(QT_CONFIG, no-gui):SUBDIRS += linguist
diff --git a/tools/linguist/shared/translator.cpp b/tools/linguist/shared/translator.cpp
index 465355d..c86a9dd 100644
--- a/tools/linguist/shared/translator.cpp
+++ b/tools/linguist/shared/translator.cpp
@@ -45,8 +45,13 @@
#include <stdio.h>
#ifdef Q_OS_WIN
-#include <io.h> // required for _setmode, to avoid _O_TEXT streams...
-#include <fcntl.h> // for _O_BINARY
+// required for _setmode, to avoid _O_TEXT streams...
+# ifdef Q_OS_WINCE
+# include <stdlib.h>
+# else
+# include <io.h> // for _setmode
+# include <fcntl.h> // for _O_BINARY
+# endif
#endif
#include <QtCore/QDebug>
@@ -213,7 +218,11 @@ bool Translator::load(const QString &filename, ConversionData &cd, const QString
if (filename.isEmpty() || filename == QLatin1String("-")) {
#ifdef Q_OS_WIN
// QFile is broken for text files
+# ifdef Q_OS_WINCE
+ ::_setmode(stdin, _O_BINARY);
+# else
::_setmode(0, _O_BINARY);
+# endif
#endif
if (!file.open(stdin, QIODevice::ReadOnly)) {
cd.appendError(QString::fromLatin1("Cannot open stdin!? (%1)")
@@ -253,7 +262,11 @@ bool Translator::save(const QString &filename, ConversionData &cd, const QString
if (filename.isEmpty() || filename == QLatin1String("-")) {
#ifdef Q_OS_WIN
// QFile is broken for text files
+# ifdef Q_OS_WINCE
+ ::_setmode(stdout, _O_BINARY);
+# else
::_setmode(1, _O_BINARY);
+# endif
#endif
if (!file.open(stdout, QIODevice::WriteOnly)) {
cd.appendError(QString::fromLatin1("Cannot open stdout!? (%1)")