File indexing completed on 2024-05-12 04:51:06
0001 /* 0002 SPDX-FileCopyrightText: 2011 Michal Malek <michalm@jabster.pl> 0003 SPDX-FileCopyrightText: 1998-2008 Sebastian Trueg <trueg@k3b.org> 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #include "k3bsessionimportitem.h" 0008 #include "k3bfileitem.h" 0009 #include "k3bdiritem.h" 0010 #include "k3b_i18n.h" 0011 0012 #include "k3biso9660.h" 0013 0014 0015 namespace K3b { 0016 0017 SessionImportItem::SessionImportItem( const Iso9660File* isoF ) 0018 : SpecialDataItem( isoF->size(), isoF->name(), OLD_SESSION ), 0019 m_replaceItem(0) 0020 { 0021 } 0022 0023 0024 SessionImportItem::SessionImportItem( const SessionImportItem& item ) 0025 : SpecialDataItem( item ), 0026 m_replaceItem( item.m_replaceItem ) 0027 { 0028 } 0029 0030 0031 SessionImportItem::~SessionImportItem() 0032 { 0033 if( m_replaceItem ) 0034 m_replaceItem->setReplacedItemFromOldSession(0); 0035 0036 // remove this from parentdir 0037 if( parent() ) 0038 parent()->takeDataItem( this ); 0039 } 0040 0041 0042 DataItem* SessionImportItem::copy() const 0043 { 0044 return new SessionImportItem( *this ); 0045 } 0046 0047 } // namespace K3b