forked from qt-creator/qt-creator
Core: Hide PluginDialog definition in .cpp
Change-Id: I31302589bcc0c167f7115880dc646704f220450b Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -273,7 +273,6 @@ public:
|
|||||||
|
|
||||||
static void setFocusToEditor();
|
static void setFocusToEditor();
|
||||||
void aboutQtCreator();
|
void aboutQtCreator();
|
||||||
void aboutPlugins();
|
|
||||||
void changeLog();
|
void changeLog();
|
||||||
void contact();
|
void contact();
|
||||||
void updateFocusWidget(QWidget *old, QWidget *now);
|
void updateFocusWidget(QWidget *old, QWidget *now);
|
||||||
@@ -2045,7 +2044,7 @@ void ICorePrivate::registerDefaultActions()
|
|||||||
aboutPluginsAction.setMenuRole(QAction::ApplicationSpecificRole);
|
aboutPluginsAction.setMenuRole(QAction::ApplicationSpecificRole);
|
||||||
aboutPluginsAction.addToContainer(Constants::M_HELP, Constants::G_HELP_ABOUT);
|
aboutPluginsAction.addToContainer(Constants::M_HELP, Constants::G_HELP_ABOUT);
|
||||||
aboutPluginsAction.setEnabled(true);
|
aboutPluginsAction.setEnabled(true);
|
||||||
aboutPluginsAction.addOnTriggered(this, [this] { aboutPlugins(); });
|
aboutPluginsAction.addOnTriggered(this, &showAboutPlugins);
|
||||||
|
|
||||||
// Change Log Action
|
// Change Log Action
|
||||||
ActionBuilder changeLogAction(this, Constants::CHANGE_LOG);
|
ActionBuilder changeLogAction(this, Constants::CHANGE_LOG);
|
||||||
@@ -2451,12 +2450,6 @@ void ICorePrivate::destroyVersionDialog()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ICorePrivate::aboutPlugins()
|
|
||||||
{
|
|
||||||
PluginDialog dialog(m_mainwindow);
|
|
||||||
dialog.exec();
|
|
||||||
}
|
|
||||||
|
|
||||||
class LogDialog : public QDialog
|
class LogDialog : public QDialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@@ -25,11 +25,31 @@
|
|||||||
using namespace ExtensionSystem;
|
using namespace ExtensionSystem;
|
||||||
using namespace Utils;
|
using namespace Utils;
|
||||||
|
|
||||||
namespace Core {
|
namespace Core::Internal {
|
||||||
namespace Internal {
|
|
||||||
|
|
||||||
PluginDialog::PluginDialog(QWidget *parent)
|
class PluginDialog final : public QDialog
|
||||||
: QDialog(parent),
|
{
|
||||||
|
public:
|
||||||
|
explicit PluginDialog();
|
||||||
|
|
||||||
|
private:
|
||||||
|
void updateButtons();
|
||||||
|
void openDetails(ExtensionSystem::PluginSpec *spec);
|
||||||
|
void openErrorDetails();
|
||||||
|
void closeDialog();
|
||||||
|
void showInstallWizard();
|
||||||
|
|
||||||
|
ExtensionSystem::PluginView *m_view;
|
||||||
|
|
||||||
|
QPushButton *m_detailsButton;
|
||||||
|
QPushButton *m_errorDetailsButton;
|
||||||
|
QPushButton *m_installButton;
|
||||||
|
bool m_isRestartRequired = false;
|
||||||
|
QSet<ExtensionSystem::PluginSpec *> m_softLoad;
|
||||||
|
};
|
||||||
|
|
||||||
|
PluginDialog::PluginDialog()
|
||||||
|
: QDialog(ICore::dialogParent()),
|
||||||
m_view(new ExtensionSystem::PluginView(this))
|
m_view(new ExtensionSystem::PluginView(this))
|
||||||
{
|
{
|
||||||
auto filterEdit = new Utils::FancyLineEdit(this);
|
auto filterEdit = new Utils::FancyLineEdit(this);
|
||||||
@@ -144,5 +164,10 @@ void PluginDialog::openErrorDetails()
|
|||||||
dialog.exec();
|
dialog.exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Internal
|
void showAboutPlugins()
|
||||||
} // namespace Core
|
{
|
||||||
|
PluginDialog dialog;
|
||||||
|
dialog.exec();
|
||||||
|
}
|
||||||
|
|
||||||
|
} // Core::Internal
|
||||||
|
@@ -3,44 +3,8 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QDialog>
|
namespace Core::Internal {
|
||||||
#include <QSet>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
void showAboutPlugins();
|
||||||
class QPushButton;
|
|
||||||
class QLabel;
|
|
||||||
QT_END_NAMESPACE
|
|
||||||
|
|
||||||
namespace ExtensionSystem {
|
} // CoreInternal
|
||||||
class PluginSpec;
|
|
||||||
class PluginView;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace Core {
|
|
||||||
namespace Internal {
|
|
||||||
|
|
||||||
class PluginDialog : public QDialog
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
explicit PluginDialog(QWidget *parent);
|
|
||||||
|
|
||||||
private:
|
|
||||||
void updateButtons();
|
|
||||||
void openDetails(ExtensionSystem::PluginSpec *spec);
|
|
||||||
void openErrorDetails();
|
|
||||||
void closeDialog();
|
|
||||||
void showInstallWizard();
|
|
||||||
|
|
||||||
ExtensionSystem::PluginView *m_view;
|
|
||||||
|
|
||||||
QPushButton *m_detailsButton;
|
|
||||||
QPushButton *m_errorDetailsButton;
|
|
||||||
QPushButton *m_installButton;
|
|
||||||
bool m_isRestartRequired = false;
|
|
||||||
QSet<ExtensionSystem::PluginSpec *> m_softLoad;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace Internal
|
|
||||||
} // namespace Core
|
|
||||||
|
Reference in New Issue
Block a user