CMake: Fix lightmaps example to build in a namespaced Qt
Add misisng namespace bits. The example is built by a CMake configuration. It is not built in a qmake configuration due to a missing x11 / embedded requirement. Task-number: QTBUG-84881 Change-Id: I6c53299a53e7c4e19d994ec2ae2d542667d41899 Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
parent
306ebe03ea
commit
8a8541c3cd
@ -53,10 +53,18 @@
|
|||||||
#include "slippymap.h"
|
#include "slippymap.h"
|
||||||
#include "qmath.h"
|
#include "qmath.h"
|
||||||
|
|
||||||
|
#ifdef QT_NAMESPACE
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
size_t qHash(const QT_NAMESPACE::QPoint& p)
|
||||||
|
#else
|
||||||
size_t qHash(const QPoint& p)
|
size_t qHash(const QPoint& p)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
return p.x() * 17 ^ p.y();
|
return p.x() * 17 ^ p.y();
|
||||||
}
|
}
|
||||||
|
#ifdef QT_NAMESPACE
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
#endif
|
||||||
|
|
||||||
// tile size in pixels
|
// tile size in pixels
|
||||||
const int tdim = 256;
|
const int tdim = 256;
|
||||||
|
@ -55,8 +55,10 @@
|
|||||||
#include <QPixmap>
|
#include <QPixmap>
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
class QNetworkReply;
|
class QNetworkReply;
|
||||||
class QPainter;
|
class QPainter;
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
class SlippyMap: public QObject
|
class SlippyMap: public QObject
|
||||||
{
|
{
|
||||||
@ -93,4 +95,5 @@ private:
|
|||||||
QUrl m_url;
|
QUrl m_url;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user