diff options
author | Eike Ziller <eike.ziller@qt.io> | 2022-09-09 13:48:08 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2022-09-12 11:57:04 +0000 |
commit | 2c51e4bc1754904695c3d1cfa4fcce86aa3f7245 (patch) | |
tree | 67935a1b4e6af7e4b002ba776ab1cacd9ca3b93a /src/plugins/debugger/cdb | |
parent | 28349c1b08876c93c6039afe7022de3244bf7f4b (diff) | |
download | qt-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.cpp | 2 |
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(); |