Commit 4d2c93f2 authored by Mario Hlawitschka's avatar Mario Hlawitschka
Browse files

[CHANGE] minor code changes which should not affect the code

parent 918921da
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#include <string> #include <string>
#include <algorithm>
#include <boost/lexical_cast.hpp> #include <boost/lexical_cast.hpp>
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
#define OPENWALNUT_BUGREPORTER_URL "http://www.openwalnut.org/projects/openwalnut/issues" #define OPENWALNUT_BUGREPORTER_URL "http://www.openwalnut.org/projects/openwalnut/issues"
WApplication::WApplication( int argc, char** argv, bool GUIenabled ) WApplication::WApplication( int &argc, char** argv, bool GUIenabled )
: QApplication( argc, argv, GUIenabled ) : QApplication( argc, argv, GUIenabled )
, myMainWidget( 0 ) , myMainWidget( 0 )
{ {
......
...@@ -37,17 +37,25 @@ class WApplication : public QApplication ...@@ -37,17 +37,25 @@ class WApplication : public QApplication
{ {
Q_OBJECT Q_OBJECT
public: public:
/** default constructor, see QApplication */ /**
WApplication( int argc, char** argv, bool GUIenabled = true ); * default constructor, see QApplication
* \param argc number of arguments (may be modified internally)
* \param argv values of arguments (may be modified interanlly)
* \param GUIenabled true if we want a gui
*/
WApplication( int & argc, char** argv, bool GUIenabled = true );
/** manage save dialogs when the session manager asks us to /** manage save dialogs when the session manager asks us to
* take care of our data. * take care of our data.
* This is an overloaded function from QT. * This is an overloaded function from QT.
* \param manager the session manager
*/ */
virtual void commitData( QSessionManager& manager ); // NOLINT virtual void commitData( QSessionManager& manager ); // NOLINT
/** /**
* store the main widget for error reporting and session management * store the main widget for error reporting and session management
* \param widget the main widget used, e.g., when application data
* should be stored
*/ */
void setMyMainWidget( QWidget* widget ); void setMyMainWidget( QWidget* widget );
...@@ -57,6 +65,9 @@ public: ...@@ -57,6 +65,9 @@ public:
virtual bool notify( QObject* receiver, QEvent* e ); virtual bool notify( QObject* receiver, QEvent* e );
protected: protected:
/**
* reference to the main widget set by setMyMainWidget
*/
QWidget* myMainWidget; QWidget* myMainWidget;
}; };
......
...@@ -907,6 +907,7 @@ void WMainWindow::customEvent( QEvent* event ) ...@@ -907,6 +907,7 @@ void WMainWindow::customEvent( QEvent* event )
// restore state and geometry // restore state and geometry
m_glDock->restoreDockWidget( widget.get() ); m_glDock->restoreDockWidget( widget.get() );
//TODO(mario): is there a fallback if the configuration is "stupid" or not set?
// store it in CustomDockWidget list // store it in CustomDockWidget list
m_customDockWidgets.insert( make_pair( title, widget ) ); m_customDockWidgets.insert( make_pair( title, widget ) );
...@@ -919,7 +920,7 @@ void WMainWindow::customEvent( QEvent* event ) ...@@ -919,7 +920,7 @@ void WMainWindow::customEvent( QEvent* event )
ocdwEvent->getFlag()->set( widget ); ocdwEvent->getFlag()->set( widget );
} }
if( event->type() == WCloseCustomDockWidgetEvent::CUSTOM_TYPE ) else if( event->type() == WCloseCustomDockWidgetEvent::CUSTOM_TYPE )
{ {
WCloseCustomDockWidgetEvent* closeEvent = static_cast< WCloseCustomDockWidgetEvent* >( event ); WCloseCustomDockWidgetEvent* closeEvent = static_cast< WCloseCustomDockWidgetEvent* >( event );
boost::mutex::scoped_lock lock( m_customDockWidgetsLock ); boost::mutex::scoped_lock lock( m_customDockWidgetsLock );
......
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