Results 1 to 7 of 7

Thread: Help on set and get a object copy

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Help on set and get a object copy

    It makes little sense to do that.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Help on set and get a object copy

    As wysota said, you code makes no functional sense, and unless you are taking care of your 'object_undo' pointer (which doesn't look like you do), you are leaking memory as well.
    If what you want is an "undo" functionality, Qt has a built in framework for that:
    http://doc.qt.nokia.com/latest/qundo.html
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

Similar Threads

  1. Replies: 4
    Last Post: 15th July 2011, 18:31
  2. Copy an Object
    By Qiieha in forum Qt Programming
    Replies: 2
    Last Post: 11th July 2011, 08:15
  3. Replies: 4
    Last Post: 20th August 2010, 13:07
  4. Replies: 1
    Last Post: 30th July 2010, 23:05
  5. writing object to the file(Object Persistance)
    By jjbabu in forum Qt Programming
    Replies: 2
    Last Post: 11th June 2009, 14:28

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.