All translations

Enter a message name below to show all available translations.

Message

Found 2 translations.

NameCurrent message text
 h English (en)Now that we have our <tt>QByteArray</tt>, we use it to write to the file with <tt>QSaveFile::write()</tt>. If we were using a normal <tt>QFile</tt>, this would make the changes immediately. However, if a problem occurred partway through writing, the file would become corrupted. For this reason, <tt>QSaveFile</tt> works by first writing to a temporary file and then, when you call <tt>QSaveFile::commit()</tt> the changes are made to the actual file. <tt>commit()</tt> also closes the file.
 h Brazilian Portuguese (pt-br)Agora que temos nosso <tt>QByteArray</tt>, usamos o para gravar no arquivo com <tt>QSaveFile::write()</tt>. Se estivéssemos usando um <tt>QFile</tt> normal, isso faria as alterações imediatamente. No entanto, se um problema ocorresse parcialmente durante a gravação, o arquivo seria corrompido. Por esse motivo, <tt>QSaveFile</tt> funciona primeiro escrevendo em um arquivo temporário e, em seguida, quando você chama <tt>QSaveFile::commit()</tt> as alterações são feitas no arquivo real. <tt>commit() </tt> também fecha o arquivo.