Commit 6d53e017 authored by Laurent Montel's avatar Laurent Montel 😁

Improve plugin

parent fc4e41a6
include_directories(${CMAKE_CURRENT_BINARY_DIR})
if(BUILD_TESTING)
#add_subdirectory(tests)
add_subdirectory(tests)
add_subdirectory(autotests)
endif()
......
......@@ -2,6 +2,7 @@ macro(add_templateparserplugin_unittest _source _extrasources)
set(_test ${_source} ${_extrasources})
get_filename_component(_name ${_source} NAME_WE)
add_executable( ${_name} ${_test} )
add_test(${_name} ${_name})
ecm_mark_as_test(templateparserplugin-${_name})
target_link_libraries(${_name}
KF5::MessageViewer
......
......@@ -43,4 +43,21 @@ TemplateParserEmailAddressRequesterAkonadi::~TemplateParserEmailAddressRequester
disconnect(mEmailAddressRequester, &Akonadi::EmailAddressRequester::textChanged, this, &TemplateParser::TemplateParserEmailAddressRequesterBase::textChanged);
}
QString TemplateParserEmailAddressRequesterAkonadi::text() const
{
return mEmailAddressRequester->text();
}
void TemplateParserEmailAddressRequesterAkonadi::setText(const QString &str)
{
mEmailAddressRequester->setText(str);
}
void TemplateParserEmailAddressRequesterAkonadi::clear()
{
mEmailAddressRequester->clear();
}
#include "templateparseremailaddressrequesterakonadi.moc"
......@@ -32,8 +32,14 @@ class TemplateParserEmailAddressRequesterAkonadi : public TemplateParser::Templa
public:
explicit TemplateParserEmailAddressRequesterAkonadi(QWidget *parent = nullptr, const QList<QVariant> & = {});
~TemplateParserEmailAddressRequesterAkonadi();
QString text() const override;
void setText(const QString &str) override;
void clear() override;
private:
Akonadi::EmailAddressRequester *mEmailAddressRequester;
};
#endif // TEMPLATEPARSEREMAILADDRESSREQUESTERAKONADI_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