Changeset View
Changeset View
Standalone View
Standalone View
src/writer_p.h
Show All 18 Lines | |||||
19 | * You should have received a copy of the GNU Lesser General Public | 19 | * You should have received a copy of the GNU Lesser General Public | ||
20 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. | 20 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. | ||
21 | * | 21 | * | ||
22 | */ | 22 | */ | ||
23 | 23 | | |||
24 | #ifndef KFILEMETADATA_WRITER_P_H | 24 | #ifndef KFILEMETADATA_WRITER_P_H | ||
25 | #define KFILEMETADATA_WRITER_P_H | 25 | #define KFILEMETADATA_WRITER_P_H | ||
26 | 26 | | |||
27 | #include "writerplugin.h" | ||||
28 | | ||||
27 | namespace KFileMetaData { | 29 | namespace KFileMetaData { | ||
28 | 30 | | |||
29 | class WriterPlugin; | 31 | class WriterPlugin; | ||
30 | 32 | | |||
31 | class Q_DECL_HIDDEN Writer::WriterPrivate | 33 | class Writer::WriterPrivate | ||
32 | { | 34 | { | ||
33 | public: | 35 | public: | ||
36 | ~WriterPrivate() { | ||||
37 | if (m_autoDeletePlugin == AutoDeletePlugin) { | ||||
38 | delete m_plugin; | ||||
39 | } | ||||
40 | } | ||||
41 | | ||||
34 | WriterPlugin *m_plugin = nullptr; | 42 | WriterPlugin *m_plugin = nullptr; | ||
43 | | ||||
44 | WriterPluginOwnership m_autoDeletePlugin = AutoDeletePlugin; | ||||
35 | }; | 45 | }; | ||
36 | 46 | | |||
37 | } | 47 | } | ||
38 | 48 | | |||
39 | #endif | 49 | #endif | ||
40 | 50 | |