-rw-r--r-- | noncore/net/mailit/emailclient.cpp | 322 | ||||
-rw-r--r-- | noncore/net/mailit/emaillistitem.cpp | 73 | ||||
-rw-r--r-- | noncore/net/mailit/emaillistitem.h | 3 | ||||
-rw-r--r-- | noncore/net/mailit/mailit.pro | 6 | ||||
-rw-r--r-- | noncore/net/mailit/mailitwindow.h | 1 | ||||
-rw-r--r-- | noncore/net/mailit/main.cpp | 10 |
6 files changed, 234 insertions, 181 deletions
diff --git a/noncore/net/mailit/emailclient.cpp b/noncore/net/mailit/emailclient.cpp index 90664bb..8359acf 100644 --- a/noncore/net/mailit/emailclient.cpp +++ b/noncore/net/mailit/emailclient.cpp @@ -44,6 +44,6 @@ EmailClient::EmailClient( QWidget* parent, const char* name, WFlags fl ) : QMainWindow( parent, name, fl ) -{ +{ emailHandler = new EmailHandler(); addressList = new AddressList(); - + sending = FALSE; @@ -54,9 +54,9 @@ EmailClient::EmailClient( QWidget* parent, const char* name, WFlags fl ) allAccounts = FALSE; - + init(); - - - + + + connect(emailHandler, SIGNAL(mailSent()), this, SLOT(mailSent()) ); - + connect(emailHandler, SIGNAL(smtpError(int,const QString &)), this, @@ -65,6 +65,6 @@ EmailClient::EmailClient( QWidget* parent, const char* name, WFlags fl ) SLOT(popError(int,const QString &)) ); - + connect(inboxView, SIGNAL(doubleClicked(QListViewItem *)), this, SLOT(inboxItemSelected()) ); connect(outboxView, SIGNAL(doubleClicked(QListViewItem *)), this, SLOT(outboxItemSelected()) ); - + connect(inboxView, SIGNAL(pressed(QListViewItem *)), this, SLOT(inboxItemPressed()) ); @@ -76,3 +76,3 @@ EmailClient::EmailClient( QWidget* parent, const char* name, WFlags fl ) SLOT(allMailArrived(int)) ); - + mailconf = new Config("mailit"); @@ -81,5 +81,5 @@ EmailClient::EmailClient( QWidget* parent, const char* name, WFlags fl ) readSettings(); - + updateAccounts(); - + lineShift = "\n"; @@ -87,5 +87,5 @@ EmailClient::EmailClient( QWidget* parent, const char* name, WFlags fl ) lineShift = "\r\n"; - + mailboxView->setCurrentTab(0); //ensure that inbox has focus - + /*channel = new QCopChannel( "QPE/Application/mailit", this ); @@ -106,6 +106,6 @@ EmailClient::~EmailClient() saveSettings(); - + mailconf->write(); delete mailconf; - + } @@ -115,5 +115,5 @@ void EmailClient::init() initStatusBar(this); - + setToolBarsMovable(FALSE); - + bar = new QToolBar(this); @@ -129,3 +129,3 @@ void EmailClient::init() mb->insertItem( tr( "Accounts" ), configure); - + selectAccountMenu = new QPopupMenu(mb); @@ -144,3 +144,3 @@ void EmailClient::init() getMailButton->setPopup(selectAccountMenu); - + sendMailButton = new QAction(tr("Send mail"), Resource::loadPixmap("mailit/sendqueue"), QString::null, 0, this, 0); @@ -150,3 +150,3 @@ void EmailClient::init() sendMailButton->setWhatsThis("Send mail queued in the outbox"); - + composeButton = new QAction(tr("Compose"), Resource::loadPixmap("new"), QString::null, 0, this, 0); @@ -156,3 +156,3 @@ void EmailClient::init() composeButton->setWhatsThis("Compose a new mail"); - + cancelButton = new QAction(tr("Cancel transfer"), Resource::loadPixmap("close"), QString::null, 0, this, 0); @@ -163,4 +163,4 @@ void EmailClient::init() cancelButton->setWhatsThis("Stop the currently active mail transfer"); - - + + deleteButton = new QAction( tr( "Delete" ), Resource::loadPixmap( "trash" ), QString::null, 0, this, 0 ); @@ -169,3 +169,3 @@ void EmailClient::init() deleteButton->setWhatsThis("Remove the currently selected eMail(s)"); - + mailboxView = new OTabWidget( this, "mailboxView" ); @@ -207,5 +207,5 @@ void EmailClient::init() mailboxView->addTab( widget_2,"mailit/outbox", tr( "Outbox" ) ); - + setCentralWidget(mailboxView); - + } @@ -216,3 +216,3 @@ void EmailClient::initStatusBar(QWidget* parent) statusBar->setSizeGripEnabled(FALSE); - + status1Label = new QLabel( tr("Idle"), statusBar); @@ -223,3 +223,3 @@ void EmailClient::initStatusBar(QWidget* parent) status2Label, SLOT(setText(const QString &)) ); - + progressBar = new QProgressBar(statusBar); @@ -262,3 +262,3 @@ void EmailClient::enqueMail(const Email &mail) } - + if (accountList.count() > 0) { @@ -267,3 +267,3 @@ void EmailClient::enqueMail(const Email &mail) } - + Email addMail = mail; @@ -273,5 +273,5 @@ void EmailClient::enqueMail(const Email &mail) item = new EmailListItem(outboxView, addMail, false); - + mailboxView->setCurrentTab(1); - + } @@ -283,3 +283,3 @@ void EmailClient::sendQuedMail() if (accountList.count() == 0) { - QMessageBox::warning(qApp->activeWindow(), "No account selected", "You must create an account", "OK\n"); + QMessageBox::warning(qApp->activeWindow(), tr("No account selected"), tr("You must create an account"), "OK\n"); return; @@ -315,3 +315,3 @@ void EmailClient::mailSent() sendMailButton->setEnabled(TRUE); - + quedMessages.clear(); @@ -321,11 +321,11 @@ void EmailClient::mailSent() void EmailClient::getNewMail() { - + if (accountList.count() == 0) { - QMessageBox::warning(qApp->activeWindow(),"No account selected", - "You must create an account", "OK\n"); + QMessageBox::warning(qApp->activeWindow(),tr("No account selected"), + tr("You must create an account"), "OK\n"); return; } - + setMailAccount(); - + receiving = TRUE; @@ -335,6 +335,6 @@ void EmailClient::getNewMail() { selectAccountMenu->setEnabled(FALSE); - + status1Label->setText(currentAccount->accountName + " headers"); progressBar->reset(); - + //get any previous mails not downloaded and add to queue @@ -350,5 +350,5 @@ void EmailClient::getNewMail() { }*/ - + emailHandler->getMailHeaders(); - + } @@ -359,3 +359,3 @@ void EmailClient::getAllNewMail() currentAccount = accountList.first(); - getNewMail(); + getNewMail(); } @@ -369,6 +369,6 @@ void EmailClient::mailArrived(const Email &mail, bool fromDisk) mailconf->setGroup(newMail.id); - - if (fromDisk) + + if (fromDisk) { - + newMail.downloaded = mailconf->readBoolEntry("downloaded"); @@ -377,6 +377,6 @@ void EmailClient::mailArrived(const Email &mail, bool fromDisk) newMail.fromAccountId = mailconf->readNumEntry("fromaccountid"); - } - else + } + else { //mail arrived from server - + newMail.serverId = mail.serverId; @@ -384,3 +384,3 @@ void EmailClient::mailArrived(const Email &mail, bool fromDisk) newMail.downloaded = mail.downloaded; - + newMail.fromAccountId = emailHandler->getAccount()->id; @@ -388,6 +388,6 @@ void EmailClient::mailArrived(const Email &mail, bool fromDisk) } - + //add if read or not newMail.read = mailconf->readBoolEntry("mailread"); - + //check if new mail @@ -396,3 +396,3 @@ void EmailClient::mailArrived(const Email &mail, bool fromDisk) mailIdCount++; - + //set server count, so that if the user aborts, the new @@ -401,3 +401,3 @@ void EmailClient::mailArrived(const Email &mail, bool fromDisk) currentAccount->lastServerMailCount++; - + mailconf->writeEntry("internalmailid", thisMailId); @@ -406,8 +406,8 @@ void EmailClient::mailArrived(const Email &mail, bool fromDisk) mailconf->writeEntry("serverid", newMail.serverId); - + //addressList->addContact(newMail.fromMail, newMail.from); } - + mailconf->writeEntry("downloaded", newMail.downloaded); - + QString stringMailId; @@ -415,3 +415,3 @@ void EmailClient::mailArrived(const Email &mail, bool fromDisk) //see if any attatchments needs to be stored - + for ( ePtr=newMail.files.first(); ePtr != 0; ePtr=newMail.files.next() ) { @@ -419,3 +419,3 @@ void EmailClient::mailArrived(const Email &mail, bool fromDisk) stringId.setNum(ePtr->id); - + int id = mailconf->readNumEntry("enclosureid_" + stringId); @@ -428,3 +428,3 @@ void EmailClient::mailArrived(const Email &mail, bool fromDisk) mailconf->writeEntry("installed_" + stringId, FALSE); - + ePtr->name = stringMailId + "_" + stringId; @@ -446,3 +446,3 @@ void EmailClient::mailArrived(const Email &mail, bool fromDisk) ePtr->path = mailconf->readEntry("path_" + stringId); - } + } } @@ -451,9 +451,9 @@ void EmailClient::mailArrived(const Email &mail, bool fromDisk) bool found=false; - - if (!fromDisk) + + if (!fromDisk) { - + Email *mailPtr; item = (EmailListItem *) inboxView->firstChild(); - while ((item != NULL)&&(!found)) + while ((item != NULL)&&(!found)) { @@ -474,8 +474,8 @@ void EmailClient::mailArrived(const Email &mail, bool fromDisk) // item->setPixmap(0, Resource::loadPixmap("mailit/attach")); -// } +// } /*if (!newMail.downloaded) mailDownloadList.sizeInsert(newMail.serverId, newMail.size);*/ - + mailboxView->setCurrentTab(0); - + } @@ -497,3 +497,3 @@ void EmailClient::allMailArrived(int /*count*/) status1Label->setText("Idle"); - + progressBar->reset(); @@ -502,3 +502,3 @@ void EmailClient::allMailArrived(int /*count*/) //} - + // all headers downloaded from server, start downloading remaining mails @@ -508,3 +508,3 @@ void EmailClient::allMailArrived(int /*count*/) - + mailboxView->setCurrentTab(0); @@ -523,3 +523,3 @@ void EmailClient::smtpError(int code, const QString & Msg) QString temp; - + if (code == ErrUnknownResponse) { @@ -535,3 +535,3 @@ void EmailClient::smtpError(int code, const QString & Msg) } - + if (code != ErrCancel) { @@ -541,3 +541,3 @@ void EmailClient::smtpError(int code, const QString & Msg) } - + sending = FALSE; @@ -551,3 +551,3 @@ void EmailClient::popError(int code, const QString & Msg) QString temp; - + if (code == ErrUnknownResponse) { @@ -564,3 +564,3 @@ void EmailClient::popError(int code, const QString & Msg) temp = tr("<qt>socket packet error</qt>"); - } + } @@ -572,3 +572,3 @@ void EmailClient::popError(int code, const QString & Msg) } - + receiving = FALSE; @@ -582,3 +582,3 @@ void EmailClient::inboxItemSelected() //killTimer(timerID); - + item = (EmailListItem*) inboxView->selectedItem(); @@ -592,3 +592,3 @@ void EmailClient::outboxItemSelected() //killTimer(timerID); - + item = (EmailListItem*) outboxView->selectedItem(); @@ -607,3 +607,3 @@ void EmailClient::readMail() QFile f(getPath(FALSE) + "inbox.txt"); - + if ( f.open(IO_ReadOnly) ) { // file opened successfully @@ -612,3 +612,3 @@ void EmailClient::readMail() f.close(); - + start = 0; @@ -619,3 +619,3 @@ void EmailClient::readMail() stop = s.length() - del.length(); - + mail.rawMail = s.mid(start, stop + del.length() - start ); @@ -625,3 +625,3 @@ void EmailClient::readMail() } - + QFile fo(getPath(FALSE) + "outbox.txt"); @@ -631,3 +631,3 @@ void EmailClient::readMail() fo.close(); - + start = 0; @@ -638,3 +638,3 @@ void EmailClient::readMail() stop = s.length() - del.length(); - + mail.rawMail = s.mid(start, stop + del.length() - start ); @@ -645,3 +645,3 @@ void EmailClient::readMail() enqueMail(mail); - + } @@ -654,3 +654,3 @@ void EmailClient::saveMail(const QString &fileName, QListView *view) Email *mail; - + if (! f.open(IO_WriteOnly) ) { @@ -664,6 +664,6 @@ void EmailClient::saveMail(const QString &fileName, QListView *view) t << mail->rawMail; - + mailconf->setGroup(mail->id); mailconf->writeEntry("mailread", mail->read); - + item = (EmailListItem *) item->nextSibling(); @@ -678,3 +678,3 @@ QString EmailClient::getPath(bool enclosurePath) QString enclosures = "enclosures"; - + QDir dir = (QString(getenv("HOME")) + "/Applications/" + basePath); @@ -682,11 +682,11 @@ QString EmailClient::getPath(bool enclosurePath) dir.mkdir( dir.path() ); - + if (enclosurePath) { dir = (QString(getenv("HOME")) + "/Applications/" + basePath + "/" + enclosures); - + if ( !dir.exists() ) dir.mkdir( dir.path() ); - + return (dir.path() + "/"); - + } @@ -698,9 +698,9 @@ void EmailClient::readSettings() int y,acc_count; - + mailconf->setGroup("mailitglobal"); acc_count=mailconf->readNumEntry("Accounts",0); - - for (int accountPos = 0;accountPos<acc_count ; accountPos++) + + for (int accountPos = 0;accountPos<acc_count ; accountPos++) { - mailconf->setGroup("Account_"+QString::number(accountPos+1)); //Account numbers start at 1 ... + mailconf->setGroup("Account_"+QString::number(accountPos+1)); //Account numbers start at 1 ... account.accountName = mailconf->readEntry("AccName",""); @@ -716,3 +716,3 @@ void EmailClient::readSettings() account.synchronize = FALSE; - + account.synchronize = (mailconf->readEntry("Synchronize","No")=="Yes"); @@ -720,11 +720,11 @@ void EmailClient::readSettings() { - mailconf->readNumEntry("LASTSERVERMAILCOUNT",0); + mailconf->readNumEntry("LASTSERVERMAILCOUNT",0); } - + accountList.append(&account); } - + mailconf->setGroup("mailitglobal"); - - if ( (y = mailconf->readNumEntry("mailidcount", -1)) != -1) + + if ( (y = mailconf->readNumEntry("mailidcount", -1)) != -1) { @@ -732,3 +732,3 @@ void EmailClient::readSettings() } - if ( (y = mailconf->readNumEntry("accountidcount", -1)) != -1) + if ( (y = mailconf->readNumEntry("accountidcount", -1)) != -1) { @@ -743,4 +743,4 @@ void EmailClient::saveSettings() - - if (!mailconf) + + if (!mailconf) { @@ -749,5 +749,5 @@ void EmailClient::saveSettings() } - + for (accountPtr = accountList.first(); accountPtr != 0; - accountPtr = accountList.next()) + accountPtr = accountList.next()) { @@ -762,3 +762,3 @@ void EmailClient::saveSettings() mailconf->writeEntry("AccountId",accountPtr->id); - if (accountPtr->synchronize) + if (accountPtr->synchronize) { @@ -767,4 +767,4 @@ void EmailClient::saveSettings() mailconf->writeEntry("LastServerMailCount",accountPtr->lastServerMailCount); - } - else + } + else { @@ -773,3 +773,3 @@ void EmailClient::saveSettings() } - + mailconf->setGroup("mailitglobal"); @@ -787,3 +787,3 @@ void EmailClient::selectAccount(int id) } else { - emit newCaption("Mailit ! No account defined"); + emit newCaption( tr("Mailit ! No account defined") ); } @@ -794,3 +794,3 @@ void EmailClient::editAccount(int id) MailAccount *newAccount; - + editAccountView = new EditAccount(this, "account", TRUE); @@ -803,6 +803,6 @@ void EmailClient::editAccount(int id) } - + editAccountView->showMaximized(); editAccountView->exec(); - + if (editAccountView->result() == QDialog::Accepted) { @@ -817,3 +817,3 @@ void EmailClient::editAccount(int id) } - + delete editAccountView; @@ -825,8 +825,8 @@ void EmailClient::deleteAccount(int id) QString message; - + newAccount = accountList.at(id); - message = "Delete account:\n" + newAccount->accountName; + message = tr("Delete account:\n") + newAccount->accountName; switch( QMessageBox::warning( this, "Mailit", message, "Yes", "No", 0, 0, 1 ) ) { - + case 0: accountList.remove(id); @@ -842,3 +842,3 @@ void EmailClient::updateAccounts() MailAccount *accountPtr; - + //rebuild menus, clear all first @@ -848,6 +848,6 @@ void EmailClient::updateAccounts() - newAccountId = editAccountMenu->insertItem("New", this, + newAccountId = editAccountMenu->insertItem( tr("New"), this, SLOT(editAccount(int)) ); editAccountMenu->insertSeparator(); - + idCount = 0; @@ -855,3 +855,3 @@ void EmailClient::updateAccounts() accountPtr = accountList.next()) { - + editAccountMenu->insertItem(accountPtr->accountName, @@ -870,7 +870,7 @@ void EmailClient::deleteMail(EmailListItem *mailItem, bool &inbox) Enclosure *ePtr; - - if (inbox) + + if (inbox) { mPtr = mailItem->getMail(); - + //if mail is in queue for download, remove it from @@ -881,6 +881,6 @@ void EmailClient::deleteMail(EmailListItem *mailItem, bool &inbox) } - + mailconf->setGroup(mPtr->id); mailconf->clearGroup(); - + //delete any temporary attatchemnts storing @@ -892,4 +892,4 @@ void EmailClient::deleteMail(EmailListItem *mailItem, bool &inbox) inboxView->takeItem(mailItem); - } - else + } + else { @@ -907,3 +907,3 @@ void EmailClient::setTotalSize(int /*size*/) { - + } @@ -925,10 +925,10 @@ void EmailClient::deleteItem() QListView* box; - + EmailListItem* eli; // int pos; - + inbox ? box=inboxView : box=outboxView; - + eli=(EmailListItem*)box->selectedItem(); - + if (eli) @@ -936,3 +936,3 @@ void EmailClient::deleteItem() box->setSelected(eli->itemBelow(),true); //select the previous item - + deleteMail(eli,(bool&)inbox); //remove mail entry @@ -954,8 +954,8 @@ void EmailClient::inboxItemReleased() //killTimer(timerID); - - + + QPopupMenu *action = new QPopupMenu(this); - + int reply=0; - + action->insertItem(tr( "Reply To" ),this,SLOT(reply())); @@ -964,7 +964,7 @@ void EmailClient::inboxItemReleased() action->insertItem( tr( "Remove Mail" ), this,SLOT(remove())); - + action->exec(QCursor::pos()); - + if (action) delete action; - + }*/ @@ -979,3 +979,3 @@ Email* EmailClient::getCurrentMail() } - + void EmailClient::download(Email* mail) @@ -983,9 +983,9 @@ 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); @@ -993,3 +993,3 @@ void EmailClient::download(Email* mail) } - else + else QMessageBox::warning(qApp->activeWindow(), @@ -1004,5 +1004,5 @@ void EmailClient::receive(const QCString& /*msg*/, const QByteArray& /*data*/) QVBoxLayout *vbProg = new QVBoxLayout( &qd ); - + initStatusBar(&qd); - + if (statusBar==0) @@ -1020,19 +1020,19 @@ void EmailClient::receive(const QCString& /*msg*/, const QByteArray& /*data*/) 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()") diff --git a/noncore/net/mailit/emaillistitem.cpp b/noncore/net/mailit/emaillistitem.cpp index fc9f766..a25f93a 100644 --- a/noncore/net/mailit/emaillistitem.cpp +++ b/noncore/net/mailit/emaillistitem.cpp @@ -27,5 +27,5 @@ EmailListItem::EmailListItem(QListView *parent, Email mailIn, bool inbox) QString temp; - + mail = mailIn; - + if (inbox) { @@ -40,4 +40,5 @@ EmailListItem::EmailListItem(QListView *parent, Email mailIn, bool inbox) setText(1, mail.subject); - setText(2,mail.date); - + // setText(2,mail.date); + setText(2,dateFromULCString(mail.date)); + if (mailIn.files.count()>0) @@ -46,3 +47,3 @@ EmailListItem::EmailListItem(QListView *parent, Email mailIn, bool inbox) } - + selected = FALSE; @@ -84,3 +85,3 @@ void EmailListItem::paintCell( QPainter *p, const QColorGroup &cg, _cg.setColor( QColorGroup::Text, Qt::red); - + /* if (selected) { @@ -94,3 +95,3 @@ void EmailListItem::paintCell( QPainter *p, const QColorGroup &cg, } -*/ +*/ QListViewItem::paintCell( p, _cg, column, width, alignment ); @@ -99 +100,59 @@ void EmailListItem::paintCell( QPainter *p, const QColorGroup &cg, } + +/* + * Converts an E-Mail date (ULC) RFC 2822 conform to a QDateTime. + * Returning a QString with formatting of "YYYY-MM-DD HH:MM:SS" + * (zodiac: This method was tested with more than 300 inbox mails, + * it didn't slow down the loading of mail-it.) + */ +QString EmailListItem::dateFromULCString( QString ulcDate ) +{ + QString sTemp, sTime; + int iPos, iDay, iMon=1, iYear; + + iPos=ulcDate.find(','); + if (iPos) { // it has a day-of-week + ulcDate=ulcDate.remove(0,++iPos); //.stripWhiteSpace(); + } + + QStringList dateEntries = QStringList::split(" ",ulcDate,FALSE); + QStringList::Iterator iter = dateEntries.begin(); + + // Get day as DD + iDay = (*iter++).toInt(); + + // Get month as string Mmm + sTemp = (*iter++); + if (sTemp =="Jan") {iMon=1;} else + if (sTemp =="Feb") {iMon=2;} else + if (sTemp =="Mar") {iMon=3;} else + if (sTemp =="Apr") {iMon=4;} else + if (sTemp =="May") {iMon=5;} else + if (sTemp =="Jun") {iMon=6;} else + if (sTemp =="Jul") {iMon=7;} else + if (sTemp =="Aug") {iMon=8;} else + if (sTemp =="Sep") {iMon=9;} else + if (sTemp =="Oct") {iMon=10;} else + if (sTemp =="Nov") {iMon=11;} else + if (sTemp =="Dec") {iMon=12;} + + // Get year as YYYY or YY + iYear = (*iter++).toInt(); + + QDate date = QDate(iYear, iMon, iDay); + + // Convert timestring into a QTime + QStringList timeEntries = QStringList::split(":",(*iter++),FALSE); + QStringList::Iterator iterTime = timeEntries.begin(); + iYear=(*iterTime++).toInt(); // var reuse.. *cough* + iMon=(*iterTime++).toInt(); + iDay=(*iterTime++).toInt(); + QTime time = QTime(iYear,iMon,iDay); + + return QString::number(date.year())+"-" + +QString::number(date.month()).rightJustify(2,'0')+"-" + +QString::number(date.day()).rightJustify(2,'0')+" " + +time.toString(); +} + + diff --git a/noncore/net/mailit/emaillistitem.h b/noncore/net/mailit/emaillistitem.h index 642932c..129a774 100644 --- a/noncore/net/mailit/emaillistitem.h +++ b/noncore/net/mailit/emaillistitem.h @@ -34,3 +34,3 @@ public: bool itemSelected(); - + protected: @@ -41,2 +41,3 @@ private: bool selected; + QString dateFromULCString( QString ulc ); }; diff --git a/noncore/net/mailit/mailit.pro b/noncore/net/mailit/mailit.pro index 5e9a83a..0224886 100644 --- a/noncore/net/mailit/mailit.pro +++ b/noncore/net/mailit/mailit.pro @@ -1,4 +1,3 @@ -TEMPLATE = app TARGET = mailit -CONFIG = qt warn_on release +CONFIG = qt warn_on release quick-app HEADERS = emailclient.h \ @@ -39,5 +38,2 @@ LIBS += -lqpe -lopie # -lssl -MOC_DIR=qpeobj -OBJECTS_DIR=qpeobj -DESTDIR=$(OPIEDIR)/bin diff --git a/noncore/net/mailit/mailitwindow.h b/noncore/net/mailit/mailitwindow.h index e818d32..11e56b9 100644 --- a/noncore/net/mailit/mailitwindow.h +++ b/noncore/net/mailit/mailitwindow.h @@ -35,2 +35,3 @@ class MailItWindow: public QMainWindow public: + static QString appName() { return QString::fromLatin1("mailit"); } MailItWindow(QWidget *parent = 0, const char *name = 0, WFlags fl = 0); diff --git a/noncore/net/mailit/main.cpp b/noncore/net/mailit/main.cpp index 3a3e1fc..71f8877 100644 --- a/noncore/net/mailit/main.cpp +++ b/noncore/net/mailit/main.cpp @@ -22,8 +22,4 @@ -int main(int argc, char* argv[]) -{ - QPEApplication a( argc, argv ); - MailItWindow mw(0, 0); - a.showMainDocumentWidget(&mw); - return a.exec(); -} +#include <opie/oapplicationfactory.h> + +OPIE_EXPORT_APP( OApplicationFactory<MailItWindow> )
\ No newline at end of file |