Fixes: save a few strlen calls

This commit is contained in:
hjk
2009-02-19 12:02:47 +01:00
parent 7708d43f23
commit 9c80a46987
2 changed files with 3 additions and 2 deletions

View File

@@ -145,5 +145,5 @@ QString TypeOfExpression::preprocessedExpression(const QString &expression,
Preprocessor preproc(0, env); Preprocessor preproc(0, env);
QByteArray preprocessedCode; QByteArray preprocessedCode;
preproc("<expression>", code, &preprocessedCode); preproc("<expression>", code, &preprocessedCode);
return QString::fromUtf8(preprocessedCode); return QString::fromUtf8(preprocessedCode.constData(), preprocessedCode.size());
} }

View File

@@ -459,7 +459,8 @@ bool PluginManager::runningTests() const
*/ */
QString PluginManager::testDataDirectory() const QString PluginManager::testDataDirectory() const
{ {
QString s = QString::fromLocal8Bit(qgetenv("IDETESTDIR")); QByteArray ba = qgetenv("IDETESTDIR");
QString s = QString::fromLocal8Bit(ba.constData(), ba.size());
if (s.isEmpty()) { if (s.isEmpty()) {
s = IDE_TEST_DIR; s = IDE_TEST_DIR;
s.append("/tests"); s.append("/tests");