From c636fc2efed8ec16ce8e7ac6e86ccd4154db527d Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Mon, 27 Aug 2012 12:48:51 +0200 Subject: [PATCH] Core: Fix MSVC compiler warning about strdup Fix warning: C4996: 'strdup': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _strdup. By just using qstrdup. Change-Id: I40664b6ed763b27951d983ec13dcc638270a1beb Reviewed-by: hjk --- src/plugins/coreplugin/id.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/coreplugin/id.cpp b/src/plugins/coreplugin/id.cpp index 7c72042df74..1c3d10f5239 100644 --- a/src/plugins/coreplugin/id.cpp +++ b/src/plugins/coreplugin/id.cpp @@ -107,7 +107,7 @@ static int theId(const char *str) if (lastUid == 0) stringFromId.append(QByteArray()); res = ++lastUid; - sh.str = strdup(sh.str); + sh.str = qstrdup(sh.str); idFromString[sh] = res; stringFromId.append(QByteArray::fromRawData(sh.str, sh.n)); }