From 16cf79e90b5217f8d4bfce2a0fa817ae4b73db36 Mon Sep 17 00:00:00 2001 From: mickeyl Date: Sun, 04 Apr 2004 13:54:40 +0000 Subject: convert to Opie Debugging Framework --- (limited to 'noncore/net') diff --git a/noncore/net/mail/accountitem.cpp b/noncore/net/mail/accountitem.cpp index 54d2da2..ae28313 100644 --- a/noncore/net/mail/accountitem.cpp +++ b/noncore/net/mail/accountitem.cpp @@ -78,7 +78,7 @@ void POP3viewItem::refresh() RECBODYP POP3viewItem::fetchBody( const RecMailP &mail ) { - qDebug( "POP3 fetchBody" ); + odebug << "POP3 fetchBody" << oendl; return wrapper->fetchBody( mail ); } @@ -269,7 +269,7 @@ void NNTPviewItem::refresh() RECBODYP NNTPviewItem::fetchBody( const RecMailP &mail ) { - qDebug( "NNTP fetchBody" ); + odebug << "NNTP fetchBody" << oendl; return wrapper->fetchBody( mail ); } @@ -460,7 +460,7 @@ void IMAPviewItem::refreshFolders(bool force) { item = new IMAPfolderItem( (*it), this , item ); folders->remove(it); - qDebug("inbox found"); + odebug << "inbox found" << oendl; break; } } @@ -533,7 +533,7 @@ void IMAPviewItem::createNewFolder() void IMAPviewItem::contextMenuSelected(int id) { - qDebug("Id selected: %i",id); + odebug << "Id selected: " << id << "" << oendl; switch (id) { case 0: @@ -671,7 +671,7 @@ void IMAPfolderItem::deleteFolder() QObject::tr("
Realy delete folder
%1
and all if it content?
",contextName).arg(folder->getDisplayName()), QObject::tr("Yes",contextName), QObject::tr("No",contextName),QString::null,1,1); - qDebug("Auswahl: %i",yesno); + odebug << "Auswahl: " << yesno << "" << oendl; if (yesno == 0) { if (imap->getWrapper()->deleteMbox(folder)) @@ -698,7 +698,7 @@ void IMAPfolderItem::downloadMails() void IMAPfolderItem::contextMenuSelected(int id) { - qDebug("Selected id: %i",id); + odebug << "Selected id: " << id << "" << oendl; AccountView * view = (AccountView*)listView(); switch(id) { @@ -802,7 +802,7 @@ void MHviewItem::refresh(bool force) RECBODYP MHviewItem::fetchBody( const RecMailP &mail ) { - qDebug( "MH fetchBody" ); + odebug << "MH fetchBody" << oendl; return wrapper->fetchBody( mail ); } @@ -932,7 +932,7 @@ void MHfolderItem::deleteFolder() QObject::tr("
Realy delete folder
%1
and all if it content?
",contextName).arg(folder->getDisplayName()), QObject::tr("Yes",contextName), QObject::tr("No",contextName),QString::null,1,1); - qDebug("Auswahl: %i",yesno); + odebug << "Auswahl: " << yesno << "" << oendl; if (yesno == 0) { if (mbox->getWrapper()->deleteMbox(folder)) @@ -1074,7 +1074,7 @@ void AccountViewItem::deleteAllMail(AbstractMail*wrapper,const FolderP&folder) arg(fname), QObject::tr("Yes",contextName), QObject::tr("No",contextName),QString::null,1,1); - qDebug("Auswahl: %i",yesno); + odebug << "Auswahl: " << yesno << "" << oendl; if (yesno == 0) { if (wrapper->deleteAllMail(folder)) diff --git a/noncore/net/mail/accountview.cpp b/noncore/net/mail/accountview.cpp index f0a163e..0052061 100644 --- a/noncore/net/mail/accountview.cpp +++ b/noncore/net/mail/accountview.cpp @@ -66,20 +66,20 @@ void AccountView::populate( QList list ) if ( it->getType() == MAILLIB::A_IMAP ) { IMAPaccount *imap = static_cast(it); - qDebug( "added IMAP " + imap->getAccountName() ); + odebug << "added IMAP " + imap->getAccountName() << oendl; imapAccounts.append(new IMAPviewItem( imap, this )); } else if ( it->getType() == MAILLIB::A_POP3 ) { POP3account *pop3 = static_cast(it); - qDebug( "added POP3 " + pop3->getAccountName() ); + odebug << "added POP3 " + pop3->getAccountName() << oendl; /* must not be hold 'cause it isn't required */ (void) new POP3viewItem( pop3, this ); } else if ( it->getType() == MAILLIB::A_NNTP ) { NNTPaccount *nntp = static_cast(it); - qDebug( "added NNTP " + nntp->getAccountName() ); + odebug << "added NNTP " + nntp->getAccountName() << oendl; /* must not be hold 'cause it isn't required */ (void) new NNTPviewItem( nntp, this ); } @@ -89,7 +89,7 @@ void AccountView::populate( QList list ) void AccountView::refresh(QListViewItem *item) { - qDebug("AccountView refresh..."); + odebug << "AccountView refresh..." << oendl; if ( item ) { m_currentItem = item; @@ -162,8 +162,8 @@ void AccountView::downloadMails(const FolderP&fromFolder,AbstractMail*fromWrappe tr("
Error while creating
new folder - breaking.
")); return; } - qDebug("Targetfolder: %s",targetFolder.latin1()); - qDebug("Fromfolder: %s",fromFolder->getName().latin1()); + odebug << "Targetfolder: " << targetFolder.latin1() << "" << oendl; + odebug << "Fromfolder: " << fromFolder->getName().latin1() << "" << oendl; fromWrapper->mvcpAllMails(fromFolder,targetFolder,targetMail,sels.moveMails()); refreshCurrent(); } diff --git a/noncore/net/mail/composemail.cpp b/noncore/net/mail/composemail.cpp index 988a1d9..fa703c4 100644 --- a/noncore/net/mail/composemail.cpp +++ b/noncore/net/mail/composemail.cpp @@ -183,7 +183,7 @@ void ComposeMail::removeAttachment() void ComposeMail::accept() { if ( checkBoxLater->isChecked() ) { - qDebug( "Send later" ); + odebug << "Send later" << oendl; } #if 0 @@ -256,7 +256,7 @@ void ComposeMail::reject() txt.append( "\n--\n" ); txt.append( sigMultiLine->text() ); } - qDebug(txt); + odebug << txt << oendl; mail->setMessage( txt ); /* only use the default drafts folder name! */ @@ -292,7 +292,7 @@ AttachViewItem::AttachViewItem( QListView *parent, Attachment *att ) : QListViewItem( parent ) { attachment = att; - qDebug( att->getMimeType() ); + odebug << att->getMimeType() << oendl; setPixmap( 0, attachment->getDocLnk().pixmap().isNull() ? Resource::loadPixmap( "UnknownDocument-14" ) : attachment->getDocLnk().pixmap() ); diff --git a/noncore/net/mail/editaccounts.cpp b/noncore/net/mail/editaccounts.cpp index 5c4bdf7..de064ca 100644 --- a/noncore/net/mail/editaccounts.cpp +++ b/noncore/net/mail/editaccounts.cpp @@ -40,7 +40,7 @@ AccountListItem::AccountListItem( QListView *parent, Account *a) EditAccounts::EditAccounts( Settings *s, QWidget *parent, const char *name, bool modal, WFlags flags ) : EditAccountsUI( parent, name, modal, flags ) { - qDebug( "New Account Configuration Widget" ); + odebug << "New Account Configuration Widget" << oendl; settings = s; mailList->addColumn( tr( "Account" ) ); @@ -80,7 +80,7 @@ void EditAccounts::slotFillLists() void EditAccounts::slotNewMail() { - qDebug( "New Mail Account" ); + odebug << "New Mail Account" << oendl; QString *selection = new QString(); SelectMailType selType( selection, this, 0, true ); selType.show(); @@ -94,7 +94,7 @@ void EditAccounts::slotNewAccount( const QString &type ) { if ( type.compare( "IMAP" ) == 0 ) { - qDebug( "-> config IMAP" ); + odebug << "-> config IMAP" << oendl; IMAPaccount *account = new IMAPaccount(); IMAPconfig imap( account, this, 0, true ); if ( QDialog::Accepted == QPEApplication::execDialog( &imap ) ) @@ -110,7 +110,7 @@ void EditAccounts::slotNewAccount( const QString &type ) } else if ( type.compare( "POP3" ) == 0 ) { - qDebug( "-> config POP3" ); + odebug << "-> config POP3" << oendl; POP3account *account = new POP3account(); POP3config pop3( account, this, 0, true, WStyle_ContextHelp ); if ( QDialog::Accepted == QPEApplication::execDialog( &pop3 ) ) @@ -126,7 +126,7 @@ void EditAccounts::slotNewAccount( const QString &type ) } else if ( type.compare( "SMTP" ) == 0 ) { - qDebug( "-> config SMTP" ); + odebug << "-> config SMTP" << oendl; SMTPaccount *account = new SMTPaccount(); SMTPconfig smtp( account, this, 0, true, WStyle_ContextHelp ); if ( QDialog::Accepted == QPEApplication::execDialog( &smtp ) ) @@ -143,7 +143,7 @@ void EditAccounts::slotNewAccount( const QString &type ) } else if ( type.compare( "NNTP" ) == 0 ) { - qDebug( "-> config NNTP" ); + odebug << "-> config NNTP" << oendl; NNTPaccount *account = new NNTPaccount(); NNTPconfig nntp( account, this, 0, true, WStyle_ContextHelp ); if ( QDialog::Accepted == QPEApplication::execDialog( &nntp ) ) @@ -212,7 +212,7 @@ void EditAccounts::slotDeleteAccount( Account *account ) void EditAccounts::slotEditMail() { - qDebug( "Edit Mail Account" ); + odebug << "Edit Mail Account" << oendl; if ( !mailList->currentItem() ) { QMessageBox::information( this, tr( "Error" ), @@ -241,13 +241,13 @@ void EditAccounts::slotDeleteMail() void EditAccounts::slotNewNews() { - qDebug( "New News Account" ); + odebug << "New News Account" << oendl; slotNewAccount( "NNTP" ); } void EditAccounts::slotEditNews() { - qDebug( "Edit News Account" ); + odebug << "Edit News Account" << oendl; if ( !newsList->currentItem() ) { QMessageBox::information( this, tr( "Error" ), @@ -262,7 +262,7 @@ void EditAccounts::slotEditNews() void EditAccounts::slotDeleteNews() { - qDebug( "Delete News Account" ); + odebug << "Delete News Account" << oendl; if ( !newsList->currentItem() ) { QMessageBox::information( this, tr( "Error" ), @@ -578,7 +578,7 @@ void NNTPconfig::save() for ( ; list_it.current(); ++list_it ) { if ( ( (QCheckListItem*)list_it.current() )->isOn() ) { - qDebug(list_it.current()->text(0) ); + odebug << list_it.current()->text(0) << oendl; groupList.append( list_it.current()->text(0) ); } diff --git a/noncore/net/mail/libmailwrapper/abstractmail.cpp b/noncore/net/mail/libmailwrapper/abstractmail.cpp index 6bebb7b..1a26351 100644 --- a/noncore/net/mail/libmailwrapper/abstractmail.cpp +++ b/noncore/net/mail/libmailwrapper/abstractmail.cpp @@ -52,7 +52,7 @@ AbstractMail* AbstractMail::getWrapper(Account*a) encodedString* AbstractMail::decode_String(const encodedString*text,const QString&enc) { - qDebug("Decode string start"); + odebug << "Decode string start" << oendl; char*result_text; size_t index = 0; /* reset for recursive use! */ @@ -76,7 +76,7 @@ encodedString* AbstractMail::decode_String(const encodedString*text,const QStrin if (err == MAILIMF_NO_ERROR) { result->setContent(result_text,target_length); } - qDebug("Decode string finished"); + odebug << "Decode string finished" << oendl; return result; } @@ -91,10 +91,10 @@ QString AbstractMail::convert_String(const char*text) /* due a bug in libetpan it isn't usable this moment */ /* int err = mailmime_encoded_phrase_parse("iso-8859-1", text, strlen(text),&index, "iso-8859-1",&res);*/ - //qDebug("Input: %s",text); + //odebug << "Input: " << text << "" << oendl; if (err == MAILIMF_NO_ERROR && res && strlen(res)) { // result = QString(res); -// qDebug("Res: %s, length: %i",res,strlen(res)); +// odebug << "Res: " << res << ", length: " << strlen(res) << "" << oendl; } if (res) free(res); return result; diff --git a/noncore/net/mail/libmailwrapper/generatemail.cpp b/noncore/net/mail/libmailwrapper/generatemail.cpp index cb58d82..36ec232 100644 --- a/noncore/net/mail/libmailwrapper/generatemail.cpp +++ b/noncore/net/mail/libmailwrapper/generatemail.cpp @@ -97,7 +97,7 @@ mailimf_address_list *Generatemail::parseAddresses(const QString&addr ) { s = addr.mid(startpos,i-startpos); if (!s.isEmpty()) { list.append(s); - qDebug("Appended %s",s.latin1()); + odebug << "Appended " << s.latin1() << "" << oendl; } // !!!! this is a MUST BE! startpos = ++i; @@ -110,16 +110,16 @@ mailimf_address_list *Generatemail::parseAddresses(const QString&addr ) { s = addr.mid(startpos,i-startpos); if (!s.isEmpty()) { list.append(s); - qDebug("Appended %s",s.latin1()); + odebug << "Appended " << s.latin1() << "" << oendl; } QStringList::Iterator it; for ( it = list.begin(); it != list.end(); it++ ) { int err = mailimf_address_list_add_parse( addresses, (char*)(*it).latin1() ); if ( err != MAILIMF_NO_ERROR ) { - qDebug( "Error parsing" ); - qDebug( *it ); + odebug << "Error parsing" << oendl; + odebug << *it << oendl; } else { - qDebug( "Parse success! %s",(*it).latin1()); + odebug << "Parse success! " << (*it).latin1() << "" << oendl; } } return addresses; @@ -175,7 +175,7 @@ mailmime *Generatemail::buildFilePart(const QString&filename,const QString&mimet err = mailmime_set_body_text(filePart,strdup(TextContent.data()),TextContent.length()); } if (err != MAILIMF_NO_ERROR) { - qDebug("Error setting body with file %s",file); + odebug << "Error setting body with file " << file << "" << oendl; mailmime_free( filePart ); filePart = 0; } @@ -206,23 +206,23 @@ mailmime *Generatemail::buildFilePart(const QString&filename,const QString&mimet void Generatemail::addFileParts( mailmime *message,const QList&files ) { const Attachment *it; unsigned int count = files.count(); - qDebug("List contains %i values",count); + odebug << "List contains " << count << " values" << oendl; for ( unsigned int i = 0; i < count; ++i ) { - qDebug( "Adding file" ); + odebug << "Adding file" << oendl; mailmime *filePart; int err; it = ((QList)files).at(i); filePart = buildFilePart( it->getFileName(), it->getMimeType(),"" ); if ( filePart == NULL ) { - qDebug( "addFileParts: error adding file:" ); - qDebug( it->getFileName() ); + odebug << "addFileParts: error adding file:" << oendl; + odebug << it->getFileName() << oendl; continue; } err = mailmime_smart_add_part( message, filePart ); if ( err != MAILIMF_NO_ERROR ) { mailmime_free( filePart ); - qDebug("error smart add"); + odebug << "error smart add" << oendl; } } } @@ -270,7 +270,7 @@ err_free_content: err_free_param: mailmime_parameter_free( param ); err_free: - qDebug( "buildTxtPart - error" ); + odebug << "buildTxtPart - error" << oendl; return NULL; // Error :( } @@ -345,7 +345,7 @@ mailimf_fields *Generatemail::createImfFields(const Opie::Core::OSmartPointerrecList,unsigned int current_rec,int current_count) { if (current_rec >= 10) { - qDebug("too deep recursion!"); + odebug << "too deep recursion!" << oendl; } if (!message || !mime) { return; @@ -272,7 +272,7 @@ QString Genericwrapper::parseAddressList( mailimf_address_list *list ) result.append( parseGroup( addr->ad_data.ad_group ) ); break; default: - qDebug( "Generic: unkown mailimf address type" ); + odebug << "Generic: unkown mailimf address type" << oendl; break; } } @@ -365,7 +365,7 @@ void Genericwrapper::cleanMimeCache() if (t) delete t; } bodyCache.clear(); - qDebug("Genericwrapper: cache cleaned"); + odebug << "Genericwrapper: cache cleaned" << oendl; } QStringList Genericwrapper::parseInreplies(mailimf_in_reply_to * in_replies) @@ -394,12 +394,12 @@ void Genericwrapper::parseList(QValueList > & mailmessage_list * env_list = 0; r = mailsession_get_messages_list(session,&env_list); if (r != MAIL_NO_ERROR) { - qDebug("Error message list"); + odebug << "Error message list" << oendl; return; } r = mailsession_get_envelopes_list(session, env_list); if (r != MAIL_NO_ERROR) { - qDebug("Error filling message list"); + odebug << "Error filling message list" << oendl; if (env_list) { mailmessage_list_free(env_list); } @@ -413,7 +413,7 @@ void Genericwrapper::parseList(QValueList > & QBitArray mFlags(7); msg = (mailmessage*)carray_get(env_list->msg_tab, i); if (msg->msg_fields == NULL) { - //qDebug("could not fetch envelope of message %i", i); + //odebug << "could not fetch envelope of message " << i << "" << oendl; continue; } RecMailP mail = new RecMail(); @@ -448,7 +448,7 @@ void Genericwrapper::parseList(QValueList > & // crashes when accessing pop3 account? if (single_fields.fld_message_id->mid_value) { mail->setMsgid(QString(single_fields.fld_message_id->mid_value)); - qDebug("Msgid == %s",mail->Msgid().latin1()); + odebug << "Msgid == " << mail->Msgid().latin1() << "" << oendl; } if (single_fields.fld_reply_to) { diff --git a/noncore/net/mail/libmailwrapper/imapwrapper.cpp b/noncore/net/mail/libmailwrapper/imapwrapper.cpp index 657c2ba..35468fe 100644 --- a/noncore/net/mail/libmailwrapper/imapwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/imapwrapper.cpp @@ -30,7 +30,7 @@ int IMAPwrapper::selectMbox(const QString&mbox) } int err = mailimap_select( m_imap, (char*)mbox.latin1()); if ( err != MAILIMAP_NO_ERROR ) { - qDebug("error selecting mailbox: %s",m_imap->imap_response); + odebug << "error selecting mailbox: " << m_imap->imap_response << "" << oendl; m_Lastmbox = ""; return err; } @@ -41,7 +41,7 @@ int IMAPwrapper::selectMbox(const QString&mbox) void IMAPwrapper::imap_progress( size_t current, size_t maximum ) { qApp->processEvents(); - qDebug( "IMAP: %i of %i", current, maximum ); + odebug << "IMAP: " << current << " of " << maximum << "" << oendl; } bool IMAPwrapper::start_tls(bool force_tls) @@ -53,7 +53,7 @@ bool IMAPwrapper::start_tls(bool force_tls) err = mailimap_capability(m_imap,&cap_data); if (err != MAILIMAP_NO_ERROR) { Global::statusMessage("error getting capabilities!"); - qDebug("error getting capabilities!"); + odebug << "error getting capabilities!" << oendl; return false; } clistiter * cur; @@ -74,7 +74,7 @@ bool IMAPwrapper::start_tls(bool force_tls) err = mailimap_starttls(m_imap); if (err != MAILIMAP_NO_ERROR && force_tls) { Global::statusMessage(tr("Server has no TLS support!")); - qDebug("Server has no TLS support!"); + odebug << "Server has no TLS support!" << oendl; try_tls = false; } else { mailstream_low * low; @@ -125,7 +125,7 @@ void IMAPwrapper::login() pass = login.getPassword().latin1(); } else { // cancel - qDebug( "IMAP: Login canceled" ); + odebug << "IMAP: Login canceled" << oendl; return; } } else { @@ -148,7 +148,7 @@ void IMAPwrapper::login() } if ( ssl ) { - qDebug( "using ssl" ); + odebug << "using ssl" << oendl; err = mailimap_ssl_connect( m_imap, (char*)server, port ); } else { err = mailimap_socket_connect( m_imap, (char*)server, port ); @@ -176,7 +176,7 @@ void IMAPwrapper::login() bool ok = true; if (force_tls && !try_tls) { Global::statusMessage(tr("Server has no TLS support!")); - qDebug("Server has no TLS support!"); + odebug << "Server has no TLS support!" << oendl; ok = false; } @@ -317,7 +317,7 @@ QValueList >* IMAPwrapper::listFolders() folders->append( new IMAPFolder(temp,del,selectable,no_inferiors,account->getPrefix())); } } else { - qDebug("error fetching folders: %s",m_imap->imap_response); + odebug << "error fetching folders: " << m_imap->imap_response << "" << oendl; } mailimap_list_result_free( result ); @@ -327,7 +327,7 @@ QValueList >* IMAPwrapper::listFolders() mask = "*" ; path = account->getPrefix().latin1(); if (!path) path = ""; - qDebug(path); + odebug << path << oendl; err = mailimap_list( m_imap, (char*)path, (char*)mask, &result ); if ( err == MAILIMAP_NO_ERROR ) { current = result->first; @@ -354,7 +354,7 @@ QValueList >* IMAPwrapper::listFolders() folders->append(new IMAPFolder(temp,del,selectable,no_inferiors,account->getPrefix())); } } else { - qDebug("error fetching folders %s",m_imap->imap_response); + odebug << "error fetching folders " << m_imap->imap_response << "" << oendl; } if (result) mailimap_list_result_free( result ); return folders; @@ -466,8 +466,8 @@ RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att) #if 0 mailimap_date_time*d = item->att_data.att_static->att_data.att_internal_date; QDateTime da(QDate(d->dt_year,d->dt_month,d->dt_day),QTime(d->dt_hour,d->dt_min,d->dt_sec)); - qDebug("%i %i %i - %i %i %i",d->dt_year,d->dt_month,d->dt_day,d->dt_hour,d->dt_min,d->dt_sec); - qDebug(da.toString()); + odebug << "" << d->dt_year << " " << d->dt_month << " " << d->dt_day << " - " << d->dt_hour << " " << d->dt_min << " " << d->dt_sec << "" << oendl; + odebug << da.toString() << oendl; #endif } else if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_RFC822_SIZE) { size = item->att_data.att_static->att_data.att_rfc822_size; @@ -524,7 +524,7 @@ RecBodyP IMAPwrapper::fetchBody(const RecMailP&mail) body_desc = item->att_data.att_static->att_data.att_body; traverseBody(mail,body_desc,body,0,path); } else { - qDebug("error fetching body: %s",m_imap->imap_response); + odebug << "error fetching body: " << m_imap->imap_response << "" << oendl; } if (result) mailimap_fetch_list_free(result); return body; @@ -636,7 +636,7 @@ encodedString*IMAPwrapper::fetchRawPart(const RecMailP&mail,const QValueListimap_response); + odebug << "error fetching text: " << m_imap->imap_response << "" << oendl; } if (result) mailimap_fetch_list_free(result); return res; @@ -663,7 +663,7 @@ void IMAPwrapper::traverseBody(const RecMailP&mail,mailimap_body*body,RecBodyP&t id+=(j>0?" ":""); id+=QString("%1").arg(countlist[j]); } - qDebug("ID = %s",id.latin1()); + odebug << "ID = " << id.latin1() << "" << oendl; currentPart->setIdentifier(id); fillSinglePart(currentPart,part1); /* important: Check for is NULL 'cause a body can be empty! @@ -704,7 +704,7 @@ void IMAPwrapper::traverseBody(const RecMailP&mail,mailimap_body*body,RecBodyP&t id+=(j>0?" ":""); id+=QString("%1").arg(countlist[j]); } - qDebug("ID(mpart) = %s",id.latin1()); + odebug << "ID(mpart) = " << id.latin1() << "" << oendl; } traverseBody(mail,current_body,target_body,current_recursion+1,countlist,ccount); if (current_body->bd_type==MAILIMAP_BODY_MPART) { @@ -748,7 +748,7 @@ void IMAPwrapper::fillSingleTextPart(RecPartP&target_part,mailimap_body_type_tex } QString sub; sub = which->bd_media_text; - qDebug("Type= text/%s",which->bd_media_text); + odebug << "Type= text/" << which->bd_media_text << "" << oendl; target_part->setSubtype(sub.lower()); target_part->setLines(which->bd_lines); fillBodyFields(target_part,which->bd_fields); @@ -760,7 +760,7 @@ void IMAPwrapper::fillSingleMsgPart(RecPartP&target_part,mailimap_body_type_msg* return; } target_part->setSubtype("rfc822"); - qDebug("Message part"); + odebug << "Message part" << oendl; /* we set this type to text/plain */ target_part->setLines(which->bd_lines); fillBodyFields(target_part,which->bd_fields); @@ -819,7 +819,7 @@ void IMAPwrapper::fillSingleBasicPart(RecPartP&target_part,mailimap_body_type_ba } else { sub = ""; } - qDebug("Type = %s/%s",type.latin1(),sub.latin1()); + odebug << "Type = " << type.latin1() << "/" << sub.latin1() << "" << oendl; target_part->setType(type.lower()); target_part->setSubtype(sub.lower()); fillBodyFields(target_part,which->bd_fields); @@ -895,16 +895,16 @@ void IMAPwrapper::deleteMail(const RecMailP&mail) mailimap_store_att_flags_free(store_flags); if (err != MAILIMAP_NO_ERROR) { - qDebug("error deleting mail: %s",m_imap->imap_response); + odebug << "error deleting mail: " << m_imap->imap_response << "" << oendl; return; } - qDebug("deleting mail: %s",m_imap->imap_response); + odebug << "deleting mail: " << m_imap->imap_response << "" << oendl; /* should we realy do that at this moment? */ err = mailimap_expunge(m_imap); if (err != MAILIMAP_NO_ERROR) { - qDebug("error deleting mail: %s",m_imap->imap_response); + odebug << "error deleting mail: " << m_imap->imap_response << "" << oendl; } - qDebug("Delete successfull %s",m_imap->imap_response); + odebug << "Delete successfull " << m_imap->imap_response << "" << oendl; } void IMAPwrapper::answeredMail(const RecMailP&mail) @@ -930,7 +930,7 @@ void IMAPwrapper::answeredMail(const RecMailP&mail) mailimap_store_att_flags_free(store_flags); if (err != MAILIMAP_NO_ERROR) { - qDebug("error marking mail: %s",m_imap->imap_response); + odebug << "error marking mail: " << m_imap->imap_response << "" << oendl; return; } } @@ -998,14 +998,14 @@ int IMAPwrapper::deleteAllMail(const FolderP&folder) Global::statusMessage(tr("error deleting mail: %s").arg(m_imap->imap_response)); return 0; } - qDebug("deleting mail: %s",m_imap->imap_response); + odebug << "deleting mail: " << m_imap->imap_response << "" << oendl; /* should we realy do that at this moment? */ err = mailimap_expunge(m_imap); if (err != MAILIMAP_NO_ERROR) { Global::statusMessage(tr("error deleting mail: %s").arg(m_imap->imap_response)); return 0; } - qDebug("Delete successfull %s",m_imap->imap_response); + odebug << "Delete successfull " << m_imap->imap_response << "" << oendl; return 1; } @@ -1030,7 +1030,7 @@ int IMAPwrapper::createMbox(const QString&folder,const FolderP&parentfolder,cons return 0; } } - qDebug("Creating %s",pre.latin1()); + odebug << "Creating " << pre.latin1() << "" << oendl; int res = mailimap_create(m_imap,pre.latin1()); if (res != MAILIMAP_NO_ERROR) { Global::statusMessage(tr("%1").arg(m_imap->imap_response)); @@ -1089,7 +1089,7 @@ void IMAPwrapper::statusFolder(folderStat&target_stat,const QString & mailbox) } } } else { - qDebug("Error retrieving status"); + odebug << "Error retrieving status" << oendl; } if (status) mailimap_mailbox_data_status_free(status); if (att_list) mailimap_status_att_list_free(att_list); @@ -1113,7 +1113,7 @@ MAILLIB::ATYPE IMAPwrapper::getType()const const QString&IMAPwrapper::getName()const { - qDebug("Get name: %s",account->getAccountName().latin1()); + odebug << "Get name: " << account->getAccountName().latin1() << "" << oendl; return account->getAccountName(); } @@ -1129,7 +1129,7 @@ void IMAPwrapper::mvcpAllMails(const FolderP&fromFolder, { if (targetWrapper != this) { AbstractMail::mvcpAllMails(fromFolder,targetFolder,targetWrapper,moveit); - qDebug("Using generic"); + odebug << "Using generic" << oendl; return; } mailimap_set *set = 0; @@ -1148,7 +1148,7 @@ void IMAPwrapper::mvcpAllMails(const FolderP&fromFolder, if ( err != MAILIMAP_NO_ERROR ) { QString error_msg = tr("error copy mails: %1").arg(m_imap->imap_response); Global::statusMessage(error_msg); - qDebug(error_msg); + odebug << error_msg << oendl; return; } if (moveit) { @@ -1159,7 +1159,7 @@ void IMAPwrapper::mvcpAllMails(const FolderP&fromFolder, void IMAPwrapper::mvcpMail(const RecMailP&mail,const QString&targetFolder,AbstractMail*targetWrapper,bool moveit) { if (targetWrapper != this) { - qDebug("Using generic"); + odebug << "Using generic" << oendl; AbstractMail::mvcpMail(mail,targetFolder,targetWrapper,moveit); return; } @@ -1178,7 +1178,7 @@ void IMAPwrapper::mvcpMail(const RecMailP&mail,const QString&targetFolder,Abstra if ( err != MAILIMAP_NO_ERROR ) { QString error_msg = tr("error copy mail: %1").arg(m_imap->imap_response); Global::statusMessage(error_msg); - qDebug(error_msg); + odebug << error_msg << oendl; return; } if (moveit) { diff --git a/noncore/net/mail/libmailwrapper/logindialog.cpp b/noncore/net/mail/libmailwrapper/logindialog.cpp index 01d177e..c9ae190 100644 --- a/noncore/net/mail/libmailwrapper/logindialog.cpp +++ b/noncore/net/mail/libmailwrapper/logindialog.cpp @@ -24,6 +24,6 @@ void LoginDialog::accept() _user = userLine->text(); _pass = passLine->text(); - qDebug("User im accept: |%s|",_user.latin1()); + odebug << "User im accept: |" << _user.latin1() << "|" << oendl; QDialog::accept(); } diff --git a/noncore/net/mail/libmailwrapper/mailtypes.cpp b/noncore/net/mail/libmailwrapper/mailtypes.cpp index 90b8865..6d44db4 100644 --- a/noncore/net/mail/libmailwrapper/mailtypes.cpp +++ b/noncore/net/mail/libmailwrapper/mailtypes.cpp @@ -13,7 +13,7 @@ RecMail::RecMail(const RecMail&old) { init(); copy_old(old); - qDebug("Copy constructor RecMail"); + odebug << "Copy constructor RecMail" << oendl; } RecMail::~RecMail() @@ -131,7 +131,7 @@ RecPart::RecPart(const RecPart&old) m_size = old.m_size; m_Parameters = old.m_Parameters; m_poslist = old.m_poslist; - qDebug("RecPart copy constructor"); + odebug << "RecPart copy constructor" << oendl; } RecPart::~RecPart() @@ -255,7 +255,7 @@ RecBody::RecBody(const RecBody&old) m_BodyText = old.m_BodyText; m_PartsList = old.m_PartsList; m_description = old.m_description; - qDebug("Recbody copy constructor"); + odebug << "Recbody copy constructor" << oendl; } RecBody::~RecBody() @@ -320,14 +320,14 @@ encodedString::encodedString(const encodedString&old) { init(); copy_old(old); - qDebug("encodedeString: copy constructor!"); + odebug << "encodedeString: copy constructor!" << oendl; } encodedString& encodedString::operator=(const encodedString&old) { init(); copy_old(old); - qDebug("encodedString: assign operator!"); + odebug << "encodedString: assign operator!" << oendl; return *this; } diff --git a/noncore/net/mail/libmailwrapper/mailwrapper.cpp b/noncore/net/mail/libmailwrapper/mailwrapper.cpp index eddc0b9..2b0d112 100644 --- a/noncore/net/mail/libmailwrapper/mailwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/mailwrapper.cpp @@ -51,7 +51,7 @@ IMAPFolder::IMAPFolder(const QString&name,const QString&sep, bool select,bool no // Decode IMAP foldername nameDisplay = IMAPFolder::decodeFolderName( name ); /* - qDebug( "folder " + name + " - displayed as " + nameDisplay ); + odebug << "folder " + name + " - displayed as " + nameDisplay << oendl; */ prefix = aprefix; diff --git a/noncore/net/mail/libmailwrapper/mboxwrapper.cpp b/noncore/net/mail/libmailwrapper/mboxwrapper.cpp index e3c75f3..df2112f 100644 --- a/noncore/net/mail/libmailwrapper/mboxwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/mboxwrapper.cpp @@ -31,7 +31,7 @@ void MBOXwrapper::listMessages(const QString & mailbox, QValueList &ta folder = mailfolder_new( storage,(char*)p.latin1(),NULL); r = mailfolder_connect(folder); if (r != MAIL_NO_ERROR) { - qDebug("Error initializing mbox"); + odebug << "Error initializing mbox" << oendl; mailfolder_free(folder); mailstorage_free(storage); return; @@ -70,14 +70,14 @@ void MBOXwrapper::deleteMail(const RecMailP & mail) folder = mailfolder_new( storage,(char*)p.latin1(),NULL); r = mailfolder_connect(folder); if (r != MAIL_NO_ERROR) { - qDebug("Error initializing mbox"); + odebug << "Error initializing mbox" << oendl; mailfolder_free(folder); mailstorage_free(storage); return; } r = mailsession_remove_message(folder->fld_session,mail->getNumber()); if (r != MAIL_NO_ERROR) { - qDebug("error deleting mail"); + odebug << "error deleting mail" << oendl; } mailfolder_free(folder); mailstorage_free(storage); @@ -102,21 +102,21 @@ RecBodyP MBOXwrapper::fetchBody( const RecMailP &mail ) folder = mailfolder_new( storage,(char*)p.latin1(),NULL); r = mailfolder_connect(folder); if (r != MAIL_NO_ERROR) { - qDebug("Error initializing mbox"); + odebug << "Error initializing mbox" << oendl; mailfolder_free(folder); mailstorage_free(storage); return body; } r = mailsession_get_message(folder->fld_session, mail->getNumber(), &msg); if (r != MAIL_NO_ERROR) { - qDebug("Error fetching mail %i",mail->getNumber()); + odebug << "Error fetching mail " << mail->getNumber() << "" << oendl; mailfolder_free(folder); mailstorage_free(storage); return body; } r = mailmessage_fetch(msg,&data,&size); if (r != MAIL_NO_ERROR) { - qDebug("Error fetching mail %i",mail->getNumber()); + odebug << "Error fetching mail " << mail->getNumber() << "" << oendl; mailfolder_free(folder); mailstorage_free(storage); mailmessage_free(msg); @@ -132,7 +132,7 @@ RecBodyP MBOXwrapper::fetchBody( const RecMailP &mail ) void MBOXwrapper::mbox_progress( size_t current, size_t maximum ) { - qDebug("MBOX %i von %i",current,maximum); + odebug << "MBOX " << current << " von " << maximum << "" << oendl; } int MBOXwrapper::createMbox(const QString&folder,const FolderP&,const QString&,bool ) @@ -220,7 +220,7 @@ void MBOXwrapper::deleteMails(const QString & mailbox,const QValueList mailmbox_folder*f = 0; int r = mailmbox_init(p.latin1(),0,1,0,&f); if (r != MAIL_NO_ERROR) { - qDebug("Error init folder"); + odebug << "Error init folder" << oendl; return; } deleteMails(f,target); @@ -235,12 +235,12 @@ void MBOXwrapper::deleteMails(mailmbox_folder*f,const QValueList &targ for (it=target.begin(); it != target.end();++it) { r = mailmbox_delete_msg(f,(*it)->getNumber()); if (r!=MAILMBOX_NO_ERROR) { - qDebug("error delete mail"); + odebug << "error delete mail" << oendl; } } r = mailmbox_expunge(f); if (r != MAILMBOX_NO_ERROR) { - qDebug("error expunge mailbox"); + odebug << "error expunge mailbox" << oendl; } } @@ -269,7 +269,7 @@ int MBOXwrapper::deleteAllMail(const FolderP&tfolder) if (res) { r = mailsession_get_messages_list(folder->fld_session,&l); if (r != MAIL_NO_ERROR) { - qDebug("Error message list"); + odebug << "Error message list" << oendl; res=0; } } diff --git a/noncore/net/mail/libmailwrapper/mhwrapper.cpp b/noncore/net/mail/libmailwrapper/mhwrapper.cpp index 12472e9..cd7cecb 100644 --- a/noncore/net/mail/libmailwrapper/mhwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/mhwrapper.cpp @@ -16,7 +16,7 @@ MHwrapper::MHwrapper(const QString & mbox_dir,const QString&mbox_name) if (MHPath[MHPath.length()-1]=='/') { MHPath=MHPath.left(MHPath.length()-1); } - qDebug(MHPath); + odebug << MHPath << oendl; QDir dir(MHPath); if (!dir.exists()) { dir.mkdir(MHPath); @@ -33,7 +33,7 @@ void MHwrapper::init_storage() m_storage = mailstorage_new(NULL); r = mh_mailstorage_init(m_storage,(char*)pre.latin1(),0,0,0); if (r != MAIL_NO_ERROR) { - qDebug("error initializing storage"); + odebug << "error initializing storage" << oendl; mailstorage_free(m_storage); m_storage = 0; return; @@ -41,7 +41,7 @@ void MHwrapper::init_storage() } r = mailstorage_connect(m_storage); if (r!=MAIL_NO_ERROR) { - qDebug("error connecting storage"); + odebug << "error connecting storage" << oendl; mailstorage_free(m_storage); m_storage = 0; } @@ -70,7 +70,7 @@ void MHwrapper::listMessages(const QString & mailbox, QValueListsto_session,(char*)f.latin1()); if (r!=MAIL_NO_ERROR) { - qDebug("listMessages: error selecting folder!"); + odebug << "listMessages: error selecting folder!" << oendl; return; } parseList(target,m_storage->sto_session,f); @@ -90,7 +90,7 @@ QValueList >* MHwrapper::listFolders() clistcell*current=0; int r = mailsession_list_folders(m_storage->sto_session,NULL,&flist); if (r != MAIL_NO_ERROR || !flist) { - qDebug("error getting folder list"); + odebug << "error getting folder list" << oendl; return folders; } for (current=clist_begin(flist->mb_list);current!=0;current=clist_next(current)) { @@ -110,12 +110,12 @@ void MHwrapper::deleteMail(const RecMailP&mail) } int r = mailsession_select_folder(m_storage->sto_session,(char*)mail->getMbox().latin1()); if (r!=MAIL_NO_ERROR) { - qDebug("error selecting folder!"); + odebug << "error selecting folder!" << oendl; return; } r = mailsession_remove_message(m_storage->sto_session,mail->getNumber()); if (r != MAIL_NO_ERROR) { - qDebug("error deleting mail"); + odebug << "error deleting mail" << oendl; } } @@ -140,7 +140,7 @@ RecBodyP MHwrapper::fetchBody( const RecMailP &mail ) } r = mailsession_get_message(m_storage->sto_session, mail->getNumber(), &msg); if (r != MAIL_NO_ERROR) { - qDebug("Error fetching mail %i",mail->getNumber()); + odebug << "Error fetching mail " << mail->getNumber() << "" << oendl; return body; } body = parseMail(msg); @@ -150,7 +150,7 @@ RecBodyP MHwrapper::fetchBody( const RecMailP &mail ) void MHwrapper::mbox_progress( size_t current, size_t maximum ) { - qDebug("MH %i von %i",current,maximum); + odebug << "MH " << current << " von " << maximum << "" << oendl; } QString MHwrapper::buildPath(const QString&p) @@ -183,13 +183,13 @@ int MHwrapper::createMbox(const QString&folder,const FolderP&pfolder,const QStri f+="/"; f+=folder; } - qDebug(f); + odebug << f << oendl; int r = mailsession_create_folder(m_storage->sto_session,(char*)f.latin1()); if (r != MAIL_NO_ERROR) { - qDebug("error creating folder %i",r); + odebug << "error creating folder " << r << "" << oendl; return 0; } - qDebug("Folder created"); + odebug << "Folder created" << oendl; return 1; } @@ -202,12 +202,12 @@ void MHwrapper::storeMessage(const char*msg,size_t length, const QString&Folder) QString f = buildPath(Folder); int r = mailsession_select_folder(m_storage->sto_session,(char*)f.latin1()); if (r!=MAIL_NO_ERROR) { - qDebug("error selecting folder!"); + odebug << "error selecting folder!" << oendl; return; } r = mailsession_append_message(m_storage->sto_session,(char*)msg,length); if (r!=MAIL_NO_ERROR) { - qDebug("error storing mail"); + odebug << "error storing mail" << oendl; } return; } @@ -224,7 +224,7 @@ encodedString* MHwrapper::fetchRawBody(const RecMailP&mail) size_t size; int r = mailsession_select_folder(m_storage->sto_session,(char*)mail->getMbox().latin1()); if (r!=MAIL_NO_ERROR) { - qDebug("error selecting folder!"); + odebug << "error selecting folder!" << oendl; return result; } r = mailsession_get_message(m_storage->sto_session, mail->getNumber(), &msg); @@ -248,14 +248,14 @@ void MHwrapper::deleteMails(const QString & mailbox,const QValueList & QString f = buildPath(mailbox); int r = mailsession_select_folder(m_storage->sto_session,(char*)f.latin1()); if (r!=MAIL_NO_ERROR) { - qDebug("deleteMails: error selecting folder!"); + odebug << "deleteMails: error selecting folder!" << oendl; return; } QValueList::ConstIterator it; for (it=target.begin(); it!=target.end();++it) { r = mailsession_remove_message(m_storage->sto_session,(*it)->getNumber()); if (r != MAIL_NO_ERROR) { - qDebug("error deleting mail"); + odebug << "error deleting mail" << oendl; break; } } @@ -271,13 +271,13 @@ int MHwrapper::deleteAllMail(const FolderP&tfolder) if (!tfolder) return 0; int r = mailsession_select_folder(m_storage->sto_session,(char*)tfolder->getName().latin1()); if (r!=MAIL_NO_ERROR) { - qDebug("error selecting folder!"); + odebug << "error selecting folder!" << oendl; return 0; } mailmessage_list*l=0; r = mailsession_get_messages_list(m_storage->sto_session,&l); if (r != MAIL_NO_ERROR) { - qDebug("Error message list"); + odebug << "Error message list" << oendl; res = 0; } unsigned j = 0; @@ -308,7 +308,7 @@ int MHwrapper::deleteMbox(const FolderP&tfolder) int r = mailsession_delete_folder(m_storage->sto_session,(char*)tfolder->getName().latin1()); if (r != MAIL_NO_ERROR) { - qDebug("error deleting mail box"); + odebug << "error deleting mail box" << oendl; return 0; } QString cmd = "rm -rf "+tfolder->getName(); @@ -326,10 +326,10 @@ int MHwrapper::deleteMbox(const FolderP&tfolder) *process << command; removeMboxfailed = false; if(!process->start(OProcess::Block, OProcess::All) ) { - qDebug("could not start process"); + odebug << "could not start process" << oendl; return 0; } - qDebug("mail box deleted"); + odebug << "mail box deleted" << oendl; return 1; } @@ -378,15 +378,15 @@ void MHwrapper::mvcpMail(const RecMailP&mail,const QString&targetFolder,Abstract return; } if (targetWrapper != this) { - qDebug("Using generic"); + odebug << "Using generic" << oendl; Genericwrapper::mvcpMail(mail,targetFolder,targetWrapper,moveit); return; } - qDebug("Using internal routines for move/copy"); + odebug << "Using internal routines for move/copy" << oendl; QString tf = buildPath(targetFolder); int r = mailsession_select_folder(m_storage->sto_session,(char*)mail->getMbox().latin1()); if (r != MAIL_NO_ERROR) { - qDebug("Error selecting source mailbox"); + odebug << "Error selecting source mailbox" << oendl; return; } if (moveit) { @@ -395,7 +395,7 @@ void MHwrapper::mvcpMail(const RecMailP&mail,const QString&targetFolder,Abstract r = mailsession_copy_message(m_storage->sto_session,mail->getNumber(),(char*)tf.latin1()); } if (r != MAIL_NO_ERROR) { - qDebug("Error copy/moving mail internal (%i)",r); + odebug << "Error copy/moving mail internal (" << r << ")" << oendl; } } @@ -407,21 +407,21 @@ void MHwrapper::mvcpAllMails(const FolderP&fromFolder, return; } if (targetWrapper != this) { - qDebug("Using generic"); + odebug << "Using generic" << oendl; Genericwrapper::mvcpAllMails(fromFolder,targetFolder,targetWrapper,moveit); return; } if (!fromFolder) return; int r = mailsession_select_folder(m_storage->sto_session,(char*)fromFolder->getName().latin1()); if (r!=MAIL_NO_ERROR) { - qDebug("error selecting source folder!"); + odebug << "error selecting source folder!" << oendl; return; } QString tf = buildPath(targetFolder); mailmessage_list*l=0; r = mailsession_get_messages_list(m_storage->sto_session,&l); if (r != MAIL_NO_ERROR) { - qDebug("Error message list"); + odebug << "Error message list" << oendl; } unsigned j = 0; for(unsigned int i = 0 ; l!= 0 && i < carray_count(l->msg_tab) ; ++i) { @@ -434,7 +434,7 @@ void MHwrapper::mvcpAllMails(const FolderP&fromFolder, r = mailsession_copy_message(m_storage->sto_session,j,(char*)tf.latin1()); } if (r != MAIL_NO_ERROR) { - qDebug("Error copy/moving mail internal (%i)",r); + odebug << "Error copy/moving mail internal (" << r << ")" << oendl; break; } } diff --git a/noncore/net/mail/libmailwrapper/nntpwrapper.cpp b/noncore/net/mail/libmailwrapper/nntpwrapper.cpp index cfded43..5d5011a 100644 --- a/noncore/net/mail/libmailwrapper/nntpwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/nntpwrapper.cpp @@ -29,7 +29,7 @@ NNTPwrapper::~NNTPwrapper() { } void NNTPwrapper::nntp_progress( size_t current, size_t maximum ) { - qDebug( "NNTP: %i of %i", current, maximum ); + odebug << "NNTP: " << current << " of " << maximum << "" << oendl; } @@ -46,7 +46,7 @@ RecBodyP NNTPwrapper::fetchBody( const RecMailP &mail ) { mailmessage * mailmsg; if (mail->Msgsize()>HARD_MSG_SIZE_LIMIT) { - qDebug("Message to large: %i",mail->Msgsize()); + odebug << "Message to large: " << mail->Msgsize() << "" << oendl; return body; } @@ -134,7 +134,7 @@ void NNTPwrapper::login() Pass = login.getPassword().latin1(); } else { // cancel - qDebug( "NNTP: Login canceled" ); + odebug << "NNTP: Login canceled" << oendl; return; } } else { @@ -171,7 +171,7 @@ void NNTPwrapper::login() err = mailstorage_connect( m_nntp ); if (err != NEWSNNTP_NO_ERROR) { - qDebug( QString( "FEHLERNUMMER %1" ).arg( err ) ); + odebug << QString( "FEHLERNUMMER %1" ).arg( err ) << oendl; // Global::statusMessage(tr("Error initializing folder")); mailstorage_free(m_nntp); m_nntp = 0; diff --git a/noncore/net/mail/libmailwrapper/pop3wrapper.cpp b/noncore/net/mail/libmailwrapper/pop3wrapper.cpp index 5467547..c586c29 100644 --- a/noncore/net/mail/libmailwrapper/pop3wrapper.cpp +++ b/noncore/net/mail/libmailwrapper/pop3wrapper.cpp @@ -28,7 +28,7 @@ POP3wrapper::~POP3wrapper() { } void POP3wrapper::pop3_progress( size_t current, size_t maximum ) { - qDebug( "POP3: %i of %i", current, maximum ); + odebug << "POP3: " << current << " of " << maximum << "" << oendl; } RecBodyP POP3wrapper::fetchBody( const RecMailP &mail ) { @@ -45,7 +45,7 @@ RecBodyP POP3wrapper::fetchBody( const RecMailP &mail ) { mailmessage * mailmsg; if (mail->Msgsize()>HARD_MSG_SIZE_LIMIT) { - qDebug("Message to large: %i",mail->Msgsize()); + odebug << "Message to large: " << mail->Msgsize() << "" << oendl; return body; } @@ -130,7 +130,7 @@ void POP3wrapper::login() pass = login.getPassword().latin1(); } else { // cancel - qDebug( "POP3: Login canceled" ); + odebug << "POP3: Login canceled" << oendl; return; } } else { @@ -162,7 +162,7 @@ void POP3wrapper::login() err = mailstorage_connect(m_pop3); if (err != MAIL_NO_ERROR) { - qDebug( QString( "FEHLERNUMMER %1" ).arg( err ) ); + odebug << QString( "FEHLERNUMMER %1" ).arg( err ) << oendl; Global::statusMessage(tr("Error initializing folder")); mailstorage_free(m_pop3); m_pop3 = 0; @@ -236,7 +236,7 @@ void POP3wrapper::statusFolder(folderStat&target_stat,const QString&) { int r = mailsession_status_folder(m_pop3->sto_session,0,&target_stat.message_count, &target_stat.message_recent,&target_stat.message_unseen); if (r != MAIL_NO_ERROR) { - qDebug("error getting folter status."); + odebug << "error getting folter status." << oendl; } } diff --git a/noncore/net/mail/libmailwrapper/settings.cpp b/noncore/net/mail/libmailwrapper/settings.cpp index 2c81963..de36eeb 100644 --- a/noncore/net/mail/libmailwrapper/settings.cpp +++ b/noncore/net/mail/libmailwrapper/settings.cpp @@ -26,7 +26,7 @@ void Settings::checkDirectory() { if ( !QDir( (QString) getenv( "HOME" ) + "/Applications/opiemail/" ).exists() ) { system( "mkdir -p $HOME/Applications/opiemail" ); - qDebug( "$HOME/Applications/opiemail created" ); + odebug << "$HOME/Applications/opiemail created" << oendl; } } @@ -54,28 +54,28 @@ void Settings::updateAccounts() QStringList imap = dir.entryList( "imap-*" ); for ( it = imap.begin(); it != imap.end(); it++ ) { - qDebug( "Added IMAP account" ); + odebug << "Added IMAP account" << oendl; IMAPaccount *account = new IMAPaccount( (*it).replace(0, 5, "") ); accounts.append( account ); } QStringList pop3 = dir.entryList( "pop3-*" ); for ( it = pop3.begin(); it != pop3.end(); it++ ) { - qDebug( "Added POP account" ); + odebug << "Added POP account" << oendl; POP3account *account = new POP3account( (*it).replace(0, 5, "") ); accounts.append( account ); } QStringList smtp = dir.entryList( "smtp-*" ); for ( it = smtp.begin(); it != smtp.end(); it++ ) { - qDebug( "Added SMTP account" ); + odebug << "Added SMTP account" << oendl; SMTPaccount *account = new SMTPaccount( (*it).replace(0, 5, "") ); accounts.append( account ); } QStringList nntp = dir.entryList( "nntp-*" ); for ( it = nntp.begin(); it != nntp.end(); it++ ) { - qDebug( "Added NNTP account" ); + odebug << "Added NNTP account" << oendl; NNTPaccount *account = new NNTPaccount( (*it).replace(0, 5, "") ); accounts.append( account ); } @@ -179,7 +179,7 @@ void IMAPaccount::read() void IMAPaccount::save() { - qDebug( "saving " + getFileName() ); + odebug << "saving " + getFileName() << oendl; Settings::checkDirectory(); Config *conf = new Config( getFileName(), Config::File ); @@ -257,7 +257,7 @@ void POP3account::read() void POP3account::save() { - qDebug( "saving " + getFileName() ); + odebug << "saving " + getFileName() << oendl; Settings::checkDirectory(); Config *conf = new Config( getFileName(), Config::File ); @@ -339,7 +339,7 @@ void SMTPaccount::read() void SMTPaccount::save() { - qDebug( "saving " + getFileName() ); + odebug << "saving " + getFileName() << oendl; Settings::checkDirectory(); Config *conf = new Config( getFileName(), Config::File ); @@ -416,7 +416,7 @@ void NNTPaccount::read() void NNTPaccount::save() { - qDebug( "saving " + getFileName() ); + odebug << "saving " + getFileName() << oendl; Settings::checkDirectory(); Config *conf = new Config( getFileName(), Config::File ); diff --git a/noncore/net/mail/libmailwrapper/smtpwrapper.cpp b/noncore/net/mail/libmailwrapper/smtpwrapper.cpp index e2cea7a..ba78c3b 100644 --- a/noncore/net/mail/libmailwrapper/smtpwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/smtpwrapper.cpp @@ -115,7 +115,7 @@ void SMTPwrapper::smtpSend( mailmime *mail,bool later) { if (r != MAIL_NO_ERROR || !data) { if (data) free(data); - qDebug("Error fetching mime..."); + odebug << "Error fetching mime..." << oendl; return; } msg = 0; @@ -208,16 +208,16 @@ void SMTPwrapper::connect_server() } int err = MAILSMTP_NO_ERROR; - qDebug( "Servername %s at port %i", server, port ); + odebug << "Servername " << server << " at port " << port << "" << oendl; if ( ssl ) { - qDebug( "SSL session" ); + odebug << "SSL session" << oendl; err = mailsmtp_ssl_connect( m_smtp, server, port ); } else { - qDebug( "No SSL session" ); + odebug << "No SSL session" << oendl; err = mailsmtp_socket_connect( m_smtp, server, port ); } if ( err != MAILSMTP_NO_ERROR ) { - qDebug("Error init connection"); + odebug << "Error init connection" << oendl; failuretext = tr("Error init SMTP connection: %1").arg(mailsmtpError(err)); result = 0; } @@ -246,7 +246,7 @@ void SMTPwrapper::connect_server() } if (result==1 && m_SmtpAccount->getLogin() ) { - qDebug("smtp with auth"); + odebug << "smtp with auth" << oendl; if ( m_SmtpAccount->getUser().isEmpty() || m_SmtpAccount->getPassword().isEmpty() ) { // get'em LoginDialog login( m_SmtpAccount->getUser(), @@ -264,11 +264,11 @@ void SMTPwrapper::connect_server() user = m_SmtpAccount->getUser().latin1(); pass = m_SmtpAccount->getPassword().latin1(); } - qDebug( "session->auth: %i", m_smtp->auth); + odebug << "session->auth: " << m_smtp->auth << "" << oendl; if (result) { err = mailsmtp_auth( m_smtp, (char*)user, (char*)pass ); if ( err == MAILSMTP_NO_ERROR ) { - qDebug("auth ok"); + odebug << "auth ok" << oendl; } else { failuretext = tr("Authentification failed"); result = 0; @@ -307,7 +307,7 @@ int SMTPwrapper::smtpSend(char*from,clist*rcpts,const char*data,size_t size ) if (!result) { storeFailedMail(data,size,failuretext); } else { - qDebug( "Mail sent." ); + odebug << "Mail sent." << oendl; storeMail(data,size,"Sent"); } return result; @@ -319,13 +319,13 @@ void SMTPwrapper::sendMail(const Opie::Core::OSmartPointer&mail,bool later mimeMail = createMimeMail(mail ); if ( mimeMail == NULL ) { - qDebug( "sendMail: error creating mime mail" ); + odebug << "sendMail: error creating mime mail" << oendl; } else { sendProgress = new progressMailSend(); sendProgress->show(); sendProgress->setMaxMails(1); smtpSend( mimeMail,later); - qDebug("Clean up done"); + odebug << "Clean up done" << oendl; sendProgress->hide(); delete sendProgress; sendProgress = 0; @@ -378,9 +378,9 @@ int SMTPwrapper::sendQueuedMail(AbstractMail*wrap,const RecMailP&which) { bool SMTPwrapper::flushOutbox() { bool returnValue = true; - qDebug("Sending the queue"); + odebug << "Sending the queue" << oendl; if (!m_SmtpAccount) { - qDebug("No smtp account given"); + odebug << "No smtp account given" << oendl; return false; } @@ -388,7 +388,7 @@ bool SMTPwrapper::flushOutbox() { QString localfolders = AbstractMail::defaultLocalfolder(); AbstractMail*wrap = AbstractMail::getWrapper(localfolders); if (!wrap) { - qDebug("memory error"); + odebug << "memory error" << oendl; return false; } QString oldPw, oldUser; @@ -398,7 +398,7 @@ bool SMTPwrapper::flushOutbox() { wrap->listMessages(mbox,mailsToSend); if (mailsToSend.count()==0) { delete wrap; - qDebug("No mails to send"); + odebug << "No mails to send" << oendl; return false; } diff --git a/noncore/net/mail/libmailwrapper/statusmail.cpp b/noncore/net/mail/libmailwrapper/statusmail.cpp index b78244d..51383f6 100644 --- a/noncore/net/mail/libmailwrapper/statusmail.cpp +++ b/noncore/net/mail/libmailwrapper/statusmail.cpp @@ -43,7 +43,7 @@ void StatusMail::initAccounts(QList&accounts) } current->logout(); } - qDebug("Pop3 init count: %i",currentPop3Stat.message_count); + odebug << "Pop3 init count: " << currentPop3Stat.message_count << "" << oendl; currentPop3Stat.message_recent = currentPop3Stat.message_unseen = 0; lastPop3Stat.message_unseen = currentPop3Stat.message_unseen; lastPop3Stat.message_recent = currentPop3Stat.message_recent; @@ -72,10 +72,10 @@ void StatusMail::check_current_stat(folderStat&targetStat) currentImapStat.message_count+=currentStat.message_count; } else if (it->getType() == MAILLIB::A_POP3) { currentPop3Stat.message_count+=currentStat.message_count; - qDebug("Pop3 count: %i",currentPop3Stat.message_count); + odebug << "Pop3 count: " << currentPop3Stat.message_count << "" << oendl; } } - qDebug("Pop3 last: %i",lastPop3Stat.message_count); + odebug << "Pop3 last: " << lastPop3Stat.message_count << "" << oendl; if (currentPop3Stat.message_count > lastPop3Stat.message_count) { currentPop3Stat.message_recent = currentPop3Stat.message_count - lastPop3Stat.message_count; currentPop3Stat.message_unseen = currentPop3Stat.message_recent; diff --git a/noncore/net/mail/libmailwrapper/storemail.cpp b/noncore/net/mail/libmailwrapper/storemail.cpp index 914a11d..546d756 100644 --- a/noncore/net/mail/libmailwrapper/storemail.cpp +++ b/noncore/net/mail/libmailwrapper/storemail.cpp @@ -58,7 +58,7 @@ int Storemail::storeMail(const Opie::Core::OSmartPointer&mail) mailmime * mimeMail = 0; mimeMail = createMimeMail(mail ); if ( mimeMail == NULL ) { - qDebug( "storeMail: error creating mime mail" ); + odebug << "storeMail: error creating mime mail" << oendl; return 0; } char *data; @@ -73,7 +73,7 @@ int Storemail::storeMail(const Opie::Core::OSmartPointer&mail) mailmessage_free(msg); msg = 0; if (r != MAIL_NO_ERROR || !data) { - qDebug("Error fetching mime..."); + odebug << "Error fetching mime..." << oendl; ret = 0; } diff --git a/noncore/net/mail/mainwindow.cpp b/noncore/net/mail/mainwindow.cpp index c23ad3f..4c87d64 100644 --- a/noncore/net/mail/mainwindow.cpp +++ b/noncore/net/mail/mainwindow.cpp @@ -141,7 +141,7 @@ MainWindow::~MainWindow() void MainWindow::appMessage(const QCString &, const QByteArray &) { - qDebug("appMessage not reached"); + odebug << "appMessage not reached" << oendl; } void MainWindow::slotAdjustLayout() { @@ -175,32 +175,32 @@ void MainWindow::slotEditSettings() void MainWindow::slotShowFolders( bool ) { - qDebug( "slotShowFolders not reached" ); + odebug << "slotShowFolders not reached" << oendl; } void MainWindow::refreshMailView(const QValueList&) { - qDebug( "refreshMailView not reached" ); + odebug << "refreshMailView not reached" << oendl; } void MainWindow::mailLeftClicked(int, QListViewItem *,const QPoint&,int ) { - qDebug( "mailLeftClicked not reached" ); + odebug << "mailLeftClicked not reached" << oendl; } void MainWindow::displayMail() { - qDebug("displayMail not reached"); + odebug << "displayMail not reached" << oendl; } void MainWindow::slotDeleteMail() { - qDebug("deleteMail not reached"); + odebug << "deleteMail not reached" << oendl; } void MainWindow::mailHold(int, QListViewItem *,const QPoint&,int ) { - qDebug("mailHold not reached"); + odebug << "mailHold not reached" << oendl; } void MainWindow::slotSendQueued() diff --git a/noncore/net/mail/nntpgroups.cpp b/noncore/net/mail/nntpgroups.cpp index 8741c4b..3243ee3 100644 --- a/noncore/net/mail/nntpgroups.cpp +++ b/noncore/net/mail/nntpgroups.cpp @@ -53,7 +53,7 @@ void NNTPGroups::storeValues() subscribedGroups.clear(); for ( ; list_it.current(); ++list_it ) { if ( ( (QCheckListItem*)list_it.current() )->isOn() ) { - qDebug(list_it.current()->text(0) ); + odebug << list_it.current()->text(0) << oendl; subscribedGroups.append( list_it.current()->text(0) ); } } diff --git a/noncore/net/mail/opiemail.cpp b/noncore/net/mail/opiemail.cpp index 5da2161..0669b5a 100644 --- a/noncore/net/mail/opiemail.cpp +++ b/noncore/net/mail/opiemail.cpp @@ -67,13 +67,13 @@ void OpieMail::slotwriteMail(const QString&name,const QString&email) void OpieMail::slotComposeMail() { - qDebug( "Compose Mail" ); + odebug << "Compose Mail" << oendl; slotwriteMail(0l,0l); } void OpieMail::slotSendQueued() { - qDebug( "Send Queued" ); + odebug << "Send Queued" << oendl; SMTPaccount *smtp = 0; QList list = settings->getAccounts(); @@ -120,7 +120,7 @@ void OpieMail::slotSendQueued() void OpieMail::slotSearchMails() { - qDebug( "Search Mails" ); + odebug << "Search Mails" << oendl; } void OpieMail::slotEditSettings() @@ -131,7 +131,7 @@ void OpieMail::slotEditSettings() void OpieMail::slotEditAccounts() { - qDebug( "Edit Accounts" ); + odebug << "Edit Accounts" << oendl; EditAccounts eaDialog( settings, this, 0, true, WStyle_ContextHelp ); eaDialog.slotAdjustColumns(); QPEApplication::execDialog( &eaDialog ); @@ -180,7 +180,7 @@ void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int ) MAILLIB::ATYPE mailtype = ((MailListViewItem*)mailView->currentItem() )->wrapperType(); /* just the RIGHT button - or hold on pda */ if (button!=2) {return;} - qDebug("Event right/hold"); + odebug << "Event right/hold" << oendl; if (!item) return; QPopupMenu *m = new QPopupMenu(0); if (m) @@ -204,15 +204,15 @@ void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int ) void OpieMail::slotShowFolders( bool show ) { - qDebug( "Show Folders" ); + odebug << "Show Folders" << oendl; if ( show && folderView->isHidden() ) { - qDebug( "-> showing" ); + odebug << "-> showing" << oendl; folderView->show(); } else if ( !show && !folderView->isHidden() ) { - qDebug( "-> hiding" ); + odebug << "-> hiding" << oendl; folderView->hide(); } } diff --git a/noncore/net/mail/taskbarapplet/mailapplet.cpp b/noncore/net/mail/taskbarapplet/mailapplet.cpp index f672a36..cac9048 100644 --- a/noncore/net/mail/taskbarapplet/mailapplet.cpp +++ b/noncore/net/mail/taskbarapplet/mailapplet.cpp @@ -104,7 +104,7 @@ void MailApplet::slotCheck() { m_statusMail->check_current_stat( stat ); int newMailsOld = m_newMails; m_newMails = stat.message_unseen; - qDebug( QString( "test %1" ).arg( m_newMails ) ); + odebug << QString( "test %1" ).arg( m_newMails ) << oendl; if ( m_newMails > 0 && newMailsOld != m_newMails ) { ODevice *device = ODevice::inst(); if ( isHidden() ) diff --git a/noncore/net/mail/viewmail.cpp b/noncore/net/mail/viewmail.cpp index 156e11d..a574ea1 100644 --- a/noncore/net/mail/viewmail.cpp +++ b/noncore/net/mail/viewmail.cpp @@ -139,7 +139,7 @@ void ViewMail::setBody(const RecBodyP&body ) part_plist_t::ConstIterator it = body->Parts()[i]->Parameters().begin(); for (;it!=body->Parts()[i]->Parameters().end();++it) { - qDebug(it.key()); + odebug << it.key() << oendl; if (it.key().lower()=="name") { filename=it.data(); diff --git a/noncore/net/opieftp/config.in b/noncore/net/opieftp/config.in index 96e8b27..95cf73c 100644 --- a/noncore/net/opieftp/config.in +++ b/noncore/net/opieftp/config.in @@ -1,4 +1,4 @@ config OPIEFTP boolean "opie-ftp (ftp client for Opie)" default "y" - depends ( LIBQPE || LIBQPE-X11 ) && FTPLIB + depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && FTPLIB diff --git a/noncore/net/opieftp/filePermissions.cpp b/noncore/net/opieftp/filePermissions.cpp index f545c1f..991fcd5 100644 --- a/noncore/net/opieftp/filePermissions.cpp +++ b/noncore/net/opieftp/filePermissions.cpp @@ -32,7 +32,7 @@ filePermissions::filePermissions( QWidget* parent, const char* name, bool modal { if ( !name ) setName( tr("filePermissions") ); -// qDebug("FilePermissions "+fileName); +// odebug << "FilePermissions "+fileName << oendl; resize( 236, 210 ); isRemote=useRemote; setMaximumSize( QSize( 236, 210 ) ); diff --git a/noncore/net/opieftp/opieftp.cpp b/noncore/net/opieftp/opieftp.cpp index 4c39569..fe96103 100644 --- a/noncore/net/opieftp/opieftp.cpp +++ b/noncore/net/opieftp/opieftp.cpp @@ -19,11 +19,13 @@ extern "C" { #include "inputDialog.h" -#include +/* OPIE */ +#include #include #include #include #include +using namespace Opie::Core; #include #include @@ -36,14 +38,15 @@ extern "C" { #include #include #include +#include #include #include #include +/* STD */ #include #include - QProgressBar *ProgressBar; static netbuf *conn=NULL; @@ -61,7 +64,7 @@ static int log_progress(netbuf *, int xfered, void *) OpieFtp::OpieFtp( QWidget* parent, const char* name, WFlags fl) : QMainWindow( parent, name, fl ) { - qDebug("OpieFtp constructor"); + odebug << "OpieFtp constructor" << oendl; setCaption( tr( "OpieFtp" ) ); fuckeduphack=FALSE; @@ -334,7 +337,7 @@ OpieFtp::OpieFtp( QWidget* parent, const char* name, WFlags fl) // ServerComboBox->setCurrentItem(currentServerConfig); TabWidget->setCurrentPage(2); - qDebug("Constructor done"); + odebug << "Constructor done" << oendl; } OpieFtp::~OpieFtp() @@ -405,7 +408,7 @@ void OpieFtp::newConnection() void OpieFtp::serverComboEdited(const QString & ) { // if( ServerComboBox->text(currentServerConfig) != edit /*edit.isEmpty() */) { -// qDebug("ServerComboEdited"); +// odebug << "ServerComboEdited" << oendl; // // currentServerConfig = -1; // } } @@ -530,7 +533,7 @@ void OpieFtp::localUpload() FtpOptions(FTPLIB_IDLETIME, (long) 1000, conn); FtpOptions(FTPLIB_CALLBACKARG, (long) &fsz, conn); FtpOptions(FTPLIB_CALLBACKBYTES, (long) fsz/10, conn); - qDebug("Put: %s, %s",localFile.latin1(),remoteFile.latin1()); + odebug << "Put: " << localFile.latin1() << ", " << remoteFile.latin1() << "" << oendl; if( !FtpPut( localFile.latin1(), remoteFile.latin1(),FTPLIB_IMAGE, conn ) ) { QString msg; @@ -591,7 +594,7 @@ void OpieFtp::remoteDownload() FtpOptions(FTPLIB_IDLETIME, (long) 1000, conn); FtpOptions(FTPLIB_CALLBACKARG, (long) &fsz, conn); FtpOptions(FTPLIB_CALLBACKBYTES, (long) fsz/10, conn); - qDebug("Get: %s, %s",localFile.latin1(),remoteFile.latin1()); + odebug << "Get: " << localFile.latin1() << ", " << remoteFile.latin1() << "" << oendl; if(!FtpGet( localFile.latin1(), remoteFile.latin1(),FTPLIB_IMAGE, conn ) ) { QString msg; @@ -620,7 +623,7 @@ bool OpieFtp::remoteDirList(const QString &dir) tmp+="/._temp"; else tmp+="._temp"; -// qDebug("Listing remote dir "+tmp); +// odebug << "Listing remote dir "+tmp << oendl; // QCopEnvelope ( "QPE/System", "busy()" ); if (!FtpDir( tmp.latin1(), dir.latin1(), conn) ) { QString msg; @@ -642,7 +645,7 @@ bool OpieFtp::remoteChDir(const QString &dir) msg.sprintf(tr("Unable to change directories\n")+dir+"\n%s",FtpLastResponse(conn)); msg.replace(QRegExp(":"),"\n"); QMessageBox::message(tr("Note"),msg); -// qDebug(msg); +// odebug << msg << oendl; // QCopEnvelope ( "QPE/System", "notBusy()" ); return FALSE; } @@ -664,20 +667,20 @@ void OpieFtp::populateLocalView() while ( (fi=it.current()) ) { if (fi->isSymLink() ){ QString symLink=fi->readLink(); - qDebug("Symlink detected "+symLink); + odebug << "Symlink detected "+symLink << oendl; QFileInfo sym( symLink); fileS.sprintf( "%10i", sym.size() ); fileL.sprintf( "%s -> %s", fi->fileName().data(),sym.absFilePath().data() ); fileDate = sym.lastModified().toString(); } else { - qDebug("Not a dir: "+currentDir.canonicalPath()+fileL); + odebug << "Not a dir: "+currentDir.canonicalPath()+fileL << oendl; fileS.sprintf( "%10i", fi->size() ); fileL.sprintf( "%s",fi->fileName().data() ); fileDate= fi->lastModified().toString(); if( QDir(QDir::cleanDirPath(currentDir.canonicalPath()+"/"+fileL)).exists() ) { fileL+="/"; isDir=TRUE; - qDebug( fileL); + odebug << fileL << oendl; } } if(fileL !="./" && fi->exists()) { @@ -720,7 +723,7 @@ void OpieFtp::populateLocalView() bool OpieFtp::populateRemoteView( ) { -// qDebug("populate remoteview"); +// odebug << "populate remoteview" << oendl; QString sfile=QDir::homeDirPath(); if(sfile.right(1) != "/") sfile+="/._temp"; @@ -769,7 +772,7 @@ bool OpieFtp::populateRemoteView( ) if( file.exists()) file. remove(); } else - qDebug("temp file not opened successfully "+sfile); + odebug << "temp file not opened successfully "+sfile << oendl; Remote_View->setSorting( 4,TRUE); return true; } @@ -788,7 +791,7 @@ void OpieFtp::remoteListClicked(QListViewItem *selectedItem) msg.sprintf(tr("Unable to cd up\n")+"%s",FtpLastResponse(conn)); msg.replace(QRegExp(":"),"\n"); QMessageBox::message(tr("Note"),msg); -// qDebug(msg); +// odebug << msg << oendl; } char path[256]; if( FtpPwd( path,sizeof(path),conn) == 0) { //this is easier than fudging the string @@ -796,7 +799,7 @@ void OpieFtp::remoteListClicked(QListViewItem *selectedItem) msg.sprintf(tr("Unable to get working dir\n")+"%s",FtpLastResponse(conn)); msg.replace(QRegExp(":"),"\n"); QMessageBox::message(tr("Note"),msg); -// qDebug(msg); +// odebug << msg << oendl; } currentRemoteDir=path; } else { @@ -807,13 +810,13 @@ void OpieFtp::remoteListClicked(QListViewItem *selectedItem) if( !remoteChDir( (const QString &)strItem)) { currentRemoteDir = oldRemoteCurrentDir; strItem=""; -// qDebug("RemoteCurrentDir1 "+oldRemoteCurrentDir); +// odebug << "RemoteCurrentDir1 "+oldRemoteCurrentDir << oendl; } } else if(strItem.find("/",0,TRUE) != -1) { // this is a directory if( !remoteChDir( (const QString &)currentRemoteDir + strItem)) { currentRemoteDir = oldRemoteCurrentDir; strItem=""; -// qDebug("RemoteCurrentDir1 "+oldRemoteCurrentDir); +// odebug << "RemoteCurrentDir1 "+oldRemoteCurrentDir << oendl; } else { currentRemoteDir = currentRemoteDir+strItem; @@ -866,7 +869,7 @@ void OpieFtp::localListClicked(QListViewItem *selectedItem) } else { strItem=QDir::cleanDirPath(currentDir.canonicalPath()+"/"+strItem); if( QFile::exists(strItem ) ) { - // qDebug("upload "+strItem); + // odebug << "upload "+strItem << oendl; return; } } //end not symlink @@ -1170,7 +1173,7 @@ void OpieFtp::fillRemoteCombo(const QString ¤tPath) { void OpieFtp::currentPathComboChanged() { QString oldRemoteCurrentDir = currentRemoteDir; -// qDebug("oldRemoteCurrentDir "+oldRemoteCurrentDir); +// odebug << "oldRemoteCurrentDir "+oldRemoteCurrentDir << oendl; if (TabWidget->currentPageIndex() == 0) { if(QDir( currentPathCombo->lineEdit()->text()).exists()) { currentDir.setPath( currentPathCombo->lineEdit()->text() ); @@ -1216,14 +1219,14 @@ void OpieFtp::readConfig() cfg.setGroup("Server"); currentServerConfig = cfg.readNumEntry("currentServer", -1); -// qDebug("Reading %d", currentServerConfig); +// odebug << "Reading " << currentServerConfig << "" << oendl; serverComboSelected( currentServerConfig-1); } void OpieFtp::writeConfig() { - qDebug("write config"); + odebug << "write config" << oendl; Config cfg("opieftp"); cfg.setGroup("Server"); @@ -1254,7 +1257,7 @@ void OpieFtp::writeConfig() cfg.writeEntry("currentServer", numberOfEntries+1); currentServerConfig = numberOfEntries+1; - qDebug("setting currentserverconfig to %d", currentServerConfig); + odebug << "setting currentserverconfig to " << currentServerConfig << "" << oendl; cfg.setGroup(temp); if(!newServerName.isEmpty()) @@ -1273,7 +1276,7 @@ void OpieFtp::writeConfig() } void OpieFtp::clearCombos() { - qDebug("clearing"); + odebug << "clearing" << oendl; ServerComboBox->clear(); UsernameComboBox->clear(); PasswordEdit->clear(); @@ -1292,10 +1295,10 @@ void OpieFtp::fillCombos() for (int i = 1; i <= numberOfEntries; i++) { temp.setNum(i); - qDebug(temp); + odebug << temp << oendl; cfg.setGroup("Server"); remoteServerStr = cfg.readEntry( temp,""); - qDebug( remoteServerStr); + odebug << remoteServerStr << oendl; int divider = remoteServerStr.length() - remoteServerStr.find(":",0,TRUE); port = remoteServerStr.right( divider - 1); @@ -1303,7 +1306,7 @@ void OpieFtp::fillCombos() PortSpinBox->setValue( port.toInt(&ok,10)); remoteServerStr = remoteServerStr.left(remoteServerStr.length()-divider); - qDebug( "remote server string "+remoteServerStr); + odebug << "remote server string "+remoteServerStr << oendl; ServerComboBox->insertItem( remoteServerStr ); cfg.setGroup(temp); @@ -1321,7 +1324,7 @@ void OpieFtp::fillCombos() void OpieFtp::serverComboSelected(int index) { currentServerConfig = index+1; - qDebug("server combo selected %d", index+1); + odebug << "server combo selected " << index+1 << "" << oendl; QString username, remoteServerStr, remotePathStr, password, port, temp; // remoteServerStr = ServerComboBox->text(index); @@ -1332,9 +1335,9 @@ void OpieFtp::serverComboSelected(int index) temp.setNum(index+1); remoteServerStr = cfg.readEntry( temp,""); - qDebug("Group" +temp); + odebug << "Group" +temp << oendl; cfg.setGroup(temp); -// qDebug(temp); +// odebug << temp << oendl; int divider = remoteServerStr.length() - remoteServerStr.find(":",0,TRUE); port = remoteServerStr.right( divider - 1); bool ok; @@ -1349,8 +1352,8 @@ void OpieFtp::serverComboSelected(int index) username = cfg.readEntry("Username", "anonymous"); UsernameComboBox->lineEdit()->setText(username); - qDebug(username); -// qDebug("Password is "+cfg.readEntryCrypt(username, "me@opieftp.org")); + odebug << username << oendl; +// odebug << "Password is "+cfg.readEntryCrypt(username << oendl; PasswordEdit->setText(cfg.readEntryCrypt(username, "me@opieftp.org")); // UsernameComboBox // PasswordEdit @@ -1362,7 +1365,7 @@ void OpieFtp::serverComboSelected(int index) fuckeduphack = TRUE; serverListView->setCurrentItem( index); fuckeduphack=FALSE; - qDebug("server list set selected %d",index); + odebug << "server list set selected " << index << "" << oendl; update(); } @@ -1391,7 +1394,7 @@ void OpieFtp::deleteServer() serverListView->removeItem(i); - qDebug("OK DELETE "+tempname); + odebug << "OK DELETE "+tempname << oendl; cfg.removeEntry(QString::number(i)); for ( ; i <= numberOfEntries; i++) { cfg.setGroup("Server"); @@ -1446,7 +1449,7 @@ void OpieFtp::upDir() msg.sprintf(tr("Unable to cd up\n")+"%s",FtpLastResponse(conn)); msg.replace(QRegExp(":"),"\n"); QMessageBox::message(tr("Note"),msg); -// qDebug(msg); +// odebug << msg << oendl; } char path[256]; if( FtpPwd( path,sizeof(path),conn) == 0) { //this is easier than fudging the string @@ -1454,7 +1457,7 @@ void OpieFtp::upDir() msg.sprintf(tr("Unable to get working dir\n")+"%s",FtpLastResponse(conn)); msg.replace(QRegExp(":"),"\n"); QMessageBox::message(tr("Note"),msg); -// qDebug(msg); +// odebug << msg << oendl; } currentRemoteDir=path; remoteDirList( (const QString &)currentRemoteDir); //this also calls populate @@ -1515,7 +1518,7 @@ void OpieFtp::NewServer() { void OpieFtp::serverListClicked( const QString &item) { if(item.isEmpty()) return; Config cfg("opieftp"); - qDebug("highltined "+item); + odebug << "highltined "+item << oendl; int numberOfEntries = cfg.readNumEntry("numberOfEntries",0); for (int i = 1; i <= numberOfEntries; i++) { cfg.setGroup(QString::number(i)); diff --git a/noncore/net/opieftp/opieftp.pro b/noncore/net/opieftp/opieftp.pro index 2f97dc2..003b166 100644 --- a/noncore/net/opieftp/opieftp.pro +++ b/noncore/net/opieftp/opieftp.pro @@ -1,11 +1,10 @@ -#CONFIG += qt warn_on quick-app -CONFIG += qt warn_on -HEADERS = opieftp.h inputDialog.h -SOURCES = opieftp.cpp inputDialog.cpp main.cpp -TARGET = opieftp +CONFIG += qt warn_on +HEADERS = opieftp.h inputDialog.h +SOURCES = opieftp.cpp inputDialog.cpp main.cpp +TARGET = opieftp INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include -LIBS += -lqpe -lftplib +LIBS += -lqpe -lopiecore2 -lftplib DESTDIR = $(OPIEDIR)/bin include ( $(OPIEDIR)/include.pro ) diff --git a/noncore/net/opieirc/config.in b/noncore/net/opieirc/config.in index a61cf70..2c56523 100644 --- a/noncore/net/opieirc/config.in +++ b/noncore/net/opieirc/config.in @@ -1,4 +1,4 @@ config OPIEIRC boolean "opie-irc (chat via your favorite IRC server)" default "y" - depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2UI && LIBQTAUX + depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2UI && LIBQTAUX diff --git a/noncore/net/opieirc/ircmisc.cpp b/noncore/net/opieirc/ircmisc.cpp index 22387b3..6d93a34 100644 --- a/noncore/net/opieirc/ircmisc.cpp +++ b/noncore/net/opieirc/ircmisc.cpp @@ -1,6 +1,9 @@ -#include #include "ircmisc.h" +/* OPIE */ +#include +using namespace Opie::Core; + IRCTabBar::IRCTabBar(QWidget *parent, const char *name) : QTabBar(parent, name) { } @@ -64,7 +67,7 @@ void IRCHistoryLineEdit::keyPressEvent(QKeyEvent *event) { m_history.prepend(text()); m_index = -1; } else if (key == Key_Tab) { - printf("got tab\n"); + odebug << "got tab" << oendl; return; } QLineEdit::keyPressEvent(event); @@ -75,7 +78,7 @@ bool IRCHistoryLineEdit::eventFilter(QObject *object, QEvent *event) { QKeyEvent *k = (QKeyEvent *) event; /* Catch tab characters */ if (k->key() == Key_Tab) { - qDebug("tab!"); + odebug << "tab!" << oendl; return TRUE; } } diff --git a/noncore/net/opieirc/opieirc.pro b/noncore/net/opieirc/opieirc.pro index 4f9092f..2455ec4 100644 --- a/noncore/net/opieirc/opieirc.pro +++ b/noncore/net/opieirc/opieirc.pro @@ -1,5 +1,5 @@ -CONFIG = qt warn_on quick-app -HEADERS = ircchannel.h ircconnection.h \ +CONFIG = qt warn_on quick-app +HEADERS = ircchannel.h ircconnection.h \ ircmessage.h \ ircmessageparser.h ircoutput.h \ ircperson.h ircserver.h ircsession.h \ @@ -7,7 +7,7 @@ HEADERS = ircchannel.h ircconnection.h \ ircchanneltab.h ircchannellist.h \ ircserverlist.h ircservereditor.h \ ircquerytab.h ircsettings.h ircmisc.h -SOURCES = ircchannel.cpp ircconnection.cpp \ +SOURCES = ircchannel.cpp ircconnection.cpp \ ircmessage.cpp \ ircmessageparser.cpp ircoutput.cpp \ ircperson.cpp ircserver.cpp \ @@ -17,9 +17,8 @@ SOURCES = ircchannel.cpp ircconnection.cpp \ ircserverlist.cpp ircservereditor.cpp \ ircquerytab.cpp ircsettings.cpp ircmisc.cpp INCLUDEPATH += $(OPIEDIR)/include -DEPENDPATH += $(OPIEDIR)/include -LIBS += -lqpe -lopieui2 -lqtaux2 - -TARGET = opieirc +DEPENDPATH += $(OPIEDIR)/include +LIBS += -lqpe -lopiecore2 -lopieui2 -lqtaux2 +TARGET = opieirc include ( $(OPIEDIR)/include.pro ) diff --git a/noncore/net/opietooth/applet/bluezapplet.cpp b/noncore/net/opietooth/applet/bluezapplet.cpp index 8a7f0bc..1d93f5c 100644 --- a/noncore/net/opietooth/applet/bluezapplet.cpp +++ b/noncore/net/opietooth/applet/bluezapplet.cpp @@ -206,7 +206,7 @@ namespace OpieTooth { */ void BluezApplet::paintEvent( QPaintEvent* ) { QPainter p(this); - qDebug("paint bluetooth pixmap"); + odebug << "paint bluetooth pixmap" << oendl; if (bluezactive > 0) { p.drawPixmap( 0, 1, bluezOnPixmap ); diff --git a/noncore/net/opietooth/lib/startdunconnection.cpp b/noncore/net/opietooth/lib/startdunconnection.cpp index 09b19d2..37f2ae7 100644 --- a/noncore/net/opietooth/lib/startdunconnection.cpp +++ b/noncore/net/opietooth/lib/startdunconnection.cpp @@ -45,7 +45,7 @@ void StartDunConnection::start() { connect( m_dunConnect, SIGNAL( receivedStdout(Opie::Core::OProcess*,char*,int) ), this, SLOT( slotStdOut(Opie::Core::OProcess*,char*,int) ) ); if (!m_dunConnect->start( OProcess::NotifyOnExit, OProcess::AllOutput) ) { - qWarning( "could not start" ); + owarn << "could not start" << oendl; delete m_dunConnect; } } diff --git a/noncore/net/opietooth/lib/startpanconnection.cpp b/noncore/net/opietooth/lib/startpanconnection.cpp index 24ac530..50afc9f 100644 --- a/noncore/net/opietooth/lib/startpanconnection.cpp +++ b/noncore/net/opietooth/lib/startpanconnection.cpp @@ -39,7 +39,7 @@ StartConnection::ConnectionType StartPanConnection::type() { void StartPanConnection::start() { m_panConnect = new OProcess(); - qDebug( "IM START " + m_mac ); + odebug << "IM START " + m_mac << oendl; *m_panConnect << "pand" << "--connect" << m_mac; connect( m_panConnect, SIGNAL( processExited(Opie::Core::OProcess*) ) , @@ -47,7 +47,7 @@ void StartPanConnection::start() { connect( m_panConnect, SIGNAL( receivedStdout(Opie::Core::OProcess*,char*,int) ), this, SLOT( slotStdOut(Opie::Core::OProcess*,char*,int) ) ); if (!m_panConnect->start( OProcess::NotifyOnExit, OProcess::AllOutput) ) { - qWarning( "could not start" ); + owarn << "could not start" << oendl; delete m_panConnect; } } @@ -68,7 +68,7 @@ void StartPanConnection::stop() { m_panConnect = 0l; } m_panConnect = new OProcess(); - qDebug("IM STOP " + m_mac); + odebug << "IM STOP " + m_mac << oendl; *m_panConnect << "pand" << "--kill" << m_mac; @@ -77,7 +77,7 @@ void StartPanConnection::stop() { connect( m_panConnect, SIGNAL( receivedStdout(Opie::Core::OProcess*,char*,int) ), this, SLOT( slotStdOut(Opie::Core::OProcess*,char*,int) ) ); if (!m_panConnect->start( OProcess::NotifyOnExit, OProcess::AllOutput) ) { - qWarning( "could not stop" ); + owarn << "could not stop" << oendl; delete m_panConnect; } } diff --git a/noncore/net/opietooth/manager/bluebase.cpp b/noncore/net/opietooth/manager/bluebase.cpp index 29030ab..b1cddd2 100644 --- a/noncore/net/opietooth/manager/bluebase.cpp +++ b/noncore/net/opietooth/manager/bluebase.cpp @@ -155,7 +155,7 @@ void BlueBase::writeConfig() */ void BlueBase::writeToHciConfig() { - qWarning("writeToHciConfig"); + owarn << "writeToHciConfig" << oendl; HciConfWrapper hciconf ( "/etc/bluetooth/hcid.conf" ); hciconf.load(); hciconf.setPinHelper( "/opt/QtPalmtop/bin/bluepin" ); @@ -367,25 +367,25 @@ void BlueBase::startServiceActionHold( QListViewItem * item, const QPoint & poin QPopupMenu *popup =0l; if ( it != list.end() ) { - qWarning("Searching id %d %s", it.key(), it.data().latin1() ); + owarn << "Searching id " << it.key() << " " << it.data().latin1() << "" << oendl; popup = m_popHelper.find( it.key(), service->services(), (BTDeviceItem*)service->parent() ); } else { - qWarning("Empty"); + owarn << "Empty" << oendl; } if ( popup == 0l ) { - qWarning("factory returned 0l"); + owarn << "factory returned 0l" << oendl; popup = new QPopupMenu(); } int test1 = popup->insertItem( tr("Test1:"), 2); ret = popup->exec( point ); - qWarning("returned from exec() "); + owarn << "returned from exec() " << oendl; if ( ret == -1 ) { ; @@ -406,7 +406,7 @@ void BlueBase::startServiceActionHold( QListViewItem * item, const QPoint & poin */ void BlueBase::addServicesToDevice( BTDeviceItem * item ) { - qDebug("addServicesToDevice"); + odebug << "addServicesToDevice" << oendl; // row of mac adress text(3) RemoteDevice device = item->remoteDevice(); m_deviceList.insert( item->mac() , item ); @@ -423,7 +423,7 @@ void BlueBase::addServicesToDevice( BTDeviceItem * item ) */ void BlueBase::addServicesToDevice( const QString& device, Services::ValueList servicesList ) { - qDebug("fill services list"); + odebug << "fill services list" << oendl; QMap::Iterator it; BTDeviceItem* deviceItem = 0; @@ -607,7 +607,7 @@ void BlueBase::deviceActive( const RemoteDevice &device ) */ void BlueBase::deviceActive( const QString& device, bool connected ) { - qDebug("deviceActive slot"); + odebug << "deviceActive slot" << oendl; QMap::Iterator it; diff --git a/noncore/net/opietooth/manager/devicehandler.cpp b/noncore/net/opietooth/manager/devicehandler.cpp index 9c5b817..bd34351 100644 --- a/noncore/net/opietooth/manager/devicehandler.cpp +++ b/noncore/net/opietooth/manager/devicehandler.cpp @@ -33,13 +33,13 @@ QString path = QDir::homeDirPath() + "/Settings/bluetooth"; if ( (*it) == "." || (*it) == ".." ) continue; - qDebug((*it).latin1() ); + odebug << (*it).latin1() << oendl; Config conf(path + "/"+(*it), Config::File); conf.setGroup("Info"); name = conf.readEntry("name", "Error"); mac = conf.readEntry("mac", QString::null); - qDebug("MAC: " + mac); - qDebug("NAME: " + name); + odebug << "MAC: " + mac << oendl; + odebug << "NAME: " + name << oendl; if (mac.isEmpty() ) continue; RemoteDevice currentDevice( mac , name ); @@ -66,14 +66,14 @@ void DeviceHandler::save( const RemoteDevice::ValueList& list) { */ rm = "mkdir "; rm += QDir::homeDirPath() + "/Settings/bluetooth"; - qWarning("out %s", rm.data() ); + owarn << "out " << rm.data() << "" << oendl; system( rm.data() ); RemoteDevice::ValueList::ConstIterator it; // write the config for ( it = list.begin(); it != list.end(); ++it ) { - qDebug( "/Settings/bluetooth/" + (*it).mac() + ".conf"); + odebug << "/Settings/bluetooth/" + (*it).mac() + ".conf" << oendl; Config conf( QDir::homeDirPath() + "/Settings/bluetooth/" + diff --git a/noncore/net/opietooth/manager/dunpopup.cpp b/noncore/net/opietooth/manager/dunpopup.cpp index 3043f71..5b01d2f 100644 --- a/noncore/net/opietooth/manager/dunpopup.cpp +++ b/noncore/net/opietooth/manager/dunpopup.cpp @@ -11,7 +11,7 @@ using namespace OpieTooth; */ DunPopup::DunPopup( OpieTooth::BTDeviceItem* item ) : QPopupMenu() { - qWarning("DunPopup c'tor"); + owarn << "DunPopup c'tor" << oendl; m_item = item; QAction *a, *b, *c; diff --git a/noncore/net/opietooth/manager/hciconfwrapper.cpp b/noncore/net/opietooth/manager/hciconfwrapper.cpp index 35e9cd9..71c935c 100644 --- a/noncore/net/opietooth/manager/hciconfwrapper.cpp +++ b/noncore/net/opietooth/manager/hciconfwrapper.cpp @@ -74,16 +74,16 @@ namespace OpieTooth { for (it = m_file.begin(); it != m_file.end(); ++it ) { str = (*it); if( (str.contains(key)) > 0 ) { - qDebug("Found"); + odebug << "Found" << oendl; // still need to look if its commented out!!! str.simplifyWhiteSpace(); - qDebug( key ); + odebug << key << oendl; if (str.startsWith("#")) { str = (key + " " + value + ";"); } else { str = str.replace( QRegExp( "\\s*"+key+"\\s+[^\\s][^;]*;" ), key + " " + value + ";"); } - qDebug( str ); + odebug << str << oendl; it = m_file.remove( it ); it = m_file.insert( it, str ); //return; the regexp is too wide -zecke // all set @@ -98,11 +98,11 @@ namespace OpieTooth { * the m_file */ void HciConfWrapper::load() { - qWarning("loaded"); + owarn << "loaded" << oendl; m_file.clear(); QFile file( m_fileName ); if (!file.open( IO_ReadOnly ) ) { - qDebug("Could not open"); + odebug << "Could not open" << oendl; return; } @@ -119,13 +119,13 @@ namespace OpieTooth { } } void HciConfWrapper::save() { - qWarning("save"); + owarn << "save" << oendl; if (m_file.isEmpty() ) // load first return; QFile file( m_fileName ); if ( !file.open(IO_WriteOnly ) ) { - qWarning("could not open %s", m_fileName.latin1() ); + owarn << "could not open " << m_fileName.latin1() << "" << oendl; return; } @@ -134,6 +134,6 @@ namespace OpieTooth { for ( it = m_file.begin(); it != m_file.end(); ++it ) { stream << (*it) << endl; } - qWarning("saved"); + owarn << "saved" << oendl; }; } diff --git a/noncore/net/opietooth/manager/obexdialog.cpp b/noncore/net/opietooth/manager/obexdialog.cpp index 1ef862a..3a3dbb0 100644 --- a/noncore/net/opietooth/manager/obexdialog.cpp +++ b/noncore/net/opietooth/manager/obexdialog.cpp @@ -80,7 +80,7 @@ void ObexDialog::sendData() { *obexSend << "ussp-push" << m_device << fileURL << file; } if (!obexSend->start(OProcess::DontCare, OProcess::AllOutput) ) { - qWarning("could not start"); + owarn << "could not start" << oendl; delete obexSend; } diff --git a/noncore/net/opietooth/manager/obexpopup.cpp b/noncore/net/opietooth/manager/obexpopup.cpp index d147d52..9a50199 100644 --- a/noncore/net/opietooth/manager/obexpopup.cpp +++ b/noncore/net/opietooth/manager/obexpopup.cpp @@ -16,7 +16,7 @@ using namespace OpieTooth; ObexPopup::ObexPopup() : QPopupMenu() { - qWarning("RfcCommPopup c'tor"); + owarn << "RfcCommPopup c'tor" << oendl; QAction* a; @@ -36,7 +36,7 @@ ObexPopup::~ObexPopup() void ObexPopup::slotPush() { - qWarning("push something"); + owarn << "push something" << oendl; ObexDialog obexDialog; QPEApplication::execDialog( &obexDialog ); diff --git a/noncore/net/opietooth/manager/panpopup.cpp b/noncore/net/opietooth/manager/panpopup.cpp index 8b05964..43c2777 100644 --- a/noncore/net/opietooth/manager/panpopup.cpp +++ b/noncore/net/opietooth/manager/panpopup.cpp @@ -11,7 +11,7 @@ using namespace OpieTooth; */ PanPopup::PanPopup( OpieTooth::BTDeviceItem* item ) : QPopupMenu() { - qWarning("PanPopup c'tor"); + owarn << "PanPopup c'tor" << oendl; m_item = item; QAction *a, *b, *c; diff --git a/noncore/net/opietooth/manager/popuphelper.cpp b/noncore/net/opietooth/manager/popuphelper.cpp index ab22fea..19deb19 100644 --- a/noncore/net/opietooth/manager/popuphelper.cpp +++ b/noncore/net/opietooth/manager/popuphelper.cpp @@ -16,10 +16,10 @@ void PopupHelper::insert( int id, popupFactory fact ) { } QPopupMenu* PopupHelper::find( int id, const Services& ser, BTDeviceItem* item ) { - //qWarning("find"); + //owarn << "find" << oendl; FactoryMap::Iterator it = m_map.find(id ); if ( it != m_map.end() ) { - //qWarning("found"); + //owarn << "found" << oendl; popupFactory fact = it.data(); return (*fact)(ser, item); } diff --git a/noncore/net/opietooth/manager/pppdialog.cpp b/noncore/net/opietooth/manager/pppdialog.cpp index 78c1501..989bf45 100644 --- a/noncore/net/opietooth/manager/pppdialog.cpp +++ b/noncore/net/opietooth/manager/pppdialog.cpp @@ -56,7 +56,7 @@ void PPPDialog::connectToDevice() { connect( pppDial, SIGNAL(receivedStdout(Opie::Core::OProcess*,char*,int) ), this, SLOT(fillOutPut(Opie::Core::OProcess*,char*,int) ) ); if (!pppDial->start(OProcess::DontCare, OProcess::AllOutput) ) { - qWarning("could not start"); + owarn << "could not start" << oendl; delete pppDial; } } diff --git a/noncore/net/opietooth/manager/rfcommassigndialogimpl.cpp b/noncore/net/opietooth/manager/rfcommassigndialogimpl.cpp index fc76301..4469129 100644 --- a/noncore/net/opietooth/manager/rfcommassigndialogimpl.cpp +++ b/noncore/net/opietooth/manager/rfcommassigndialogimpl.cpp @@ -71,7 +71,7 @@ void RfcommAssignDialog::newDevice( const QString & mac ) rfcomm->setMac( mac ); rfcomm->setChannel( newDev->channel() ); rfcomm->setComment( newDev->comment() ); - qDebug( "New device set up" ); + odebug << "New device set up" << oendl; } } } @@ -92,7 +92,7 @@ void RfcommAssignDialog::loadConfig() it = confHandler->foundEntries().find( QString("%1").arg( i ) ); if ( it != confHandler->foundEntries().end() ) { - qDebug( "Found key in foundEntries() " ); + odebug << "Found key in foundEntries() " << oendl; rfcomm->setMac( it.data()->mac() ); rfcomm->setChannel( it.data()->channel() ); rfcomm->setComment( it.data()->comment() ); diff --git a/noncore/net/opietooth/manager/rfcommconfhandler.cpp b/noncore/net/opietooth/manager/rfcommconfhandler.cpp index 20453e8..2ef95ff 100644 --- a/noncore/net/opietooth/manager/rfcommconfhandler.cpp +++ b/noncore/net/opietooth/manager/rfcommconfhandler.cpp @@ -92,23 +92,23 @@ void RfCommConfHandler::load() { if ( tmpLine.startsWith("rfcomm") ) { QString number = tmpLine.mid( 6,1 ); - qDebug( tmpLine ); - qDebug( "TEST " + number ); + odebug << tmpLine << oendl; + odebug << "TEST " + number << oendl; } else if ( tmpLine.startsWith( "}" ) ) { m_foundEntries.insert( number, new RfCommConfObject( number.toInt(), mac, channel.toInt(), comment ) ); } else if ( tmpLine.startsWith( "device" ) ) { mac = tmpLine.mid( 7, 17 ); - qDebug( "mac" + mac ); + odebug << "mac" + mac << oendl; } else if ( tmpLine.startsWith( "channel" ) ) { channel = tmpLine.mid( 8, 1 ); qDebug ( "Channel :" + channel ); } else if ( tmpLine.startsWith( "comment" ) ) { comment = tmpLine.mid( 9, tmpLine.find( ';' ) - 9 - 1 ); - qDebug( "Comment: " + comment ); + odebug << "Comment: " + comment << oendl; } } rfCommConf.close(); } save( m_foundEntries ); - qDebug( QString( "ENTries: %1").arg( m_foundEntries.count() ) ); + odebug << QString( "ENTries: %1").arg( m_foundEntries.count() ) << oendl; } diff --git a/noncore/net/opietooth/manager/rfcpopup.cpp b/noncore/net/opietooth/manager/rfcpopup.cpp index 04bfe48..01ad616 100644 --- a/noncore/net/opietooth/manager/rfcpopup.cpp +++ b/noncore/net/opietooth/manager/rfcpopup.cpp @@ -17,7 +17,7 @@ using namespace OpieTooth; RfcCommPopup::RfcCommPopup( OpieTooth::BTDeviceItem* item ) : QPopupMenu() { - qWarning("RfcCommPopup c'tor"); + owarn << "RfcCommPopup c'tor" << oendl; QAction* a; @@ -70,7 +70,7 @@ RfcCommPopup::~RfcCommPopup() void RfcCommPopup::slotConnect() { - qWarning("connect"); + owarn << "connect" << oendl; PPPDialog pppDialog; QPEApplication::execDialog( &pppDialog ); @@ -79,7 +79,7 @@ void RfcCommPopup::slotConnect() void RfcCommPopup::slotDisconnect() { - qWarning("slot disconnected"); + owarn << "slot disconnected" << oendl; } @@ -98,6 +98,6 @@ void RfcCommPopup::slotBind() void RfcCommPopup::slotBar() { - qWarning("slotBar"); + owarn << "slotBar" << oendl; }; diff --git a/noncore/net/opietooth/manager/scandialog.cpp b/noncore/net/opietooth/manager/scandialog.cpp index c8ea3e3..3b005c4 100644 --- a/noncore/net/opietooth/manager/scandialog.cpp +++ b/noncore/net/opietooth/manager/scandialog.cpp @@ -155,7 +155,7 @@ namespace OpieTooth { * Cleanup */ ScanDialog::~ScanDialog() { - qWarning("delete scan dialog"); + owarn << "delete scan dialog" << oendl; delete localDevice; } } diff --git a/noncore/net/wellenreiter/gui/configwindow.cpp b/noncore/net/wellenreiter/gui/configwindow.cpp index da39113..bfdb20a 100644 --- a/noncore/net/wellenreiter/gui/configwindow.cpp +++ b/noncore/net/wellenreiter/gui/configwindow.cpp @@ -23,7 +23,9 @@ #include #include #include -using namespace Opie; +#include +using namespace Opie::Core; +using namespace Opie::Net; #endif /* QT */ @@ -40,15 +42,9 @@ using namespace Opie; #include #include -/* POSIX */ +/* STD */ #include -using namespace Opie::Core; -using namespace Opie::Net; -using namespace Opie::Core; -using namespace Opie::Net; -using namespace Opie::Core; -using namespace Opie::Net; WellenreiterConfigWindow* WellenreiterConfigWindow::_instance = 0; WellenreiterConfigWindow::WellenreiterConfigWindow( QWidget * parent, const char * name, WFlags f ) @@ -116,7 +112,7 @@ void WellenreiterConfigWindow::performAutodetection() // and sleep a second, so that it looks // like we're actually doing something fancy... ;-) - qDebug( "WellenreiterConfigWindow::performAutodetection()" ); + odebug << "WellenreiterConfigWindow::performAutodetection()" << oendl; // try to guess device type QFile m( "/proc/modules" ); @@ -137,7 +133,7 @@ void WellenreiterConfigWindow::performAutodetection() { deviceType->setCurrentItem( devicetype ); _guess = devicetype; - qDebug( "Wellenreiter: guessed device type to be #%d", devicetype ); + odebug << "Wellenreiter: guessed device type to be #" << devicetype << "" << oendl; } } } @@ -241,7 +237,7 @@ void WellenreiterConfigWindow::changedStationAction(int t) void WellenreiterConfigWindow::getCaptureFileNameClicked() { QString name = ( (WellenreiterMainWindow*) qApp->mainWidget() )->getFileName(true); - qDebug( "name = %s", (const char*) name ); + odebug << "name = " << (const char*) name << "" << oendl; if ( !name.isEmpty() ) { captureFileName->setText( name ); @@ -316,11 +312,11 @@ void WellenreiterConfigWindow::performAction( const QString& type, } else { - qWarning( "WellenreiterConfigWindow::performAction(): unknown type '%s'", (const char*) type ); + owarn << "WellenreiterConfigWindow::performAction(): unknown type '" << (const char*) type << "'" << oendl; return; } - qDebug( "for event '%s' I'm going to perform action %d (script='%s')", (const char*) type, action, (const char*) script ); + odebug << "for event '" << (const char*) type << "' I'm going to perform action " << action << " (script='" << (const char*) script << "')" << oendl; switch( action ) { @@ -345,9 +341,9 @@ void WellenreiterConfigWindow::performAction( const QString& type, script = script.replace( QRegExp( "$WEP" ), wep ? QString( "true" ) : QString( "false" ) ); script = script.replace( QRegExp( "$CHAN" ), QString::number( channel ) ); - qDebug( "going to call script '%s'", (const char*) script ); + odebug << "going to call script '" << (const char*) script << "'" << oendl; ::system( script ); - qDebug( "script returned." ); + odebug << "script returned." << oendl; return; } default: assert( false ); @@ -361,7 +357,7 @@ void WellenreiterConfigWindow::load() #warning Persistent Configuration not yet implemented for standalone X11 build performAutodetection(); #else - qDebug( "loading configuration settings..." ); + odebug << "loading configuration settings..." << oendl; /* This is dumb monkey typing stuff... We _need_ to do this automatically! */ @@ -439,7 +435,7 @@ void WellenreiterConfigWindow::save() #ifdef Q_WS_X11 #warning Persistent Configuration not yet implemented for standalone X11 build #else - qDebug( "saving configuration settings..." ); + odebug << "saving configuration settings..." << oendl; /* This is dumb monkey typing stuff... We _need_ to do this automatically! */ diff --git a/noncore/net/wellenreiter/gui/gps.cpp b/noncore/net/wellenreiter/gui/gps.cpp index a47b4ec..bd91e35 100644 --- a/noncore/net/wellenreiter/gui/gps.cpp +++ b/noncore/net/wellenreiter/gui/gps.cpp @@ -15,6 +15,10 @@ #include "gps.h" +/* OPIE */ +#include +using namespace Opie::Core; + /* QT */ #include @@ -25,14 +29,14 @@ GPS::GPS( QObject* parent, const char * name ) :QObject( parent, name ) { - qDebug( "GPS::GPS()" ); + odebug << "GPS::GPS()" << oendl; _socket = new QSocket( this, "gpsd commsock" ); } GPS::~GPS() { - qDebug( "GPS::~GPS()" ); + odebug << "GPS::~GPS()" << oendl; } @@ -53,7 +57,7 @@ GpsLocation GPS::position() const if ( result ) { int numAvail = _socket->bytesAvailable(); - qDebug( "GPS write succeeded, %d bytes available for reading...", numAvail ); + odebug << "GPS write succeeded, " << numAvail << " bytes available for reading..." << oendl; if ( numAvail ) { int numRead = _socket->readBlock( &buf[0], sizeof buf ); @@ -61,7 +65,7 @@ GpsLocation GPS::position() const if ( numRead < 7 || numScan != 2 ) { - qDebug( "GPS read %d bytes succeeded, invalid response: '%s'", numRead, &buf[0] ); + odebug << "GPS read " << numRead << " bytes succeeded, invalid response: '" << &buf[0] << "'" << oendl; return GpsLocation( -111, -111 ); } else diff --git a/noncore/net/wellenreiter/gui/logwindow.cpp b/noncore/net/wellenreiter/gui/logwindow.cpp index 1c72cf4..714a9a9 100644 --- a/noncore/net/wellenreiter/gui/logwindow.cpp +++ b/noncore/net/wellenreiter/gui/logwindow.cpp @@ -14,6 +14,12 @@ **********************************************************************/ #include "logwindow.h" + +/* OPIE */ +#include +using namespace Opie::Core; + +/* QT */ #include #include @@ -38,7 +44,7 @@ void MLogWindow::log( QString text ) int row; ledit->getCursorPosition( &col, &row ); ledit->insertAt( line, col, row ); - qDebug( line ); + odebug << line << oendl; } diff --git a/noncore/net/wellenreiter/gui/main.cpp b/noncore/net/wellenreiter/gui/main.cpp index 6bbc39b..62db967 100644 --- a/noncore/net/wellenreiter/gui/main.cpp +++ b/noncore/net/wellenreiter/gui/main.cpp @@ -14,24 +14,27 @@ **********************************************************************/ #include "mainwindow.h" + #ifdef QWS +#include #include #include #else #include #endif +/* QT */ #include #include +/* STD */ #include #include #include #include using namespace Opie::Core; -using namespace Opie::Core; -using namespace Opie::Core; + int main( int argc, char **argv ) { #ifdef QWS @@ -55,10 +58,10 @@ int main( int argc, char **argv ) bool check = true; for ( int i = 1; i < argc; ++i ) { - qDebug( "Wellenreiter::main() parsing argument %d = '%s'", i, argv[i] ); + odebug << "Wellenreiter::main() parsing argument " << i << " = '" << argv[i] << "'" << oendl; if ( !strcmp( "-nocheck", argv[i] ) ) { - qDebug( "-nocheck found" ); + odebug << "-nocheck found" << oendl; check = false; break; } @@ -69,7 +72,7 @@ int main( int argc, char **argv ) // root check if ( getuid() ) { - qWarning( QObject::tr( "Wellenreiter: trying to run as non-root!" ) ); + owarn << QObject::tr( "Wellenreiter: trying to run as non-root!" ) << oendl; result = QMessageBox::warning( w, " - Wellenreiter II - (non-root)", QObject::tr( "You have started Wellenreiter II\n" "as non-root. You will have\nonly limited functionality.\nProceed anyway?" ), QMessageBox::Yes, QMessageBox::No ); @@ -86,7 +89,7 @@ int main( int argc, char **argv ) if ( result == QMessageBox::Yes ) { if ( -1 == ::kill( dhcpid, SIGTERM ) ) - qWarning( "Wellenreiter: can't kill process #%d (%s)", result, strerror( errno ) ); + owarn << "Wellenreiter: can't kill process #" << result << " (" << strerror( errno ) << ")" << oendl; else killed = true; } diff --git a/noncore/net/wellenreiter/gui/mainwindow.cpp b/noncore/net/wellenreiter/gui/mainwindow.cpp index 7add6cd..a4b8839 100644 --- a/noncore/net/wellenreiter/gui/mainwindow.cpp +++ b/noncore/net/wellenreiter/gui/mainwindow.cpp @@ -21,6 +21,21 @@ #include "wellenreiter.h" #include "scanlist.h" +/* OPIE */ +#ifdef QWS +#include +#include +#include +#else +#include "resource.h" +#include +#include +#endif +using namespace Opie::Core; +using namespace Opie::Net; +using namespace Opie::Ui; + +/* QT */ #include #include #include @@ -39,23 +54,9 @@ #include #include -#ifdef QWS -#include -#include -using namespace Opie; -#else -#include "resource.h" -#include -#include -#endif - +/* STD */ #include -using namespace Opie::Ui; -using namespace Opie::Net; -using namespace Opie::Ui; -using namespace Opie::Net; -using namespace Opie::Net; WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * name, WFlags f ) :QMainWindow( parent, name, f ) { @@ -188,7 +189,7 @@ WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * n void WellenreiterMainWindow::showConfigure() { - qDebug( "show configure..." ); + odebug << "show configure..." << oendl; cw->setCaption( tr( "Configure" ) ); int result = QPEApplication::execDialog( cw ); @@ -231,7 +232,7 @@ void WellenreiterMainWindow::changedSniffingState() WellenreiterMainWindow::~WellenreiterMainWindow() { - qDebug( "Wellenreiter: bye." ); + odebug << "Wellenreiter: bye." << oendl; }; @@ -251,7 +252,7 @@ void WellenreiterMainWindow::demoReadFromGps() { WellenreiterConfigWindow* configwindow = WellenreiterConfigWindow::instance(); GPS* gps = new GPS( this ); - qDebug( "Wellenreiter::demoReadFromGps(): url=gps://%s:%d/", (const char*) configwindow->gpsdHost->currentText(), configwindow->gpsdPort->value() ); + odebug << "Wellenreiter::demoReadFromGps(): url=gps://" << (const char*) configwindow->gpsdHost->currentText() << ":" << configwindow->gpsdPort->value() << "/" << oendl; gps->open( configwindow->gpsdHost->currentText(), configwindow->gpsdPort->value() ); GpsLocation loc = gps->position(); QMessageBox::information( this, "Wellenreiter/Opie", tr( "GPS said:\n%1" ).arg( loc.dmsPosition() ) ); @@ -305,11 +306,11 @@ void WellenreiterMainWindow::fileSaveLog() QTextStream t( &f ); t << mw->logWindow()->getLog(); f.close(); - qDebug( "Saved log to file '%s'", (const char*) fname ); + odebug << "Saved log to file '" << (const char*) fname << "'" << oendl; } else { - qDebug( "Problem saving log to file '%s'", (const char*) fname ); + odebug << "Problem saving log to file '" << (const char*) fname << "'" << oendl; } } } @@ -326,11 +327,11 @@ void WellenreiterMainWindow::fileSaveSession() QDataStream t( &f ); t << *mw->netView(); f.close(); - qDebug( "Saved session to file '%s'", (const char*) fname ); + odebug << "Saved session to file '" << (const char*) fname << "'" << oendl; } else { - qDebug( "Problem saving session to file '%s'", (const char*) fname ); + odebug << "Problem saving session to file '" << (const char*) fname << "'" << oendl; } } } @@ -348,11 +349,11 @@ void WellenreiterMainWindow::fileSaveHex() QTextStream t( &f ); t << mw->hexWindow()->getLog(); f.close(); - qDebug( "Saved hex log to file '%s'", (const char*) fname ); + odebug << "Saved hex log to file '" << (const char*) fname << "'" << oendl; } else { - qDebug( "Problem saving hex log to file '%s'", (const char*) fname ); + odebug << "Problem saving hex log to file '" << (const char*) fname << "'" << oendl; } } */ @@ -369,11 +370,11 @@ void WellenreiterMainWindow::fileLoadSession() QDataStream t( &f ); t >> *mw->netView(); f.close(); - qDebug( "Loaded session from file '%s'", (const char*) fname ); + odebug << "Loaded session from file '" << (const char*) fname << "'" << oendl; } else { - qDebug( "Problem loading session from file '%s'", (const char*) fname ); + odebug << "Problem loading session from file '" << (const char*) fname << "'" << oendl; } } } @@ -438,11 +439,11 @@ void WellenreiterMainWindow::uploadSession() if ( !result ) { - qDebug( "Session upload cancelled :(" ); + odebug << "Session upload cancelled :(" << oendl; return; } - qDebug( "Starting upload..." ); + odebug << "Starting upload..." << oendl; struct sockaddr_in raddr; struct hostent *rhost_info; diff --git a/noncore/net/wellenreiter/gui/packetview.cpp b/noncore/net/wellenreiter/gui/packetview.cpp index 3d3aa18..4df01da 100644 --- a/noncore/net/wellenreiter/gui/packetview.cpp +++ b/noncore/net/wellenreiter/gui/packetview.cpp @@ -84,7 +84,7 @@ void PacketView::showPacket( int number ) } else { - qDebug( "D'oh! No packet!" ); + odebug << "D'oh! No packet!" << oendl; } } diff --git a/noncore/net/wellenreiter/gui/resource.cpp b/noncore/net/wellenreiter/gui/resource.cpp index d98ef0b..cb17f51 100644 --- a/noncore/net/wellenreiter/gui/resource.cpp +++ b/noncore/net/wellenreiter/gui/resource.cpp @@ -29,7 +29,7 @@ QPixmap loadPixmap( const QString& pix ) QPixmap pixmap( filename ); if ( pixmap.isNull() ) { - qDebug( "Wellenreiter::Resource: can't find pixmap " + filename ); + odebug << "Wellenreiter::Resource: can't find pixmap " + filename << oendl; } return pixmap; }; @@ -41,7 +41,7 @@ QIconSet loadIconSet( const QString& pix ) QPixmap pixmap( filename ); if ( pixmap.isNull() ) { - qDebug( "Wellenreiter::Resource: can't find pixmap " + filename ); + odebug << "Wellenreiter::Resource: can't find pixmap " + filename << oendl; } return QIconSet( pixmap ); }; diff --git a/noncore/net/wellenreiter/gui/scanlist.cpp b/noncore/net/wellenreiter/gui/scanlist.cpp index 3b7120a..a2be782 100644 --- a/noncore/net/wellenreiter/gui/scanlist.cpp +++ b/noncore/net/wellenreiter/gui/scanlist.cpp @@ -17,21 +17,26 @@ #include "configwindow.h" #include "logwindow.h" -#include -#include -#include -#include -#include - +/* OPIE */ #ifdef QWS +#include #include -#endif - -#ifdef QWS #include #else #include "resource.h" #endif +using namespace Opie::Core; +using namespace Opie::Ui; +using namespace Opie::Net; + +/* QT */ +#include +#include +#include +#include + +/* STD */ +#include const int col_type = 0; const int col_essid = 0; @@ -46,12 +51,6 @@ const int col_firstseen = 8; const int col_lastseen = 9; const int col_location = 10; -using namespace Opie::Net; -using namespace Opie::Ui; -using namespace Opie::Net; -using namespace Opie::Ui; -using namespace Opie::Ui; -using namespace Opie::Net; MScanListView::MScanListView( QWidget* parent, const char* name ) :OListView( parent, name ) { @@ -106,14 +105,14 @@ OListViewItem* MScanListView::childFactory() void MScanListView::serializeTo( QDataStream& s) const { - qDebug( "serializing MScanListView" ); + odebug << "serializing MScanListView" << oendl; OListView::serializeTo( s ); } void MScanListView::serializeFrom( QDataStream& s) { - qDebug( "serializing MScanListView" ); + odebug << "serializing MScanListView" << oendl; OListView::serializeFrom( s ); } @@ -143,7 +142,7 @@ void MScanListView::addNewItem( const QString& type, while ( item && ( item->text( col_essid ) != essid ) ) { #ifdef DEBUG - qDebug( "itemtext: %s", (const char*) item->text( col_essid ) ); + odebug << "itemtext: " << (const char*) item->text( col_essid ) << "" << oendl; #endif item = static_cast ( item->nextSibling() ); } @@ -159,7 +158,7 @@ void MScanListView::addNewItem( const QString& type, while ( item && ( item->text( col_ap ) != macaddr ) ) { #ifdef DEBUG - qDebug( "subitemtext: %s", (const char*) item->text( col_ap ) ); + odebug << "subitemtext: " << (const char*) item->text( col_ap ) << "" << oendl; #endif item = static_cast ( item->nextSibling() ); } @@ -168,7 +167,7 @@ void MScanListView::addNewItem( const QString& type, { // we have already seen this item, it's a dupe #ifdef DEBUG - qDebug( "%s is a dupe - ignoring...", (const char*) macaddr ); + odebug << "" << (const char*) macaddr << " is a dupe - ignoring..." << oendl; #endif item->receivedBeacon(); return; @@ -186,7 +185,7 @@ void MScanListView::addNewItem( const QString& type, // no essid to reduce clutter, maybe later we have a nick or stationname to display!? #ifdef DEBUG - qDebug( "inserting new station %s", (const char*) macaddr ); + odebug << "inserting new station " << (const char*) macaddr << "" << oendl; #endif MScanListItem* station = new MScanListItem( network, type, "", macaddr, wep, channel, signal ); @@ -212,7 +211,7 @@ void MScanListView::addIfNotExisting( MScanListItem* network, const OMacAddress& while ( subitem && ( subitem->text( col_ap ) != addr.toString(true) ) ) { #ifdef DEBUG - qDebug( "subitemtext: %s", (const char*) subitem->text( col_ap ) ); + odebug << "subitemtext: " << (const char*) subitem->text( col_ap ) << "" << oendl; #endif subitem = static_cast ( subitem->nextSibling() ); } @@ -221,7 +220,7 @@ void MScanListView::addIfNotExisting( MScanListItem* network, const OMacAddress& { // we have already seen this item, it's a dupe #ifdef DEBUG - qDebug( "%s is a dupe - ignoring...", (const char*) addr.toString(true) ); + odebug << "" << (const char*) addr.toString(true) << " is a dupe - ignoring..." << oendl; #endif subitem->receivedBeacon(); //FIXME: sent data bit return; @@ -246,7 +245,7 @@ void MScanListView::addIfNotExisting( MScanListItem* network, const OMacAddress& void MScanListView::WDStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& viaFrom, const OMacAddress& viaTo ) { - qDebug( "WDSTraffic: %s and %s seem to form a WDS", (const char*) viaFrom.toString(), (const char*) viaTo.toString() ); + odebug << "WDSTraffic: " << (const char*) viaFrom.toString() << " and " << (const char*) viaTo.toString() << " seem to form a WDS" << oendl; QString s; MScanListItem* network; @@ -264,7 +263,7 @@ void MScanListView::WDStraffic( const OMacAddress& from, const OMacAddress& to, } else { - qDebug( "D'Oh! Stations without AP... ignoring for now... will handle this in 1.1 version :-D" ); + odebug << "D'Oh! Stations without AP... ignoring for now... will handle this in 1.1 version :-D" << oendl; MLogWindow::logwindow()->log( "WARNING: Unhandled WSD traffic!" ); } } @@ -286,7 +285,7 @@ void MScanListView::toDStraffic( const OMacAddress& from, const OMacAddress& to, } else { - qDebug( "D'Oh! Station without AP... ignoring for now... will handle this in 1.1 :-D" ); + odebug << "D'Oh! Station without AP... ignoring for now... will handle this in 1.1 :-D" << oendl; MLogWindow::logwindow()->log( "WARNING: Unhandled toDS traffic!" ); } @@ -309,7 +308,7 @@ void MScanListView::fromDStraffic( const OMacAddress& from, const OMacAddress& t } else { - qDebug( "D'Oh! Station without AP... ignoring for now... will handle this in 1.1 :-D" ); + odebug << "D'Oh! Station without AP... ignoring for now... will handle this in 1.1 :-D" << oendl; MLogWindow::logwindow()->log( "WARNING: Unhandled fromDS traffic!" ); } } @@ -317,14 +316,14 @@ void MScanListView::fromDStraffic( const OMacAddress& from, const OMacAddress& t void MScanListView::IBSStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& via ) { - qWarning( "D'oh! Not yet implemented..." ); + owarn << "D'oh! Not yet implemented..." << oendl; MLogWindow::logwindow()->log( "WARNING: Unhandled IBSS traffic!" ); } void MScanListView::identify( const OMacAddress& macaddr, const QString& ip ) { - qDebug( "identify %s = %s", (const char*) macaddr.toString(), (const char*) ip ); + odebug << "identify " << (const char*) macaddr.toString() << " = " << (const char*) ip << "" << oendl; QListViewItemIterator it( this ); for ( ; it.current(); ++it ) @@ -335,7 +334,7 @@ void MScanListView::identify( const OMacAddress& macaddr, const QString& ip ) return; } } - qDebug( "D'oh! Received identification, but item not yet in list... ==> Handle this!" ); + odebug << "D'oh! Received identification, but item not yet in list... ==> Handle this!" << oendl; MLogWindow::logwindow()->log( QString().sprintf( "WARNING: Unhandled identification %s = %s!", (const char*) macaddr.toString(), (const char*) ip ) ); } @@ -343,7 +342,7 @@ void MScanListView::identify( const OMacAddress& macaddr, const QString& ip ) void MScanListView::addService( const QString& name, const OMacAddress& macaddr, const QString& ip ) { - qDebug( "addService '%s', Server = %s = %s", (const char*) name, (const char*) macaddr.toString(), (const char*) ip ); + odebug << "addService '" << (const char*) name << "', Server = " << (const char*) macaddr.toString() << " = " << (const char*) ip << "" << oendl; //TODO: Refactor that out, we need it all over the place. // Best to do it in a more comfortable abstraction in OListView @@ -360,7 +359,7 @@ void MScanListView::addService( const QString& name, const OMacAddress& macaddr, while ( subitem && ( subitem->text( col_essid ) != name ) ) { #ifdef DEBUG - qDebug( "subitemtext: %s", (const char*) subitem->text( col_essid ) ); + odebug << "subitemtext: " << (const char*) subitem->text( col_essid ) << "" << oendl; #endif subitem = static_cast ( subitem->nextSibling() ); } @@ -369,7 +368,7 @@ void MScanListView::addService( const QString& name, const OMacAddress& macaddr, { // we have already seen this item, it's a dupe #ifdef DEBUG - qDebug( "%s is a dupe - ignoring...", (const char*) name ); + odebug << "" << (const char*) name << " is a dupe - ignoring..." << oendl; #endif subitem->receivedBeacon(); //FIXME: sent data bit return; @@ -383,7 +382,7 @@ void MScanListView::addService( const QString& name, const OMacAddress& macaddr, return; } } - qDebug( "D'oh! Received identification, but item not yet in list... ==> Handle this!" ); + odebug << "D'oh! Received identification, but item not yet in list... ==> Handle this!" << oendl; MLogWindow::logwindow()->log( QString().sprintf( "WARNING: Unhandled service addition %s = %s!", (const char*) macaddr.toString(), (const char*) ip ) ); } @@ -421,7 +420,7 @@ MScanListItem::MScanListItem( QListView* parent, const QString& type, const QStr _channel( channel ), _signal( signal ), _beacons( 1 ) { #ifdef DEBUG - qDebug( "creating scanlist item" ); + odebug << "creating scanlist item" << oendl; #endif if ( WellenreiterConfigWindow::instance() ) @@ -435,7 +434,7 @@ MScanListItem::MScanListItem( QListViewItem* parent, const QString& type, const :OListViewItem( parent, essid, QString::null, macaddr, QString::null, QString::null ) { #ifdef DEBUG - qDebug( "creating scanlist item" ); + odebug << "creating scanlist item" << oendl; #endif if ( WellenreiterConfigWindow::instance() ) WellenreiterConfigWindow::instance()->performAction( type, essid, macaddr, wep, channel, signal ); // better use signal/slot combination here @@ -459,7 +458,7 @@ OListViewItem* MScanListItem::childFactory() void MScanListItem::serializeTo( QDataStream& s ) const { #ifdef DEBUG - qDebug( "serializing MScanListItem" ); + odebug << "serializing MScanListItem" << oendl; #endif OListViewItem::serializeTo( s ); @@ -470,7 +469,7 @@ void MScanListItem::serializeTo( QDataStream& s ) const void MScanListItem::serializeFrom( QDataStream& s ) { #ifdef DEBUG - qDebug( "serializing MScanListItem" ); + odebug << "serializing MScanListItem" << oendl; #endif OListViewItem::serializeFrom( s ); @@ -556,7 +555,7 @@ void MScanListItem::receivedBeacon() { _beacons++; #ifdef DEBUG - qDebug( "MScanListItem %s: received beacon #%d", (const char*) _macaddr, _beacons ); + odebug << "MScanListItem " << (const char*) _macaddr << ": received beacon #" << _beacons << "" << oendl; #endif setText( col_sig, QString::number( _beacons ) ); setText( col_lastseen, QTime::currentTime().toString() ); diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp index fff7c35..fad6efd 100644 --- a/noncore/net/wellenreiter/gui/wellenreiter.cpp +++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp @@ -11,8 +11,6 @@ ** ***********************************************************************/ -// Local - #include "gps.h" #include "wellenreiter.h" #include "scanlist.h" @@ -23,10 +21,10 @@ #include "graphwindow.h" #include "protolistview.h" -// Opie - +/* OPIE */ #ifdef QWS #include +#include #include #else #include @@ -35,10 +33,11 @@ #include #include #include -using namespace Opie; - -// Qt +using namespace Opie::Core; +using namespace Opie::Net; +using namespace Opie::Ui; +/* QT */ #include #include #include @@ -52,8 +51,7 @@ using namespace Opie; #include #include -// Standard - +/* STD */ #include #include #include @@ -61,12 +59,6 @@ using namespace Opie; #include #include -using namespace Opie::Core; -using namespace Opie::Net; -using namespace Opie::Net; -using namespace Opie::Core; -using namespace Opie::Net; -using namespace Opie::Core; Wellenreiter::Wellenreiter( QWidget* parent ) : WellenreiterBase( parent, 0, 0 ), sniffing( false ), iface( 0 ), configwindow( 0 ) @@ -106,7 +98,7 @@ Wellenreiter::~Wellenreiter() void Wellenreiter::initialTimer() { - qDebug( "Wellenreiter::preloading manufacturer database..." ); + odebug << "Wellenreiter::preloading manufacturer database..." << oendl; OManufacturerDB::instance(); } @@ -149,12 +141,12 @@ void Wellenreiter::handleNotification( OPacket* p ) if ( configwindow->parsePackets->isProtocolChecked( name ) ) { QString action = configwindow->parsePackets->protocolAction( name ); - qDebug( "parsePacket-action for '%s' seems to be '%s'", (const char*) name, (const char*) action ); + odebug << "parsePacket-action for '" << (const char*) name << "' seems to be '" << (const char*) action << "'" << oendl; doAction( action, name, p ); } else { - qDebug( "protocol '%s' not checked in parsePackets.", (const char*) name ); + odebug << "protocol '" << (const char*) name << "' not checked in parsePackets." << oendl; } ++it; } @@ -166,7 +158,7 @@ void Wellenreiter::handleManagementFrame( OPacket* p, OWaveLanManagementPacket* if ( manage->managementType() == "Beacon" ) handleManagementFrameBeacon( p, manage ); else if ( manage->managementType() == "ProbeRequest" ) handleManagementFrameProbeRequest( p, manage ); else if ( manage->managementType() == "ProbeResponse" ) handleManagementFrameProbeResponse( p, manage ); - else qWarning( "Wellenreiter::handleManagementFrame(): '%s' - please handle me!", (const char*) manage->managementType() ); + else owarn << "Wellenreiter::handleManagementFrame(): '" << (const char*) manage->managementType() << "' - please handle me!" << oendl; } @@ -182,14 +174,14 @@ void Wellenreiter::handleManagementFrameProbeRequest( OPacket* p, OWaveLanManage if ( configwindow->enableGPS->isChecked() ) { // TODO: add check if GPS is working!? - qDebug( "Wellenreiter::gathering GPS data..." ); + odebug << "Wellenreiter::gathering GPS data..." << oendl; loc = gps->position(); - qDebug( "Wellenreiter::GPS data received is ( %f , %f ) - dms string = '%s'", loc.latitude(), loc.longitude(), loc.dmsPosition().latin1() ); + odebug << "Wellenreiter::GPS data received is ( " << loc.latitude() << " , " << loc.longitude() << " ) - dms string = '" << loc.dmsPosition().latin1() << "'" << oendl; } if ( essid.length() ) netView()->addNewItem( "adhoc", essid, header->macAddress2(), false /* should check FrameControl field */, -1, 0, loc, true /* only probed */ ); - qDebug( "Wellenreiter::invalid frame [possibly noise] detected!" ); + odebug << "Wellenreiter::invalid frame [possibly noise] detected!" << oendl; } @@ -211,7 +203,7 @@ void Wellenreiter::handleManagementFrameBeacon( OPacket* p, OWaveLanManagementPa } else { - qWarning( "Wellenreiter::invalid frame [possibly noise] detected!" ); + owarn << "Wellenreiter::invalid frame [possibly noise] detected!" << oendl; return; } @@ -226,9 +218,9 @@ void Wellenreiter::handleManagementFrameBeacon( OPacket* p, OWaveLanManagementPa if ( configwindow->enableGPS->isChecked() ) { // TODO: add check if GPS is working!? - qDebug( "Wellenreiter::gathering GPS data..." ); + odebug << "Wellenreiter::gathering GPS data..." << oendl; loc = gps->position(); - qDebug( "Wellenreiter::GPS data received is ( %f , %f ) - dms string = '%s'", loc.latitude(), loc.longitude(), loc.dmsPosition().latin1() ); + odebug << "Wellenreiter::GPS data received is ( " << loc.latitude() << " , " << loc.longitude() << " ) - dms string = '" << loc.dmsPosition().latin1() << "'" << oendl; } netView()->addNewItem( type, essid, header->macAddress2(), beacon->canPrivacy(), channel, 0, loc ); @@ -255,7 +247,7 @@ void Wellenreiter::handleControlFrame( OPacket* p, OWaveLanControlPacket* contro } else { - qDebug( "Wellenreiter::handleControlFrame - please handle %s in a future version! :D", (const char*) control->controlType() ); + odebug << "Wellenreiter::handleControlFrame - please handle " << (const char*) control->controlType() << " in a future version! :D" << oendl; } } @@ -304,7 +296,7 @@ void Wellenreiter::handleARPData( OPacket* p, OARPPacket*, OMacAddress& source, OARPPacket* arp = (OARPPacket*) p->child( "ARP" ); if ( arp ) { - qDebug( "Received ARP traffic (type '%s'): ", (const char*) arp->type() ); + odebug << "Received ARP traffic (type '" << (const char*) arp->type() << "'): " << oendl; if ( arp->type() == "REQUEST" ) { netView()->identify( arp->senderMacAddress(), arp->senderIPV4Address().toString() ); @@ -325,16 +317,16 @@ void Wellenreiter::handleIPData( OPacket* p, OIPPacket* ip, OMacAddress& source, ODHCPPacket* dhcp = (ODHCPPacket*) p->child( "DHCP" ); if ( dhcp ) { - qDebug( "Received DHCP '%s' packet", (const char*) dhcp->type() ); + odebug << "Received DHCP '" << (const char*) dhcp->type() << "' packet" << oendl; if ( dhcp->type() == "OFFER" ) { - qDebug( "DHCP: '%s' ('%s') seems to be a DHCP server.", (const char*) source.toString(), (const char*) dhcp->serverAddress().toString() ); + odebug << "DHCP: '" << (const char*) source.toString() << "' ('" << (const char*) dhcp->serverAddress().toString() << "') seems to be a DHCP server." << oendl; netView()->identify( source, dhcp->serverAddress().toString() ); netView()->addService( "DHCP", source, dhcp->serverAddress().toString() ); } else if ( dhcp->type() == "ACK" ) { - qDebug( "DHCP: '%s' ('%s') accepted the offered DHCP address.", (const char*) dhcp->clientMacAddress().toString(), (const char*) dhcp->yourAddress().toString() ); + odebug << "DHCP: '" << (const char*) dhcp->clientMacAddress().toString() << "' ('" << (const char*) dhcp->yourAddress().toString() << "') accepted the offered DHCP address." << oendl; netView()->identify( dhcp->clientMacAddress(), dhcp->yourAddress().toString() ); } } @@ -368,7 +360,7 @@ bool Wellenreiter::checkDumpPacket( OPacket* p ) if ( configwindow->capturePackets->isProtocolChecked( name ) ) { QString action = configwindow->capturePackets->protocolAction( name ); - qDebug( "capturePackets-action for '%s' seems to be '%s'", (const char*) name, (const char*) action ); + odebug << "capturePackets-action for '" << (const char*) name << "' seems to be '" << (const char*) action << "'" << oendl; if ( action == "Discard" ) { logwindow->log( QString().sprintf( "(i) dump-discarding of '%s' packet requested.", (const char*) name ) ); @@ -377,7 +369,7 @@ bool Wellenreiter::checkDumpPacket( OPacket* p ) } else { - qDebug( "protocol '%s' not checked in capturePackets.", (const char*) name ); + odebug << "protocol '" << (const char*) name << "' not checked in capturePackets." << oendl; } ++it; } @@ -551,7 +543,7 @@ void Wellenreiter::startClicked() case DEVTYPE_HOSTAP: iface->setMonitoring( new OHostAPMonitoringInterface( iface, usePrism ) ); break; case DEVTYPE_ORINOCO: iface->setMonitoring( new OOrinocoMonitoringInterface( iface, usePrism ) ); break; case DEVTYPE_MANUAL: QMessageBox::information( this, "Wellenreiter II", tr( "Bring your device into\nmonitor mode now." ) ); break; - case DEVTYPE_FILE: qDebug( "Wellenreiter: Capturing from file '%s'", (const char*) interface ); break; + case DEVTYPE_FILE: odebug << "Wellenreiter: Capturing from file '" << (const char*) interface << "'" << oendl; break; default: assert( 0 ); // shouldn't reach this } @@ -572,7 +564,7 @@ void Wellenreiter::startClicked() // open GPS device if ( configwindow->enableGPS->isChecked() ) { - qDebug( "Wellenreiter:GPS enabled @ %s:%d", (const char*) configwindow->gpsdHost->currentText(), configwindow->gpsdPort->value() ); + odebug << "Wellenreiter:GPS enabled @ " << (const char*) configwindow->gpsdHost->currentText() << ":" << configwindow->gpsdPort->value() << "" << oendl; gps->open( configwindow->gpsdHost->currentText(), configwindow->gpsdPort->value() ); } @@ -596,7 +588,7 @@ void Wellenreiter::startClicked() else pcap->open( QFile( interface ) ); - qDebug( "Wellenreiter:: dumping to %s", (const char*) dumpname ); + odebug << "Wellenreiter:: dumping to " << (const char*) dumpname << "" << oendl; pcap->openDumpFile( dumpname ); if ( !pcap->isOpen() ) @@ -652,7 +644,7 @@ void Wellenreiter::startClicked() void Wellenreiter::timerEvent( QTimerEvent* ) { - qDebug( "Wellenreiter::timerEvent()" ); + odebug << "Wellenreiter::timerEvent()" << oendl; OPacket* p = pcap->next(); if ( !p ) // no more packets available { @@ -715,15 +707,15 @@ void Wellenreiter::joinNetwork(const QString& type, const QString& essid, int ch QCopEnvelope msg( "QPE/Application/networksettings", "wlan(QString,QString,QString)" ); int count = 3; - qDebug("sending %d messages",count); + odebug << "sending " << count << " messages" << oendl; msg << QString("count") << QString::number(count); - qDebug("msg >%s< Mode >%s<", iface->name(),type.latin1() ); + odebug << "msg >" << iface->name() << "< Mode >" << type.latin1() << "<" << oendl; msg << QString(iface->name()) << QString("Mode") << type; - qDebug("msg >%s< essid >%s<", iface->name(),essid.latin1()); + odebug << "msg >" << iface->name() << "< essid >" << essid.latin1() << "<" << oendl; msg << QString(iface->name()) << QString("ESSID") << essid; - qDebug("msg >%s< channel >%d<", iface->name(),channel); + odebug << "msg >" << iface->name() << "< channel >" << channel << "<" << oendl; msg << QString(iface->name()) << QString("Channel") << channel; -// qDebug("msg >%s< mac >%s<", iface->name(),macaddr); +// odebug << "msg >" << iface->name() << "< mac >" << macaddr << "<" << oendl; // msg << QString(iface->name()) << QString("MacAddr") << macaddr; #else QMessageBox::warning( this, tr( "Can't do that!" ), tr( "Function only available on Embedded build" ) ); -- cgit v0.9.0.2