File indexing completed on 2025-01-05 03:56:27

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2006-09-15
0007  * Description : Exiv2 library interface.
0008  *               Internal private data container.
0009  *
0010  * SPDX-FileCopyrightText: 2006-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0011  * SPDX-FileCopyrightText: 2006-2013 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
0012  *
0013  * SPDX-License-Identifier: GPL-2.0-or-later
0014  *
0015  * ============================================================ */
0016 
0017 #include "metaengine_data_p.h"
0018 
0019 // Local includes
0020 
0021 #include "digikam_debug.h"
0022 
0023 namespace Digikam
0024 {
0025 
0026 void MetaEngineData::Private::clear()
0027 {
0028     QMutexLocker lock(&s_metaEngineMutex);
0029 
0030     try
0031     {
0032         imageComments.clear();
0033         exifMetadata.clear();
0034         iptcMetadata.clear();
0035 
0036 #ifdef _XMP_SUPPORT_
0037 
0038         xmpMetadata.clear();
0039 
0040 #endif
0041 
0042     }
0043     catch (Exiv2::AnyError& e)
0044     {
0045         qCCritical(DIGIKAM_METAENGINE_LOG) << "Cannot clear data container with Exiv2 "
0046                                            << "(Error #" << (int)e.code() << ": "
0047                                            << QString::fromStdString(e.what())
0048                                            << ")";
0049     }
0050     catch (...)
0051     {
0052         qCCritical(DIGIKAM_METAENGINE_LOG) << "Default exception from Exiv2";
0053     }
0054 
0055 }
0056 
0057 } // namespace Digikam