Merge remote-tracking branch 'origin/KDE/4.14'

Conflicts:
	grantleeeditor/grantleethemeeditor/managethemes.cpp
	kmail/editor/potentialphishingemail/potentialphishingemailwarning.cpp
	libkdepim/ldap/addhostdialog.cpp
	libkdepim/ldap/addhostdialog_p.h
	messageviewer/viewer/viewer_p.cpp
	pimcommon/acl/aclmanager.cpp
	pimcommon/acl/autotests/CMakeLists.txt
	pimcommon/acl/collectionaclpage.cpp
	pimcommon/acl/collectionaclpage.h
	pimcommon/translator/googletranslator.cpp
	pimcommon/translator/translatorutil.cpp
	pimcommon/translator/translatorutil.h
	pimcommon/util/vcardutil.cpp
wilder-work
Montel Laurent 11 years ago
commit fca382a478
  1. 4
      editor/potentialphishingemail/autotests/CMakeLists.txt
  2. 46
      editor/potentialphishingemail/autotests/potentialphishingemailwarningtest.cpp
  3. 36
      editor/potentialphishingemail/autotests/potentialphishingemailwarningtest.h
  4. 1
      editor/potentialphishingemail/potentialphishingemailwarning.cpp

@ -14,3 +14,7 @@ ecm_mark_as_test(kmail_potentialphishingdetaildialogtest)
target_link_libraries( kmail_potentialphishingdetaildialogtest Qt5::Test KF5::KDELibs4Support )
set( kmail_potentialphishingemailwarningtest_SRCS potentialphishingemailwarningtest.cpp ../potentialphishingemailwarning.cpp ../potentialphishingdetaildialog.cpp)
kde4_add_unit_test( kmail_potentialphishingemailwarningtest ${kmail_potentialphishingemailwarningtest_SRCS})
target_link_libraries( kmail_potentialphishingemailwarningtest ${QT_QTTEST_LIBRARY} ${KDE4_KDEUI_LIBS} )

@ -0,0 +1,46 @@
/*
Copyright (c) 2015 Montel Laurent <montel@kde.org>
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
This library 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 Library General Public
License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
*/
#include "potentialphishingemailwarningtest.h"
#include "../potentialphishingemailwarning.h"
#include <QAction>
#include <qtest.h>
PotentialPhishingEmailWarningTest::PotentialPhishingEmailWarningTest(QObject *parent)
: QObject(parent)
{
}
PotentialPhishingEmailWarningTest::~PotentialPhishingEmailWarningTest()
{
}
void PotentialPhishingEmailWarningTest::shouldHaveDefaultValue()
{
PotentialPhishingEmailWarning w;
QVERIFY(!w.isVisible());
//Verify QVERIFY(w.isCloseButtonVisible());
QAction *act = qFindChild<QAction *>(&w, QLatin1String("sendnow"));
QVERIFY(act);
}
QTEST_MAIN(PotentialPhishingEmailWarningTest)

@ -0,0 +1,36 @@
/*
Copyright (c) 2015 Montel Laurent <montel@kde.org>
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
This library 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 Library General Public
License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
*/
#ifndef POTENTIALPHISHINGEMAILWARNINGTEST_H
#define POTENTIALPHISHINGEMAILWARNINGTEST_H
#include <QObject>
class PotentialPhishingEmailWarningTest : public QObject
{
Q_OBJECT
public:
explicit PotentialPhishingEmailWarningTest(QObject *parent = 0);
~PotentialPhishingEmailWarningTest();
private Q_SLOTS:
void shouldHaveDefaultValue();
};
#endif // POTENTIALPHISHINGEMAILWARNINGTEST_H

@ -36,6 +36,7 @@ PotentialPhishingEmailWarning::PotentialPhishingEmailWarning(QWidget *parent)
connect(this, SIGNAL(linkActivated(QString)), SLOT(slotShowDetails(QString)));
QAction *action = new QAction(i18n("Send Now"), this);
action->setObjectName(QLatin1String("sendnow"));
connect(action, &QAction::triggered, this, &PotentialPhishingEmailWarning::sendNow);
addAction(action);
}

Loading…
Cancel
Save