Strange access types on KArchive pure virtuals

Richard Dale richard_dale at tipitina.demon.co.uk
Fri Apr 27 13:58:56 BST 2007


In the karchive.h header these pure virtual methods are defined with accesss 
protected:

KArchive protected:

virtual bool openArchive( QIODevice::OpenMode mode ) = 0;
virtual bool closeArchive() = 0;
virtual bool doWriteDir( const QString& name, const QString& user,
                           const QString& group,
                            mode_t perm, time_t atime, time_t mtime, 
                            time_t ctime ) = 0;
virtual bool doWriteSymLink(const QString &name, const QString &target,
                            const QString &user, const QString &group,
                            mode_t perm, time_t atime, time_t mtime, 
                           time_t ctime) = 0;
virtual bool doPrepareWriting( const QString& name, const QString& user,
                                const QString& group, qint64 size, 
                                mode_t perm, time_t atime, time_t mtime, 
                                time_t ctime ) = 0;
virtual bool doFinishWriting( qint64 size ) = 0;

However, in the subclasses of KArchive, KAr, KTar and KZip they are sometimes 
declared with access public:

KAr public:
doWriteDir()
doWriteSymLink()
doPrepareWriting()
doFinishWriting()
  
KTar public:
doWriteDir()
doWriteSymLink()
doPrepareWriting()
doFinishWriting()
 
KZip public:
doWriteSymLink()
doPrepareWriting()
doFinishWriting()
 
Shouldn't the corresponding pure virtual methods in karchive.h be public too? 

-- Richard




More information about the kde-core-devel mailing list