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();
|
||||
void aboutQtCreator();
|
||||
void aboutPlugins();
|
||||
void changeLog();
|
||||
void contact();
|
||||
void updateFocusWidget(QWidget *old, QWidget *now);
|
||||
@@ -2045,7 +2044,7 @@ void ICorePrivate::registerDefaultActions()
|
||||
aboutPluginsAction.setMenuRole(QAction::ApplicationSpecificRole);
|
||||
aboutPluginsAction.addToContainer(Constants::M_HELP, Constants::G_HELP_ABOUT);
|
||||
aboutPluginsAction.setEnabled(true);
|
||||
aboutPluginsAction.addOnTriggered(this, [this] { aboutPlugins(); });
|
||||
aboutPluginsAction.addOnTriggered(this, &showAboutPlugins);
|
||||
|
||||
// Change Log Action
|
||||
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
|
||||
{
|
||||
public:
|
||||
|
@@ -25,11 +25,31 @@
|
||||
using namespace ExtensionSystem;
|
||||
using namespace Utils;
|
||||
|
||||
namespace Core {
|
||||
namespace Internal {
|
||||
namespace Core::Internal {
|
||||
|
||||
PluginDialog::PluginDialog(QWidget *parent)
|
||||
: QDialog(parent),
|
||||
class PluginDialog final : public QDialog
|
||||
{
|
||||
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))
|
||||
{
|
||||
auto filterEdit = new Utils::FancyLineEdit(this);
|
||||
@@ -144,5 +164,10 @@ void PluginDialog::openErrorDetails()
|
||||
dialog.exec();
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Core
|
||||
void showAboutPlugins()
|
||||
{
|
||||
PluginDialog dialog;
|
||||
dialog.exec();
|
||||
}
|
||||
|
||||
} // Core::Internal
|
||||
|
@@ -3,44 +3,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QDialog>
|
||||
#include <QSet>
|
||||
namespace Core::Internal {
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QPushButton;
|
||||
class QLabel;
|
||||
QT_END_NAMESPACE
|
||||
void showAboutPlugins();
|
||||
|
||||
namespace ExtensionSystem {
|
||||
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
|
||||
} // CoreInternal
|
||||
|
Reference in New Issue
Block a user