diff options
author | Marco Bubke <marco.bubke@qt.io> | 2017-08-17 15:17:56 +0200 |
---|---|---|
committer | Marco Bubke <marco.bubke@qt.io> | 2017-08-28 13:46:48 +0000 |
commit | 381b51c012b883d7ed912bfc868d84b7b13773a6 (patch) | |
tree | 0627bcb09f5ef07cb1d3ca1795d6e38dd0f1100e /src/libs/utils/smallstring.h | |
parent | 24e5dd055617076df04a6545229d947228995b25 (diff) | |
download | qt-creator-381b51c012b883d7ed912bfc868d84b7b13773a6.tar.gz |
Utils: Add toView to SmallString
Change-Id: I242a3a8e8411dfca19e50279928f97a5623e55d4
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Diffstat (limited to 'src/libs/utils/smallstring.h')
-rw-r--r-- | src/libs/utils/smallstring.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libs/utils/smallstring.h b/src/libs/utils/smallstring.h index 0a0b77a0ab..9b56a674a8 100644 --- a/src/libs/utils/smallstring.h +++ b/src/libs/utils/smallstring.h @@ -232,6 +232,11 @@ public: return QString::fromUtf8(data(), int(size())); } + SmallStringView toView() const + { + return SmallStringView(data(), size()); + } + operator SmallStringView() const { return SmallStringView(data(), size()); |