MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / checkSignature

Function checkSignature

tools/normalize/main.cpp:77–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75}
76
77bool checkSignature(const QString &fileName, QString &line, const char *sig)
78{
79 static QStringList fileList;
80
81 int idx = -1;
82 bool found = false;
83 while ((idx = line.indexOf(sig, ++idx)) != -1) {
84 const QByteArray sl(signature(line, idx).toLocal8Bit());
85 QByteArray nsl(QMetaObject::normalizedSignature(sl.constData()));
86 if (sl != nsl) {
87 found = true;
88 if (printFilename && !fileList.contains(fileName)) {
89 fileList.prepend(fileName);
90 printf("%s\n", fileName.toLocal8Bit().constData());
91 }
92 if (modify)
93 line.replace(sl, nsl);
94 //qDebug("expected '%s', got '%s'", nsl.data(), sl.data());
95 }
96 }
97 return found;
98}
99
100void writeChanges(const QString &fileName, const QStringList &lines)
101{

Callers 1

checkFunction · 0.85

Calls 2

signatureFunction · 0.85
containsMethod · 0.45

Tested by

no test coverage detected