Review Request 127717: Fix error when destroying an default constructed KEduVocDocument
Hartmut Riesenbeck
hartmut.riesenbeck at gmx.de
Fri Apr 22 21:02:32 UTC 2016
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127717/
-----------------------------------------------------------
Review request for KDE Edu.
Repository: libkeduvocdocument
Description
-------
When a KEduVocDocument which was constructed by the default constructor
becomes destructed, the error message "QFile::remove: Empty or null
file name" is given on stderr.
Since the file name of the KAutoSaveFile was not set in the default
constructor, the KAutoSaveFile::remove() method in ~KEduVocDocument()
have given this error message. Removed this method call and the
following KAutoSaveFile::releaseLock(), because they are called in the
KAutoSaveFile destructor as well but with check for file name.
Added unit test emptydocumenttest to proof the bugfix.
Since I'm not a cmake expert, I hope the test was added in the right way. I would be thankful for improvements.
Diffs
-----
.gitignore PRE-CREATION
keduvocdocument/keduvocdocument.cpp feaebe45d98ec5e862dbb7b8e95c142a7d59c7ff
keduvocdocument/tests/CMakeLists.txt 366181de4376ce3dcbae349faca4108065661724
keduvocdocument/tests/emptydocumenttest.cpp PRE-CREATION
keduvocdocument/tests/emptydocumenttest.h.in PRE-CREATION
keduvocdocument/tests/emptydocumenttest_helper.cpp PRE-CREATION
Diff: https://git.reviewboard.kde.org/r/127717/diff/
Testing
-------
Unit test emptydocumenttest
Thanks,
Hartmut Riesenbeck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-edu/attachments/20160422/a6af3339/attachment.html>
More information about the kde-edu
mailing list