author | llornkcor <llornkcor> | 2003-05-24 01:20:33 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2003-05-24 01:20:33 (UTC) |
commit | 62d2ddfb5cd77e2637cdf7fe16d76aac04975984 (patch) (side-by-side diff) | |
tree | 2157d57bab2d6e491226f5bc8468a4c2527e1456 /noncore/net/mailit/emailclient.cpp | |
parent | 0c4b5288ccd4bcd1668816a0c4e12ce0a76b4e6e (diff) | |
download | opie-62d2ddfb5cd77e2637cdf7fe16d76aac04975984.zip opie-62d2ddfb5cd77e2637cdf7fe16d76aac04975984.tar.gz opie-62d2ddfb5cd77e2637cdf7fe16d76aac04975984.tar.bz2 |
QString to const QString
Diffstat (limited to 'noncore/net/mailit/emailclient.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mailit/emailclient.cpp | 177 |
1 files changed, 89 insertions, 88 deletions
diff --git a/noncore/net/mailit/emailclient.cpp b/noncore/net/mailit/emailclient.cpp index b039cc4..2102ba7 100644 --- a/noncore/net/mailit/emailclient.cpp +++ b/noncore/net/mailit/emailclient.cpp @@ -367,3 +367,3 @@ void EmailClient::mailArrived(const Email &mail, bool fromDisk) int thisMailId; - emailHandler->parse(mail.rawMail, lineShift, &newMail); + emailHandler->parse( mail.rawMail, lineShift, &newMail); mailconf->setGroup(newMail.id); @@ -463,3 +463,3 @@ void EmailClient::mailArrived(const Email &mail, bool fromDisk) emit mailUpdated(item->getMail()); - found = true; + found = true; } @@ -468,8 +468,9 @@ void EmailClient::mailArrived(const Email &mail, bool fromDisk) } - if ((!found)||(fromDisk)) item = new EmailListItem(inboxView, newMail, TRUE); - - if (item->getMail()->files.count()>0) - { - item->setPixmap(0, Resource::loadPixmap("mailit/attach")); - } + if ((!found)||(fromDisk)) { + item = new EmailListItem(inboxView, newMail, TRUE); + } + if (item->getMail()->files.count()>0) + { + item->setPixmap(0, Resource::loadPixmap("mailit/attach")); + } /*if (!newMail.downloaded) @@ -644,3 +645,3 @@ void EmailClient::readMail() -void EmailClient::saveMail(QString fileName, QListView *view) +void EmailClient::saveMail(const QString &fileName, QListView *view) { @@ -714,3 +715,3 @@ void EmailClient::readSettings() { - mailconf->readNumEntry("LASTSERVERMAILCOUNT",0); + mailconf->readNumEntry("LASTSERVERMAILCOUNT",0); } @@ -917,18 +918,18 @@ void EmailClient::deleteItem() { - bool inbox=mailboxView->currentTab()==0; - QListView* box; - - EmailListItem* eli; - int pos; - - inbox ? box=inboxView : box=outboxView; - - eli=(EmailListItem*)box->selectedItem(); - - if (eli) - { - box->setSelected(eli->itemBelow(),true); //select the previous item - - deleteMail(eli,(bool&)inbox); //remove mail entry - } + bool inbox=mailboxView->currentTab()==0; + QListView* box; + + EmailListItem* eli; + int pos; + + inbox ? box=inboxView : box=outboxView; + + eli=(EmailListItem*)box->selectedItem(); + + if (eli) + { + box->setSelected(eli->itemBelow(),true); //select the previous item + + deleteMail(eli,(bool&)inbox); //remove mail entry + } } @@ -937,3 +938,3 @@ void EmailClient::inboxItemPressed() { -// timerID=startTimer(500); +// timerID=startTimer(500); } @@ -942,3 +943,3 @@ void EmailClient::inboxItemReleased() { - // killTimer(timerID); + // killTimer(timerID); } @@ -967,7 +968,7 @@ Email* EmailClient::getCurrentMail() { - EmailListItem *eli=(EmailListItem* ) (inboxView->selectedItem()); - if (eli!=NULL) - return eli->getMail(); - else - return NULL; + EmailListItem *eli=(EmailListItem* ) (inboxView->selectedItem()); + if (eli!=NULL) + return eli->getMail(); + else + return NULL; } @@ -976,16 +977,16 @@ void EmailClient::download(Email* mail) { - MailAccount* acc=0; - - tempMailDownloadList.clear(); - tempMailDownloadList.sizeInsert(mail->serverId, mail->size); - - acc=accountList.at(mail->fromAccountId-1); - if (acc) - { - emailHandler->setAccount(*acc); - emailHandler->getMailByList(&tempMailDownloadList); - } - else - QMessageBox::warning(qApp->activeWindow(), - tr("No account associated"), tr("There is no active account \nassociated to this mail\n it can not be downloaded"), "Abort\n"); + MailAccount* acc=0; + + tempMailDownloadList.clear(); + tempMailDownloadList.sizeInsert(mail->serverId, mail->size); + + acc=accountList.at(mail->fromAccountId-1); + if (acc) + { + emailHandler->setAccount(*acc); + emailHandler->getMailByList(&tempMailDownloadList); + } + else + QMessageBox::warning(qApp->activeWindow(), + tr("No account associated"), tr("There is no active account \nassociated to this mail\n it can not be downloaded"), "Abort\n"); } @@ -994,43 +995,43 @@ void EmailClient::receive(const QCString& msg, const QByteArray& data) { - /*if (msg=="getMail()") - { - /*QDialog qd(qApp->activeWindow(),"Getting mail",true); - QVBoxLayout *vbProg = new QVBoxLayout( &qd ); - - initStatusBar(&qd); - - if (statusBar==0) - { - qDebug("No Bar ..."); - //statusBar=new ProgressBar(&qd); - } - statusBar->show(); - vbProg->addWidget(statusBar); - qd.showMaximized(); - qd.show(); - emit getAllNewMail(); - //qd.exec(); - } - else if (msg=="compose()") - { - QDialog qd(qApp->activeWindow(),"Getting mail",true); - - WriteMail wm(&qd,"write new mail"); - QVBoxLayout vbProg( &qd ); - - wm.showMaximized(); - vbProg.addWidget(&wm); - - qd.showMaximized(); - - emit composeRequested(); - qd.exec(); - - QMessageBox::warning(qApp->activeWindow(),tr("Info"), tr("Info"), "OK\n"); - } - - else if (msg=="dialog()") - { - QMessageBox::warning(qApp->activeWindow(),tr("Info"), tr("Info"), "OK\n"); - }*/ + /*if (msg=="getMail()") + { + /*QDialog qd(qApp->activeWindow(),"Getting mail",true); + QVBoxLayout *vbProg = new QVBoxLayout( &qd ); + + initStatusBar(&qd); + + if (statusBar==0) + { + qDebug("No Bar ..."); + //statusBar=new ProgressBar(&qd); + } + statusBar->show(); + vbProg->addWidget(statusBar); + qd.showMaximized(); + qd.show(); + emit getAllNewMail(); + //qd.exec(); + } + else if (msg=="compose()") + { + QDialog qd(qApp->activeWindow(),"Getting mail",true); + + WriteMail wm(&qd,"write new mail"); + QVBoxLayout vbProg( &qd ); + + wm.showMaximized(); + vbProg.addWidget(&wm); + + qd.showMaximized(); + + emit composeRequested(); + qd.exec(); + + QMessageBox::warning(qApp->activeWindow(),tr("Info"), tr("Info"), "OK\n"); + } + + else if (msg=="dialog()") + { + QMessageBox::warning(qApp->activeWindow(),tr("Info"), tr("Info"), "OK\n"); + }*/ } |