What they do in the examples is that they mock the whole QNAM library, i.e. create a stand-alone separate library that looks totally like QNAM, implements the same interfaces, but instead of the real QNAM implementation all the methods just pass the ball to the mocking framework as in the following:
@
QNetworkCookie &QNetworkCookie::operator=(const QNetworkCookie &other)
{
QVector<QGenericArgument> args;
args.append(Q_ARG(const QNetworkCookie &, other));
QTMOCK_METHOD_DOACTIONS("QNetworkCookie", "operator=", QRET_REF(QNetworkCookie), &args, NULL);
}
@