-rw-r--r-- | noncore/settings/packagemanager/filterdlg.cpp | 4 | ||||
-rw-r--r-- | noncore/settings/packagemanager/installdlg.cpp | 60 | ||||
-rw-r--r-- | noncore/settings/packagemanager/installdlg.h | 53 | ||||
-rw-r--r-- | noncore/settings/packagemanager/mainwindow.cpp | 42 | ||||
-rw-r--r-- | noncore/settings/packagemanager/mainwindow.h | 2 | ||||
-rw-r--r-- | noncore/settings/packagemanager/oconfitem.h | 46 | ||||
-rw-r--r-- | noncore/settings/packagemanager/oipkg.cpp | 56 | ||||
-rw-r--r-- | noncore/settings/packagemanager/oipkg.h | 51 | ||||
-rw-r--r-- | noncore/settings/packagemanager/opackagemanager.cpp | 56 | ||||
-rw-r--r-- | noncore/settings/packagemanager/opackagemanager.h | 57 | ||||
-rw-r--r-- | noncore/settings/packagemanager/packageinfodlg.cpp | 46 | ||||
-rw-r--r-- | noncore/settings/packagemanager/promptdlg.h | 52 |
12 files changed, 262 insertions, 263 deletions
diff --git a/noncore/settings/packagemanager/filterdlg.cpp b/noncore/settings/packagemanager/filterdlg.cpp index 0e1ea52..e69b6eb 100644 --- a/noncore/settings/packagemanager/filterdlg.cpp +++ b/noncore/settings/packagemanager/filterdlg.cpp @@ -106,3 +106,3 @@ FilterDlg::FilterDlg( QWidget *parent, OPackageManager *pm, const QString &name, QWhatsThis::add( m_server, tr( "Select the source server to filter by here." ) ); - m_server->insertStringList( *(pm->servers()) ); + m_server->insertStringList( pm->servers() ); initItem( m_server, m_serverCB, server ); @@ -117,3 +117,3 @@ FilterDlg::FilterDlg( QWidget *parent, OPackageManager *pm, const QString &name, QWhatsThis::add( m_destination, tr( "Select the destination location to filter by here." ) ); - m_destination->insertStringList( *(pm->destinations()) ); + m_destination->insertStringList( pm->destinations() ); initItem( m_destination, m_destCB, destination ); diff --git a/noncore/settings/packagemanager/installdlg.cpp b/noncore/settings/packagemanager/installdlg.cpp index 0cb30e2..945dfed 100644 --- a/noncore/settings/packagemanager/installdlg.cpp +++ b/noncore/settings/packagemanager/installdlg.cpp @@ -1,25 +1,25 @@ /* - This file is part of the OPIE Project + This file is part of the OPIE Project =. Copyright (c) 2003 Dan Williams <drw@handhelds.org> - .=l. - .>+-= - _;:, .> :=|. This file is free software; you can -.> <`_, > . <= redistribute it and/or modify it under -:`=1 )Y*s>-.-- : the terms of the GNU 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_,=:_. -<s. This file is distributed in the hope that - + . -:. = it will be useful, but WITHOUT ANY WARRANTY; - : .. .:, . . . without even the implied warranty of - =_ + =;=|` MERCHANTABILITY or FITNESS FOR A - _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General -..}^=.= = ; Public License for more details. -++= -. .` .: - : = ...= . :.=- You should have received a copy of the GNU - -. .:....=;==+<; General Public License along with this file; - -_. . . )=. = see the file COPYING. If not, write to the - -- :-=` Free Software Foundation, Inc., + .=l. + .>+-= +_;:, .> :=|. This file is free software; you can +.> <`_, > . <= redistribute it and/or modify it under +:`=1 )Y*s>-.-- : the terms of the GNU 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_,=:_. -<s. This file is distributed in the hope that + + . -:. = it will be useful, but WITHOUT ANY WARRANTY; + : .. .:, . . . without even the implied warranty of + =_ + =;=|` MERCHANTABILITY or FITNESS FOR A + _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General +..}^=.= = ; Public License for more details. +++= -. .` .: +: = ...= . :.=- You should have received a copy of the GNU +-. .:....=;==+<; General Public License along with this file; + -_. . . )=. = see the file COPYING. If not, write to the + -- :-=` Free Software Foundation, Inc., 59 Temple Place - Suite 330, @@ -52,5 +52,5 @@ InstallDlg::InstallDlg( QWidget *parent, OPackageManager *pm, const QString &caption, bool showDestInfo, - OPackage::Command command1, QStringList *packages1, - OPackage::Command command2, QStringList *packages2, - OPackage::Command command3, QStringList *packages3 ) + OPackage::Command command1, const QStringList &packages1, + OPackage::Command command2, const QStringList &packages2, + OPackage::Command command3, const QStringList &packages3 ) : QWidget( 0x0 ) @@ -91,3 +91,3 @@ InstallDlg::InstallDlg( QWidget *parent, OPackageManager *pm, const QString &cap m_destination = new QComboBox( this ); - m_destination->insertStringList( *(m_packman->destinations()) ); + m_destination->insertStringList( m_packman->destinations() ); layout->addWidget( m_destination, 0, 1 ); @@ -131,3 +131,3 @@ InstallDlg::InstallDlg( QWidget *parent, OPackageManager *pm, const QString &cap { - if ( m_packages[ i ] ) + if ( !m_packages[ i ].isEmpty() ) { @@ -150,3 +150,4 @@ InstallDlg::InstallDlg( QWidget *parent, OPackageManager *pm, const QString &cap - for ( QStringList::Iterator it = m_packages[ i ]->begin(); it != m_packages[ i ]->end(); ++it ) + QStringList tmpPackage = m_packages[ i ]; + for ( QStringList::Iterator it = tmpPackage.begin(); it != tmpPackage.end(); ++it ) { @@ -166,7 +167,2 @@ InstallDlg::~InstallDlg() { - for( int i = 0; i < m_numCommands; i++ ) - { - if ( m_packages[ i ] ) - delete m_packages[ i ]; - } } diff --git a/noncore/settings/packagemanager/installdlg.h b/noncore/settings/packagemanager/installdlg.h index 4da9cf6..cddc911 100644 --- a/noncore/settings/packagemanager/installdlg.h +++ b/noncore/settings/packagemanager/installdlg.h @@ -1,25 +1,25 @@ /* - This file is part of the OPIE Project + This file is part of the OPIE Project =. Copyright (c) 2003 Dan Williams <drw@handhelds.org> - .=l. - .>+-= - _;:, .> :=|. This file is free software; you can -.> <`_, > . <= redistribute it and/or modify it under -:`=1 )Y*s>-.-- : the terms of the GNU 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_,=:_. -<s. This file is distributed in the hope that - + . -:. = it will be useful, but WITHOUT ANY WARRANTY; - : .. .:, . . . without even the implied warranty of - =_ + =;=|` MERCHANTABILITY or FITNESS FOR A - _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General -..}^=.= = ; Public License for more details. -++= -. .` .: - : = ...= . :.=- You should have received a copy of the GNU - -. .:....=;==+<; General Public License along with this file; - -_. . . )=. = see the file COPYING. If not, write to the - -- :-=` Free Software Foundation, Inc., + .=l. + .>+-= +_;:, .> :=|. This file is free software; you can +.> <`_, > . <= redistribute it and/or modify it under +:`=1 )Y*s>-.-- : the terms of the GNU 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_,=:_. -<s. This file is distributed in the hope that + + . -:. = it will be useful, but WITHOUT ANY WARRANTY; + : .. .:, . . . without even the implied warranty of + =_ + =;=|` MERCHANTABILITY or FITNESS FOR A + _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General +..}^=.= = ; Public License for more details. +++= -. .` .: +: = ...= . :.=- You should have received a copy of the GNU +-. .:....=;==+<; General Public License along with this file; + -_. . . )=. = see the file COPYING. If not, write to the + -- :-=` Free Software Foundation, Inc., 59 Temple Place - Suite 330, @@ -50,5 +50,8 @@ public: bool showDestInfo = true, - OPackage::Command command1 = OPackage::NotDefined, QStringList *packages1 = 0x0, - OPackage::Command command2 = OPackage::NotDefined, QStringList *packages2 = 0x0, - OPackage::Command command3 = OPackage::NotDefined, QStringList *packages3 = 0x0 ); + OPackage::Command command1 = OPackage::NotDefined, + const QStringList &packages1 = QStringList(), + OPackage::Command command2 = OPackage::NotDefined, + const QStringList &packages2 = QStringList(), + OPackage::Command command3 = OPackage::NotDefined, + const QStringList &packages3 = QStringList() ); ~InstallDlg(); @@ -69,3 +72,3 @@ private: OPackage::Command m_command[3]; // List of commands to be executed - QStringList *m_packages[3]; // Lists of package names associated to commands (m_command[]) + QStringList m_packages[3]; // Lists of package names associated to commands (m_command[]) diff --git a/noncore/settings/packagemanager/mainwindow.cpp b/noncore/settings/packagemanager/mainwindow.cpp index 349094d..5e15874 100644 --- a/noncore/settings/packagemanager/mainwindow.cpp +++ b/noncore/settings/packagemanager/mainwindow.cpp @@ -315,3 +315,3 @@ void MainWindow::installLocalPackage( const QString &ipkFile ) InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Install local package" ), true, - OPackage::Install, new QStringList( ipkFile ) ); + OPackage::Install, ipkFile ); connect( dlg, SIGNAL(closeInstallDlg()), this, SLOT(slotCloseDlg()) ); @@ -412,3 +412,3 @@ void MainWindow::slotDownload() // Retrieve list of packages selected for download (if any) - QStringList *workingPackages = new QStringList(); + QStringList workingPackages; @@ -419,6 +419,6 @@ void MainWindow::slotDownload() if ( item->isOn() ) - workingPackages->append( item->text() ); + workingPackages.append( item->text() ); } - if ( workingPackages->isEmpty() ) + if ( workingPackages.isEmpty() ) { @@ -459,5 +459,5 @@ void MainWindow::slotApply() { - QStringList *removeList = 0x0; - QStringList *installList = 0x0; - QStringList *upgradeList = 0x0; + QStringList removeList; + QStringList installList; + QStringList upgradeList; @@ -482,5 +482,3 @@ void MainWindow::slotApply() { - if ( !removeList ) - removeList = new QStringList(); - removeList->append( item->text() ); + removeList.append( item->text() ); } @@ -488,5 +486,3 @@ void MainWindow::slotApply() { - if ( !upgradeList ) - upgradeList = new QStringList(); - upgradeList->append( item->text() ); + upgradeList.append( item->text() ); } @@ -501,5 +497,3 @@ void MainWindow::slotApply() { - if ( !removeList ) - removeList = new QStringList(); - removeList->append( item->text() ); + removeList.append( item->text() ); } @@ -507,5 +501,3 @@ void MainWindow::slotApply() { - if ( !installList ) - installList = new QStringList(); - installList->append( item->text() ); + installList.append( item->text() ); } @@ -516,5 +508,3 @@ void MainWindow::slotApply() // Install package - if ( !installList ) - installList = new QStringList(); - installList->append( item->text() ); + installList.append( item->text() ); } @@ -525,3 +515,3 @@ void MainWindow::slotApply() // If nothing is selected, display message and exit - if ( !removeList && !installList && !upgradeList ) + if ( removeList.isEmpty() && installList.isEmpty() && upgradeList.isEmpty() ) { @@ -533,9 +523,9 @@ void MainWindow::slotApply() OPackage::Command removeCmd = OPackage::NotDefined; - if ( removeList && !removeList->isEmpty() ) + if ( !removeList.isEmpty() ) removeCmd = OPackage::Remove; OPackage::Command installCmd = OPackage::NotDefined; - if ( installList && !installList->isEmpty() ) + if ( !installList.isEmpty() ) installCmd = OPackage::Install; OPackage::Command upgradeCmd = OPackage::NotDefined; - if ( upgradeList && !upgradeList->isEmpty() ) + if ( !upgradeList.isEmpty() ) upgradeCmd = OPackage::Upgrade; diff --git a/noncore/settings/packagemanager/mainwindow.h b/noncore/settings/packagemanager/mainwindow.h index 103c664..f00e344 100644 --- a/noncore/settings/packagemanager/mainwindow.h +++ b/noncore/settings/packagemanager/mainwindow.h @@ -53,3 +53,3 @@ public: MainWindow( QWidget *parent = 0x0, const char *name = 0x0, WFlags fl = 0 ); - static QString appName() { return QString::fromLatin1( "packagemanager" ); }; + static QString appName() { return QString::fromLatin1( QUICKAPP_NAME ); }; diff --git a/noncore/settings/packagemanager/oconfitem.h b/noncore/settings/packagemanager/oconfitem.h index db77980..7c158c9 100644 --- a/noncore/settings/packagemanager/oconfitem.h +++ b/noncore/settings/packagemanager/oconfitem.h @@ -1,26 +1,26 @@ /* - This file is part of the Opie Project + This file is part of the Opie Project - Copyright (c) 2003 Dan Williams <drw@handhelds.org> + Copyright (c) 2003 Dan Williams <drw@handhelds.org> =. .=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_,=:_. -<s. This program is distributed in the hope that - + . -:. = it will be useful, but WITHOUT ANY WARRANTY; - : .. .:, . . . without even the implied warranty of - =_ + =;=|` MERCHANTABILITY or FITNESS FOR A - _.=:. : :=>`: 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_,=:_. -<s. This program is distributed in the hope that + + . -:. = it will be useful, but WITHOUT ANY WARRANTY; + : .. .:, . . . without even the implied warranty of + =_ + =;=|` MERCHANTABILITY or FITNESS FOR A + _.=:. : :=>`: 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, @@ -42,4 +42,4 @@ public: - OConfItem( Type type = NotDefined, const QString &name = 0x0, const QString &value = 0x0, - bool active = true ); + OConfItem( Type type = NotDefined, const QString &name = QString::null, + const QString &value = QString::null, bool active = true ); 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,26 +1,26 @@ /* - This file is part of the Opie Project + This file is part of the Opie Project - Copyright (c) 2003 Dan Williams <drw@handhelds.org> + Copyright (c) 2003 Dan Williams <drw@handhelds.org> =. .=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_,=:_. -<s. This program is distributed in the hope that - + . -:. = it will be useful, but WITHOUT ANY WARRANTY; - : .. .:, . . . without even the implied warranty of - =_ + =;=|` MERCHANTABILITY or FITNESS FOR A - _.=:. : :=>`: 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_,=:_. -<s. This program is distributed in the hope that + + . -:. = it will be useful, but WITHOUT ANY WARRANTY; + : .. .:, . . . without even the implied warranty of + =_ + =;=|` MERCHANTABILITY or FITNESS FOR A + _.=:. : :=>`: 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, @@ -54,2 +54,4 @@ int fsignalIpkgMessage( ipkg_conf_t *conf, message_level_t level, char *msg ) oipkg->ipkgMessage( msg ); + + return 0; } @@ -355,3 +357,3 @@ OPackageList *OIpkg::installedPackages( const QString &destName, const QString & -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 ) @@ -405,3 +407,3 @@ bool OIpkg::executeCommand( OPackage::Command command, QStringList *parameters, 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 ) { @@ -413,3 +415,3 @@ bool OIpkg::executeCommand( OPackage::Command command, QStringList *parameters, 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 ) { @@ -421,3 +423,3 @@ bool OIpkg::executeCommand( OPackage::Command command, QStringList *parameters, 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 ) { @@ -429,3 +431,3 @@ bool OIpkg::executeCommand( OPackage::Command command, QStringList *parameters, 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 ); }; @@ -434,3 +436,3 @@ bool OIpkg::executeCommand( OPackage::Command command, QStringList *parameters, 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 ); }; diff --git a/noncore/settings/packagemanager/oipkg.h b/noncore/settings/packagemanager/oipkg.h index b8a859a..3c96200 100644 --- a/noncore/settings/packagemanager/oipkg.h +++ b/noncore/settings/packagemanager/oipkg.h @@ -1,26 +1,26 @@ /* - This file is part of the Opie Project + This file is part of the Opie Project - Copyright (c) 2003 Dan Williams <drw@handhelds.org> + Copyright (c) 2003 Dan Williams <drw@handhelds.org> =. .=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_,=:_. -<s. This program is distributed in the hope that - + . -:. = it will be useful, but WITHOUT ANY WARRANTY; - : .. .:, . . . without even the implied warranty of - =_ + =;=|` MERCHANTABILITY or FITNESS FOR A - _.=:. : :=>`: 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_,=:_. -<s. This program is distributed in the hope that + + . -:. = it will be useful, but WITHOUT ANY WARRANTY; + : .. .:, . . . without even the implied warranty of + =_ + =;=|` MERCHANTABILITY or FITNESS FOR A + _.=:. : :=>`: 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, @@ -79,5 +79,8 @@ public: - bool executeCommand( OPackage::Command command = OPackage::NotDefined, QStringList *parameters = 0x0, - const QString &destination = QString::null, const QObject *receiver = 0x0, - const char *slotOutput = 0x0, bool rawOutput = true ); + bool executeCommand( OPackage::Command command = OPackage::NotDefined, + const QStringList ¶meters = QStringList(), + const QString &destination = QString::null, + const QObject *receiver = 0x0, + const char *slotOutput = 0x0, + bool rawOutput = true ); void abortCommand(); diff --git a/noncore/settings/packagemanager/opackagemanager.cpp b/noncore/settings/packagemanager/opackagemanager.cpp index f75d3b3..cbddfe7 100644 --- a/noncore/settings/packagemanager/opackagemanager.cpp +++ b/noncore/settings/packagemanager/opackagemanager.cpp @@ -1,26 +1,26 @@ /* - This file is part of the Opie Project + This file is part of the Opie Project - Copyright (c) 2003 Dan Williams <drw@handhelds.org> + Copyright (c) 2003 Dan Williams <drw@handhelds.org> =. .=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_,=:_. -<s. This program is distributed in the hope that - + . -:. = it will be useful, but WITHOUT ANY WARRANTY; - : .. .:, . . . without even the implied warranty of - =_ + =;=|` MERCHANTABILITY or FITNESS FOR A - _.=:. : :=>`: 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_,=:_. -<s. This program is distributed in the hope that + + . -:. = it will be useful, but WITHOUT ANY WARRANTY; + : .. .:, . . . without even the implied warranty of + =_ + =;=|` MERCHANTABILITY or FITNESS FOR A + _.=:. : :=>`: 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, @@ -229,5 +229,5 @@ OPackageList *OPackageManager::filterPackages( const QString &name,const QString -QStringList *OPackageManager::servers() +QStringList OPackageManager::servers() { - QStringList *sl = new QStringList(); + QStringList sl; @@ -242,3 +242,3 @@ QStringList *OPackageManager::servers() if ( server->active() ) - *sl << server->name(); + sl << server->name(); } @@ -249,5 +249,5 @@ QStringList *OPackageManager::servers() -QStringList *OPackageManager::destinations() +QStringList OPackageManager::destinations() { - QStringList *dl = new QStringList(); + QStringList dl; @@ -262,3 +262,3 @@ QStringList *OPackageManager::destinations() if ( destination->active() ) - *dl << destination->name(); + dl << destination->name(); } @@ -332,3 +332,3 @@ void OPackageManager::saveSettings() -bool OPackageManager::executeCommand( OPackage::Command command, QStringList *packages, +bool OPackageManager::executeCommand( OPackage::Command command, const QStringList &packages, const QString &destination, const QObject *receiver, diff --git a/noncore/settings/packagemanager/opackagemanager.h b/noncore/settings/packagemanager/opackagemanager.h index 58e597b..bc394e8 100644 --- a/noncore/settings/packagemanager/opackagemanager.h +++ b/noncore/settings/packagemanager/opackagemanager.h @@ -1,26 +1,26 @@ /* - This file is part of the Opie Project + This file is part of the Opie Project - Copyright (c) 2003 Dan Williams <drw@handhelds.org> + Copyright (c) 2003 Dan Williams <drw@handhelds.org> =. .=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_,=:_. -<s. This program is distributed in the hope that - + . -:. = it will be useful, but WITHOUT ANY WARRANTY; - : .. .:, . . . without even the implied warranty of - =_ + =;=|` MERCHANTABILITY or FITNESS FOR A - _.=:. : :=>`: 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_,=:_. -<s. This program is distributed in the hope that + + . -:. = it will be useful, but WITHOUT ANY WARRANTY; + : .. .:, . . . without even the implied warranty of + =_ + =;=|` MERCHANTABILITY or FITNESS FOR A + _.=:. : :=>`: 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, @@ -55,9 +55,11 @@ public: OPackageList *packages(); - OPackageList *filterPackages( const QString &name = 0x0,const QString &server = 0x0, - const QString &destination = 0x0, Status status = NotDefined, - const QString &category = 0x0 ); + OPackageList *filterPackages( const QString &name = QString::null, + const QString &server = QString::null, + const QString &destination = QString::null, + Status status = NotDefined, + const QString &category = QString::null ); const QStringList &categories() { return m_categories; } - QStringList *servers(); - QStringList *destinations(); + QStringList servers(); + QStringList destinations(); @@ -72,3 +74,4 @@ public: - bool executeCommand( OPackage::Command command = OPackage::NotDefined, QStringList *parameters = 0x0, + bool executeCommand( OPackage::Command command = OPackage::NotDefined, + const QStringList ¶meters = QStringList(), const QString &destination = QString::null, const QObject *receiver = 0x0, diff --git a/noncore/settings/packagemanager/packageinfodlg.cpp b/noncore/settings/packagemanager/packageinfodlg.cpp index d27eacb..c5924fd 100644 --- a/noncore/settings/packagemanager/packageinfodlg.cpp +++ b/noncore/settings/packagemanager/packageinfodlg.cpp @@ -1,25 +1,25 @@ /* - This file is part of the OPIE Project + This file is part of the OPIE Project =. Copyright (c) 2003 Dan Williams <drw@handhelds.org> - .=l. - .>+-= - _;:, .> :=|. This file is free software; you can -.> <`_, > . <= redistribute it and/or modify it under -:`=1 )Y*s>-.-- : the terms of the GNU 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_,=:_. -<s. This file is distributed in the hope that - + . -:. = it will be useful, but WITHOUT ANY WARRANTY; - : .. .:, . . . without even the implied warranty of - =_ + =;=|` MERCHANTABILITY or FITNESS FOR A - _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General -..}^=.= = ; Public License for more details. -++= -. .` .: - : = ...= . :.=- You should have received a copy of the GNU - -. .:....=;==+<; General Public License along with this file; - -_. . . )=. = see the file COPYING. If not, write to the - -- :-=` Free Software Foundation, Inc., + .=l. + .>+-= +_;:, .> :=|. This file is free software; you can +.> <`_, > . <= redistribute it and/or modify it under +:`=1 )Y*s>-.-- : the terms of the GNU 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_,=:_. -<s. This file is distributed in the hope that + + . -:. = it will be useful, but WITHOUT ANY WARRANTY; + : .. .:, . . . without even the implied warranty of + =_ + =;=|` MERCHANTABILITY or FITNESS FOR A + _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General +..}^=.= = ; Public License for more details. +++= -. .` .: +: = ...= . :.=- You should have received a copy of the GNU +-. .:....=;==+<; General Public License along with this file; + -_. . . )=. = see the file COPYING. If not, write to the + -- :-=` Free Software Foundation, Inc., 59 Temple Place - Suite 330, @@ -77,3 +77,3 @@ PackageInfoDlg::PackageInfoDlg( QWidget *parent, OPackageManager *pm, const QStr QStringList list( package ); - m_packman->executeCommand( OPackage::Info, &list, QString::null, this, SLOT(slotInfo(char*)), true ); + m_packman->executeCommand( OPackage::Info, list, QString::null, this, SLOT(slotInfo(char*)), true ); } @@ -126,3 +126,3 @@ void PackageInfoDlg::slotBtnFileScan() QStringList list( m_package->name() ); - m_packman->executeCommand( OPackage::Files, &list, QString::null, this, SLOT(slotFiles(char*)), true ); + m_packman->executeCommand( OPackage::Files, list, QString::null, this, SLOT(slotFiles(char*)), true ); } diff --git a/noncore/settings/packagemanager/promptdlg.h b/noncore/settings/packagemanager/promptdlg.h index 790ff4d..f7bc0c0 100644 --- a/noncore/settings/packagemanager/promptdlg.h +++ b/noncore/settings/packagemanager/promptdlg.h @@ -1,25 +1,25 @@ /* - This file is part of the OPIE Project + This file is part of the OPIE Project =. Copyright (c) 2003 Dan Williams <drw@handhelds.org> - .=l. - .>+-= - _;:, .> :=|. This file is free software; you can -.> <`_, > . <= redistribute it and/or modify it under -:`=1 )Y*s>-.-- : the terms of the GNU 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_,=:_. -<s. This file is distributed in the hope that - + . -:. = it will be useful, but WITHOUT ANY WARRANTY; - : .. .:, . . . without even the implied warranty of - =_ + =;=|` MERCHANTABILITY or FITNESS FOR A - _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General -..}^=.= = ; Public License for more details. -++= -. .` .: - : = ...= . :.=- You should have received a copy of the GNU - -. .:....=;==+<; General Public License along with this file; - -_. . . )=. = see the file COPYING. If not, write to the - -- :-=` Free Software Foundation, Inc., + .=l. + .>+-= +_;:, .> :=|. This file is free software; you can +.> <`_, > . <= redistribute it and/or modify it under +:`=1 )Y*s>-.-- : the terms of the GNU 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_,=:_. -<s. This file is distributed in the hope that + + . -:. = it will be useful, but WITHOUT ANY WARRANTY; + : .. .:, . . . without even the implied warranty of + =_ + =;=|` MERCHANTABILITY or FITNESS FOR A + _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General +..}^=.= = ; Public License for more details. +++= -. .` .: +: = ...= . :.=- You should have received a copy of the GNU +-. .:....=;==+<; General Public License along with this file; + -_. . . )=. = see the file COPYING. If not, write to the + -- :-=` Free Software Foundation, Inc., 59 Temple Place - Suite 330, @@ -39,4 +39,5 @@ class PromptDlg : public QWidget public: - PromptDlg( const QString &caption = 0x0, const QString &text = 0x0, const QString &btn1 = 0x0, - const QString &btn2 = 0x0, QWidget *parent = 0x0 ); + PromptDlg( const QString &caption = QString::null, const QString &text = QString::null, + const QString &btn1 = QString::null, const QString &btn2 = QString::null, + QWidget *parent = 0x0 ); @@ -45,4 +46,5 @@ public: - static int ask( const QString &caption = 0x0, const QString &text = 0x0, const QString &btn1 = 0x0, - const QString &btn2 = 0x0, QWidget *parent = 0x0 ); + static int ask( const QString &caption = QString::null, const QString &text = QString::null, + const QString &btn1 = QString::null, const QString &btn2 = QString::null, + QWidget *parent = 0x0 ); |