summaryrefslogtreecommitdiffstats
path: root/qmake/library/proitems.cpp
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2015-03-04 21:38:31 +0100
committerOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2015-05-20 18:11:28 +0000
commitdf436839756ca7488b9eabcd11be04844a4ca8a3 (patch)
tree44c68fb44d7c45b4dea9528cfb70185665132f44 /qmake/library/proitems.cpp
parent637a0889b2766e40fe089d0028395d1113d5e6fb (diff)
move get{,Hash}Str from QMakeEvaluator to ProFile
this makes it possible to use these functions without an evaluator. Change-Id: I23e4ec141b427f4c3c8b647305532be179058c07 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'qmake/library/proitems.cpp')
-rw-r--r--qmake/library/proitems.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/qmake/library/proitems.cpp b/qmake/library/proitems.cpp
index f3526846e9..a610da6b69 100644
--- a/qmake/library/proitems.cpp
+++ b/qmake/library/proitems.cpp
@@ -485,4 +485,23 @@ ProFile::~ProFile()
{
}
+ProString ProFile::getStr(const ushort *&tPtr)
+{
+ uint len = *tPtr++;
+ ProString ret(items(), tPtr - tokPtr(), len);
+ ret.setSource(this);
+ tPtr += len;
+ return ret;
+}
+
+ProKey ProFile::getHashStr(const ushort *&tPtr)
+{
+ uint hash = *tPtr++;
+ hash |= (uint)*tPtr++ << 16;
+ uint len = *tPtr++;
+ ProKey ret(items(), tPtr - tokPtr(), len, hash);
+ tPtr += len;
+ return ret;
+}
+
QT_END_NAMESPACE