[umbrello/frameworks] /: Merge remote-tracking branch 'origin/master' into frameworks

Ralf Habacker null at kde.org
Mon Jan 9 23:09:48 UTC 2017


Git commit 7465e07f867aa27aac68d9f1f194203d96ea8306 by Ralf Habacker.
Committed on 09/01/2017 at 23:09.
Pushed by habacker into branch 'frameworks'.

Merge remote-tracking branch 'origin/master' into frameworks

M  +2    -64   doc/CMakeLists.txt
M  +0    -0    doc/apphelp/index.docbook
M  +1    -0    umbrello/CMakeLists.txt
M  +19   -0    umbrello/debug/debug_utils.h
M  +6    -5    umbrello/dialogs/umlattributedialog.cpp
M  +1    -0    umbrello/listpopupmenu.cpp
M  +1    -1    umbrello/model_utils.cpp
M  +3    -0    umbrello/uml.cpp
M  +2    -0    umbrello/umlappprivate.h
M  +19   -1    umbrello/umldoc.cpp
M  +8    -0    umbrello/umldoc.h
M  +2    -2    umbrello/umllistview.cpp
M  +3    -3    umbrello/umllistviewitem.cpp
M  +1    -1    umbrello/umlmodel/classifier.cpp
M  +1    -1    umbrello/umlmodel/classifierlistitem.h
M  +2    -1    umbrello/umlmodel/entity.cpp
M  +2    -1    umbrello/umlmodel/enumliteral.cpp
M  +2    -1    umbrello/umlmodel/foreignkeyconstraint.cpp
M  +16   -3    umbrello/umlmodel/operation.cpp
M  +31   -31   umbrello/umlmodel/umlobject.cpp
M  +7    -5    umbrello/umlscene.cpp
M  +13   -28   umbrello/umlwidgets/associationwidget.cpp
M  +5    -5    umbrello/umlwidgets/classifierwidget.cpp
M  +1    -0    umbrello/umlwidgets/umlwidget.cpp
M  +3    -0    unittests/CMakeLists.txt

https://commits.kde.org/umbrello/7465e07f867aa27aac68d9f1f194203d96ea8306

diff --cc doc/CMakeLists.txt
index c0bbde2da,b4d6a8578..0f1ac2acd
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@@ -1,68 -1,18 +1,6 @@@
 -if (NOT BUILD_KF5)
 -    set(KDOCTOOLS_CUSTOMIZATION_DIR "${KDE4_DATA_INSTALL_DIR}/ksgmltools2/customization")
 -else()
 -    set(KDOCTOOLS_CUSTOMIZATION_DIR "${KDOCTOOLS_DATA_INSTALL_DIR}/kdoctools/customization")
 -endif()
 +set(KDOCTOOLS_CUSTOMIZATION_DIR "${KDOCTOOLS_DATA_INSTALL_DIR}/kdoctools/customization")
  
- function(_kdoctools_create_target_name out in)
-     string(REGEX REPLACE "^${CMAKE_BINARY_DIR}/?" "" in "${in}")
-     string(REGEX REPLACE "[^0-9a-zA-Z]+" "-" tmp "${in}")
-     set(${out} ${tmp} PARENT_SCOPE)
- endfunction()
- 
- function (kdoctools_create_article docbook)
-     # Parse arguments
-     set(options)
-     set(oneValueArgs INSTALL_DESTINATION SUBDIR)
-     set(multiValueArgs)
-     cmake_parse_arguments(ARGS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
- 
-     if(NOT DEFINED ARGS_SUBDIR)
-         message(FATAL_ERROR "SUBDIR needs to be defined when calling kdoctools_create_article")
-     endif()
- 
-     # Init vars
-     get_filename_component(docbook ${docbook} ABSOLUTE)
-     file(RELATIVE_PATH src_doc ${CMAKE_CURRENT_SOURCE_DIR} ${docbook})
-     get_filename_component(src_dir ${src_doc} DIRECTORY)
-     get_filename_component(_name ${docbook} NAME_WE)
-     set(build_dir ${CMAKE_CURRENT_BINARY_DIR}/${src_dir})
-     set(build_html ${build_dir}/${_name}.html)
- 
-     # current directory is the docbook directory, but if this is empty, the
-     # globs which finds the docbooks and the images will be empty too as
-     # they will expand into "/*.docbook" and "/*.png"
-     if (src_dir STREQUAL "")
-         set(src_dir ".")
-     endif ()
- 
-     # Create some place to store our files
-     file(MAKE_DIRECTORY ${build_dir})
- 
-     #Bootstrap
-     if (_kdoctoolsBootStrapping)
-         set(_bootstrapOption "--srcdir=${KDocTools_BINARY_DIR}/src")
-     elseif (CMAKE_CROSSCOMPILING AND CMAKE_SYSTEM_NAME STREQUAL "Windows")
-         set(_bootstrapOption "--srcdir=${KDOCTOOLS_DATA_INSTALL_DIR}/kdoctools")
-     else ()
-         set(_bootstrapOption)
-     endif ()
-     set(_ssheet "${KDOCTOOLS_CUSTOMIZATION_DIR}/kde-chunk.xsl")
- 
-     add_custom_command(OUTPUT ${build_html}
-         COMMAND ${KDOCTOOLS_MEINPROC_EXECUTABLE} --check ${_bootstrapOption} -o ${build_html} ${src_doc}
-         DEPENDS ${src_doc} ${_ssheet}
-         WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-     )
- 
-     _kdoctools_create_target_name(_targ_html ${build_html})
-     add_custom_target(${_targ_html} ALL DEPENDS ${build_html})
- 
-     set(installDest "${ARGS_INSTALL_DESTINATION}")
-     if(installDest)
-         set(subdir "${ARGS_SUBDIR}")
- #        file(GLOB images ${src_dir}/*.png)
- #        install(FILES ${build_doc} ${src_docs} ${images} DESTINATION ${installDest}/${subdir})
-         install(FILES ${build_html} DESTINATION ${installDest}/${subdir})
-     endif()
- endfunction()
- 
  ########### install files ###############
 -if(BUILD_KF5)
 -    file(READ "index.docbook" index_file)
 -    string(REPLACE "4.2" "4.5" index_file "${index_file}")
 -    string(REPLACE "kdex.dtd" "kdedbx45.dtd" index_file "${index_file}")
 -    file(WRITE "index-kf5.docbook" "${index_file}")
 -    kdoctools_create_handbook(index-kf5.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR umbrello)
 -else()
 -    kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR umbrello)
 -endif()
 +kdoctools_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR umbrello)
- kdoctools_create_article(welcome.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR umbrello)
+ 
+ add_subdirectory(apphelp)
diff --cc umbrello/dialogs/umlattributedialog.cpp
index 131e76465,ef2651250..efc99899b
--- a/umbrello/dialogs/umlattributedialog.cpp
+++ b/umbrello/dialogs/umlattributedialog.cpp
@@@ -89,24 -123,21 +89,25 @@@ bool UMLAttributeDialog::apply(
      if (o && o != m_pAttribute) {
          KMessageBox::error(this, i18n("The attribute name you have chosen is already being used in this operation."),
                             i18n("Attribute Name Not Unique"), 0);
 -        m_pNameLE->setText(m_pAttribute->name());
 +        ui->nameLE->setText(m_pAttribute->name());
          return false;
      }
-     m_pAttribute->setName(name);
+     m_pAttribute->blockSignals(true);
 -    m_visibilityEnumWidget->apply();
 -    m_pAttribute->setInitialValue(m_pInitialLE->text());
 -    m_stereotypeWidget->apply();
 -    m_pAttribute->setStatic(m_pStaticCB->isChecked());
 -    m_datatypeWidget->apply();
 -    m_docWidget->apply();
 +    ui->visibilityWidget->apply();
- 
-     // Set the scope as the default in the option state
-     Settings::optionState().classState.defaultAttributeScope = m_pAttribute->visibility();
- 
 +    m_pAttribute->setInitialValue(ui->initialValueLE->text());
 +    ui->stereotypeWidget->apply();
 +    m_pAttribute->setStatic(ui->classifierScopeCB->isChecked());
 +    if(activeLanguage == Uml::ProgrammingLanguage::Cpp){
 +        ui->typeQualifiersWidget->apply();
 +        ui->typeModifierWidget->apply();
 +    }
 +    ui->dataTypeWidget->apply();
 +    ui->documentationWidget->apply();
+     m_pAttribute->blockSignals(false);
+     // trigger signals
+     m_pAttribute->setName(name);
  
+     // Set the scope as the default in the option state
+     Settings::optionState().classState.defaultAttributeScope = m_pAttribute->visibility();
      return true;
  }
diff --cc umbrello/umldoc.cpp
index ef2fc51be,7f7e932bc..67ec11264
--- a/umbrello/umldoc.cpp
+++ b/umbrello/umldoc.cpp
@@@ -86,9 -103,14 +86,10 @@@ UMLDoc::UMLDoc(
      m_modelID("m1"),
      m_count(0),
      m_modified(false),
 -#if QT_VERSION >= 0x050000
      m_doc_url(QUrl()),
 -#else
 -    m_doc_url(KUrl()),
 -#endif
      m_pChangeLog(0),
      m_bLoading(false),
+     m_importing(false),
      m_Doc(QString()),
      m_pAutoSaveTimer(0),
      m_nViewID(Uml::ID::None),
diff --cc umbrello/umllistview.cpp
index 37bd2937c,b1d3dda31..3b28cf579
--- a/umbrello/umllistview.cpp
+++ b/umbrello/umllistview.cpp
@@@ -1164,10 -1190,10 +1164,10 @@@ void UMLListView::setDocument(UMLDoc *d
   */
  void UMLListView::slotObjectRemoved(UMLObject* object)
  {
-     if (m_doc->loading()) { //needed for class wizard
+     if (m_doc->loading() && !m_doc->importing()) { //needed for class wizard but not when importing
          return;
      }
 -    disconnect(object, SIGNAL(modified()), this, SLOT(slotObjectChanged()));
 +    disconnect(object, &UMLObject::modified, this, &UMLListView::slotObjectChanged);
      UMLListViewItem* item = findItem(object->id());
      delete item;
      UMLApp::app()->docWindow()->updateDocumentation(true);
diff --cc umbrello/umlmodel/umlobject.cpp
index 16ad6ca65,224361a47..891aa4c01
--- a/umbrello/umlmodel/umlobject.cpp
+++ b/umbrello/umlmodel/umlobject.cpp
@@@ -1289,34 -1227,33 +1290,33 @@@ QDebug operator<<(QDebug out, const UML
  #include "uniqueconstraint.h"
  #include "usecase.h"
  
- UMLActor* UMLObject::asUMLActor() {return dynamic_cast<UMLActor*>(this); }
- UMLArtifact* UMLObject::asUMLArtifact() { return dynamic_cast<UMLArtifact*>(this); }
- UMLAssociation* UMLObject::asUMLAssociation() { return dynamic_cast<UMLAssociation*>(this); }
- UMLAttribute* UMLObject::asUMLAttribute() { return dynamic_cast<UMLAttribute*>(this); }
- UMLCanvasObject* UMLObject::asUMLCanvasObject() { return dynamic_cast<UMLCanvasObject*>(this); }
- UMLCategory* UMLObject::asUMLCategory() { return dynamic_cast<UMLCategory*>(this); }
- UMLCheckConstraint* UMLObject::asUMLCheckConstraint() { return dynamic_cast<UMLCheckConstraint*>(this); }
- UMLClassifier* UMLObject::asUMLClassifier() { return dynamic_cast<UMLClassifier*>(this); }
- UMLClassifierListItem *UMLObject::asUMLClassifierListItem() { return dynamic_cast<UMLClassifierListItem*>(this); }
- UMLComponent* UMLObject::asUMLComponent() { return dynamic_cast<UMLComponent*>(this); }
- UMLDatatype *UMLObject::asUMLDatatype() { return dynamic_cast<UMLDatatype*>(this); }
- UMLEntity* UMLObject::asUMLEntity() { return dynamic_cast<UMLEntity*>(this); }
- UMLEntityAttribute* UMLObject::asUMLEntityAttribute() { return dynamic_cast<UMLEntityAttribute*>(this); }
- UMLEntityConstraint* UMLObject::asUMLEntityConstraint() { return dynamic_cast<UMLEntityConstraint*>(this); }
- UMLEnum* UMLObject::asUMLEnum() { return dynamic_cast<UMLEnum*>(this); }
- UMLEnumLiteral* UMLObject::asUMLEnumLiteral() { return dynamic_cast<UMLEnumLiteral*>(this); }
- UMLFolder* UMLObject::asUMLFolder() { return dynamic_cast<UMLFolder*>(this); }
- UMLForeignKeyConstraint* UMLObject::asUMLForeignKeyConstraint() { return dynamic_cast<UMLForeignKeyConstraint*>(this); }
- UMLInstance *UMLObject::asUMLInstance() { return dynamic_cast<UMLInstance*>(this); }
- UMLInstanceAttribute *UMLObject::asUMLInstanceAttribute() {  return dynamic_cast<UMLInstanceAttribute*>(this); }
- UMLNode* UMLObject::asUMLNode() { return dynamic_cast<UMLNode*>(this); }
- UMLObject* UMLObject::asUMLObject() { return dynamic_cast<UMLObject*>(this); }
- UMLOperation* UMLObject::asUMLOperation() { return dynamic_cast<UMLOperation*>(this); }
- UMLPackage* UMLObject::asUMLPackage() { return dynamic_cast<UMLPackage*>(this); }
- UMLPort* UMLObject::asUMLPort() { return dynamic_cast<UMLPort*>(this); }
- UMLRole* UMLObject::asUMLRole() { return dynamic_cast<UMLRole*>(this); }
- UMLStereotype* UMLObject::asUMLStereotype() { return dynamic_cast<UMLStereotype*>(this); }
- UMLTemplate* UMLObject::asUMLTemplate() { return dynamic_cast<UMLTemplate*>(this); }
- UMLUniqueConstraint* UMLObject::asUMLUniqueConstraint() { return dynamic_cast<UMLUniqueConstraint*>(this); }
- UMLUseCase* UMLObject::asUMLUseCase() { return dynamic_cast<UMLUseCase*>(this); }
--
+ UMLActor* UMLObject::asUMLActor() { uCheckPointerAndReturnIfZero(this); return dynamic_cast<UMLActor*>(this); }
+ UMLArtifact* UMLObject::asUMLArtifact() { uCheckPointerAndReturnIfZero(this); return dynamic_cast<UMLArtifact*>(this); }
+ UMLAssociation* UMLObject::asUMLAssociation() { uCheckPointerAndReturnIfZero(this); return dynamic_cast<UMLAssociation*>(this); }
+ UMLAttribute* UMLObject::asUMLAttribute() { uCheckPointerAndReturnIfZero(this); return dynamic_cast<UMLAttribute*>(this); }
+ UMLCanvasObject* UMLObject::asUMLCanvasObject() { uCheckPointerAndReturnIfZero(this); return dynamic_cast<UMLCanvasObject*>(this); }
+ UMLCategory* UMLObject::asUMLCategory() { uCheckPointerAndReturnIfZero(this); return dynamic_cast<UMLCategory*>(this); }
+ UMLCheckConstraint* UMLObject::asUMLCheckConstraint() { uCheckPointerAndReturnIfZero(this); return dynamic_cast<UMLCheckConstraint*>(this); }
+ UMLClassifier* UMLObject::asUMLClassifier() { uCheckPointerAndReturnIfZero(this); return dynamic_cast<UMLClassifier*>(this); }
+ UMLClassifierListItem *UMLObject::asUMLClassifierListItem() { uCheckPointerAndReturnIfZero(this); return dynamic_cast<UMLClassifierListItem*>(this); }
+ UMLComponent* UMLObject::asUMLComponent() { uCheckPointerAndReturnIfZero(this); return dynamic_cast<UMLComponent*>(this); }
+ UMLDatatype *UMLObject::asUMLDatatype() { uCheckPointerAndReturnIfZero(this); return dynamic_cast<UMLDatatype*>(this); }
+ UMLEntity* UMLObject::asUMLEntity() { uCheckPointerAndReturnIfZero(this); return dynamic_cast<UMLEntity*>(this); }
+ UMLEntityAttribute* UMLObject::asUMLEntityAttribute() { uCheckPointerAndReturnIfZero(this); return dynamic_cast<UMLEntityAttribute*>(this); }
+ UMLEntityConstraint* UMLObject::asUMLEntityConstraint() { uCheckPointerAndReturnIfZero(this); return dynamic_cast<UMLEntityConstraint*>(this); }
+ UMLEnum* UMLObject::asUMLEnum() { uCheckPointerAndReturnIfZero(this); return dynamic_cast<UMLEnum*>(this); }
+ UMLEnumLiteral* UMLObject::asUMLEnumLiteral() { uCheckPointerAndReturnIfZero(this); return dynamic_cast<UMLEnumLiteral*>(this); }
+ UMLFolder* UMLObject::asUMLFolder() { uCheckPointerAndReturnIfZero(this); return dynamic_cast<UMLFolder*>(this); }
+ UMLForeignKeyConstraint* UMLObject::asUMLForeignKeyConstraint() { uCheckPointerAndReturnIfZero(this); return dynamic_cast<UMLForeignKeyConstraint*>(this); }
++UMLInstance *UMLObject::asUMLInstance() { uCheckPointerAndReturnIfZero(this); return dynamic_cast<UMLInstance*>(this); }
++UMLInstanceAttribute *UMLObject::asUMLInstanceAttribute() { uCheckPointerAndReturnIfZero(this); return dynamic_cast<UMLInstanceAttribute*>(this); }
+ UMLNode* UMLObject::asUMLNode() { uCheckPointerAndReturnIfZero(this); return dynamic_cast<UMLNode*>(this); }
+ UMLObject* UMLObject::asUMLObject() { uCheckPointerAndReturnIfZero(this); return dynamic_cast<UMLObject*>(this); }
+ UMLOperation* UMLObject::asUMLOperation() { uCheckPointerAndReturnIfZero(this); return dynamic_cast<UMLOperation*>(this); }
+ UMLPackage* UMLObject::asUMLPackage() { uCheckPointerAndReturnIfZero(this); return dynamic_cast<UMLPackage*>(this); }
+ UMLPort* UMLObject::asUMLPort() { uCheckPointerAndReturnIfZero(this); return dynamic_cast<UMLPort*>(this); }
+ UMLRole* UMLObject::asUMLRole() { uCheckPointerAndReturnIfZero(this); return dynamic_cast<UMLRole*>(this); }
+ UMLStereotype* UMLObject::asUMLStereotype() { uCheckPointerAndReturnIfZero(this); return dynamic_cast<UMLStereotype*>(this); }
+ UMLTemplate* UMLObject::asUMLTemplate() { uCheckPointerAndReturnIfZero(this); return dynamic_cast<UMLTemplate*>(this); }
+ UMLUniqueConstraint* UMLObject::asUMLUniqueConstraint() { uCheckPointerAndReturnIfZero(this); return dynamic_cast<UMLUniqueConstraint*>(this); }
+ UMLUseCase* UMLObject::asUMLUseCase() { uCheckPointerAndReturnIfZero(this); return dynamic_cast<UMLUseCase*>(this); }
 -


More information about the kde-doc-english mailing list