2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Xcode build now uses codegen_style/numbers. Xcode projects created.

This commit is contained in:
John Preston
2016-04-19 13:59:59 +03:00
parent 6859109503
commit b4d69b847a
12 changed files with 951 additions and 109 deletions

View File

@@ -49,7 +49,7 @@ bool isWhitespaceChar(char ch) {
}
Token invalidToken() {
return { Type::Invalid, QString(), ConstUtf8String(nullptr, 0) };
return { Type::Invalid, QString(), ConstUtf8String(nullptr, 0), false };
}
} // namespace

View File

@@ -40,8 +40,9 @@ bool readFile(const QString &filepath, QByteArray *outResult) {
logError(kErrorFileNotFound, filepath) << ": error: file does not exist.";
return false;
}
if (f.size() > CleanFile::MaxSize) {
logError(kErrorFileTooLarge, filepath) << "' is too large, size=" << f.size() << " > maxsize=" << CleanFile::MaxSize;
auto limit = CleanFile::MaxSize;
if (f.size() > limit) {
logError(kErrorFileTooLarge, filepath) << "' is too large, size=" << f.size() << " > maxsize=" << limit;
return false;
}
if (!f.open(QIODevice::ReadOnly)) {

View File

@@ -48,7 +48,7 @@ QByteArray replaceStrings(const QString &filepath) {
QStringList lines = string.toString().split('\n');
for (auto &line : lines) {
auto match = QRegularExpression("^(\\d+;[A-Z]+;)([^;]+)(;.+)?$").match(line);
auto match = QRegularExpression("^(\\d+;[A-Z]+;)([^;]+)(;.*)?$").match(line);
if (match.hasMatch()) {
line = match.captured(1) + '"' + match.captured(2) + '"' + match.captured(3);
}