summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console
authorzecke <zecke>2002-10-15 10:55:58 (UTC)
committer zecke <zecke>2002-10-15 10:55:58 (UTC)
commitf2e9de1c8b6d3b2b2e82dec23ebf502c5805f575 (patch) (side-by-side diff)
tree108efdb1a75a78dd212a69ccad718c2e65ece0bf /noncore/apps/opie-console
parentdaae7a75b0e9ccbf1ea4c699c631ad77825e6301 (diff)
downloadopie-f2e9de1c8b6d3b2b2e82dec23ebf502c5805f575.zip
opie-f2e9de1c8b6d3b2b2e82dec23ebf502c5805f575.tar.gz
opie-f2e9de1c8b6d3b2b2e82dec23ebf502c5805f575.tar.bz2
Remove debugging output
Fix possible crashes in io_bt and io_irda
Diffstat (limited to 'noncore/apps/opie-console') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/MyPty.cpp6
-rw-r--r--noncore/apps/opie-console/configdialog.cpp1
-rw-r--r--noncore/apps/opie-console/emulation_handler.cpp6
-rw-r--r--noncore/apps/opie-console/filereceive.cpp2
-rw-r--r--noncore/apps/opie-console/filetransfer.cpp6
-rw-r--r--noncore/apps/opie-console/io_bt.cpp1
-rw-r--r--noncore/apps/opie-console/io_irda.cpp2
-rw-r--r--noncore/apps/opie-console/io_serial.cpp8
-rw-r--r--noncore/apps/opie-console/iolayerbase.cpp3
-rw-r--r--noncore/apps/opie-console/mainwindow.cpp5
-rw-r--r--noncore/apps/opie-console/metafactory.cpp1
-rw-r--r--noncore/apps/opie-console/procctl.cpp1
-rw-r--r--noncore/apps/opie-console/profile.cpp2
-rw-r--r--noncore/apps/opie-console/profileconfig.cpp1
-rw-r--r--noncore/apps/opie-console/profileeditordialog.cpp7
-rw-r--r--noncore/apps/opie-console/profilemanager.cpp4
-rw-r--r--noncore/apps/opie-console/session.cpp1
-rw-r--r--noncore/apps/opie-console/tabwidget.cpp1
18 files changed, 3 insertions, 55 deletions
diff --git a/noncore/apps/opie-console/MyPty.cpp b/noncore/apps/opie-console/MyPty.cpp
index ae01392..b6ae1d9 100644
--- a/noncore/apps/opie-console/MyPty.cpp
+++ b/noncore/apps/opie-console/MyPty.cpp
@@ -114,7 +114,6 @@ void MyPty::donePty()
::close(m_fd);
if (m_cpid) {
- qWarning("killing!!!");
kill(m_cpid, SIGHUP);
//waitpid(m_cpid, &status, 0);
delete m_sn_e;
@@ -134,7 +133,6 @@ const char* MyPty::deviceName()
void MyPty::error()
{
- qWarning("error");
// This is code from the Qt DumbTerminal example
donePty();
}
@@ -268,7 +266,6 @@ void MyPty::reload( const Profile& ) {
/*! sends len bytes through the line */
void MyPty::send(const QByteArray& ar)
{
- qWarning("sending!");
#ifdef VERBOSE_DEBUG
// verbose debug
printf("sending bytes:\n");
@@ -283,15 +280,12 @@ void MyPty::send(const QByteArray& ar)
/*! indicates that a block of data is received */
void MyPty::readPty()
{
- qWarning("read");
QByteArray buf(4096);
int len = ::read( m_fd, buf.data(), 4096 );
if (len == -1 || len == 0) {
- qWarning("donePty!!! now!");
donePty();
- qWarning("return %s", sender()->className() );
delete sender();
return;
}
diff --git a/noncore/apps/opie-console/configdialog.cpp b/noncore/apps/opie-console/configdialog.cpp
index 8745305..0bc6588 100644
--- a/noncore/apps/opie-console/configdialog.cpp
+++ b/noncore/apps/opie-console/configdialog.cpp
@@ -92,7 +92,6 @@ void ConfigDialog::slotEdit() {
void ConfigDialog::slotAdd() {
- qWarning("slotAdd");
ProfileEditorDialog dlg(m_fact);
dlg.setCaption("New Connection");
diff --git a/noncore/apps/opie-console/emulation_handler.cpp b/noncore/apps/opie-console/emulation_handler.cpp
index 836a05b..b2cd348 100644
--- a/noncore/apps/opie-console/emulation_handler.cpp
+++ b/noncore/apps/opie-console/emulation_handler.cpp
@@ -37,11 +37,9 @@ void EmulationHandler::load( const Profile& prof) {
m_teWid->setBackgroundColor(backColor(num) );
}
void EmulationHandler::recv( const QByteArray& ar) {
- qWarning("received in EmulationHandler!");
m_teEmu->onRcvBlock(ar.data(), ar.count() );
}
void EmulationHandler::recvEmulation(const char* src, int len ) {
- qWarning("received from te ");
QByteArray ar(len);
memcpy(ar.data(), src, sizeof(char) * len );
@@ -99,12 +97,10 @@ QColor EmulationHandler::foreColor(int col) {
switch( col ) {
default:
case Profile::White:
- qWarning("Foreground black");
/* color is black */
co = Qt::white;
break;
case Profile::Black:
- qWarning("Foreground white");
co = Qt::black;
break;
case Profile::Green:
@@ -126,12 +122,10 @@ QColor EmulationHandler::backColor(int col ) {
switch( col ) {
default:
case Profile::White:
- qWarning("Background white");
/* color is white */
co = Qt::black;
break;
case Profile::Black:
- qWarning("Background black");
co = Qt::white;
break;
case Profile::Green:
diff --git a/noncore/apps/opie-console/filereceive.cpp b/noncore/apps/opie-console/filereceive.cpp
index 26b3dec..e517862 100644
--- a/noncore/apps/opie-console/filereceive.cpp
+++ b/noncore/apps/opie-console/filereceive.cpp
@@ -135,13 +135,11 @@ void FileReceive::setupChild() {
void FileReceive::slotRead() {
QByteArray ar(4096);
int len = read(m_comm[0], ar.data(), 4096 );
- qWarning("slot read %d", len);
for (int i = 0; i < len; i++ ) {
// printf("%c", ar[i] );
}
ar.resize( len );
QString str( ar );
- qWarning(str.simplifyWhiteSpace() );
}
void FileReceive::slotExec() {
char buf[2];
diff --git a/noncore/apps/opie-console/filetransfer.cpp b/noncore/apps/opie-console/filetransfer.cpp
index 8ca0df2..b81c2a2 100644
--- a/noncore/apps/opie-console/filetransfer.cpp
+++ b/noncore/apps/opie-console/filetransfer.cpp
@@ -53,7 +53,6 @@ void FileTransfer::sendFile( const QString& file ) {
break;
case 0:{
setupChild();
- qWarning("output:"+file );
/* exec */
char* verbose = "-vv";
char* binray = "-b";
@@ -166,19 +165,16 @@ void FileTransfer::setupChild() {
void FileTransfer::slotRead() {
QByteArray ar(4096);
int len = read(m_comm[0], ar.data(), 4096 );
- qWarning("slot read %d", len);
for (int i = 0; i < len; i++ ) {
// printf("%c", ar[i] );
}
ar.resize( len );
QString str( ar );
- qWarning(str.simplifyWhiteSpace() );
QStringList lis = QStringList::split(' ', str );
/*
* Transfer finished.. either complete or incomplete
*/
if ( lis[0].simplifyWhiteSpace() == "Transfer" ) {
- qWarning("sent!!!!");
return;
}
/*
@@ -214,7 +210,6 @@ void FileTransfer::slotProgress( const QStringList& list ) {
return;
}
- qWarning("%s, %d, %d", progi.join("/").latin1(), sent, total );
double pro = (double)sent/total;
int prog = pro * 100;
@@ -240,7 +235,6 @@ void FileTransfer::cancel() {
}
void FileTransfer::slotExec() {
- qWarning("exited!");
char buf[2];
::read(m_term[0], buf, 1 );
delete m_proc;
diff --git a/noncore/apps/opie-console/io_bt.cpp b/noncore/apps/opie-console/io_bt.cpp
index 8bff4df..0831faf 100644
--- a/noncore/apps/opie-console/io_bt.cpp
+++ b/noncore/apps/opie-console/io_bt.cpp
@@ -36,6 +36,7 @@ bool IOBt::open() {
} else {
qWarning("could not attach to device");
delete m_attach;
+ m_attach = 0;
}
}
diff --git a/noncore/apps/opie-console/io_irda.cpp b/noncore/apps/opie-console/io_irda.cpp
index 8e31e82..56a373c 100644
--- a/noncore/apps/opie-console/io_irda.cpp
+++ b/noncore/apps/opie-console/io_irda.cpp
@@ -32,8 +32,10 @@ bool IOIrda::open() {
if ( m_attach->start() ) {
IOSerial::open();
} else {
+ // emit error!!!
qWarning("could not attach to device");
delete m_attach;
+ m_attach = 0l;
}
}
diff --git a/noncore/apps/opie-console/io_serial.cpp b/noncore/apps/opie-console/io_serial.cpp
index 03f1b1a..a4a6f0b 100644
--- a/noncore/apps/opie-console/io_serial.cpp
+++ b/noncore/apps/opie-console/io_serial.cpp
@@ -27,7 +27,6 @@ void IOSerial::send(const QByteArray &data) {
}
void IOSerial::close() {
- qWarning("closing!");
if (m_fd) {
delete m_read;
delete m_error;
@@ -39,13 +38,10 @@ void IOSerial::close() {
}
bool IOSerial::open() {
- qWarning("open");
if (!m_fd) {
- qWarning("going to open %s", m_device.latin1());
struct termios tty;
m_fd = ::open(m_device, O_RDWR | O_NOCTTY | O_NONBLOCK);
if (m_fd < 0) {
- qWarning(" fd < 0 ");
emit error(CouldNotOpen, strerror(errno));
return FALSE;
}
@@ -54,7 +50,6 @@ bool IOSerial::open() {
/* Baud rate */
int speed = baud(m_baud);
if (speed == -1) {
- qWarning("speed -1");
emit error(Refuse, tr("Invalid baud rate"));
}
cfsetospeed(&tty, speed);
@@ -118,7 +113,6 @@ bool IOSerial::open() {
connect(m_error, SIGNAL(activated(int)), this, SLOT(errorOccured()));
return TRUE;
} else {
- qWarning(" already opened");
emit error(Refuse, tr("Device is already connected"));
m_fd = 0;
return FALSE;
@@ -127,8 +121,6 @@ bool IOSerial::open() {
void IOSerial::reload(const Profile &config) {
m_device = config.readEntry("Device", SERIAL_DEFAULT_DEVICE);
- qWarning( "Dev" +m_device );
- qWarning( "Conf:" +config.readEntry("Device") );
m_baud = config.readNumEntry("Speed", SERIAL_DEFAULT_BAUD);
m_parity = config.readNumEntry("Parity", SERIAL_DEFAULT_PARITY);
m_dbits = config.readNumEntry("DataBits", SERIAL_DEFAULT_DBITS);
diff --git a/noncore/apps/opie-console/iolayerbase.cpp b/noncore/apps/opie-console/iolayerbase.cpp
index 49ed284..b0df02d 100644
--- a/noncore/apps/opie-console/iolayerbase.cpp
+++ b/noncore/apps/opie-console/iolayerbase.cpp
@@ -129,13 +129,10 @@ void IOLayerBase::setSpeed( Speed sp ) {
}
IOLayerBase::Flow IOLayerBase::flow()const {
if (m_flowHw->isChecked() ) {
- qWarning("Hardware flow");
return Hardware;
}else if( m_flowSw->isChecked() ) {
- qWarning("Software");
return Software;
} else {
- qWarning("None");
return None;
}
}
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp
index b770551..94c99bc 100644
--- a/noncore/apps/opie-console/mainwindow.cpp
+++ b/noncore/apps/opie-console/mainwindow.cpp
@@ -263,7 +263,6 @@ QList<Session> MainWindow::sessions() {
}
void MainWindow::slotNew() {
- qWarning("New Connection");
ProfileEditorDialog dlg(factory() );
dlg.showMaximized();
int ret = dlg.exec();
@@ -339,14 +338,12 @@ void MainWindow::slotTerminate() {
}
void MainWindow::slotConfigure() {
- qWarning("configure");
ConfigDialog conf( manager()->all(), factory() );
conf.showMaximized();
int ret = conf.exec();
if ( QDialog::Accepted == ret ) {
- qWarning("conf %d", conf.list().count() );
manager()->setProfiles( conf.list() );
manager()->save();
populateProfiles();
@@ -360,7 +357,6 @@ void MainWindow::slotConfigure() {
* and set the currentSession()
*/
void MainWindow::slotClose() {
- qWarning("close");
if (!currentSession() )
return;
@@ -438,7 +434,6 @@ void MainWindow::slotOpenKeb(bool state) {
}
void MainWindow::slotSessionChanged( Session* ses ) {
if ( ses ) {
- qWarning("changing %s", ses->name().latin1() );
m_curSession = ses;
if ( m_curSession->isConnected() ) {
diff --git a/noncore/apps/opie-console/metafactory.cpp b/noncore/apps/opie-console/metafactory.cpp
index 09ba586..04a5dfa 100644
--- a/noncore/apps/opie-console/metafactory.cpp
+++ b/noncore/apps/opie-console/metafactory.cpp
@@ -120,7 +120,6 @@ ProfileDialogWidget *MetaFactory::newTerminalPlugin( const QString& str, QWidget
if (str.isEmpty() )
return 0l;
ProfileDialogWidget* wid = 0l;
- qWarning("new terminalPlugin %s %l", str.latin1(), parent );
QMap<QString, configWidget>::Iterator it;
it = m_termFact.find( str );
diff --git a/noncore/apps/opie-console/procctl.cpp b/noncore/apps/opie-console/procctl.cpp
index d1cfaf6..ff6bea8 100644
--- a/noncore/apps/opie-console/procctl.cpp
+++ b/noncore/apps/opie-console/procctl.cpp
@@ -71,7 +71,6 @@ int ProcCtl::status(pid_t pid )const{
return -1;
}
void ProcCtl::signal_handler(int) {
- qWarning("signal handler in ProcCtl");
int status;
signal( SIGCHLD, signal_handler );
pid_t pi = waitpid( -1, &status, WNOHANG );
diff --git a/noncore/apps/opie-console/profile.cpp b/noncore/apps/opie-console/profile.cpp
index ffd672e..1a94619 100644
--- a/noncore/apps/opie-console/profile.cpp
+++ b/noncore/apps/opie-console/profile.cpp
@@ -78,11 +78,9 @@ void Profile::clearConf() {
m_conf.clear();
}
void Profile::writeEntry( const QString& key, const QString& value ) {
- qWarning("key %s value %s", key.latin1(), value.latin1() );
m_conf.replace( key, value );
}
void Profile::writeEntry( const QString& key, int num ) {
- qWarning("num");
writeEntry( key, QString::number( num ) );
}
void Profile::writeEntry( const QString& key, bool b ) {
diff --git a/noncore/apps/opie-console/profileconfig.cpp b/noncore/apps/opie-console/profileconfig.cpp
index 732fae7..bd089c8 100644
--- a/noncore/apps/opie-console/profileconfig.cpp
+++ b/noncore/apps/opie-console/profileconfig.cpp
@@ -12,7 +12,6 @@ QStringList ProfileConfig::groups()const {
QStringList list;
QMap<QString, ConfigGroup>::ConstIterator it;
it= Config::groups.begin();
- qWarning("config %d", Config::groups.count() );
for (; it != Config::groups.end(); ++it )
list << it.key();
diff --git a/noncore/apps/opie-console/profileeditordialog.cpp b/noncore/apps/opie-console/profileeditordialog.cpp
index 094c871..b709cf3 100644
--- a/noncore/apps/opie-console/profileeditordialog.cpp
+++ b/noncore/apps/opie-console/profileeditordialog.cpp
@@ -115,10 +115,6 @@ void ProfileEditorDialog::initUI()
setCurrent( m_fact->external(m_prof.ioLayerName() ), m_conCmb );
setCurrent( m_fact->external(m_prof.terminalName() ), m_termCmb );
- qWarning("Layer: %s %s", m_prof.ioLayerName().data(),
- m_fact->external(m_prof.ioLayerName() ).latin1() );
- qWarning("Term: %s %s", m_prof.terminalName().data(),
- m_fact->external(m_prof.terminalName() ).latin1() );
// signal and slots
connect(m_conCmb, SIGNAL(activated(const QString& ) ),
@@ -147,8 +143,6 @@ void ProfileEditorDialog::accept()
m_prof.setName(profName());
m_prof.setIOLayer( m_fact->internal(m_conCmb ->currentText() ) );
m_prof.setTerminalName( m_fact->internal(m_termCmb->currentText() ) );
- qWarning("Term %s %s", m_fact->internal(m_termCmb->currentText() ).data(),
- m_termCmb->currentText().latin1() );
if (m_con )
m_con->save( m_prof );
@@ -190,7 +184,6 @@ void ProfileEditorDialog::slotConActivated( const QString& str ) {
void ProfileEditorDialog::slotTermActivated( const QString& str ) {
delete m_term;
m_term = m_fact->newTerminalPlugin( str, m_tabTerm );
- qWarning("past");
if (m_term) {
m_term->load(m_prof );
diff --git a/noncore/apps/opie-console/profilemanager.cpp b/noncore/apps/opie-console/profilemanager.cpp
index 95a46f9..e5aedb6 100644
--- a/noncore/apps/opie-console/profilemanager.cpp
+++ b/noncore/apps/opie-console/profilemanager.cpp
@@ -24,7 +24,6 @@ ProfileManager::~ProfileManager() {
}
void ProfileManager::load() {
m_list.clear();
- qWarning("load");
ProfileConfig conf("opie-console-profiles");
QStringList groups = conf.groups();
QStringList::Iterator it;
@@ -33,13 +32,11 @@ void ProfileManager::load() {
* for each profile
*/
for ( it = groups.begin(); it != groups.end(); ++it ) {
- qWarning("group " + (*it) );
conf.setGroup( (*it) );
Profile prof;
prof.setName( conf.readEntry("name") );
prof.setIOLayer( conf.readEntry("iolayer").utf8() );
prof.setTerminalName( conf.readEntry("term").utf8() );
- qWarning(" %s %s", conf.readEntry("iolayer").latin1(), prof.ioLayerName().data() );
prof.setBackground( conf.readNumEntry("back") );
prof.setForeground( conf.readNumEntry("fore") );
prof.setTerminal( conf.readNumEntry("terminal") );
@@ -121,7 +118,6 @@ void ProfileManager::save( ) {
conf.writeEntry( "name", (*it2).name() );
QString str = QString::fromUtf8( (*it2).ioLayerName() );
- qWarning("IOLayerName " + str );
conf.writeEntry( "iolayer", str );
conf.writeEntry( "term", QString::fromUtf8( (*it2).terminalName() ) );
diff --git a/noncore/apps/opie-console/session.cpp b/noncore/apps/opie-console/session.cpp
index d0ace6c..e53dbc4 100644
--- a/noncore/apps/opie-console/session.cpp
+++ b/noncore/apps/opie-console/session.cpp
@@ -47,7 +47,6 @@ void Session::connect() {
m_connected = true;
- qWarning("connection in session");
QObject::connect(m_layer, SIGNAL(received(const QByteArray&) ),
m_emu, SLOT(recv(const QByteArray&) ) );
QObject::connect(m_emu, SIGNAL(send(const QByteArray&) ),
diff --git a/noncore/apps/opie-console/tabwidget.cpp b/noncore/apps/opie-console/tabwidget.cpp
index 466b536..8a691f9 100644
--- a/noncore/apps/opie-console/tabwidget.cpp
+++ b/noncore/apps/opie-console/tabwidget.cpp
@@ -12,7 +12,6 @@ TabWidget::~TabWidget() {
void TabWidget::add( Session* ses ) {
if ( !ses->widgetStack() ) return;
- qWarning("going to add it");
//reparent( ses->widgetStack(), QPoint() );
addTab( ses->widgetStack(), "console/konsole", ses->name() );
//addTab( ses->widgetStack(), ses->name() );