Skip to content

Instantly share code, notes, and snippets.

@bbandix
Created May 29, 2015 15:37
Show Gist options
  • Save bbandix/a749f79a30968b544a22 to your computer and use it in GitHub Desktop.
Save bbandix/a749f79a30968b544a22 to your computer and use it in GitHub Desktop.
diff --git a/src/core/api/qwebenginecallback.cpp b/src/core/api/qwebenginecallback.cpp
index adddd37..03d0ffa 100644
--- a/src/core/api/qwebenginecallback.cpp
+++ b/src/core/api/qwebenginecallback.cpp
@@ -136,9 +136,9 @@ void CallbackDirectory::CallbackSharedDataPointer<T>::invokeEmpty()
#define DECLATE_SUPPORTED_CALLBACK_TYPE(T) \
template struct CallbackDirectory::CallbackSharedDataPointer<T>; \
- template void CallbackDirectory::invokeInternal<T>(quint64, T); \
+ template void CallbackDirectory::invokeInternal<T>(QT_PREPEND_NAMESPACE(quint64), T); \
template void CallbackDirectory::invokeEmpty<T>(const QWebEngineCallback<T> &); \
- template void CallbackDirectory::registerCallback<T>(quint64, const QWebEngineCallback<T> &); \
+ template void CallbackDirectory::registerCallback<T>(QT_PREPEND_NAMESPACE(quint64), const QWebEngineCallback<T> &); \
FOR_EACH_TYPE(DECLATE_SUPPORTED_CALLBACK_TYPE)
#undef DECLATE_SUPPORTED_CALLBACK_TYPE
diff --git a/src/core/api/qwebenginecallback_p.h b/src/core/api/qwebenginecallback_p.h
index e44e99d..139ca53 100644
--- a/src/core/api/qwebenginecallback_p.h
+++ b/src/core/api/qwebenginecallback_p.h
@@ -50,8 +50,8 @@
#define FOR_EACH_TYPE(F) \
F(bool) \
F(int) \
- F(const QString &) \
- F(const QVariant &)
+ F(const QT_PREPEND_NAMESPACE(QString) &) \
+ F(const QT_PREPEND_NAMESPACE(QVariant) &)
namespace QtWebEngineCore {
@@ -66,13 +66,13 @@ public:
~CallbackDirectory();
template<typename T>
- void registerCallback(quint64 callbackId, const QWebEngineCallback<T> &callback);
+ void registerCallback(QT_PREPEND_NAMESPACE(quint64) callbackId, const QWebEngineCallback<T> &callback);
template<typename T>
void invokeEmpty(const QWebEngineCallback<T> &callback);
#define DEFINE_INVOKE_FOR_TYPE(Type) \
- void invoke(quint64 callbackId, Type result) { \
+ void invoke(QT_PREPEND_NAMESPACE(quint64) callbackId, Type result) { \
invokeInternal<Type>(callbackId, std::forward<Type>(result)); \
}
FOR_EACH_TYPE(DEFINE_INVOKE_FOR_TYPE)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment