CVS commit by mornfall: Implement OpProgressDialog. It is used by libcapture automatically if libkapture's KaptureManager is instantiated (KaptureManager registers OpProgressDialogFactory as the default OpProgressFactory).
A libkapture/opprogressdialog.cpp 1.1 [no copyright] A libkapture/opprogressdialog.h 1.1 [no copyright] M +3 -1 libcapture/opprogress.h 1.2 M +1 -0 libcapture/pkgmanager.cpp 1.44 M +1 -1 libkapture/Makefile.am 1.19 M +2 -0 libkapture/kapturemanager.cpp 1.32 --- kdenonbeta/kdedebian/kapture/libcapture/opprogress.h #1.1:1.2 @@ -32,6 +32,8 @@ namespace capture static OpProgress *create (void) { return s_inst ? s_inst -> doCreate () : new OpProgress; } - OpProgress *doCreate (void) { + virtual OpProgress *doCreate (void) { return new OpProgress; } + static void setInst (OpProgressFactory *f) { + s_inst = f; } }; --- kdenonbeta/kdedebian/kapture/libcapture/pkgmanager.cpp #1.43:1.44 @@ -181,4 +181,5 @@ bool PkgManager::loadCache () notifyRebuild (); notifyCacheWriteableChange (); + delete prog; return true; } --- kdenonbeta/kdedebian/kapture/libkapture/Makefile.am #1.18:1.19 @@ -37,5 +37,5 @@ summaryviewui.ui summaryview.cpp\ kapturemanager.cpp dpkgpm.cpp \ - groupersetupwidget.cpp + groupersetupwidget.cpp opprogressdialog.cpp libkapture_la_LDFLAGS = $(all_libraries) -no-undefined --- kdenonbeta/kdedebian/kapture/libkapture/kapturemanager.cpp #1.31:1.32 @@ -13,4 +13,5 @@ #include <libkapture/dpkgpm.h> #include <iostream> +#include "opprogressdialog.h" using namespace capture; @@ -27,4 +28,5 @@ KaptureManager::KaptureManager (int) m_elemCur = m_elemHist . end (); PkgManager::instance (); + OpProgressFactory::setInst (new OpProgressDialogFactory); m_top = 0; m_acqStatus = 0;