parent
42fb83114b
commit
79745eede9
10 changed files with 190 additions and 22 deletions
@ -0,0 +1,19 @@ |
||||
set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}) |
||||
include_directories( |
||||
BEFORE |
||||
${CMAKE_SOURCE_DIR}/kmail |
||||
${CMAKE_BINARY_DIR}/kmail |
||||
) |
||||
|
||||
set( kmail_migratekmail4configtest_source kmmigratekmail4configtest.cpp ../kmmigratekmail4config.cpp ../migrateinfo.cpp) |
||||
add_executable(migratekmail4configtest ${kmail_migratekmail4configtest_source}) |
||||
ecm_mark_as_test(kmail-migratekmail4configtest) |
||||
target_link_libraries( migratekmail4configtest Qt5::Test ) |
||||
|
||||
|
||||
|
||||
set( kmail_migrateinfotest_source migrateinfotest.cpp ../migrateinfo.cpp) |
||||
add_executable(migrateinfotest ${kmail_migrateinfotest_source}) |
||||
ecm_mark_as_test(kmail-migrateinfotest) |
||||
target_link_libraries( migrateinfotest Qt5::Test ) |
||||
|
||||
@ -0,0 +1,31 @@ |
||||
/*
|
||||
Copyright (c) 2015 Montel Laurent <montel@kde.org> |
||||
|
||||
This program is free software; you can redistribute it and/or modify it |
||||
under the terms of the GNU General Public License, version 2, as |
||||
published by the Free Software Foundation. |
||||
|
||||
This program is distributed in the hope that it will be useful, but |
||||
WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
||||
General Public License for more details. |
||||
|
||||
You should have received a copy of the GNU General Public License along |
||||
with this program; if not, write to the Free Software Foundation, Inc., |
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
||||
*/ |
||||
|
||||
#include "migrateinfotest.h" |
||||
#include <qtest.h> |
||||
|
||||
MigrateInfoTest::MigrateInfoTest(QObject *parent) |
||||
{ |
||||
|
||||
} |
||||
|
||||
MigrateInfoTest::~MigrateInfoTest() |
||||
{ |
||||
|
||||
} |
||||
|
||||
QTEST_MAIN(MigrateInfoTest) |
||||
@ -0,0 +1,31 @@ |
||||
/*
|
||||
Copyright (c) 2015 Montel Laurent <montel@kde.org> |
||||
|
||||
This program is free software; you can redistribute it and/or modify it |
||||
under the terms of the GNU General Public License, version 2, as |
||||
published by the Free Software Foundation. |
||||
|
||||
This program is distributed in the hope that it will be useful, but |
||||
WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
||||
General Public License for more details. |
||||
|
||||
You should have received a copy of the GNU General Public License along |
||||
with this program; if not, write to the Free Software Foundation, Inc., |
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
||||
*/ |
||||
|
||||
#ifndef MIGRATEINFOTEST_H |
||||
#define MIGRATEINFOTEST_H |
||||
|
||||
#include <QObject> |
||||
|
||||
class MigrateInfoTest : public QObject |
||||
{ |
||||
Q_OBJECT |
||||
public: |
||||
explicit MigrateInfoTest(QObject *parent = Q_NULLPTR); |
||||
~MigrateInfoTest(); |
||||
}; |
||||
|
||||
#endif // MIGRATEINFOTEST_H
|
||||
@ -0,0 +1,58 @@ |
||||
/*
|
||||
Copyright (c) 2015 Montel Laurent <montel@kde.org> |
||||
|
||||
This program is free software; you can redistribute it and/or modify it |
||||
under the terms of the GNU General Public License, version 2, as |
||||
published by the Free Software Foundation. |
||||
|
||||
This program is distributed in the hope that it will be useful, but |
||||
WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
||||
General Public License for more details. |
||||
|
||||
You should have received a copy of the GNU General Public License along |
||||
with this program; if not, write to the Free Software Foundation, Inc., |
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
||||
*/ |
||||
|
||||
#include "migrateinfo.h" |
||||
|
||||
MigrateInfo::MigrateInfo() |
||||
: mFolder(false) |
||||
{ |
||||
|
||||
} |
||||
|
||||
QString MigrateInfo::type() const |
||||
{ |
||||
return mType; |
||||
} |
||||
|
||||
void MigrateInfo::setType(const QString &type) |
||||
{ |
||||
mType = type; |
||||
} |
||||
|
||||
QString MigrateInfo::path() const |
||||
{ |
||||
return mPath; |
||||
} |
||||
|
||||
void MigrateInfo::setPath(const QString &path) |
||||
{ |
||||
mPath = path; |
||||
} |
||||
|
||||
bool MigrateInfo::folder() const |
||||
{ |
||||
return mFolder; |
||||
} |
||||
|
||||
void MigrateInfo::setFolder(bool folder) |
||||
{ |
||||
mFolder = folder; |
||||
} |
||||
|
||||
|
||||
|
||||
|
||||
@ -0,0 +1,43 @@ |
||||
/*
|
||||
Copyright (c) 2015 Montel Laurent <montel@kde.org> |
||||
|
||||
This program is free software; you can redistribute it and/or modify it |
||||
under the terms of the GNU General Public License, version 2, as |
||||
published by the Free Software Foundation. |
||||
|
||||
This program is distributed in the hope that it will be useful, but |
||||
WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
||||
General Public License for more details. |
||||
|
||||
You should have received a copy of the GNU General Public License along |
||||
with this program; if not, write to the Free Software Foundation, Inc., |
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
||||
*/ |
||||
|
||||
#ifndef MIGRATEINFO_H |
||||
#define MIGRATEINFO_H |
||||
|
||||
#include <QString> |
||||
|
||||
class MigrateInfo |
||||
{ |
||||
public: |
||||
MigrateInfo(); |
||||
|
||||
QString type() const; |
||||
void setType(const QString &type); |
||||
|
||||
QString path() const; |
||||
void setPath(const QString &path); |
||||
|
||||
bool folder() const; |
||||
void setFolder(bool folder); |
||||
|
||||
private: |
||||
QString mType; |
||||
QString mPath; |
||||
bool mFolder; |
||||
}; |
||||
|
||||
#endif // MIGRATEINFO_H
|
||||
Loading…
Reference in new issue