Commit 6902f282 authored by Laurent Montel's avatar Laurent Montel 😁

Add test for dnd attachment

parent f3fc07dd
......@@ -40,3 +40,13 @@ add_executable(testmailwebengineselection ${testmailwebengineselection_test_SRCS
target_link_libraries(testmailwebengineselection
Qt5::Widgets KF5::WebEngineViewer Qt5::WebEngine Qt5::WebEngineWidgets KF5::XmlGui KF5::IconThemes KF5::MessageViewer
)
######
set(testmaildndattachment_test_SRCS
testmaildndattachment.cpp
)
add_executable(testmaildndattachment ${testmaildndattachment_test_SRCS})
target_link_libraries(testmaildndattachment
Qt5::Widgets KF5::WebEngineViewer Qt5::WebEngine Qt5::WebEngineWidgets KF5::XmlGui KF5::IconThemes KF5::MessageViewer
)
/*
Copyright (c) 2016 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 "testmaildndattachment.h"
#include <KActionCollection>
#include <QApplication>
#include <QVBoxLayout>
#include <MessageViewer/MailWebEngineView>
TestMailDndAttachment::TestMailDndAttachment(QWidget *parent)
: QWidget(parent)
{
QVBoxLayout *vbox = new QVBoxLayout;
setLayout(vbox);
mTestWebEngine = new MessageViewer::MailWebEngineView(new KActionCollection(this), this);
vbox->addWidget(mTestWebEngine);
}
TestMailDndAttachment::~TestMailDndAttachment()
{
}
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
app.setAttribute(Qt::AA_UseHighDpiPixmaps, true);
TestMailDndAttachment *testWebEngine = new TestMailDndAttachment;
testWebEngine->show();
const int ret = app.exec();
return ret;
}
/*
Copyright (c) 2016 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 TESTMAILDNDATTACHMENT_H
#define TESTMAILDNDATTACHMENT_H
#include <QWidget>
namespace MessageViewer
{
class MailWebEngineView;
}
class TestMailDndAttachment : public QWidget
{
Q_OBJECT
public:
explicit TestMailDndAttachment(QWidget *parent = Q_NULLPTR);
~TestMailDndAttachment();
private:
MessageViewer::MailWebEngineView *mTestWebEngine;
};
#endif // TESTMAILDNDATTACHMENT_H
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