More warning fixes

This commit is contained in:
Atlante45 2015-12-11 15:04:33 -08:00
parent a07d7494f0
commit f72eb679c6
5 changed files with 9 additions and 8 deletions

View file

@ -15,7 +15,6 @@
#include <deque> #include <deque>
#include <forward_list> #include <forward_list>
#include <functional> #include <functional>
#include <GL/glew.h>
#include <mutex> #include <mutex>
#include <SharedUtil.h> #include <SharedUtil.h>

View file

@ -76,3 +76,6 @@ void OffscreenGLCanvas::doneCurrent() {
_context->doneCurrent(); _context->doneCurrent();
} }
QObject* OffscreenGLCanvas::getContextObject() {
return _context;
}

View file

@ -29,6 +29,7 @@ public:
QOpenGLContext* getContext() { QOpenGLContext* getContext() {
return _context; return _context;
} }
QObject* getContextObject();
protected: protected:
std::once_flag _reportOnce; std::once_flag _reportOnce;

View file

@ -17,15 +17,14 @@
#include <QtQuick/QQuickRenderControl> #include <QtQuick/QQuickRenderControl>
#include <QtCore/QWaitCondition> #include <QtCore/QWaitCondition>
#include <QtCore/QMutex> #include <QtCore/QMutex>
#include <QtGui/QOpenGLContext>
#include <shared/NsightHelpers.h> #include <shared/NsightHelpers.h>
#include <PerfStat.h> #include <PerfStat.h>
#include <DependencyManager.h> #include <DependencyManager.h>
#include <NumericalConstants.h> #include <NumericalConstants.h>
#include "GLEscrow.h"
#include "OffscreenGLCanvas.h" #include "OffscreenGLCanvas.h"
#include "GLEscrow.h"
// Time between receiving a request to render the offscreen UI actually triggering // Time between receiving a request to render the offscreen UI actually triggering
@ -60,7 +59,6 @@ static const QEvent::Type INIT = QEvent::Type(QEvent::User + 1);
static const QEvent::Type RENDER = QEvent::Type(QEvent::User + 2); static const QEvent::Type RENDER = QEvent::Type(QEvent::User + 2);
static const QEvent::Type RESIZE = QEvent::Type(QEvent::User + 3); static const QEvent::Type RESIZE = QEvent::Type(QEvent::User + 3);
static const QEvent::Type STOP = QEvent::Type(QEvent::User + 4); static const QEvent::Type STOP = QEvent::Type(QEvent::User + 4);
static const QEvent::Type UPDATE = QEvent::Type(QEvent::User + 5);
class OffscreenQmlRenderer : public OffscreenGLCanvas { class OffscreenQmlRenderer : public OffscreenGLCanvas {
friend class OffscreenQmlSurface; friend class OffscreenQmlSurface;
@ -84,7 +82,7 @@ public:
// Qt 5.5 // Qt 5.5
_renderControl->prepareThread(&_thread); _renderControl->prepareThread(&_thread);
_context->moveToThread(&_thread); getContextObject()->moveToThread(&_thread);
moveToThread(&_thread); moveToThread(&_thread);
_thread.setObjectName("QML Thread"); _thread.setObjectName("QML Thread");
_thread.start(); _thread.start();
@ -176,7 +174,7 @@ private:
doneCurrent(); doneCurrent();
_context->moveToThread(QCoreApplication::instance()->thread()); getContextObject()->moveToThread(QCoreApplication::instance()->thread());
_cond.wakeOne(); _cond.wakeOne();
} }

View file

@ -109,7 +109,7 @@ int OctreeQuery::parseData(ReceivedMessage& message) {
auto bytesRead = sourceBuffer - startPosition; auto bytesRead = sourceBuffer - startPosition;
auto bytesLeft = message.getSize() - bytesRead; auto bytesLeft = message.getSize() - bytesRead;
if (bytesLeft >= sizeof(_keyholeRadius)) { if (bytesLeft >= (int)sizeof(_keyholeRadius)) {
memcpy(&_keyholeRadius, sourceBuffer, sizeof(_keyholeRadius)); memcpy(&_keyholeRadius, sourceBuffer, sizeof(_keyholeRadius));
sourceBuffer += sizeof(_keyholeRadius); sourceBuffer += sizeof(_keyholeRadius);
} }