Ejemplo n.º 1
0
    void testFromString()
    {
        QFETCH(QString, id);
        QFETCH(bool, valid);
        QFETCH(int, majorVersion);
        QFETCH(int, minorVersion);
        QFETCH(bool, isDebug);
        QFETCH(QString, arch);
        QFETCH(QString, compiler);
#ifdef Q_OS_WIN
        QFETCH(QString, compilerVersion);
#endif
        const ProbeABI abi = ProbeABI::fromString(id);
        QCOMPARE(abi.isValid(), valid);
        if (!valid)
            return;

        QCOMPARE(abi.majorQtVersion(), majorVersion);
        QCOMPARE(abi.minorQtVersion(), minorVersion);
        QCOMPARE(abi.architecture(), arch);
        if (abi.isDebugRelevant()) {
            QCOMPARE(abi.isDebug(), isDebug);
        }
#ifdef Q_OS_WIN
        QCOMPARE(abi.compiler(), compiler);
        QCOMPARE(abi.compilerVersion(), compilerVersion);
#else
        Q_UNUSED(compiler);
#endif
    }
Ejemplo n.º 2
0
bool ProbeABI::operator==(const ProbeABI &rhs) const
{
    return majorQtVersion() == rhs.majorQtVersion()
           && minorQtVersion() == rhs.minorQtVersion()
           && architecture() == rhs.architecture()
           && compiler() == rhs.compiler()
           && compilerVersion() == rhs.compilerVersion()
           && isDebug() == rhs.isDebug();
}
Ejemplo n.º 3
0
bool ProbeABI::isCompatible(const ProbeABI &referenceABI) const
{
    return d->majorQtVersion == referenceABI.majorQtVersion()
           && d->minorQtVersion >= referenceABI.minorQtVersion() // we can work with older probes, since the target defines the Qt libraries being used
           && d->architecture == referenceABI.architecture()
#ifdef Q_OS_WIN
           && d->compiler == referenceABI.compiler()
           && d->compilerVersion == referenceABI.compilerVersion()
#endif
           && (isDebugRelevant() ? d->isDebug == referenceABI.isDebug() : true)
    ;
}