remove unused references to QGLWidget* parent in Overlay and Overlays

This commit is contained in:
ZappoMan 2015-02-25 12:34:38 -08:00
parent a89691fc66
commit d1e648b392
6 changed files with 6 additions and 16 deletions

View file

@ -473,7 +473,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) :
checkVersion();
_overlays.init(_glWidget); // do this before scripts load
_overlays.init(); // do this before scripts load
_runningScriptsWidget->setRunningScripts(getRunningScripts());
connect(_runningScriptsWidget, &RunningScriptsWidget::stopScriptName, this, &Application::stopScript);

View file

@ -12,8 +12,6 @@
#include <QStyle>
#include <QStyleOptionTitleBar>
//#include "DependencyManager.h"
#include "Application.h"
#include "GLCanvas.h"
#include "UIUtil.h"
@ -45,8 +43,6 @@ int UIUtil::getWindowTitleBarHeight(const QWidget* window) {
// this function at all. If you mix both you will end up with inconsistent results
// across platforms.
void UIUtil::scaleWidgetFontSizes(QWidget* widget) {
auto glCanvas = Application::getInstance()->getGLWidget();
// This is the base dpi that we are targetting. This is based on Mac OSXs default DPI,
// and is the basis for all font sizes.
const float BASE_DPI = 72.0f;

View file

@ -20,7 +20,6 @@
Overlay::Overlay() :
_parent(NULL),
_isLoaded(true),
_alpha(DEFAULT_ALPHA),
_glowLevel(0.0f),
@ -40,7 +39,6 @@ Overlay::Overlay() :
}
Overlay::Overlay(const Overlay* overlay) :
_parent(NULL),
_isLoaded(overlay->_isLoaded),
_alpha(overlay->_alpha),
_glowLevel(overlay->_glowLevel),
@ -60,8 +58,7 @@ Overlay::Overlay(const Overlay* overlay) :
{
}
void Overlay::init(QGLWidget* parent, QScriptEngine* scriptEngine) {
_parent = parent;
void Overlay::init(QScriptEngine* scriptEngine) {
_scriptEngine = scriptEngine;
}

View file

@ -38,7 +38,7 @@ public:
Overlay();
Overlay(const Overlay* overlay);
~Overlay();
void init(QGLWidget* parent, QScriptEngine* scriptEngine);
void init(QScriptEngine* scriptEngine);
virtual void update(float deltatime) {}
virtual void render(RenderArgs* args) = 0;
@ -85,7 +85,6 @@ public:
protected:
float updatePulse();
QGLWidget* _parent;
bool _isLoaded;
float _alpha;
float _glowLevel;

View file

@ -58,8 +58,7 @@ Overlays::~Overlays() {
}
void Overlays::init(QGLWidget* parent) {
_parent = parent;
void Overlays::init() {
_scriptEngine = new QScriptEngine();
}
@ -202,7 +201,7 @@ unsigned int Overlays::addOverlay(const QString& type, const QScriptValue& prope
}
unsigned int Overlays::addOverlay(Overlay* overlay) {
overlay->init(_parent, _scriptEngine);
overlay->init(_scriptEngine);
QWriteLocker lock(&_lock);
unsigned int thisID = _nextOverlayID;

View file

@ -51,7 +51,7 @@ class Overlays : public QObject {
public:
Overlays();
~Overlays();
void init(QGLWidget* parent);
void init();
void update(float deltatime);
void renderWorld(bool drawFront, RenderArgs::RenderMode renderMode = RenderArgs::DEFAULT_RENDER_MODE,
RenderArgs::RenderSide renderSide = RenderArgs::MONO);
@ -95,7 +95,6 @@ private:
QMap<unsigned int, Overlay*> _overlaysWorld;
QList<Overlay*> _overlaysToDelete;
unsigned int _nextOverlayID;
QGLWidget* _parent;
QReadWriteLock _lock;
QReadWriteLock _deleteLock;
QScriptEngine* _scriptEngine;