29 files changed, 51 insertions, 48 deletions
diff --git a/core/applets/cardmon/cardmon.cpp b/core/applets/cardmon/cardmon.cpp index 3dd9f54..93bc97a 100644 --- a/core/applets/cardmon/cardmon.cpp +++ b/core/applets/cardmon/cardmon.cpp @@ -139,33 +139,33 @@ void CardMonitor::mousePressEvent( QMouseEvent * ) { void CardMonitor::cardMessage( const QCString &msg, const QByteArray & ) { if ( msg == "stabChanged()" ) { // qDebug("Pcmcia: stabchanged"); if ( getStatusPcmcia() ) { repaint(FALSE); } } else if ( msg == "mtabChanged()" ) { // qDebug("Pcmcia: mtabchanged"); if ( getStatusSd() ) { repaint(FALSE); } } } -bool CardMonitor::getStatusPcmcia( int showPopUp = FALSE ) { +bool CardMonitor::getStatusPcmcia( int showPopUp ) { bool cardWas0 = cardInPcmcia0; // remember last state bool cardWas1 = cardInPcmcia1; QString fileName; // one of these 3 files should exist if (QFile::exists("/var/run/stab")) { fileName = "/var/run/stab"; } else if (QFile::exists("/var/state/pcmcia/stab")) { fileName="/var/state/pcmcia/stab"; } else { fileName="/var/lib/pcmcia/stab"; } QFile f(fileName); @@ -222,33 +222,33 @@ bool CardMonitor::getStatusPcmcia( int showPopUp = FALSE ) { text += "\n"; } if(cardWas1 != cardInPcmcia1) { if(cardInPcmcia1) { text += tr("New card: "); } else { text += tr("Ejected: "); } text += cardInPcmcia1Name; } popUp( text ); } f.close(); return ((cardWas0 == cardInPcmcia0 || cardWas1 == cardInPcmcia1) ? FALSE : TRUE); } -bool CardMonitor::getStatusSd( int showPopUp = FALSE ) { +bool CardMonitor::getStatusSd( int showPopUp ) { bool cardWas=cardInSd; // remember last state cardInSd=false; #if defined(_OS_LINUX_) || defined(Q_OS_LINUX) struct mntent *me; FILE *mntfp = setmntent( "/etc/mtab", "r" ); if ( mntfp ) { while ( (me = getmntent( mntfp )) != 0 ) { QString fs = me->mnt_fsname; if ( fs.left(7)=="/dev/sd" || fs.left(9) == "/dev/mmcd" ) { cardInSd=true; } } endmntent( mntfp ); diff --git a/core/applets/vmemo/vmemo.cpp b/core/applets/vmemo/vmemo.cpp index b29ee62..4278f46 100644 --- a/core/applets/vmemo/vmemo.cpp +++ b/core/applets/vmemo/vmemo.cpp @@ -613,17 +613,18 @@ int VMemo::setToggleButton(int tog) { return Key_F12; break; case 5: return Key_F9; break; case 6: return Key_F10; break; case 7: return Key_F11; break; case 8: return Key_F13; break; }; } + return -1; } diff --git a/libopie/ofileselector.cc b/libopie/ofileselector.cc index 8299b3d..7a67ab2 100644 --- a/libopie/ofileselector.cc +++ b/libopie/ofileselector.cc @@ -100,34 +100,34 @@ namespace { OFileSelector::OFileSelector( QWidget *wid, int mode, int selector, const QString &dirName, const QString &fileName, const QStringList &mimeTypes ) : QWidget( wid, "OFileSelector") { m_mimetypes = mimeTypes; initVars(); m_mode = mode; m_selector = selector; m_currentDir = dirName; init(); QTimer::singleShot(6*1000, this, SLOT( slotTest() ) ); } OFileSelector::OFileSelector(const QString &mimeFilter, QWidget *parent, - const char *name, bool newVisible = TRUE, - bool closeVisible = FALSE ) + const char *name, bool newVisible, + bool closeVisible ) : QWidget( parent, name ) { m_mimetypes = QStringList::split(";", mimeFilter ); initVars(); m_currentDir = QPEApplication::documentDir(); m_mode = OPEN; m_selector = NORMAL; m_shClose = closeVisible; m_shNew = newVisible; m_shLne = false; m_shPerm = false; m_shYesNo = false; init(); } diff --git a/noncore/net/opieftp/opieftp.cpp b/noncore/net/opieftp/opieftp.cpp index 293c391..8f2b9c9 100644 --- a/noncore/net/opieftp/opieftp.cpp +++ b/noncore/net/opieftp/opieftp.cpp @@ -486,36 +486,36 @@ void OpieFtp::localUpload() ProgressBar->reset(); nullifyCallBack(); it.current()->setSelected(FALSE); } //end currentSelected } for ( ; it.current(); ++it ) { Local_View->clearSelection(); } Local_View->clearFocus(); TabWidget->setCurrentPage(1); remoteDirList( (const QString &)currentRemoteDir); //this also calls populate // QCopEnvelope ( "QPE/System", "notBusy()" ); } void OpieFtp::nullifyCallBack() { - FtpOptions(FTPLIB_CALLBACK, NULL, conn); - FtpOptions(FTPLIB_IDLETIME, NULL, conn); - FtpOptions(FTPLIB_CALLBACKARG, NULL, conn); - FtpOptions(FTPLIB_CALLBACKBYTES, NULL, conn); + FtpOptions(FTPLIB_CALLBACK, 0, conn); + FtpOptions(FTPLIB_IDLETIME, 0, conn); + FtpOptions(FTPLIB_CALLBACKARG, 0, conn); + FtpOptions(FTPLIB_CALLBACKBYTES, 0, conn); } void OpieFtp::remoteDownload() { // qApp->processEvents(); int fsz; // QCopEnvelope ( "QPE/System", "busy()" ); QList<QListViewItem> * getSelectedItems( QListView * Remote_View ); QListViewItemIterator it( Remote_View ); for ( ; it.current(); ++it ) { if ( it.current()->isSelected() ) { QString strItem = it.current()->text(0); // strItem=strItem.right(strItem.length()-1); QString localFile = currentDir.canonicalPath(); if(localFile.right(1).find("/",0,TRUE) == -1) diff --git a/noncore/settings/sound/soundsettings.cpp b/noncore/settings/sound/soundsettings.cpp index b490072..672548f 100644 --- a/noncore/settings/sound/soundsettings.cpp +++ b/noncore/settings/sound/soundsettings.cpp @@ -25,34 +25,34 @@ #include <qpe/qcopenvelope_qws.h> #include <qpe/storage.h> #include <qapplication.h> #include <qslider.h> #include <qcheckbox.h> #include <qlineedit.h> #include <qcombobox.h> #include <sys/utsname.h> #include <sys/time.h> #include <sys/types.h> #include <unistd.h> #include <stdio.h> #include <sys/stat.h> -SoundSettings::SoundSettings( QWidget* parent, const char* name, WFlags fl ) - : SoundSettingsBase( parent, name, TRUE, fl ) +SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl ) + : SoundSettingsBase( parent, objname, TRUE, fl ) { keyReset=FALSE; Config config( "qpe"); config.setGroup( "Volume" ); volume->setValue(100-config.readNumEntry("VolumePercent")); mic->setValue(100-config.readNumEntry("Mic")); // touchsound->setChecked(config.readBoolEntry("TouchSound")); // keysound->setChecked(config.readBoolEntry("KeySound")); Config cfg("Vmemo"); connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); AlertCheckBox->setChecked(cfg.readBoolEntry("Alert")); cfg.setGroup("Record"); int rate=config.readNumEntry("SampleRate", 22050); if(rate == 8000) diff --git a/noncore/tools/opie-sh/fviewer.cpp b/noncore/tools/opie-sh/fviewer.cpp index 882c72c..6f8f054 100644 --- a/noncore/tools/opie-sh/fviewer.cpp +++ b/noncore/tools/opie-sh/fviewer.cpp @@ -2,33 +2,33 @@ Opie-sh. convinience app to allow you to use qdialogs in scripts (mainly shell scripts) Copyright (C) 2002 Thomas Stephens This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "fviewer.h" -FViewer::FViewer(QString icon, QString filename, QString title, QWidget *parent=0, const char*name=0):QWidget(parent, name) +FViewer::FViewer(QString icon, QString filename, QString title, QWidget *parent, const char*name):QWidget(parent, name) { QVBoxLayout *layout = new QVBoxLayout(this); setIcon(Resource::loadPixmap("opie-sh")); textView = new QTextBrowser(this, "textview"); layout->addWidget(textView); QString string; if(title.isNull()) { setCaption(filename); } else { diff --git a/noncore/tools/opie-sh/inputdialog.cpp b/noncore/tools/opie-sh/inputdialog.cpp index 0780def..1c4e688 100644 --- a/noncore/tools/opie-sh/inputdialog.cpp +++ b/noncore/tools/opie-sh/inputdialog.cpp @@ -2,33 +2,33 @@ Opie-sh. convinience app to allow you to use qdialogs in scripts (mainly shell scripts) Copyright (C) 2002 Thomas Stephens This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "inputdialog.h" -InputDialog::InputDialog(int w, int h, int newtype, QString labelString, QString title, QString filename, bool edit, QWidget *parent=0, const char *name=0, bool modal=true, WFlags f=0):QDialog(parent, name, modal, f) +InputDialog::InputDialog(int w, int h, int newtype, QString labelString, QString title, QString filename, bool edit, QWidget *parent, const char *name, bool modal, WFlags f):QDialog(parent, name, modal, f) { type = newtype; QHBoxLayout *layout = new QHBoxLayout(this); layout->addStrut(32); QLabel *label = new QLabel(labelString, this, "label"); setCaption(title); int x, y; layout->addSpacing(5); layout->addWidget(label); layout->addSpacing(5); switch(type) { case 0: lineEdit = new QLineEdit(this, "line edit"); @@ -101,17 +101,18 @@ QString InputDialog::getString() case 2: QString string; int i; for(i = 0; i < listBox->count(); i++) { if(listBox->isSelected(i)) { string+=listBox->text(i)+'\n'; } } if(string[string.length()-1] == '\n') { string.truncate(string.length()-1); } return string; } + return QString::null; } diff --git a/noncore/tools/opie-sh/mbox.cpp b/noncore/tools/opie-sh/mbox.cpp index cb3ea1b..04b397d 100644 --- a/noncore/tools/opie-sh/mbox.cpp +++ b/noncore/tools/opie-sh/mbox.cpp @@ -3,33 +3,33 @@ Opie-sh. convinience app to allow you to use qdialogs in scripts (mainly shell Copyright (C) 2002 Thomas Stephens This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "mbox.h" -MBox::MBox(int w, int h, int type, QString title, QString message, QString *btext0 = 0, QString *btext1= 0, QString *btext2 = 0, QWidget *parent=0, const char*name=0, bool modal=true, WFlags f=0):QDialog(parent, name, modal, f) +MBox::MBox(int w, int h, int type, QString title, QString message, QString *btext0, QString *btext1, QString *btext2, QWidget *parent, const char*name, bool modal, WFlags f):QDialog(parent, name, modal, f) { QVBoxLayout *layout = new QVBoxLayout(this); QHBoxLayout *hlayout1 = new QHBoxLayout(this); QHBoxLayout *hlayout2 = new QHBoxLayout(this); int x, y; layout->addLayout(hlayout1); layout->addLayout(hlayout2); setCaption(title); QLabel *image = new QLabel(this, "image"); QLabel *text = new QLabel(message, this, "text"); diff --git a/noncore/tools/opie-sh/opie-sh.cpp b/noncore/tools/opie-sh/opie-sh.cpp index e898cb1..96b4b93 100644 --- a/noncore/tools/opie-sh/opie-sh.cpp +++ b/noncore/tools/opie-sh/opie-sh.cpp @@ -86,62 +86,63 @@ int myMessageBox(int wi, int h, QWidget *w, int argc, QStringList args) w->setCaption(title); w->showMaximized(); } // mbox->show(); switch(mbox->exec() ) { case 0: return -1; case 1: return -1; case 2: return 0; case 3: return 1; case 4: return 2; + default: return -1; } } void printusage() { printf("Usage instructions for Opie-sh\n"); printf("Usage: opie-sh [dialog type] [type specific options]\n"); printf("Types:\n"); printf(" -m Message Box\n"); printf(" -f [filename] View file [Default = stdin]\n"); printf(" -i Input dialog\n"); printf(" -h --help These instructions\n"); printf(" -t [title] The window/dialog title\n"); printf("Message box options:\n"); printf(" -M [message] The message to display\n"); printf(" -I Use information icon\n"); printf(" -w Use the warning icon\n"); printf(" -e Use the error icon\n"); printf(" -0 [text] First button text [Default = OK]\n"); printf(" -1 [text] Second button text\n"); printf(" -2 [text] Third button text\n"); printf(" -g Disable fullscreen\n"); printf("Input Dialog options:\n"); printf(" -s A single line of input (output to console)\n"); printf(" -l List input (newline separated list read in from file)\n"); printf(" -b A list box, enabling multiple selections (input same as -l)\n"); printf(" -L [label] The label for the input field\n"); printf(" -F [filename] An input file (for when it makes sense) [Default = stdin]\n"); printf(" -E Makes list input editable\n"); - printf(" -g Disable fullscreen\n\0"); + printf(" -g Disable fullscreen\n"); } int fileviewer(QPEApplication *a, int argc, QStringList args) { int i; QString filename, title, icon; bool update=false; for(i=0; i < argc; i++) { if(args[i] == "-f") { if(args[i+1][0] != '-') { filename = args[i+1]; } diff --git a/noncore/tools/remote/buttondialog.cpp b/noncore/tools/remote/buttondialog.cpp index 7479e85..6ea4801 100644 --- a/noncore/tools/remote/buttondialog.cpp +++ b/noncore/tools/remote/buttondialog.cpp @@ -3,33 +3,33 @@ Opie-Remote. emulates remote controlls on an iPaq (and maybe a Zaurus) in Opie. Copyright (C) 2002 Thomas Stephens This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "buttondialog.h" -ButtonDialog::ButtonDialog(QString buttonName, QWidget *parent=0, const char*name=0, bool modal=FALSE, WFlags f=0):QDialog(parent, name, modal, f) +ButtonDialog::ButtonDialog(QString buttonName, QWidget *parent, const char*name, bool modal, WFlags f):QDialog(parent, name, modal, f) { setCaption(tr(buttonName)); QVBoxLayout *layout = new QVBoxLayout(this); QHBoxLayout *hlayout1 = new QHBoxLayout(this); QHBoxLayout *hlayout2 = new QHBoxLayout(this); QHBoxLayout *hlayout3 = new QHBoxLayout(this); layout->addSpacing(5); layout->addLayout(hlayout1); layout->addSpacing(5); layout->addLayout(hlayout2); layout->addSpacing(5); layout->addLayout(hlayout3); layout->addSpacing(5); @@ -98,33 +98,33 @@ QStringList ButtonDialog::getRemotes() strcpy(addr.sun_path,"/dev/lircd"); fd = socket(AF_UNIX, SOCK_STREAM, 0); if(fd == -1) { QMessageBox *mb = new QMessageBox("Error!", "couldnt connect to socket", QMessageBox::NoIcon, QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton); mb->exec(); perror("ButtonDialog::GetRemotes"); return NULL; } - if(std::connect(fd,(struct sockaddr *) &addr, sizeof(addr) ) == -1) + if(::connect(fd,(struct sockaddr *) &addr, sizeof(addr) ) == -1) { QMessageBox *mb = new QMessageBox("Error!", "couldnt connect to socket", QMessageBox::NoIcon, QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton); mb->exec(); perror("ButtonDialog::GetRemotes"); return NULL; } write(fd, write_buffer, strlen(write_buffer)); for(i=0; i<5; i++) { @@ -141,63 +141,63 @@ QStringList ButtonDialog::getRemotes() list+=readPacket(); } if(strcasecmp(readPacket(), "END") != 0) { QMessageBox *mb = new QMessageBox("Error!", "bad packet", QMessageBox::NoIcon, QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton); mb->exec(); perror("ButtonDialog::GetRemotes"); return NULL; } - std::close(fd); + ::close(fd); return list; } QStringList ButtonDialog::getButtons(const char *remoteName) { QString write_buffer = "LIST "; const char *readbuffer; int i, j, numlines; QStringList list; QString string; write_buffer += remoteName; write_buffer += '\n'; fd = socket(AF_UNIX, SOCK_STREAM, 0); if(fd == -1) { QMessageBox *mb = new QMessageBox("Error!", "couldnt connect to socket", QMessageBox::NoIcon, QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton); mb->exec(); perror("ButtonDialog::GetButtons"); return NULL; } - if(std::connect(fd,(struct sockaddr *) &addr, sizeof(addr) ) == -1) + if(::connect(fd,(struct sockaddr *) &addr, sizeof(addr) ) == -1) { QMessageBox *mb = new QMessageBox("Error!", "couldnt connect to socket", QMessageBox::NoIcon, QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton); mb->exec(); perror("ButtonDialog::GetButtons"); return NULL; } write(fd, write_buffer.latin1(), strlen(write_buffer) ); for(i=0; i<5; i++) { @@ -217,33 +217,33 @@ QStringList ButtonDialog::getButtons(const char *remoteName) list[i].remove(0, j+1); } if(strcasecmp(readPacket(), "END") != 0) { QMessageBox *mb = new QMessageBox("Error!", "bad packet", QMessageBox::NoIcon, QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton); mb->exec(); perror("ButtonDialog::GetButtons"); return NULL; } - std::close(fd); + ::close(fd); return list; } //this function was ripped for rc.c in xrc, it is available here: http://www.lirc.org/software.html const char *ButtonDialog::readPacket() { static char buffer[PACKET_SIZE+1]=""; char *end; static int ptr=0,end_len=0; ssize_t ret; timeout = 0; if(ptr>0) { memmove(buffer,buffer+ptr,strlen(buffer+ptr)+1); diff --git a/noncore/tools/remote/channelgroup.cpp b/noncore/tools/remote/channelgroup.cpp index 9f90284..7c33674 100644 --- a/noncore/tools/remote/channelgroup.cpp +++ b/noncore/tools/remote/channelgroup.cpp @@ -3,33 +3,33 @@ Opie-Remote. emulates remote controlls on an iPaq (and maybe a Zaurus) in Opie. Copyright (C) 2002 Thomas Stephens This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "channelgroup.h" -ChannelGroup::ChannelGroup(QWidget *parent=0, const char *name=0):QWidget(parent,name) +ChannelGroup::ChannelGroup(QWidget *parent, const char *name):QWidget(parent,name) { QGridLayout *layout = new QGridLayout(this); QVBoxLayout *volLayout = new QVBoxLayout(this); QVBoxLayout *chanLayout = new QVBoxLayout(this); layout->addRowSpacing(1,1); layout->addRowSpacing(3,1); layout->addRowSpacing(5,1); layout->addColSpacing(1,1); layout->addColSpacing(3,1); layout->addColSpacing(5,1); layout->addColSpacing(7,1); QPushButton *one = new QPushButton("1", this, "one"); layout->addWidget(one, 0, 2, 0); diff --git a/noncore/tools/remote/channelgroupconf.cpp b/noncore/tools/remote/channelgroupconf.cpp index 2d98115..e39121e 100644 --- a/noncore/tools/remote/channelgroupconf.cpp +++ b/noncore/tools/remote/channelgroupconf.cpp @@ -3,33 +3,33 @@ Opie-Remote. emulates remote controlls on an iPaq (and maybe a Zaurus) in Opie. Copyright (C) 2002 Thomas Stephens This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "channelgroupconf.h" -ChannelGroupConf::ChannelGroupConf(QWidget *parent=0, const char *name=0):QWidget(parent,name) +ChannelGroupConf::ChannelGroupConf(QWidget *parent, const char *name):QWidget(parent,name) { QGridLayout *layout = new QGridLayout(this); QVBoxLayout *volLayout = new QVBoxLayout(this); QVBoxLayout *chanLayout = new QVBoxLayout(this); layout->addRowSpacing(1,5); layout->addRowSpacing(3,5); layout->addRowSpacing(5,5); layout->addColSpacing(1,1); layout->addColSpacing(3,1); layout->addColSpacing(5,1); layout->addColSpacing(7,1); QPushButton *one = new QPushButton("1", this, "one"); layout->addWidget(one, 0, 2, 0); diff --git a/noncore/tools/remote/configtab.cpp b/noncore/tools/remote/configtab.cpp index f5896a9..17cdc6a 100644 --- a/noncore/tools/remote/configtab.cpp +++ b/noncore/tools/remote/configtab.cpp @@ -3,33 +3,33 @@ Opie-Remote. emulates remote controlls on an iPaq (and maybe a Zaurus) in Opie. Copyright (C) 2002 Thomas Stephens This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "configtab.h" -ConfigTab::ConfigTab(QWidget *parent=0, const char *name=0):QWidget(parent,name) +ConfigTab::ConfigTab(QWidget *parent, const char *name):QWidget(parent,name) { QVBoxLayout *layout = new QVBoxLayout(this); topGroupConf = new TopGroupConf(this, "topGroupConf"); layout->addWidget(topGroupConf, 1); layout->addSpacing(1); dvdGroupConf = new DVDGroupConf(this, "dvdGroupConf"); layout->addWidget(dvdGroupConf, 1); layout->addSpacing(1); vcrGroupConf = new VCRGroupConf(this, "vcrGroupConf"); layout->addWidget(vcrGroupConf, 1); layout->addSpacing(1); diff --git a/noncore/tools/remote/dvdgroup.cpp b/noncore/tools/remote/dvdgroup.cpp index a75c48a..d7ff515 100644 --- a/noncore/tools/remote/dvdgroup.cpp +++ b/noncore/tools/remote/dvdgroup.cpp @@ -9,33 +9,33 @@ License, or (at your option) any later version. 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "dvdgroup.h" -DVDGroup::DVDGroup(QWidget *parent=0, const char *name=0):QWidget(parent,name) +DVDGroup::DVDGroup(QWidget *parent, const char *name):QWidget(parent,name) { QGridLayout *layout = new QGridLayout(this); //put rows between the buttons of size 1 layout->addRowSpacing(1,1); layout->addRowSpacing(3,1); //put collumns between the buttons of size 5 layout->addColSpacing(1,5); layout->addColSpacing(3,5); layout->addColSpacing(5,5); layout->addColSpacing(7,5); //make sure that the collumns with the buttons in them stretch before the filler collumns do //since there is so little room, there is no need to do this for the rows layout->setColStretch(4,1); diff --git a/noncore/tools/remote/dvdgroupconf.cpp b/noncore/tools/remote/dvdgroupconf.cpp index 5bfe393..2a08ab6 100644 --- a/noncore/tools/remote/dvdgroupconf.cpp +++ b/noncore/tools/remote/dvdgroupconf.cpp @@ -3,33 +3,33 @@ Opie-Remote. emulates remote controlls on an iPaq (and maybe a Zaurus) in Opie. Copyright (C) 2002 Thomas Stephens This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "dvdgroupconf.h" -DVDGroupConf::DVDGroupConf(QWidget *parent=0, const char *name=0):QWidget(parent,name) +DVDGroupConf::DVDGroupConf(QWidget *parent, const char *name):QWidget(parent,name) { QGridLayout *layout = new QGridLayout(this); //put rows between the buttons of size 1 layout->addRowSpacing(1,1); layout->addRowSpacing(3,1); //put collumns between the buttons of size 5 layout->addColSpacing(1,5); layout->addColSpacing(3,5); layout->addColSpacing(5,5); layout->addColSpacing(7,5); //make sure that the collumns with the buttons in them stretch before the filler collumns do //since there is so little room, there is no need to do this for the rows layout->setColStretch(4,1); diff --git a/noncore/tools/remote/learntab.cpp b/noncore/tools/remote/learntab.cpp index 054bc7b..998f449 100644 --- a/noncore/tools/remote/learntab.cpp +++ b/noncore/tools/remote/learntab.cpp @@ -3,24 +3,24 @@ Opie-Remote. emulates remote controlls on an iPaq (and maybe a Zaurus) in Opie. Copyright (C) 2002 Thomas Stephens This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "learntab.h" -LearnTab::LearnTab(QWidget *parent=0, const char *name=0):QWidget(parent,name) +LearnTab::LearnTab(QWidget *parent, const char *name):QWidget(parent,name) { QVBoxLayout *layout = new QVBoxLayout(this); QString *string = new QString("<qt><h1>Opie-Remote Usage Instructions</h1><p>First, some definitions. A Remote is a remote entry in an lircd.conf file, it represents one remote you want to emulate. A Remote Layout is one entry in your ~/Settings/Remote.conf file. It represents the buttons that you see on your screen. Each button on a Remote Layout can be mapped to any button in a Remote. This way you can have, for example, a vcr remote layout, in which all the play/pause/etc buttons are mapped to the buttons on your vcr's remote. However, most VCR's don't have volume controls, so the volume buttons can be mapped to the volume buttons on your TV.</p><p>The first things you need the lirc and lirc-modules ipkgs. If you installed this from an ipkg, they should already be there, thanks to the wonderful world of dependencies. If not, get them. The next thing you need is an lircd.conf file. you can get these at <a href=http://www.lirc.org/>http://www.lirc.org/</a>. Read the documentation there to figure out how to make your own, if one for your remote doesn't exist, or how to have multiple remotes in one lircd.conf file. Once you have a good lircd.conf file, put it in /etc, kill the lircd daemon (if its running) and do a modprobe lirc_sir. Then, run lircd again.</p><p>The next thing you want to do is to create a remote layout. Go to the config tab, and enter a name for your remote layout in the pulldown menu. Dont use the name Remotes, as that could confuse the app. Hopefully, that will be fixed soon. after entering the name you want to use, press New, and then select the name again from the pulldown menu (another oddity that i hope to fix). Then, press each button that you want to map, and a dialog should appear. Select the remote and button that you want to use, and click OK. Once you are done, go to the Remote tab, and select the new remote from the dropdown menu. It should works fine. If at any time you want to change a remote layout, go to the Config tab, select the layout from the dropdown menu, and change the buttons you want to change.</p><p>This is program is written and maintaned by Thomas (spiralman) Stephens. <a href=mailto:spiralman@softhome.net>spiralman@softhome.net</a>. Or, look for me on #opie or #handhelds.org on irc.openprojects.net.</p></qt>"); QTextView *textView = new QTextView(*string, 0, this); layout->addWidget(textView); } diff --git a/noncore/tools/remote/mainview.cpp b/noncore/tools/remote/mainview.cpp index 47027fb..a7be9e3 100644 --- a/noncore/tools/remote/mainview.cpp +++ b/noncore/tools/remote/mainview.cpp @@ -3,33 +3,33 @@ Opie-Remote. emulates remote controlls on an iPaq (and maybe a Zaurus) in Opie. Copyright (C) 2002 Thomas Stephens This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "mainview.h" -MainView::MainView(QWidget *parent, const char *name=0) : QWidget(parent, name) +MainView::MainView(QWidget *parent, const char *name) : QWidget(parent, name) { setIcon( Resource::loadPixmap( "remote" ) ); setCaption(tr("Remote") ); QVBoxLayout *layout = new QVBoxLayout(this); QTabWidget *tabs = new QTabWidget(this); layout->addWidget(tabs); printf("MainView: 1\n"); remote = new RemoteTab(tabs); printf("MainView: 2\n"); learn = new LearnTab(tabs); printf("MainView: 3\n"); config = new ConfigTab(tabs); printf("MainView: 4\n"); diff --git a/noncore/tools/remote/remotetab.cpp b/noncore/tools/remote/remotetab.cpp index 64b8ee4..5b02e94 100644 --- a/noncore/tools/remote/remotetab.cpp +++ b/noncore/tools/remote/remotetab.cpp @@ -3,33 +3,33 @@ Opie-Remote. emulates remote controlls on an iPaq (and maybe a Zaurus) in Opie. Copyright (C) 2002 Thomas Stephens This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "remotetab.h" -RemoteTab::RemoteTab(QWidget *parent=0, const char *name=0):QWidget(parent,name) +RemoteTab::RemoteTab(QWidget *parent, const char *name):QWidget(parent,name) { QVBoxLayout *layout = new QVBoxLayout(this); topGroup = new TopGroup(this); // topGroup->setMaximumHeight(22); layout->addWidget(topGroup, 0, 0); printf("%d %d", topGroup->width(), topGroup->height()); layout->addSpacing(1); dvdGroup = new DVDGroup(this); // dvdGroup->setMaximumHeight(68); layout->addWidget(dvdGroup, 0, 0); layout->addSpacing(1); @@ -58,65 +58,65 @@ int RemoteTab::sendIR() string+='\n'; const char *write_buffer = string.latin1(); const char *read_buffer; bool done=false; fd = socket(AF_UNIX, SOCK_STREAM, 0); if(fd == -1) { QMessageBox *mb = new QMessageBox("Error!", "couldnt connect to socket", QMessageBox::NoIcon, QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton); mb->exec(); perror("RemoteTab::SendIR"); - return NULL; + return 0; } - if(std::connect(fd,(struct sockaddr *) &addr, sizeof(addr) ) == -1) + if(::connect(fd,(struct sockaddr *) &addr, sizeof(addr) ) == -1) { QMessageBox *mb = new QMessageBox("Error!", "couldnt connect to socket", QMessageBox::NoIcon, QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton); mb->exec(); perror("RemoteTab::SendIR"); } printf("fd2: %d\n", fd); printf("%s", write_buffer); printf("1\n"); printf("%d\n", write(fd, write_buffer, strlen(write_buffer) ) ); printf("2\n"); while(!done) { read_buffer=readPacket(); printf("%s\n", read_buffer); if(strcasecmp(read_buffer, "END") == 0) { printf("done reading packet\n"); done=true; } } - std::close(fd); + ::close(fd); } // printf("%s\n", readPacket()); // printf("%d\n", read(fd, read_buffer,sizeof(read_buffer)) ); // printf("%s", read_buffer); //this function was ripped for rc.c in xrc, it is available here: http://www.lirc.org/software.html const char *RemoteTab::readPacket() { static char buffer[PACKET_SIZE+1]=""; char *end; static int ptr=0,end_len=0; ssize_t ret; if(ptr>0) { diff --git a/noncore/tools/remote/topgroup.cpp b/noncore/tools/remote/topgroup.cpp index 94ea622..93cffbb 100644 --- a/noncore/tools/remote/topgroup.cpp +++ b/noncore/tools/remote/topgroup.cpp @@ -3,33 +3,33 @@ Opie-Remote. emulates remote controlls on an iPaq (and maybe a Zaurus) in Opie. Copyright (C) 2002 Thomas Stephens This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "topgroup.h" -TopGroup::TopGroup(QWidget *parent=0, const char *name=0):QWidget(parent,name) +TopGroup::TopGroup(QWidget *parent, const char *name):QWidget(parent,name) { QHBoxLayout *layout = new QHBoxLayout(this, 0, -1, 0); QPushButton *power = new QPushButton("Power",this,"power"); layout->addWidget(power); connect(power, SIGNAL(pressed()), this->parentWidget(), SLOT(sendIR()) ); // power->setGeometry(5, 5,40, 20); layout->addSpacing(5); QPushButton *source = new QPushButton("Source",this,"source"); layout->addWidget(source); connect(source, SIGNAL(pressed()), this->parentWidget(), SLOT(sendIR()) ); // source->setGeometry(50,5,40,20); remotes = new QComboBox(false, this, "remotes"); diff --git a/noncore/tools/remote/topgroupconf.cpp b/noncore/tools/remote/topgroupconf.cpp index eb071fb..d763a3a 100644 --- a/noncore/tools/remote/topgroupconf.cpp +++ b/noncore/tools/remote/topgroupconf.cpp @@ -3,33 +3,33 @@ Opie-Remote. emulates remote controlls on an iPaq (and maybe a Zaurus) in Opie. Copyright (C) 2002 Thomas Stephens This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "topgroupconf.h" -TopGroupConf::TopGroupConf(QWidget *parent=0, const char *name=0):QWidget(parent,name) +TopGroupConf::TopGroupConf(QWidget *parent, const char *name):QWidget(parent,name) { QHBoxLayout *layout = new QHBoxLayout(this); QPushButton *power = new QPushButton("Power",this,"power"); layout->addWidget(power); connect(power, SIGNAL(pressed()), this->parentWidget(), SLOT(buttonPressed()) ); // power->setGeometry(5, 5,40, 20); layout->addSpacing(5); QPushButton *source = new QPushButton("Source",this,"source"); layout->addWidget(source); connect(source, SIGNAL(pressed()), this->parentWidget(), SLOT(buttonPressed()) ); // source->setGeometry(50,5,40,20); remotes = new QComboBox(true, this, "remotes"); diff --git a/noncore/tools/remote/vcrgroup.cpp b/noncore/tools/remote/vcrgroup.cpp index 4f07ca3..10ebe5d 100644 --- a/noncore/tools/remote/vcrgroup.cpp +++ b/noncore/tools/remote/vcrgroup.cpp @@ -9,33 +9,33 @@ License, or (at your option) any later version. 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "vcrgroup.h" -VCRGroup::VCRGroup(QWidget *parent=0, const char *name=0) : QWidget(parent, +VCRGroup::VCRGroup(QWidget *parent, const char *name) : QWidget(parent, name) { QVBoxLayout *vlayout = new QVBoxLayout(this); QHBoxLayout *hlayout1 = new QHBoxLayout(this); QHBoxLayout *hlayout2 = new QHBoxLayout(this); vlayout->addLayout(hlayout1); vlayout->addSpacing(1); vlayout->addLayout(hlayout2); QPushButton *play = new QPushButton("Play",this, "play"); hlayout1->addWidget(play); connect(play, SIGNAL(pressed()), this->parentWidget(), SLOT(sendIR()) ); diff --git a/noncore/tools/remote/vcrgroupconf.cpp b/noncore/tools/remote/vcrgroupconf.cpp index a50ed0a..2158d43 100644 --- a/noncore/tools/remote/vcrgroupconf.cpp +++ b/noncore/tools/remote/vcrgroupconf.cpp @@ -3,33 +3,33 @@ Opie-Remote. emulates remote controlls on an iPaq (and maybe a Zaurus) in Opie. Copyright (C) 2002 Thomas Stephens This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "vcrgroupconf.h" -VCRGroupConf::VCRGroupConf(QWidget *parent=0, const char *name=0) : QWidget(parent, name) +VCRGroupConf::VCRGroupConf(QWidget *parent, const char *name) : QWidget(parent, name) { QVBoxLayout *vlayout = new QVBoxLayout(this); QHBoxLayout *hlayout1 = new QHBoxLayout(this); QHBoxLayout *hlayout2 = new QHBoxLayout(this); vlayout->addLayout(hlayout1); vlayout->addSpacing(1); vlayout->addLayout(hlayout2); QPushButton *play = new QPushButton("Play",this, "play"); hlayout1->addWidget(play); connect(play, SIGNAL(pressed()), this->parentWidget(), SLOT(buttonPressed()) ); hlayout1->addSpacing(5); 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 @@ -157,33 +157,33 @@ QString IMAPHandler::iLsub(const QString &reference, const QString &mailbox) .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(); 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 @@ -18,33 +18,33 @@ #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 ); 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,85 +1,85 @@ #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") // { 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,29 +1,29 @@ #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 ) { @@ -184,33 +184,33 @@ void PackageList::readFileEntries( QString filename, QString dest ) } }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 ) { 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,33 +1,33 @@ #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; } 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 @@ -146,21 +146,21 @@ 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 @@ -156,34 +156,34 @@ template <unsigned int SH> inline bool operator != ( int i, const fixed<SH> &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 |