Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
PIM Messagelib
Commits
d18b956a
Commit
d18b956a
authored
Mar 10, 2017
by
Laurent Montel
Browse files
Use specific export symbol when we build test
=> avoid to export some class when we build in release mode
parent
ab111e47
Changes
12
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
d18b956a
...
...
@@ -127,6 +127,11 @@ endif ()
add_definitions
(
-DQT_NO_URL_CAST_FROM_STRING
)
if
(
BUILD_TESTING
)
add_definitions
(
-DBUILD_TESTING
)
endif
(
BUILD_TESTING
)
add_subdirectory
(
mimetreeparser
)
if
(
NOT
${
MIMETREEPARSER_ONLY_BUILD
}
)
add_subdirectory
(
messageviewer
)
...
...
templateparser/src/templateparser_private_export.h
0 → 100644
View file @
d18b956a
/* This file is part of the KDE project
Copyright (C) 2017 Laurent Montel <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 TEMPLATEPARSERPRIVATE_EXPORT_H
#define TEMPLATEPARSERPRIVATE_EXPORT_H
#include
"templateparser_export.h"
/* Classes which are exported only for unit tests */
#ifdef BUILD_TESTING
# ifndef TEMPLATEPARSER_TESTS_EXPORT
# define TEMPLATEPARSER_TESTS_EXPORT TEMPLATEPARSER_EXPORT
# endif
#else
/* not compiling tests */
# define TEMPLATEPARSER_TESTS_EXPORT
#endif
#endif
webengineviewer/src/autotests/CMakeLists.txt
View file @
d18b956a
...
...
@@ -15,7 +15,7 @@ ecm_add_test(zoomactionmenutest.cpp
)
ecm_add_test
(
webengineprintmessageboxtest.cpp
${
testwebengineviewer_webengine_SRCS
}
../webengineprintmessagebox.cpp
../webengineexporthtmlpagejob.cpp
ecm_add_test
(
webengineprintmessageboxtest.cpp
${
testwebengineviewer_webengine_SRCS
}
../webengineexporthtmlpagejob.cpp
TEST_NAME webengineprintmessageboxtest
NAME_PREFIX
"webengineviewer-"
LINK_LIBRARIES Qt5::Test KF5::WebEngineViewer KF5::I18n
...
...
webengineviewer/src/checkphishingurl/autotests/CMakeLists.txt
View file @
d18b956a
...
...
@@ -28,62 +28,62 @@ ecm_add_test(searchfullhashjobtest.cpp ../checkphishingurlutil.cpp ../updatedata
LINK_LIBRARIES Qt5::Test KF5::WebEngineViewer
)
ecm_add_test
(
localdatabasefiletest.cpp
../localdatabasefile.cpp
${
testwebengineviewer_webengine_common_SRCS
}
ecm_add_test
(
localdatabasefiletest.cpp
${
testwebengineviewer_webengine_common_SRCS
}
TEST_NAME localdatabasefiletest
NAME_PREFIX
"webengineview-"
LINK_LIBRARIES Qt5::Test KF5::WebEngineViewer
)
ecm_add_test
(
createdatabasefilejobtest.cpp
../createdatabasefilejob.cpp
${
testwebengineviewer_webengine_common_SRCS
}
ecm_add_test
(
createdatabasefilejobtest.cpp
${
testwebengineviewer_webengine_common_SRCS
}
TEST_NAME createdatabasefilejobtest
NAME_PREFIX
"webengineview-"
LINK_LIBRARIES Qt5::Test KF5::WebEngineViewer
)
ecm_add_test
(
verifydatabaseupdatetest.cpp
../createdatabasefilejob.cpp
${
testwebengineviewer_webengine_common_SRCS
}
ecm_add_test
(
verifydatabaseupdatetest.cpp
${
testwebengineviewer_webengine_common_SRCS
}
TEST_NAME verifydatabaseupdatetest
NAME_PREFIX
"webengineview-"
LINK_LIBRARIES Qt5::Test KF5::WebEngineViewer
)
ecm_add_test
(
urlhashingtest.cpp
../urlhashing.cpp
${
testwebengineviewer_webengine_common_SRCS
}
ecm_add_test
(
urlhashingtest.cpp
${
testwebengineviewer_webengine_common_SRCS
}
TEST_NAME urlhashingtest
NAME_PREFIX
"webengineview-"
LINK_LIBRARIES Qt5::Test KF5::WebEngineViewer
)
ecm_add_test
(
riceencodingdecodertest.cpp
../riceencodingdecoder.cpp
${
testwebengineviewer_webengine_common_SRCS
}
ecm_add_test
(
riceencodingdecodertest.cpp
${
testwebengineviewer_webengine_common_SRCS
}
TEST_NAME riceencodingdecodertest
NAME_PREFIX
"webengineview-"
LINK_LIBRARIES Qt5::Test KF5::WebEngineViewer
)
ecm_add_test
(
hashcachemanagertest.cpp
../hashcachemanager.cpp ../checkphishingurlutil.cpp
${
testwebengineviewer_webengine_common_SRCS
}
ecm_add_test
(
hashcachemanagertest.cpp
${
testwebengineviewer_webengine_common_SRCS
}
TEST_NAME hashcachemanagertest
NAME_PREFIX
"webengineview-"
LINK_LIBRARIES Qt5::Test KF5::ConfigCore
LINK_LIBRARIES Qt5::Test KF5::ConfigCore
KF5::WebEngineViewer
)
ecm_add_test
(
checkphishingurlutiltest.cpp
../checkphishingurlutil.cpp
${
testwebengineviewer_webengine_common_SRCS
}
ecm_add_test
(
checkphishingurlutiltest.cpp
${
testwebengineviewer_webengine_common_SRCS
}
TEST_NAME checkphishingurlutiltest
NAME_PREFIX
"webengineview-"
LINK_LIBRARIES Qt5::Test
LINK_LIBRARIES Qt5::Test
KF5::WebEngineViewer
)
ecm_add_test
(
checkphishingurlcachetest.cpp
../checkphishingurlcache.cpp ../checkphishingurlutil.cpp
${
testwebengineviewer_webengine_common_SRCS
}
ecm_add_test
(
checkphishingurlcachetest.cpp
${
testwebengineviewer_webengine_common_SRCS
}
TEST_NAME checkphishingurlcachetest
NAME_PREFIX
"webengineview-"
LINK_LIBRARIES Qt5::Test KF5::ConfigCore
LINK_LIBRARIES Qt5::Test KF5::ConfigCore
KF5::WebEngineViewer
)
ecm_add_test
(
backoffmodemanagertest.cpp
../backoffmodemanager.cpp ../checkphishingurlutil.cpp
${
testwebengineviewer_webengine_common_SRCS
}
ecm_add_test
(
backoffmodemanagertest.cpp
${
testwebengineviewer_webengine_common_SRCS
}
TEST_NAME backoffmodemanagertest
NAME_PREFIX
"webengineview-"
LINK_LIBRARIES Qt5::Test KF5::ConfigCore
LINK_LIBRARIES Qt5::Test KF5::ConfigCore
KF5::WebEngineViewer
)
ecm_add_test
(
downloadlocaldatabasethreadtest.cpp
../downloadlocaldatabasethread.cpp ../checkphishingurlutil.cpp
${
testwebengineviewer_webengine_common_SRCS
}
ecm_add_test
(
downloadlocaldatabasethreadtest.cpp
${
testwebengineviewer_webengine_common_SRCS
}
TEST_NAME downloadlocaldatabasethreadtest
NAME_PREFIX
"webengineview-"
LINK_LIBRARIES Qt5::Test Qt5::Network KF5::WebEngineViewer
...
...
webengineviewer/src/checkphishingurl/checkphishingurlutil.h
View file @
d18b956a
...
...
@@ -22,7 +22,7 @@
#include
<QString>
#include
<QObject>
#include
"webengineviewer_export.h"
#include
"webengineviewer_
private_
export.h"
namespace
WebEngineViewer
{
namespace
CheckPhishingUrlUtil
...
...
@@ -38,13 +38,13 @@ enum UrlStatus {
QString
apiKey
();
QString
versionApps
();
QString
databaseFileName
();
QString
configFileName
();
WEBENGINEVIEWER_EXPORT
quint16
minorVersion
();
WEBENGINEVIEWER_EXPORT
quint16
majorVersion
();
WEBENGINEVIEWER_EXPORT
double
convertToSecond
(
const
QString
&
str
);
WEBENGINEVIEWER_EXPORT
uint
refreshingCacheAfterThisTime
(
double
seconds
);
WEBENGINEVIEWER_EXPORT
bool
cachedValueStillValid
(
uint
seconds
);
WEBENGINEVIEWER_EXPORT
int
generateRandomSecondValue
(
int
numberOfFailed
);
WEBENGINEVIEWER_TESTS_EXPORT
QString
configFileName
();
WEBENGINEVIEWER_
TESTS_
EXPORT
quint16
minorVersion
();
WEBENGINEVIEWER_
TESTS_
EXPORT
quint16
majorVersion
();
WEBENGINEVIEWER_
TESTS_
EXPORT
double
convertToSecond
(
const
QString
&
str
);
WEBENGINEVIEWER_
TESTS_
EXPORT
uint
refreshingCacheAfterThisTime
(
double
seconds
);
WEBENGINEVIEWER_
TESTS_
EXPORT
bool
cachedValueStillValid
(
uint
seconds
);
WEBENGINEVIEWER_
TESTS_
EXPORT
int
generateRandomSecondValue
(
int
numberOfFailed
);
}
}
Q_DECLARE_METATYPE
(
WebEngineViewer
::
CheckPhishingUrlUtil
::
UrlStatus
)
...
...
webengineviewer/src/checkphishingurl/createphishingurldatabasejob.h
View file @
d18b956a
...
...
@@ -24,13 +24,13 @@
#include
<QSslError>
#include
<QNetworkReply>
#include
"webengineviewer_export.h"
#include
"webengineviewer_
private_
export.h"
namespace
WebEngineViewer
{
struct
UpdateDataBaseInfo
;
class
CreatePhishingUrlDataBaseJobPrivate
;
/* https://developers.google.com/safe-browsing/v4/update-api */
class
WEBENGINEVIEWER_EXPORT
CreatePhishingUrlDataBaseJob
:
public
QObject
class
WEBENGINEVIEWER_
TESTS_
EXPORT
CreatePhishingUrlDataBaseJob
:
public
QObject
{
Q_OBJECT
public:
...
...
webengineviewer/src/checkphishingurl/downloadlocaldatabasethread.h
View file @
d18b956a
...
...
@@ -21,11 +21,11 @@
#define DOWNLOADLOCALDATABASETHREAD_H
#include
<QThread>
#include
"webengineviewer_export.h"
#include
"webengineviewer_
private_
export.h"
#include
<WebEngineViewer/CreatePhishingUrlDataBaseJob>
namespace
WebEngineViewer
{
class
WEBENGINEVIEWER_EXPORT
DownloadLocalDatabaseThread
:
public
QThread
class
WEBENGINEVIEWER_
TESTS_
EXPORT
DownloadLocalDatabaseThread
:
public
QThread
{
Q_OBJECT
public:
...
...
webengineviewer/src/checkphishingurl/localdatabasefile.h
View file @
d18b956a
...
...
@@ -20,7 +20,7 @@
#ifndef LOCALDATABASEFILE_H
#define LOCALDATABASEFILE_H
#include
"webengineviewer_export.h"
#include
"webengineviewer_
private_
export.h"
#include
<QString>
#include
<QDateTime>
...
...
@@ -28,7 +28,7 @@ namespace WebEngineViewer
{
class
LocalDataBaseFilePrivate
;
class
Addition
;
class
WEBENGINEVIEWER_EXPORT
LocalDataBaseFile
class
WEBENGINEVIEWER_
TESTS_
EXPORT
LocalDataBaseFile
{
public:
/*
...
...
webengineviewer/src/checkphishingurl/riceencodingdecoder.h
View file @
d18b956a
...
...
@@ -20,7 +20,7 @@
#ifndef RICEENCODINGDECODER_H
#define RICEENCODINGDECODER_H
#include
"webengineviewer_export.h"
#include
"webengineviewer_
private_
export.h"
#include
"updatedatabaseinfo.h"
namespace
WebEngineViewer
{
...
...
@@ -56,7 +56,7 @@ private:
};
class
WEBENGINEVIEWER_EXPORT
RiceEncodingDecoder
class
WEBENGINEVIEWER_
TESTS_
EXPORT
RiceEncodingDecoder
{
public:
RiceEncodingDecoder
();
...
...
webengineviewer/src/checkphishingurl/urlhashing.h
View file @
d18b956a
...
...
@@ -20,14 +20,14 @@
#ifndef URLHASHING_H
#define URLHASHING_H
#include
"webengineviewer_export.h"
#include
"webengineviewer_
private_
export.h"
#include
<QUrl>
#include
<QString>
namespace
WebEngineViewer
{
//https://developers.google.com/safe-browsing/v4/urls-hashing
class
WEBENGINEVIEWER_EXPORT
UrlHashing
class
WEBENGINEVIEWER_
TESTS_
EXPORT
UrlHashing
{
public:
UrlHashing
(
const
QUrl
&
url
);
...
...
webengineviewer/src/webengineprintmessagebox.h
View file @
d18b956a
...
...
@@ -21,10 +21,10 @@
#define WEBENGINEPRINTMESSAGEBOX_H
#include
<QDialog>
#include
"webengineviewer_export.h"
#include
"webengineviewer_
private_
export.h"
namespace
WebEngineViewer
{
class
WEBENGINEVIEWER_EXPORT
WebEnginePrintMessageBox
:
public
QDialog
class
WEBENGINEVIEWER_
TESTS_
EXPORT
WebEnginePrintMessageBox
:
public
QDialog
{
Q_OBJECT
public:
...
...
webengineviewer/src/webengineviewer_private_export.h
0 → 100644
View file @
d18b956a
/* This file is part of the KDE project
Copyright (C) 2007 David Faure <faure@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 WEBENGINEVIEWERPRIVATE_EXPORT_H
#define WEBENGINEVIEWERPRIVATE_EXPORT_H
#include
"webengineviewer_export.h"
/* Classes which are exported only for unit tests */
#ifdef BUILD_TESTING
# ifndef WEBENGINEVIEWER_TESTS_EXPORT
# define WEBENGINEVIEWER_TESTS_EXPORT WEBENGINEVIEWER_EXPORT
# endif
#else
/* not compiling tests */
# define WEBENGINEVIEWER_TESTS_EXPORT
#endif
#endif
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment