Support Qt in namespace (#69)

Enable support for Qt built with the -qtnamespace configure option
This commit is contained in:
Patrick Stewart 2019-12-20 14:40:28 +00:00 committed by oKcerG
parent 36befddf5d
commit f8393999b6
7 changed files with 13 additions and 3 deletions

View File

@ -42,6 +42,10 @@ add_library(SortFilterProxyModel OBJECT
proxyroles/filterrole.cpp
)
target_compile_definitions(SortFilterProxyModel PUBLIC
$<TARGET_PROPERTY:Qt5::Core,INTERFACE_COMPILE_DEFINITIONS>
)
target_include_directories(SortFilterProxyModel PUBLIC
${CMAKE_CURRENT_LIST_DIR}
$<TARGET_PROPERTY:Qt5::Core,INTERFACE_INCLUDE_DIRECTORIES>

View File

@ -4,7 +4,7 @@
#include "filter.h"
#include <QQmlScriptString>
class QQmlExpression;
class QT_PREPEND_NAMESPACE(QQmlExpression);
namespace qqsfpm {

View File

@ -36,7 +36,9 @@ private:
}
QT_BEGIN_NAMESPACE
#define FilterContainer_iid "fr.grecko.SortFilterProxyModel.FilterContainer"
Q_DECLARE_INTERFACE(qqsfpm::FilterContainer, FilterContainer_iid)
QT_END_NAMESPACE
#endif // FILTERCONTAINER_H

View File

@ -4,7 +4,7 @@
#include "singlerole.h"
#include <QQmlScriptString>
class QQmlExpression;
class QT_PREPEND_NAMESPACE(QQmlExpression);
namespace qqsfpm {

View File

@ -36,7 +36,9 @@ private:
}
QT_BEGIN_NAMESPACE
#define ProxyRoleContainer_iid "fr.grecko.SortFilterProxyModel.ProxyRoleContainer"
Q_DECLARE_INTERFACE(qqsfpm::ProxyRoleContainer, ProxyRoleContainer_iid)
QT_END_NAMESPACE
#endif // PROXYROLECONTAINER_H

View File

@ -4,7 +4,7 @@
#include "sorter.h"
#include <QQmlScriptString>
class QQmlExpression;
class QT_PREPEND_NAMESPACE(QQmlExpression);
namespace qqsfpm {

View File

@ -36,7 +36,9 @@ private:
}
QT_BEGIN_NAMESPACE
#define SorterContainer_iid "fr.grecko.SortFilterProxyModel.SorterContainer"
Q_DECLARE_INTERFACE(qqsfpm::SorterContainer, SorterContainer_iid)
QT_END_NAMESPACE
#endif // SORTERSSORTERCONTAINER_H