summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mailit/addresslist.cpp16
-rw-r--r--noncore/net/mailit/addresslist.h6
-rw-r--r--noncore/net/mailit/writemail.cpp4
-rw-r--r--noncore/unsupported/mailit/addresslist.cpp16
-rw-r--r--noncore/unsupported/mailit/addresslist.h6
-rw-r--r--noncore/unsupported/mailit/writemail.cpp4
6 files changed, 26 insertions, 26 deletions
diff --git a/noncore/net/mailit/addresslist.cpp b/noncore/net/mailit/addresslist.cpp
index 18d14bc..f2b027c 100644
--- a/noncore/net/mailit/addresslist.cpp
+++ b/noncore/net/mailit/addresslist.cpp
@@ -42,9 +42,9 @@ void AddressList::addContact(const QString &email, const QString &name)
if (email.find( '@') == -1)
return;
if ( ! containsEmail(email) ) {
- Contact *in = new Contact;
+ AContact *in = new AContact;
in->email = email;
in->name = name;
addresses.append(in);
dirty = TRUE;
@@ -64,30 +64,30 @@ bool AddressList::containsName(const QString &name)
QString AddressList::getNameByEmail(const QString &email)
{
int pos = getEmailRef(email);
if (pos != -1) {
- Contact *ptr = addresses.at(pos);
+ AContact *ptr = addresses.at(pos);
return ptr->name;
}
- return NULL;
+ return QString::null;
}
QString AddressList::getEmailByName(const QString &name)
{
int pos = getNameRef(name);
if (pos != -1) {
- Contact *ptr = addresses.at(pos);
+ AContact *ptr = addresses.at(pos);
return ptr->email;
}
- return NULL;
+ return QString::null;
}
int AddressList::getEmailRef(const QString &email)
{
int pos = 0;
- Contact *ptr;
+ AContact *ptr;
for (ptr = addresses.first(); ptr != 0; ptr = addresses.next() ) {
if (ptr->email == email)
return pos;
@@ -98,9 +98,9 @@ int AddressList::getEmailRef(const QString &email)
int AddressList::getNameRef(const QString &name)
{
int pos = 0;
- Contact *ptr;
+ AContact *ptr;
for (ptr = addresses.first(); ptr != 0; ptr = addresses.next() ) {
if (ptr->name == name)
return pos;
@@ -108,9 +108,9 @@ int AddressList::getNameRef(const QString &name)
}
return -1;
}
-QList<Contact>* AddressList::getContactList()
+QList<AContact>* AddressList::getContactList()
{
return &addresses;
}
diff --git a/noncore/net/mailit/addresslist.h b/noncore/net/mailit/addresslist.h
index b46d467..763b6d4 100644
--- a/noncore/net/mailit/addresslist.h
+++ b/noncore/net/mailit/addresslist.h
@@ -22,9 +22,9 @@
#include <qobject.h>
#include <qlist.h>
-struct Contact
+struct AContact
{
QString email;
QString name;
};
@@ -40,18 +40,18 @@ public:
bool containsEmail(const QString &email);
bool containsName(const QString &name);
QString getNameByEmail(const QString &email);
QString getEmailByName(const QString &name);
- QList<Contact>* getContactList();
+ QList<AContact>* getContactList();
private:
int getEmailRef(const QString &email);
int getNameRef(const QString &name);
QString getRightString(const QString &in);
void read();
private:
- QList<Contact> addresses;
+ QList<AContact> addresses;
QString filename;
bool dirty;
};
diff --git a/noncore/net/mailit/writemail.cpp b/noncore/net/mailit/writemail.cpp
index c75494e..0298cb3 100644
--- a/noncore/net/mailit/writemail.cpp
+++ b/noncore/net/mailit/writemail.cpp
@@ -36,14 +36,14 @@ WriteMail::~WriteMail()
}
void WriteMail::setAddressList(AddressList *list)
{
- Contact *cPtr;
+ AContact *cPtr;
addressList = list;
addressView->clear();
- QList<Contact> *cListPtr = addressList->getContactList();
+ QList<AContact> *cListPtr = addressList->getContactList();
QListViewItem *item;
for (cPtr = cListPtr->first(); cPtr != 0; cPtr = cListPtr->next() ) {
item = new QListViewItem(addressView, cPtr->name, cPtr->email);
}
diff --git a/noncore/unsupported/mailit/addresslist.cpp b/noncore/unsupported/mailit/addresslist.cpp
index 18d14bc..f2b027c 100644
--- a/noncore/unsupported/mailit/addresslist.cpp
+++ b/noncore/unsupported/mailit/addresslist.cpp
@@ -42,9 +42,9 @@ void AddressList::addContact(const QString &email, const QString &name)
if (email.find( '@') == -1)
return;
if ( ! containsEmail(email) ) {
- Contact *in = new Contact;
+ AContact *in = new AContact;
in->email = email;
in->name = name;
addresses.append(in);
dirty = TRUE;
@@ -64,30 +64,30 @@ bool AddressList::containsName(const QString &name)
QString AddressList::getNameByEmail(const QString &email)
{
int pos = getEmailRef(email);
if (pos != -1) {
- Contact *ptr = addresses.at(pos);
+ AContact *ptr = addresses.at(pos);
return ptr->name;
}
- return NULL;
+ return QString::null;
}
QString AddressList::getEmailByName(const QString &name)
{
int pos = getNameRef(name);
if (pos != -1) {
- Contact *ptr = addresses.at(pos);
+ AContact *ptr = addresses.at(pos);
return ptr->email;
}
- return NULL;
+ return QString::null;
}
int AddressList::getEmailRef(const QString &email)
{
int pos = 0;
- Contact *ptr;
+ AContact *ptr;
for (ptr = addresses.first(); ptr != 0; ptr = addresses.next() ) {
if (ptr->email == email)
return pos;
@@ -98,9 +98,9 @@ int AddressList::getEmailRef(const QString &email)
int AddressList::getNameRef(const QString &name)
{
int pos = 0;
- Contact *ptr;
+ AContact *ptr;
for (ptr = addresses.first(); ptr != 0; ptr = addresses.next() ) {
if (ptr->name == name)
return pos;
@@ -108,9 +108,9 @@ int AddressList::getNameRef(const QString &name)
}
return -1;
}
-QList<Contact>* AddressList::getContactList()
+QList<AContact>* AddressList::getContactList()
{
return &addresses;
}
diff --git a/noncore/unsupported/mailit/addresslist.h b/noncore/unsupported/mailit/addresslist.h
index b46d467..763b6d4 100644
--- a/noncore/unsupported/mailit/addresslist.h
+++ b/noncore/unsupported/mailit/addresslist.h
@@ -22,9 +22,9 @@
#include <qobject.h>
#include <qlist.h>
-struct Contact
+struct AContact
{
QString email;
QString name;
};
@@ -40,18 +40,18 @@ public:
bool containsEmail(const QString &email);
bool containsName(const QString &name);
QString getNameByEmail(const QString &email);
QString getEmailByName(const QString &name);
- QList<Contact>* getContactList();
+ QList<AContact>* getContactList();
private:
int getEmailRef(const QString &email);
int getNameRef(const QString &name);
QString getRightString(const QString &in);
void read();
private:
- QList<Contact> addresses;
+ QList<AContact> addresses;
QString filename;
bool dirty;
};
diff --git a/noncore/unsupported/mailit/writemail.cpp b/noncore/unsupported/mailit/writemail.cpp
index c75494e..0298cb3 100644
--- a/noncore/unsupported/mailit/writemail.cpp
+++ b/noncore/unsupported/mailit/writemail.cpp
@@ -36,14 +36,14 @@ WriteMail::~WriteMail()
}
void WriteMail::setAddressList(AddressList *list)
{
- Contact *cPtr;
+ AContact *cPtr;
addressList = list;
addressView->clear();
- QList<Contact> *cListPtr = addressList->getContactList();
+ QList<AContact> *cListPtr = addressList->getContactList();
QListViewItem *item;
for (cPtr = cListPtr->first(); cPtr != 0; cPtr = cListPtr->next() ) {
item = new QListViewItem(addressView, cPtr->name, cPtr->email);
}