Hello community,

here is the log from the commit of package umbrello for openSUSE:Factory 
checked in at 2016-02-23 16:57:12
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/umbrello (Old)
 and      /work/SRC/openSUSE:Factory/.umbrello.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "umbrello"

Changes:
--------
--- /work/SRC/openSUSE:Factory/umbrello/umbrello.changes        2016-01-28 
17:22:28.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.umbrello.new/umbrello.changes   2016-02-23 
16:57:23.000000000 +0100
@@ -1,0 +2,9 @@
+Sat Feb 13 08:27:25 UTC 2016 - tittiatc...@gmail.com
+
+- Update to KDE Applications 15.12.2
+   * KDE Applications 15.12.2 
+   * https://www.kde.org/announcements/announce-applications-15.12.2.php
+   * boo#966605
+
+
+-------------------------------------------------------------------

Old:
----
  umbrello-15.12.1.tar.xz

New:
----
  umbrello-15.12.2.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ umbrello.spec ++++++
--- /var/tmp/diff_new_pack.SvdZa7/_old  2016-02-23 16:57:24.000000000 +0100
+++ /var/tmp/diff_new_pack.SvdZa7/_new  2016-02-23 16:57:24.000000000 +0100
@@ -24,7 +24,7 @@
 License:        GPL-2.0 and GFDL-1.2
 Group:          Development/Tools/Other
 Url:            http://www.kde.org/
-Version:        15.12.1
+Version:        15.12.2
 Release:        0
 Source0:        %{name}-%{version}.tar.xz
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ umbrello-15.12.1.tar.xz -> umbrello-15.12.2.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/umbrello-15.12.1/CMakeLists.txt 
new/umbrello-15.12.2/CMakeLists.txt
--- old/umbrello-15.12.1/CMakeLists.txt 2016-01-07 00:18:00.000000000 +0100
+++ new/umbrello-15.12.2/CMakeLists.txt 2016-02-12 06:23:36.000000000 +0100
@@ -3,7 +3,7 @@
 # KDE Application Version, managed by release script
 set (KDE_APPLICATIONS_VERSION_MAJOR "15")
 set (KDE_APPLICATIONS_VERSION_MINOR "12")
-set (KDE_APPLICATIONS_VERSION_MICRO "1")
+set (KDE_APPLICATIONS_VERSION_MICRO "2")
 
 set(UMBRELLO_VERSION_MAJOR "2")
 set(UMBRELLO_VERSION_MINOR "18")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/umbrello-15.12.1/lib/cppparser/parser.cpp 
new/umbrello-15.12.2/lib/cppparser/parser.cpp
--- old/umbrello-15.12.1/lib/cppparser/parser.cpp       2016-01-07 
00:18:00.000000000 +0100
+++ new/umbrello-15.12.2/lib/cppparser/parser.cpp       2016-02-12 
06:23:36.000000000 +0100
@@ -445,8 +445,15 @@
     m_problems = 0;
     TranslationUnitAST::Node tun = CreateNode<TranslationUnitAST>();
     node = tun;
+    // only setup file comment if present at first line, and first column
     if (lex->lookAhead(0) == Token_comment) {
-        node->setComment(lex->lookAhead(0).text());
+        processComment();
+        if (lex->lookAhead(0).position() == 0) {
+            if (comment()) {
+                tun->setComment(comment());
+                clearComment();
+            }
+        }
         nextToken();
     }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/umbrello-15.12.1/test/import/cxx/comments-class-enums.h 
new/umbrello-15.12.2/test/import/cxx/comments-class-enums.h
--- old/umbrello-15.12.1/test/import/cxx/comments-class-enums.h 1970-01-01 
01:00:00.000000000 +0100
+++ new/umbrello-15.12.2/test/import/cxx/comments-class-enums.h 2016-02-12 
06:23:36.000000000 +0100
@@ -0,0 +1,16 @@
+
+// class comments_class_enum_test
+class comments_class_enum_test {
+public:
+    // enim test c++ style single line comment
+    enum test1 { A, B, C};
+
+    /*
+     * enum test2
+     * c-style multi line comment
+     */
+    enum test2 { A, B, C};
+
+    /* enum test3 c-style single lime comment */
+    enum test3 { A, B, C};
+};
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/umbrello-15.12.1/test/import/cxx/comments-class-members.h 
new/umbrello-15.12.2/test/import/cxx/comments-class-members.h
--- old/umbrello-15.12.1/test/import/cxx/comments-class-members.h       
1970-01-01 01:00:00.000000000 +0100
+++ new/umbrello-15.12.2/test/import/cxx/comments-class-members.h       
2016-02-12 06:23:36.000000000 +0100
@@ -0,0 +1,16 @@
+
+// class comments_class_members_test
+class comments_class_members_test {
+public:
+    // member variable1 c++ style single line comment
+    int variable1;
+
+    /*
+     * member variable2
+     * c-style multi line comment
+     */
+    int variable2;
+
+    /* member variable3 c-style single lime comment */
+    int variable3;
+};
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/umbrello-15.12.1/test/import/cxx/comments-class-methods.h 
new/umbrello-15.12.2/test/import/cxx/comments-class-methods.h
--- old/umbrello-15.12.1/test/import/cxx/comments-class-methods.h       
1970-01-01 01:00:00.000000000 +0100
+++ new/umbrello-15.12.2/test/import/cxx/comments-class-methods.h       
2016-02-12 06:23:36.000000000 +0100
@@ -0,0 +1,16 @@
+
+// class comments_class_methods_test
+class comments_class_methods_test {
+public:
+    // method test0 c++ style single line comment
+    void test0();
+
+    /**
+     * method test1
+     * c-style multiline comment
+     */
+    void test1(char *);
+
+    /* method test2 c-style single line comment */
+    void test(char c);
+};
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/umbrello-15.12.1/test/import/cxx/comments-class-typedefs.h 
new/umbrello-15.12.2/test/import/cxx/comments-class-typedefs.h
--- old/umbrello-15.12.1/test/import/cxx/comments-class-typedefs.h      
1970-01-01 01:00:00.000000000 +0100
+++ new/umbrello-15.12.2/test/import/cxx/comments-class-typedefs.h      
2016-02-12 06:23:36.000000000 +0100
@@ -0,0 +1,16 @@
+
+// class comments_class_typedef_test
+class comments_class_typedef_test {
+public:
+    // enim test c++ style single line comment
+    typedef int type1;
+
+    /*
+     * typedef test2
+     * c-style multi line comment
+     */
+    typedef int type2;
+
+    /* typedef test3 c-style single lime comment */
+    typedef int type3;
+};
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/umbrello-15.12.1/test/import/cxx/comments-class.h 
new/umbrello-15.12.2/test/import/cxx/comments-class.h
--- old/umbrello-15.12.1/test/import/cxx/comments-class.h       1970-01-01 
01:00:00.000000000 +0100
+++ new/umbrello-15.12.2/test/import/cxx/comments-class.h       2016-02-12 
06:23:36.000000000 +0100
@@ -0,0 +1,12 @@
+
+// class comments_class_test1 c++ style single line comment
+class comments_class_test1 {};
+
+/**
+ * class comments_class_test2
+ * c-style multiline comment
+ */
+class comments_class_test2 {};
+
+/* class comments_class_test3 c-style single line comment */
+class comments_class_test3 {};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/umbrello-15.12.1/test/import/cxx/comments-file-variant1.h 
new/umbrello-15.12.2/test/import/cxx/comments-file-variant1.h
--- old/umbrello-15.12.1/test/import/cxx/comments-file-variant1.h       
1970-01-01 01:00:00.000000000 +0100
+++ new/umbrello-15.12.2/test/import/cxx/comments-file-variant1.h       
2016-02-12 06:23:36.000000000 +0100
@@ -0,0 +1,7 @@
+/**
+ * file comment
+ * multi line
+ */
+
+// class comments_file_variant1 single line comment
+class comments_file_variant1 {};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/umbrello-15.12.1/test/import/cxx/comments-file-variant2.h 
new/umbrello-15.12.2/test/import/cxx/comments-file-variant2.h
--- old/umbrello-15.12.1/test/import/cxx/comments-file-variant2.h       
1970-01-01 01:00:00.000000000 +0100
+++ new/umbrello-15.12.2/test/import/cxx/comments-file-variant2.h       
2016-02-12 06:23:36.000000000 +0100
@@ -0,0 +1,7 @@
+/**
+ * file comment
+ * multi line
+ */
+
+// class comments_file_variant2 single line comment
+class comments_file_variant2 {};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/umbrello-15.12.1/test/import/cxx/comments-file-variant3.h 
new/umbrello-15.12.2/test/import/cxx/comments-file-variant3.h
--- old/umbrello-15.12.1/test/import/cxx/comments-file-variant3.h       
1970-01-01 01:00:00.000000000 +0100
+++ new/umbrello-15.12.2/test/import/cxx/comments-file-variant3.h       
2016-02-12 06:23:36.000000000 +0100
@@ -0,0 +1,3 @@
+
+// class comments_file_variant3 single line comment
+class comments_file_variant3 {};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/umbrello-15.12.1/test/import/cxx/comments.h 
new/umbrello-15.12.2/test/import/cxx/comments.h
--- old/umbrello-15.12.1/test/import/cxx/comments.h     1970-01-01 
01:00:00.000000000 +0100
+++ new/umbrello-15.12.2/test/import/cxx/comments.h     2016-02-12 
06:23:36.000000000 +0100
@@ -0,0 +1,8 @@
+#include "comments-class-methods.h"
+#include "comments-class-members.h"
+#include "comments-class-enums.h"
+#include "comments-class-typedefs.h"
+#include "comments-file-variant1.h"
+#include "comments-file-variant2.h"
+#include "comments-file-variant3.h"
+#include "comments-class.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/umbrello-15.12.1/umbrello/basictypes.cpp 
new/umbrello-15.12.2/umbrello/basictypes.cpp
--- old/umbrello-15.12.1/umbrello/basictypes.cpp        2016-01-07 
00:18:00.000000000 +0100
+++ new/umbrello-15.12.2/umbrello/basictypes.cpp        2016-02-12 
06:23:36.000000000 +0100
@@ -1165,3 +1165,24 @@
 }
 
 }  // end namespace Uml
+
+/**
+ * Convert floating point number string with '.' or ',' as decimal point to 
qreal.
+ * @param s floating point number string
+ * @return floating point number
+ * @note See https://bugs.kde.org/show_bug.cgi?id=357373 for more informations.
+ */
+qreal toDoubleFromAnyLocale(const QString &s)
+{
+    bool ok;
+    qreal value = s.toDouble(&ok);
+    if (!ok) {
+        static QLocale hungary(QLocale::Hungarian);
+        value = hungary.toDouble(s, &ok);
+        if (!ok) {
+            qCritical() << "could not read floating point number";
+            value = 0;
+        }
+    }
+    return value;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/umbrello-15.12.1/umbrello/basictypes.h 
new/umbrello-15.12.2/umbrello/basictypes.h
--- old/umbrello-15.12.1/umbrello/basictypes.h  2016-01-07 00:18:00.000000000 
+0100
+++ new/umbrello-15.12.2/umbrello/basictypes.h  2016-02-12 06:23:36.000000000 
+0100
@@ -349,4 +349,6 @@
     return Uml::Visibility::toString(visibility);
 }
 
+qreal toDoubleFromAnyLocale(const QString &s);
+
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/umbrello-15.12.1/umbrello/cmds/widget/cmd_baseWidgetCommand.cpp 
new/umbrello-15.12.2/umbrello/cmds/widget/cmd_baseWidgetCommand.cpp
--- old/umbrello-15.12.1/umbrello/cmds/widget/cmd_baseWidgetCommand.cpp 
2016-01-07 00:18:00.000000000 +0100
+++ new/umbrello-15.12.2/umbrello/cmds/widget/cmd_baseWidgetCommand.cpp 
2016-02-12 06:23:36.000000000 +0100
@@ -36,7 +36,9 @@
     {
         Q_ASSERT(widget);
 
+        m_widget = widget;
         m_widgetId = widget->localID();
+        m_scene = widget->umlScene();
         m_sceneId = widget->umlScene()->ID();
     }
 
@@ -44,18 +46,22 @@
     {
         UMLView* umlView = UMLApp::app()->document()->findView(m_sceneId);
 
-        Q_ASSERT(umlView);
+        if (umlView)
+            return umlView->umlScene();
 
-        return umlView->umlScene();
+        Q_ASSERT(m_scene.data());
+        return m_scene;
     }
 
     UMLWidget* CmdBaseWidgetCommand::widget()
     {
         UMLWidget* umlWidget = scene()->findWidget(m_widgetId);
 
-        Q_ASSERT(umlWidget);
+        if (umlWidget)
+            return umlWidget;
 
-        return umlWidget;
+        Q_ASSERT(m_widget.data());
+        return m_widget;
     }
 
     /**
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/umbrello-15.12.1/umbrello/cmds/widget/cmd_baseWidgetCommand.h 
new/umbrello-15.12.2/umbrello/cmds/widget/cmd_baseWidgetCommand.h
--- old/umbrello-15.12.1/umbrello/cmds/widget/cmd_baseWidgetCommand.h   
2016-01-07 00:18:00.000000000 +0100
+++ new/umbrello-15.12.2/umbrello/cmds/widget/cmd_baseWidgetCommand.h   
2016-02-12 06:23:36.000000000 +0100
@@ -13,6 +13,7 @@
 
 #include "basictypes.h"
 
+#include <QPointer>
 #include <QUndoCommand>
 
 class UMLScene;
@@ -29,6 +30,8 @@
         protected:
             Uml::ID::Type m_sceneId;
             Uml::ID::Type m_widgetId;
+            QPointer<UMLScene> m_scene;
+            QPointer<UMLWidget> m_widget;
 
             void setWidget(UMLWidget* widget);
             void addWidgetToScene(UMLWidget* widget);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/umbrello-15.12.1/umbrello/codegenerators/codegenerationpolicy.cpp 
new/umbrello-15.12.2/umbrello/codegenerators/codegenerationpolicy.cpp
--- old/umbrello-15.12.1/umbrello/codegenerators/codegenerationpolicy.cpp       
2016-01-07 00:18:00.000000000 +0100
+++ new/umbrello-15.12.2/umbrello/codegenerators/codegenerationpolicy.cpp       
2016-02-12 06:23:36.000000000 +0100
@@ -325,13 +325,8 @@
         break;
     }
 
-    if (Settings::optionState().codeGenerationState.indentationAmount > 999) { 
 //:TODO: fix this - no initialization
-         uDebug() << "too big indentation amount = " << 
Settings::optionState().codeGenerationState.indentationAmount;
-    }
-    else {
-        for (int i = 0; i < 
Settings::optionState().codeGenerationState.indentationAmount; ++i) {
-            m_indentation += indent;
-        }
+    for (int i = 0; i < 
Settings::optionState().codeGenerationState.indentationAmount; ++i) {
+        m_indentation += indent;
     }
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/umbrello-15.12.1/umbrello/codeimport/import_utils.cpp 
new/umbrello-15.12.2/umbrello/codeimport/import_utils.cpp
--- old/umbrello-15.12.1/umbrello/codeimport/import_utils.cpp   2016-01-07 
00:18:00.000000000 +0100
+++ new/umbrello-15.12.2/umbrello/codeimport/import_utils.cpp   2016-02-12 
06:23:36.000000000 +0100
@@ -38,6 +38,12 @@
 #include <QMap>
 #include <QRegExp>
 
+#ifdef Q_OS_WIN
+#define PATH_SEPARATOR QLatin1Char(';')
+#else
+#define PATH_SEPARATOR QLatin1Char(':')
+#endif
+
 DEBUG_REGISTER_DISABLED(Import_Utils)
 #undef DBG_SRC
 #define DBG_SRC QLatin1String("Import_Utils")
@@ -598,7 +604,7 @@
     QStringList includePathList(incPathList);
     QString umbrello_incpath = 
QString::fromLatin1(qgetenv("UMBRELLO_INCPATH"));
     if (!umbrello_incpath.isEmpty()) {
-        includePathList += umbrello_incpath.split(QLatin1Char(':'));
+        includePathList += umbrello_incpath.split(PATH_SEPARATOR);
     }
     return includePathList;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/umbrello-15.12.1/umbrello/dialogs/pages/diagrampropertiespage.cpp 
new/umbrello-15.12.2/umbrello/dialogs/pages/diagrampropertiespage.cpp
--- old/umbrello-15.12.1/umbrello/dialogs/pages/diagrampropertiespage.cpp       
2016-01-07 00:18:00.000000000 +0100
+++ new/umbrello-15.12.2/umbrello/dialogs/pages/diagrampropertiespage.cpp       
2016-02-12 06:23:36.000000000 +0100
@@ -33,7 +33,7 @@
     setupUi(this);
 
     ui_diagramName->setText(scene->name());
-    ui_zoom->setValue(scene->activeView()->currentZoom());
+    ui_zoom->setValue(scene->activeView()->zoom());
 
     ui_checkBoxShowGrid->setChecked(scene->isSnapGridVisible());
     ui_snapToGrid->setChecked(scene->snapToGrid());
@@ -104,7 +104,7 @@
 void DiagramPropertiesPage::apply()
 {
     checkUniqueDiagramName();
-    //:TODO: m_pScene->setZoom(m_diagramProperties->ui_zoom->value());
+    m_scene->activeView()->setZoom(ui_zoom->value());
     m_scene->setDocumentation(ui_documentation->toPlainText());
     m_scene->setSnapSpacing(ui_gridSpaceX->value(), ui_gridSpaceY->value());
     m_scene->setSnapToGrid(ui_snapToGrid->isChecked());
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/umbrello-15.12.1/umbrello/optionstate.h 
new/umbrello-15.12.2/umbrello/optionstate.h
--- old/umbrello-15.12.1/umbrello/optionstate.h 2016-01-07 00:18:00.000000000 
+0100
+++ new/umbrello-15.12.2/umbrello/optionstate.h 2016-02-12 06:23:36.000000000 
+0100
@@ -121,7 +121,30 @@
     Uml::Visibility::Enum defaultOperationScope;
 };
 
-struct CodeGenerationState {
+class CodeGenerationState {
+public:
+    CodeGenerationState()
+      : autoGenEmptyConstructors(false),
+        commentStyle(CodeGenerationPolicy::SingleLine),
+        defaultAssocFieldScope(Uml::Visibility::Public),
+        defaultAttributeAccessorScope(Uml::Visibility::Public),
+        forceDoc(false),
+        forceSections(false),
+        includeHeadings(false),
+        indentationAmount(false),
+        indentationType(CodeGenerationPolicy::NONE),
+#ifdef Q_OS_WIN
+        lineEndingType(CodeGenerationPolicy::DOS),
+#elif defined(Q_OS_MAC)
+        lineEndingType(CodeGenerationPolicy::MAC),
+#else
+        lineEndingType(CodeGenerationPolicy::UNIX),
+#endif
+        modnamePolicy(CodeGenerationPolicy::No),
+        overwritePolicy(CodeGenerationPolicy::Ok)
+    {
+    }
+
     bool autoGenEmptyConstructors;
     CodeGenerationPolicy::CommentStyle commentStyle;
     Uml::Visibility::Enum defaultAssocFieldScope;
@@ -137,7 +160,20 @@
     QDir outputDirectory;
     CodeGenerationPolicy::OverwritePolicy overwritePolicy;
 
-    struct CPPCodeGenerationState {
+    class CPPCodeGenerationState {
+    public:
+        CPPCodeGenerationState()
+          : autoGenAccessors(false),
+            inlineAccessors(false),
+            inlineOps(false),
+            packageIsNamespace(false),
+            publicAccessors(false),
+            stringIncludeIsGlobal(false),
+            vectorIncludeIsGlobal(false),
+            virtualDestructors(false)
+        {
+        }
+
         bool autoGenAccessors;
         bool inlineAccessors;
         bool inlineOps;
@@ -153,19 +189,42 @@
         bool virtualDestructors;
     };
 
-    struct DCodeGenerationState {
+    class DCodeGenerationState {
+    public:
+        DCodeGenerationState()
+          : autoGenerateAttributeAccessors(false),
+            autoGenerateAssocAccessors(false),
+            buildANTDocument(false)
+        {
+        }
+
         bool autoGenerateAttributeAccessors;
         bool autoGenerateAssocAccessors;
         bool buildANTDocument;
     };
 
-    struct JavaCodeGenerationState{
+    class JavaCodeGenerationState {
+    public:
+        JavaCodeGenerationState()
+          : autoGenerateAttributeAccessors(false),
+            autoGenerateAssocAccessors(false),
+            buildANTDocument(false)
+        {
+        }
+
         bool autoGenerateAttributeAccessors;
         bool autoGenerateAssocAccessors;
         bool buildANTDocument;
     };
 
-    struct RubyCodeGenerationState{
+    class RubyCodeGenerationState {
+    public:
+        RubyCodeGenerationState()
+         : autoGenerateAttributeAccessors(false),
+           autoGenerateAssocAccessors(false)
+        {
+        }
+
         bool autoGenerateAttributeAccessors;
         bool autoGenerateAssocAccessors;
     };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/umbrello-15.12.1/umbrello/uml.cpp 
new/umbrello-15.12.2/umbrello/uml.cpp
--- old/umbrello-15.12.1/umbrello/uml.cpp       2016-01-07 00:18:00.000000000 
+0100
+++ new/umbrello-15.12.2/umbrello/uml.cpp       2016-02-12 06:23:36.000000000 
+0100
@@ -712,11 +712,15 @@
  * Set the zoom factor of the current diagram.
  *
  * @param zoom  Zoom factor in percentage.
+ * @param withView also setup the currently displayed diagram
  */
-void UMLApp::setZoom(int zoom)
+void UMLApp::setZoom(int zoom, bool withView)
 {
-    currentView()->setZoom(zoom);
+    if (withView)
+        currentView()->setZoom(zoom);
+    bool oldState = m_pZoomSlider->blockSignals(true);
     m_pZoomSlider->setValue(zoom);
+    m_pZoomSlider->blockSignals(oldState);
     m_zoomValueLbl->setText(QString::number(zoom) + QLatin1Char('%'));
 }
 
@@ -756,7 +760,7 @@
 {
     m_zoomSelect->clear();
 
-    int currentZoom = currentView()->currentZoom();
+    int currentZoom = currentView()->zoom();
 
     m_zoomSelect->addAction(createZoomAction(33, currentZoom));
     m_zoomSelect->addAction(createZoomAction(50, currentZoom));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/umbrello-15.12.1/umbrello/uml.h 
new/umbrello-15.12.2/umbrello/uml.h
--- old/umbrello-15.12.1/umbrello/uml.h 2016-01-07 00:18:00.000000000 +0100
+++ new/umbrello-15.12.2/umbrello/uml.h 2016-02-12 06:23:36.000000000 +0100
@@ -357,7 +357,7 @@
     QMenu* findMenu(const QString &name);
 
     QAction* createZoomAction(int zoom, int currentZoom);
-    void setZoom(int zoom);
+    void setZoom(int zoom, bool withView = true);
 
     void resetStatusMsg();
 
@@ -519,6 +519,7 @@
 signals:
     void sigCutSuccessful();
 
+    friend class UMLView;
 };
 
 #endif // UML_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/umbrello-15.12.1/umbrello/umllistview.cpp 
new/umbrello-15.12.2/umbrello/umllistview.cpp
--- old/umbrello-15.12.1/umbrello/umllistview.cpp       2016-01-07 
00:18:00.000000000 +0100
+++ new/umbrello-15.12.2/umbrello/umllistview.cpp       2016-02-12 
06:23:36.000000000 +0100
@@ -917,6 +917,10 @@
         // ClassifierListPage::slot{Up, Down}Clicked()
         return;
     }
+
+    if (object->baseType() == UMLObject::ot_Association)
+        return;
+
     UMLListViewItem* newItem = findUMLObject(object);
 
     if (newItem) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/umbrello-15.12.1/umbrello/umlscene.cpp 
new/umbrello-15.12.2/umbrello/umlscene.cpp
--- old/umbrello-15.12.1/umbrello/umlscene.cpp  2016-01-07 00:18:00.000000000 
+0100
+++ new/umbrello-15.12.2/umbrello/umlscene.cpp  2016-02-12 06:23:36.000000000 
+0100
@@ -3499,8 +3499,8 @@
     viewElement.setAttribute(QLatin1String("snapy"), 
m_layoutGrid->gridSpacingY());
     // FIXME: move to UMLView
     viewElement.setAttribute(QLatin1String("zoom"), activeView()->zoom());
-    viewElement.setAttribute(QLatin1String("canvasheight"), height());
-    viewElement.setAttribute(QLatin1String("canvaswidth"), width());
+    viewElement.setAttribute(QLatin1String("canvasheight"), 
QString::number(height()));
+    viewElement.setAttribute(QLatin1String("canvaswidth"), 
QString::number(width()));
     viewElement.setAttribute(QLatin1String("isopen"), isOpen());
     if (type() == Uml::DiagramType::Sequence ||
         type() == Uml::DiagramType::Collaboration)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/umbrello-15.12.1/umbrello/umlview.cpp 
new/umbrello-15.12.2/umbrello/umlview.cpp
--- old/umbrello-15.12.1/umbrello/umlview.cpp   2016-01-07 00:18:00.000000000 
+0100
+++ new/umbrello-15.12.2/umbrello/umlview.cpp   2016-02-12 06:23:36.000000000 
+0100
@@ -24,6 +24,7 @@
 #include "umlwidget.h"
 
 #include <QPointer>
+#include <QScrollBar>
 
 DEBUG_REGISTER(UMLView)
 
@@ -31,13 +32,14 @@
  * Constructor.
  */
 UMLView::UMLView(UMLFolder *parentFolder)
-  : QGraphicsView(UMLApp::app()->mainViewWidget()),
-    m_nZoom(100)
+  : QGraphicsView(UMLApp::app()->mainViewWidget())
 {
     setAcceptDrops(true);
     setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform);
     setDragMode(NoDrag); //:TODO: RubberBandDrag);
     setScene(new UMLScene(parentFolder, this));
+    setResizeAnchor(AnchorUnderMouse);
+    setTransformationAnchor(AnchorUnderMouse);
 }
 
 /**
@@ -59,15 +61,15 @@
 /**
  * Returns the zoom of the diagram.
  */
-int UMLView::zoom() const
+qreal UMLView::zoom() const
 {
-    return m_nZoom;
+    return matrix().m11()*100.0;
 }
 
 /**
  * Sets the zoom of the diagram.
  */
-void UMLView::setZoom(int zoom)
+void UMLView::setZoom(qreal zoom)
 {
     if (zoom < 10) {
         zoom = 10;
@@ -75,23 +77,15 @@
         zoom = 500;
     }
 
+    DEBUG(DBG_SRC) << "setZoom" << zoom;
     QMatrix wm;
     wm.scale(zoom / 100.0, zoom / 100.0);
     setMatrix(wm);
 
-    m_nZoom = currentZoom();
     umlScene()->resizeSceneToItems();
 }
 
 /**
- * Return the current zoom factor.
- */
-int UMLView::currentZoom()
-{
-    return (int)(matrix().m11()*100.0);
-}
-
-/**
  * Shows the properties dialog for the view.
  */
 bool UMLView::showPropertiesDialog(QWidget *parent)
@@ -109,14 +103,14 @@
 {
     QMatrix wm = matrix();
     wm.scale(1.5, 1.5); // adjust zooming step here
-    setZoom((int)(wm.m11()*100.0));
+    setZoom(wm.m11()*100.0);
 }
 
 void UMLView::zoomOut()
 {
     QMatrix wm = matrix();
     wm.scale(2.0 / 3.0, 2.0 / 3.0); //adjust zooming step here
-    setZoom((int)(wm.m11()*100.0));
+    setZoom(wm.m11()*100.0);
 }
 
 /**
@@ -137,20 +131,21 @@
     // get the position of the mouse before scaling, in scene coords
     QPointF pointBeforeScale(mapToScene(event->pos()));
 
-    // get the original screen centerpoint
-    QPointF screenCenter = center();
-
     // scale the view ie. do the zoom
     double scaleFactor = 1.15;
     if (event->delta() > 0) {
         // zoom in
-        if (currentZoom() < 500) {
-            scale(scaleFactor, scaleFactor);
+        if (zoom() < 500) {
+            setZoom(zoom() * scaleFactor);
+        } else {
+            return;
         }
     } else {
         // zooming out
-        if (currentZoom() > 10) {
-            scale(1.0 / scaleFactor, 1.0 / scaleFactor);
+        if (zoom() > 10) {
+            setZoom(zoom() / scaleFactor);
+        } else {
+            return;
         }
     }
 
@@ -161,25 +156,11 @@
     QPointF offset = pointBeforeScale - pointAfterScale;
 
     // adjust to the new center for correct zooming
-    QPointF newCenter = screenCenter + offset;
-    setCenter(newCenter);
+    QPointF newCenter = mapToScene(viewport()->rect().center()) + offset;
 
-    DEBUG(DBG_SRC) << "currentZoom=" << currentZoom();
-    UMLApp::app()->slotZoomSliderMoved(currentZoom());
-}
+   centerOn(newCenter);
 
-/**
- * Need to update the center so there is no jolt in the
- * interaction after resizing the widget.
- */
-void UMLView::resizeEvent(QResizeEvent* event)
-{
-    // get the rectangle of the visible area in scene coords
-    QRectF visibleArea = mapToScene(rect()).boundingRect();
-    setCenter(visibleArea.center());
-
-    // call the subclass resize so the scrollbars are updated correctly
-    QGraphicsView::resizeEvent(event);
+    UMLApp::app()->setZoom(zoom(), false);
 }
 
 /**
@@ -214,14 +195,6 @@
 /**
  * Override standard method.
  */
-void UMLView::closeEvent(QCloseEvent* ce)
-{
-    QWidget::closeEvent(ce);
-}
-
-/**
- * Override standard method.
- */
 void UMLView::mousePressEvent(QMouseEvent* event)
 {
     if (event->button() == Qt::MidButton) {
@@ -248,64 +221,13 @@
 }
 
 /**
- * Sets the current centerpoint.  Also updates the scene's center point.
- * Unlike centerOn, which has no way of getting the floating point center
- * back, setCenter() stores the center point.  It also handles the special
- * sidebar case.  This function will claim the centerPoint to sceneRec ie.
- * the centerPoint must be within the sceneRec.
- */
-void UMLView::setCenter(const QPointF& centerPoint)
-{
-    // get the rectangle of the visible area in scene coords
-    QRectF visibleArea = mapToScene(rect()).boundingRect();
-
-    // get the scene area
-    QRectF sceneBounds = sceneRect();
-
-    double boundX = visibleArea.width() / 2.0;
-    double boundY = visibleArea.height() / 2.0;
-    double boundWidth = sceneBounds.width() - 2.0 * boundX;
-    double boundHeight = sceneBounds.height() - 2.0 * boundY;
-
-    // the max boundary that the centerPoint can be to
-    QRectF bounds(boundX, boundY, boundWidth, boundHeight);
-
-    if (bounds.contains(centerPoint)) {
-        // we are within the bounds
-        m_currentCenterPoint = centerPoint;
-    } else {
-        // we need to clamp or use the center of the screen
-        if(visibleArea.contains(sceneBounds)) {
-            // use the center of scene ie. we can see the whole scene
-            m_currentCenterPoint = sceneBounds.center();
-        } else {
-
-            m_currentCenterPoint = centerPoint;
-
-            // we need to clamp the center. The centerPoint is too large
-            if (centerPoint.x() > bounds.x() + bounds.width()) {
-                m_currentCenterPoint.setX(bounds.x() + bounds.width());
-            } else if (centerPoint.x() < bounds.x()) {
-                m_currentCenterPoint.setX(bounds.x());
-            }
-
-            if (centerPoint.y() > bounds.y() + bounds.height()) {
-                m_currentCenterPoint.setY(bounds.y() + bounds.height());
-            } else if (centerPoint.y() < bounds.y()) {
-                m_currentCenterPoint.setY(bounds.y());
-            }
-
-        }
-    }
-    // update the scrollbars
-    centerOn(m_currentCenterPoint);
-}
-
-/**
- * Get the center.
+ * Override standard method.
  */
-QPointF UMLView::center()
+void UMLView::resizeEvent(QResizeEvent *event)
 {
-    return m_currentCenterPoint;
+    bool oldState1 = verticalScrollBar()->blockSignals(true);
+    bool oldState2 = horizontalScrollBar()->blockSignals(true);
+    QGraphicsView::resizeEvent(event);
+    verticalScrollBar()->blockSignals(oldState1);
+    horizontalScrollBar()->blockSignals(oldState2);
 }
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/umbrello-15.12.1/umbrello/umlview.h 
new/umbrello-15.12.2/umbrello/umlview.h
--- old/umbrello-15.12.1/umbrello/umlview.h     2016-01-07 00:18:00.000000000 
+0100
+++ new/umbrello-15.12.2/umbrello/umlview.h     2016-02-12 06:23:36.000000000 
+0100
@@ -40,9 +40,8 @@
 
     UMLScene* umlScene() const;
 
-    int zoom() const ;
-    void setZoom(int zoom);
-    int currentZoom();
+    qreal zoom() const ;
+    void setZoom(qreal zoom);
 
     virtual bool showPropertiesDialog(QWidget *parent = 0);
 
@@ -53,18 +52,11 @@
 
 protected:
     virtual void wheelEvent(QWheelEvent* event);
-    virtual void resizeEvent(QResizeEvent* event);
     virtual void showEvent(QShowEvent *se);
     virtual void hideEvent(QHideEvent *he);
-    virtual void closeEvent(QCloseEvent* ce);
     virtual void mousePressEvent(QMouseEvent* event);
     virtual void mouseReleaseEvent(QMouseEvent* event);
-
-    void setCenter(const QPointF& centerPoint);
-    QPointF center();
-
-    QPointF m_currentCenterPoint;  ///< holds the current centerpoint for the 
view, used for panning and zooming
-    int m_nZoom;        ///< zoom level in percent, default 100
+    virtual void resizeEvent(QResizeEvent *event);
 };
 
 #endif // UMLVIEW_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/umbrello-15.12.1/umbrello/umlwidgets/associationline.cpp 
new/umbrello-15.12.2/umbrello/umlwidgets/associationline.cpp
--- old/umbrello-15.12.1/umbrello/umlwidgets/associationline.cpp        
2016-01-07 00:18:00.000000000 +0100
+++ new/umbrello-15.12.2/umbrello/umlwidgets/associationline.cpp        
2016-02-12 06:23:36.000000000 +0100
@@ -126,6 +126,8 @@
 {
     prepareGeometryChange();
     m_points.remove(index);
+    m_activePointIndex = -1;
+    m_activeSegmentIndex = -1;
     alignSymbols();
 }
 
@@ -170,6 +172,8 @@
             ++i;
         }
     }
+    m_activePointIndex = -1;
+    m_activeSegmentIndex = -1;
     alignSymbols();
 }
 
@@ -306,9 +310,9 @@
         return false;
     }
     QString x = startElement.attribute(QLatin1String("startx"), 
QLatin1String("0"));
-    qreal nX = x.toFloat();
+    qreal nX = toDoubleFromAnyLocale(x);
     QString y = startElement.attribute(QLatin1String("starty"), 
QLatin1String("0"));
-    qreal nY = y.toFloat();
+    qreal nY = toDoubleFromAnyLocale(y);
     QPointF startPoint(nX, nY);
 
     node = startElement.nextSibling();
@@ -317,9 +321,9 @@
         return false;
     }
     x = endElement.attribute(QLatin1String("endx"), QLatin1String("0"));
-    nX = x.toFloat();
+    nX = toDoubleFromAnyLocale(x);
     y = endElement.attribute(QLatin1String("endy"), QLatin1String("0"));
-    nY = y.toFloat();
+    nY = toDoubleFromAnyLocale(y);
     QPointF endPoint(nX, nY);
     setEndPoints(startPoint, endPoint);
     QPointF point;
@@ -330,8 +334,8 @@
         if(element.tagName() == QLatin1String("point")) {
             x = element.attribute(QLatin1String("x"), QLatin1String("0"));
             y = element.attribute(QLatin1String("y"), QLatin1String("0"));
-            point.setX(x.toFloat());
-            point.setY(y.toFloat());
+            point.setX(toDoubleFromAnyLocale(x));
+            point.setY(toDoubleFromAnyLocale(y));
             insertPoint(i++, point);
         }
         node = element.nextSibling();
@@ -351,19 +355,19 @@
     QDomElement lineElement = qDoc.createElement(QLatin1String("linepath"));
     lineElement.setAttribute(QLatin1String("layout"), toString(m_layout));
     QDomElement startElement = qDoc.createElement(QLatin1String("startpoint"));
-    startElement.setAttribute(QLatin1String("startx"), point.x());
-    startElement.setAttribute(QLatin1String("starty"), point.y());
+    startElement.setAttribute(QLatin1String("startx"), 
QString::number(point.x()));
+    startElement.setAttribute(QLatin1String("starty"), 
QString::number(point.y()));
     lineElement.appendChild(startElement);
     QDomElement endElement = qDoc.createElement(QLatin1String("endpoint"));
     point = m_associationWidget->mapToScene(endPoint());
-    endElement.setAttribute(QLatin1String("endx"), point.x());
-    endElement.setAttribute(QLatin1String("endy"), point.y());
+    endElement.setAttribute(QLatin1String("endx"), QString::number(point.x()));
+    endElement.setAttribute(QLatin1String("endy"), QString::number(point.y()));
     lineElement.appendChild(endElement);
     for(int i = 1; i < count()-1; ++i) {
         QDomElement pointElement = qDoc.createElement(QLatin1String("point"));
         point = m_associationWidget->mapToScene(this->point(i));
-        pointElement.setAttribute(QLatin1String("x"), point.x());
-        pointElement.setAttribute(QLatin1String("y"), point.y());
+        pointElement.setAttribute(QLatin1String("x"), 
QString::number(point.x()));
+        pointElement.setAttribute(QLatin1String("y"), 
QString::number(point.y()));
         lineElement.appendChild(pointElement);
     }
     qElement.appendChild(lineElement);
@@ -388,22 +392,37 @@
 }
 
 /**
- * Returns the type of pen to use depending on the type of Association.
+ * Returns the pen used for drawing.
  */
 QPen AssociationLine::pen() const
 {
-    QPen pen(m_associationWidget->lineColor(),
-             m_associationWidget->lineWidth(),
-             Qt::SolidLine,
-             Qt::RoundCap,
-             Qt::RoundJoin);
+    return m_pen;
+}
+
+/**
+ * Setup new pen.
+ */
+void AssociationLine::setPen(const QPen &pen)
+{
+    if (m_startSymbol)
+        m_startSymbol->setPen(pen);
+    if (m_subsetSymbol)
+        m_subsetSymbol->setPen(pen);
+    if (m_endSymbol)
+        m_endSymbol->setPen(pen);
+
+    m_pen = pen;
+    m_pen.setCapStyle(Qt::RoundCap);
+    m_pen.setJoinStyle(Qt::RoundJoin);
     Uml::AssociationType::Enum type = m_associationWidget->associationType();
     if (type == Uml::AssociationType::Dependency  ||
         type == Uml::AssociationType::Realization ||
         type == Uml::AssociationType::Anchor) {
-        pen.setStyle(Qt::DashLine);
+        m_pen.setStyle(Qt::DashLine);
+    }
+    else {
+        m_pen.setStyle(Qt::SolidLine);
     }
-    return pen;
 }
 
 /**
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/umbrello-15.12.1/umbrello/umlwidgets/associationline.h 
new/umbrello-15.12.2/umbrello/umlwidgets/associationline.h
--- old/umbrello-15.12.1/umbrello/umlwidgets/associationline.h  2016-01-07 
00:18:00.000000000 +0100
+++ new/umbrello-15.12.2/umbrello/umlwidgets/associationline.h  2016-02-12 
06:23:36.000000000 +0100
@@ -148,6 +148,7 @@
 
     QBrush brush() const;
     QPen pen() const;
+    void setPen(const QPen &pen);
 
     virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* 
option, QWidget* widget);
 
@@ -195,6 +196,7 @@
     QGraphicsLineItem *m_collaborationLineItem;  ///< parallel arrow line 
drawn in case of collaboration message
     Symbol            *m_collaborationLineHead;  ///< arrow head drawn at end 
of m_collaborationLineItem
     LayoutType         m_layout;
+    QPen               m_pen;                    ///< pen used to draw an 
association line
 
     static QPainterPath createBezierCurve(QVector<QPointF> points);
     static QPainterPath createOrthogonalPath(QVector<QPointF> points);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/umbrello-15.12.1/umbrello/umlwidgets/associationwidget.cpp 
new/umbrello-15.12.2/umbrello/umlwidgets/associationwidget.cpp
--- old/umbrello-15.12.1/umbrello/umlwidgets/associationwidget.cpp      
2016-01-07 00:18:00.000000000 +0100
+++ new/umbrello-15.12.2/umbrello/umlwidgets/associationwidget.cpp      
2016-02-12 06:23:36.000000000 +0100
@@ -82,6 +82,9 @@
     m_associationType(Uml::AssociationType::Association),
     m_nameWidget(0)
 {
+    // propagate line color set by base class constructor
+    // which does not call the virtual methods from this class.
+    setLineColor(lineColor());
     // floating text widgets objects owned by this association
     m_role[RoleType::A].changeabilityWidget = 0;
     m_role[RoleType::B].changeabilityWidget = 0;
@@ -3239,6 +3242,22 @@
         m_role[RoleType::B].changeabilityWidget->setTextColor(color);
 }
 
+void AssociationWidget::setLineColor(const QColor &color)
+{
+    WidgetBase::setLineColor(color);
+    QPen pen = m_associationLine->pen();
+    pen.setColor(color);
+    m_associationLine->setPen(pen);
+}
+
+void AssociationWidget::setLineWidth(uint width)
+{
+    WidgetBase::setLineWidth(width);
+    QPen pen = m_associationLine->pen();
+    pen.setWidth(width);
+    m_associationLine->setPen(pen);
+}
+
 bool AssociationWidget::checkAddPoint(const QPointF &scenePos)
 {
     if (associationType() == AssociationType::Exception) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/umbrello-15.12.1/umbrello/umlwidgets/associationwidget.h 
new/umbrello-15.12.2/umbrello/umlwidgets/associationwidget.h
--- old/umbrello-15.12.1/umbrello/umlwidgets/associationwidget.h        
2016-01-07 00:18:00.000000000 +0100
+++ new/umbrello-15.12.2/umbrello/umlwidgets/associationwidget.h        
2016-02-12 06:23:36.000000000 +0100
@@ -174,6 +174,8 @@
     QFont font() const;
 
     virtual void setTextColor(const QColor &color);
+    virtual void setLineColor(const QColor &color);
+    virtual void setLineWidth(uint width);
 
     void calculateEndingPoints();
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/umbrello-15.12.1/umbrello/umlwidgets/boxwidget.cpp 
new/umbrello-15.12.2/umbrello/umlwidgets/boxwidget.cpp
--- old/umbrello-15.12.1/umbrello/umlwidgets/boxwidget.cpp      2016-01-07 
00:18:00.000000000 +0100
+++ new/umbrello-15.12.2/umbrello/umlwidgets/boxwidget.cpp      2016-02-12 
06:23:36.000000000 +0100
@@ -30,7 +30,7 @@
 {
     setSize(100, 80);
     m_usesDiagramLineColor = false;  // boxes be black
-    m_lineColor = QColor("black");
+    setLineColor(QColor("black"));
     setZValue(-10);
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/umbrello-15.12.1/umbrello/umlwidgets/floatingdashlinewidget.cpp 
new/umbrello-15.12.2/umbrello/umlwidgets/floatingdashlinewidget.cpp
--- old/umbrello-15.12.1/umbrello/umlwidgets/floatingdashlinewidget.cpp 
2016-01-07 00:18:00.000000000 +0100
+++ new/umbrello-15.12.2/umbrello/umlwidgets/floatingdashlinewidget.cpp 
2016-02-12 06:23:36.000000000 +0100
@@ -191,8 +191,8 @@
         return false;
     }
     DEBUG(DBG_SRC) << "load.......";
-    m_yMax = qElement.attribute(QLatin1String("maxY")).toFloat();
-    m_yMin = qElement.attribute(QLatin1String("minY")).toFloat();
+    m_yMax = qElement.attribute(QLatin1String("maxY")).toInt();
+    m_yMin = qElement.attribute(QLatin1String("minY")).toInt();
     m_Text = qElement.attribute(QLatin1String("text"));
     return true;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/umbrello-15.12.1/umbrello/umlwidgets/messagewidget.cpp 
new/umbrello-15.12.2/umbrello/umlwidgets/messagewidget.cpp
--- old/umbrello-15.12.1/umbrello/umlwidgets/messagewidget.cpp  2016-01-07 
00:18:00.000000000 +0100
+++ new/umbrello-15.12.2/umbrello/umlwidgets/messagewidget.cpp  2016-02-12 
06:23:36.000000000 +0100
@@ -1245,6 +1245,26 @@
     }
     return (height - this->height());
 }
+/**
+ * Overrides method from UMLWidget.
+ */
+QSizeF MessageWidget::minimumSize() const
+{
+    if (m_sequenceMessageType == Uml::SequenceMessage::Synchronous) {
+        return QSizeF(width(), 20);
+    } else if (m_sequenceMessageType == Uml::SequenceMessage::Asynchronous) {
+        return isSelf() ? QSizeF(width(), 20) : QSizeF(width(), 8);
+    } else if (m_sequenceMessageType == Uml::SequenceMessage::Creation) {
+        return QSizeF(width(), 8);
+    } else if (m_sequenceMessageType == Uml::SequenceMessage::Lost) {
+        return QSizeF(width(), 10);
+    } else if (m_sequenceMessageType == Uml::SequenceMessage::Found) {
+        return QSizeF(width(), 10);
+    } else {
+        uWarning() << "Unknown message type";
+    }
+    return QSize(width(), height());
+}
 
 /**
  * Sets the related widget on the given side.
@@ -1349,8 +1369,8 @@
     QString sequenceMessageType = 
qElement.attribute(QLatin1String("sequencemessagetype"), QLatin1String("1001"));
     m_sequenceMessageType = 
Uml::SequenceMessage::fromInt(sequenceMessageType.toInt());
     if (m_sequenceMessageType == Uml::SequenceMessage::Lost || 
m_sequenceMessageType == Uml::SequenceMessage::Found) {
-        m_xclicked = qElement.attribute(QLatin1String("xclicked"), 
QLatin1String("-1")).toFloat();
-        m_yclicked = qElement.attribute(QLatin1String("yclicked"), 
QLatin1String("-1")).toFloat();
+        m_xclicked = qElement.attribute(QLatin1String("xclicked"), 
QLatin1String("-1")).toInt();
+        m_yclicked = qElement.attribute(QLatin1String("yclicked"), 
QLatin1String("-1")).toInt();
     }
 
     m_widgetAId = Uml::ID::fromString(widgetaid);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/umbrello-15.12.1/umbrello/umlwidgets/messagewidget.h 
new/umbrello-15.12.2/umbrello/umlwidgets/messagewidget.h
--- old/umbrello-15.12.1/umbrello/umlwidgets/messagewidget.h    2016-01-07 
00:18:00.000000000 +0100
+++ new/umbrello-15.12.2/umbrello/umlwidgets/messagewidget.h    2016-02-12 
06:23:36.000000000 +0100
@@ -129,6 +129,8 @@
     int getMinY();
     int getMaxY();
 
+    virtual QSizeF minimumSize() const;
+
     UMLWidget* onWidget(const QPointF& p);
 
     virtual void resizeWidget(qreal newW, qreal newH);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/umbrello-15.12.1/umbrello/umlwidgets/objectwidget.cpp 
new/umbrello-15.12.2/umbrello/umlwidgets/objectwidget.cpp
--- old/umbrello-15.12.1/umbrello/umlwidgets/objectwidget.cpp   2016-01-07 
00:18:00.000000000 +0100
+++ new/umbrello-15.12.2/umbrello/umlwidgets/objectwidget.cpp   2016-02-12 
06:23:36.000000000 +0100
@@ -643,6 +643,20 @@
 }
 
 /**
+ * Overridden from UMLWidget
+ * Set color of object widget and sequence line on sequence diagrams.
+ */
+void ObjectWidget::setLineColorCmd(const QColor &color)
+{
+    UMLWidget::setLineColorCmd(color);
+    if (m_pLine) {
+        QPen pen = m_pLine->pen();
+        pen.setColor(color);
+        m_pLine->setPen(pen);
+    }
+}
+
+/**
  * Return the SeqLineWidget.
  * Returns a non NULL pointer if this ObjectWidget is part of a
  * sequence diagram.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/umbrello-15.12.1/umbrello/umlwidgets/objectwidget.h 
new/umbrello-15.12.2/umbrello/umlwidgets/objectwidget.h
--- old/umbrello-15.12.1/umbrello/umlwidgets/objectwidget.h     2016-01-07 
00:18:00.000000000 +0100
+++ new/umbrello-15.12.2/umbrello/umlwidgets/objectwidget.h     2016-02-12 
06:23:36.000000000 +0100
@@ -70,6 +70,8 @@
 
     bool messageOverlap(qreal y, MessageWidget* messageWidget);
 
+    virtual void setLineColorCmd(const QColor &color);
+
     SeqLineWidget *sequentialLine() const;
 
     virtual void resizeWidget(qreal newW, qreal newH);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/umbrello-15.12.1/umbrello/umlwidgets/umlwidget.cpp 
new/umbrello-15.12.2/umbrello/umlwidgets/umlwidget.cpp
--- old/umbrello-15.12.1/umbrello/umlwidgets/umlwidget.cpp      2016-01-07 
00:18:00.000000000 +0100
+++ new/umbrello-15.12.2/umbrello/umlwidgets/umlwidget.cpp      2016-02-12 
06:23:36.000000000 +0100
@@ -757,6 +757,10 @@
     m_moved = false;
     m_resized = false;
 
+    // propagate line color set by base class constructor
+    // which does not call the virtual methods from this class.
+    setLineColor(lineColor());
+
     setZValue(2.0);  // default for most widgets
 }
 
@@ -1814,10 +1818,10 @@
     */
     WidgetBase::saveToXMI(qDoc, qElement);
     qElement.setAttribute(QLatin1String("xmi.id"), Uml::ID::toString(id()));
-    qElement.setAttribute(QLatin1String("x"), x());
-    qElement.setAttribute(QLatin1String("y"), y());
-    qElement.setAttribute(QLatin1String("width"), width());
-    qElement.setAttribute(QLatin1String("height"), height());
+    qElement.setAttribute(QLatin1String("x"), QString::number(x()));
+    qElement.setAttribute(QLatin1String("y"), QString::number(y()));
+    qElement.setAttribute(QLatin1String("width"), QString::number(width()));
+    qElement.setAttribute(QLatin1String("height"), QString::number(height()));
     qElement.setAttribute(QLatin1String("isinstance"), m_isInstance);
     if (!m_instanceName.isEmpty())
         qElement.setAttribute(QLatin1String("instancename"), m_instanceName);
@@ -1839,10 +1843,10 @@
     QString y = qElement.attribute(QLatin1String("y"), QLatin1String("0"));
     QString h = qElement.attribute(QLatin1String("height"), 
QLatin1String("0"));
     QString w = qElement.attribute(QLatin1String("width"), QLatin1String("0"));
+    setSize(toDoubleFromAnyLocale(w), toDoubleFromAnyLocale(h));
+    setX(toDoubleFromAnyLocale(x));
+    setY(toDoubleFromAnyLocale(y));
 
-    setSize(w.toFloat(), h.toFloat());
-    setX(x.toFloat());
-    setY(y.toFloat());
     QString isinstance = qElement.attribute(QLatin1String("isinstance"), 
QLatin1String("0"));
     m_isInstance = (bool)isinstance.toInt();
     m_instanceName = qElement.attribute(QLatin1String("instancename"));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/umbrello-15.12.1/umbrello/umlwidgets/umlwidget.h 
new/umbrello-15.12.2/umbrello/umlwidgets/umlwidget.h
--- old/umbrello-15.12.1/umbrello/umlwidgets/umlwidget.h        2016-01-07 
00:18:00.000000000 +0100
+++ new/umbrello-15.12.2/umbrello/umlwidgets/umlwidget.h        2016-02-12 
06:23:36.000000000 +0100
@@ -75,7 +75,7 @@
     void setTextColorCmd(const QColor &color);
 
     virtual void setLineColor(const QColor &color);
-    void setLineColorCmd(const QColor &color);
+    virtual void setLineColorCmd(const QColor &color);
 
     virtual void setLineWidth(uint width);
     void setLineWidthCmd(uint width);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/umbrello-15.12.1/umbrello/umlwidgets/widgetbase.cpp 
new/umbrello-15.12.2/umbrello/umlwidgets/widgetbase.cpp
--- old/umbrello-15.12.1/umbrello/umlwidgets/widgetbase.cpp     2016-01-07 
00:18:00.000000000 +0100
+++ new/umbrello-15.12.2/umbrello/umlwidgets/widgetbase.cpp     2016-02-12 
06:23:36.000000000 +0100
@@ -45,7 +45,6 @@
     m_scene(scene),
     m_umlObject(0),
     m_textColor(QColor("black")),
-    m_lineColor(QColor("black")),
     m_fillColor(QColor("yellow")),
     m_brush(m_fillColor),
     m_lineWidth(0), // initialize with 0 to have valid start condition
@@ -54,6 +53,9 @@
     m_usesDiagramLineColor(true),
     m_usesDiagramLineWidth(true)
 {
+    // Note: no virtual methods from derived classes available,
+    // this operation need to be finished in derived class constructor.
+    setLineColor(QColor("black"));
     setSelected(false);
     scene->addItem(this);
 
@@ -66,8 +68,8 @@
         m_usesDiagramTextColor = true;
         const Settings::OptionState& optionState = m_scene->optionState();
         m_textColor = optionState.uiState.textColor;
-        m_lineColor = optionState.uiState.lineColor;
-        m_lineWidth  = optionState.uiState.lineWidth;
+        setLineColor(optionState.uiState.lineColor);
+        setLineWidth(optionState.uiState.lineWidth);
         m_font = optionState.uiState.font;
     } else {
         uError() << "WidgetBase constructor: SERIOUS PROBLEM - m_scene is 
NULL";
@@ -529,18 +531,18 @@
     QString lineColor = qElement.attribute(QLatin1String("linecolour"), 
QLatin1String("none"));
     lineColor = qElement.attribute(QLatin1String("linecolor"), lineColor);
     if (lineColor != QLatin1String("none")) {
-        m_lineColor = QColor(lineColor);
+        setLineColor(QColor(lineColor));
         m_usesDiagramLineColor = false;
     } else if (m_baseType != WidgetBase::wt_Box && m_scene != NULL) {
-        m_lineColor = m_scene->lineColor();
+        setLineColor(m_scene->lineColor());
         m_usesDiagramLineColor = true;
     }
     QString lineWidth = qElement.attribute(QLatin1String("linewidth"), 
QLatin1String("none"));
     if (lineWidth != QLatin1String("none")) {
-        m_lineWidth = lineWidth.toInt();
+        setLineWidth(lineWidth.toInt());
         m_usesDiagramLineWidth = false;
     } else if (m_scene) {
-        m_lineWidth = m_scene->lineWidth();
+        setLineWidth(m_scene->lineWidth());
         m_usesDiagramLineWidth = true;
     }
     QString textColor = qElement.attribute(QLatin1String("textcolor"), 
QLatin1String("none"));
@@ -597,7 +599,7 @@
     m_Text = other.m_Text;
     m_nId = other.m_nId;
     m_textColor = other.m_textColor;
-    m_lineColor = other.m_lineColor;
+    setLineColor(other.lineColor());
     m_fillColor = other.m_fillColor;
     m_brush = other.m_brush;
     m_font = other.m_font;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/umbrello-15.12.1/unittests/TEST_basictypes.cpp 
new/umbrello-15.12.2/unittests/TEST_basictypes.cpp
--- old/umbrello-15.12.1/unittests/TEST_basictypes.cpp  2016-01-07 
00:18:00.000000000 +0100
+++ new/umbrello-15.12.2/unittests/TEST_basictypes.cpp  2016-02-12 
06:23:36.000000000 +0100
@@ -25,7 +25,7 @@
 
 // qt includes
 #include <QtTest>
-
+#include <QDomDocument>
 
 //-----------------------------------------------------------------------------
 
@@ -49,6 +49,123 @@
     QVERIFY(b2);
 }
 
+void TEST_basictypes::test_QString_english()
+{
+    QLocale _default = QLocale();
+    QLocale english(QLocale::English);
+    QLocale::setDefault(english);
+
+    QString value1String(QLatin1String("123.456"));
+    float referenceValue = 123.456;
+    qreal referenceDValue = 123.456;
+
+    QString a = QString::number(referenceValue);
+    QCOMPARE(value1String, a);
+
+    bool ok;
+    float value = value1String.toFloat(&ok);
+    QVERIFY(ok);
+    QCOMPARE(value, referenceValue);
+    qreal dValue = value1String.toDouble(&ok);
+    QVERIFY(ok);
+    QCOMPARE(dValue, referenceDValue);
+    QLocale::setDefault(_default);
+}
+
+void TEST_basictypes::test_QString_non_english()
+{
+    QLocale _default = QLocale();
+    QLocale hungarian(QLocale::Hungarian);
+    QLocale::setDefault(hungarian);
+
+    QString value1String(QLatin1String("123.456"));
+    float referenceValue = 123.456;
+    qreal referenceDValue = 123.456;
+
+    QString a = QString::number(referenceValue);
+    QCOMPARE(value1String, a);
+
+    bool ok;
+    float value = value1String.toFloat(&ok);
+    QVERIFY(ok);
+    QCOMPARE(value, referenceValue);
+    qreal dValue = value1String.toDouble(&ok);
+    QVERIFY(ok);
+    QCOMPARE(dValue, referenceDValue);
+    QLocale::setDefault(_default);
+}
+
+void TEST_basictypes::test_DomDocument_english()
+{
+    QLocale _default = QLocale();
+    QLocale locale(QLocale::English);
+    QLocale::setDefault(locale);
+    QCOMPARE(QChar(QLatin1Char('.')), locale.decimalPoint());
+
+    float fVar = 123.456;
+    double dVar = 123.456;
+    QString refValue(QLatin1String("123.456"));
+    QString localeValue;
+    localeValue.replace(QLatin1Char('.'), _default.decimalPoint());
+
+    QDomDocument doc("test");
+    QDomElement root = doc.createElement("test");
+    doc.appendChild(root);
+    root.setAttribute("a", fVar);
+    QString xml = doc.toString();
+    QVERIFY2(xml.contains(refValue), xml.toLatin1().constData());
+
+    // caused by bug in Qt xml
+    root.setAttribute("a", dVar);
+    xml = doc.toString();
+    QVERIFY2(xml.contains(localeValue), xml.toLatin1().constData());
+
+    root.setAttribute("a", QString::number(fVar));
+    xml = doc.toString();
+    QVERIFY(xml.contains(refValue));
+
+    root.setAttribute("a", QString::number(dVar));
+    xml = doc.toString();
+    QVERIFY2(xml.contains(refValue), xml.toLatin1().constData());
+    QLocale::setDefault(_default);
+}
+
+void TEST_basictypes::test_DomDocument_non_english()
+{
+    QLocale _default = QLocale();
+    QLocale locale(QLocale::Hungarian);
+    QLocale::setDefault(locale);
+    QCOMPARE(QChar(QLatin1Char(',')), locale.decimalPoint());
+
+    float fVar = 123.456;
+    double dVar = 123.456;
+    QString refValue(QLatin1String("123.456"));
+    QString localeValue;
+    localeValue.replace(QLatin1Char('.'), _default.decimalPoint());
+
+    QDomDocument doc("test");
+    QDomElement root = doc.createElement("test");
+    doc.appendChild(root);
+
+    root.setAttribute("a", fVar);
+    QString xml = doc.toString();
+    QVERIFY2(xml.contains(refValue), xml.toLatin1().constData());
+
+    // caused by bug in Qt xml
+    root.setAttribute("a", dVar);
+    xml = doc.toString();
+    QVERIFY2(xml.contains(localeValue), xml.toLatin1().constData());
+
+    root.setAttribute("a", QString::number(fVar));
+    xml = doc.toString();
+    QVERIFY2(xml.contains(refValue), xml.toLatin1().constData());
+
+    root.setAttribute("a", QString::number(dVar));
+    xml = doc.toString();
+    QVERIFY2(xml.contains(refValue), xml.toLatin1().constData());
+    QLocale::setDefault(_default);
+}
+
 void TEST_basictypes::test_ModelType_toString()
 {
     Uml::ModelType::Enum model0 = Uml::ModelType::Logical;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/umbrello-15.12.1/unittests/TEST_basictypes.h 
new/umbrello-15.12.2/unittests/TEST_basictypes.h
--- old/umbrello-15.12.1/unittests/TEST_basictypes.h    2016-01-07 
00:18:00.000000000 +0100
+++ new/umbrello-15.12.2/unittests/TEST_basictypes.h    2016-02-12 
06:23:36.000000000 +0100
@@ -28,6 +28,10 @@
     Q_OBJECT
 private slots:
     void test_dynamic_cast();
+    void test_QString_english();
+    void test_QString_non_english();
+    void test_DomDocument_english();
+    void test_DomDocument_non_english();
     void test_ModelType_toString();
     void test_ModelType_fromString();
     void test_ModelType_forLoop();


Reply via email to