summaryrefslogtreecommitdiff
authoralwin <alwin>2004-01-07 00:08:02 (UTC)
committer alwin <alwin>2004-01-07 00:08:02 (UTC)
commita0ea0a96c91d95aa379a086238de18075ee5e4b5 (patch) (side-by-side diff)
tree8f4f558d6cc00675cd4584fe82c24ab59638a1ea
parenta545ea9b957c14bdf9d8aa20e64457b64841ce7f (diff)
downloadopie-a0ea0a96c91d95aa379a086238de18075ee5e4b5.zip
opie-a0ea0a96c91d95aa379a086238de18075ee5e4b5.tar.gz
opie-a0ea0a96c91d95aa379a086238de18075ee5e4b5.tar.bz2
why didn't them have any destructor?
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/mainwindow.cpp5
-rw-r--r--noncore/net/mail/mainwindow.h1
-rw-r--r--noncore/net/mail/opiemail.cpp5
-rw-r--r--noncore/net/mail/opiemail.h1
4 files changed, 11 insertions, 1 deletions
diff --git a/noncore/net/mail/mainwindow.cpp b/noncore/net/mail/mainwindow.cpp
index d2e887b..e16f853 100644
--- a/noncore/net/mail/mainwindow.cpp
+++ b/noncore/net/mail/mainwindow.cpp
@@ -72,25 +72,25 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
deleteMails = new QAction(tr("Delete Mail"), QIconSet( Resource::loadPixmap("trash")), 0, 0, this);
deleteMails->addTo( toolBar );
deleteMails->addTo( mailMenu );
connect( deleteMails, SIGNAL( activated() ),
SLOT( slotDeleteMail() ) );
editSettings = new QAction( tr( "Edit settings" ), QIconSet( Resource::loadPixmap("SettingsIcon") ) ,
0, 0, this );
editSettings->addTo( settingsMenu );
connect( editSettings, SIGNAL( activated() ),
SLOT( slotEditSettings() ) );
- editAccounts = new QAction( tr( "Configure accounts" ), QIconSet( Resource::loadPixmap("SettingsIcon") ) ,
+ editAccounts = new QAction( tr( "Configure accounts" ), QIconSet( Resource::loadPixmap("mail/editaccounts") ) ,
0, 0, this );
editAccounts->addTo( settingsMenu );
//setCentralWidget( view );
QVBox* wrapperBox = new QVBox( this );
setCentralWidget( wrapperBox );
QWidget *view = new QWidget( wrapperBox );
layout = new QBoxLayout ( view, QBoxLayout::LeftToRight );
@@ -122,24 +122,27 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
QPEApplication::setStylusOperation( mailView->viewport(),QPEApplication::RightOnHold);
QPEApplication::setStylusOperation( folderView->viewport(),QPEApplication::RightOnHold);
connect( mailView, SIGNAL( mouseButtonClicked(int, QListViewItem *,const QPoint&,int ) ),this,
SLOT( mailLeftClicked( int, QListViewItem *,const QPoint&,int ) ) );
connect( mailView, SIGNAL( mouseButtonPressed(int, QListViewItem *,const QPoint&,int ) ),this,
SLOT( mailHold( int, QListViewItem *,const QPoint&,int ) ) );
connect(folderView, SIGNAL(refreshMailview(QList<RecMail>*)),this,SLOT(refreshMailView(QList<RecMail>*)));
QTimer::singleShot( 1000, this, SLOT( slotAdjustColumns() ) );
}
+MainWindow::~MainWindow()
+{
+}
void MainWindow::slotAdjustLayout() {
QWidget *d = QApplication::desktop();
if ( d->width() < d->height() ) {
layout->setDirection( QBoxLayout::TopToBottom );
} else {
layout->setDirection( QBoxLayout::LeftToRight );
}
}
diff --git a/noncore/net/mail/mainwindow.h b/noncore/net/mail/mainwindow.h
index 0e077f6..15d216a 100644
--- a/noncore/net/mail/mainwindow.h
+++ b/noncore/net/mail/mainwindow.h
@@ -10,24 +10,25 @@
#include "accountview.h"
#include "statuswidget.h"
class RecMail;
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow( QWidget *parent = 0, const char *name = 0, WFlags flags = 0 );
+ virtual ~MainWindow();
public slots:
virtual void slotAdjustColumns();
protected slots:
virtual void slotShowFolders( bool show );
virtual void refreshMailView(QList<RecMail>*);
virtual void displayMail();
virtual void slotDeleteMail();
virtual void mailHold(int, QListViewItem *,const QPoint&,int);
virtual void slotAdjustLayout();
virtual void slotEditSettings();
diff --git a/noncore/net/mail/opiemail.cpp b/noncore/net/mail/opiemail.cpp
index fcd48e2..c888708 100644
--- a/noncore/net/mail/opiemail.cpp
+++ b/noncore/net/mail/opiemail.cpp
@@ -21,24 +21,29 @@ OpieMail::OpieMail( QWidget *parent, const char *name, WFlags flags )
connect( editAccounts, SIGNAL( activated() ), SLOT( slotEditAccounts() ) );
// Added by Stefan Eilers to allow starting by addressbook..
// copied from old mail2
#if !defined(QT_NO_COP)
connect( qApp, SIGNAL( appMessage( const QCString&, const QByteArray& ) ),
this, SLOT( appMessage( const QCString&, const QByteArray& ) ) );
#endif
}
+OpieMail::~OpieMail()
+{
+ if (settings) delete settings;
+}
+
void OpieMail::appMessage(const QCString &msg, const QByteArray &data)
{
// copied from old mail2
if (msg == "writeMail(QString,QString)") {
QDataStream stream(data,IO_ReadOnly);
QString name, email;
stream >> name >> email;
// removing the whitespaces at beginning and end is needed!
slotwriteMail(name.stripWhiteSpace(),email.stripWhiteSpace());
} else if (msg == "newMail()") {
slotComposeMail();
}
diff --git a/noncore/net/mail/opiemail.h b/noncore/net/mail/opiemail.h
index ebed5d8..69b8d43 100644
--- a/noncore/net/mail/opiemail.h
+++ b/noncore/net/mail/opiemail.h
@@ -2,24 +2,25 @@
#define OPIEMAIL_H
#include "mainwindow.h"
#include <libmailwrapper/settings.h>
class OpieMail : public MainWindow
{
Q_OBJECT
public:
OpieMail( QWidget *parent = 0, const char *name = 0, WFlags flags = 0 );
+ virtual ~OpieMail();
static QString appName() { return QString::fromLatin1("opiemail"); }
public slots:
virtual void slotwriteMail(const QString&name,const QString&email);
virtual void slotComposeMail();
virtual void appMessage(const QCString &msg, const QByteArray &data);
protected slots:
virtual void slotSendQueued();
virtual void slotSearchMails();
virtual void slotEditSettings();
virtual void slotEditAccounts();
private: