CMakeProjectManager: Use "cooked types" in DirectoryData

Less conversions cycles at the price of a few more temporary bytes.

Change-Id: Ibda82e02d7b83944f5db38ac7cf75c4bae4f55ec
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
hjk
2021-07-06 09:50:01 +02:00
parent 8a28f43a81
commit 3b779fb8dd
5 changed files with 48 additions and 43 deletions

View File

@@ -35,6 +35,8 @@
#include <QFile>
#include <QIODevice>
using namespace Utils;
namespace CMakeProjectManager {
// --------------------------------------------------------------------
@@ -62,6 +64,16 @@ QByteArray CMakeConfigItem::valueOf(const QByteArray &key, const QList<CMakeConf
return QByteArray();
}
QString CMakeConfigItem::stringValueOf(const QByteArray &key, const QList<CMakeConfigItem> &input)
{
return QString::fromUtf8(valueOf(key, input));
}
FilePath CMakeConfigItem::filePathValueOf(const QByteArray &key, const QList<CMakeConfigItem> &input)
{
return FilePath::fromUtf8(valueOf(key, input));
}
QString CMakeConfigItem::expandedValueOf(const ProjectExplorer::Kit *k, const QByteArray &key,
const QList<CMakeConfigItem> &input)
{