diff options
| author | Jonah BrĂ¼chert <jbb@kaidan.im> | 2023-03-09 13:30:58 +0100 |
|---|---|---|
| committer | Linus Jahn <lnj@kaidan.im> | 2023-03-09 15:13:17 +0100 |
| commit | c5642526513363608d538417d0e50e00f9cd5e46 (patch) | |
| tree | 92b87f711abf59fcbbc41e7b63f2f8ca4c159ce9 /src | |
| parent | 2a39ea6743ea4b7075184cd37c16fec5c4226009 (diff) | |
| download | qxmpp-c5642526513363608d538417d0e50e00f9cd5e46.tar.gz | |
Fix compilation on MSVC 2019
Diffstat (limited to 'src')
| -rw-r--r-- | src/base/QXmppPromise.h | 4 | ||||
| -rw-r--r-- | src/client/QXmppDiscoveryManager.h | 2 | ||||
| -rw-r--r-- | src/client/QXmppEntityTimeManager.h | 2 | ||||
| -rw-r--r-- | src/client/QXmppFileEncryption.cpp | 2 | ||||
| -rw-r--r-- | src/client/QXmppFileEncryption.h | 8 |
5 files changed, 10 insertions, 8 deletions
diff --git a/src/base/QXmppPromise.h b/src/base/QXmppPromise.h index 4900dae1..6408ad0c 100644 --- a/src/base/QXmppPromise.h +++ b/src/base/QXmppPromise.h @@ -45,7 +45,7 @@ public: #ifdef QXMPP_DOC void reportFinished(T &&value) #else - template<typename U, std::enable_if_t<!std::is_void_v<T> && std::is_same_v<T, U>> * = nullptr> + template<typename U, typename TT = T, std::enable_if_t<!std::is_void_v<TT> && std::is_same_v<TT, U>> * = nullptr> void finish(U &&value) #endif { @@ -61,7 +61,7 @@ public: } /// \cond - template<typename U, std::enable_if_t<!std::is_void_v<T> && std::is_constructible_v<T, U> && !std::is_same_v<T, U>> * = nullptr> + template<typename U, typename TT = T, std::enable_if_t<!std::is_void_v<TT> && std::is_constructible_v<TT, U> && !std::is_same_v<TT, U>> * = nullptr> void finish(U &&value) { Q_ASSERT(!d.isFinished()); diff --git a/src/client/QXmppDiscoveryManager.h b/src/client/QXmppDiscoveryManager.h index 10744a0d..d45e63a4 100644 --- a/src/client/QXmppDiscoveryManager.h +++ b/src/client/QXmppDiscoveryManager.h @@ -15,7 +15,7 @@ class QXmppTask; class QXmppDataForm; class QXmppDiscoveryIq; class QXmppDiscoveryManagerPrivate; -class QXmppError; +struct QXmppError; /// \brief The QXmppDiscoveryManager class makes it possible to discover information /// about other entities as defined by \xep{0030}: Service Discovery. diff --git a/src/client/QXmppEntityTimeManager.h b/src/client/QXmppEntityTimeManager.h index 3b090feb..87219122 100644 --- a/src/client/QXmppEntityTimeManager.h +++ b/src/client/QXmppEntityTimeManager.h @@ -13,7 +13,7 @@ template<class T> class QXmppTask; class QXmppEntityTimeIq; -class QXmppError; +struct QXmppError; /// /// \brief The QXmppEntityTimeManager class provided the functionality to get diff --git a/src/client/QXmppFileEncryption.cpp b/src/client/QXmppFileEncryption.cpp index ba78821e..e767769a 100644 --- a/src/client/QXmppFileEncryption.cpp +++ b/src/client/QXmppFileEncryption.cpp @@ -7,6 +7,8 @@ #include <QByteArray> #include <QtCrypto> +#undef min + using namespace QCA; constexpr std::size_t AES128_BLOCK_SIZE = 128 / 8; diff --git a/src/client/QXmppFileEncryption.h b/src/client/QXmppFileEncryption.h index 5bd52c7e..e50bf83c 100644 --- a/src/client/QXmppFileEncryption.h +++ b/src/client/QXmppFileEncryption.h @@ -23,9 +23,9 @@ enum Direction { Decode, }; -QByteArray process(const QByteArray &data, Cipher cipherConfig, Direction direction, const QByteArray &key, const QByteArray &iv); -QByteArray generateKey(Cipher cipher); -QByteArray generateInitializationVector(Cipher); +QXMPP_EXPORT QByteArray process(const QByteArray &data, Cipher cipherConfig, Direction direction, const QByteArray &key, const QByteArray &iv); +QXMPP_EXPORT QByteArray generateKey(Cipher cipher); +QXMPP_EXPORT QByteArray generateInitializationVector(Cipher); // export for tests class QXMPP_EXPORT EncryptionDevice : public QIODevice @@ -50,7 +50,7 @@ private: std::unique_ptr<QCA::Cipher> m_cipher; }; -class DecryptionDevice : public QIODevice +class QXMPP_EXPORT DecryptionDevice : public QIODevice { public: DecryptionDevice(std::unique_ptr<QIODevice> output, Cipher config, const QByteArray &key, const QByteArray &iv); |
