[Uml-devel] KDE/kdesdk/umbrello/umbrello

Christian Ehrlicher Ch.Ehrlicher at gmx.de
Sun Oct 14 13:02:55 UTC 2007


SVN commit 725070 by chehrlic:

fix a crash in exportallviewsdialog.cpp (introduced be my former commit)
some qt3support--

 M  +1 -1      dialogs/exportallviewsdialog.cpp  
 M  +3 -2      objectwidget.cpp  
 M  +6 -8      pluginloader.cpp  
 M  +1 -1      statewidget.cpp  
 M  +2 -1      textblock.cpp  


--- trunk/KDE/kdesdk/umbrello/umbrello/dialogs/exportallviewsdialog.cpp #725069:725070
@@ -36,11 +36,11 @@
     setupUi(this);
 
     // create and initialize m_imageType
+    m_imageType = new KFileFilterCombo(this);
     QSizePolicy sp(QSizePolicy::Preferred, QSizePolicy::Fixed);
     sp.setHorizontalStretch(0);
     sp.setVerticalStretch(0);
     sp.setHeightForWidth(m_imageType->sizePolicy().hasHeightForWidth());
-    m_imageType = new KFileFilterCombo(this);
     m_imageType->setSizePolicy(sp);
     m_imageType->setEditable(false);
 
--- trunk/KDE/kdesdk/umbrello/umbrello/objectwidget.cpp #725069:725070
@@ -179,7 +179,8 @@
     moveEvent(0);
 }
 
-void ObjectWidget::moveEvent(QMoveEvent */*m*/) {
+void ObjectWidget::moveEvent(QMoveEvent *m) {
+    Q_UNUSED(m)
     emit sigWidgetMoved( m_nLocalID );
     if (m_pLine) {
         const int x = getX();    // for debugging: gdb has a problem evaluating getX() etc
@@ -215,7 +216,7 @@
         docwindow->showDocumentation(this, true);
         UMLApp::app()->getDocument()->setModified(true);
     }
-    dlg->close(true);//wipe from memory
+    dlg->close();
 }
 
 void ObjectWidget::drawObject(QPainter & p, int offsetX, int offsetY) {
--- trunk/KDE/kdesdk/umbrello/umbrello/pluginloader.cpp #725069:725070
@@ -64,13 +64,13 @@
     // if the plugin has already been loaded, increment
     // its reference and return.
     if((it = _plugins.find(name)) != _plugins.end()) {
-        plugin = it.data();
+        plugin = it.value();
         plugin->ref();
         return plugin;
     }
 
     // use KLibLoader to get a reference to the library
-    lib = KLibLoader::self()->library(name.latin1());
+    lib = KLibLoader::self()->library(name);
     if(!lib) {
         kError() << "failed loading plugin library " << name << endl;
         success = false;
@@ -127,18 +127,16 @@
 Plugin *
 PluginLoader::findPlugin(const QString &name)
 {
-    Plugin *ret = NULL;
     PluginMap::iterator it = _plugins.find(name);
-    if(it != _plugins.end()) {
-        ret = it.data();
-    }
-    return ret;
+    if(it != _plugins.end())
+        return it.value();
+    return NULL;
 }
 
 void
 PluginLoader::unloadPlugin(const QString &name)
 {
-    KLibLoader::self()->unloadLibrary(name.latin1());
+    KLibLoader::self()->unloadLibrary(name);
 }
 
 const PluginLoader::PluginMap &
--- trunk/KDE/kdesdk/umbrello/umbrello/statewidget.cpp #725069:725070
@@ -206,7 +206,7 @@
 
 bool StateWidget::renameActivity( const QString &activity, const QString &newName ) {
     int index = - 1;
-    if( ( index = m_Activities.findIndex( activity ) ) == -1 )
+    if( ( index = m_Activities.indexOf( activity ) ) == -1 )
         return false;
     m_Activities[ index ] = newName;
     return true;
--- trunk/KDE/kdesdk/umbrello/umbrello/textblock.cpp #725069:725070
@@ -31,8 +31,9 @@
 //
 
 TextBlock::TextBlock ( CodeDocument * parent, const QString & text )
-        : QObject ( (QObject *)parent, "textBlock")
+        : QObject ( parent )
 {
+    setObjectName( "textBlock" );
     initFields(parent);
     setText(text);
 }




More information about the umbrello-devel mailing list