Commit cd028ac1 authored by Tobias Hunger's avatar Tobias Hunger
Browse files

Do not pass a file that we know to be broken to QTextStream



Change-Id: I1a593af642c70ca7a0654163e7a32d405a1c2aa6
Reviewed-by: default avatarOswald Buddenhagen <oswald.buddenhagen@digia.com>
parent 8cd56cf6
......@@ -203,9 +203,11 @@ void SuppressionDialog::accept()
QTC_ASSERT(!m_suppressionEdit->toPlainText().trimmed().isEmpty(), return);
Utils::FileSaver saver(path, QIODevice::Append);
QTextStream stream(saver.file());
stream << m_suppressionEdit->toPlainText();
saver.setResult(&stream);
if (!saver.hasError()) {
QTextStream stream(saver.file());
stream << m_suppressionEdit->toPlainText();
saver.setResult(&stream);
}
if (!saver.finalize(this))
return;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment