Fix const correctness

This commit is contained in:
wmayer 2013-04-26 17:08:05 +02:00
parent c1e90feb0a
commit a40bac2bc2
2 changed files with 6 additions and 6 deletions

View File

@ -799,19 +799,19 @@ Gui::Document* Application::getDocument(const App::Document* pDoc) const
return 0; return 0;
} }
void Application::showViewProvider(App::DocumentObject* obj) void Application::showViewProvider(const App::DocumentObject* obj)
{ {
ViewProvider* vp = getViewProvider(obj); ViewProvider* vp = getViewProvider(obj);
if (vp) vp->show(); if (vp) vp->show();
} }
void Application::hideViewProvider(App::DocumentObject* obj) void Application::hideViewProvider(const App::DocumentObject* obj)
{ {
ViewProvider* vp = getViewProvider(obj); ViewProvider* vp = getViewProvider(obj);
if (vp) vp->hide(); if (vp) vp->hide();
} }
Gui::ViewProvider* Application::getViewProvider(App::DocumentObject* obj) const Gui::ViewProvider* Application::getViewProvider(const App::DocumentObject* obj) const
{ {
App::Document* doc = obj->getDocument(); App::Document* doc = obj->getDocument();
if (doc) { if (doc) {

View File

@ -148,11 +148,11 @@ public:
*/ */
Gui::Document* getDocument(const App::Document* pDoc) const; Gui::Document* getDocument(const App::Document* pDoc) const;
/// Shows the associated view provider of the given object /// Shows the associated view provider of the given object
void showViewProvider(App::DocumentObject*); void showViewProvider(const App::DocumentObject*);
/// Hides the associated view provider of the given object /// Hides the associated view provider of the given object
void hideViewProvider(App::DocumentObject*); void hideViewProvider(const App::DocumentObject*);
/// Get the view provider of the given object /// Get the view provider of the given object
Gui::ViewProvider* getViewProvider(App::DocumentObject*) const; Gui::ViewProvider* getViewProvider(const App::DocumentObject*) const;
//@} //@}
/// true when the application shuting down /// true when the application shuting down