diff options
author | Don Sanders <don.sanders@nokia.com> | 2012-03-12 16:37:54 +0200 |
---|---|---|
committer | Don Sanders <don.sanders@nokia.com> | 2012-03-12 16:37:54 +0200 |
commit | 85eb7b5448b6e6fa81ede1093f4530020dc28712 (patch) | |
tree | 4d32b4afb02f043a05afd3b5abecc547289f756c | |
parent | 3907c1b074725234a5187ef7a2ea7e86a4b6e932 (diff) |
More qt 5 fixes.
-rw-r--r-- | examples/qtmail/plugins/composers/email/emailcomposer.cpp | 6 | ||||
-rw-r--r-- | src/libraries/qmfclient/qmailmessagemodelbase.cpp | 6 |
2 files changed, 11 insertions, 1 deletions
diff --git a/examples/qtmail/plugins/composers/email/emailcomposer.cpp b/examples/qtmail/plugins/composers/email/emailcomposer.cpp index 137cf5c1..e498fd03 100644 --- a/examples/qtmail/plugins/composers/email/emailcomposer.cpp +++ b/examples/qtmail/plugins/composers/email/emailcomposer.cpp @@ -53,7 +53,9 @@ #include <QTextEdit> #include <QStackedWidget> #include <qmailaccount.h> +#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0)) #include <QInputContext> +#endif #include <QStyle> #include <QMenu> #include <qmailnamespace.h> @@ -519,7 +521,11 @@ m_composer(composer) bool BodyTextEdit::isComposing() { +#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0)) return (inputContext() && inputContext()->isComposing()); +#else + return false; +#endif } bool BodyTextEdit::isEmpty() diff --git a/src/libraries/qmfclient/qmailmessagemodelbase.cpp b/src/libraries/qmfclient/qmailmessagemodelbase.cpp index 4ce22e30..e2ee8bf9 100644 --- a/src/libraries/qmfclient/qmailmessagemodelbase.cpp +++ b/src/libraries/qmfclient/qmailmessagemodelbase.cpp @@ -74,7 +74,11 @@ QString messageSizeText(const QMailMessageMetaData& m) const uint size(m.size()); if (size < 1024) - return qApp->translate("QMailMessageModelBase", "%n byte(s)", "", QCoreApplication::CodecForTr, size); +#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0)) + return qApp->translate("QMailMessageModelBase", "%n byte(s)", "", QCoreApplication::CodecForTr, size); +#else + return qApp->translate("QMailMessageModelBase", "%n byte(s)", "", QCoreApplication::DefaultCodec, size); +#endif else if (size < (1024 * 1024)) return qApp->translate("QMailMessageModelBase", "%1 KB").arg(((float)size)/1024.0, 0, 'f', 1); else if (size < (1024 * 1024 * 1024)) |