summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/mailit/addresslist.cpp16
-rw-r--r--noncore/net/mailit/addresslist.h16
-rw-r--r--noncore/net/mailit/emailclient.cpp7
-rw-r--r--noncore/net/mailit/emailclient.h2
-rw-r--r--noncore/net/mailit/emailhandler.cpp4
-rw-r--r--noncore/net/mailit/emailhandler.h4
-rw-r--r--noncore/net/mailit/emaillistitem.cpp0
-rw-r--r--noncore/net/mailit/popclient.cpp4
-rw-r--r--noncore/net/mailit/popclient.h4
-rw-r--r--noncore/net/mailit/smtpclient.cpp4
-rw-r--r--noncore/net/mailit/smtpclient.h4
-rw-r--r--noncore/net/mailit/textparser.cpp14
-rw-r--r--noncore/net/mailit/textparser.h6
-rw-r--r--noncore/unsupported/mailit/addresslist.cpp16
-rw-r--r--noncore/unsupported/mailit/addresslist.h16
-rw-r--r--noncore/unsupported/mailit/emailclient.cpp7
-rw-r--r--noncore/unsupported/mailit/emailclient.h2
-rw-r--r--noncore/unsupported/mailit/emailhandler.cpp4
-rw-r--r--noncore/unsupported/mailit/emailhandler.h4
-rw-r--r--noncore/unsupported/mailit/emaillistitem.cpp0
-rw-r--r--noncore/unsupported/mailit/popclient.cpp4
-rw-r--r--noncore/unsupported/mailit/popclient.h4
-rw-r--r--noncore/unsupported/mailit/smtpclient.cpp4
-rw-r--r--noncore/unsupported/mailit/smtpclient.h4
-rw-r--r--noncore/unsupported/mailit/textparser.cpp14
-rw-r--r--noncore/unsupported/mailit/textparser.h6
26 files changed, 86 insertions, 84 deletions
diff --git a/noncore/net/mailit/addresslist.cpp b/noncore/net/mailit/addresslist.cpp
index 7d60ebf..18d14bc 100644
--- a/noncore/net/mailit/addresslist.cpp
+++ b/noncore/net/mailit/addresslist.cpp
@@ -38,3 +38,3 @@ AddressList::~AddressList()
-void AddressList::addContact(QString email, QString name)
+void AddressList::addContact(const QString &email, const QString &name)
{
@@ -53,3 +53,3 @@ void AddressList::addContact(QString email, QString name)
-bool AddressList::containsEmail(QString email)
+bool AddressList::containsEmail(const QString &email)
{
@@ -58,3 +58,3 @@ bool AddressList::containsEmail(QString email)
-bool AddressList::containsName(QString name)
+bool AddressList::containsName(const QString &name)
{
@@ -63,3 +63,3 @@ bool AddressList::containsName(QString name)
-QString AddressList::getNameByEmail(QString email)
+QString AddressList::getNameByEmail(const QString &email)
{
@@ -74,3 +74,3 @@ QString AddressList::getNameByEmail(QString email)
-QString AddressList::getEmailByName(QString name)
+QString AddressList::getEmailByName(const QString &name)
{
@@ -85,3 +85,3 @@ QString AddressList::getEmailByName(QString name)
-int AddressList::getEmailRef(QString email)
+int AddressList::getEmailRef(const QString &email)
{
@@ -98,3 +98,3 @@ int AddressList::getEmailRef(QString email)
-int AddressList::getNameRef(QString name)
+int AddressList::getNameRef(const QString &name)
{
@@ -150,3 +150,3 @@ void AddressList::read()
-QString AddressList::getRightString(QString in)
+QString AddressList::getRightString(const QString &in)
{
diff --git a/noncore/net/mailit/addresslist.h b/noncore/net/mailit/addresslist.h
index 99cef9a..b46d467 100644
--- a/noncore/net/mailit/addresslist.h
+++ b/noncore/net/mailit/addresslist.h
@@ -38,7 +38,7 @@ public:
~AddressList();
- void addContact(QString email, QString name);
- bool containsEmail(QString email);
- bool containsName(QString name);
- QString getNameByEmail(QString email);
- QString getEmailByName(QString name);
+ void addContact(const QString &email, const QString &name);
+ bool containsEmail(const QString &email);
+ bool containsName(const QString &name);
+ QString getNameByEmail(const QString &email);
+ QString getEmailByName(const QString &name);
QList<Contact>* getContactList();
@@ -46,5 +46,5 @@ public:
private:
- int getEmailRef(QString email);
- int getNameRef(QString name);
- QString getRightString(QString in);
+ int getEmailRef(const QString &email);
+ int getNameRef(const QString &name);
+ QString getRightString(const QString &in);
void read();
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
@@ -468,4 +468,5 @@ void EmailClient::mailArrived(const Email &mail, bool fromDisk)
}
- if ((!found)||(fromDisk)) item = new EmailListItem(inboxView, newMail, TRUE);
-
+ if ((!found)||(fromDisk)) {
+ item = new EmailListItem(inboxView, newMail, TRUE);
+ }
if (item->getMail()->files.count()>0)
@@ -644,3 +645,3 @@ void EmailClient::readMail()
-void EmailClient::saveMail(QString fileName, QListView *view)
+void EmailClient::saveMail(const QString &fileName, QListView *view)
{
diff --git a/noncore/net/mailit/emailclient.h b/noncore/net/mailit/emailclient.h
index 994fec5..c98cfce 100644
--- a/noncore/net/mailit/emailclient.h
+++ b/noncore/net/mailit/emailclient.h
@@ -108,3 +108,3 @@ public slots:
void allMailArrived(int);
- void saveMail(QString fileName, QListView *view);
+ void saveMail(const QString &fileName, QListView *view);
void selectAccount(int);
diff --git a/noncore/net/mailit/emailhandler.cpp b/noncore/net/mailit/emailhandler.cpp
index 62fa64f..59ccd90 100644
--- a/noncore/net/mailit/emailhandler.cpp
+++ b/noncore/net/mailit/emailhandler.cpp
@@ -150,3 +150,3 @@ void EmailHandler::messageArrived(const QString &message, int id, uint size, boo
-bool EmailHandler::parse(QString in, QString lineShift, Email *mail)
+bool EmailHandler::parse(const QString &in, const QString &lineShift, Email *mail)
{
@@ -512,3 +512,3 @@ int EmailHandler::encodeMime(Email *mail)
-int EmailHandler::encodeFile(QString fileName, QString *toBody)
+int EmailHandler::encodeFile(const QString &fileName, QString *toBody)
{
diff --git a/noncore/net/mailit/emailhandler.h b/noncore/net/mailit/emailhandler.h
index 5b59f65..e4e7f46 100644
--- a/noncore/net/mailit/emailhandler.h
+++ b/noncore/net/mailit/emailhandler.h
@@ -119,3 +119,3 @@ public:
void getMailByList(MailList *mailList);
- bool parse(QString in, QString lineShift, Email *mail);
+ bool parse(const QString &in, const QString &lineShift, Email *mail);
bool getEnclosure(Enclosure *ePtr);
@@ -123,3 +123,3 @@ public:
int encodeMime(Email *mail);
- int encodeFile(QString fileName, QString *toBody);
+ int encodeFile(const QString &fileName, QString *toBody);
void encode64base(char *src, QString *dest, int len);
diff --git a/noncore/net/mailit/emaillistitem.cpp b/noncore/net/mailit/emaillistitem.cpp
index b925a1c..fc9f766 100644
--- a/noncore/net/mailit/emaillistitem.cpp
+++ b/noncore/net/mailit/emaillistitem.cpp
diff --git a/noncore/net/mailit/popclient.cpp b/noncore/net/mailit/popclient.cpp
index fedc4e2..dc0116d 100644
--- a/noncore/net/mailit/popclient.cpp
+++ b/noncore/net/mailit/popclient.cpp
@@ -52,3 +52,3 @@ PopClient::~PopClient()
-void PopClient::newConnection(QString target, int port)
+void PopClient::newConnection(const QString &target, int port)
{
@@ -68,3 +68,3 @@ void PopClient::newConnection(QString target, int port)
-void PopClient::setAccount(QString popUser, QString popPasswd)
+void PopClient::setAccount(const QString &popUser, const QString &popPasswd)
{
diff --git a/noncore/net/mailit/popclient.h b/noncore/net/mailit/popclient.h
index 10b71ab..c58bc48 100644
--- a/noncore/net/mailit/popclient.h
+++ b/noncore/net/mailit/popclient.h
@@ -37,4 +37,4 @@ public:
~PopClient();
- void newConnection(QString target, int port);
- void setAccount(QString popUser, QString popPasswd);
+ void newConnection(const QString &target, int port);
+ void setAccount(const QString &popUser, const QString &popPasswd);
void setSynchronize(int lastCount);
diff --git a/noncore/net/mailit/smtpclient.cpp b/noncore/net/mailit/smtpclient.cpp
index 8a51a5b..2916f45 100644
--- a/noncore/net/mailit/smtpclient.cpp
+++ b/noncore/net/mailit/smtpclient.cpp
@@ -41,3 +41,3 @@ SmtpClient::~SmtpClient()
-void SmtpClient::newConnection(QString target, int port)
+void SmtpClient::newConnection(const QString &target, int port)
{
@@ -55,3 +55,3 @@ void SmtpClient::newConnection(QString target, int port)
-void SmtpClient::addMail(QString from, QString subject, QStringList to, QString body)
+void SmtpClient::addMail(const QString &from, const QString &subject, const QStringList &to, const QString &body)
{
diff --git a/noncore/net/mailit/smtpclient.h b/noncore/net/mailit/smtpclient.h
index ca65af4..45c0703 100644
--- a/noncore/net/mailit/smtpclient.h
+++ b/noncore/net/mailit/smtpclient.h
@@ -45,4 +45,4 @@ public:
~SmtpClient();
- void newConnection(QString target, int port);
- void addMail(QString from, QString subject, QStringList to, QString body);
+ void newConnection(const QString &target, int port);
+ void addMail(const QString &from, const QString &subject, const QStringList &to, const QString &body);
diff --git a/noncore/net/mailit/textparser.cpp b/noncore/net/mailit/textparser.cpp
index 3fa5f6e..e5c9f7c 100644
--- a/noncore/net/mailit/textparser.cpp
+++ b/noncore/net/mailit/textparser.cpp
@@ -21,3 +21,3 @@
-TextParser::TextParser(QString in, QString lineBreak)
+TextParser::TextParser(const QString &in, const QString &lineBreak)
{
@@ -31,3 +31,3 @@ TextParser::TextParser(QString in, QString lineBreak)
-TextParser::TextParser(QString in, QString lineBreak, QString sep)
+TextParser::TextParser(const QString &in, const QString &lineBreak, const QString &sep)
{
@@ -62,3 +62,3 @@ void TextParser::createSeparators()
/* Returns pos of given search criteria, -1 if not found */
-int TextParser::find(QString target, QChar sep, int pos, bool upperCase)
+int TextParser::find(const QString &target, QChar sep, int pos, bool upperCase)
{
@@ -66,4 +66,4 @@ int TextParser::find(QString target, QChar sep, int pos, bool upperCase)
t_splitElm parsstr;
- QString pString;
-
+ QString pString, pTarget;
+ pTarget = target;
int atLine = 0, atPosElm = 0;
@@ -79,3 +79,3 @@ int TextParser::find(QString target, QChar sep, int pos, bool upperCase)
pString=parsstr.str.upper();
- target=target.upper();
+ pTarget=pTarget.upper();
}
@@ -85,3 +85,3 @@ int TextParser::find(QString target, QChar sep, int pos, bool upperCase)
}
- if ((pString == target) && (parsstr.separator == sep))
+ if ((pString == pTarget) && (parsstr.separator == sep))
{
diff --git a/noncore/net/mailit/textparser.h b/noncore/net/mailit/textparser.h
index c5e88a0..03bb6d5 100644
--- a/noncore/net/mailit/textparser.h
+++ b/noncore/net/mailit/textparser.h
@@ -51,5 +51,5 @@ class TextParser: public QObject
public:
- TextParser(QString in, QString lineBreak);
- TextParser(QString in, QString lineBreak, QString sep);
- int find(QString target, QChar sep, int pos, bool upperCase);
+ TextParser(const QString &in, const QString &lineBreak);
+ TextParser(const QString &in, const QString &lineBreak, const QString &sep);
+ int find(const QString &target, QChar sep, int pos, bool upperCase);
int elmCount();
diff --git a/noncore/unsupported/mailit/addresslist.cpp b/noncore/unsupported/mailit/addresslist.cpp
index 7d60ebf..18d14bc 100644
--- a/noncore/unsupported/mailit/addresslist.cpp
+++ b/noncore/unsupported/mailit/addresslist.cpp
@@ -38,3 +38,3 @@ AddressList::~AddressList()
-void AddressList::addContact(QString email, QString name)
+void AddressList::addContact(const QString &email, const QString &name)
{
@@ -53,3 +53,3 @@ void AddressList::addContact(QString email, QString name)
-bool AddressList::containsEmail(QString email)
+bool AddressList::containsEmail(const QString &email)
{
@@ -58,3 +58,3 @@ bool AddressList::containsEmail(QString email)
-bool AddressList::containsName(QString name)
+bool AddressList::containsName(const QString &name)
{
@@ -63,3 +63,3 @@ bool AddressList::containsName(QString name)
-QString AddressList::getNameByEmail(QString email)
+QString AddressList::getNameByEmail(const QString &email)
{
@@ -74,3 +74,3 @@ QString AddressList::getNameByEmail(QString email)
-QString AddressList::getEmailByName(QString name)
+QString AddressList::getEmailByName(const QString &name)
{
@@ -85,3 +85,3 @@ QString AddressList::getEmailByName(QString name)
-int AddressList::getEmailRef(QString email)
+int AddressList::getEmailRef(const QString &email)
{
@@ -98,3 +98,3 @@ int AddressList::getEmailRef(QString email)
-int AddressList::getNameRef(QString name)
+int AddressList::getNameRef(const QString &name)
{
@@ -150,3 +150,3 @@ void AddressList::read()
-QString AddressList::getRightString(QString in)
+QString AddressList::getRightString(const QString &in)
{
diff --git a/noncore/unsupported/mailit/addresslist.h b/noncore/unsupported/mailit/addresslist.h
index 99cef9a..b46d467 100644
--- a/noncore/unsupported/mailit/addresslist.h
+++ b/noncore/unsupported/mailit/addresslist.h
@@ -38,7 +38,7 @@ public:
~AddressList();
- void addContact(QString email, QString name);
- bool containsEmail(QString email);
- bool containsName(QString name);
- QString getNameByEmail(QString email);
- QString getEmailByName(QString name);
+ void addContact(const QString &email, const QString &name);
+ bool containsEmail(const QString &email);
+ bool containsName(const QString &name);
+ QString getNameByEmail(const QString &email);
+ QString getEmailByName(const QString &name);
QList<Contact>* getContactList();
@@ -46,5 +46,5 @@ public:
private:
- int getEmailRef(QString email);
- int getNameRef(QString name);
- QString getRightString(QString in);
+ int getEmailRef(const QString &email);
+ int getNameRef(const QString &name);
+ QString getRightString(const QString &in);
void read();
diff --git a/noncore/unsupported/mailit/emailclient.cpp b/noncore/unsupported/mailit/emailclient.cpp
index b039cc4..2102ba7 100644
--- a/noncore/unsupported/mailit/emailclient.cpp
+++ b/noncore/unsupported/mailit/emailclient.cpp
@@ -468,4 +468,5 @@ void EmailClient::mailArrived(const Email &mail, bool fromDisk)
}
- if ((!found)||(fromDisk)) item = new EmailListItem(inboxView, newMail, TRUE);
-
+ if ((!found)||(fromDisk)) {
+ item = new EmailListItem(inboxView, newMail, TRUE);
+ }
if (item->getMail()->files.count()>0)
@@ -644,3 +645,3 @@ void EmailClient::readMail()
-void EmailClient::saveMail(QString fileName, QListView *view)
+void EmailClient::saveMail(const QString &fileName, QListView *view)
{
diff --git a/noncore/unsupported/mailit/emailclient.h b/noncore/unsupported/mailit/emailclient.h
index 994fec5..c98cfce 100644
--- a/noncore/unsupported/mailit/emailclient.h
+++ b/noncore/unsupported/mailit/emailclient.h
@@ -108,3 +108,3 @@ public slots:
void allMailArrived(int);
- void saveMail(QString fileName, QListView *view);
+ void saveMail(const QString &fileName, QListView *view);
void selectAccount(int);
diff --git a/noncore/unsupported/mailit/emailhandler.cpp b/noncore/unsupported/mailit/emailhandler.cpp
index 62fa64f..59ccd90 100644
--- a/noncore/unsupported/mailit/emailhandler.cpp
+++ b/noncore/unsupported/mailit/emailhandler.cpp
@@ -150,3 +150,3 @@ void EmailHandler::messageArrived(const QString &message, int id, uint size, boo
-bool EmailHandler::parse(QString in, QString lineShift, Email *mail)
+bool EmailHandler::parse(const QString &in, const QString &lineShift, Email *mail)
{
@@ -512,3 +512,3 @@ int EmailHandler::encodeMime(Email *mail)
-int EmailHandler::encodeFile(QString fileName, QString *toBody)
+int EmailHandler::encodeFile(const QString &fileName, QString *toBody)
{
diff --git a/noncore/unsupported/mailit/emailhandler.h b/noncore/unsupported/mailit/emailhandler.h
index 5b59f65..e4e7f46 100644
--- a/noncore/unsupported/mailit/emailhandler.h
+++ b/noncore/unsupported/mailit/emailhandler.h
@@ -119,3 +119,3 @@ public:
void getMailByList(MailList *mailList);
- bool parse(QString in, QString lineShift, Email *mail);
+ bool parse(const QString &in, const QString &lineShift, Email *mail);
bool getEnclosure(Enclosure *ePtr);
@@ -123,3 +123,3 @@ public:
int encodeMime(Email *mail);
- int encodeFile(QString fileName, QString *toBody);
+ int encodeFile(const QString &fileName, QString *toBody);
void encode64base(char *src, QString *dest, int len);
diff --git a/noncore/unsupported/mailit/emaillistitem.cpp b/noncore/unsupported/mailit/emaillistitem.cpp
index b925a1c..fc9f766 100644
--- a/noncore/unsupported/mailit/emaillistitem.cpp
+++ b/noncore/unsupported/mailit/emaillistitem.cpp
diff --git a/noncore/unsupported/mailit/popclient.cpp b/noncore/unsupported/mailit/popclient.cpp
index fedc4e2..dc0116d 100644
--- a/noncore/unsupported/mailit/popclient.cpp
+++ b/noncore/unsupported/mailit/popclient.cpp
@@ -52,3 +52,3 @@ PopClient::~PopClient()
-void PopClient::newConnection(QString target, int port)
+void PopClient::newConnection(const QString &target, int port)
{
@@ -68,3 +68,3 @@ void PopClient::newConnection(QString target, int port)
-void PopClient::setAccount(QString popUser, QString popPasswd)
+void PopClient::setAccount(const QString &popUser, const QString &popPasswd)
{
diff --git a/noncore/unsupported/mailit/popclient.h b/noncore/unsupported/mailit/popclient.h
index 10b71ab..c58bc48 100644
--- a/noncore/unsupported/mailit/popclient.h
+++ b/noncore/unsupported/mailit/popclient.h
@@ -37,4 +37,4 @@ public:
~PopClient();
- void newConnection(QString target, int port);
- void setAccount(QString popUser, QString popPasswd);
+ void newConnection(const QString &target, int port);
+ void setAccount(const QString &popUser, const QString &popPasswd);
void setSynchronize(int lastCount);
diff --git a/noncore/unsupported/mailit/smtpclient.cpp b/noncore/unsupported/mailit/smtpclient.cpp
index 8a51a5b..2916f45 100644
--- a/noncore/unsupported/mailit/smtpclient.cpp
+++ b/noncore/unsupported/mailit/smtpclient.cpp
@@ -41,3 +41,3 @@ SmtpClient::~SmtpClient()
-void SmtpClient::newConnection(QString target, int port)
+void SmtpClient::newConnection(const QString &target, int port)
{
@@ -55,3 +55,3 @@ void SmtpClient::newConnection(QString target, int port)
-void SmtpClient::addMail(QString from, QString subject, QStringList to, QString body)
+void SmtpClient::addMail(const QString &from, const QString &subject, const QStringList &to, const QString &body)
{
diff --git a/noncore/unsupported/mailit/smtpclient.h b/noncore/unsupported/mailit/smtpclient.h
index ca65af4..45c0703 100644
--- a/noncore/unsupported/mailit/smtpclient.h
+++ b/noncore/unsupported/mailit/smtpclient.h
@@ -45,4 +45,4 @@ public:
~SmtpClient();
- void newConnection(QString target, int port);
- void addMail(QString from, QString subject, QStringList to, QString body);
+ void newConnection(const QString &target, int port);
+ void addMail(const QString &from, const QString &subject, const QStringList &to, const QString &body);
diff --git a/noncore/unsupported/mailit/textparser.cpp b/noncore/unsupported/mailit/textparser.cpp
index 3fa5f6e..e5c9f7c 100644
--- a/noncore/unsupported/mailit/textparser.cpp
+++ b/noncore/unsupported/mailit/textparser.cpp
@@ -21,3 +21,3 @@
-TextParser::TextParser(QString in, QString lineBreak)
+TextParser::TextParser(const QString &in, const QString &lineBreak)
{
@@ -31,3 +31,3 @@ TextParser::TextParser(QString in, QString lineBreak)
-TextParser::TextParser(QString in, QString lineBreak, QString sep)
+TextParser::TextParser(const QString &in, const QString &lineBreak, const QString &sep)
{
@@ -62,3 +62,3 @@ void TextParser::createSeparators()
/* Returns pos of given search criteria, -1 if not found */
-int TextParser::find(QString target, QChar sep, int pos, bool upperCase)
+int TextParser::find(const QString &target, QChar sep, int pos, bool upperCase)
{
@@ -66,4 +66,4 @@ int TextParser::find(QString target, QChar sep, int pos, bool upperCase)
t_splitElm parsstr;
- QString pString;
-
+ QString pString, pTarget;
+ pTarget = target;
int atLine = 0, atPosElm = 0;
@@ -79,3 +79,3 @@ int TextParser::find(QString target, QChar sep, int pos, bool upperCase)
pString=parsstr.str.upper();
- target=target.upper();
+ pTarget=pTarget.upper();
}
@@ -85,3 +85,3 @@ int TextParser::find(QString target, QChar sep, int pos, bool upperCase)
}
- if ((pString == target) && (parsstr.separator == sep))
+ if ((pString == pTarget) && (parsstr.separator == sep))
{
diff --git a/noncore/unsupported/mailit/textparser.h b/noncore/unsupported/mailit/textparser.h
index c5e88a0..03bb6d5 100644
--- a/noncore/unsupported/mailit/textparser.h
+++ b/noncore/unsupported/mailit/textparser.h
@@ -51,5 +51,5 @@ class TextParser: public QObject
public:
- TextParser(QString in, QString lineBreak);
- TextParser(QString in, QString lineBreak, QString sep);
- int find(QString target, QChar sep, int pos, bool upperCase);
+ TextParser(const QString &in, const QString &lineBreak);
+ TextParser(const QString &in, const QString &lineBreak, const QString &sep);
+ int find(const QString &target, QChar sep, int pos, bool upperCase);
int elmCount();