author | zecke <zecke> | 2004-03-14 16:13:28 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-03-14 16:13:28 (UTC) |
commit | f3d284849df36ef281dcb5aa2d00f613e3a354d8 (patch) (side-by-side diff) | |
tree | 65406b10a839ffa1ba683f59e61ef7227a0093d1 | |
parent | f12af18557c8f376f0c6c30e80a85737ff6c592e (diff) | |
download | opie-f3d284849df36ef281dcb5aa2d00f613e3a354d8.zip opie-f3d284849df36ef281dcb5aa2d00f613e3a354d8.tar.gz opie-f3d284849df36ef281dcb5aa2d00f613e3a354d8.tar.bz2 |
Fix up depends on LIBOPIE1
Proper signature for signal and slots and namespaces
22 files changed, 43 insertions, 48 deletions
diff --git a/noncore/applets/notesapplet/config.in b/noncore/applets/notesapplet/config.in index 866adfb..27a8187 100644 --- a/noncore/applets/notesapplet/config.in +++ b/noncore/applets/notesapplet/config.in @@ -1,4 +1,4 @@ config NOTESAPPLET boolean "opie-notesapplet (quick note taking applet)" default "y" - depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE + depends ( LIBQPE || LIBQPE-X11 ) diff --git a/noncore/apps/advancedfm/advancedfmMenu.cpp b/noncore/apps/advancedfm/advancedfmMenu.cpp index a694b70..6d41ac3 100644 --- a/noncore/apps/advancedfm/advancedfmMenu.cpp +++ b/noncore/apps/advancedfm/advancedfmMenu.cpp @@ -11,50 +11,50 @@ ***************************************************************************/
#include "advancedfm.h"
#include "output.h"
#include "filePermissions.h"
#include <qpe/lnkproperties.h>
#include <qpe/qpeapplication.h>
#include <qpe/applnk.h>
#include <qmessagebox.h>
#include <qpopupmenu.h>
#include <qlistview.h>
#include <errno.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/stat.h>
#include <dirent.h>
#include <sys/sendfile.h>
#include <fcntl.h>
-using namespace Opie::Core; -using namespace Opie::Core; +using namespace Opie::Core;
+using namespace Opie::Core;
void AdvancedFm::doDirChange() {
QString pathItem = CurrentView()->currentItem()->text(0);
if( pathItem == "../") {
ListClicked( CurrentView()->currentItem());
} else {
if( pathItem.find(" -> ",0,TRUE) != -1)
pathItem = dealWithSymName((const QString&)pathItem)+"/";
// qWarning(pathItem);
gotoDirectory( CurrentDir()->path()+"/"+pathItem.left( pathItem.length() - 1) );
}
}
void AdvancedFm::showMenuHidden() {
if (b) {
CurrentDir()->setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
OtherDir()->setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
fileMenu->setItemChecked( fileMenu->idAt(0),TRUE);
} else {
CurrentDir()->setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All);
OtherDir()->setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All);
fileMenu->setItemChecked( fileMenu->idAt(0),FALSE);
}
b = !b;
populateView();
@@ -684,52 +684,52 @@ void AdvancedFm::doBeam() { }
Ir *file = new Ir(this, "IR");
connect(file, SIGNAL(done(Ir*)), this, SLOT( fileBeamFinished(Ir*)));
file->send( curFilePath, curFile );
}
}
}
}
void AdvancedFm::fileBeamFinished( Ir *) {
QMessageBox::message( tr("Advancedfm Beam out"), tr("Ir sent.") ,tr("Ok") );
}
void AdvancedFm::selectAll() {
QListView *thisView = CurrentView();
thisView->selectAll(true);
thisView->setSelected( thisView->firstChild(),false);
}
void AdvancedFm::startProcess(const QString & cmd) {
QStringList command;
OProcess *process;
process = new OProcess();
connect(process, SIGNAL(processExited(Opie::Core::OProcess*)),
- this, SLOT( processEnded(OProcess*)));
+ this, SLOT( processEnded(Opie::Core::OProcess*)));
connect(process, SIGNAL( receivedStderr(Opie::Core::OProcess*,char*,int)),
- this, SLOT( oprocessStderr(OProcess*,char*,int)));
+ this, SLOT( oprocessStderr(Opie::Core::OProcess*,char*,int)));
command << "/bin/sh";
command << "-c";
command << cmd.latin1();
*process << command;
if(!process->start(OProcess::NotifyOnExit, OProcess::All) )
qDebug("could not start process");
}
void AdvancedFm::processEnded(OProcess *) {
rePopulate();
}
void AdvancedFm::oprocessStderr(OProcess*, char *buffer, int ) {
// qWarning("received stderrt %d bytes", buflen);
QString lineStr = buffer;
QMessageBox::warning( this, tr("Error"), lineStr ,tr("Ok") );
}
bool AdvancedFm::eventFilter( QObject * o, QEvent * e ) {
if ( o->inherits( "QLineEdit" ) ) {
if ( e->type() == QEvent::KeyPress ) {
QKeyEvent *ke = (QKeyEvent*)e;
diff --git a/noncore/apps/advancedfm/output.cpp b/noncore/apps/advancedfm/output.cpp index 16a0992..6906298 100644 --- a/noncore/apps/advancedfm/output.cpp +++ b/noncore/apps/advancedfm/output.cpp @@ -126,52 +126,52 @@ Output::Output( const QStringList commands, QWidget* parent, const char* name, setName( tr("Output")); resize( 196, 269 ); setCaption( name ); OutputLayout = new QGridLayout( this ); OutputLayout->setSpacing( 2); OutputLayout->setMargin( 2); QPushButton *docButton; docButton = new QPushButton( QPixmap(( const char** ) filesave_xpm ) ,"",this,"saveButton"); docButton->setFixedSize( QSize( 20, 20 ) ); connect( docButton,SIGNAL(released()),this,SLOT( saveOutput() )); // docButton->setFlat(TRUE); OutputLayout->addMultiCellWidget( docButton, 0,0,3,3 ); OutputEdit = new QMultiLineEdit( this, "OutputEdit" ); OutputLayout->addMultiCellWidget( OutputEdit, 1,1,0,3 ); proc = new OProcess(); connect(proc, SIGNAL(processExited(Opie::Core::OProcess*)), this, SLOT( processFinished())); connect(proc, SIGNAL(receivedStdout(Opie::Core::OProcess*,char*,int)), - this, SLOT(commandStdout(OProcess*,char*,int))); + this, SLOT(commandStdout(Opie::Core::OProcess*,char*,int))); connect(proc, SIGNAL(receivedStderr(Opie::Core::OProcess*,char*,int)), - this, SLOT(commandStderr(OProcess*,char*,int))); + this, SLOT(commandStderr(Opie::Core::OProcess*,char*,int))); // connect( , SIGNAL(received(const QByteArray&)), // this, SLOT(commandStdin(const QByteArray&))); // * proc << commands.latin1(); for ( QStringList::Iterator it = cmmds.begin(); it != cmmds.end(); ++it ) { qDebug( "%s", (*it).latin1() ); * proc << (*it).latin1(); } if(!proc->start(OProcess::NotifyOnExit, OProcess::All)) { OutputEdit->append(tr("Process could not start") ); OutputEdit->setCursorPosition( OutputEdit->numLines() + 1,0,FALSE); perror("Error: "); QString errorMsg=tr("Error\n")+(QString)strerror(errno); OutputEdit->append( errorMsg); OutputEdit->setCursorPosition( OutputEdit->numLines() + 1,0,FALSE); } } Output::~Output() { } diff --git a/noncore/apps/opie-console/io_bt.cpp b/noncore/apps/opie-console/io_bt.cpp index 35a328f..a29fa8e 100644 --- a/noncore/apps/opie-console/io_bt.cpp +++ b/noncore/apps/opie-console/io_bt.cpp @@ -1,66 +1,65 @@ #include "io_bt.h" using namespace Opie::Core; -using namespace Opie::Core; IOBt::IOBt( const Profile &config ) : IOSerial( config ) { m_attach = 0; } IOBt::~IOBt() { if ( m_attach ) { delete m_attach; } } void IOBt::close() { IOSerial::close(); // still need error handling if ( m_attach ) { delete m_attach; m_attach = 0; } } bool IOBt::open() { bool ret = false; // only set up bt stuff if mac address was set, otherwise use the device set if ( !m_mac.isEmpty() ) { // now it should also be checked, if there is a connection to the device with that mac allready // hciattach here m_attach = new OProcess(); *m_attach << "hciattach /dev/ttyS2 any 57600"; // then start hcid, then rcfomm handling (m_mac) connect( m_attach, SIGNAL( processExited(Opie::Core::OProcess*) ), - this, SLOT( slotExited(OProcess*) ) ); + this, SLOT( slotExited(Opie::Core::OProcess*) ) ); if ( m_attach->start() ) { ret = IOSerial::open(); } else { qWarning("could not attach to device"); delete m_attach; m_attach = 0; } } else { // directly to the normal serial // TODO: look first if the connection really exists. ( is set up ) ret =IOSerial::open(); } return ret; } void IOBt::reload( const Profile &config ) { m_device = config.readEntry("Device", BT_DEFAULT_DEVICE); m_mac = config.readEntry("Mac", BT_DEFAULT_MAC); m_baud = config.readNumEntry("Baud", BT_DEFAULT_BAUD); m_parity = config.readNumEntry("Parity", BT_DEFAULT_PARITY); m_dbits = config.readNumEntry("DataBits", BT_DEFAULT_DBITS); m_sbits = config.readNumEntry("StopBits", BT_DEFAULT_SBITS); diff --git a/noncore/apps/opie-console/io_irda.cpp b/noncore/apps/opie-console/io_irda.cpp index ba0b0e5..07c2b62 100644 --- a/noncore/apps/opie-console/io_irda.cpp +++ b/noncore/apps/opie-console/io_irda.cpp @@ -1,57 +1,56 @@ #include "io_irda.h" using namespace Opie::Core; -using namespace Opie::Core; IOIrda::IOIrda( const Profile &config ) : IOSerial( config ) { m_attach = 0; } IOIrda::~IOIrda() { if ( m_attach ) { delete m_attach; } } void IOIrda::close() { IOSerial::close(); // still need error handling delete m_attach; } bool IOIrda::open() { bool ret; // irdaattach here m_attach = new OProcess(); *m_attach << "irattach /dev/ttyS2 -s"; connect( m_attach, SIGNAL( processExited(Opie::Core::OProcess*) ), - this, SLOT( slotExited(OProcess*) ) ); + this, SLOT( slotExited(Opie::Core::OProcess*) ) ); if ( m_attach->start() ) { ret= IOSerial::open(); } else { // emit error!!! qWarning("could not attach to device"); delete m_attach; m_attach = 0l; } return ret; } void IOIrda::reload( const Profile &config ) { m_device = config.readEntry("Device", IRDA_DEFAULT_DEVICE); m_baud = config.readNumEntry("Baud", IRDA_DEFAULT_BAUD); m_parity = config.readNumEntry("Parity", IRDA_DEFAULT_PARITY); m_dbits = config.readNumEntry("DataBits", IRDA_DEFAULT_DBITS); m_sbits = config.readNumEntry("StopBits", IRDA_DEFAULT_SBITS); m_flow = config.readNumEntry("Flow", IRDA_DEFAULT_FLOW); } QString IOIrda::identifier() const { return "irda"; diff --git a/noncore/apps/opie-console/sz_transfer.cpp b/noncore/apps/opie-console/sz_transfer.cpp index 5958e93..fbc5306 100644 --- a/noncore/apps/opie-console/sz_transfer.cpp +++ b/noncore/apps/opie-console/sz_transfer.cpp @@ -9,51 +9,51 @@ using namespace Opie::Core; using namespace Opie::Core; SzTransfer::SzTransfer(Type t, IOLayer *layer) : FileTransferLayer(layer), m_t(t) { } SzTransfer::~SzTransfer() { } void SzTransfer::sendFile(const QFile& file) { sendFile(file.name()); } void SzTransfer::sendFile(const QString& file) { //setcbreak(2); /* raw no echo */ proc = new OProcess; *proc << "sz"; *proc << "-v" << "-v" << "-b" << file; connect(proc, SIGNAL(processExited(Opie::Core::OProcess*)), this, SLOT(sent())); connect(proc, SIGNAL(receivedStdout(Opie::Core::OProcess*,char*,int)), - this, SLOT(SzReceivedStdout(OProcess*,char*,int))); + this, SLOT(SzReceivedStdout(Opie::Core::OProcess*,char*,int))); connect(proc, SIGNAL(receivedStderr(Opie::Core::OProcess*,char*,int)), - this, SLOT(SzReceivedStderr(OProcess*,char*,int))); + this, SLOT(SzReceivedStderr(Opie::Core::OProcess*,char*,int))); connect(layer(), SIGNAL(received(const QByteArray&)), this, SLOT(receivedStdin(const QByteArray&))); proc->start(OProcess::NotifyOnExit, OProcess::All); } void SzTransfer::SzReceivedStdout(OProcess *, char *buffer, int buflen) { qWarning("recieved from sz on stdout %d bytes", buflen); QByteArray data(buflen); data.fill(*buffer, buflen); for (uint i = 0; i < data.count(); i++ ) { printf("%c", buffer[i] ); } printf("\n"); // send out through the io layer layer()->send(data); } void SzTransfer::SzReceivedStderr(OProcess *, char *buffer, int length) { // parse and show data in a progress dialog/widget diff --git a/noncore/net/mail/libmailwrapper/mhwrapper.cpp b/noncore/net/mail/libmailwrapper/mhwrapper.cpp index 21e24a0..5eae31f 100644 --- a/noncore/net/mail/libmailwrapper/mhwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/mhwrapper.cpp @@ -1,37 +1,35 @@ #include "mhwrapper.h" #include "mailtypes.h" #include "mailwrapper.h" #include <libetpan/libetpan.h> #include <qdir.h> #include <qmessagebox.h> #include <stdlib.h> #include <qpe/global.h> #include <opie2/oprocess.h> using namespace Opie::Core; -using namespace Opie::Core; -using namespace Opie::Core; MHwrapper::MHwrapper(const QString & mbox_dir,const QString&mbox_name) : Genericwrapper(),MHPath(mbox_dir),MHName(mbox_name) { if (MHPath.length()>0) { if (MHPath[MHPath.length()-1]=='/') { MHPath=MHPath.left(MHPath.length()-1); } qDebug(MHPath); QDir dir(MHPath); if (!dir.exists()) { dir.mkdir(MHPath); } init_storage(); } } void MHwrapper::init_storage() { int r; QString pre = MHPath; if (!m_storage) { m_storage = mailstorage_new(NULL); r = mh_mailstorage_init(m_storage,(char*)pre.latin1(),0,0,0); if (r != MAIL_NO_ERROR) { @@ -300,51 +298,51 @@ int MHwrapper::deleteAllMail(const FolderP&tfolder) int MHwrapper::deleteMbox(const FolderP&tfolder) { init_storage(); if (!m_storage) { return 0; } if (!tfolder) return 0; if (tfolder->getName()=="/" || tfolder->getName().isEmpty()) return 0; int r = mailsession_delete_folder(m_storage->sto_session,(char*)tfolder->getName().latin1()); if (r != MAIL_NO_ERROR) { qDebug("error deleting mail box"); return 0; } QString cmd = "rm -rf "+tfolder->getName(); QStringList command; command << "/bin/sh"; command << "-c"; command << cmd.latin1(); OProcess *process = new OProcess(); connect(process, SIGNAL(processExited(Opie::Core::OProcess*)), - this, SLOT( processEnded(OProcess*))); + this, SLOT( processEnded(Opie::Core::OProcess*))); connect(process, SIGNAL( receivedStderr(Opie::Core::OProcess*,char*,int)), - this, SLOT( oprocessStderr(OProcess*,char*,int))); + this, SLOT( oprocessStderr(Opie::Core::OProcess*,char*,int))); *process << command; removeMboxfailed = false; if(!process->start(OProcess::Block, OProcess::All) ) { qDebug("could not start process"); return 0; } qDebug("mail box deleted"); return 1; } void MHwrapper::processEnded(OProcess *p) { if (p) delete p; } void MHwrapper::oprocessStderr(OProcess*, char *buffer, int ) { QString lineStr = buffer; QMessageBox::warning( 0, tr("Error"), lineStr ,tr("Ok") ); removeMboxfailed = true; } void MHwrapper::statusFolder(folderStat&target_stat,const QString & mailbox) diff --git a/noncore/net/opietooth/lib/device.cc b/noncore/net/opietooth/lib/device.cc index d913853..18d26e4 100644 --- a/noncore/net/opietooth/lib/device.cc +++ b/noncore/net/opietooth/lib/device.cc @@ -1,126 +1,125 @@ #include <signal.h> #include <opie2/oprocess.h> #include "device.h" using namespace OpieTooth; using namespace Opie::Core; -using namespace Opie::Core; namespace { int parsePid( const QCString& par ){ int id=0; QString string( par ); QStringList list = QStringList::split( '\n', string ); for( QStringList::Iterator it = list.begin(); it != list.end(); ++it ){ qWarning("parsePID: %s", (*it).latin1() ); if( !(*it).startsWith("CSR") ){ id = (*it).toInt(); break; } } return id; } } Device::Device(const QString &device, const QString &mode, const QString &speed ) : QObject(0, "device") { qWarning("OpieTooth::Device create" ); m_hci = 0; m_process = 0; m_attached = false; m_device = device; m_mode = mode; m_speed = speed; attach(); } Device::~Device(){ detach(); } void Device::attach(){ qWarning("attaching %s %s %s", m_device.latin1(), m_mode.latin1(), m_speed.latin1() ); if(m_process == 0 ){ m_output.resize(0); qWarning("new process to create" ); m_process = new OProcess(); *m_process << "hciattach"; *m_process << "-p"; *m_process << m_device << m_mode << m_speed; connect(m_process, SIGNAL( processExited(Opie::Core::OProcess*) ), - this, SLOT( slotExited(OProcess* ) ) ); + this, SLOT( slotExited(Opie::Core::OProcess* ) ) ); connect(m_process, SIGNAL( receivedStdout(Opie::Core::OProcess*, char*, int) ), - this, SLOT(slotStdOut(OProcess*,char*,int ) ) ); + this, SLOT(slotStdOut(Opie::Core::OProcess*,char*,int ) ) ); connect(m_process, SIGNAL(receivedStderr(Opie::Core::OProcess*, char*, int ) ), - this, SLOT(slotStdErr(OProcess*,char*,int) ) ); + this, SLOT(slotStdErr(Opie::Core::OProcess*,char*,int) ) ); if(!m_process->start(OProcess::NotifyOnExit, OProcess::AllOutput ) ){ qWarning("Could not start" ); delete m_process; m_process = 0; } }; } void Device::detach(){ delete m_hci; delete m_process; // kill the pid we got if(m_attached ){ //kill the pid qWarning( "killing" ); kill(pid, 9); } qWarning("detached" ); } bool Device::isLoaded()const{ return m_attached; } QString Device::devName()const { return QString::fromLatin1("hci0"); }; void Device::slotExited( OProcess* proc) { qWarning("prcess exited" ); if(proc== m_process ){ qWarning("proc == m_process" ); if( m_process->normalExit() ){ // normal exit qWarning("normalExit" ); int ret = m_process->exitStatus(); if( ret == 0 ){ // attached qWarning("attached" ); qWarning("Output: %s", m_output.data() ); pid = parsePid( m_output ); qWarning("Pid = %d", pid ); // now hciconfig hci0 up ( determine hciX FIXME) // and call hciconfig hci0 up // FIXME hardcoded to hci0 now :( m_hci = new OProcess( ); *m_hci << "hciconfig"; *m_hci << "hci0 up"; connect(m_hci, SIGNAL( processExited(Opie::Core::OProcess*) ), - this, SLOT( slotExited(OProcess* ) ) ); + this, SLOT( slotExited(Opie::Core::OProcess* ) ) ); if(!m_hci->start() ){ qWarning("could not start" ); m_attached = false; emit device("hci0", false ); } }else{ qWarning("crass" ); m_attached = false; emit device("hci0", false ); } } delete m_process; m_process = 0; }else if(proc== m_hci ){ qWarning("M HCI exited" ); if( m_hci->normalExit() ){ qWarning("normal exit" ); int ret = m_hci->exitStatus(); if( ret == 0 ){ qWarning("attached really really attached" ); m_attached = true; emit device("hci0", true ); }else{ diff --git a/noncore/net/opietooth/lib/manager.cc b/noncore/net/opietooth/lib/manager.cc index 56156a8..7c9ea5b 100644 --- a/noncore/net/opietooth/lib/manager.cc +++ b/noncore/net/opietooth/lib/manager.cc @@ -24,116 +24,116 @@ Manager::Manager( Device* /*dev*/ ) m_hcitool = 0; m_sdp = 0; } Manager::Manager() : QObject() { m_hcitool = 0; m_sdp = 0; } Manager::~Manager(){ delete m_hcitool; delete m_sdp; } void Manager::setDevice( const QString& dev ){ m_device = dev; } void Manager::setDevice( Device* /*dev*/ ){ } void Manager::isAvailable( const QString& device ){ OProcess* l2ping = new OProcess(); l2ping->setName( device.latin1() ); *l2ping << "l2ping" << "-c1" << device; connect(l2ping, SIGNAL(processExited(Opie::Core::OProcess* ) ), - this, SLOT(slotProcessExited(OProcess*) ) ); + this, SLOT(slotProcessExited(Opie::Core::OProcess*) ) ); if (!l2ping->start() ) { emit available( device, false ); delete l2ping; } } void Manager::isAvailable( Device* /*dev*/ ){ } void Manager::searchDevices( const QString& device ){ qWarning("search devices"); OProcess* hcitool = new OProcess(); hcitool->setName( device.isEmpty() ? "hci0" : device.latin1() ); *hcitool << "hcitool" << "scan"; connect( hcitool, SIGNAL(processExited(Opie::Core::OProcess*) ) , - this, SLOT(slotHCIExited(OProcess* ) ) ); + this, SLOT(slotHCIExited(Opie::Core::OProcess* ) ) ); connect( hcitool, SIGNAL(receivedStdout(Opie::Core::OProcess*, char*, int ) ), - this, SLOT(slotHCIOut(OProcess*, char*, int ) ) ); + this, SLOT(slotHCIOut(Opie::Core::OProcess*, char*, int ) ) ); if (!hcitool->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) { qWarning("could not start"); RemoteDevice::ValueList list; emit foundDevices( device, list ); delete hcitool; } } void Manager::searchDevices(Device* /*d*/ ){ } void Manager::addService(const QString& name ){ OProcess proc; proc << "sdptool" << "add" << name; bool bo = true; if (!proc.start(OProcess::DontCare ) ) bo = false; emit addedService( name, bo ); } void Manager::addServices(const QStringList& list){ QStringList::ConstIterator it; for (it = list.begin(); it != list.end(); ++it ) addService( (*it) ); } void Manager::removeService( const QString& name ){ OProcess prc; prc << "sdptool" << "del" << name; bool bo = true; if (!prc.start(OProcess::DontCare ) ) bo = false; emit removedService( name, bo ); } void Manager::removeServices( const QStringList& list){ QStringList::ConstIterator it; for (it = list.begin(); it != list.end(); ++it ) removeService( (*it) ); } void Manager::searchServices( const QString& remDevice ){ OProcess *m_sdp =new OProcess(); *m_sdp << "sdptool" << "browse" << remDevice; m_sdp->setName( remDevice.latin1() ); qWarning("search Services for %s", remDevice.latin1() ); connect(m_sdp, SIGNAL(processExited(Opie::Core::OProcess*) ), - this, SLOT(slotSDPExited(OProcess* ) ) ); + this, SLOT(slotSDPExited(Opie::Core::OProcess* ) ) ); connect(m_sdp, SIGNAL(receivedStdout(Opie::Core::OProcess*, char*, int ) ), - this, SLOT(slotSDPOut(OProcess*, char*, int) ) ); + this, SLOT(slotSDPOut(Opie::Core::OProcess*, char*, int) ) ); if (!m_sdp->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) { qWarning("could not start sdptool" ); delete m_sdp; Services::ValueList list; emit foundServices( remDevice, list ); } } void Manager::searchServices( const RemoteDevice& dev){ searchServices( dev.mac() ); } QString Manager::toDevice( const QString& /*mac*/ ){ return QString::null; } QString Manager::toMac( const QString &/*device*/ ){ return QString::null; } void Manager::slotProcessExited(OProcess* proc ) { bool conn= false; if (proc->normalExit() && proc->exitStatus() == 0 ) conn = true; QString name = QString::fromLatin1(proc->name() ); emit available( name, conn ); delete proc; @@ -228,51 +228,51 @@ RemoteDevice::ValueList Manager::parseHCIOutput(const QString& output ) { } ////// hcitool cc and hcitool con /** * Create it on the stack as don't care * so we don't need to care for it * cause hcitool gets reparented */ void Manager::connectTo( const QString& mac) { OProcess proc; proc << "hcitool"; proc << "cc"; proc << mac; proc.start(OProcess::DontCare); // the lib does not care at this point } void Manager::searchConnections() { qWarning("searching connections?"); OProcess* proc = new OProcess(); m_hcitoolCon = QString::null; connect(proc, SIGNAL(processExited(Opie::Core::OProcess*) ), - this, SLOT(slotConnectionExited( OProcess*) ) ); + this, SLOT(slotConnectionExited( Opie::Core::OProcess*) ) ); connect(proc, SIGNAL(receivedStdout(Opie::Core::OProcess*, char*, int) ), - this, SLOT(slotConnectionOutput(OProcess*, char*, int) ) ); + this, SLOT(slotConnectionOutput(Opie::Core::OProcess*, char*, int) ) ); *proc << "hcitool"; *proc << "con"; if (!proc->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) { ConnectionState::ValueList list; emit connections( list ); delete proc; } } void Manager::slotConnectionExited( OProcess* proc ) { ConnectionState::ValueList list; list = parseConnections( m_hcitoolCon ); emit connections(list ); delete proc; } void Manager::slotConnectionOutput(OProcess* /*proc*/, char* cha, int len) { QCString str(cha, len ); m_hcitoolCon.append( str ); //delete proc; } ConnectionState::ValueList Manager::parseConnections( const QString& out ) { ConnectionState::ValueList list2; QStringList list = QStringList::split('\n', out ); QStringList::Iterator it; @@ -287,50 +287,50 @@ ConnectionState::ValueList Manager::parseConnections( const QString& out ) { qWarning("2: %s", value[2].latin1() ); qWarning("3: %s", value[3].latin1() ); qWarning("4: %s", value[4].latin1() ); qWarning("5: %s", value[5].latin1() ); qWarning("6: %s", value[6].latin1() ); qWarning("7: %s", value[7].latin1() ); qWarning("8: %s", value[8].latin1() ); ConnectionState con; con.setDirection( value[0] == QString::fromLatin1("<") ? Outgoing : Incoming ); con.setConnectionMode( value[1] ); con.setMac( value[2] ); con.setHandle( value[4].toInt() ); con.setState( value[6].toInt() ); con.setLinkMode( value[8] == QString::fromLatin1("MASTER") ? Master : Client ); list2.append( con ); } return list2; } void Manager::signalStrength( const QString &mac ) { OProcess* sig_proc = new OProcess(); connect(sig_proc, SIGNAL(processExited(Opie::Core::OProcess*) ), - this, SLOT(slotSignalStrengthExited( OProcess*) ) ); + this, SLOT(slotSignalStrengthExited( Opie::Core::OProcess*) ) ); connect(sig_proc, SIGNAL(receivedStdout(Opie::Core::OProcess*, char*, int) ), - this, SLOT(slotSignalStrengthOutput(OProcess*, char*, int) ) ); + this, SLOT(slotSignalStrengthOutput(Opie::Core::OProcess*, char*, int) ) ); *sig_proc << "hcitool"; *sig_proc << "lq"; *sig_proc << mac; sig_proc->setName( mac.latin1() ); if (!sig_proc->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) { emit signalStrength( mac, "-1" ); delete sig_proc; } } void Manager::slotSignalStrengthOutput(OProcess* proc, char* cha, int len) { QCString str(cha, len ); QString temp = QString(str).stripWhiteSpace(); QStringList value = QStringList::split(' ', temp ); emit signalStrength( proc->name(), value[2].latin1() ); } void Manager::slotSignalStrengthExited( OProcess* proc ) { delete proc; } diff --git a/noncore/net/opietooth/lib/startdunconnection.cpp b/noncore/net/opietooth/lib/startdunconnection.cpp index 90ef04a..09b19d2 100644 --- a/noncore/net/opietooth/lib/startdunconnection.cpp +++ b/noncore/net/opietooth/lib/startdunconnection.cpp @@ -1,69 +1,68 @@ #include "startdunconnection.h" using namespace OpieTooth; using namespace Opie::Core; -using namespace Opie::Core; StartDunConnection::StartDunConnection() { m_dunConnect = 0l; setConnectionType(); } StartDunConnection::~StartDunConnection() { delete m_dunConnect; } StartDunConnection::StartDunConnection( QString mac ) { m_dunConnect = 0l; m_mac = mac; setConnectionType(); } void StartDunConnection::setName( QString name ) { m_name = name; } QString StartDunConnection::name() { return m_name; } void StartDunConnection::setConnectionType() { m_connectionType = Pan; } StartConnection::ConnectionType StartDunConnection::type() { return m_connectionType; } void StartDunConnection::start() { m_dunConnect = new OProcess(); *m_dunConnect << "dund" << "--listen" << "--connect" << m_mac; connect( m_dunConnect, SIGNAL( processExited(Opie::Core::OProcess*) ) , - this, SLOT( slotExited(OProcess*) ) ); + this, SLOT( slotExited(Opie::Core::OProcess*) ) ); connect( m_dunConnect, SIGNAL( receivedStdout(Opie::Core::OProcess*,char*,int) ), - this, SLOT( slotStdOut(OProcess*,char*,int) ) ); + this, SLOT( slotStdOut(Opie::Core::OProcess*,char*,int) ) ); if (!m_dunConnect->start( OProcess::NotifyOnExit, OProcess::AllOutput) ) { qWarning( "could not start" ); delete m_dunConnect; } } void StartDunConnection::slotExited( OProcess* proc ) { delete m_dunConnect; } void StartDunConnection::slotStdOut(OProcess* proc, char* chars, int len) {} void StartDunConnection::stop() { if ( m_dunConnect ) { delete m_dunConnect; m_dunConnect = 0l; } } diff --git a/noncore/net/opietooth/lib/startpanconnection.cpp b/noncore/net/opietooth/lib/startpanconnection.cpp index fef35d9..24ac530 100644 --- a/noncore/net/opietooth/lib/startpanconnection.cpp +++ b/noncore/net/opietooth/lib/startpanconnection.cpp @@ -22,63 +22,63 @@ StartPanConnection::StartPanConnection( QString mac ) { } void StartPanConnection::setName( QString name ) { m_name = name; } QString StartPanConnection::name() { return m_name; } void StartPanConnection::setConnectionType() { m_connectionType = Pan; } StartConnection::ConnectionType StartPanConnection::type() { return m_connectionType; } void StartPanConnection::start() { m_panConnect = new OProcess(); qDebug( "IM START " + m_mac ); *m_panConnect << "pand" << "--connect" << m_mac; connect( m_panConnect, SIGNAL( processExited(Opie::Core::OProcess*) ) , - this, SLOT( slotExited(OProcess*) ) ); + this, SLOT( slotExited(Opie::Core::OProcess*) ) ); connect( m_panConnect, SIGNAL( receivedStdout(Opie::Core::OProcess*,char*,int) ), - this, SLOT( slotStdOut(OProcess*,char*,int) ) ); + this, SLOT( slotStdOut(Opie::Core::OProcess*,char*,int) ) ); if (!m_panConnect->start( OProcess::NotifyOnExit, OProcess::AllOutput) ) { qWarning( "could not start" ); delete m_panConnect; } } void StartPanConnection::slotExited( OProcess* proc ) { delete m_panConnect; m_panConnect = 0l; } void StartPanConnection::slotStdOut(OProcess* proc, char* chars, int len) {} void StartPanConnection::stop() { if ( m_panConnect ) { delete m_panConnect; m_panConnect = 0l; } m_panConnect = new OProcess(); qDebug("IM STOP " + m_mac); *m_panConnect << "pand" << "--kill" << m_mac; connect( m_panConnect, SIGNAL( processExited(Opie::Core::OProcess*) ) , - this, SLOT( slotExited(OProcess*) ) ); + this, SLOT( slotExited(Opie::Core::OProcess*) ) ); connect( m_panConnect, SIGNAL( receivedStdout(Opie::Core::OProcess*,char*,int) ), - this, SLOT( slotStdOut(OProcess*,char*,int) ) ); + this, SLOT( slotStdOut(Opie::Core::OProcess*,char*,int) ) ); if (!m_panConnect->start( OProcess::NotifyOnExit, OProcess::AllOutput) ) { qWarning( "could not stop" ); delete m_panConnect; } } diff --git a/noncore/net/opietooth/manager/pppdialog.cpp b/noncore/net/opietooth/manager/pppdialog.cpp index 870e7fd..78c1501 100644 --- a/noncore/net/opietooth/manager/pppdialog.cpp +++ b/noncore/net/opietooth/manager/pppdialog.cpp @@ -1,70 +1,69 @@ #include "pppdialog.h" #include <qpushbutton.h> #include <qmultilineedit.h> #include <qlineedit.h> #include <qlayout.h> #include <qlabel.h> #include <opie2/oprocess.h> using namespace OpieTooth; using namespace Opie::Core; -using namespace Opie::Core; PPPDialog::PPPDialog( QWidget* parent, const char* name, bool modal, WFlags fl, const QString& device ) : QDialog( parent, name, modal, fl ) { if ( !name ) setName( "PPPDialog" ); setCaption( tr( "ppp connection " ) ) ; m_device = device; layout = new QVBoxLayout( this ); QLabel* info = new QLabel( this ); info->setText( tr("Enter an ppp script name:") ); cmdLine = new QLineEdit( this ); outPut = new QMultiLineEdit( this ); QFont outPut_font( outPut->font() ); outPut_font.setPointSize( 8 ); outPut->setFont( outPut_font ); outPut->setWordWrap( QMultiLineEdit::WidgetWidth ); connectButton = new QPushButton( this ); connectButton->setText( tr( "Connect" ) ); layout->addWidget(info); layout->addWidget(cmdLine); layout->addWidget(outPut); layout->addWidget(connectButton); connect( connectButton, SIGNAL( clicked() ), this, SLOT( connectToDevice() ) ); } PPPDialog::~PPPDialog() { } void PPPDialog::connectToDevice() { outPut->clear(); // vom popupmenu beziehen QString connectScript = "/etc/ppp/peers/" + cmdLine->text(); OProcess* pppDial = new OProcess(); *pppDial << "pppd" << m_device << "call" << connectScript; connect( pppDial, SIGNAL(receivedStdout(Opie::Core::OProcess*,char*,int) ), - this, SLOT(fillOutPut(OProcess*,char*,int) ) ); + this, SLOT(fillOutPut(Opie::Core::OProcess*,char*,int) ) ); if (!pppDial->start(OProcess::DontCare, OProcess::AllOutput) ) { qWarning("could not start"); delete pppDial; } } void PPPDialog::fillOutPut( OProcess* pppDial, char* cha, int len ) { QCString str(cha, len ); outPut->insertLine( str ); delete pppDial; } diff --git a/noncore/settings/networksettings/ppp/config.in b/noncore/settings/networksettings/ppp/config.in index 3b8501d..0b71434 100644 --- a/noncore/settings/networksettings/ppp/config.in +++ b/noncore/settings/networksettings/ppp/config.in @@ -1,4 +1,4 @@ config PPP boolean "opie-networksettingsplugin-kppp (PPP module)" default "n" if NETWORKSETUP - depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE && NETWORKSETUP && NETWORKSETUP-CORE && INTERFACES + depends ( LIBQPE || LIBQPE-X11 ) && NETWORKSETUP && NETWORKSETUP-CORE && INTERFACES diff --git a/noncore/settings/networksettings/wlan/config.in b/noncore/settings/networksettings/wlan/config.in index 97fa468..d4661cb 100644 --- a/noncore/settings/networksettings/wlan/config.in +++ b/noncore/settings/networksettings/wlan/config.in @@ -1,6 +1,6 @@ config WLAN boolean "opie-networksettingsplugin-wlan (wireless LAN module)" default "n" if NETWORKSETUP depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2UI && NETWORKSETUP && NETWORKSETUP-CORE && INTERFACES && LIBOPIE2NET #comment "opie-networksettingsplugin-wlan needs libopie2ui, libopie2net and networksetup" - #depends !( LIBOPIE2NET && LIBOPIE && NETWORKSETUP)
\ No newline at end of file + #depends !( LIBOPIE2NET && NETWORKSETUP)
\ No newline at end of file diff --git a/noncore/unsupported/mail2/bend/bend.cpp b/noncore/unsupported/mail2/bend/bend.cpp index ab6eb45..4ded402 100644 --- a/noncore/unsupported/mail2/bend/bend.cpp +++ b/noncore/unsupported/mail2/bend/bend.cpp @@ -1,36 +1,36 @@ #include <qlayout.h> #include <qpixmap.h> #include <qlabel.h> #include <qsound.h> #include <qtimer.h> #include <qdir.h> #include <qpe/qcopenvelope_qws.h> #include <qpe/resource.h> #include <qpe/config.h> -#include <opie/odevice.h> +#include <opie2/odevice.h> #include "imapresponse.h" #include "imaphandler.h" #include "configfile.h" #include "bend.h" using namespace Opie; BenD::BenD(QWidget *parent, const char *name, WFlags fl) : QButton(parent, name, fl) { _config = new Config("mail"); _config->setGroup("Settings"); QVBoxLayout *layout = new QVBoxLayout(this); layout->addItem(new QSpacerItem(0,0)); QLabel *pixmap = new QLabel(this); pixmap->setPixmap(Resource::loadPixmap("mail/mailchecker")); layout->addWidget(pixmap); layout->addItem(new QSpacerItem(0,0)); hide(); diff --git a/noncore/unsupported/mail2/composerbase.cpp b/noncore/unsupported/mail2/composerbase.cpp index 94de15c..cac3f26 100644 --- a/noncore/unsupported/mail2/composerbase.cpp +++ b/noncore/unsupported/mail2/composerbase.cpp @@ -1,34 +1,34 @@ #include <qmultilineedit.h> #include <qpopupmenu.h> #include <qcombobox.h> #include <qlineedit.h> #include <qlayout.h> #include <qaction.h> #include <qlabel.h> #include <qvbox.h> -#include <qpe/qpetoolbar.h> +#include <qtoolbar.h> #include <qmenubar.h> #include <qpe/resource.h> #include "mailstatusbar.h" #include "listviewplus.h" #include "composerbase.h" ComposerBase::ComposerBase(QWidget *parent, const char *name, WFlags fl) : QMainWindow(parent, name, fl) { setCaption(tr("Compose Message")); setToolBarsMovable(false); toolbar = new QToolBar(this); menubar = new QMenuBar( toolbar ); mailmenu = new QPopupMenu( menubar ); menubar->insertItem( tr( "Mail" ), mailmenu ); addToolBar(toolbar); toolbar->setHorizontalStretchable(true); QLabel *spacer = new QLabel(toolbar); spacer->setBackgroundMode(QWidget::PaletteButton); toolbar->setStretchableWidget(spacer); diff --git a/noncore/unsupported/mail2/main.cpp b/noncore/unsupported/mail2/main.cpp index a11b4e2..fce9b0b 100644 --- a/noncore/unsupported/mail2/main.cpp +++ b/noncore/unsupported/mail2/main.cpp @@ -1,9 +1,10 @@ #include <qpe/qpeapplication.h> +using namespace Opie::Core; #include "mainwindow.h" #include <opie/oapplicationfactory.h> OPIE_EXPORT_APP( OApplicationFactory<MainWindow> ) diff --git a/noncore/unsupported/mail2/mainwindowbase.cpp b/noncore/unsupported/mail2/mainwindowbase.cpp index 4e804c2..666cc4a 100644 --- a/noncore/unsupported/mail2/mainwindowbase.cpp +++ b/noncore/unsupported/mail2/mainwindowbase.cpp @@ -1,31 +1,31 @@ #include <qpopupmenu.h> #include <qaction.h> #include <qheader.h> #include <qlabel.h> #include <qvbox.h> -#include <qpe/qpetoolbar.h> +#include <qtoolbar.h> #include <qmenubar.h> #include <qpe/resource.h> #include "mainwindowbase.h" #include "mailstatusbar.h" #include "folderwidget.h" #include "mailtable.h" MainWindowBase::MainWindowBase(QWidget *parent, const char *name, WFlags fl) : QMainWindow(parent, name, fl) { setCaption(tr("E-Mail")); setToolBarsMovable(false); toolbar = new QToolBar(this); menubar = new QMenuBar( toolbar ); mailmenu = new QPopupMenu( menubar ); servermenu = new QPopupMenu( menubar ); menubar->insertItem( tr( "Mail" ), mailmenu ); menubar->insertItem( tr( "Servers" ), servermenu ); addToolBar(toolbar); toolbar->setHorizontalStretchable(true); diff --git a/noncore/unsupported/mail2/viewmailbase.cpp b/noncore/unsupported/mail2/viewmailbase.cpp index f72026f..ff02a7d 100644 --- a/noncore/unsupported/mail2/viewmailbase.cpp +++ b/noncore/unsupported/mail2/viewmailbase.cpp @@ -1,32 +1,32 @@ #include <qtextbrowser.h> #include <qlistview.h> #include <qaction.h> #include <qlabel.h> #include <qvbox.h> #include <qpopupmenu.h> -#include <qpe/qpetoolbar.h> +#include <qtoolbar.h> #include <qmenubar.h> #include <qpe/resource.h> #include "viewmailbase.h" #include "opendiag.h" ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl) : QMainWindow(parent, name, fl) { setCaption(tr("E-Mail by %1")); setToolBarsMovable(false); toolbar = new QToolBar(this); menubar = new QMenuBar( toolbar ); mailmenu = new QPopupMenu( menubar ); menubar->insertItem( tr( "Mail" ), mailmenu ); toolbar->setHorizontalStretchable(true); addToolBar(toolbar); QLabel *spacer = new QLabel(toolbar); spacer->setBackgroundMode(QWidget::PaletteButton); toolbar->setStretchableWidget(spacer); diff --git a/noncore/unsupported/mailit/main.cpp b/noncore/unsupported/mailit/main.cpp index 71f8877..1ccd666 100644 --- a/noncore/unsupported/mailit/main.cpp +++ b/noncore/unsupported/mailit/main.cpp @@ -1,25 +1,26 @@ /********************************************************************** ** Copyright (C) 2001 Trolltech AS. All rights reserved. ** ** This file is part of Qt Palmtop Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #include <qpe/qpeapplication.h> #include "mailitwindow.h" #include <opie/oapplicationfactory.h> +using namespace Opie::Core; OPIE_EXPORT_APP( OApplicationFactory<MailItWindow> )
\ No newline at end of file diff --git a/noncore/unsupported/oipkg/pmipkg.cpp b/noncore/unsupported/oipkg/pmipkg.cpp index cfaadbf..db4db71 100644 --- a/noncore/unsupported/oipkg/pmipkg.cpp +++ b/noncore/unsupported/oipkg/pmipkg.cpp @@ -1,39 +1,39 @@ /*************************************************************************** * * * 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. * * * ***************************************************************************/ // (c) 2002 Patrick S. Vogt <tille@handhelds.org> #include "pmipkg.h" #include "pksettings.h" #include "package.h" #include "packagelistitem.h" -//#include <opie/oprocess.h> +//#include <opie2/oprocess.h> #include <qpe/resource.h> #include <qpe/config.h> #include <qpe/stringutil.h> #include <qpe/qpeapplication.h> #include <qdir.h> #include <qfile.h> #include <qgroupbox.h> #include <qmultilineedit.h> #include <qstring.h> #include <qcheckbox.h> #include <qtextstream.h> #include <qtextview.h> #include <qmessagebox.h> #include <qprogressbar.h> #include <qpushbutton.h> #include <qlayout.h> #include <stdlib.h> #include <unistd.h> #include "mainwindow.h" diff --git a/noncore/unsupported/qpdf/qpdf.cpp b/noncore/unsupported/qpdf/qpdf.cpp index 75e86d0..df9df54 100644 --- a/noncore/unsupported/qpdf/qpdf.cpp +++ b/noncore/unsupported/qpdf/qpdf.cpp @@ -1,47 +1,47 @@ //======================================================================== // // qpdf.cc // // Copyright 2001 Robert Griebl // //======================================================================== #include "aconf.h" #include "GString.h" #include "PDFDoc.h" #include "TextOutputDev.h" #include "QPEOutputDev.h" #include <qpe/qpeapplication.h> #include <qpe/resource.h> #include <qpe/applnk.h> #include <qpe/qcopenvelope_qws.h> #include <qclipboard.h> -#include <qpe/qpetoolbar.h> +#include <qtoolbar.h> #include <qtoolbutton.h> #include <qmenubar.h> #include <qpopupmenu.h> #include <qwidgetstack.h> #include <qtimer.h> #include <qfileinfo.h> #include <qstring.h> #include <qlineedit.h> #include <qspinbox.h> #include <qlayout.h> #include <qdialog.h> #include <qlabel.h> #include <qmessagebox.h> #include "qpdf.h" #ifdef QPDF_QPE_ONLY #include <qpe/fileselector.h> #else #include <opie/ofileselector.h> #endif int main ( int argc, char **argv ) |