summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qbytearraymatcher.h
diff options
context:
space:
mode:
authorAlexis Menard <alexis.menard@nokia.com>2009-05-12 12:11:55 (GMT)
committerAlexis Menard <alexis.menard@nokia.com>2009-05-12 12:11:55 (GMT)
commitf5ac9ac1387fb9aac7c74d686f0b247ac50746e1 (patch)
tree8efb9b6c1029f8b9c26b96fa5389b1b0623c5163 /src/corelib/tools/qbytearraymatcher.h
parentcb369071fa9b15e68f91d2883ee29f12c58fc803 (diff)
parentbc184432c49eb56254bc5db07c6af03718c6b0e7 (diff)
downloadQt-f5ac9ac1387fb9aac7c74d686f0b247ac50746e1.zip
Qt-f5ac9ac1387fb9aac7c74d686f0b247ac50746e1.tar.gz
Qt-f5ac9ac1387fb9aac7c74d686f0b247ac50746e1.tar.bz2
Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt into kinetic-animations
Diffstat (limited to 'src/corelib/tools/qbytearraymatcher.h')
-rw-r--r--src/corelib/tools/qbytearraymatcher.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/corelib/tools/qbytearraymatcher.h b/src/corelib/tools/qbytearraymatcher.h
index d7f2366..633e92c 100644
--- a/src/corelib/tools/qbytearraymatcher.h
+++ b/src/corelib/tools/qbytearraymatcher.h
@@ -67,7 +67,12 @@ public:
int indexIn(const QByteArray &ba, int from = 0) const;
int indexIn(const char *str, int len, int from = 0) const;
- inline QByteArray pattern() const { return q_pattern; }
+ inline QByteArray pattern() const
+ {
+ if (q_pattern.isNull())
+ return QByteArray((const char*)p.p, p.l);
+ return q_pattern;
+ }
private:
QByteArrayMatcherPrivate *d;