Commit 5efeefbd authored by Laurent Montel's avatar Laurent Montel 😁

Create a job for creating folder

parent 97872036
......@@ -18,6 +18,7 @@ set(imapfoldercompletionplugin_SRCS
selectimapfoldermodel.cpp
selectimaplineedit.cpp
selectimaplineeditcompletermodel.cpp
selectimapcreatejob.cpp
${sieveeditor_plugin_categories_SRCS}
)
......
......@@ -12,3 +12,4 @@ add_sieveeditorplugin_unittest(selectimapfolderdialogtest.cpp "../selectimapline
add_sieveeditorplugin_unittest(selectimapfolderwidgettest.cpp "../selectimaplineedit.cpp;../selectimaplineeditcompletermodel.cpp;../selectimapfolderwidget.cpp;../selectitemfolderjob.cpp;../selectimapfoldermodel.cpp")
add_sieveeditorplugin_unittest(selectimapwidgettest.cpp "../selectimaplineedit.cpp;../selectimaplineeditcompletermodel.cpp;../selectimapwidget.cpp;../selectimapfolderdialog.cpp;../selectimapfolderwidget.cpp;../selectitemfolderjob.cpp;../selectimapfoldermodel.cpp")
add_sieveeditorplugin_unittest(selectimapfoldermodeltest.cpp "../selectimapfoldermodel.cpp;../selectitemfolderjob.cpp")
add_sieveeditorplugin_unittest(selectimapcreatejobtest.cpp "../selectimapcreatejob.cpp")
/*
Copyright (C) 2017 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 as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
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; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "selectimapcreatejobtest.h"
#include <QTest>
SelectImapCreateJobTest::SelectImapCreateJobTest(QObject *parent) : QObject(parent)
{
}
SelectImapCreateJobTest::~SelectImapCreateJobTest()
{
}
QTEST_MAIN(SelectImapCreateJobTest)
/*
Copyright (C) 2017 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 as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
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; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef SELECTIMAPCREATEJOBTEST_H
#define SELECTIMAPCREATEJOBTEST_H
#include <QObject>
class SelectImapCreateJobTest : public QObject
{
Q_OBJECT
public:
explicit SelectImapCreateJobTest(QObject *parent = nullptr);
~SelectImapCreateJobTest();
};
#endif // SELECTIMAPCREATEJOBTEST_H
/*
Copyright (C) 2017 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 as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
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; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "selectimapcreatejob.h"
SelectImapCreateJob::SelectImapCreateJob(QObject *parent)
: QObject(parent)
{
}
SelectImapCreateJob::~SelectImapCreateJob()
{
}
void SelectImapCreateJob::start()
{
}
/*
Copyright (C) 2017 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 as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
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; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef SELECTIMAPCREATEJOB_H
#define SELECTIMAPCREATEJOB_H
#include <QObject>
class SelectImapCreateJob : public QObject
{
Q_OBJECT
public:
explicit SelectImapCreateJob(QObject *parent = nullptr);
~SelectImapCreateJob();
void start();
};
#endif // SELECTIMAPCREATEJOB_H
......@@ -123,6 +123,7 @@ void SelectImapFolderWidget::createFolder()
if (!name.trimmed().isEmpty()) {
//TODO more check for folder name ?
//TODO create it
SelectImapFolderModel::self()->createNewFolder(name);
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment