summaryrefslogtreecommitdiff
path: root/noncore/settings/packagemanager/oipkg.cpp
authordrw <drw>2004-11-17 00:43:35 (UTC)
committer drw <drw>2004-11-17 00:43:35 (UTC)
commit718a7a8ba68e10faa1a22fcc6bdc26e1723b2a40 (patch) (unidiff)
treea6bf4f10db4141ba7098d76d0444bd4d1dd759c1 /noncore/settings/packagemanager/oipkg.cpp
parent216434aff5921f3c3c2efc9adb58e653a5d224b3 (diff)
downloadopie-718a7a8ba68e10faa1a22fcc6bdc26e1723b2a40.zip
opie-718a7a8ba68e10faa1a22fcc6bdc26e1723b2a40.tar.gz
opie-718a7a8ba68e10faa1a22fcc6bdc26e1723b2a40.tar.bz2
Some code clean-up items (thanks to zecke)
Diffstat (limited to 'noncore/settings/packagemanager/oipkg.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/packagemanager/oipkg.cpp56
1 files changed, 29 insertions, 27 deletions
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 @@
1/* 1/*
2                This file is part of the Opie Project 2 This file is part of the Opie Project
3 3
4              Copyright (c) 2003 Dan Williams <drw@handhelds.org> 4 Copyright (c) 2003 Dan Williams <drw@handhelds.org>
5 =. 5 =.
6 .=l. 6 .=l.
7           .>+-= 7 .>+-=
8 _;:,     .>    :=|. This program is free software; you can 8_;:, .> :=|. This program is free software; you can
9.> <`_,   >  .   <= redistribute it and/or modify it under 9.> <`_, > . <= redistribute it and/or modify it under
10:`=1 )Y*s>-.--   : the terms of the GNU Library General Public 10:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
11.="- .-=="i,     .._ License as published by the Free Software 11.="- .-=="i, .._ License as published by the Free Software
12 - .   .-<_>     .<> Foundation; either version 2 of the License, 12- . .-<_> .<> Foundation; either version 2 of the License,
13     ._= =}       : or (at your option) any later version. 13 ._= =} : or (at your option) any later version.
14    .%`+i>       _;_. 14 .%`+i> _;_.
15    .i_,=:_.      -<s. This program is distributed in the hope that 15 .i_,=:_. -<s. This program is distributed in the hope that
16     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY; 16 + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
17    : ..    .:,     . . . without even the implied warranty of 17 : .. .:, . . . without even the implied warranty of
18    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A 18 =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
19  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU 19 _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
20..}^=.=       =       ; Library General Public License for more 20..}^=.= = ; Library General Public License for more
21++=   -.     .`     .: details. 21++= -. .` .: details.
22 :     =  ...= . :.=- 22: = ...= . :.=-
23 -.   .:....=;==+<; You should have received a copy of the GNU 23-. .:....=;==+<; You should have received a copy of the GNU
24  -_. . .   )=.  = Library General Public License along with 24 -_. . . )=. = Library General Public License along with
25    --        :-=` this library; see the file COPYING.LIB. 25 -- :-=` this library; see the file COPYING.LIB.
26 If not, write to the Free Software Foundation, 26 If not, write to the Free Software Foundation,
27 Inc., 59 Temple Place - Suite 330, 27 Inc., 59 Temple Place - Suite 330,
28 Boston, MA 02111-1307, USA. 28 Boston, MA 02111-1307, USA.
@@ -52,6 +52,8 @@ int fsignalIpkgMessage( ipkg_conf_t *conf, message_level_t level, char *msg )
52 return 0; 52 return 0;
53 else 53 else
54 oipkg->ipkgMessage( msg ); 54 oipkg->ipkgMessage( msg );
55
56 return 0;
55} 57}
56 58
57char *fIpkgResponse( char */*question*/ ) 59char *fIpkgResponse( char */*question*/ )
@@ -353,7 +355,7 @@ OPackageList *OIpkg::installedPackages( const QString &destName, const QString &
353 return pl; 355 return pl;
354} 356}
355 357
356bool OIpkg::executeCommand( OPackage::Command command, QStringList *parameters, const QString &destination, 358bool OIpkg::executeCommand( OPackage::Command command, const QStringList &parameters, const QString &destination,
357 const QObject *receiver, const char *slotOutput, bool rawOutput ) 359 const QObject *receiver, const char *slotOutput, bool rawOutput )
358{ 360{
359 if ( command == OPackage::NotDefined ) 361 if ( command == OPackage::NotDefined )
@@ -403,7 +405,7 @@ bool OIpkg::executeCommand( OPackage::Command command, QStringList *parameters,
403 break; 405 break;
404 case OPackage::Install : { 406 case OPackage::Install : {
405 connect( this, SIGNAL(signalIpkgMessage(char*)), receiver, slotOutput ); 407 connect( this, SIGNAL(signalIpkgMessage(char*)), receiver, slotOutput );
406 for ( QStringList::Iterator it = parameters->begin(); it != parameters->end(); ++it ) 408 for ( QStringList::ConstIterator it = parameters.begin(); it != parameters.end(); ++it )
407 { 409 {
408 ipkg_packages_install( &m_ipkgArgs, (*it) ); 410 ipkg_packages_install( &m_ipkgArgs, (*it) );
409 } 411 }
@@ -411,7 +413,7 @@ bool OIpkg::executeCommand( OPackage::Command command, QStringList *parameters,
411 break; 413 break;
412 case OPackage::Remove : { 414 case OPackage::Remove : {
413 connect( this, SIGNAL(signalIpkgMessage(char*)), receiver, slotOutput ); 415 connect( this, SIGNAL(signalIpkgMessage(char*)), receiver, slotOutput );
414 for ( QStringList::Iterator it = parameters->begin(); it != parameters->end(); ++it ) 416 for ( QStringList::ConstIterator it = parameters.begin(); it != parameters.end(); ++it )
415 { 417 {
416 ipkg_packages_remove( &m_ipkgArgs, (*it), true ); 418 ipkg_packages_remove( &m_ipkgArgs, (*it), true );
417 } 419 }
@@ -419,7 +421,7 @@ bool OIpkg::executeCommand( OPackage::Command command, QStringList *parameters,
419 break; 421 break;
420 case OPackage::Download : { 422 case OPackage::Download : {
421 connect( this, SIGNAL(signalIpkgMessage(char*)), receiver, slotOutput ); 423 connect( this, SIGNAL(signalIpkgMessage(char*)), receiver, slotOutput );
422 for ( QStringList::Iterator it = parameters->begin(); it != parameters->end(); ++it ) 424 for ( QStringList::ConstIterator it = parameters.begin(); it != parameters.end(); ++it )
423 { 425 {
424 ipkg_packages_download( &m_ipkgArgs, (*it) ); 426 ipkg_packages_download( &m_ipkgArgs, (*it) );
425 } 427 }
@@ -427,12 +429,12 @@ bool OIpkg::executeCommand( OPackage::Command command, QStringList *parameters,
427 break; 429 break;
428 case OPackage::Info : { 430 case OPackage::Info : {
429 connect( this, SIGNAL(signalIpkgStatus(char*)), receiver, slotOutput ); 431 connect( this, SIGNAL(signalIpkgStatus(char*)), receiver, slotOutput );
430 ipkg_packages_info( &m_ipkgArgs, (*parameters->begin()), &fIpkgStatus, 0x0 ); 432 ipkg_packages_info( &m_ipkgArgs, (*parameters.begin()), &fIpkgStatus, 0x0 );
431 }; 433 };
432 break; 434 break;
433 case OPackage::Files : { 435 case OPackage::Files : {
434 connect( this, SIGNAL(signalIpkgList(char*)), receiver, slotOutput ); 436 connect( this, SIGNAL(signalIpkgList(char*)), receiver, slotOutput );
435 ipkg_package_files( &m_ipkgArgs, (*parameters->begin()), &fIpkgFiles, 0x0 ); 437 ipkg_package_files( &m_ipkgArgs, (*parameters.begin()), &fIpkgFiles, 0x0 );
436 }; 438 };
437 break; 439 break;
438 default : break; 440 default : break;