summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/oipkg/main.cpp3
-rw-r--r--noncore/unsupported/oipkg/mainwindow.cpp5
-rw-r--r--noncore/unsupported/oipkg/package.cpp65
-rw-r--r--noncore/unsupported/oipkg/package.h7
-rw-r--r--noncore/unsupported/oipkg/packagelist.cpp17
-rw-r--r--noncore/unsupported/oipkg/packagelistview.cpp1
-rw-r--r--noncore/unsupported/oipkg/pmipkg.cpp10
-rw-r--r--noncore/unsupported/oipkg/pmipkg.h1
8 files changed, 62 insertions, 47 deletions
diff --git a/noncore/unsupported/oipkg/main.cpp b/noncore/unsupported/oipkg/main.cpp
index 4af59b0..5cef2dc 100644
--- a/noncore/unsupported/oipkg/main.cpp
+++ b/noncore/unsupported/oipkg/main.cpp
@@ -5,2 +5,3 @@
#include <qstring.h>
+#include <qmessagebox.h>
int debugLevel;
@@ -9,2 +10,3 @@ int main( int argc, char ** argv )
{
+
debugLevel = 2;
@@ -16,2 +18,3 @@ int main( int argc, char ** argv )
MainWindow mw;
+ QMessageBox::information( &mw, "oipkg","While ipkg is working\noipkg is hanging.\nPlease be patient!");
a.showMainDocumentWidget( &mw );
diff --git a/noncore/unsupported/oipkg/mainwindow.cpp b/noncore/unsupported/oipkg/mainwindow.cpp
index 06828e0..4865c39 100644
--- a/noncore/unsupported/oipkg/mainwindow.cpp
+++ b/noncore/unsupported/oipkg/mainwindow.cpp
@@ -65,4 +65,2 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f = 0 ) :
-// rootLocal = new QCheckListItem(listViewPackages,tr("local"));
-// rootSearch = new QCheckListItem(listViewPackages,tr("ipkgfind"));
displayList();
@@ -288,4 +286,7 @@ void MainWindow::displayList()
+// if (!rootLocal)
+// {
QCheckListItem *rootLocal = new QCheckListItem(listViewPackages,tr("local"));
QCheckListItem *rootSearch = new QCheckListItem(listViewPackages,tr("ipkgfind"));
+// }
while( pack )
diff --git a/noncore/unsupported/oipkg/package.cpp b/noncore/unsupported/oipkg/package.cpp
index 6bb53a9..0787ece 100644
--- a/noncore/unsupported/oipkg/package.cpp
+++ b/noncore/unsupported/oipkg/package.cpp
@@ -71,4 +71,4 @@ void Package::setValue( QString n, QString t )
_size = t;
- }else if ( n == "Priority")
- {
+// }else if ( n == "Priority")
+// {
@@ -77,7 +77,7 @@ void Package::setValue( QString n, QString t )
setSection( t );
- }else if ( n == "Maintainer")
- {
-
- }else if ( n == "Architecture")
- {
+// }else if ( n == "Maintainer")
+// {
+//
+// }else if ( n == "Architecture")
+// {
@@ -85,8 +85,8 @@ void Package::setValue( QString n, QString t )
{
-
- }else if ( n == "Pre-Depends")
- {
-
- }else if ( n == "Depends")
- {
+ _version = t;
+// }else if ( n == "Pre-Depends")
+// {
+//
+// }else if ( n == "Depends")
+// {
@@ -95,14 +95,12 @@ void Package::setValue( QString n, QString t )
_fileName = t;
- }else if ( n == "Size")
- {
-
- }else if ( n == "MD5Sum")
- {
+// }else if ( n == "Size")
+// {
+//
+// }else if ( n == "MD5Sum")
+// {
- }
- if ( n == "Description")
+ }else if ( n == "Description")
{
setDesc( t );
- }
- if ( n == "Status")
+ }else if ( n == "Status")
{
@@ -110,8 +108,9 @@ void Package::setValue( QString n, QString t )
_status = t;
- }
- if ( t == "Essential")
- {
+// }else if ( n == "Essential")
+// {
+ }else{
+ _values.insert(n,new QString(t));
}
-};
+}
@@ -119,3 +118,4 @@ QString Package::name()
{
- return _name;
+ if (_displayName.isEmpty() ) return _name;
+ else return _displayName;
}
@@ -155,2 +155,8 @@ QString Package::size()
+
+QString Package::version()
+{
+ return _version;
+}
+
QString Package::sizeUnits()
@@ -352 +358,6 @@ void Package::instalFromFile(bool iff)
}
+
+void Package::setName(QString n)
+{
+ _displayName = n;
+}
diff --git a/noncore/unsupported/oipkg/package.h b/noncore/unsupported/oipkg/package.h
index 4618c3a..2ca966d 100644
--- a/noncore/unsupported/oipkg/package.h
+++ b/noncore/unsupported/oipkg/package.h
@@ -34,2 +34,3 @@ class Package //: public QObject
QString sizeUnits();
+ QString version();
void setSection( QString );
@@ -49,4 +50,4 @@ class Package //: public QObject
void instalFromFile(bool iff=true);
+ void setName(QString);
public slots:
-// QString getPackageName();
void toggleProcess();
@@ -55,3 +56,3 @@ private:
PackageManagerSettings *settings;
-// QString _packageName;
+ QString _displayName;
QString _name;
@@ -66,3 +67,5 @@ private:
QString _desc;
+ QString _version;
QString _dest;
+ QDict<QString> _values;
bool _useFileName;
diff --git a/noncore/unsupported/oipkg/packagelist.cpp b/noncore/unsupported/oipkg/packagelist.cpp
index b892b30..be20c71 100644
--- a/noncore/unsupported/oipkg/packagelist.cpp
+++ b/noncore/unsupported/oipkg/packagelist.cpp
@@ -35,2 +35,3 @@ void PackageList::insertPackage( Package* pack )
{
+ if (!pack) return;
Package* p = packageList.find( pack->name() );
@@ -38,5 +39,13 @@ void PackageList::insertPackage( Package* pack )
{
- p->copyValues( pack );
- delete pack;
- pack = p;
+ if ( p->version() == pack->version() )
+ {
+ p->copyValues( pack );
+ delete pack;
+ pack = p;
+ } else {
+ p->setName( pack->name()+"["+p->version()+"]" );
+ pack->setName( pack->name()+"["+pack->version()+"]" );
+ packageList.insert( pack->name(), pack );
+ origPackageList.insert( pack->name(), pack );
+ }
}else{
@@ -44,4 +53,4 @@ void PackageList::insertPackage( Package* pack )
origPackageList.insert( pack->name(), pack );
- empty=false;
};
+ empty=false;
updateSections( pack );
diff --git a/noncore/unsupported/oipkg/packagelistview.cpp b/noncore/unsupported/oipkg/packagelistview.cpp
index 610a0e1..36d081b 100644
--- a/noncore/unsupported/oipkg/packagelistview.cpp
+++ b/noncore/unsupported/oipkg/packagelistview.cpp
@@ -66,3 +66,2 @@ void PackageListView::showPopup()
}else{
-// popupActcat setOn( activePackage->toProcess() );
}
diff --git a/noncore/unsupported/oipkg/pmipkg.cpp b/noncore/unsupported/oipkg/pmipkg.cpp
index fe200f5..1798c80 100644
--- a/noncore/unsupported/oipkg/pmipkg.cpp
+++ b/noncore/unsupported/oipkg/pmipkg.cpp
@@ -288,11 +288,2 @@ void PmIpkg::startDialog()
RunWindowLayout->addWidget( GroupBox1 , 3, 0 );
-
-// connect( doItButton, SIGNAL( clicked() ),
-// this, SLOT( doIt() ) );
-// connect( installButton, SIGNAL( clicked() ),
-// this, SLOT( install() ) );
-// connect( removeButton, SIGNAL( clicked() ),
-// this, SLOT( remove() ) );
-// connect( cancelButton, SIGNAL( clicked() ),
-// installDialog, SLOT( close() ) );
installDialog->showMaximized();
@@ -337,3 +328,2 @@ void PmIpkg::remove()
}
- pvDebug(2,"delete File List");
if ( it->link() )delete fileList;
diff --git a/noncore/unsupported/oipkg/pmipkg.h b/noncore/unsupported/oipkg/pmipkg.h
index 2b89023..fa00048 100644
--- a/noncore/unsupported/oipkg/pmipkg.h
+++ b/noncore/unsupported/oipkg/pmipkg.h
@@ -28,3 +28,2 @@ public:
void update();
- // PackageList* getPackageList();
void showButtons(bool b=true);