1. 14 Jun, 2014 4 commits
    • Oliver Kellogg's avatar
      umbrello/widgets/messagewidget.cpp · 7e997587
      Oliver Kellogg authored
      - In function setY() do not emit sigMessageMoved() if
      - In function setY() do not moveEvent(0) if
    • Oliver Kellogg's avatar
      umbrello/widgets/umlwidget.{h,cpp} · b61d3ab7
      Oliver Kellogg authored
      - Change return type of virtual function onWidget() from bool to UMLWidget*.
        This is one of the steps for moving management of widget-owned floating
        texts from UMLScene to the owning widget.
      - Adapt reimplemented function onWidget() to changed return type.
      - Reimplement UMLWidget::onWidget() in order to additionally check m_pName.
      - Adapt function widgetAt() to changed return type of UMLWidget::onWidget().
    • Oliver Kellogg's avatar
    • Oliver Kellogg's avatar
      umbrello/object_factory.cpp · e3a161a5
      Oliver Kellogg authored
      - Revert commit 13cce915. I overlooked the UMLObject constructor
        explicit UMLObject(const QString& name = QString(), Uml::ID::Type id = Uml::ID::None);
        which means that calling UMLObject() is _not_ calling a default constructor.
  2. 13 Jun, 2014 1 commit
    • Oliver Kellogg's avatar
      umbrello/object_factory.cpp · 13cce915
      Oliver Kellogg authored
      - In function makeObjectFromXMI(), call setBaseType() on newly constructed
        pObject. Reason: default constructors do not set UMLObject::m_BaseType.
  3. 12 Jun, 2014 1 commit
  4. 11 Jun, 2014 1 commit
  5. 09 Jun, 2014 5 commits
    • Ralf Habacker's avatar
      Rename uml_p.h to umlappprivate.h to reflect class name. · 4db7138d
      Ralf Habacker authored
      The empty cpp file is required for autogenerating signal/slot related methods from class UMLAppPrivate.
    • Andi Fischer's avatar
      Replacing KUrl with QUrl. · cd89f6b0
      Andi Fischer authored
      Preparation work to port to Frameworks 5.
    • Andi Fischer's avatar
      Umbrello did not compile for me. · c7d19cf1
      Andi Fischer authored
      This patch solved the problem.
    • Oliver Kellogg's avatar
      (In reply to comment #2) · 60fc2177
      Oliver Kellogg authored
      > (In reply to comment #1)
      > > A workaround I found is adding the line indicated with '+'.
      > > ms_seenFiles.append(includeFile);
      > The problem is that the current file is added to the list of seen files
      > after importing, which failed when an included file includes the current
      > file.
      I tested this on current clucene/src/core/CLucene git master and I confirm
      your finding.
      I therefore commit both comment #2 and a clean version of comment #3:
      - New virtual function initPerFile() lets concrete importers provide
        initializations which are executed before each single file parsed.
        This is different from initialize() in that initialize() is executed only
        once for all files parsed.
      - Provide empty default implementation for new function initPerFile()
      - In function importFiles(), call importFile() instead of parseFile()
      - In function importFile(), call initPerFile() instead of initialize()
      - Reimplement function initPerFile() from ClassImport.
      - In function feedTheModel(), append includeFile to ms_seenFiles prior to
        calling feedTheModel(includeFile) if includeFile is not found in
      - In function createUMLObject(), if name.startsWith("::") then remove the
        leading "::" from name, and set parentPkg to logicalView.
      - In function findUMLObject(), if name.startsWith("::") then remove the
        leading "::" from name, and set currentObj to NULL.
    • Oliver Kellogg's avatar
  6. 08 Jun, 2014 2 commits
  7. 07 Jun, 2014 3 commits
  8. 06 Jun, 2014 6 commits
  9. 02 Jun, 2014 2 commits
  10. 31 May, 2014 3 commits
    • Oliver Kellogg's avatar
      Integration of PinWidget's floating-text name display in PortWidget · ca646e95
      Oliver Kellogg authored
      (see "BTW" at https://bugs.kde.org/show_bug.cgi?id=335399#c1)
      - At enum MenuType add new value, mt_NameAsTooltip.
      - Add protected member m_pName of type pointer-to-FloatingTextWidget with
        corresponding public getter and setter method.
        The intention is that the FloatingTextWidget may be used as an
        alternative to the tooltip for displaying the port name on a diagram.
      - Override UMLWidget::slotMenuSelection() for adding handling of
      - In function insertSingleSelectionMenu() case wt_Port, insert
        mt_NameAsTooltip as checkable. If the PortWidget's floatingTextWidget()
        is NULL then setChecked(true) on m_actions[mt_NameAsTooltip].
        This is the default case as the PortWidget does not automatically
        construct its FloatingTextWidget.
      - In function updateWidget(), if m_pName is non NULL then update the text
        in the FloatingTextWidget; else update the text in the ToolTip.
      - In function slotMenuSelection(), handle ListPopupMenu::mt_NameAsTooltip
        as follows: If m_pName is non NULL then toggle the name display from
        FloatingText to ToolTip; else toggle the name display from ToolTip to
      - In functions loadFromXMI() and saveToXMI(), implement loading/saving of
        the optional FloatingTextWidget *m_pName.
    • Oliver Kellogg's avatar
      umbrello/umlscene.cpp · 9ef8ecfa
      Oliver Kellogg authored
      - Cosmetic change in function removeWidgetCmd() : If an "if" statement
        uses braces then for symmetry its "else" part should use them also.
    • Oliver Kellogg's avatar
      umbrello/widgets/pinwidget.cpp : Do not assume that m_pName is always non... · f1c41922
      Oliver Kellogg authored
      umbrello/widgets/pinwidget.cpp : Do not assume that m_pName is always non NULL. (It may have been deleted.)
  11. 30 May, 2014 1 commit
    • Oliver Kellogg's avatar
      Followup to commit d0bafb53, · aea59832
      Oliver Kellogg authored
      > > On moving a ComponentWidget, its attached PortWidgets should move along.
      > [...]
      Additionally, associations attached at ports should also move along when a
      ComponentWidget is moved:
      - Reimplement UMLWidget virtual method adjustAssocs(qreal dx, qreal dy)
        to additionally propagate the adjustAssocs call to attached PortWidgets.
  12. 29 May, 2014 5 commits
    • Oliver Kellogg's avatar
    • Oliver Kellogg's avatar
      Add UniAssociation support in Component and Deployment View: · 56f346d4
      Oliver Kellogg authored
      - In function insertBasicAssociations(), insert button for UniAssociation
        also on Uml::DiagramType Component or Deployment.
      - In m_AssocRules[], add following entries:
        Association    from Node      to Node
        UniAssociation from Component to Artifact, bidir.
        UniAssociation from Node      to Node
        Dependency     from Component to Package
        Dependency     from Package   to Artifact, bidir.
        Dependency     from Node      to Node
    • Oliver Kellogg's avatar
      On importing various Java projects for reproducing the crash reported in · 03a618cd
      Oliver Kellogg authored
      I notice that Java.lang final classes such as Boolean, Byte, Integer, etc.
      create new classes; they should be prefined Data Types instead. Fix:
      - In function defaultDatatypes() add Java.lang predefined final classes:
        Integer, Character, Boolean, Float, Double, Byte, Short, Long,
        StringBuffer, StringBuilder.
    • Oliver Kellogg's avatar
      Apply modified version of https://bugs.kde.org/attachment.cgi?id=86235 · b68bd35c
      Oliver Kellogg authored
      - Add member m_isStatic of type bool defaulting to false.
      umbrello/codeimport/pythonimport.cpp function parseStmt()
      - Decode "@staticmethod" to set m_isStatic true.
      - In handling of keyword "def",
        - If first parameter is not named "self" then set m_isStatic true and add
          the parameter via Import_Utils::addMethodParameter(); else do not add
          the parameter.
        - At call to Import_Utils::insertMethod(), provide m_isStatic as argument
        - Reset m_isStatic false after call to Import_Utils::insertMethod().
    • Oliver Kellogg's avatar
      (In reply to comment #1) · c9c85d7e
      Oliver Kellogg authored
      > it seems, the import does not crash using a single java file using the
      > default, i.e. no, package - my original files I wanted to import reside
      > inside real packages
      It might be that the problem is fixed coincidentally by following change
      but without a reproducer there is no way of knowing.
      - Change member m_parsedFiles to `static'.
        Reason: The files parsed shall be accumulated across all instances of
        NativeImportBase. See e.g. umbrello/codeimport/javaimport.cpp function
        spawnImport() : A new JavaImport importer is created for each file.
        However, m_parsedFiles shall span across all these instances.
      - Additional fix in function preprocess() :
        A Java input line such as
          //***** this is a single line comment *****
        was erroneously treated as a multi line comment opener.
        (Notice the embedded /* which was misinterpreted.)
  13. 28 May, 2014 1 commit
  14. 26 May, 2014 3 commits
  15. 25 May, 2014 2 commits
    • Oliver Kellogg's avatar
      Refinement to commit cdba7fef attachment of port to component on diagram · 900fd73f
      Oliver Kellogg authored
      - In function moveWidgetBy(),
        - If port is at left or right edge of owner then
          - If newX is smaller than owner->x() - width() then clip newX to
            owner->x() - width()
          - If newX is greater than owner->x() + owner->width() then clip newX to
            owner->x() + owner->width()
        - If port is at top or bottom edge of owner then
            - If newY is smaller than owner->y() - height() then clip newY to
              owner->y() - height()
            - If newY is greater than owner->y() + owner->height() then clip newY
              to owner->y() + owner->height()
      - In function attachToOwningComponent(),
        - If scenePos.x() is in the range
            [ owner->x() - width() : owner->x() + owner->width() ]
          then use scenePos.x() unmodified in call to setX().
        - If scenePos.y() is in the range
            [ owner->y() - height() : owner->y() + owner->height() ]
          then use scenePos.y() unmodified in call to setY().
      Known issue:
      On moving a ComponentWidget, its attached PortWidgets should move along.
    • Oliver Kellogg's avatar
      Address known issue of commit d22ed2f5, · cdba7fef
      Oliver Kellogg authored
      > 2) On dragging a port on the diagram, the PortWidget should be made to
           snap to the nearest edge of the nearest ComponentWidget, i.e. the
           port should "stick" to a component on moving.
      - New function attachToOwningComponent() aligns the PortWidget's position
        such that it is attached at one of the sides of its component's widget.
      - Reimplement function UMLWidget::moveWidgetBy() in order to constrain
        movement such that the port is always attached to its component.
        (Not flawless yet - to be improved.)
      - Change constant `FixedSize' to QSizeF(15, 15).
        Reason: Use same value for width and height to achieve uniform aspect
        regardless of the edge at which the port is attached to the component.
      - At function widgetOnDiagram(Uml::ID::Type), change return type from bool
        to UMLWidget*. Return pointer to the widget corresponding to `id' if it
        is on the diagram, NULL if not.
      - In function setupNewWidget(), if `w' is of type wt_Port then delegate its
        setting of X/Y position to function PortWidget::attachToOwningComponent().
      - In function dragEnterEvent() case DiagramType::Component, if `ot' is of
        type ot_Port then require that the owning component be present on the
        diagram in order to accept the drag event.