[Uml-devel] kdesdk/umbrello/umbrello
Jonathan Riddell
jri at jriddell.org
Sun Apr 20 13:47:08 UTC 2003
CVS commit by jriddell:
Fixed bug 57200, Segfault associated with empty Work Toolbar
over reliance on parent() removed
M +5 -5 uml.cpp 1.34
M +1 -1 uml.h 1.16
M +2 -2 worktoolbar.cpp 1.18
--- kdesdk/umbrello/umbrello/uml.cpp #1.33:1.34
@@ -55,5 +55,5 @@ using Umbrello::RefactoringAssistant;
UMLApp::UMLApp(QWidget* , const char* name):KDockMainWindow(0, name) {
- _instance = this;
+ s_instance = this;
m_pDocWindow = 0;
config=kapp->config();
@@ -125,5 +125,5 @@ UMLApp::~UMLApp() {
UMLApp* UMLApp::app()
{
- return _instance;
+ return s_instance;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -1428,5 +1428,5 @@ QPopupMenu* UMLApp::findMenu(QMenuData*
//static pointer, holding the unique instance
-UMLApp* UMLApp::_instance;
+UMLApp* UMLApp::s_instance;
#include "uml.moc"
--- kdesdk/umbrello/umbrello/uml.h #1.15:1.16
@@ -583,5 +583,5 @@ public slots:
private:
- static UMLApp* _instance;
+ static UMLApp* s_instance;
/**
* to slect the active language
--- kdesdk/umbrello/umbrello/worktoolbar.cpp #1.17:1.18
@@ -206,5 +206,5 @@ void WorkToolBar::slotCheckToolBar(Uml::
void WorkToolBar::buttonChanged(int b) {
- UMLView *view = ((UMLApp*) parent()->parent())->getDocument()->getCurrentView();
+ UMLView* view = UMLApp::app()->getDocument()->getCurrentView();
QCursor curs;
//if trying to turn off arrow - stop it
@@ -252,5 +252,5 @@ void WorkToolBar::slotResetToolBar() {
curs.setShape(Qt::ArrowCursor);
- UMLView *view = ((UMLApp*) parent()->parent())->getDocument()->getCurrentView();
+ UMLView* view = UMLApp::app()->getDocument()->getCurrentView();
if (view != NULL) {
view -> setCursor(curs);
More information about the umbrello-devel
mailing list