Skip to content

Commit

Permalink
fix compile issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Murmele committed Aug 24, 2022
1 parent 7bce21b commit ef5bda3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/git/Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ QString Config::value<QString>(const QString &key,
return defaultValue;
}

git_buf buf = GIT_BUF_INIT_CONST(nullptr, 0);
git_buf buf = GIT_BUF_INIT;
git_config_get_string_buf(&buf, d.data(), key.toUtf8());
QString value = QString::fromUtf8(buf.ptr, buf.size);
git_buf_dispose(&buf);
Expand Down
4 changes: 2 additions & 2 deletions src/git/Diff.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,10 @@ QByteArray Diff::print() {
QByteArray diff;
for (auto file : data.files) {
for (auto hunk : file.hunks) {
diff.append(hunk.header);
diff.append(hunk.header.toUtf8());

for (auto line : hunk.lines)
diff.append(line);
diff.append(line.toUtf8());
}
}
qDebug() << QString(diff);
Expand Down
2 changes: 1 addition & 1 deletion src/git/Remote.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ void Remote::log(const QString &text) {
return;

QString time = QTime::currentTime().toString(Qt::ISODateWithMs);
QTextStream(&file) << time << " - " << text << endl;
QTextStream(&file) << time << " - " << text << Qt::endl;
}

} // namespace git

0 comments on commit ef5bda3

Please sign in to comment.