Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. C++ Gurus
  4. Problem using overridden methods

Problem using overridden methods

Scheduled Pinned Locked Moved C++ Gurus
24 Posts 9 Posters 12.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    broadpeak
    wrote on 13 Mar 2012, 16:27 last edited by
    #21

    [quote author="Zlatomir" date="1331641008"]broadpeak you forgot the virtual destructor for MyClass and also you forgot to delete the dynamic allocated memory.[/quote]

    I have forgotten nothing :)
    But in this very simple example I would have liked to avoid any complications: I focused only polymorphically behavior. Of course, you are right, in a bigger project we have to use virtual desctructor.

    1 Reply Last reply
    0
    • Z Offline
      Z Offline
      Zlatomir
      wrote on 13 Mar 2012, 17:38 last edited by
      #22

      The polymorphic parts were posted before, so i assumed you wanted to give a complete example... and the things i said you forgot are pretty important parts of the example.

      Anyway i "vote" for you to edit the post and add the missing parts, i don't think that 4 lines of code would complicate the example.

      https://forum.qt.io/category/41/romanian

      1 Reply Last reply
      0
      • O Offline
        O Offline
        osirisgothra
        wrote on 22 Nov 2024, 21:11 last edited by
        #23

        I do really like being able to do this:

        class MyObj : public SomeObj<-right click here....

        go to refactor->insert virtual functions of base classes

        which opens a wonderful window that displays EVERY child class of that object with a checkbox by each function. You can just check off each signature you want to override and be done with it in one go!

        I'm truly glad you r/offmychess t finally, but please don't go too far, because you r/beyondvoxels and that implies that u r/donewithlife. Oh well time to git back to the lab, because azure sea here, I have a lot of work to do...

        P 1 Reply Last reply 25 Nov 2024, 13:14
        0
        • O osirisgothra
          22 Nov 2024, 21:11

          I do really like being able to do this:

          class MyObj : public SomeObj<-right click here....

          go to refactor->insert virtual functions of base classes

          which opens a wonderful window that displays EVERY child class of that object with a checkbox by each function. You can just check off each signature you want to override and be done with it in one go!

          P Offline
          P Offline
          Pl45m4
          wrote on 25 Nov 2024, 13:14 last edited by Pl45m4
          #24

          @osirisgothra said in Problem using overridden methods:

          I do really like being able to do this:

          which opens a wonderful window that

          You could write a QtCreator extension/plugin and try to find out how to get your hand on the data you need.

          displays EVERY child class of that object with a checkbox by each function. You can just check off each signature you want to override

          Probably via the Code Model / Symbols.

          If you wanna try it, start a new topic.
          People who have more experience with such things than I do may be able to help you then.


          If debugging is the process of removing software bugs, then programming must be the process of putting them in.

          ~E. W. Dijkstra

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved