[Ktutorial-commits] SF.net SVN: ktutorial:[291] trunk/ktutorial/ktutorial-editor/src/view
Status: Alpha
Brought to you by:
danxuliu
|
From: <dan...@us...> - 2011-03-08 04:54:54
|
Revision: 291
http://ktutorial.svn.sourceforge.net/ktutorial/?rev=291&view=rev
Author: danxuliu
Date: 2011-03-08 04:54:47 +0000 (Tue, 08 Mar 2011)
Log Message:
-----------
Register also unnamed remote objects to avoid trying to register them again when a child is added to their parent.
Modified Paths:
--------------
trunk/ktutorial/ktutorial-editor/src/view/RemoteObjectNameWidget.cpp
trunk/ktutorial/ktutorial-editor/src/view/RemoteObjectNameWidget.h
Modified: trunk/ktutorial/ktutorial-editor/src/view/RemoteObjectNameWidget.cpp
===================================================================
--- trunk/ktutorial/ktutorial-editor/src/view/RemoteObjectNameWidget.cpp 2011-03-08 02:59:37 UTC (rev 290)
+++ trunk/ktutorial/ktutorial-editor/src/view/RemoteObjectNameWidget.cpp 2011-03-08 04:54:47 UTC (rev 291)
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2010 by Daniel Calviño Sánchez *
+ * Copyright (C) 2010-2011 by Daniel Calviño Sánchez *
* dan...@gm... *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -76,12 +76,13 @@
throw (DBusException) {
Q_ASSERT(remoteObject);
+ mRemoteObjectForParent.insert(parent, remoteObject);
+
if (!remoteObject->name().isEmpty()) {
KCompletion* completion = ui->objectNameLineEdit->completionObject();
completion->addItem(remoteObject->name());
mRemoteObjectForName.insert(remoteObject->name(), remoteObject);
- mRemoteObjectForParent.insert(parent, remoteObject);
}
foreach (RemoteObject* child, remoteObject->children()) {
Modified: trunk/ktutorial/ktutorial-editor/src/view/RemoteObjectNameWidget.h
===================================================================
--- trunk/ktutorial/ktutorial-editor/src/view/RemoteObjectNameWidget.h 2011-03-08 02:59:37 UTC (rev 290)
+++ trunk/ktutorial/ktutorial-editor/src/view/RemoteObjectNameWidget.h 2011-03-08 04:54:47 UTC (rev 291)
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2010 by Daniel Calviño Sánchez *
+ * Copyright (C) 2010-2011 by Daniel Calviño Sánchez *
* dan...@gm... *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -94,7 +94,7 @@
QHash<QString, RemoteObject*> mRemoteObjectForName;
/**
- * The known RemoteObjects with a name indexed by their parent
+ * The known RemoteObjects (with and without name) indexed by their parent.
*/
QMultiHash<RemoteObject*, RemoteObject*> mRemoteObjectForParent;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|