Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
CamiTK Community Edition
CamiTK Community Edition
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 17
    • Issues 17
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 2
    • Merge Requests 2
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • CamiTK
  • CamiTK Community EditionCamiTK Community Edition
  • Issues
  • #72

Closed
Open
Opened Oct 08, 2018 by Matthias Tummers@tummersmDeveloper

use setProperty with QString instead of char*

As a CEP developer
I would like a setProperty with const QString name instead of const char * name
To improve camitk code consistency
Epic/Topics Property setProperty QString char*

Description / Overview

I noticed that the QObject::setProperty method prototype demands a const char * type for the first argument whereas the camitk::Property constructor and the getProperty method use a QString type.

I think it might be a good idea to implement a method looking like

//PropertyObject.h
virtual bool setProperty(const QString name, const QVariant &value);
//PropertyObject.cpp
bool PropertyObject::setProperty(const QString name, const QVariant &value) {
    if (propertiesMap.contains(name)) {
        return setProperty(name.toStdString().c_str(), value);
    }
    else {
        return false;
    }
}

, to be re-implemented in component and action.

(just like getPropertyValue (which I think should be re-implemented in component and action too (for the same reason)))

This would allow manipulating camitk properties only with QStrings and not with a mix of qstrings and char* types depending on the method being used.

Acceptance tests

  • SetProperty works with QString One is able to set a property with the setProperty method using a QSting for the first argument
  • All uses of setProperty in CamiTK and CEPs are updated CamiTK and CEPs compile without errors regarding the setProperty method

Track

One (or two) of:

Misc

  • Automatic subscription of issue creator:

Do not forget to mark this issue as "confidential" by checking the tick box below (if appropriate)

Edited Dec 05, 2018 by Matthias Tummers
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: CamiTK/CamiTK#72