Mailinglist Archive: yast-commit (819 mails)

< Previous Next >
[yast-commit] r54968 - in /trunk/qt-graph: examples/shapes.dot src/QGraph.cc
  • From: aschnell@xxxxxxxxxxxxxxxx
  • Date: Fri, 23 Jan 2009 21:44:40 -0000
  • Message-id: <E1LQTpQ-0000Gj-7X@xxxxxxxxxxxxxxxx>
Author: aschnell
Date: Fri Jan 23 22:44:39 2009
New Revision: 54968

URL: http://svn.opensuse.org/viewcvs/yast?rev=54968&view=rev
Log:
- cleanup

Modified:
trunk/qt-graph/examples/shapes.dot
trunk/qt-graph/src/QGraph.cc

Modified: trunk/qt-graph/examples/shapes.dot
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/qt-graph/examples/shapes.dot?rev=54968&r1=54967&r2=54968&view=diff
==============================================================================
--- trunk/qt-graph/examples/shapes.dot (original)
+++ trunk/qt-graph/examples/shapes.dot Fri Jan 23 22:44:39 2009
@@ -4,7 +4,7 @@

rectangle [shape="rectangle"];
diamond [shape="diamond"];
- triangle [shape="triangle"];
+
circle [shape="circle"];
ellipse [shape="ellipse"];
}

Modified: trunk/qt-graph/src/QGraph.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/qt-graph/src/QGraph.cc?rev=54968&r1=54967&r2=54968&view=diff
==============================================================================
--- trunk/qt-graph/src/QGraph.cc (original)
+++ trunk/qt-graph/src/QGraph.cc Fri Jan 23 22:44:39 2009
@@ -200,7 +200,7 @@
}
else
{
- // yuiError() << "failed to open " << filename << endl;
+ qWarning("failed to open %s", filename.c_str());
}

gvFreeContext(gvc);
@@ -212,6 +212,11 @@
{
const polygon_t* poly = (polygon_t*) ND_shape_info(node);

+ if (poly->peripheries != 1)
+ {
+ qWarning("unsupported number of peripheries %d", poly->peripheries);
+ }
+
const int sides = poly->sides;
const pointf* vertices = poly->vertices;

@@ -230,20 +235,22 @@
const char* name = ND_shape(node)->name;

if ((strcmp(name, "rectangle") == 0) ||
- (strcmp(name, "diamond") == 0) ||
- (strcmp(name, "triangle") == 0))
+ (strcmp(name, "diamond") == 0))
{
QPolygonF polygon = haha1(node);
polygon.append(polygon[0]);
path.addPolygon(polygon);
}
-
- if ((strcmp(name, "ellipse") == 0) ||
- (strcmp(name, "circle") == 0))
+ else if ((strcmp(name, "ellipse") == 0) ||
+ (strcmp(name, "circle") == 0))
{
QPolygonF polygon = haha1(node);
path.addEllipse(QRectF(polygon[0], polygon[1]));
}
+ else
+ {
+ qWarning("unsupported shape %s", name);
+ }

return path;
}

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages