forked from qt-creator/qt-creator
Android: Add support for QML preview
Change-Id: Ib1dc4f21686c14abf15e8a8bda82bff34ec019b4 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -28,7 +28,7 @@ HEADERS += \
|
||||
androiddevicefactory.h \
|
||||
androiddevice.h \
|
||||
androidgdbserverkitinformation.h \
|
||||
androidanalyzesupport.h \
|
||||
androidqmltoolingsupport.h \
|
||||
androidmanifesteditorfactory.h \
|
||||
androidmanifesteditor.h \
|
||||
androidmanifesteditorwidget.h \
|
||||
@@ -75,7 +75,7 @@ SOURCES += \
|
||||
androiddevicefactory.cpp \
|
||||
androiddevice.cpp \
|
||||
androidgdbserverkitinformation.cpp \
|
||||
androidanalyzesupport.cpp \
|
||||
androidqmltoolingsupport.cpp \
|
||||
androidmanifesteditorfactory.cpp \
|
||||
androidmanifesteditor.cpp \
|
||||
androidmanifesteditorwidget.cpp \
|
||||
|
||||
@@ -24,8 +24,6 @@ Project {
|
||||
"adbcommandswidget.h",
|
||||
"adbcommandswidget.ui",
|
||||
"addnewavddialog.ui",
|
||||
"androidanalyzesupport.cpp",
|
||||
"androidanalyzesupport.h",
|
||||
"androidavdmanager.cpp",
|
||||
"androidavdmanager.h",
|
||||
"androidconfigurations.cpp",
|
||||
@@ -74,6 +72,8 @@ Project {
|
||||
"androidplugin.h",
|
||||
"androidpotentialkit.cpp",
|
||||
"androidpotentialkit.h",
|
||||
"androidqmltoolingsupport.cpp",
|
||||
"androidqmltoolingsupport.h",
|
||||
"androidqtsupport.cpp",
|
||||
"androidqtsupport.h",
|
||||
"androidqtversion.cpp",
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
#include "androidplugin.h"
|
||||
|
||||
#include "androidanalyzesupport.h"
|
||||
#include "androidqmltoolingsupport.h"
|
||||
#include "androidconfigurations.h"
|
||||
#include "androidconstants.h"
|
||||
#include "androiddebugsupport.h"
|
||||
@@ -73,7 +73,10 @@ bool AndroidPlugin::initialize(const QStringList &arguments, QString *errorMessa
|
||||
|
||||
RunControl::registerWorker<AndroidRunConfiguration, AndroidRunSupport>(NORMAL_RUN_MODE);
|
||||
RunControl::registerWorker<AndroidRunConfiguration, AndroidDebugSupport>(DEBUG_RUN_MODE);
|
||||
RunControl::registerWorker<AndroidRunConfiguration, AndroidQmlProfilerSupport>(QML_PROFILER_RUN_MODE);
|
||||
RunControl::registerWorker<AndroidRunConfiguration, AndroidQmlToolingSupport>(
|
||||
QML_PROFILER_RUN_MODE);
|
||||
RunControl::registerWorker<AndroidRunConfiguration, AndroidQmlToolingSupport>(
|
||||
QML_PREVIEW_RUN_MODE);
|
||||
|
||||
new AndroidConfigurations(this);
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "androidanalyzesupport.h"
|
||||
#include "androidqmltoolingsupport.h"
|
||||
#include "androidrunner.h"
|
||||
|
||||
using namespace ProjectExplorer;
|
||||
@@ -31,10 +31,10 @@ using namespace ProjectExplorer;
|
||||
namespace Android {
|
||||
namespace Internal {
|
||||
|
||||
AndroidQmlProfilerSupport::AndroidQmlProfilerSupport(RunControl *runControl)
|
||||
AndroidQmlToolingSupport::AndroidQmlToolingSupport(RunControl *runControl)
|
||||
: RunWorker(runControl)
|
||||
{
|
||||
setDisplayName("AndroidQmlProfilerSupport");
|
||||
setDisplayName("AndroidQmlToolingSupport");
|
||||
|
||||
auto runner = new AndroidRunner(runControl);
|
||||
addStartDependency(runner);
|
||||
@@ -48,11 +48,11 @@ AndroidQmlProfilerSupport::AndroidQmlProfilerSupport(RunControl *runControl)
|
||||
});
|
||||
}
|
||||
|
||||
void AndroidQmlProfilerSupport::start()
|
||||
void AndroidQmlToolingSupport::start()
|
||||
{
|
||||
}
|
||||
|
||||
void AndroidQmlProfilerSupport::stop()
|
||||
void AndroidQmlToolingSupport::stop()
|
||||
{
|
||||
reportStopped();
|
||||
}
|
||||
@@ -30,12 +30,12 @@
|
||||
namespace Android {
|
||||
namespace Internal {
|
||||
|
||||
class AndroidQmlProfilerSupport : public ProjectExplorer::RunWorker
|
||||
class AndroidQmlToolingSupport : public ProjectExplorer::RunWorker
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit AndroidQmlProfilerSupport(ProjectExplorer::RunControl *runControl);
|
||||
explicit AndroidQmlToolingSupport(ProjectExplorer::RunControl *runControl);
|
||||
|
||||
private:
|
||||
void start() override;
|
||||
@@ -285,6 +285,8 @@ AndroidRunnerWorker::AndroidRunnerWorker(RunControl *runControl, const AndroidRu
|
||||
m_qmlDebugServices = QmlDebug::QmlDebuggerServices;
|
||||
else if (runMode == ProjectExplorer::Constants::QML_PROFILER_RUN_MODE)
|
||||
m_qmlDebugServices = QmlDebug::QmlProfilerServices;
|
||||
else if (runMode == ProjectExplorer::Constants::QML_PREVIEW_RUN_MODE)
|
||||
m_qmlDebugServices = QmlDebug::QmlPreviewServices;
|
||||
else
|
||||
m_qmlDebugServices = QmlDebug::NoQmlDebugServices;
|
||||
m_localGdbServerPort = Utils::Port(5039);
|
||||
|
||||
Reference in New Issue
Block a user