From 718a7a8ba68e10faa1a22fcc6bdc26e1723b2a40 Mon Sep 17 00:00:00 2001 From: drw Date: Wed, 17 Nov 2004 00:43:35 +0000 Subject: Some code clean-up items (thanks to zecke) --- (limited to 'noncore/settings/packagemanager/oipkg.cpp') diff --git a/noncore/settings/packagemanager/oipkg.cpp b/noncore/settings/packagemanager/oipkg.cpp index 1978ad5..b0cc94d 100644 --- a/noncore/settings/packagemanager/oipkg.cpp +++ b/noncore/settings/packagemanager/oipkg.cpp @@ -1,28 +1,28 @@ /* -                This file is part of the Opie Project + This file is part of the Opie Project -              Copyright (c) 2003 Dan Williams + Copyright (c) 2003 Dan Williams =. .=l. -           .>+-= - _;:,     .>    :=|. This program is free software; you can -.> <`_,   >  .   <= redistribute it and/or modify it under -:`=1 )Y*s>-.--   : the terms of the GNU Library General Public -.="- .-=="i,     .._ License as published by the Free Software - - .   .-<_>     .<> Foundation; either version 2 of the License, -     ._= =}       : or (at your option) any later version. -    .%`+i>       _;_. -    .i_,=:_.      -`: PARTICULAR PURPOSE. See the GNU -..}^=.=       =       ; Library General Public License for more -++=   -.     .`     .: details. - :     =  ...= . :.=- - -.   .:....=;==+<; You should have received a copy of the GNU -  -_. . .   )=.  = Library General Public License along with -    --        :-=` this library; see the file COPYING.LIB. + .>+-= +_;:, .> :=|. This program is free software; you can +.> <`_, > . <= redistribute it and/or modify it under +:`=1 )Y*s>-.-- : the terms of the GNU Library General Public +.="- .-=="i, .._ License as published by the Free Software +- . .-<_> .<> Foundation; either version 2 of the License, + ._= =} : or (at your option) any later version. + .%`+i> _;_. + .i_,=:_. -`: PARTICULAR PURPOSE. See the GNU +..}^=.= = ; Library General Public License for more +++= -. .` .: details. +: = ...= . :.=- +-. .:....=;==+<; You should have received a copy of the GNU + -_. . . )=. = Library General Public License along with + -- :-=` this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @@ -52,6 +52,8 @@ int fsignalIpkgMessage( ipkg_conf_t *conf, message_level_t level, char *msg ) return 0; else oipkg->ipkgMessage( msg ); + + return 0; } char *fIpkgResponse( char */*question*/ ) @@ -353,7 +355,7 @@ OPackageList *OIpkg::installedPackages( const QString &destName, const QString & return pl; } -bool OIpkg::executeCommand( OPackage::Command command, QStringList *parameters, const QString &destination, +bool OIpkg::executeCommand( OPackage::Command command, const QStringList ¶meters, const QString &destination, const QObject *receiver, const char *slotOutput, bool rawOutput ) { if ( command == OPackage::NotDefined ) @@ -403,7 +405,7 @@ bool OIpkg::executeCommand( OPackage::Command command, QStringList *parameters, break; case OPackage::Install : { connect( this, SIGNAL(signalIpkgMessage(char*)), receiver, slotOutput ); - for ( QStringList::Iterator it = parameters->begin(); it != parameters->end(); ++it ) + for ( QStringList::ConstIterator it = parameters.begin(); it != parameters.end(); ++it ) { ipkg_packages_install( &m_ipkgArgs, (*it) ); } @@ -411,7 +413,7 @@ bool OIpkg::executeCommand( OPackage::Command command, QStringList *parameters, break; case OPackage::Remove : { connect( this, SIGNAL(signalIpkgMessage(char*)), receiver, slotOutput ); - for ( QStringList::Iterator it = parameters->begin(); it != parameters->end(); ++it ) + for ( QStringList::ConstIterator it = parameters.begin(); it != parameters.end(); ++it ) { ipkg_packages_remove( &m_ipkgArgs, (*it), true ); } @@ -419,7 +421,7 @@ bool OIpkg::executeCommand( OPackage::Command command, QStringList *parameters, break; case OPackage::Download : { connect( this, SIGNAL(signalIpkgMessage(char*)), receiver, slotOutput ); - for ( QStringList::Iterator it = parameters->begin(); it != parameters->end(); ++it ) + for ( QStringList::ConstIterator it = parameters.begin(); it != parameters.end(); ++it ) { ipkg_packages_download( &m_ipkgArgs, (*it) ); } @@ -427,12 +429,12 @@ bool OIpkg::executeCommand( OPackage::Command command, QStringList *parameters, break; case OPackage::Info : { connect( this, SIGNAL(signalIpkgStatus(char*)), receiver, slotOutput ); - ipkg_packages_info( &m_ipkgArgs, (*parameters->begin()), &fIpkgStatus, 0x0 ); + ipkg_packages_info( &m_ipkgArgs, (*parameters.begin()), &fIpkgStatus, 0x0 ); }; break; case OPackage::Files : { connect( this, SIGNAL(signalIpkgList(char*)), receiver, slotOutput ); - ipkg_package_files( &m_ipkgArgs, (*parameters->begin()), &fIpkgFiles, 0x0 ); + ipkg_package_files( &m_ipkgArgs, (*parameters.begin()), &fIpkgFiles, 0x0 ); }; break; default : break; -- cgit v0.9.0.2