Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/qt
diff options
context:
space:
mode:
authorvng <viktor.govako@gmail.com>2012-05-15 10:37:11 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:38:21 +0300
commitbff0fab8282df6cda8ce9b9cfbfd5c2269b6c44c (patch)
tree940c2112a3cfeb3f92790c3b39624248941f7065 /qt
parentcceb6ac23bfc8ab8ad902073889ad91fd6fe9a76 (diff)
Minor fixes - remove dummy flags.
[desktop] TODO: Check m_isInitialized, m_isTimerStarted logic.
Diffstat (limited to 'qt')
-rw-r--r--qt/draw_widget.cpp20
-rw-r--r--qt/draw_widget.hpp6
2 files changed, 7 insertions, 19 deletions
diff --git a/qt/draw_widget.cpp b/qt/draw_widget.cpp
index 7285aa9ac0..91760156e8 100644
--- a/qt/draw_widget.cpp
+++ b/qt/draw_widget.cpp
@@ -17,8 +17,6 @@ using namespace storage;
namespace qt
{
- bool s_isExiting = false;
-
QtVideoTimer::QtVideoTimer(DrawWidget * w, TFrameFn frameFn)
: ::VideoTimer(frameFn), m_widget(w)
{}
@@ -71,8 +69,6 @@ namespace qt
void DrawWidget::PrepareShutdown()
{
- s_isExiting = true;
-
m_framework->PrepareToShutdown();
m_videoTimer.reset();
}
@@ -209,7 +205,7 @@ namespace qt
void DrawWidget::initializeGL()
{
- /// we'll perform swap by ourselves, see issue #333
+ // we'll perform swap by ourselves, see issue #333
setAutoBufferSwap(false);
if (!m_isInitialized)
@@ -231,7 +227,7 @@ namespace qt
catch (yg::gl::platform_unsupported const & e)
{
LOG(LERROR, ("OpenGL platform is unsupported, reason: ", e.what()));
- /// TODO: Show "Please Update Drivers" dialog and close the program.
+ /// @todo Show "Please Update Drivers" dialog and close the program.
}
m_isInitialized = true;
@@ -242,8 +238,10 @@ namespace qt
{
m_framework->OnSize(w, h);
m_framework->Invalidate();
+
if (m_isInitialized && m_isTimerStarted)
DrawFrame();
+
UpdateScaleControl();
emit ViewportChanged();
}
@@ -252,10 +250,9 @@ namespace qt
{
if (m_isInitialized && !m_isTimerStarted)
{
- /// timer should be started upon the first repaint
- /// request to fully initialized GLWidget.
+ // timer should be started upon the first repaint request to fully initialized GLWidget.
m_isTimerStarted = true;
- m_framework->SetUpdatesEnabled(true);
+ (void)m_framework->SetUpdatesEnabled(true);
}
m_framework->Invalidate();
@@ -263,9 +260,6 @@ namespace qt
void DrawWidget::DrawFrame()
{
- if (s_isExiting)
- return;
-
if (m_framework->NeedRedraw())
{
makeCurrent();
@@ -276,7 +270,7 @@ namespace qt
m_framework->BeginPaint(paintEvent);
m_framework->DoPaint(paintEvent);
- /// swapping buffers before ending the frame, see issue #333
+ // swapping buffers before ending the frame, see issue #333
swapBuffers();
m_framework->EndPaint(paintEvent);
diff --git a/qt/draw_widget.hpp b/qt/draw_widget.hpp
index 08e719920f..a8726d8593 100644
--- a/qt/draw_widget.hpp
+++ b/qt/draw_widget.hpp
@@ -22,12 +22,10 @@ namespace qt
class QtVideoTimer : public ::VideoTimer
{
private:
-
QTimer * m_timer;
DrawWidget * m_widget;
public:
-
QtVideoTimer(DrawWidget * w, ::VideoTimer::TFrameFn frameFn);
void resume();
@@ -98,13 +96,9 @@ namespace qt
Framework & GetFramework() { return *m_framework.get(); }
protected:
-
VideoTimer * CreateVideoTimer();
- static const uint32_t ini_file_version = 0;
-
protected:
-
/// @name Overriden from base_type.
//@{
virtual void initializeGL();