1 /* ============================================================
2  *
3  * This file is a part of digiKam project
4  * https://www.digikam.org
5  *
6  * Date        : 2010-04-26
7  * Description : database server error reporting
8  *
9  * Copyright (C) 2010 by Holger Foerster <Hamsi2k at freenet dot de>
10  * Copyright (C) 2016 by Swati Lodha <swatilodha27 at gmail dot com>
11  *
12  * This program is free software; you can redistribute it
13  * and/or modify it under the terms of the GNU General
14  * Public License as published by the Free Software Foundation;
15  * either version 2, or (at your option)
16  * any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21  * GNU General Public License for more details.
22  *
23  * ============================================================ */
24 
25 #include "databaseservererror.h"
26 
27 namespace Digikam
28 {
29 
DatabaseServerError(DatabaseServerErrorEnum errorType,const QString & errorText)30 DatabaseServerError::DatabaseServerError(DatabaseServerErrorEnum errorType, const QString& errorText)
31     : m_ErrorText(errorText),
32       m_ErrorType(errorType)
33 {
34 }
35 
DatabaseServerError(const DatabaseServerError & dbServerError)36 DatabaseServerError::DatabaseServerError(const DatabaseServerError& dbServerError)
37     : m_ErrorText(dbServerError.m_ErrorText),
38       m_ErrorType(dbServerError.m_ErrorType)
39 {
40 }
41 
~DatabaseServerError()42 DatabaseServerError::~DatabaseServerError()
43 {
44 }
45 
getErrorType() const46 int DatabaseServerError::getErrorType() const
47 {
48     return m_ErrorType;
49 }
50 
setErrorType(DatabaseServerErrorEnum errorType)51 void DatabaseServerError::setErrorType(DatabaseServerErrorEnum errorType)
52 {
53     m_ErrorType = errorType;
54 }
55 
getErrorText() const56 QString DatabaseServerError::getErrorText() const
57 {
58     return m_ErrorText;
59 }
setErrorText(const QString & errorText)60 void DatabaseServerError::setErrorText(const QString& errorText)
61 {
62     m_ErrorText = errorText;
63 }
64 
65 } // namespace Digikam
66