Ticket #46496: debug-negative-qtimerint.patch

File debug-negative-qtimerint.patch, 539 bytes (added by RJVB (René Bertin), 10 years ago)

give some more information when warning about starting a QTimer with a negative interval

  • qtbase/src/corelib/kernel/qobject.cpp

    diff --git qtbase/src/corelib/kernel/qobject.cpp qtbase/src/corelib/kernel/qobject.cpp
    index e588808..f0e2d7c 100644
    int QObject::startTimer(int interval, Qt::TimerType timerType) 
    16051605    Q_D(QObject);
    16061606
    16071607    if (interval < 0) {
    1608         qWarning("QObject::startTimer: Timers cannot have negative intervals");
     1608        qWarning() << "QObject::startTimer: Timer" << this << "cannot have a negative interval";
    16091609        return 0;
    16101610    }
    16111611