summaryrefslogtreecommitdiff
path: root/src/plugins/debugger/cdb
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2022-09-09 13:48:08 +0200
committerEike Ziller <eike.ziller@qt.io>2022-09-12 11:57:04 +0000
commit2c51e4bc1754904695c3d1cfa4fcce86aa3f7245 (patch)
tree67935a1b4e6af7e4b002ba776ab1cacd9ca3b93a /src/plugins/debugger/cdb
parent28349c1b08876c93c6039afe7022de3244bf7f4b (diff)
downloadqt-creator-2c51e4bc1754904695c3d1cfa4fcce86aa3f7245.tar.gz
FilePath: Return optional bytearray for file contents
For differentiating between "error" and "empty file". Change-Id: I2c019ceac625e7be3180afa4d47ae3a24df91c1d Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/plugins/debugger/cdb')
-rw-r--r--src/plugins/debugger/cdb/cdbengine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/debugger/cdb/cdbengine.cpp b/src/plugins/debugger/cdb/cdbengine.cpp
index 61ee6c9180..9e8496e246 100644
--- a/src/plugins/debugger/cdb/cdbengine.cpp
+++ b/src/plugins/debugger/cdb/cdbengine.cpp
@@ -2431,7 +2431,7 @@ static CPlusPlus::Document::Ptr getParsedDocument(const FilePath &filePath,
if (workingCopy.contains(filePath))
src = workingCopy.source(filePath);
else
- src = QString::fromLocal8Bit(filePath.fileContents()).toUtf8();
+ src = QString::fromLocal8Bit(filePath.fileContents().value_or(QByteArray())).toUtf8();
CPlusPlus::Document::Ptr doc = snapshot.preprocessedDocument(src, filePath);
doc->parse();