summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2012-03-10 23:51:31 +0100
committerQt by Nokia <qt-info@nokia.com>2012-03-12 10:51:49 +0100
commit9abefae4fb123ff506d3a903e62da1e88c2c79e4 (patch)
treece4cd7744990c21abc1948dedd457f495f4e5889 /src/corelib
parent2e886cfbcb0ae80a3545943d917352eb54804e98 (diff)
Restore some source compatibility
Add an implicit #include back in to avoid needless SC and compilation breaks. Add some deprecated method for codecForTr, until all other modules are ported to mot use it anymore. Change-Id: I5334b47a0c32819b9eb6b7203cc98ce4e6073a64 Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/codecs/qtextcodec.h4
-rw-r--r--src/corelib/kernel/qcoreapplication.h6
-rw-r--r--src/corelib/tools/qlocale.h1
3 files changed, 10 insertions, 1 deletions
diff --git a/src/corelib/codecs/qtextcodec.h b/src/corelib/codecs/qtextcodec.h
index b4b170f7d7..690214323d 100644
--- a/src/corelib/codecs/qtextcodec.h
+++ b/src/corelib/codecs/qtextcodec.h
@@ -72,6 +72,10 @@ public:
static QTextCodec* codecForLocale();
static void setCodecForLocale(QTextCodec *c);
+#if QT_DEPRECATED_SINCE(5, 0)
+ QT_DEPRECATED static QTextCodec *codecForTr() { return codecForMib(4); /* Latin1 */ }
+#endif
+
static QTextCodec *codecForHtml(const QByteArray &ba);
static QTextCodec *codecForHtml(const QByteArray &ba, QTextCodec *defaultCodec);
diff --git a/src/corelib/kernel/qcoreapplication.h b/src/corelib/kernel/qcoreapplication.h
index 0a5181a508..cf76511f25 100644
--- a/src/corelib/kernel/qcoreapplication.h
+++ b/src/corelib/kernel/qcoreapplication.h
@@ -137,7 +137,11 @@ public:
static void installTranslator(QTranslator * messageFile);
static void removeTranslator(QTranslator * messageFile);
#endif
- enum Encoding { UnicodeUTF8, Latin1, DefaultCodec = Latin1 };
+ enum Encoding { UnicodeUTF8, Latin1, DefaultCodec = Latin1
+#if QT_DEPRECATED_SINCE(5, 0)
+ , CodecForTr = Latin1
+#endif
+ };
static QString translate(const char * context,
const char * key,
const char * disambiguation = 0,
diff --git a/src/corelib/tools/qlocale.h b/src/corelib/tools/qlocale.h
index 2ecd934100..c029f627b2 100644
--- a/src/corelib/tools/qlocale.h
+++ b/src/corelib/tools/qlocale.h
@@ -42,6 +42,7 @@
#ifndef QLOCALE_H
#define QLOCALE_H
+#include <QtCore/qvariant.h>
#include <QtCore/qstring.h>
#include <QtCore/qobjectdefs.h>