QFile is open but not closed
Needs RevisionPublic

Authored by allknow on Mar 22 2020, 11:21 AM.

Details

Reviewers
drosca
Summary

src/plugins/VerticalTabs/verticaltabsplugin.cpp QFile is open but not closed

Test Plan

When QFile opens, it should be closed. However, I checked that the file was not closed

Diff Detail

Repository
R875 Falkon
Branch
allknow (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 24056
Build 24074: arc lint + arc unit
allknow created this revision.Mar 22 2020, 11:21 AM
Restricted Application added a project: Falkon. · View Herald TranscriptMar 22 2020, 11:21 AM
Restricted Application added a subscriber: falkon. · View Herald Transcript
allknow requested review of this revision.Mar 22 2020, 11:21 AM
allknow retitled this revision from # Enter a commit message. # # Changes: # # # src/plugins/VerticalTabs/verticaltabsplugin.cpp QFile is open but not closed # Summary: QFile is open but not closed to QFile is open but not closed.Mar 22 2020, 11:22 AM
allknow edited the summary of this revision. (Show Details)

The destructor of QFile will close it, doesn't it?

According to documentation it should be closed by Qt.
https://doc.qt.io/qt-5/qfile.html#dtor.QFile

QFile::~QFile()
Destroys the file object, closing it if necessary.

Sorry ... It's my mistake .. I'll study hard more..

drosca requested changes to this revision.Mar 25 2020, 6:19 AM
drosca added a subscriber: drosca.

QFile is closed in the destructor, this is not needed.

This revision now requires changes to proceed.Mar 25 2020, 6:19 AM