Commit 8fb964d4 authored by Mathias Goldau's avatar Mathias Goldau
Browse files

[MERGE]

parents ed1e7d50 81beaff4
......@@ -22,7 +22,11 @@
//
//---------------------------------------------------------------------------
#if (( defined( __linux__ ) && defined( __GNUC__ )) || defined ( __APPLE__ ))
#if (( defined( __linux__ ) && defined( __GNUC__ )) || defined( __APPLE__ ))
#define BACKTRACE_SUPPORTED
#endif
#ifdef BACKTRACE_SUPPORTED
// This is highly platform dependent. Used for backtrace functionality.
#include <execinfo.h>
#include <cxxabi.h>
......@@ -105,7 +109,7 @@ std::string WException::getBacktrace() const
// print trace here
std::ostringstream o;
#if (( defined( __linux__ ) && defined( __GNUC__ )) || defined( __APPLE__))
#ifdef BACKTRACE_SUPPORTED
// This is highly platform dependent. It MIGHT also work on BSD and other unix.
// Automatic callstack backtrace
......@@ -186,7 +190,8 @@ std::string WException::getBacktrace() const
// backtrace_symbols malloc()ed some mem -> we NEED to use free()
free( stackSymbols );
#else
o << "Backtrace not supported on your platform. Currently just works on Linux with GCC. Sorry!";
o << "Backtrace not supported on your platform. Currently just works on Linux and MacOS with GCC. Sorry!" << std::endl
<< "Message was: " << what();
#endif
return o.str();
......
......@@ -205,7 +205,10 @@ void WQtGLWidget::resizeGL( int width, int height )
void WQtGLWidget::paintGL()
{
// m_Viewer->paint();
#ifdef IS_A_QGLWIDGET
// if the parent is a GL widget, issue parent method.
WQtGLWidgetParent::paintGL();
#endif
}
void WQtGLWidget::resizeEvent( QResizeEvent* event )
......@@ -218,7 +221,10 @@ void WQtGLWidget::resizeEvent( QResizeEvent* event )
void WQtGLWidget::resizeGL( int width, int height )
{
// m_Viewer->resize( width, height );
#ifdef IS_A_QGLWIDGET
// if the parent is a GL widget, issue parent method.
WQtGLWidgetParent::resizeGL( width, height );
#endif
}
#endif
......
......@@ -44,6 +44,7 @@
class WSettingAction;
#ifndef _WIN32
#define IS_A_QGLWIDGET
typedef QGLWidget WQtGLWidgetParent;
#else
typedef QWidget WQtGLWidgetParent;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment