Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. renaming a class...
Qt 6.11 is out! See what's new in the release blog

renaming a class...

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 3 Posters 1.3k Views 3 Watching
  • 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.
  • mzimmersM Offline
    mzimmersM Offline
    mzimmers
    wrote on last edited by
    #1

    ...seems to be problematic when said class contains signals and/or slots. I frequently get odd runtime problems, usually pertaining to memory management.

    Is there a correct way to do this? I'm currently just refactoring.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Usually when you do that you should trigger a full rebuild and you should be good to go.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      2
      • mzimmersM Offline
        mzimmersM Offline
        mzimmers
        wrote on last edited by
        #3

        Yeah, I think I might have caught a red herring. I'm still investigating; will report back when I have something. Thanks...

        mrjjM 1 Reply Last reply
        0
        • mzimmersM mzimmers

          Yeah, I think I might have caught a red herring. I'm still investigating; will report back when I have something. Thanks...

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          alt text

          Renaming a class normally do not cause runtime errors as the compiler should catch use of the old name in any connect or
          slot/signal related activity before even running.
          However, i did have a few cases where an older moc_ file was being reused/not recreated
          causing odd things - so to be 100% sure its not that
          just delete whole build folder.

          1 Reply Last reply
          1
          • mzimmersM Offline
            mzimmersM Offline
            mzimmers
            wrote on last edited by
            #5

            Yeah, I too have experienced old moc files that don't get rebuilt somehow. But (as you point out) my runtime problems are the result of something else. I'm marking this closed. Thanks.

            1 Reply Last reply
            1

            • Login

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