| 75 | } |
| 76 | |
| 77 | bool 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 | |
| 100 | void writeChanges(const QString &fileName, const QStringList &lines) |
| 101 | { |