1. 14 Dec, 2020 1 commit
  2. 13 Dec, 2020 3 commits
    • Oliver Kellogg's avatar
      Followup to commit 9d9800c3 fix for crash on exit with tabbed diagrams · bd8b3b1c
      Oliver Kellogg authored
      There was a further crash on closing in the code path
        UMLApp::slotFileClose() => slotFileNew() => m_doc->newDocument()
      due to DiagramsModel::m_views not having been reset to empty.
      This caused access to stale UMLView objects already deconstructed.
      
      umbrello/models/diagramsmodel.{h,cpp}
      - New function removeAllDiagrams clears content of m_views.
      
      umbrello/uml.cpp
      - In function slotFileClose call diagramsModel()->removeAllDiagrams()
        on m_doc before calling slotFileNew().
      
      CCBUG: 430322
      bd8b3b1c
    • Oliver Kellogg's avatar
      import_rose.cpp : Align active programming language with model content · 1a9d3283
      Oliver Kellogg authored
      - Global `progLang' of type Uml::ProgrammingLanguage::Enum captures
        programming language specified by Rose model.
      - In function readAttributes loop of stream.readLine(), if nt is
        PetalNode::nt_string and stringOrNodeOpener is not "(" then test name
        for "language".  If equal then derive progLang from value.string.
      - In function loadFromMDL, after parsing the model file,
        - if progLang hash not been established by the model and no code
          generator hash been allocated at UMLApp then allocate generator
          for C++ as default;
        - else if progLang is not the same as the active generator at UMLApp
          then call UMLApp::app()->setGenerator(progLang).
      
      CCBUG: 81364
      1a9d3283
    • Oliver Kellogg's avatar
      umbrello/umldoc.cpp function createDatatype crash fix: · 7d16382f
      Oliver Kellogg authored
      - If Model_Utils::findUMLObject() returns a umlobject which is not a
        datatype then umlobject->asUMLDatatype() returns nullptr.
        If this is the case then avoid calling methods on the nullptr and log
        a warning "Name already exists but is not a Datatype".
      7d16382f
  3. 12 Dec, 2020 3 commits
    • Oliver Kellogg's avatar
      Fix for 'Nested folders are not loaded properly' · a8159910
      Oliver Kellogg authored
      umbrello/model_utils.cpp
      - In function convert_OT_LVT case UMLObject::ot_Folder,
        - replace local UMLFolder *f by UMLPackage *p initialized to
          o->asUMLPackage();
        - at do-while loop condition omit call to asUMLFolder().
          Reason: Permit packages as intermediate stores.
      
      umbrello/uml1model/package.cpp
      - On processing <packagedElement> and <ownedElement>,
        - before calling Object_Factory::makeObjectFromXMI(), retrieve
          attribute "stereotype" into local stereoID;
        - pass stereoID into call of Object_Factory::makeObjectFromXMI().
      
      BUG: 430323
      a8159910
    • Oliver Kellogg's avatar
      Fix for 'Crash on exit with tabbed diagrams enabled' · 9d9800c3
      Oliver Kellogg authored
      umbrello/uml.cpp
      - In function slotTabChanged(int index) / slotTabChanged(QWidget* tab)
        do not call m_doc->changeCurrentView() is s_shuttingDown is true.
        Reason: Calling changeCurrentView accesses objects which have already
        been deconstructed.
      
      BUG: 430322
      9d9800c3
    • Oliver Kellogg's avatar
  4. 09 Dec, 2020 1 commit
  5. 06 Dec, 2020 1 commit
    • Oliver Kellogg's avatar
      umbrello/version.h · b0f4278b
      Oliver Kellogg authored
      - Increase XMI_FILE_VERSION to 1.7.0 to reflect major change in XMI
        attribute order.
      
      BUG: 363582
      b0f4278b
  6. 04 Dec, 2020 2 commits
  7. 29 Nov, 2020 2 commits
    • Oliver Kellogg's avatar
      Fix for 'Callback message in sequence diagram cannot be resized' · eae999b7
      Oliver Kellogg authored
      umbrello/umlwidgets/messagewidget.{h,cpp}
      - Reimplement UMLWidget::isInResizeArea instead of resizeCursor.
        Reason: In case of a message widget running from right to left, the
        resize area is at the left bottom corner because the message's
        execution specification is also at the left.  Furthermore, the right
        side may be covered up by another message's execution specification.
      
      umbrello/umlwidgets/umlwidget.cpp
      - In function mousePressEvent extend debug message to show pos() and
        event->scenePos().
      - In function paint(QPainter*,const QStyleOptionGraphicsItem*, QWidget*)
        case (option->state & QStyle::State_Selected)
          case (m_resizable && w >= s+8 && h >= s+8),
        - int horSide initialized to `w' replaces variable `right';
        - if baseType() is wt_Message and the message's role A ObjectWidget is
          to the right of the role B ObjectWidget then set horSide to a small
          value in order to place the resize anchor at the role B object;
        - in calls to painter->drawLine() use horSide in lieu of `right'.
      
      BUG: 429794
      eae999b7
    • Oliver Kellogg's avatar
  8. 22 Nov, 2020 2 commits
    • Oliver Kellogg's avatar
      umbrello/umlscene.cpp followup to commit 87abeac3 fix for bug 429181 · 97ed260f
      Oliver Kellogg authored
      - In function clearSelected iterate over selectedItems() for calling
        WidgetBase::setSelected(false) on each item.
      
      CCBUG: 429181
      97ed260f
    • Oliver Kellogg's avatar
      !17 (comment 140469) · 3d17c969
      Oliver Kellogg authored
      On saving <UML:Operation> avoid empty <UML:BehavioralFeature.parameter/>
      
      umbrello/uml1model/operation.cpp
      - In function saveToXMI1, before calling writer.writeStartElement for
        "UML:BehavioralFeature.parameter", if m_pSecondary is null and m_List
        is empty then write </UML:Operation> closing element and return.
      
      CCBUG: 363582
      3d17c969
  9. 21 Nov, 2020 7 commits
  10. 13 Nov, 2020 2 commits
    • Oliver Kellogg's avatar
      umbrello/umlwidgets/regionwidget.cpp · b1a4f029
      Oliver Kellogg authored
      - In function saveToXMI1 fix error on migrating from QDomDocument
        to QXmlStreamWriter.
      
      umbrello/umlwidgets/umlwidget.cpp
      - In function saveToXMI1 fix misleading comment about the placement
        of call from child classes.
      
      CCBUG: 363582
      b1a4f029
    • Oliver Kellogg's avatar
      Followup to commit 776c2eaa : Various fixes for writing of XMI · 74abf217
      Oliver Kellogg authored
      umbrello/umldoc.cpp
      - In function saveToXMI1 reenable call to UMLListView::saveToXMI1 and
        CodeGenerator::saveToXMI1.
      
      umbrello/uml1model/classifier.cpp
      - In function saveToXMI1, avoid writing the <UML:Classifier.feature>
        element if both attList and opList are empty.
      
      umbrello/umlwidgets/associationwidgetrole.{h,cpp}
      - At function saveToXMI1 remove argument 'suffix'.
      
      umbrello/umlwidgets/associationwidgetrole.cpp
      - In function saveToXMI1 remove writing of attributes index[ab] and
        totalcount[ab].
        Writing of attributes shall not be mixed with writing the subelements
        multiplicityWidget/roleWidget/changeabilityWidget because
        attributes may not follow subelements (in particular, attributes of
        role B may not follow subelements of role A).
      
      umbrello/umlwidgets/associationwidget.cpp
      - In function saveToXMI1:
        - Postpone saving of m_nameWidget and m_associationLine until after
          all attributes have been written.
          Reason: Subelements may not precede attributes.
        - Save attributes of m_role[A] and m_role[B].  Reason: Their saving
          has been removed from AssociationWidgetRole::saveToXMI1.
      
      CCBUG: 363582
      74abf217
  11. 09 Nov, 2020 1 commit
    • Oliver Kellogg's avatar
      umbrello/version.h · cbb0c90c
      Oliver Kellogg authored
      - Increase XMI_FILE_VERSION to "1.6.20" due to reordering of XML
        attributes.
      
      CCBUG: 363582
      cbb0c90c
  12. 08 Nov, 2020 2 commits
  13. 05 Nov, 2020 2 commits
  14. 30 Oct, 2020 2 commits
    • Oliver Kellogg's avatar
      umbrello/toolbarstateassociation.cpp partial reverting of commit 62ff3886 · 2bb95adc
      Oliver Kellogg authored
      - In function setSecondWidget(), if validation by AssocRules is passed
        and both widgetA and widgetB are class widgets then do not create an
        attribute for case (type == Uml::AssociationType::Aggregation).
        Reason: Creating the attribute prevents creation of the aggregation to
        the role B type.  For more info see comments at the source location.
      
      CCBUG: 420073
      2bb95adc
    • Ralf Habacker's avatar
      Add support to use external KDevPHP packaga · 57fef3b1
      Ralf Habacker authored
      If no external development package has been found fallback to embedded
      version.
      
      This commit adds an additional optional dependency for the KDevPHP package, which
      named e.g. on openSUSE 'kdevelop5-plugin-php-devel'.
      
      BUG:428460
      FIXED-IN:2.32.80 (KDE releases 20.11.80)
      57fef3b1
  15. 28 Oct, 2020 1 commit
  16. 26 Oct, 2020 1 commit
  17. 13 Oct, 2020 4 commits
  18. 11 Oct, 2020 2 commits
    • Oliver Kellogg's avatar
      https://bugs.kde.org/show_bug.cgi?id=427532#c1 · 9817ffc9
      Oliver Kellogg authored
      Remove default datatypes of previous Active Language:
      
      umbrello/uml1model/datatype.{h,cpp}
      - Add member variable m_isActive initialized to true by constructor.
      - Add accessor functions setActive(bool active = true), isActive().
      - Peripheral cleanup: Override function load1 in lieu of loadFromXMI1.
      
      umbrello/uml1model/datatype.cpp
      - In function load1, set m_isActive true if XMI attribute "isActive"
        does not exist or if its value is not "false".
      - In function saveToXMI1, setAttribute "isActive" to "false" on the
        classifierElement if m_isActive is false.
      
      umbrello/uml1model/package.{h,cpp}
      - At function containedObjects add optional argument includeInactive
        of type bool defaulting to false.  If includeInactive is true then
        include datatypes with isActive() false in the returned list.
      
      umbrello/uml1model/package.cpp
      - In function removeObject do not delete a datatype from its package
        but just set its isActive flag false.
      
      umbrello/uml1model/folder.cpp
      - In function load1 avoid duplicate creation of datatype when its name
        already exists in m_objects.
      
      umbrello/umldoc.{h,cpp}
      - At function datatypes() add optional argument includeInactive of type
        bool defaulting to false.  If includeInactive is true then include
        datatypes which have isActive() == false in the returned list.
      - New function removeDatatype(const QString &name) removes a datatype
        from m_datatypeRoot->containedObjects() by name.
      
      umbrello/umldoc.cpp
      - In function createDatatype,
        - at call to m_datatypeRoot->containedObjects() provide argument
          includeInactive = true;
        - if Model_Utils::findUMLObject() returns non null and the retuned
          object is a UMLDatatype then set its isActive flag to true and emit
          sigObjectCreated; do not call Object_Factory::createUMLObject().
      
      umbrello/uml.cpp
      - In function setGenerator, if m_codegen is non null on entry then query
        m_codegen->defaultDatatypes() and call m_doc->removeDatatype() for
        each name returned.
      
      umbrello/umllistview.cpp
      - In function slotObjectCreated, if object->baseType() is ot_Datatype
        then check that the isActive flag is true; else refuse to create the
        UMLListViewItem.
      
      umbrello/main.cpp
      - At function initDocument :
        - Add argument progLang of type Uml::ProgrammingLanguage::Enum.
        - If UMLApp::app()->newDocument() is called then follow it by
          UMLApp::app()->setActiveLanguage(progLang).
        - If a file shall be opened, the programming language set by the
          <XMI.extensions> <codegeneration> element in the file shall take
          precedence over the language set via command line parameter,
          therefore do not call UMLApp::app()->setActiveLanguage.
      - Adjust main program to change of function initDocument.
      
      umbrello/version.h
      - Increase XMI_FILE_VERSION to "1.6.19" due to the <UML:DataType> new
        attribute "isActive".
      
      CCBUG: 427532
      9817ffc9
    • Oliver Kellogg's avatar
      AUTHORS : Fix typo at Camila Ayres. · 4eaf28cf
      Oliver Kellogg authored
      4eaf28cf
  19. 10 Oct, 2020 1 commit
    • Oliver Kellogg's avatar
      Reverting commit 92d13fb6 prepares for work on tagged values: · 18747a69
      Oliver Kellogg authored
      umbrello/uml1model/package.{h,cpp}
      - Function containedObjects() shall return UMLObjectList by value.
        Reason: In near future we will not be returning a class member.
      
      umbrello/model_utils.cpp
      umbrello/models/objectsmodel.cpp
      umbrello/umldoc.cpp
      umbrello/umllistview.cpp
      umbrello/dialogs/pages/packagecontentspage.cpp
      - At calls to UMLPackage::containedObjects() receive returned list by
        value.
      
      CCBUG: 73847
      18747a69