author | tille <tille> | 2002-05-12 09:32:43 (UTC) |
---|---|---|
committer | tille <tille> | 2002-05-12 09:32:43 (UTC) |
commit | 6f5ac2fbf69f019cc9d3a1522fc507c6b88d2bd6 (patch) (side-by-side diff) | |
tree | c584a13cb4b70f007435731b63c0f0c5e6d5460c | |
parent | 93eca505676b623407259bccf802e2069708dc36 (diff) | |
download | opie-6f5ac2fbf69f019cc9d3a1522fc507c6b88d2bd6.zip opie-6f5ac2fbf69f019cc9d3a1522fc507c6b88d2bd6.tar.gz opie-6f5ac2fbf69f019cc9d3a1522fc507c6b88d2bd6.tar.bz2 |
fixed mem leak
-rw-r--r-- | noncore/unsupported/oipkg/TODO | 5 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/mainwindow.cpp | 3 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/packagelist.cpp | 6 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/packagelistdoclnk.cpp | 3 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/packagelistremote.cpp | 1 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/pmipkg.cpp | 31 |
6 files changed, 28 insertions, 21 deletions
diff --git a/noncore/unsupported/oipkg/TODO b/noncore/unsupported/oipkg/TODO index 6de54ec..b92cbb0 100644 --- a/noncore/unsupported/oipkg/TODO +++ b/noncore/unsupported/oipkg/TODO @@ -1,4 +1,2 @@ * Settings Class -* tr() ;) -* Dialog to display ipkg output live * parse "to install" and "to remove" from status @@ -13,3 +11,2 @@ i.e. name, desc, files etc -* mark packages from doclnk and ipkgfind installed if installed -* show if different version is installed
\ No newline at end of file +* display new list after update
\ No newline at end of file diff --git a/noncore/unsupported/oipkg/mainwindow.cpp b/noncore/unsupported/oipkg/mainwindow.cpp index 2fa91e3..19a1420 100644 --- a/noncore/unsupported/oipkg/mainwindow.cpp +++ b/noncore/unsupported/oipkg/mainwindow.cpp @@ -94,3 +94,4 @@ void MainWindow::makeMenu() - QLabel *spacer = new QLabel( "", toolBar ); + QLabel *spacer; +// spacer = new QLabel( "", toolBar ); // spacer->setBackgroundColor( toolBar->backgroundColor() ); diff --git a/noncore/unsupported/oipkg/packagelist.cpp b/noncore/unsupported/oipkg/packagelist.cpp index 2fc4c41..fdd1163 100644 --- a/noncore/unsupported/oipkg/packagelist.cpp +++ b/noncore/unsupported/oipkg/packagelist.cpp @@ -10,2 +10,3 @@ static QDict<Package> *packageListAll; +static int packageListAllRefCount = 0; @@ -16,2 +17,3 @@ PackageList::PackageList() if (!packageListAll) packageListAll = new QDict<Package>(); + packageListAllRefCount++; sections << "All"; @@ -33,2 +35,3 @@ PackageList::~PackageList() { + if (--packageListAllRefCount < 1 ) delete packageListAll; } @@ -53,3 +56,3 @@ void PackageList::insertPackage( Package* pack ) { - packver = new QDict<Package>; + packver = new QDict<Package>(); packver->insert( pack->name(), p ); @@ -184,2 +187,3 @@ void PackageList::readFileEntries( QString filename, QString dest ) } + delete statusStream; return; diff --git a/noncore/unsupported/oipkg/packagelistdoclnk.cpp b/noncore/unsupported/oipkg/packagelistdoclnk.cpp index 1d10adf..f31f742 100644 --- a/noncore/unsupported/oipkg/packagelistdoclnk.cpp +++ b/noncore/unsupported/oipkg/packagelistdoclnk.cpp @@ -31,2 +31,3 @@ PackageListDocLnk::~PackageListDocLnk() cfg.writeEntry( "docLnkDir", docLnkDir ); + delete doclnkset; } @@ -41,3 +42,3 @@ void PackageListDocLnk::update() { - insertPackage( new Package(pack->file(), settings) ); + insertPackage( new Package(pack->file(), settings ) ); } diff --git a/noncore/unsupported/oipkg/packagelistremote.cpp b/noncore/unsupported/oipkg/packagelistremote.cpp index ee54fca..e37f256 100644 --- a/noncore/unsupported/oipkg/packagelistremote.cpp +++ b/noncore/unsupported/oipkg/packagelistremote.cpp @@ -31,2 +31,3 @@ void PackageListRemote::update() pvDebug(2,"PackageListRemote::update"); + if (searchString.isEmpty()) return; int r=0; diff --git a/noncore/unsupported/oipkg/pmipkg.cpp b/noncore/unsupported/oipkg/pmipkg.cpp index f2852c3..6ef6d19 100644 --- a/noncore/unsupported/oipkg/pmipkg.cpp +++ b/noncore/unsupported/oipkg/pmipkg.cpp @@ -53,3 +53,3 @@ bool PmIpkg::runIpkg(const QString& args, const QString& dest ) - if (installDialog->_force_depends) + if (installDialog && installDialog->_force_depends) { @@ -89,2 +89,3 @@ bool PmIpkg::runIpkg(const QString& args, const QString& dest ) lineStrOld = lineStr; + qApp->processEvents(); } @@ -158,2 +159,4 @@ void PmIpkg::processLinkDir( QString file, QString dest ) if (file == dest) return; +// if (linkOpp==createLink) out( "\ncreating links\n" ); +// if (linkOpp==removeLink) out( "\nremoving links\n" ); QFileInfo fileInfo( file ); @@ -267,14 +270,14 @@ void PmIpkg::remove() to_remove.at(i)->processed(); + if ( to_remove.at(i)->link() ) + processFileList( fileList, to_remove.at(i)->dest() ); to_remove.take( i ); - out("\n\n"); + out("\n"); }else{ out(tr("Error while removing")+to_remove.at(i)->name()+"\n"); + if ( to_remove.at(i)->link() ) + processFileList( fileList, to_remove.at(i)->dest() ); } if ( to_remove.at(i)->link() ) - { - out( "\nremoving links\n" ); - out( "for package "+to_remove.at(i)->name()+" in "+to_remove.at(i)->dest()+"\n" ); processFileList( fileList, to_remove.at(i)->dest() ); - } if ( to_remove.at(i)->link() )delete fileList; @@ -292,2 +295,3 @@ void PmIpkg::install() { + qDebug("install loop %i of %i installing %s",i,to_install.count(),to_install.at(i)->installName().latin1()); //pvDebug if ( runIpkg("install " + to_install.at(i)->installName(), to_install.at(i)->dest() )) @@ -296,13 +300,12 @@ void PmIpkg::install() to_install.at(i)->processed(); + linkOpp = createLink; + if ( to_install.at(i)->link() ) + makeLinks( to_install.at(i) ); to_install.take( i ); - out("\n\n"); + out("\n"); }else{ out(tr("Error while installing")+to_install.at(i)->name()+"\n"); - } - linkOpp = createLink; - if ( to_install.at(i)->link() ) - { - out( "\ncreating links\n" ); - out( "for package "+to_install.at(i)->name()+" in "+to_install.at(i)->dest()+"\n" ); - makeLinks( to_install.at(i) ); + linkOpp = createLink; + if ( to_install.at(i)->link() ) + makeLinks( to_install.at(i) ); } |