Revision af60a9e...

Go back to digest for 1st January 2012

Features in Utilities

Raphael Kubo da Costa committed changes in [ark] /:

Merge Archive and ArchiveBase.

This commit only puts the ArchiveBase code into the Archive class
itself, including headers where needed. Further changes will come in
separate commits.

Digging through the history of these files is a bit difficult due to the
renames and the partial rewrite in the `libarchive-based-ark' work
branch.

This is what I was able to recover:
* A long time ago (since Ark was added to KDE's CVS repository), there
was arch.h, which provided a class named Arch. It was a virtual base
class, and plugins were implemented by subclassing it and
implementing its methods (such as open(), addFile() etc).
archiveinterface.h and archivebase.h did not exist.
* During the libarchive-based-ark rewrite, henrique committed a429011
(svn r676929) added archiveinterface.{cpp,h}. There was no
archivebase.h yet. The commit message only said "Cleanups".
* Later during the libarchive-based-ark work, henrique committed
10d49b6 (svn r686058), which created archivebase.{cpp,h} out of the
LibArchiveHandler class in the libarchive plugin and added a
ReadOnlyArchiveInterface pointer as a data member. ArchiveBase
inherited and implemented the interface defined in Arch.
* Still in the libarchive-based-ark branch, henrique committed 13980c2
(svn r690340), which removed arch.{cpp,h} and created
archive.{h,cpp}. Archive was also a pure virtual class, but was much
smaller and did not even inherit from QObject.

So even though plugins started inheriting from ReadOnlyArchiveInterface
as early as a429011, the Archive/ArchiveBase division persisted up to
now.

Since Archive is only inherited by ArchiveBase and the latter is not
inherited anywhere, the mental class diagram of Kerffuffle can be
simplified by merging both. The few unit tests we have still pass after
this change.

File Changes

Deleted 2 files
  •   kerfuffle/archivebase.cpp
  •   kerfuffle/archivebase.h
Modified 3 files
  •   kerfuffle/archive.cpp
  •   kerfuffle/archive.h
  •   kerfuffle/CMakeLists.txt
5 files changed in total