Hello community,
here is the log from the commit of package libyui-qt-graph for openSUSE:Factory
checked in at 2019-12-07 15:12:12
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libyui-qt-graph (Old)
and /work/SRC/openSUSE:Factory/.libyui-qt-graph.new.4691 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libyui-qt-graph"
Sat Dec 7 15:12:12 2019 rev:25 rq:752937 version:2.45.5
Changes:
--------
--- /work/SRC/openSUSE:Factory/libyui-qt-graph/libyui-qt-graph.changes
2019-09-23 13:16:15.697117402 +0200
+++
/work/SRC/openSUSE:Factory/.libyui-qt-graph.new.4691/libyui-qt-graph.changes
2019-12-07 15:12:39.427819048 +0100
@@ -1,0 +2,12 @@
+Mon Dec 2 12:46:46 UTC 2019 - Martin Vidner <[email protected]>
+
+- Do not require graphviz-devel for the doc package (bsc#1157916)
+- 2.45.5
+
+-------------------------------------------------------------------
+Thu Nov 28 12:51:31 CET 2019 - [email protected]
+
+- Respect backslashes (graphviz escString) in texts (bsc#1157916)
+- 2.45.4
+
+-------------------------------------------------------------------
Old:
----
libyui-qt-graph-2.45.3.tar.bz2
New:
----
libyui-qt-graph-2.45.5.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libyui-qt-graph-doc.spec ++++++
--- /var/tmp/diff_new_pack.lA4Xro/_old 2019-12-07 15:12:41.215818795 +0100
+++ /var/tmp/diff_new_pack.lA4Xro/_new 2019-12-07 15:12:41.219818795 +0100
@@ -20,7 +20,7 @@
%define so_version 10
Name: %{parent}-doc
-Version: 2.45.3
+Version: 2.45.5
Release: 0
Source: %{parent}-%{version}.tar.bz2
++++++ libyui-qt-graph.spec ++++++
--- /var/tmp/diff_new_pack.lA4Xro/_old 2019-12-07 15:12:41.235818792 +0100
+++ /var/tmp/diff_new_pack.lA4Xro/_new 2019-12-07 15:12:41.239818792 +0100
@@ -17,7 +17,7 @@
Name: libyui-qt-graph
-Version: 2.45.3
+Version: 2.45.5
Release: 0
Source: %{name}-%{version}.tar.bz2
++++++ libyui-qt-graph-2.45.3.tar.bz2 -> libyui-qt-graph-2.45.5.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libyui-qt-graph-2.45.3/Libyui-qt-graphLibgvc.cmake
new/libyui-qt-graph-2.45.5/Libyui-qt-graphLibgvc.cmake
--- old/libyui-qt-graph-2.45.3/Libyui-qt-graphLibgvc.cmake 2019-09-17
13:26:22.000000000 +0200
+++ new/libyui-qt-graph-2.45.5/Libyui-qt-graphLibgvc.cmake 2019-12-02
14:01:24.000000000 +0100
@@ -1,8 +1,14 @@
# find the correct libraries depending on libgvc's version
MACRO( SET_LIBGVS_LIBS )
- EXEC_PROGRAM(/usr/bin/pkg-config ARGS \"libgvc\" \"--libs\"
OUTPUT_VARIABLE _tmp)
- STRING(REPLACE " \n" "" _tmp "${_tmp}")
+ EXECUTE_PROCESS(COMMAND /usr/bin/pkg-config --libs libgvc
+ RESULT_VARIABLE _exit
+ OUTPUT_VARIABLE _tmp
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+ IF(${_exit} GREATER 0 AND NOT ${DOCS_ONLY})
+ MESSAGE(FATAL_ERROR "Install graphviz-devel")
+ ENDIF()
STRING(REPLACE "-l" "" _tmp "${_tmp}")
SEPARATE_ARGUMENTS(_tmp)
SET( LIB_LINKER ${_tmp} )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libyui-qt-graph-2.45.3/VERSION.cmake
new/libyui-qt-graph-2.45.5/VERSION.cmake
--- old/libyui-qt-graph-2.45.3/VERSION.cmake 2019-09-17 13:26:22.000000000
+0200
+++ new/libyui-qt-graph-2.45.5/VERSION.cmake 2019-12-02 14:01:24.000000000
+0100
@@ -1,6 +1,6 @@
SET(VERSION_MAJOR "2")
SET(VERSION_MINOR "45")
-SET(VERSION_PATCH "3")
+SET(VERSION_PATCH "5")
SET( VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}" )
##### This is need for the libyui core, ONLY.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/libyui-qt-graph-2.45.3/package/libyui-qt-graph-doc.spec
new/libyui-qt-graph-2.45.5/package/libyui-qt-graph-doc.spec
--- old/libyui-qt-graph-2.45.3/package/libyui-qt-graph-doc.spec 2019-09-17
13:26:22.000000000 +0200
+++ new/libyui-qt-graph-2.45.5/package/libyui-qt-graph-doc.spec 2019-12-02
14:01:24.000000000 +0100
@@ -20,7 +20,7 @@
%define so_version 10
Name: %{parent}-doc
-Version: 2.45.3
+Version: 2.45.5
Release: 0
Source: %{parent}-%{version}.tar.bz2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/libyui-qt-graph-2.45.3/package/libyui-qt-graph.changes
new/libyui-qt-graph-2.45.5/package/libyui-qt-graph.changes
--- old/libyui-qt-graph-2.45.3/package/libyui-qt-graph.changes 2019-09-17
13:26:22.000000000 +0200
+++ new/libyui-qt-graph-2.45.5/package/libyui-qt-graph.changes 2019-12-02
14:01:24.000000000 +0100
@@ -1,4 +1,16 @@
-------------------------------------------------------------------
+Mon Dec 2 12:46:46 UTC 2019 - Martin Vidner <[email protected]>
+
+- Do not require graphviz-devel for the doc package (bsc#1157916)
+- 2.45.5
+
+-------------------------------------------------------------------
+Thu Nov 28 12:51:31 CET 2019 - [email protected]
+
+- Respect backslashes (graphviz escString) in texts (bsc#1157916)
+- 2.45.4
+
+-------------------------------------------------------------------
Thu Sep 12 14:29:09 UTC 2019 - Martin Vidner <[email protected]>
- Make scroll-up mean zoom-in (bsc#1149158)
@@ -21,7 +33,7 @@
Fri Apr 12 08:15:46 UTC 2019 - Rodion Iafarov <[email protected]>
- Bump the .so version to 10 to be compatible with the other libyui
-packages (bsc#1132247)
+ packages (bsc#1132247)
- 2.45.0
-------------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libyui-qt-graph-2.45.3/package/libyui-qt-graph.spec
new/libyui-qt-graph-2.45.5/package/libyui-qt-graph.spec
--- old/libyui-qt-graph-2.45.3/package/libyui-qt-graph.spec 2019-09-17
13:26:22.000000000 +0200
+++ new/libyui-qt-graph-2.45.5/package/libyui-qt-graph.spec 2019-12-02
14:01:24.000000000 +0100
@@ -17,7 +17,7 @@
Name: libyui-qt-graph
-Version: 2.45.3
+Version: 2.45.5
Release: 0
Source: %{name}-%{version}.tar.bz2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libyui-qt-graph-2.45.3/src/QY2Graph.cc
new/libyui-qt-graph-2.45.5/src/QY2Graph.cc
--- old/libyui-qt-graph-2.45.3/src/QY2Graph.cc 2019-09-17 13:26:22.000000000
+0200
+++ new/libyui-qt-graph-2.45.5/src/QY2Graph.cc 2019-12-02 14:01:24.000000000
+0100
@@ -154,7 +154,7 @@
const char* tmp = agget(obj, const_cast<char*>(name));
if (tmp == NULL || strlen(tmp) == 0)
return fallback;
- return QString::fromUtf8(tmp);
+ return unescape(tmp);
}
@@ -336,7 +336,7 @@
painter->setFont(font);
- QString text(QString::fromUtf8(textlabel->text));
+ QString text(unescape(textlabel->text));
QFontMetricsF fm(painter->fontMetrics());
QRectF rect(fm.boundingRect(text));
rect.moveCenter(gToQ(textlabel->pos, false));
@@ -395,10 +395,7 @@
QString tooltip = aggetToQString(node, "tooltip", "");
if (!tooltip.isEmpty())
- {
- tooltip.replace("\\n", "\n");
item->setToolTip(tooltip);
- }
scene->addItem(item);
@@ -442,6 +439,52 @@
}
+QString
+QY2Graph::unescape(const std::string& s) const
+{
+ std::string r;
+
+ bool backslashed = false;
+
+ for (const char c : s)
+ {
+ if (!backslashed)
+ {
+ switch (c)
+ {
+ case '\\':
+ backslashed = true;
+ break;
+
+ default:
+ r += c;
+ break;
+ }
+ }
+ else
+ {
+ switch (c)
+ {
+ // treat \n, \l and \r as newline (without alignment
information)
+ case 'n':
+ case 'l':
+ case 'r':
+ r += '\n';
+ break;
+
+ default:
+ r += c;
+ break;
+ }
+
+ backslashed = false;
+ }
+ }
+
+ return QString::fromUtf8(r.c_str());
+}
+
+
QY2Node::QY2Node(const QPainterPath& path, const QPicture& picture, const
QString& name)
: QGraphicsPathItem(path),
picture(picture),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libyui-qt-graph-2.45.3/src/QY2Graph.h
new/libyui-qt-graph-2.45.5/src/QY2Graph.h
--- old/libyui-qt-graph-2.45.3/src/QY2Graph.h 2019-09-17 13:26:22.000000000
+0200
+++ new/libyui-qt-graph-2.45.5/src/QY2Graph.h 2019-12-02 14:01:24.000000000
+0100
@@ -92,6 +92,15 @@
void drawArrow(const QLineF& line, const QColor& color, QPainter* painter)
const;
+ /**
+ * Unescape a graphviz escString and transform to QString (assuming UTF-8).
+ *
+ * Only a few special substrings are supported, mainly \n and \\.
+ *
+ * See https://graphviz.gitlab.io/_pages/doc/info/attrs.html#k:escString.
+ */
+ QString unescape(const std::string&) const;
+
};