OpenGLComponent::~OpenGLComponent()
{
    if (isUsingDedicatedThread())
        stopBackgroundThread();
    else
        deleteContext();

    componentWatcher = nullptr;
}
MidiOutput::~MidiOutput()
{
    stopBackgroundThread();

    MidiOutHandle* const h = static_cast <MidiOutHandle*> (internal);

    if (MidiOutHandle::activeHandles.contains (h) && --(h->refCount) == 0)
    {
        midiOutClose (h->handle);
        MidiOutHandle::activeHandles.removeValue (h);
        delete h;
    }
}
Exemple #3
0
int XMonitor::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QMainWindow::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: showServerView(); break;
        case 1: showReportView(); break;
        case 2: startBackgroundThread(); break;
        case 3: stopBackgroundThread(); break;
        default: ;
        }
        _id -= 4;
    }
    return _id;
}
OpenGLComponent::~OpenGLComponent()
{
    stopBackgroundThread();
    componentWatcher = nullptr;
}