forked from qt-creator/qt-creator
Don't put QString in static attributes
It crashed in some places on our code-base due to the so-called "static initialization order fiasco". As a solution, it turns the variable into a function. This shouldn't have a penalty due to QStringLiteral. Change-Id: I9f8a955afdff878dc2f0db16fec861d81250c243 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
committed by
Aleix Pol Gonzalez
parent
954cabdde8
commit
b899684a89
@@ -481,7 +481,7 @@ bool operator <(const ImportKey &i1, const ImportKey &i2)
|
||||
return i1.compare(i2) < 0;
|
||||
}
|
||||
|
||||
const QString Export::LibraryTypeName = QLatin1String("%Library%");
|
||||
QString Export::libraryTypeName() { return QStringLiteral("%Library%"); }
|
||||
|
||||
Export::Export()
|
||||
: intrinsic(false)
|
||||
|
||||
Reference in New Issue
Block a user