forked from qt-creator/qt-creator
Fix warning: "Don't call QVector::first() on temporary QList/QVector"
[-Wclazy-detaching-temporary] Change-Id: I23f5cbd80bb92d3f9f1bfb5ae07493818958c5b0 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -69,8 +69,8 @@ static QString suppressionText(const Error &error)
|
||||
// try to set some useful name automatically, instead of "insert_name_here"
|
||||
// we take the last stack frame and append the suppression kind, e.g.:
|
||||
// QDebug::operator<<(bool) [Memcheck:Cond]
|
||||
if (!error.stacks().isEmpty() && !error.stacks().first().frames().isEmpty()) {
|
||||
const Frame frame = error.stacks().first().frames().first();
|
||||
if (!error.stacks().isEmpty() && !error.stacks().constFirst().frames().isEmpty()) {
|
||||
const Frame frame = error.stacks().constFirst().frames().constFirst();
|
||||
|
||||
QString newName;
|
||||
if (!frame.functionName().isEmpty())
|
||||
|
||||
Reference in New Issue
Block a user