mirror of
https://github.com/QuasarApp/qca.git
synced 2025-04-27 03:54:31 +00:00
Enable all clazy level 0 tests except one
one: containter-anti-pattern, needs some bigger rework
This commit is contained in:
parent
dce16514fe
commit
294cf98f59
@ -23,4 +23,4 @@ build_clazy:
|
||||
script:
|
||||
- mkdir -p build && cd build
|
||||
- CC=clang CXX=clazy CXXFLAGS="-Werror -Wno-deprecated-declarations" cmake -G Ninja ..
|
||||
- CLAZY_CHECKS="missing-qobject-macro" ninja
|
||||
- CLAZY_CHECKS="level0,missing-qobject-macro,no-container-anti-pattern" ninja
|
||||
|
@ -4016,7 +4016,7 @@ public:
|
||||
BN_free(bn);
|
||||
|
||||
// validity period
|
||||
ASN1_TIME_set(X509_get_notBefore(x), QDateTime::currentDateTime().toUTC().toTime_t());
|
||||
ASN1_TIME_set(X509_get_notBefore(x), QDateTime::currentDateTimeUtc().toTime_t());
|
||||
ASN1_TIME_set(X509_get_notAfter(x), notValidAfter.toTime_t());
|
||||
|
||||
X509_set_pubkey(x, static_cast<const MyPKeyContext*>(req.subjectPublicKey()) -> get_pkey());
|
||||
|
@ -451,10 +451,10 @@ private Q_SLOTS:
|
||||
else
|
||||
name = e.keyStoreInfo().name();
|
||||
}
|
||||
str = QString("Enter %1 for %2").arg(type).arg(name);
|
||||
str = QString("Enter %1 for %2").arg(type, name);
|
||||
}
|
||||
else if(!e.fileName().isEmpty())
|
||||
str = QString("Enter %1 for %2").arg(type).arg(e.fileName());
|
||||
str = QString("Enter %1 for %2").arg(type, e.fileName());
|
||||
else
|
||||
str = QString("Enter %1").arg(type);
|
||||
|
||||
@ -1251,7 +1251,7 @@ static QCA::CertificateOptions promptForCertAttributes(bool advanced, bool req)
|
||||
continue;
|
||||
}
|
||||
|
||||
QDateTime start = QDateTime::currentDateTime().toUTC();
|
||||
QDateTime start = QDateTime::currentDateTimeUtc();
|
||||
QDateTime end = start;
|
||||
if(vl.years > 0)
|
||||
end = end.addYears(vl.years);
|
||||
@ -1420,7 +1420,7 @@ static QVariantMap provider_config_edit_generic(const QVariantMap &in)
|
||||
|
||||
// fields must be bool, int, or string
|
||||
QVariant newval;
|
||||
QString prompt = QString("%1: [%2] ").arg(var).arg(val.toString());
|
||||
QString prompt = QString("%1: [%2] ").arg(var, val.toString());
|
||||
if(variant_is_bool(val))
|
||||
newval = prompt_for_bool(QString("bool ") + prompt, val.toBool());
|
||||
else if(variant_is_int(val))
|
||||
@ -3970,7 +3970,7 @@ int main(int argc, char **argv)
|
||||
enc.setLineBreaksEnabled(true);
|
||||
enc.setLineBreaksColumn(76);
|
||||
QString sigtext = add_cr(enc.arrayToString(output));
|
||||
QString str = QString(mime_signed).arg(hashName).arg(QString::fromUtf8(plain)).arg(sigtext);
|
||||
QString str = QString(mime_signed).arg(hashName, QString::fromUtf8(plain), sigtext);
|
||||
output = str.toUtf8();
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,7 @@ bool my_qputenv(const char *varName, const QByteArray& value)
|
||||
|
||||
static int qca_setenv(const char *name, const char *value, int overwrite)
|
||||
{
|
||||
if (!overwrite && !qgetenv(name).isNull()) return 0;
|
||||
if (!overwrite && qEnvironmentVariableIsSet(name)) return 0;
|
||||
|
||||
if(my_qputenv(name, QByteArray(value)))
|
||||
return 0; // success
|
||||
|
Loading…
x
Reference in New Issue
Block a user