Commit a384f917 authored by Daniel Vrátil's avatar Daniel Vrátil 🤖
Browse files

EWS: fix linking of tests with MSVC

parent 7ba2c757
......@@ -113,6 +113,7 @@ target_link_libraries(akonadi_ews_resource
KF5::I18n
KF5::WindowSystem
KF5::Notifications
KF5::ConfigWidgets
ewsclient)
if (HAVE_SEPARATE_MTA_RESOURCE)
......
......@@ -3,6 +3,7 @@
#
# SPDX-License-Identifier: LGPL-2.0-or-later
set(fakeewsserver_SRCS
fakeewsconnection.cpp
fakeewsserver_debug.cpp
......@@ -11,6 +12,7 @@ set(fakeewsserver_SRCS
add_library(fakeewsserver ${fakeewsserver_SRCS})
generate_export_header(fakeewsserver BASE_NAME fakeewsserver)
target_link_libraries(fakeewsserver Qt5::Core Qt5::Network Qt5::XmlPatterns)
add_subdirectory(test)
......@@ -9,6 +9,8 @@
#include <functional>
#include "fakeewsserver_export.h"
#include <QMutex>
#include <QPointer>
#include <QTcpServer>
......@@ -18,11 +20,11 @@ class FakeEwsConnection;
class QXmlResultItems;
class QXmlNamePool;
class Q_DECL_EXPORT FakeEwsServer : public QTcpServer
class FAKEEWSSERVER_EXPORT FakeEwsServer : public QTcpServer
{
Q_OBJECT
public:
class DialogEntry
class FAKEEWSSERVER_EXPORT DialogEntry
{
public:
typedef QPair<QString, ushort> HttpResponse;
......
......@@ -11,8 +11,9 @@
#include <QThread>
#include "fakeewsserver.h"
#include "fakeewsserver_export.h"
class Q_DECL_EXPORT FakeEwsServerThread : public QThread
class FAKEEWSSERVER_EXPORT FakeEwsServerThread : public QThread
{
Q_OBJECT
public:
......
......@@ -34,7 +34,8 @@ target_link_libraries(ewssettings_ut
KF5::ConfigCore
KF5::ConfigGui
KF5::CoreAddons
KF5::Wallet)
KF5::Wallet
)
target_compile_definitions(ewssettings_ut PUBLIC -DEWSSETTINGS_UNITTEST)
if (Qt5NetworkAuth_FOUND)
......
......@@ -82,12 +82,12 @@ Wallet *openWallet(MyWallet *wallet)
}
static const QString networkWallet = QStringLiteral("test_network_wallet");
const QString Wallet::NetworkWallet()
inline const QString Wallet::NetworkWallet()
{
return networkWallet;
}
Wallet *Wallet::openWallet(const QString &name, WId, OpenType ot)
inline Wallet *Wallet::openWallet(const QString &name, WId, OpenType ot)
{
qDebug() << "intercepted openWallet";
if (name != networkWallet) {
......
......@@ -12,7 +12,7 @@
#include "faketransferjob.h"
namespace KIO {
TransferJob *http_post(const QUrl &url, const QByteArray &postData, JobFlags flags)
inline TransferJob *http_post(const QUrl &url, const QByteArray &postData, JobFlags flags)
{
Q_UNUSED(url);
Q_UNUSED(flags);
......
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