Skip to content
  • Igor Kushnir's avatar
    ScopedDialog: Q_DISABLE_COPY => Q_DISABLE_COPY_MOVE · 8902428e
    Igor Kushnir authored
    Move constructor and move assignment operator have to be defaulted or
    deleted to follow the rule of five. ScopedDialog is supposed to live
    inside a specific scope, so moving it doesn't make sense. A similar
    class template QScopedPointer is also not movable. So let us define the
    move operations as deleted via Q_DISABLE_COPY_MOVE.
    
    Unlike Q_DISABLE_COPY, Q_DISABLE_COPY_MOVE prevents the forwarding
    constructor from acting as a move constructor. So the following code
        ScopedDialog<QDialog> s;
        ScopedDialog<QDialog> s2(std::move(s));
    compiled before, but does not compile at this commit.
    
    Move this declaration closer to other special member functions.
    8902428e