Beispiel #1
0
    void DaemonApp::removeDisplay() {
        Display *display = qobject_cast<Display *>(sender());

        // log message
        qDebug() << " DAEMON: Removing display" << display->name() << "...";

        // remove display from list
        m_displays.removeAll(display);

        // delete display
        display->deleteLater();

#if TEST
        // quit if no display remained
        if (m_displays.isEmpty()) {
            // log message
            qDebug() << " DAEMON: Stopping...";

            // quit application
            qApp->quit();
        }
#endif
    }