Hello community,
here is the log from the commit of package umbrello for openSUSE:Factory checked in at 2015-07-14 17:40:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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 2015-06-04 11:22:59.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.umbrello.new/umbrello.changes 2015-07-14 17:40:40.000000000 +0200
@@ -1,0 +2,8 @@
+Mon Jul 6 06:02:09 UTC 2015 - tittiatcoke@gmail.com
+
+- Update to KDE Applications 15.04.3
+ * KDE Applications 15.04.3
+ * https://www.kde.org/announcements/announce-applications-15.04.3.php
+
+
+-------------------------------------------------------------------
Old:
----
umbrello-15.04.2.tar.xz
New:
----
umbrello-15.04.3.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ umbrello.spec ++++++
--- /var/tmp/diff_new_pack.yBE92g/_old 2015-07-14 17:40:41.000000000 +0200
+++ /var/tmp/diff_new_pack.yBE92g/_new 2015-07-14 17:40:41.000000000 +0200
@@ -24,7 +24,7 @@
License: GPL-2.0 and GFDL-1.2
Group: Development/Tools/Other
Url: http://www.kde.org/
-Version: 15.04.2
+Version: 15.04.3
Release: 0
Source0: %{name}-%{version}.tar.xz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
++++++ umbrello-15.04.2.tar.xz -> umbrello-15.04.3.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/umbrello-15.04.2/CMakeLists.txt new/umbrello-15.04.3/CMakeLists.txt
--- old/umbrello-15.04.2/CMakeLists.txt 2015-05-18 10:51:20.000000000 +0200
+++ new/umbrello-15.04.3/CMakeLists.txt 2015-06-22 07:35:59.000000000 +0200
@@ -8,7 +8,7 @@
set(VERSION_MAJOR "2")
set(VERSION_MINOR "16")
-set(VERSION_PATCH "1")
+set(VERSION_PATCH "3")
# set default umbrello version
# umbrello version could be overridden by cmake command line using -DUMBRELLO_VERSION_STRING=major.minor.patch
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/umbrello-15.04.2/lib/cppparser/parser.cpp new/umbrello-15.04.3/lib/cppparser/parser.cpp
--- old/umbrello-15.04.2/lib/cppparser/parser.cpp 2015-05-18 10:51:20.000000000 +0200
+++ new/umbrello-15.04.3/lib/cppparser/parser.cpp 2015-06-22 07:35:59.000000000 +0200
@@ -2741,7 +2741,9 @@
ADVANCE(')', ")");
StatementAST::Node body;
- parseStatement(body);
+ if (!parseStatement(body)) {
+ reportError(i18n("statement expected"));
+ }
ForStatementAST::Node ast = CreateNode<ForStatementAST>();
ast->setInitStatement(init);
@@ -2769,7 +2771,9 @@
ADVANCE(')', ")");
StatementAST::Node body;
- parseStatement(body);
+ if (!parseStatement(body)) {
+ reportError(i18n("statement expected"));
+ }
ForEachStatementAST::Node ast = CreateNode<ForEachStatementAST>();
// add here the parser results
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/umbrello-15.04.2/maintainer/update-version new/umbrello-15.04.3/maintainer/update-version
--- old/umbrello-15.04.2/maintainer/update-version 1970-01-01 01:00:00.000000000 +0100
+++ new/umbrello-15.04.3/maintainer/update-version 2015-06-22 07:35:59.000000000 +0200
@@ -0,0 +1,27 @@
+#!/bin/sh
+#
+# Update patch level in CMakelists.txt for non master branch and commit the new version.
+#
+# requirements:
+# - current branch is named 'Applications/...'
+#
+# Author: ralf.habacker@freenet.de
+#
+version_major=$(grep set\(VERSION_MAJOR CMakeLists.txt | sed 's,^.* ",,g;s,".*$,,g')
+version_minor=$(grep set\(VERSION_MINOR CMakeLists.txt | sed 's,^.* ",,g;s,".*$,,g')
+version_patch=$(grep set\(VERSION_PATCH CMakeLists.txt | sed 's,^.* ",,g;s,".*$,,g')
+if test $version_patch -eq 99; then
+ echo could not update master branch
+ exit 1
+fi
+
+kde_branch=$(git branch | grep '* Applications' | sed 's,^.*/,,g')
+if test -z "$kde_branch"; then
+ echo could not find Applications branch
+ exit 1
+fi
+old_version_patch=$version_patch
+version_patch=$(expr $version_patch '+' 1)
+perl -pi -e "s,VERSION_PATCH \"$old_version_patch\",VERSION_PATCH \"$version_patch\",g" CMakeLists.txt
+git commit -m "Update version to $version_major.$version_minor.$version_patch (KDE Applications version $kde_branch.$version_patch)." CMakeLists.txt
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/umbrello-15.04.2/umbrello/classifier.cpp new/umbrello-15.04.3/umbrello/classifier.cpp
--- old/umbrello-15.04.2/umbrello/classifier.cpp 2015-05-18 10:51:20.000000000 +0200
+++ new/umbrello-15.04.3/umbrello/classifier.cpp 2015-06-22 07:35:59.000000000 +0200
@@ -1217,7 +1217,7 @@
break;
}
case UMLObject::ot_Attribute: {
- UMLAttribute *retval = dynamic_cast(m_List.takeAt(index));
+ UMLAttribute *retval = dynamic_cast(m_List.takeAt(index).data());
if (retval) {
emit attributeRemoved(retval);
UMLObject::emitModified();
@@ -1227,7 +1227,7 @@
break;
}
case UMLObject::ot_Template: {
- UMLTemplate *templt = dynamic_cast(m_List.takeAt(index));
+ UMLTemplate *templt = dynamic_cast(m_List.takeAt(index).data());
if (templt) {
emit templateRemoved(templt);
UMLObject::emitModified();
@@ -1237,7 +1237,7 @@
break;
}
case UMLObject::ot_EnumLiteral: {
- UMLEnumLiteral *el = dynamic_cast(m_List.takeAt(index) );
+ UMLEnumLiteral *el = dynamic_cast(m_List.takeAt(index).data());
if (el) {
UMLEnum *e = static_cast(this);
e->signalEnumLiteralRemoved(el);
@@ -1248,7 +1248,7 @@
break;
}
case UMLObject::ot_EntityAttribute: {
- UMLEntityAttribute* el = dynamic_cast(m_List.takeAt(index));
+ UMLEntityAttribute* el = dynamic_cast(m_List.takeAt(index).data());
if (el) {
UMLEntity *e = static_cast(this);
e->signalEntityAttributeRemoved(el);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/umbrello-15.04.2/umbrello/codegenerators/cpp/cppheadercodedocument.cpp new/umbrello-15.04.3/umbrello/codegenerators/cpp/cppheadercodedocument.cpp
--- old/umbrello-15.04.2/umbrello/codegenerators/cpp/cppheadercodedocument.cpp 2015-05-18 10:51:20.000000000 +0200
+++ new/umbrello-15.04.3/umbrello/codegenerators/cpp/cppheadercodedocument.cpp 2015-06-22 07:35:59.000000000 +0200
@@ -210,17 +210,7 @@
if(!loadCheckForChildrenOK)
{
- CodeDocument * test = dynamic_cast(this);
- if(test)
- {
- uWarning()<<" loadChildBlocks : unable to initialize any child blocks in doc: "<<test->getFileName()<<" "<(this);
- if(hb)
- uWarning()<<" loadChildBlocks : unable to initialize any child blocks in Hblock: "<<hb->getTag()<<" "<getDocToolTag() + QLatin1String("param new_var the new value of ") + fieldVarName, stream);
stream << indnt << "void ";
if (!isHeaderMethod)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/umbrello-15.04.2/umbrello/codegenerators/d/dclassifiercodedocument.cpp new/umbrello-15.04.3/umbrello/codegenerators/d/dclassifiercodedocument.cpp
--- old/umbrello-15.04.2/umbrello/codegenerators/d/dclassifiercodedocument.cpp 2015-05-18 10:51:20.000000000 +0200
+++ new/umbrello-15.04.3/umbrello/codegenerators/d/dclassifiercodedocument.cpp 2015-06-22 07:35:59.000000000 +0200
@@ -240,17 +240,7 @@
if (!loadCheckForChildrenOK)
{
- CodeDocument * test = dynamic_cast(this);
- if (test)
- {
- uWarning()<<" loadChildBlocks : unable to initialize any child blocks in doc: "<<test->getFileName()<<" "<(this);
- if (hb)
- uWarning()<<" loadChildBlocks : unable to initialize any child blocks in Hblock: "<<hb->getTag()<<" "<getInitialValue(), getTypeName());
}
else
{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/umbrello-15.04.2/umbrello/codegenerators/java/javaantcodedocument.cpp new/umbrello-15.04.3/umbrello/codegenerators/java/javaantcodedocument.cpp
--- old/umbrello-15.04.2/umbrello/codegenerators/java/javaantcodedocument.cpp 2015-05-18 10:51:20.000000000 +0200
+++ new/umbrello-15.04.3/umbrello/codegenerators/java/javaantcodedocument.cpp 2015-06-22 07:35:59.000000000 +0200
@@ -168,17 +168,7 @@
if (!loadCheckForChildrenOK)
{
- CodeDocument * test = dynamic_cast(this);
- if (test)
- {
- uWarning()<<" loadChildBlocks : unable to initialize any child blocks in doc: "<<test->getFileName()<<" "<(this);
- if (hb)
- uWarning()<<" loadChildBlocks : unable to initialize any child blocks in Hblock: "<<hb->getTag()<<" "<(this);
- if (test) {
- uWarning()<<" loadChildBlocks : unable to initialize any child blocks in doc: "<<test->getFileName()<<" "<(this);
- if (hb)
- uWarning()<<" loadChildBlocks : unable to initialize any child blocks in Hblock: "<<hb->getTag()<<" "<(this);
- if (test)
- {
- uWarning()<<" loadChildBlocks : unable to initialize any child blocks in doc: "<<test->getFileName()<<" "<(this);
- if (hb)
- uWarning()<<" loadChildBlocks : unable to initialize any child blocks in Hblock: "<<hb->getTag()<<" "<getInitialValue(), getTypeName());
}
else
{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/umbrello-15.04.2/umbrello/codeimport/kdevcppparser/cpptree2uml.cpp new/umbrello-15.04.3/umbrello/codeimport/kdevcppparser/cpptree2uml.cpp
--- old/umbrello-15.04.2/umbrello/codeimport/kdevcppparser/cpptree2uml.cpp 2015-05-18 10:51:20.000000000 +0200
+++ new/umbrello-15.04.3/umbrello/codeimport/kdevcppparser/cpptree2uml.cpp 2015-06-22 07:35:59.000000000 +0200
@@ -36,8 +36,9 @@
#include <QRegExp>
CppTree2Uml::CppTree2Uml(const QString& fileName, CodeImpThread* thread)
- : m_anon(0), m_nsCnt(0), m_clsCnt(0), m_thread(thread)
+ : m_thread(thread)
{
+ clear();
QDir dir(fileName);
m_fileName = dir.canonicalPath();
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/umbrello-15.04.2/umbrello/dialogs/codeeditor.cpp new/umbrello-15.04.3/umbrello/dialogs/codeeditor.cpp
--- old/umbrello-15.04.2/umbrello/dialogs/codeeditor.cpp 2015-05-18 10:51:20.000000000 +0200
+++ new/umbrello-15.04.3/umbrello/dialogs/codeeditor.cpp 2015-06-22 07:35:59.000000000 +0200
@@ -1061,7 +1061,7 @@
// auto-indent new lines
textCursor().setPosition(para);
QString currentParaText = textCursor().block().text();
- QString baseIndent = tBlock->getNewEditorLine(tBlock->getIndentationLevel()+(cmb ? 1 : 0));
+ QString baseIndent = tBlock->getNewEditorLine(tBlock->getIndentationLevel() + 1);
// cerr<<"AUTO INDENT:["<uiState.lineWidth = m_lineWidthB->value();
}
else if (m_scene) {
- Settings::OptionState state;
+ Settings::OptionState state = m_scene->optionState();
state.uiState.useFillColor = m_pUseFillColorCB->isChecked();
state.uiState.textColor = m_pTextColorB->color();
state.uiState.lineColor = m_pLineColorB->color();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/umbrello-15.04.2/umbrello/finder/umlfinder.cpp new/umbrello-15.04.3/umbrello/finder/umlfinder.cpp
--- old/umbrello-15.04.2/umbrello/finder/umlfinder.cpp 2015-05-18 10:51:20.000000000 +0200
+++ new/umbrello-15.04.3/umbrello/finder/umlfinder.cpp 2015-06-22 07:35:59.000000000 +0200
@@ -24,7 +24,7 @@
{
if (!o)
return false;
- UMLObject::ObjectType type = o ? o->baseType() : UMLObject::ot_Unknown;
+ UMLObject::ObjectType type = o->baseType();
return category == All
|| (category == Classes && type == UMLObject::ot_Class)
|| (category == Interfaces && type == UMLObject::ot_Interface)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/umbrello-15.04.2/umbrello/layouts/activity-vertical.desktop new/umbrello-15.04.3/umbrello/layouts/activity-vertical.desktop
--- old/umbrello-15.04.2/umbrello/layouts/activity-vertical.desktop 2015-05-18 10:51:20.000000000 +0200
+++ new/umbrello-15.04.3/umbrello/layouts/activity-vertical.desktop 2015-06-22 07:35:59.000000000 +0200
@@ -41,7 +41,7 @@
Name[zh_TW]=垂直佈局
Comment=Layout which renders vertical
Comment[bs]=Raspored koji obrađuej vertikalno
-Comment[ca]=DIsposició que renderitza verticalment
+Comment[ca]=Disposició que renderitza verticalment
Comment[ca@valencia]=DIsposició que renderitza verticalment
Comment[da]=Layout som renderer lodret
Comment[de]=Layout, das vertikal gerendert wird
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/umbrello-15.04.2/umbrello/layouts/class-horizontal.desktop new/umbrello-15.04.3/umbrello/layouts/class-horizontal.desktop
--- old/umbrello-15.04.2/umbrello/layouts/class-horizontal.desktop 2015-05-18 10:51:20.000000000 +0200
+++ new/umbrello-15.04.3/umbrello/layouts/class-horizontal.desktop 2015-06-22 07:35:59.000000000 +0200
@@ -40,7 +40,7 @@
Name[zh_TW]=水平佈局
Comment=Layout which renders Horizontal
Comment[bs]=Raspored koji obrađuje horizontalno
-Comment[ca]=DIsposició que renderitza horitzontalment
+Comment[ca]=Disposició que renderitza horitzontalment
Comment[ca@valencia]=DIsposició que renderitza horitzontalment
Comment[da]=Layout som renderer vandret
Comment[de]=Layout, das horizontal gerendert wird
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/umbrello-15.04.2/umbrello/layouts/class-vertical.desktop new/umbrello-15.04.3/umbrello/layouts/class-vertical.desktop
--- old/umbrello-15.04.2/umbrello/layouts/class-vertical.desktop 2015-05-18 10:51:20.000000000 +0200
+++ new/umbrello-15.04.3/umbrello/layouts/class-vertical.desktop 2015-06-22 07:35:59.000000000 +0200
@@ -41,7 +41,7 @@
Name[zh_TW]=垂直佈局
Comment=Layout which renders vertical
Comment[bs]=Raspored koji obrađuej vertikalno
-Comment[ca]=DIsposició que renderitza verticalment
+Comment[ca]=Disposició que renderitza verticalment
Comment[ca@valencia]=DIsposició que renderitza verticalment
Comment[da]=Layout som renderer lodret
Comment[de]=Layout, das vertikal gerendert wird
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/umbrello-15.04.2/umbrello/layouts/state-vertical.desktop new/umbrello-15.04.3/umbrello/layouts/state-vertical.desktop
--- old/umbrello-15.04.2/umbrello/layouts/state-vertical.desktop 2015-05-18 10:51:20.000000000 +0200
+++ new/umbrello-15.04.3/umbrello/layouts/state-vertical.desktop 2015-06-22 07:35:59.000000000 +0200
@@ -41,7 +41,7 @@
Name[zh_TW]=垂直佈局
Comment=Layout which renders vertical
Comment[bs]=Raspored koji obrađuej vertikalno
-Comment[ca]=DIsposició que renderitza verticalment
+Comment[ca]=Disposició que renderitza verticalment
Comment[ca@valencia]=DIsposició que renderitza verticalment
Comment[da]=Layout som renderer lodret
Comment[de]=Layout, das vertikal gerendert wird
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/umbrello-15.04.2/umbrello/model_utils.cpp new/umbrello-15.04.3/umbrello/model_utils.cpp
--- old/umbrello-15.04.2/umbrello/model_utils.cpp 2015-05-18 10:51:20.000000000 +0200
+++ new/umbrello-15.04.3/umbrello/model_utils.cpp 2015-06-22 07:35:59.000000000 +0200
@@ -431,6 +431,8 @@
/**
* Build the diagram name from the tree view.
+
+ * The function returns a relative path constructed from the folder hierachy.
* @param id the id of the diaram
* @return the constructed diagram name
*/
@@ -440,13 +442,12 @@
UMLListViewItem* listViewItem = listView->findItem(id);
if (listViewItem) {
- // skip the name of the first item because it's the View
+ QString name = listViewItem->text(0);
listViewItem = static_cast(listViewItem->parent());
// Relies on the tree structure of the UMLListView. There are a base "Views" folder
// and five children, one for each view type (Logical, use case, components, deployment
// and entity relationship)
- QString name;
while (listView->rootView(listViewItem->type()) == NULL) {
name.insert(0, listViewItem->text(0) + QLatin1Char('/'));
listViewItem = static_cast(listViewItem->parent());
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/umbrello-15.04.2/umbrello/object_factory.cpp new/umbrello-15.04.3/umbrello/object_factory.cpp
--- old/umbrello-15.04.2/umbrello/object_factory.cpp 2015-05-18 10:51:20.000000000 +0200
+++ new/umbrello-15.04.3/umbrello/object_factory.cpp 2015-06-22 07:35:59.000000000 +0200
@@ -95,7 +95,7 @@
uError() << name << ": parentPkg is NULL";
return NULL;
}
- UMLObject *o = NULL;
+ QPointer<UMLObject> o = NULL;
switch (type) {
case UMLObject::ot_Actor:
o = new UMLActor(name, g_predefinedId);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/umbrello-15.04.2/umbrello/package.cpp new/umbrello-15.04.3/umbrello/package.cpp
--- old/umbrello-15.04.2/umbrello/package.cpp 2015-05-18 10:51:20.000000000 +0200
+++ new/umbrello-15.04.3/umbrello/package.cpp 2015-06-22 07:35:59.000000000 +0200
@@ -241,6 +241,8 @@
const bool caseSensitive = UMLApp::app()->activeLanguageIsCaseSensitive();
for (UMLObjectListIt oit(m_objects); oit.hasNext();) {
UMLObject *obj = oit.next();
+ if (!obj)
+ continue;
if (caseSensitive) {
if (obj->name() == name)
return obj;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/umbrello-15.04.2/umbrello/petaltree2uml.cpp new/umbrello-15.04.3/umbrello/petaltree2uml.cpp
--- old/umbrello-15.04.2/umbrello/petaltree2uml.cpp 2015-05-18 10:51:20.000000000 +0200
+++ new/umbrello-15.04.3/umbrello/petaltree2uml.cpp 2015-06-22 07:35:59.000000000 +0200
@@ -488,9 +488,6 @@
uError() << assocStr << " roleview_list roles are incomplete";
return;
}
- } else {
- supElem = attr->findAttribute(QLatin1String("supplier"));
- cliElem = attr->findAttribute(QLatin1String("client"));
}
QString supplier = supElem.string;
QString client = cliElem.string;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/umbrello-15.04.2/umbrello/uml.cpp new/umbrello-15.04.3/umbrello/uml.cpp
--- old/umbrello-15.04.2/umbrello/uml.cpp 2015-05-18 10:51:20.000000000 +0200
+++ new/umbrello-15.04.3/umbrello/uml.cpp 2015-06-22 07:35:59.000000000 +0200
@@ -1484,8 +1484,12 @@
*/
void UMLApp::slotFileExportDocbook()
{
+ QString path = KFileDialog::getExistingDirectory();
+ if (path.isEmpty()) {
+ return;
+ }
DocbookGenerator* docbookGenerator = new DocbookGenerator;
- docbookGenerator->generateDocbookForProject();
+ docbookGenerator->generateDocbookForProjectInto(path);
connect(docbookGenerator, SIGNAL(finished(bool)), docbookGenerator, SLOT(deleteLater()));
}
@@ -1497,12 +1501,16 @@
*/
void UMLApp::slotFileExportXhtml()
{
- if (m_xhtmlGenerator != 0) {
- return;
- }
- m_xhtmlGenerator = new XhtmlGenerator();
- m_xhtmlGenerator->generateXhtmlForProject();
- connect(m_xhtmlGenerator, SIGNAL(finished(bool)), this, SLOT(slotXhtmlDocGenerationFinished(bool)));
+ QString path = KFileDialog::getExistingDirectory();
+ if (path.isEmpty()) {
+ return;
+ }
+
+ if (!m_xhtmlGenerator) {
+ m_xhtmlGenerator = new XhtmlGenerator;
+ }
+ m_xhtmlGenerator->generateXhtmlForProjectInto(path);
+ connect(m_xhtmlGenerator, SIGNAL(finished(bool)), this, SLOT(slotXhtmlDocGenerationFinished(bool)));
}
/**
@@ -3101,7 +3109,7 @@
void UMLApp::slotChangeTabLeft()
{
//DEBUG(DBG_SRC) << "currentIndex = " << m_tabWidget->currentIndex() << " of " << m_tabWidget->count();
- if (m_tabWidget) {
+ if (Settings::optionState().generalState.tabdiagrams && m_tabWidget) {
m_tabWidget->setCurrentIndex(m_tabWidget->currentIndex() - 1);
return;
}
@@ -3131,7 +3139,7 @@
void UMLApp::slotChangeTabRight()
{
//DEBUG(DBG_SRC) << "currentIndex = " << m_tabWidget->currentIndex() << " of " << m_tabWidget->count();
- if (m_tabWidget) {
+ if (Settings::optionState().generalState.tabdiagrams && m_tabWidget) {
m_tabWidget->setCurrentIndex(m_tabWidget->currentIndex() + 1);
return;
}
@@ -3143,16 +3151,12 @@
return;
}
UMLView* nextView = NULL;
- if (viewIndex!= views.count()) {
- views.begin()[viewIndex + 1];
+ if (viewIndex < views.count()-1) {
+ nextView = views.begin()[viewIndex + 1];
+ setCurrentView(nextView);
}
-
- if ((currView = nextView) != NULL) {
- setCurrentView(currView);
- }
- else {
+ else
setCurrentView(views.first());
- }
}
/* for debugging only
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/umbrello-15.04.2/umbrello/umldoc.cpp new/umbrello-15.04.3/umbrello/umldoc.cpp
--- old/umbrello-15.04.2/umbrello/umldoc.cpp 2015-05-18 10:51:20.000000000 +0200
+++ new/umbrello-15.04.3/umbrello/umldoc.cpp 2015-06-22 07:35:59.000000000 +0200
@@ -2933,7 +2933,7 @@
* Sets the default settings to the given settings.
* @param optionState settings
*/
-void UMLDoc::settingsChanged(Settings::OptionState optionState)
+void UMLDoc::settingsChanged(Settings::OptionState &optionState)
{
for (int i = 0; i < Uml::ModelType::N_MODELTYPES; ++i) {
m_root[i]->setViewOptions(optionState);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/umbrello-15.04.2/umbrello/umldoc.h new/umbrello-15.04.3/umbrello/umldoc.h
--- old/umbrello-15.04.2/umbrello/umldoc.h 2015-05-18 10:51:20.000000000 +0200
+++ new/umbrello-15.04.3/umbrello/umldoc.h 2015-06-22 07:35:59.000000000 +0200
@@ -194,7 +194,7 @@
void setDocumentation(const QString &doc);
QString documentation() const;
- void settingsChanged(Settings::OptionState optionState);
+ void settingsChanged(Settings::OptionState &optionState);
QString uniqueViewName(const Uml::DiagramType::Enum type);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/umbrello-15.04.2/umbrello/umlobjectlist.h new/umbrello-15.04.3/umbrello/umlobjectlist.h
--- old/umbrello-15.04.2/umbrello/umlobjectlist.h 2015-05-18 10:51:20.000000000 +0200
+++ new/umbrello-15.04.3/umbrello/umlobjectlist.h 2015-06-22 07:35:59.000000000 +0200
@@ -13,17 +13,19 @@
#define UMLOBJECTLIST_H
#include <QList>
+#include <QPointer>
// forward declarations
class UMLObject;
-typedef QListIterator UMLObjectListIt;
+typedef QListIterator
+UMLObjectListIt;
/**
* This sub-class adds copyInto and clone to the QList
* base class.
*/
-class UMLObjectList : public QList
+class UMLObjectList : public QList
{
public:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/umbrello-15.04.2/umbrello/umlscene.cpp new/umbrello-15.04.3/umbrello/umlscene.cpp
--- old/umbrello-15.04.2/umbrello/umlscene.cpp 2015-05-18 10:51:20.000000000 +0200
+++ new/umbrello-15.04.3/umbrello/umlscene.cpp 2015-06-22 07:35:59.000000000 +0200
@@ -1014,7 +1014,7 @@
foreach(MessageWidget *obj, m_MessageList) {
if (obj->hasObjectWidget(w)) {
- removeWidget(obj);
+ removeWidgetCmd(obj);
}
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/umbrello-15.04.2/umbrello/umlviewimageexportermodel.cpp new/umbrello-15.04.3/umbrello/umlviewimageexportermodel.cpp
--- old/umbrello-15.04.2/umbrello/umlviewimageexportermodel.cpp 2015-05-18 10:51:20.000000000 +0200
+++ new/umbrello-15.04.3/umbrello/umlviewimageexportermodel.cpp 2015-06-22 07:35:59.000000000 +0200
@@ -27,6 +27,7 @@
// include files for Qt
#include <QApplication>
+#include <QDesktopWidget>
#include <QDir>
#include <QImage>
#include <QImageWriter>
@@ -289,7 +290,7 @@
if (scene) {
if (useFolders) {
qApp->processEvents(); //:TODO: still needed ???
- return Model_Utils::treeViewBuildDiagramName(scene->ID());
+ return Model_Utils::treeViewBuildDiagramName(scene->ID()) + QLatin1Char('.') + imageType.toLower();
}
else {
return scene->name() + QLatin1Char('.') + imageType.toLower();
@@ -356,7 +357,7 @@
return false;
}
} else if (imageMimeType == QLatin1String("image/x-eps")) {
- if (!exportViewToEps(scene, fileName, true)) {
+ if (!exportViewToEps(scene, fileName)) {
return false;
}
} else if (imageMimeType == QLatin1String("image/svg+xml")) {
@@ -399,66 +400,47 @@
*
* @param scene The scene to export.
* @param fileName The name of the file where the image will be saved.
- * @param isEPS The file is an eps file and needs adjusting
- * of the eps bounding box values.
* @return True if the operation was successful,
* false if a problem occurred while exporting.
*/
-bool UMLViewImageExporterModel::exportViewToEps(UMLScene* scene, const QString &fileName, bool isEPS) const
+bool UMLViewImageExporterModel::exportViewToEps(UMLScene* scene, const QString &fileName) const
{
if (!scene) {
uWarning() << "Scene is null!";
return false;
}
- bool exportSuccessful = true;
-
- // print the image to a normal postscript file,
- // do not clip so that everything ends up in the file
- // regardless of "paper size"
-
- // because we want to work with postscript
- // user-coordinates, set to the resolution
- // of the printer (which should be 72dpi here)
- QPrinter *printer;
+ qreal border = 0.01; // mm
+ QRectF rect = scene->diagramRect();
+ QSizeF paperSize(rect.size() * 25.4f / qApp->desktop()->logicalDpiX());
- if (isEPS == false) {
- printer = new QPrinter(QPrinter::PrinterResolution);
- } else {
- printer = new QPrinter(QPrinter::ScreenResolution);
- }
- printer->setOutputFileName(fileName);
- printer->setOutputFormat(QPrinter::PostScriptFormat);
- printer->setColorMode(QPrinter::Color);
+ QPrinter printer(QPrinter::ScreenResolution);
+ printer.setOutputFileName(fileName);
+ printer.setOutputFormat(QPrinter::PostScriptFormat);
+ printer.setColorMode(QPrinter::Color);
+ printer.setPaperSize(paperSize, QPrinter::Millimeter);
+ printer.setPageMargins(paperSize.width() * border, paperSize.height() * border, 0, 0, QPrinter::Millimeter);
+ printer.setResolution(qApp->desktop()->logicalDpiX());
+ printer.setOrientation(paperSize.width() < paperSize.height() ? QPrinter::Landscape : QPrinter::Portrait);
// do not call printer.setup(); because we want no user
// interaction here
- QPainter *painter = new QPainter(printer);
+ QPainter painter(&printer);
+
+ // add border around image
+ painter.scale(1 - border, 1 - border);
// make sure the widget sizes will be according to the
// actually used printer font, important for diagramRect()
// and the actual painting
- scene->forceUpdateWidgetFontMetrics(painter);
-
- QRectF rect = scene->diagramRect();
- painter->translate(-rect.x(), -rect.y());
- scene->getDiagram(*painter, rect);
+ scene->forceUpdateWidgetFontMetrics(&painter);
- int resolution = printer->resolution();
+ scene->getDiagram(painter, rect);
- // delete painter and printer before we try to open and fix the file
- delete painter;
- delete printer;
- if (isEPS) {
- // modify bounding box from screen to eps resolution.
- rect.setWidth(int(ceil(rect.width() * 72.0/resolution)));
- rect.setHeight(int(ceil(rect.height() * 72.0/resolution)));
- exportSuccessful = fixEPS(fileName, rect);
- }
// next painting will most probably be to a different device (i.e. the screen)
scene->forceUpdateWidgetFontMetrics(0);
- return exportSuccessful;
+ return true;
}
/**
@@ -482,6 +464,7 @@
QSvgGenerator generator;
generator.setFileName(fileName);
generator.setSize(rect.toRect().size());
+ generator.setResolution(qApp->desktop()->logicalDpiX());
generator.setViewBox(QRect(0, 0, rect.width(), rect.height()));
QPainter painter(&generator);
@@ -526,7 +509,9 @@
}
QRectF rect = scene->diagramRect();
- QPixmap diagram(rect.width(), rect.height());
+ float scale = 72.0f / qApp->desktop()->logicalDpiX();
+ QSizeF size = rect.size() * scale;
+ QPixmap diagram(size.toSize());
scene->getDiagram(diagram, rect);
bool exportSuccessful = diagram.save(fileName, qPrintable(imageType.toUpper()));
DEBUG(DBG_IEM) << "saving to file " << fileName
@@ -536,56 +521,3 @@
<< ", successful=" << exportSuccessful;
return exportSuccessful;
}
-
-/**
- * Fix the file 'fileName' to be a valid EPS containing the
- * specified area (rect) of the diagram.
- * Corrects the bounding box.
- *
- * @return True if the operation was successful,
- * false if a problem occurred while exporting.
- */
-bool UMLViewImageExporterModel::fixEPS(const QString &fileName, const QRectF& rect) const
-{
- // now open the file and make a correct eps out of it
- QFile epsfile(fileName);
- if (! epsfile.open(QIODevice::ReadOnly)) {
- return false;
- }
- // read
- QTextStream ts(&epsfile);
- QString fileContent = ts.readAll();
- epsfile.close();
-
- // read information
- QRegExp rx(QLatin1String("%%BoundingBox:\\s*(-?[\\d\\.:]+)\\s*(-?[\\d\\.:]+)\\s*(-?[\\d\\.:]+)\\s*(-?[\\d\\.:]+)"));
- const int pos = rx.indexIn(fileContent);
- if (pos < 0) {
- uError() << fileName << ": cannot find %%BoundingBox";
- return false;
- }
-
- // write new content to file
- if (! epsfile.open(QIODevice::WriteOnly | QIODevice::Truncate)) {
- uError() << fileName << ": cannot open file for writing";
- return false;
- }
-
- // be careful when rounding (ceil/floor) the BB, these roundings
- // were mainly obtained experimentally...
- const double epsleft = rx.cap(1).toFloat();
- const double epstop = rx.cap(4).toFloat();
- const int left = int(floor(epsleft));
- const int right = int(ceil(epsleft)) + rect.width();
- const int top = int(ceil(epstop)) + 1;
- const int bottom = int(floor(epstop)) - rect.height() + 1;
-
- // modify content
- fileContent.replace(pos, rx.cap(0).length(),
- QString::fromLatin1("%%BoundingBox: %1 %2 %3 %4").arg(left).arg(bottom).arg(right).arg(top));
-
- ts << fileContent;
- epsfile.close();
-
- return true;
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/umbrello-15.04.2/umbrello/umlviewimageexportermodel.h new/umbrello-15.04.3/umbrello/umlviewimageexportermodel.h
--- old/umbrello-15.04.2/umbrello/umlviewimageexportermodel.h 2015-05-18 10:51:20.000000000 +0200
+++ new/umbrello-15.04.3/umbrello/umlviewimageexportermodel.h 2015-06-22 07:35:59.000000000 +0200
@@ -53,12 +53,10 @@
bool exportViewTo(UMLScene* scene, const QString &imageType, const QString &fileName) const;
bool exportViewToDot(UMLScene* scene, const QString &fileName) const;
- bool exportViewToEps(UMLScene* scene, const QString &fileName, bool isEPS) const;
+ bool exportViewToEps(UMLScene* scene, const QString &fileName) const;
bool exportViewToSvg(UMLScene* scene, const QString &fileName) const;
bool exportViewToPixmap(UMLScene* scene, const QString &imageType, const QString &fileName) const;
- bool fixEPS(const QString &fileName, const QRectF& rect) const;
-
static QStringList s_supportedImageTypesList;
static QStringList s_supportedMimeTypesList;