Menu ▾ ▴

#313 QM Generates extra file header every time you generate code.

QM
closed
None
1
2023-01-04
2022-09-30
Dan
No

I have QP Bundle 7.1.0 installed. I created this bug with QM version 5.2.1. Here are the steps:

  1. Create a new project with qpcpp framework and template is None.
  2. Add a new package accept the default package1.
  3. Add a new class inside package1 and accept the default Class1.
  4. Assign the superclass to Class1 to be qpcpp::::QMActive.
  5. Add a state machine to Class1.
  6. Add a state to the state machine and accept the default state1.
  7. Add an initial transition to state1.
  8. Add a directory to the model. Set the path to "."
  9. Add a file to the directory. I set the filename to Class1.cpp.
  10. Select the external checkbox for the file Class1.cpp.
  11. Generate the code. Copy the file Class1.cpp to Class1-Generate1stTime.cpp.
  12. Generate the code again. Copy the file Class1.cpp to Class1-Generate2ndTime.cpp.
  13. Compare the two copied files. Note that there is an extra file header added to the second file that was generated.

I attached the file differences picture and the QM model file.

2 Attachments

Discussion

  • Dan

    Dan - 2022-09-30

    Oops! Since the Class1.cpp file is external, I think you also need the cpp source file.

     
  • Quantum Leaps

    Quantum Leaps - 2023-01-04
    • status: open --> closed
    • assigned_to: Quantum Leaps
     
  • Quantum Leaps

    Quantum Leaps - 2023-01-04

    Fixed in QM 5.2.3.
    --MMS

     

Anonymous
Anonymous

Add attachments
Cancel