1// Copyright (C) 2018 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#include "qqmlpreviewservicefactory.h"
5#include "qqmlpreviewservice.h"
6#if QT_CONFIG(translation)
7#include "qqmldebugtranslationservice.h"
8#endif
9
10QT_BEGIN_NAMESPACE
11
12QQmlDebugService *QQmlPreviewServiceFactory::create(const QString &key)
13{
14 if (key == QQmlPreviewServiceImpl::s_key)
15 return new QQmlPreviewServiceImpl(this);
16#if QT_CONFIG(translation)
17 if (key == QQmlDebugTranslationServiceImpl::s_key)
18 return new QQmlDebugTranslationServiceImpl(this);
19#endif
20 return nullptr;
21}
22
23QT_END_NAMESPACE
24
25#include "moc_qqmlpreviewservicefactory.cpp"
26

source code of qtdeclarative/src/plugins/qmltooling/qmldbg_preview/qqmlpreviewservicefactory.cpp