forked from qt-creator/qt-creator
ProjectExplorer: Only strip L from cplusplus macro if it exists
Old GCC versions have #define __cplusplus 1 Change-Id: I71286656df8f9925c2e0ccc46d32546037423268 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
da16d778d5
commit
48f01f503f
@@ -411,7 +411,8 @@ const ToolChain::MacrosCache &ToolChain::predefinedMacrosCache() const
|
|||||||
|
|
||||||
static long toLanguageVersionAsLong(QByteArray dateAsByteArray)
|
static long toLanguageVersionAsLong(QByteArray dateAsByteArray)
|
||||||
{
|
{
|
||||||
dateAsByteArray.chop(1); // Strip 'L'.
|
if (dateAsByteArray.endsWith('L'))
|
||||||
|
dateAsByteArray.chop(1); // Strip 'L'.
|
||||||
|
|
||||||
bool success = false;
|
bool success = false;
|
||||||
const int result = dateAsByteArray.toLong(&success);
|
const int result = dateAsByteArray.toLong(&success);
|
||||||
|
Reference in New Issue
Block a user