forked from qt-creator/qt-creator
Android: Merge androidmanifesteditorfactory.* into androidmanifesteditor.*
Change-Id: I965d9667e0035f022774078894a9e8a9f3342db7 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -18,7 +18,6 @@ add_qtc_plugin(Android
|
||||
androidmanager.cpp androidmanager.h
|
||||
androidmanifestdocument.cpp androidmanifestdocument.h
|
||||
androidmanifesteditor.cpp androidmanifesteditor.h
|
||||
androidmanifesteditorfactory.cpp androidmanifesteditorfactory.h
|
||||
androidmanifesteditorwidget.cpp androidmanifesteditorwidget.h
|
||||
androidmanifesteditoriconwidget.cpp androidmanifesteditoriconwidget.h
|
||||
androidmanifesteditoriconcontainerwidget.cpp androidmanifesteditoriconcontainerwidget.h
|
||||
|
@@ -46,8 +46,6 @@ QtcPlugin {
|
||||
"androidmanifesteditoriconwidget.h",
|
||||
"androidmanifesteditoriconcontainerwidget.cpp",
|
||||
"androidmanifesteditoriconcontainerwidget.h",
|
||||
"androidmanifesteditorfactory.cpp",
|
||||
"androidmanifesteditorfactory.h",
|
||||
"androidmanifesteditorwidget.cpp",
|
||||
"androidmanifesteditorwidget.h",
|
||||
"androidpackageinstallationstep.cpp",
|
||||
|
@@ -13,8 +13,7 @@
|
||||
#include <QToolBar>
|
||||
#include <QTextBlock>
|
||||
|
||||
using namespace Android;
|
||||
using namespace Internal;
|
||||
namespace Android::Internal {
|
||||
|
||||
AndroidManifestEditor::AndroidManifestEditor(AndroidManifestEditorWidget *editorWidget)
|
||||
: m_toolBar(nullptr)
|
||||
@@ -87,3 +86,27 @@ void AndroidManifestEditor::changeEditorPage(QAction *action)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Factory
|
||||
|
||||
class AndroidManifestEditorFactory final : public Core::IEditorFactory
|
||||
{
|
||||
public:
|
||||
AndroidManifestEditorFactory()
|
||||
{
|
||||
setId(Constants::ANDROID_MANIFEST_EDITOR_ID);
|
||||
setDisplayName(Tr::tr("Android Manifest editor"));
|
||||
addMimeType(Constants::ANDROID_MANIFEST_MIME_TYPE);
|
||||
setEditorCreator([] {
|
||||
auto androidManifestEditorWidget = new AndroidManifestEditorWidget;
|
||||
return androidManifestEditorWidget->editor();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
void setupAndroidManifestEditor()
|
||||
{
|
||||
static AndroidManifestEditorFactory theAndroidManifestEditorFactory;
|
||||
}
|
||||
|
||||
} // Android::Internal
|
||||
|
@@ -14,8 +14,7 @@ class QToolBar;
|
||||
class QActionGroup;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace Android {
|
||||
namespace Internal {
|
||||
namespace Android::Internal {
|
||||
|
||||
class AndroidManifestEditor : public Core::IEditor
|
||||
{
|
||||
@@ -41,5 +40,6 @@ private:
|
||||
QActionGroup *m_actionGroup;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Android
|
||||
void setupAndroidManifestEditor();
|
||||
|
||||
} // Android::Internal
|
||||
|
@@ -1,37 +0,0 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#include "androidconstants.h"
|
||||
#include "androidmanifesteditor.h"
|
||||
#include "androidmanifesteditorfactory.h"
|
||||
#include "androidmanifesteditorwidget.h"
|
||||
#include "androidtr.h"
|
||||
|
||||
#include <coreplugin/editormanager/ieditorfactory.h>
|
||||
|
||||
#include <texteditor/texteditorsettings.h>
|
||||
|
||||
namespace Android::Internal {
|
||||
|
||||
class AndroidManifestEditorFactory final : public Core::IEditorFactory
|
||||
{
|
||||
public:
|
||||
AndroidManifestEditorFactory()
|
||||
{
|
||||
setId(Constants::ANDROID_MANIFEST_EDITOR_ID);
|
||||
setDisplayName(Tr::tr("Android Manifest editor"));
|
||||
addMimeType(Constants::ANDROID_MANIFEST_MIME_TYPE);
|
||||
setEditorCreator([] {
|
||||
auto androidManifestEditorWidget = new AndroidManifestEditorWidget;
|
||||
return androidManifestEditorWidget->editor();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
void setupAndroidManifestEditor()
|
||||
{
|
||||
static AndroidManifestEditorFactory theAndroidManifestEditorFactory;
|
||||
}
|
||||
|
||||
} // Android::Internal
|
||||
|
@@ -1,10 +0,0 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace Android::Internal {
|
||||
|
||||
void setupAndroidManifestEditor();
|
||||
|
||||
} // Android::Internal
|
@@ -1414,4 +1414,6 @@ AndroidManifestTextEditorWidget::AndroidManifestTextEditorWidget(AndroidManifest
|
||||
Core::ICore::addContextObject(m_context);
|
||||
}
|
||||
|
||||
|
||||
|
||||
} // Android::Internal
|
||||
|
@@ -7,7 +7,7 @@
|
||||
#include "androiddebugsupport.h"
|
||||
#include "androiddeployqtstep.h"
|
||||
#include "androiddevice.h"
|
||||
#include "androidmanifesteditorfactory.h"
|
||||
#include "androidmanifesteditor.h"
|
||||
#include "androidpackageinstallationstep.h"
|
||||
#include "androidpotentialkit.h"
|
||||
#include "androidqmltoolingsupport.h"
|
||||
|
Reference in New Issue
Block a user