summaryrefslogtreecommitdiff
path: root/src/plugins/cmakeprojectmanager/cmakeconfigitem.cpp
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2021-07-06 09:50:01 +0200
committerhjk <hjk@qt.io>2021-07-21 06:25:06 +0000
commit3b779fb8dddf8baf7c119d58b38b6c2ffe14848d (patch)
tree09e0ab335caa1c5933c1a5b930363c116c14e22a /src/plugins/cmakeprojectmanager/cmakeconfigitem.cpp
parent8a28f43a81e5ede67b0b74addb52df050532a11e (diff)
downloadqt-creator-3b779fb8dddf8baf7c119d58b38b6c2ffe14848d.tar.gz
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>
Diffstat (limited to 'src/plugins/cmakeprojectmanager/cmakeconfigitem.cpp')
-rw-r--r--src/plugins/cmakeprojectmanager/cmakeconfigitem.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/plugins/cmakeprojectmanager/cmakeconfigitem.cpp b/src/plugins/cmakeprojectmanager/cmakeconfigitem.cpp
index 3aa957bbe5..561c7883d2 100644
--- a/src/plugins/cmakeprojectmanager/cmakeconfigitem.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakeconfigitem.cpp
@@ -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)
{