Commit abe75356 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix Bug 328866 - Unable to build kdepim with -DKDEPIM_NO_WEBKIT:BOOL=ON

FIXED-IN: 4.12.1
BUG: 328866
parent f2353101
......@@ -3,6 +3,7 @@ include_directories(
${CMAKE_BINARY_DIR}/messageviewer
)
if(NOT KDEPIM_NO_WEBKIT)
set(adblocksettings_gui_SRCS adblocksettings_gui.cpp)
kde4_add_executable(adblocksettings_gui TEST ${adblocksettings_gui_SRCS})
target_link_libraries(adblocksettings_gui
......@@ -38,3 +39,4 @@ target_link_libraries(adblockblockableitemdialog_gui
${KDEPIMLIBS_KPIMUTILS_LIBS}
messageviewer
)
endif()
......@@ -49,6 +49,7 @@ ScamCheckShortUrl *ScamDetection::scamCheckShortUrl() const
void ScamDetection::scanPage(QWebFrame *frame)
{
#ifndef KDEPIM_NO_WEBKIT
if (GlobalSettings::self()->scamDetectionEnabled()) {
mDetails.clear();
mDetails = QLatin1String("<b>") + i18n("Details:") + QLatin1String("</b><ul>");
......@@ -67,10 +68,12 @@ void ScamDetection::scanPage(QWebFrame *frame)
if (foundScam)
Q_EMIT messageMayBeAScam();
}
#endif
}
bool ScamDetection::scanFrame(const QWebElement &rootElement, QString &details)
{
#ifndef KDEPIM_NO_WEBKIT
bool foundScam = false;
QRegExp ip4regExp;
ip4regExp.setPattern(IPv4_PATTERN);
......@@ -136,6 +139,9 @@ bool ScamDetection::scanFrame(const QWebElement &rootElement, QString &details)
}
details += QLatin1String("</ul>");
return foundScam;
#else
return false;
#endif
}
void ScamDetection::showDetails()
......
......@@ -304,12 +304,12 @@ void MailWebView::clearFindSelection()
// not supported
}
void MailWebView::keyReleaseEvent(QKeyEvent*)
void MailWebView::keyReleaseEvent(QKeyEvent* e)
{
QTextBrowser::keyReleaseEvent(e);
}
void MailWebView::keyPressEvent(QKeyEvent*)
void MailWebView::keyPressEvent(QKeyEvent* e)
{
QTextBrowser::keyPressEvent(e);
}
......@@ -338,5 +338,4 @@ bool MailWebView::isAShortUrl(const KUrl &url) const
return false;
}
#include "mailwebview.moc"
#include "moc_mailwebview.cpp"
......@@ -664,7 +664,11 @@ KAction *Viewer::blockImage()
bool Viewer::adblockEnabled() const
{
#ifndef KDEPIM_NO_WEBKIT
return MessageViewer::AdBlockManager::self()->isEnabled();
#else
return false;
#endif
}
KAction *Viewer::openBlockableItems()
......
......@@ -2196,8 +2196,10 @@ void ViewerPrivate::slotToggleHtmlMode()
void ViewerPrivate::slotFind()
{
#ifndef KDEPIM_NO_WEBKIT
if ( mViewer->hasSelection() )
mFindBar->setText( mViewer->selectedText() );
#endif
mFindBar->show();
mFindBar->focusAndSetCursor();
}
......@@ -3343,7 +3345,9 @@ void ViewerPrivate::slotBlockImage()
{
if (mImageUrl.isEmpty())
return;
#ifndef KDEPIM_NO_WEBKIT
MessageViewer::AdBlockManager::self()->addCustomRule(mImageUrl.url(), true);
#endif
}
void ViewerPrivate::slotOpenBlockableItems()
......
Supports Markdown
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