Skip to content

Commit

Permalink
Merge 9b9212b into ba9fba3
Browse files Browse the repository at this point in the history
  • Loading branch information
agarny committed Feb 22, 2019
2 parents ba9fba3 + 9b9212b commit c7f852a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions src/plugins/miscellaneous/Core/src/corecliutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -325,16 +325,19 @@ QString fileSha1(const QString &pFileName)
{
// Return the SHA-1 value of the given file

QString res = QString();
QFile file(pFileName);

if (file.open(QFile::ReadOnly)) {
QCryptographicHash hash(QCryptographicHash::Sha1);

if (hash.addData(&file))
return hash.result();
res = hash.result();

file.close();
}

return QString();
return res;
}

//==============================================================================
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/miscellaneous/HelpWindow/src/helpwindowwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ HelpWindowWidget::~HelpWindowWidget()

// Delete the help files

QFile(mQchFileName).remove();
QFile(mQhcFileName).remove();
QFile::remove(mQchFileName);
QFile::remove(mQhcFileName);
}

//==============================================================================
Expand Down

0 comments on commit c7f852a

Please sign in to comment.