mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 02:42:55 +00:00
QTimer cleanup
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
parent
f4a17afc05
commit
df49f5412e
2 changed files with 4 additions and 7 deletions
|
@ -142,7 +142,7 @@ static const int INV_TIMER = -1; // invalid timer id
|
|||
*/
|
||||
|
||||
QTimer::QTimer(QObject *parent)
|
||||
: QObject(parent), id(INV_TIMER), inter(0), del(0), single(0), nulltimer(0)
|
||||
: QObject(parent), id(INV_TIMER), inter(0), single(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -203,7 +203,6 @@ void QTimer::start()
|
|||
{
|
||||
if (id != INV_TIMER) // stop running timer
|
||||
stop();
|
||||
nulltimer = (!inter && single);
|
||||
id = QObject::startTimer(inter);
|
||||
}
|
||||
|
||||
|
|
|
@ -50,7 +50,6 @@ QT_BEGIN_HEADER
|
|||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
class Q_CORE_EXPORT QTimer : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
@ -78,7 +77,6 @@ public Q_SLOTS:
|
|||
void start();
|
||||
void stop();
|
||||
|
||||
|
||||
Q_SIGNALS:
|
||||
void timeout();
|
||||
|
||||
|
@ -91,9 +89,9 @@ private:
|
|||
inline int startTimer(int){ return -1;}
|
||||
inline void killTimer(int){}
|
||||
|
||||
int id, inter, del;
|
||||
uint single : 1;
|
||||
uint nulltimer : 1;
|
||||
int id;
|
||||
int inter;
|
||||
bool single;
|
||||
};
|
||||
|
||||
inline void QTimer::setSingleShot(bool asingleShot) { single = asingleShot; }
|
||||
|
|
Loading…
Add table
Reference in a new issue