File indexing completed on 2025-01-05 03:56:11
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2015-08-08 0007 * Description : DTrash item info container 0008 * 0009 * SPDX-FileCopyrightText: 2015 by Mohamed_Anwer <m_dot_anwer at gmx dot com> 0010 * 0011 * SPDX-License-Identifier: GPL-2.0-or-later 0012 * 0013 * ============================================================ */ 0014 0015 #include "dtrashiteminfo.h" 0016 0017 // Qt includes 0018 0019 #include <QDebug> 0020 0021 namespace Digikam 0022 { 0023 0024 DTrashItemInfo::DTrashItemInfo() 0025 : imageId(-1) 0026 { 0027 } 0028 0029 bool DTrashItemInfo::isNull() const 0030 { 0031 return ( 0032 trashPath.isEmpty() && 0033 jsonFilePath.isEmpty() && 0034 collectionPath.isEmpty() && 0035 collectionRelativePath.isEmpty() && 0036 deletionTimestamp.isNull() && 0037 (imageId == -1) 0038 ); 0039 } 0040 0041 bool DTrashItemInfo::operator==(const DTrashItemInfo& itemInfo) const 0042 { 0043 return (trashPath == itemInfo.trashPath); 0044 } 0045 0046 QDebug operator<<(QDebug dbg, const DTrashItemInfo& info) 0047 { 0048 dbg.nospace() << "DTrashItemInfo:"; 0049 dbg.nospace() << "\ntrashPath: " << info.trashPath; 0050 dbg.nospace() << "\njsonFilePath: " << info.jsonFilePath; 0051 dbg.nospace() << "\nCollectionPath: " << info.collectionPath; 0052 dbg.nospace() << "\nRelativePath: " << info.collectionRelativePath; 0053 dbg.nospace() << "\nDeletionTimestamp: " << info.deletionTimestamp.toString(); 0054 dbg.nospace() << "\nImage id: " << QString::number(info.imageId) << "\n"; 0055 0056 return dbg.space(); 0057 } 0058 0059 } // namespace Digikam