summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qstring_compat.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2014-07-28 20:46:18 -0700
committerThiago Macieira <thiago.macieira@intel.com>2014-08-19 03:39:30 +0200
commit55c1f54c5550848af9aa2ababb559b8f2346c912 (patch)
tree0b426db7202a334cc2c9f42cb9be0b39aa9db13a /src/corelib/tools/qstring_compat.cpp
parent6dd759c8e947670f28dccba946138b7f8d609eaa (diff)
Add rvalue-ref qualified overload of QByteArray::to{Upper,Lower}
Those operations aren't very common with QByteArray but this is easy to optimize. Qt Qt Creator const & && const & && toLower 34 10 0 1 toUpper 3 1 0 0 Change-Id: I2097955f4c889ea5a21903c35ddbc0ff27bf62c5 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/tools/qstring_compat.cpp')
-rw-r--r--src/corelib/tools/qstring_compat.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/corelib/tools/qstring_compat.cpp b/src/corelib/tools/qstring_compat.cpp
index 6613dfde8e..be74775c1a 100644
--- a/src/corelib/tools/qstring_compat.cpp
+++ b/src/corelib/tools/qstring_compat.cpp
@@ -39,11 +39,12 @@
**
****************************************************************************/
-#if defined(QSTRING_H)
+#if defined(QSTRING_H) || defined(QBYTEARRAY_H)
# error "This file cannot be compiled with pre-compiled headers"
#endif
#define QT_COMPILING_QSTRING_COMPAT_CPP
+#include "qbytearray.h"
#include "qstring.h"
QT_BEGIN_NAMESPACE
@@ -64,4 +65,15 @@ QByteArray QString::toUtf8() const
return toUtf8_helper(*this);
}
+// ditto, for qbytearray.h (because we're lazy)
+QByteArray QByteArray::toLower() const
+{
+ return toLower_helper(*this);
+}
+
+QByteArray QByteArray::toUpper() const
+{
+ return toUpper_helper(*this);
+}
+
QT_END_NAMESPACE