Strange access types on KArchive pure virtuals
Frank Osterfeld
frank at kdab.net
Fri Apr 27 17:11:39 BST 2007
On Friday 27 April 2007 14:58:56 Richard Dale wrote:
> In the karchive.h header these pure virtual methods are defined with
> accesss 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;
> [...]
> 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?
I'd say, judging by the code snippets, that the implementations should be
protected instead.
--
Frank Osterfeld -- frank at kdab.net
Klarälvdalens Datakonsult AB, Platform-independent software solutions
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070427/deb281f6/attachment.sig>
More information about the kde-core-devel
mailing list