~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to src/3rdparty/webkit/WebCore/platform/qt/SharedTimerQt.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2008-08-01 11:30:30 UTC
  • mto: (15.1.1 lenny) (1.3.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 55.
  • Revision ID: james.westby@ubuntu.com-20080801113030-c33y1z0l21t6cj5r
Tags: upstream-4.4.1
ImportĀ upstreamĀ versionĀ 4.4.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
#include "SystemTime.h"
33
33
 
34
34
#include <QTimer>
 
35
#include <QCoreApplication>
35
36
 
36
37
namespace WebCore {
37
38
 
51
52
    }
52
53
 
53
54
public:
 
55
    static void cleanup()
 
56
    {
 
57
        if (s_self->isActive())
 
58
            s_self->fire();
 
59
 
 
60
        delete s_self;
 
61
        s_self = 0;
 
62
    }
 
63
 
54
64
    static SharedTimerQt* inst()
55
65
    {
56
 
        if (!s_self)
 
66
        if (!s_self) {
57
67
            s_self = new SharedTimerQt();
 
68
            qAddPostRoutine(SharedTimerQt::cleanup);
 
69
        }
58
70
 
59
71
        return s_self;
60
72
    }