summaryrefslogtreecommitdiff
path: root/noncore/unsupported
Side-by-side diff
Diffstat (limited to 'noncore/unsupported') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/mail2/libmail/imaphandler.cpp2
-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
-rw-r--r--noncore/unsupported/qpdf/fixed.h4
7 files changed, 14 insertions, 14 deletions
diff --git a/noncore/unsupported/mail2/libmail/imaphandler.cpp b/noncore/unsupported/mail2/libmail/imaphandler.cpp
index 730a004..7493240 100644
--- a/noncore/unsupported/mail2/libmail/imaphandler.cpp
+++ b/noncore/unsupported/mail2/libmail/imaphandler.cpp
@@ -149,49 +149,49 @@ QString IMAPHandler::iList(const QString &reference, const QString &mailbox)
}
QString IMAPHandler::iLsub(const QString &reference, const QString &mailbox)
{
doLogin();
_ibase->sendCommand(QString("%1 LSUB \"%2\" \"%3\"\r\n")
.arg(tag())
.arg(escape(reference))
.arg(escape(mailbox)));
return tag(false);
}
QString IMAPHandler::iStatus(const QString &mailbox, const QString &items)
{
doLogin();
_ibase->sendCommand(QString("%1 STATUS \"%2\" (%3)\r\n")
.arg(tag())
.arg(escape(mailbox))
.arg(escape(items)));
return tag(false);
}
-QString IMAPHandler::iAppend(const QString &mailbox, const QString &literal, const QString &flags, const QString &datetime = 0)
+QString IMAPHandler::iAppend(const QString &mailbox, const QString &literal, const QString &flags, const QString &datetime)
{
doLogin();
_ibase->sendCommand(QString("%1 APPEND \"%2\" (%3) \"%4\" {%5}\r\n%6\r\n")
.arg(tag())
.arg(escape(mailbox))
.arg(flags)
.arg(escape(datetime))
.arg(literal.length())
.arg(literal));
return tag(false);
}
QString IMAPHandler::iCheck()
{
doLogin();
_ibase->sendCommand(QString("%1 CHECK\r\n")
.arg(tag()));
return tag(false);
}
QString IMAPHandler::iClose()
{
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();
}
diff --git a/noncore/unsupported/qpdf/fixed.h b/noncore/unsupported/qpdf/fixed.h
index d073421..ec0e696 100644
--- a/noncore/unsupported/qpdf/fixed.h
+++ b/noncore/unsupported/qpdf/fixed.h
@@ -148,44 +148,44 @@ template <unsigned int SH> inline bool operator != ( double d, const fixed<SH> &
template <unsigned int SH> inline bool operator < ( int i, const fixed<SH> &f ) { return fixed<SH>::i2f( i ) < f. m_f; }
template <unsigned int SH> inline bool operator > ( int i, const fixed<SH> &f ) { return fixed<SH>::i2f( i ) > f. m_f; }
template <unsigned int SH> inline bool operator <= ( int i, const fixed<SH> &f ) { return fixed<SH>::i2f( i ) <= f. m_f; }
template <unsigned int SH> inline bool operator >= ( int i, const fixed<SH> &f ) { return fixed<SH>::i2f( i ) >= f. m_f; }
template <unsigned int SH> inline bool operator == ( int i, const fixed<SH> &f ) { return fixed<SH>::i2f( i ) == f. m_f; }
template <unsigned int SH> inline bool operator != ( int i, const fixed<SH> &f ) { return fixed<SH>::i2f( i ) != f. m_f; }
template <unsigned int SH> inline long int lrint ( const fixed<SH> &f )
{
return fixed<SH>::f2i (( f. m_f < 0 ) ? f. m_f - ( 1 << ( SH - 1 )) : f. m_f + ( 1 << ( SH - 1 )));
}
template <unsigned int SH> inline fixed<SH> fabs ( const fixed<SH> &f )
{
return ( f. m_f < 0 ) ? fixed<SH> ( -f. m_f, true ) : f;
}
// roughly from QPE / qmath.h
template <unsigned int SH> inline fixed<SH> sqrt ( const fixed<SH> &f )
{
if ( f. m_f <= 0 )
return fixed<SH> ( 0, true );
- fixed<SH>::fix_t a0 = 0;
- fixed<SH>::fix_t a1 = f. m_f; // take value as first approximation
+ typename fixed<SH>::fix_t a0 = 0;
+ typename fixed<SH>::fix_t a1 = f. m_f; // take value as first approximation
do {
a0 = a1;
a1 = ( a0 + fixed<SH>::div ( f. m_f, a0 )) >> 1;
} while ( abs ( fixed<SH>::div ( a1 - a0, a1 )) > 1 );
return fixed<SH> ( a1, true );
}
#if 0 // no std::ostream needed in OPIE
template <unsigned int SH> inline std::ostream &operator << ( std::ostream &o, const fixed<SH> &f )
{
o << double( f );
return o;
}
#endif
#endif