CTF: Add qt_error_string to file open warning

Pick-to: 6.5
Change-Id: I85e1aff7689b6592ad2da1e91f480848eea317eb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Antti Määttä 2023-05-31 09:28:38 +03:00
parent fdce0cbbc9
commit 6639285ad7

View File

@ -70,7 +70,8 @@ QCtfLibImpl::QCtfLibImpl()
const QString filename = location + QStringLiteral("/session.json"); const QString filename = location + QStringLiteral("/session.json");
FILE *file = fopen(qPrintable(filename), "rb"); FILE *file = fopen(qPrintable(filename), "rb");
if (!file) { if (!file) {
qCWarning(lcDebugTrace) << "unable to open session file: " << filename; qCWarning(lcDebugTrace) << "unable to open session file: "
<< filename << ", " << qt_error_string();
m_location = location; m_location = location;
m_session.tracepoints.append(QStringLiteral("all")); m_session.tracepoints.append(QStringLiteral("all"));
m_session.name = QStringLiteral("default"); m_session.name = QStringLiteral("default");