diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2016-11-23 12:23:04 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2016-11-24 07:42:48 +0000 |
commit | 710414d4a209163e9d583aeb9276ead66c01d8d6 (patch) | |
tree | b45f4761dfd28978f19343fde744dd95a7bca102 /src/corelib/io | |
parent | a1c84af6f57bc430c3f34bb79c035a27a9dd4348 (diff) |
Make sure we can compile QtCore without QT_CONFIG(translation)
Change-Id: I755834b77e50ff6f44bda561f007ec3306f3c1f9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io')
-rw-r--r-- | src/corelib/io/qfsfileengine_unix.cpp | 2 | ||||
-rw-r--r-- | src/corelib/io/qsavefile.h | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/corelib/io/qfsfileengine_unix.cpp b/src/corelib/io/qfsfileengine_unix.cpp index bf2f47d399..b2e3df79b8 100644 --- a/src/corelib/io/qfsfileengine_unix.cpp +++ b/src/corelib/io/qfsfileengine_unix.cpp @@ -144,7 +144,7 @@ static inline bool setCloseOnExec(int fd) static inline QString msgOpenDirectory() { const char message[] = QT_TRANSLATE_NOOP("QIODevice", "file to open is a directory"); -#ifndef QT_BOOTSTRAPPED +#if QT_CONFIG(translation) return QIODevice::tr(message); #else return QLatin1String(message); diff --git a/src/corelib/io/qsavefile.h b/src/corelib/io/qsavefile.h index 10857c27d1..0a6af91261 100644 --- a/src/corelib/io/qsavefile.h +++ b/src/corelib/io/qsavefile.h @@ -84,6 +84,9 @@ protected: private: void close() Q_DECL_OVERRIDE; +#if !QT_CONFIG(translation) + static QString tr(const char *string) { return QString::fromLatin1(string); } +#endif private: Q_DISABLE_COPY(QSaveFile) |