Fix Qgpgme build for macos
* lang/qt/src/dn.cpp: Include string.h (parse_dn_part): Use qstrdup. * lang/qt/tests/t-support.h (getPassphrase): Use qstrdup.
This commit is contained in:
parent
2e661b9e1a
commit
efe58fe011
@ -37,6 +37,8 @@
|
|||||||
|
|
||||||
#include "dn.h"
|
#include "dn.h"
|
||||||
|
|
||||||
|
#include <strings.h>
|
||||||
|
|
||||||
static const struct {
|
static const struct {
|
||||||
const char *name;
|
const char *name;
|
||||||
const char *oid;
|
const char *oid;
|
||||||
@ -165,7 +167,7 @@ parse_dn_part(DnPair *array, const unsigned char *string)
|
|||||||
for (unsigned int i = 0; i < numOidMaps; ++i)
|
for (unsigned int i = 0; i < numOidMaps; ++i)
|
||||||
if (!strcasecmp((char *)p, oidmap[i].oid)) {
|
if (!strcasecmp((char *)p, oidmap[i].oid)) {
|
||||||
free(p);
|
free(p);
|
||||||
p = strdup(oidmap[i].name);
|
p = qstrdup(oidmap[i].name);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
array->key = p;
|
array->key = p;
|
||||||
|
@ -42,7 +42,7 @@ public:
|
|||||||
char *getPassphrase(const char * /*useridHint*/, const char * /*description*/,
|
char *getPassphrase(const char * /*useridHint*/, const char * /*description*/,
|
||||||
bool /*previousWasBad*/, bool &/*canceled*/) Q_DECL_OVERRIDE
|
bool /*previousWasBad*/, bool &/*canceled*/) Q_DECL_OVERRIDE
|
||||||
{
|
{
|
||||||
return strdup("abc");
|
return qstrdup("abc");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
} // namespace GpgME
|
} // namespace GpgME
|
||||||
|
Loading…
Reference in New Issue
Block a user