Skip to content

Commit da0d09f

Browse files
committed
Merge branch 'mxydls-master'
2 parents 219ec72 + 48f27f5 commit da0d09f

File tree

9 files changed

+542
-24
lines changed

9 files changed

+542
-24
lines changed

Exception/MailClientException.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#ifndef MAILCLIENTEXCEPTION_H
2+
#define MAILCLIENTEXCEPTION_H
3+
#include <qstring.h>
4+
#include <exception>
5+
#include <iostream>
6+
using namespace std;
7+
8+
class MailClientException: public exception
9+
{
10+
public:
11+
MailClientException() {}
12+
MailClientException(const string& exc): exception(exc.c_str()) {}
13+
MailClientException(const MailClientException& mce): exception(mce) {}
14+
virtual ~MailClientException() throw() = 0;
15+
virtual const char* what() const = 0;
16+
};
17+
18+
MailClientException::~exception() {}
19+
20+
#endif // MAILCLIENTEXCEPTION_H
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#ifndef MAILGENERATIONEXCEPTION_H
2+
#define MAILGENERATIONEXCEPTION_H
3+
#include "MailClientException.h"
4+
5+
class MailGenerationException: public MailClientException
6+
{
7+
public:
8+
MailGenerationException() {}
9+
MailGenerationException(const string& exc): MailClientException(exc.c_str()) {}
10+
MailClientException(const MailClientException& mce): MailClientException(mce) {}
11+
~MailGenerationException() override {}
12+
const char* what() const override{
13+
string tmp = MailClientException::what();
14+
tmp = "MailGenerationException: " + tmp;
15+
return tmp.c_str();
16+
}
17+
};
18+
19+
#endif // MAILGENERATIONEXCEPTION_H

Exception/MailReceiveException.h

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#ifndef MAILRECEIVEEXCEPTION_H
2+
#define MAILRECEIVEEXCEPTION_H
3+
#include "MailClientException.h"
4+
5+
class MailReceiveException: public MailClientException
6+
{
7+
public:
8+
MailReceiveException() {}
9+
MailReceiveException(const string& exc): MailClientException(exc.c_str()) {}
10+
MailClientException(const MailClientException& mce): MailClientException(mce) {}
11+
~MailReceiveException() override {}
12+
const char* what() const override{
13+
string tmp = MailClientException::what();
14+
tmp = "MailGenerationException: " + tmp;
15+
return tmp.c_str();
16+
}
17+
};
18+
19+
#endif // MAILRECEIVEEXCEPTION_H

Exception/MailSendException.h

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#ifndef MAILSENDEXCEPTION_H
2+
#define MAILSENDEXCEPTION_H
3+
#include "MailClientException.h"
4+
5+
class MailSendException: public MailClientException
6+
{
7+
public:
8+
MailSendException() {}
9+
MailSendException(const string& exc): MailClientException(exc.c_str()) {}
10+
MailClientException(const MailClientException& mce): MailClientException(mce) {}
11+
~MailSendException() override {}
12+
const char* what() const override{
13+
string tmp = MailClientException::what();
14+
tmp = "MailGenerationException: " + tmp;
15+
return tmp.c_str();
16+
}
17+
};
18+
19+
#endif // MAILSENDEXCEPTION_H

MicroMailClient.pro

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ RESOURCES += qml.qrc
1919

2020
POCOHOME = "C:\Users\37567\Documents\Visual Studio 2015\Projects\MicroMailClient-QT\PocoLib"
2121

22-
INCLUDEPATH += "$${POCOHOME}\include"
22+
INCLUDEPATH += "E:\oopProject\pocolib-all\include"
2323

24-
LIBS += -L"$${POCOHOME}\lib"
24+
LIBS += -L"E:\oopProject\pocolib-all\lib" -lPocoFoundationd
2525

2626
# Default rules for deployment.
2727

@@ -37,4 +37,8 @@ HEADERS += \
3737
Model/Utils.h \
3838
Model/IMAPClientSession.h \
3939
Model/ReceiveMailClient.h \
40-
Model/SendMailClient.h
40+
Model/SendMailClient.h \
41+
Exception/MailClientException.h \
42+
Exception/MailGenerationException.h \
43+
Exception/MailSendException.h \
44+
Exception/MailReceiveException.h

MicroMailClient.pro.user

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!DOCTYPE QtCreatorProject>
3-
<!-- Written by QtCreator 3.6.1, 2016-05-27T18:55:56. -->
3+
<!-- Written by QtCreator 3.6.1, 2016-05-27T22:41:34. -->
44
<qtcreator>
55
<data>
66
<variable>EnvironmentId</variable>
7-
<value type="QByteArray">{7ea379e5-639c-4adc-8f9b-81df050fc799}</value>
7+
<value type="QByteArray">{916d799b-1ce3-478c-b507-0ee73d6d1b4b}</value>
88
</data>
99
<data>
1010
<variable>ProjectExplorer.Project.ActiveTarget</variable>
@@ -58,14 +58,14 @@
5858
<data>
5959
<variable>ProjectExplorer.Project.Target.0</variable>
6060
<valuemap type="QVariantMap">
61-
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.6.0 MSVC2015 32bit</value>
62-
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.6.0 MSVC2015 32bit</value>
63-
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.56.win32_msvc2015_kit</value>
61+
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">msvc2015</value>
62+
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">msvc2015</value>
63+
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{c0635a7f-7896-4ebf-8f09-cff414b52bfc}</value>
6464
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
6565
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
6666
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
6767
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
68-
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">C:/Users/37567/Documents/Visual Studio 2015/Projects/MicroMailClient-QT/build-MicroMailClient-Desktop_Qt_5_6_0_MSVC2015_32bit-Debug</value>
68+
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">E:/oopProject/oopGit/build-MicroMailClient-msvc2015-Debug</value>
6969
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
7070
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
7171
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
@@ -89,7 +89,7 @@
8989
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
9090
</valuemap>
9191
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
92-
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
92+
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">构建</value>
9393
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
9494
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
9595
</valuemap>
@@ -105,7 +105,7 @@
105105
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
106106
</valuemap>
107107
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
108-
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
108+
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">清理</value>
109109
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
110110
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
111111
</valuemap>
@@ -119,7 +119,7 @@
119119
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
120120
</valuemap>
121121
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
122-
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">C:/Users/37567/Documents/Visual Studio 2015/Projects/MicroMailClient-QT/build-MicroMailClient-Desktop_Qt_5_6_0_MSVC2015_32bit-Release</value>
122+
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">E:/oopProject/oopGit/build-MicroMailClient-msvc2015-Release</value>
123123
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
124124
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
125125
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
@@ -143,7 +143,7 @@
143143
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
144144
</valuemap>
145145
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
146-
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
146+
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">构建</value>
147147
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
148148
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
149149
</valuemap>
@@ -159,7 +159,7 @@
159159
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
160160
</valuemap>
161161
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
162-
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
162+
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">清理</value>
163163
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
164164
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
165165
</valuemap>
@@ -173,7 +173,7 @@
173173
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
174174
</valuemap>
175175
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
176-
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">C:/Users/37567/Documents/Visual Studio 2015/Projects/MicroMailClient-QT/build-MicroMailClient-Desktop_Qt_5_6_0_MSVC2015_32bit-Profile</value>
176+
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">E:/oopProject/oopGit/build-MicroMailClient-msvc2015-Profile</value>
177177
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
178178
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
179179
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
@@ -197,7 +197,7 @@
197197
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
198198
</valuemap>
199199
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
200-
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
200+
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">构建</value>
201201
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
202202
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
203203
</valuemap>
@@ -213,7 +213,7 @@
213213
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
214214
</valuemap>
215215
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
216-
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
216+
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">清理</value>
217217
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
218218
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
219219
</valuemap>
@@ -230,12 +230,12 @@
230230
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
231231
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
232232
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
233-
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
233+
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">部署</value>
234234
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
235235
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
236236
</valuemap>
237237
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
238-
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy locally</value>
238+
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">在本地部署</value>
239239
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
240240
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
241241
</valuemap>
@@ -284,7 +284,7 @@
284284
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
285285
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">MicroMailClient</value>
286286
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
287-
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:C:/Users/37567/Documents/Visual Studio 2015/Projects/MicroMailClient-QT/MicroMailClient/MicroMailClient.pro</value>
287+
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:E:/oopProject/oopGit/MicroMailClient/MicroMailClient.pro</value>
288288
<value type="bool" key="QmakeProjectManager.QmakeRunConfiguration.UseLibrarySearchPath">true</value>
289289
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value>
290290
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">MicroMailClient.pro</value>

0 commit comments

Comments
 (0)