summaryrefslogtreecommitdiff
path: root/noncore/unsupported/oipkg
Side-by-side diff
Diffstat (limited to 'noncore/unsupported/oipkg') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/oipkg/mainwindow.cpp2
-rw-r--r--noncore/unsupported/oipkg/package.cpp10
-rw-r--r--noncore/unsupported/oipkg/packagelist.cpp4
-rw-r--r--noncore/unsupported/oipkg/packagelistdoclnk.cpp4
-rw-r--r--noncore/unsupported/oipkg/packagelistitem.cpp2
5 files changed, 11 insertions, 11 deletions
diff --git a/noncore/unsupported/oipkg/mainwindow.cpp b/noncore/unsupported/oipkg/mainwindow.cpp
index 7df1d6b..05f2f06 100644
--- a/noncore/unsupported/oipkg/mainwindow.cpp
+++ b/noncore/unsupported/oipkg/mainwindow.cpp
@@ -10,49 +10,49 @@
#include <qpe/qpetoolbar.h>
#include <qpe/qcopenvelope_qws.h>
#include <qaction.h>
#include <qmessagebox.h>
#include <qpopupmenu.h>
#include <qtoolbutton.h>
#include <qstring.h>
#include <qlabel.h>
#include <qfile.h>
#include <qlistview.h>
#include <qtextview.h>
#include <qcheckbox.h>
#include <qlineedit.h>
#include <qtabwidget.h>
#include <qcombobox.h>
#include <qmessagebox.h>
#include <qpushbutton.h>
#include <qlayout.h>
#include "pksettingsbase.h"
#include "utils.h"
#include "packagelistitem.h"
-MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f = 0 ) :
+MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f ) :
QMainWindow( parent, name, f )
// packageListServers( QObject(parent), name ),
// packageListSearch( parent, name ),
// packageListDocLnk( parent, name )
{
setCaption( tr("Package Manager") );
settings = new PackageManagerSettings(this,0,TRUE);
listViewPackages = new PackageListView( this,"listViewPackages",settings );
setCentralWidget( listViewPackages );
listViewPackages->addList( tr("feeds"), &packageListServers );
listViewPackages->addList( tr("ipkgfind"), &packageListSearch );
//listViewPackages->addList( tr("documents"), &packageListDocLnk );
ipkg = new PmIpkg( settings, this );
packageListServers.setSettings( settings );
packageListSearch.setSettings( settings );
packageListDocLnk.setSettings( settings );
pvDebug(9,"packageListServers.update");
packageListServers.update();
pvDebug(9,"packageListDocLnk.update");
pvDebug(0,"no UPDATE of DocLnk");
// packageListDocLnk.update();
pvDebug(9,"makeMenu");
makeMenu();
makeChannel();
diff --git a/noncore/unsupported/oipkg/package.cpp b/noncore/unsupported/oipkg/package.cpp
index 97f7813..517b37a 100644
--- a/noncore/unsupported/oipkg/package.cpp
+++ b/noncore/unsupported/oipkg/package.cpp
@@ -1,93 +1,93 @@
#include "package.h"
#include <qpe/process.h>
#include <qpe/stringutil.h>
#include <qfile.h>
#include <qtextstream.h>
#include <stdlib.h>
#include <unistd.h>
#include "debug.h"
-Package::Package( QObject *parent=0, const char *name=0 )
+Package::Package( QObject *parent, const char *name )
: QObject(parent,name)
{
}
Package::~Package()
{
}
-Package::Package( PackageManagerSettings *s, QObject *parent=0, const char *name=0 )
+Package::Package( PackageManagerSettings *s, QObject *parent, const char *name )
: QObject(parent,name)
{
Package(parent,name);
init(s);
}
void Package::init( PackageManagerSettings *s )
{
settings = s;
_size = "";
_section = "";
_subsection = "";
_shortDesc = "";
_desc = "";
_name = "";
_toProcess = false;
_useFileName = false;
_old = false;
_status = "";
_dest = settings->getDestinationName();
_link = settings->createLinks();
_versions=0;
_version="";
}
-Package::Package( QStringList pack, PackageManagerSettings *s , QObject *parent=0, const char *name=0 )
+Package::Package( QStringList pack, PackageManagerSettings *s , QObject *parent, const char *name )
: QObject(parent,name)
{
init(s);
parsePackage( pack );
}
-Package::Package( QString n, PackageManagerSettings *s, QObject *parent=0, const char *name=0 )
+Package::Package( QString n, PackageManagerSettings *s, QObject *parent, const char *name )
{
init(s);
if ( !QFile::exists( n ) )
{
_name = QString( n );
}else{
pvDebug(4,"remote file: "+n);
parseIpkgFile( n );
_useFileName = true;
_fileName = QString( n );
}
}
-Package::Package( Package *pi, QObject *parent=0, const char *name=0 )
+Package::Package( Package *pi, QObject *parent, const char *name )
{
init(pi->settings);
copyValues( pi );
}
void Package::setValue( QString n, QString t )
{
if ( n == "Package" )
{
_name = QString( t );
}else if ( n == "Installed-Size" )
{
_size = t;
// }else if ( n == "Priority")
// {
}else if ( n == "Section")
{
setSection( t );
// }else if ( n == "Maintainer")
// {
//
// }else if ( n == "Architecture")
diff --git a/noncore/unsupported/oipkg/packagelist.cpp b/noncore/unsupported/oipkg/packagelist.cpp
index 3cc0443..e445570 100644
--- a/noncore/unsupported/oipkg/packagelist.cpp
+++ b/noncore/unsupported/oipkg/packagelist.cpp
@@ -1,37 +1,37 @@
#include "packagelist.h"
#include <assert.h>
#include <qfile.h>
#include <qfileinfo.h>
#include <qtextstream.h>
#include "debug.h"
static QDict<Package> *packageListAll;
static int packageListAllRefCount = 0;
-PackageList::PackageList(QObject *parent=0, const char *name=0)
+PackageList::PackageList(QObject *parent, const char *name)
: QObject(parent,name), packageIter( packageList )
{
empty=true;
if (!packageListAll) packageListAll = new QDict<Package>();
packageListAllRefCount++;
sections << "All";
subSections.insert("All", new QStringList() );
QStringList *ss = subSections["All"];
*ss << "All";
aktSection = "All";
aktSubSection = "All";
}
PackageList::PackageList( PackageManagerSettings* s, QObject *parent, const char *name)
: QObject(parent,name), packageIter( packageList )
{
settings = s;
PackageList(parent, name);
}
PackageList::~PackageList()
{
if (--packageListAllRefCount < 1 ) delete packageListAll;
}
@@ -176,46 +176,46 @@ void PackageList::readFileEntries( QString filename, QString dest )
{
Package *p = new Package( packEntry, settings );
if ( p )
{
p->setDest( dest );
insertPackage( p );
packEntry.clear();
}
}
}else{
packEntry << line;
};
}
delete statusStream;
return;
}
void PackageList::setSettings( PackageManagerSettings *s )
{
settings = s;
}
Package* PackageList::getByName( QString n )
{
- origPackageList[n];
+ return origPackageList[n];
}
void PackageList::clear()
{
origPackageList.clear();
packageList.clear();
}
void PackageList::allPackages()
{
packageList.clear();
QDictIterator<Package> filterIter( origPackageList );
filterIter.toFirst();
Package *pack= filterIter.current() ;
while ( pack )
{
packageList.insert( pack->name(), pack );
++filterIter;
pack = filterIter.current();
}
}
diff --git a/noncore/unsupported/oipkg/packagelistdoclnk.cpp b/noncore/unsupported/oipkg/packagelistdoclnk.cpp
index b42cfdd..deb8a6d 100644
--- a/noncore/unsupported/oipkg/packagelistdoclnk.cpp
+++ b/noncore/unsupported/oipkg/packagelistdoclnk.cpp
@@ -1,41 +1,41 @@
#include "packagelistdoclnk.h"
#include <qpe/applnk.h>
#include <qpe/config.h>
#include <qlist.h>
#include "package.h"
#include "pksettings.h"
-PackageListDocLnk::PackageListDocLnk(PackageManagerSettings* s, QObject *parent=0, const char *name=0)
+PackageListDocLnk::PackageListDocLnk(PackageManagerSettings* s, QObject *parent, const char *name)
: PackageList(s)
{
PackageListDocLnk(parent, name);
}
-PackageListDocLnk::PackageListDocLnk(QObject *parent=0, const char *name=0)
+PackageListDocLnk::PackageListDocLnk(QObject *parent, const char *name)
: PackageList(parent, name)
{
Config cfg( "oipkg", Config::User );
cfg.setGroup( "Common" );
docLnkDir = cfg.readEntry( "docLnkDir", "/root/" );
pvDebug(2,"opening DocLnkSet "+docLnkDir);
doclnkset = new DocLnkSet(docLnkDir,"application/ipkg");
}
PackageListDocLnk::~PackageListDocLnk()
{
Config cfg( "oipkg", Config::User );
cfg.setGroup( "Common" );
cfg.writeEntry( "docLnkDir", docLnkDir );
delete doclnkset;
}
void PackageListDocLnk::update()
{
pvDebug(2,"PackageListDocLnk::update ");
QList<DocLnk> packlist = doclnkset->children();
for (DocLnk *pack =packlist.first(); pack != 0; pack=packlist.next() )
diff --git a/noncore/unsupported/oipkg/packagelistitem.cpp b/noncore/unsupported/oipkg/packagelistitem.cpp
index 0c9c676..7c54441 100644
--- a/noncore/unsupported/oipkg/packagelistitem.cpp
+++ b/noncore/unsupported/oipkg/packagelistitem.cpp
@@ -138,29 +138,29 @@ QString PackageListItem::key( int column, bool ascending ) const
if ( !ascending ) bytes=999999999-bytes;
return QString().sprintf("%09d",(int)bytes);
} else {
return QListViewItem::key(column,ascending);
}
}
void PackageListItem::setOn( bool b )
{
QCheckListItem::setOn( b );
package->toggleProcess();
package->setLink( settings->createLinks() );
displayDetails();
}
void PackageListItem::displayDetails()
{
QString sod;
sod += package->sizeUnits().isEmpty()?QString(""):QString(package->sizeUnits());
//sod += QString(package->dest().isEmpty()?"":QObject::tr(" on ")+package->dest());
sod += package->dest().isEmpty()?QString(""):QString(QObject::tr(" on ")+package->dest());
sod = sod.isEmpty()?QString(""):QString(" ("+sod+")");
setText(0, package->name()+sod );
nameItem->setText( 0, QObject::tr("Name: ")+package->name());
- linkItem->setText( 0, QObject::tr("Link: ")+package->link()?QObject::tr("Yes"):QObject::tr("No"));
+ linkItem->setText( 0, QObject::tr("Link: ")+(package->link()?QObject::tr("Yes"):QObject::tr("No")));
destItem->setText( 0, QObject::tr("Destination: ")+package->dest() );
statusItem->setText( 0, QObject::tr("Status: ")+package->status() );
repaint();
}