diff options
author | Ulf Hermann <ulf.hermann@digia.com> | 2014-02-06 14:43:26 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-10 14:28:17 +0100 |
commit | 4cc230ade4df3919fbb9688b60e6e8f7f3cc8144 (patch) | |
tree | a6240d82988ec658d18be30e2ebf19bed2fc272d /src/qml/debugger/qqmlconfigurabledebugservice_p.h | |
parent | 77686f3b94dfd572778eb8dfa77717114e3abb93 (diff) |
Unify initial waiting of debug services
The debug services generally behave in one of two ways when initializing:
Either they block the initializing thread until some configuration is
passed over the network or they just go on. By introducing a generalized
configurable debug service the various ways of waiting on initialization
are cleaned up. The API defined for it also allows for engine-specific
initialization.
Change-Id: Id5685ef17d2a7eb1222629f7caa5ec53076d47b2
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Diffstat (limited to 'src/qml/debugger/qqmlconfigurabledebugservice_p.h')
-rw-r--r-- | src/qml/debugger/qqmlconfigurabledebugservice_p.h | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/src/qml/debugger/qqmlconfigurabledebugservice_p.h b/src/qml/debugger/qqmlconfigurabledebugservice_p.h new file mode 100644 index 0000000000..92d18bea90 --- /dev/null +++ b/src/qml/debugger/qqmlconfigurabledebugservice_p.h @@ -0,0 +1,87 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the QtQml module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#ifndef QQMLCONFIGURABLEDEBUGSEVICE_H +#define QQMLCONFIGURABLEDEBUGSEVICE_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qqmldebugservice_p.h" + +QT_BEGIN_NAMESPACE + +class QMutex; +class QQmlConfigurableDebugServicePrivate; +class QQmlConfigurableDebugService : public QQmlDebugService +{ + Q_OBJECT +public: + QQmlConfigurableDebugService(const QString &name, float version, QObject *parent = 0); + +protected: + QQmlConfigurableDebugService(QQmlDebugServicePrivate &dd, const QString &name, float version, QObject *parent = 0); + + QMutex *configMutex(); + void stopWaiting(); + void init(); + + void stateChanged(State); + void engineAboutToBeAdded(QQmlEngine *); + + virtual ~QQmlConfigurableDebugService() {} +private: + Q_DISABLE_COPY(QQmlConfigurableDebugService) + Q_DECLARE_PRIVATE(QQmlConfigurableDebugService) +}; + +QT_END_NAMESPACE + +#endif // QQMLCONFIGURABLEDEBUGSEVICE_H |