From 922452f5c3d8096c6752efead6643fd8676cb003 Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Mon, 13 Apr 2015 09:21:17 -0700 Subject: [PATCH 1/2] use output filename as base-name when splitting files --- tools/vhacd/src/VHACDUtilApp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/vhacd/src/VHACDUtilApp.cpp b/tools/vhacd/src/VHACDUtilApp.cpp index 242e69c363..46e1898979 100644 --- a/tools/vhacd/src/VHACDUtilApp.cpp +++ b/tools/vhacd/src/VHACDUtilApp.cpp @@ -315,7 +315,7 @@ VHACDUtilApp::VHACDUtilApp(int argc, char* argv[]) : if (splitModel) { QVector infileExtensions = {"fbx", "obj"}; - QString baseFileName = fileNameWithoutExtension(inputFilename, infileExtensions); + QString baseFileName = fileNameWithoutExtension(outputFilename, infileExtensions); int count = 0; foreach (const FBXMesh& mesh, fbx.meshes) { foreach (const FBXMeshPart &meshPart, mesh.parts) { From 0341caad9572a0ffbc95f6ff257776cdb0298ed1 Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Sun, 3 May 2015 11:10:52 -0700 Subject: [PATCH 2/2] quiet compiler --- interface/src/Application.cpp | 9 +++++---- interface/src/avatar/Avatar.cpp | 3 --- libraries/gpu/src/gpu/GLBackendOutput.cpp | 2 +- libraries/ui/src/VrMenu.cpp | 17 +++++++++++------ 4 files changed, 17 insertions(+), 14 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index bfda9629a0..fe92972f48 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -989,11 +989,12 @@ bool Application::importSVOFromURL(const QString& urlString) { } bool Application::event(QEvent* event) { - switch (event->type()) { - case Lambda: - ((LambdaEvent*)event)->call(); - return true; + if ((int)event->type() == (int)Lambda) { + ((LambdaEvent*)event)->call(); + return true; + } + switch (event->type()) { case QEvent::MouseMove: mouseMoveEvent((QMouseEvent*)event); return true; diff --git a/interface/src/avatar/Avatar.cpp b/interface/src/avatar/Avatar.cpp index 05f834255c..8083e153fe 100644 --- a/interface/src/avatar/Avatar.cpp +++ b/interface/src/avatar/Avatar.cpp @@ -723,9 +723,6 @@ void Avatar::renderDisplayName() { .arg(getReceiveRate()); } - QByteArray ba = _displayName.toLocal8Bit(); - const char* text = ba.data(); - glDisable(GL_POLYGON_OFFSET_FILL); textRenderer(DISPLAYNAME)->draw(text_x, text_y, renderedDisplayName, color); diff --git a/libraries/gpu/src/gpu/GLBackendOutput.cpp b/libraries/gpu/src/gpu/GLBackendOutput.cpp index 7b2deb64d2..b0dee550d9 100755 --- a/libraries/gpu/src/gpu/GLBackendOutput.cpp +++ b/libraries/gpu/src/gpu/GLBackendOutput.cpp @@ -83,7 +83,7 @@ GLBackend::GLFramebuffer* GLBackend::syncGPUObject(const Framebuffer& framebuffe glRenderbufferStorage(GL_RENDERBUFFER, GL_RGBA, framebuffer.getWidth(), framebuffer.getHeight()); glBindRenderbuffer(GL_RENDERBUFFER, 0); glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, renderBuffer); - CHECK_GL_ERROR(); + (void) CHECK_GL_ERROR(); } #endif diff --git a/libraries/ui/src/VrMenu.cpp b/libraries/ui/src/VrMenu.cpp index 5c0f8fb732..b6cb0b136b 100644 --- a/libraries/ui/src/VrMenu.cpp +++ b/libraries/ui/src/VrMenu.cpp @@ -102,9 +102,12 @@ class QQuickMenuItem; QObject* addItem(QObject* parent, const QString& text) { // FIXME add more checking here to ensure no name conflicts QQuickMenuItem* returnedValue{ nullptr }; - bool invokeResult = QMetaObject::invokeMethod(parent, "addItem", Qt::DirectConnection, - Q_RETURN_ARG(QQuickMenuItem*, returnedValue), - Q_ARG(QString, text)); + #ifndef QT_NO_DEBUG + bool invokeResult = + #endif + QMetaObject::invokeMethod(parent, "addItem", Qt::DirectConnection, Q_RETURN_ARG(QQuickMenuItem*, returnedValue), + Q_ARG(QString, text)); + Q_ASSERT(invokeResult); QObject* result = reinterpret_cast(returnedValue); return result; @@ -203,9 +206,11 @@ void VrMenu::insertAction(QAction* before, QAction* action) { result = ::addItem(menu, action->text()); } else { QQuickMenuItem* returnedValue{ nullptr }; - bool invokeResult = QMetaObject::invokeMethod(menu, "insertItem", Qt::DirectConnection, - Q_RETURN_ARG(QQuickMenuItem*, returnedValue), - Q_ARG(int, index), Q_ARG(QString, action->text())); + #ifndef QT_NO_DEBUG + bool invokeResult = + #endif + QMetaObject::invokeMethod(menu, "insertItem", Qt::DirectConnection, Q_RETURN_ARG(QQuickMenuItem*, returnedValue), + Q_ARG(int, index), Q_ARG(QString, action->text())); Q_ASSERT(invokeResult); result = reinterpret_cast(returnedValue); }