Bug #18400 myx_gc_connection.cpp compile fails
Submitted: 21 Mar 2006 17:17 Modified: 4 Apr 2006 19:28
Reporter: John Yodsnukis (Basic Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Preview Severity:S2 (Serious)
Version:1.0.5beta svn revision 1218 OS:Linux (Linux (Gentoo on PPC))
Assigned to: CPU Architecture:Any

[21 Mar 2006 17:17] John Yodsnukis
Description:
Making all in source
make[3]: Entering directory `wb/mysql-gui-common/library_gc/source'
if g++ -DHAVE_CONFIG_H -I. -I. -I../.. -Wall -Wsign-compare -Wno-switch -I../ftgl/include -I../include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2   -I/usr/include/freetype2 -I../auto_arrange/include -DUSE_FONTCONFIG    -g  -MT myx_gc_connection.o -MD -MP -MF ".deps/myx_gc_connection.Tpo" -c -o myx_gc_connection.o myx_gc_connection.cpp; \
then mv -f ".deps/myx_gc_connection.Tpo" ".deps/myx_gc_connection.Po"; else rm -f ".deps/myx_gc_connection.Tpo"; exit 1; fi
myx_gc_connection.cpp: In member function `TAction* CConnectionInstance::executeAssociatedActions(TMouseButton, TMouseEvent, TModifierKey, TVertex&)':
myx_gc_connection.cpp:561: error: no matching function for call to `CFigureInstance::executeAssociatedActions(TMouseButton&, TMouseEvent&, TModifierKey&, tagVertex)'
../include/myx_gc_figure.h:418: note: candidates are: virtual TAction* CFigureInstance::executeAssociatedActions(TMouseButton, TMouseEvent, int, TVertex&)
myx_gc_connection.cpp:565: error: no matching function for call to `CFigureInstance::executeAssociatedActions(TMouseButton&, TMouseEvent&, TModifierKey&, tagVertex)'
../include/myx_gc_figure.h:418: note: candidates are: virtual TAction* CFigureInstance::executeAssociatedActions(TMouseButton, TMouseEvent, int, TVertex&)
myx_gc_connection.cpp:569: error: no matching function for call to `CFigureInstance::executeAssociatedActions(TMouseButton&, TMouseEvent&, TModifierKey&, tagVertex)'
../include/myx_gc_figure.h:418: note: candidates are: virtual TAction* CFigureInstance::executeAssociatedActions(TMouseButton, TMouseEvent, int, TVertex&)
myx_gc_connection.cpp: In member function `virtual TFeedbackInfo CConnectionInstance::getFeedbackInfo(int, TVertex&)':
myx_gc_connection.cpp:1050: error: no matching function for call to `CFigureInstance::getFeedbackInfo(int&, tagVertex)'
../include/myx_gc_figure.h:420: note: candidates are: virtual TFeedbackInfo CFigureInstance::getFeedbackInfo(int, TVertex&)
myx_gc_connection.cpp:1054: error: no matching function for call to `CFigureInstance::getFeedbackInfo(int&, tagVertex)'
../include/myx_gc_figure.h:420: note: candidates are: virtual TFeedbackInfo CFigureInstance::getFeedbackInfo(int, TVertex&)
myx_gc_connection.cpp:1058: error: no matching function for call to `CFigureInstance::getFeedbackInfo(int&, tagVertex)'
../include/myx_gc_figure.h:420: note: candidates are: virtual TFeedbackInfo CFigureInstance::getFeedbackInfo(int, TVertex&)
myx_gc_connection.cpp: In member function `virtual void CConnectionLayer::CConnectionInstanceListener::onDestroy(CGCBase*)':
myx_gc_connection.cpp:1697: warning: unused variable 'instance'
make[3]: *** [myx_gc_connection.o] Error 1
make[3]: Leaving directory `wb/mysql-gui-common/library_gc/source'

How to repeat:
svn checkout --revision 1218 http://svn.mysql.com/svnpublic/mysql-gui-common
cd ./mysql-gui-common
sh autogen.sh --enable-grt --enable-canvas --disable-java-modules
make

Suggested fix:
This is a workaround.  A proper fix is needed.

Index: mysql-gui-common/library_gc/source/myx_gc_connection.cpp
===================================================================
--- mysql-gui-common/library_gc/source/myx_gc_connection.cpp    (revision 1218)
+++ mysql-gui-common/library_gc/source/myx_gc_connection.cpp    (working copy)
@@ -557,16 +557,16 @@
   // Decorations and labels. They may not always be assigned.
   if (lastAction == NULL && FEnd1Decoration != NULL)
     lastAction = FEnd1Decoration->executeAssociatedActions(button, event, modifiers, coords);
-  if (lastAction == NULL && FEnd1Label != NULL)
-    lastAction = FEnd1Label->executeAssociatedActions(button, event, modifiers, coords - FLabel1Offset);
+//if (lastAction == NULL && FEnd1Label != NULL)
+//  lastAction = FEnd1Label->executeAssociatedActions(button, event, modifiers, coords - FLabel1Offset);
   if (lastAction == NULL && FCenterDecoration != NULL)
     lastAction = FCenterDecoration->executeAssociatedActions(button, event, modifiers, coords);
-  if (lastAction == NULL && FCenterLabel != NULL)
-    lastAction = FCenterLabel->executeAssociatedActions(button, event, modifiers, coords - FCenterLabelOffset);
+//if (lastAction == NULL && FCenterLabel != NULL)
+//  lastAction = FCenterLabel->executeAssociatedActions(button, event, modifiers, coords - FCenterLabelOffset);
   if (lastAction == NULL && FEnd2Decoration != NULL)
     lastAction = FEnd2Decoration->executeAssociatedActions(button, event, modifiers, coords);
-  if (lastAction == NULL && FEnd2Label != NULL)
-    lastAction = FEnd2Label->executeAssociatedActions(button, event, modifiers, coords - FLabel2Offset);
+//if (lastAction == NULL && FEnd2Label != NULL)
+//  lastAction = FEnd2Label->executeAssociatedActions(button, event, modifiers, coords - FLabel2Offset);

   return lastAction;
 }
@@ -1046,16 +1046,16 @@
   // Decorations and labels. They may not always be assigned.
   if (result == GC_FI_NONE && FEnd1Decoration != NULL)
     result = FEnd1Decoration->getFeedbackInfo(modifiers, coords);
-  if (result == GC_FI_NONE && FEnd1Label != NULL)
-    result = FEnd1Label->getFeedbackInfo(modifiers, coords - FLabel1Offset);
+//if (result == GC_FI_NONE && FEnd1Label != NULL)
+//  result = FEnd1Label->getFeedbackInfo(modifiers, coords - FLabel1Offset);
   if (result == GC_FI_NONE && FCenterDecoration != NULL)
     result = FCenterDecoration->getFeedbackInfo(modifiers, coords);
-  if (result == GC_FI_NONE && FCenterLabel != NULL)
-    result = FCenterLabel->getFeedbackInfo(modifiers, coords - FCenterLabelOffset);
+//if (result == GC_FI_NONE && FCenterLabel != NULL)
+//  result = FCenterLabel->getFeedbackInfo(modifiers, coords - FCenterLabelOffset);
   if (result == GC_FI_NONE && FEnd2Decoration != NULL)
     result = FEnd2Decoration->getFeedbackInfo(modifiers, coords);
-  if (result == GC_FI_NONE && FEnd2Label != NULL)
-    result = FEnd2Label->getFeedbackInfo(modifiers, coords - FLabel2Offset);
+//if (result == GC_FI_NONE && FEnd2Label != NULL)
+//  result = FEnd2Label->getFeedbackInfo(modifiers, coords - FLabel2Offset);

   if (result == GC_FI_NONE)
   {
@@ -1694,7 +1694,7 @@

 void CConnectionLayer::CConnectionInstanceListener::onDestroy(CGCBase* object)
 {
-  CConnectionInstance* instance = (CConnectionInstance*) object;
+//CConnectionInstance* instance = (CConnectionInstance*) object;
   layer->removeInstance((CConnectionInstance*) object);
 }
[4 Apr 2006 17:53] John Yodsnukis
Patch #2 for myx_gc_connection.cpp and associates

Attachment: library_gc.diff (text/x-patch), 14.55 KiB.

[4 Apr 2006 17:56] John Yodsnukis
See:
4 Apr 19:53
  	library_gc.diff
	Description: Patch #2 for myx_gc_connection.cpp and associates
File size: 14895 bytes

Let's try this patch instead.  Hey, what do you have to lose... at least it compiles.
[4 Apr 2006 19:28] John Yodsnukis
Ignore the patches in this bug report and use svn revision 1225/305 instead.  Thank you "akojima" for fixing svn!