Commit 732ba12b authored by David Faure's avatar David Faure

Fix clang warning about vtables being emitted in every translation unit.

Summary:
Pure interfaces don't get treated well by C++ compilers, better have a .cpp file for the dtor.
This required moving the header to one of the actual libs (viewer, since it's only used there).

Test Plan: Compiles

Reviewers: #kde_pim

Differential Revision: https://phabricator.kde.org/D1376
parent 4a766362
......@@ -22,7 +22,7 @@
#define MESSAGECORE_TESTS_UTIL_H
#include <gpgme++/key.h>
#include "objecttreesourceif.h"
#include "interfaces/objecttreesourceif.h"
#include <viewer/attachmentstrategy.h>
#include "viewer/bodypartformatterbasefactory.h"
......
......@@ -20,6 +20,9 @@ set(libmimetreeparser_main_SRCS
bodyformatter/texthtml.cpp
bodyformatter/utils.cpp
interfaces/bodypartformatter.cpp
interfaces/objecttreesourceif.cpp
interfaces/bodypart.cpp
interfaces/htmlwriter.cpp
job/kleojobexecutor.cpp
viewer/attachmentstrategy.cpp
viewer/bodypartformatter.cpp
......@@ -66,13 +69,6 @@ ecm_generate_headers(MimeTreeParser_Camelcaseviewer_HEADERS
RELATIVE viewer
)
ecm_generate_headers(MimeTreeParser_Camelcasemain_HEADERS
HEADER_NAMES
ObjectTreeSourceIf
REQUIRED_HEADERS MimeTreeParser_main_HEADERS
PREFIX MimeTreeParser
)
ecm_generate_headers(MimeTreeParser_Camelcaseutils_HEADERS
HEADER_NAMES
IconNameCache
......@@ -87,6 +83,7 @@ ecm_generate_headers(MimeTreeParser_Camelcaseinterfaces_HEADERS
BodyPartFormatter
BodyPart
HtmlWriter
ObjectTreeSourceIf
REQUIRED_HEADERS MimeTreeParser_interfaces_HEADERS
PREFIX MimeTreeParser
RELATIVE interfaces
......@@ -113,7 +110,6 @@ install(FILES
${MimeTreeParser_Camelcaseutils_HEADERS}
${MimeTreeParser_Camelcaseinterfaces_HEADERS}
${MimeTreeParser_Camelcaseviewer_HEADERS}
${MimeTreeParser_Camelcasemain_HEADERS}
${MimeTreeParser_Camelcasetemporaryfile_HEADERS}
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/MimeTreeParser
COMPONENT Devel
......@@ -124,7 +120,6 @@ install(FILES
${MimeTreeParser_utils_HEADERS}
${MimeTreeParser_interfaces_HEADERS}
${MimeTreeParser_viewer_HEADERS}
${MimeTreeParser_main_HEADERS}
${MimeTreeParser_temporaryfile_HEADERS}
${CMAKE_CURRENT_BINARY_DIR}/mimetreeparser_export.h
${CMAKE_CURRENT_BINARY_DIR}/mimetreeparser_debug.h
......
/*
This file is part of KMail's plugin interface.
Copyright (c) 2004 Marc Mutz <mutz@kde.org>,
Ingo Kloecker <kloecker@kde.org>
KMail 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.
KMail 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
In addition, as a special exception, the copyright holders give
permission to link the code of this program with any edition of
the Qt library by Trolltech AS, Norway (or with modified versions
of Qt that use the same license as Qt), and distribute linked
combinations including the two. You must obey the GNU General
Public License in all respects for all of the code used other than
Qt. If you modify this file, you may extend this exception to
your version of the file, but you are not obligated to do so. If
you do not wish to do so, delete this exception statement from
your version.
*/
#include "bodypart.h"
MimeTreeParser::Interface::BodyPartMemento::~BodyPartMemento()
{
}
MimeTreeParser::Interface::BodyPart::~BodyPart()
{
}
......@@ -34,6 +34,8 @@
#ifndef __MIMETREEPARSER_INTERFACES_BODYPART_H__
#define __MIMETREEPARSER_INTERFACES_BODYPART_H__
#include "mimetreeparser_export.h"
#include <QByteArray>
#include <QString>
......@@ -59,10 +61,10 @@ namespace Interface
/**
@short interface of classes that implement status for BodyPartFormatters.
*/
class BodyPartMemento
class MIMETREEPARSER_EXPORT BodyPartMemento
{
public:
virtual ~BodyPartMemento() {}
virtual ~BodyPartMemento();
virtual void detach() = 0;
#if 0
......@@ -88,10 +90,10 @@ public:
/**
@short interface of message body parts.
*/
class BodyPart
class MIMETREEPARSER_EXPORT BodyPart
{
public:
virtual ~BodyPart() {}
virtual ~BodyPart();
/**
@return a string respresentation of an URL that can be used
......
/*
This file is part of KMail's plugin interface.
Copyright (c) 2003 Marc Mutz <mutz@kde.org>
KMail 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.
KMail 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
In addition, as a special exception, the copyright holders give
permission to link the code of this program with any edition of
the Qt library by Trolltech AS, Norway (or with modified versions
of Qt that use the same license as Qt), and distribute linked
combinations including the two. You must obey the GNU General
Public License in all respects for all of the code used other than
Qt. If you modify this file, you may extend this exception to
your version of the file, but you are not obligated to do so. If
you do not wish to do so, delete this exception statement from
your version.
*/
#include "htmlwriter.h"
MimeTreeParser::Interface::HtmlWriter::~HtmlWriter()
{
}
MimeTreeParser::HtmlWriter::~HtmlWriter()
{
}
......@@ -33,6 +33,8 @@
#ifndef __MIMETREEPARSER_INTERFACES_HTMLWRITER_H__
#define __MIMETREEPARSER_INTERFACES_HTMLWRITER_H__
#include "mimetreeparser_export.h"
class QByteArray;
class QString;
......@@ -45,10 +47,10 @@ namespace MimeTreeParser
*/
namespace Interface
{
class HtmlWriter
class MIMETREEPARSER_EXPORT HtmlWriter
{
public:
virtual ~HtmlWriter() {}
virtual ~HtmlWriter();
/** Signal the begin of stuff to write, and give the CSS definitions */
virtual void begin(const QString &cssDefinitions) = 0;
......@@ -98,10 +100,10 @@ public:
* Naturally, whenever you queued data in a given session, that
* session must be ended by calling #flush(), not #end().
*/
class HtmlWriter : public Interface::HtmlWriter
class MIMETREEPARSER_EXPORT HtmlWriter : public Interface::HtmlWriter
{
public:
virtual ~HtmlWriter() {}
virtual ~HtmlWriter();
/** Stop all possibly pending processing in order to be able to
* call #begin() again. */
......
/*
Copyright (C) 2009 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.net
Copyright (c) 2009 Andras Mantia <andras@kdab.net>
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; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "objecttreesourceif.h"
MimeTreeParser::ObjectTreeSourceIf::~ObjectTreeSourceIf()
{
}
/* -*- mode: C++; c-file-style: "gnu" -*-
/*
Copyright (C) 2009 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.net
Copyright (c) 2009 Andras Mantia <andras@kdab.net>
......@@ -47,9 +47,7 @@ class MIMETREEPARSER_EXPORT ObjectTreeSourceIf
{
public:
ObjectTreeSourceIf() {}
virtual ~ObjectTreeSourceIf() {}
virtual ~ObjectTreeSourceIf();
/**
* Sets the type of mail that is currently displayed. Applications can display this
......
......@@ -112,6 +112,10 @@ bool containsExternalReferences(const QString &str, const QString &extraHead)
return false;
}
HTMLBlock::~HTMLBlock()
{
}
QString HTMLBlock::dir() const
{
return QApplication::isRightToLeft() ? QStringLiteral("rtl") : QStringLiteral("ltr");
......
......@@ -61,7 +61,7 @@ public:
: entered(false)
{ }
virtual ~HTMLBlock() { }
virtual ~HTMLBlock();
protected:
QString dir() const;
......
......@@ -46,7 +46,6 @@
#include "partnodebodypart.h"
#include "mimetreeparser_debug.h"
#include "objecttreesourceif.h"
#include "interfaces/bodypartformatter.h"
#include "interfaces/htmlwriter.h"
......
......@@ -37,7 +37,7 @@
#include "mimetreeparser_export.h"
#include "mimetreeparser/nodehelper.h"
#include "objecttreesourceif.h"
#include "mimetreeparser/objecttreesourceif.h"
#include <Libkleo/CryptoBackend>
#include <gpgme++/verificationresult.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