forked from qt-creator/qt-creator
Core: Replace ICoreListener by std::functions
ICoreListener::coreAboutToClose() remains in the core, ICoreListener::editorAboutToClose() is handled by a new EditorManager::addCloseEditorListener() function. This removes the need for some boiler plate code resulting from the need to implement the interface in custom classes (DesignModeCoreListener, EditorClosingCoreListener, PojectEplorer::CoreListener and VcsBase::CoreListener). EditorManager::addCloseEditorListener Change-Id: Ie554c987b5455b555be6d77b77e4013639201d22 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
@@ -38,6 +38,9 @@ class QStandardItemModel;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace VcsBase {
|
||||
|
||||
class VcsBaseSubmitEditor;
|
||||
|
||||
namespace Internal {
|
||||
|
||||
class CommonVcsSettings;
|
||||
@@ -59,8 +62,6 @@ public:
|
||||
|
||||
static VcsPlugin *instance();
|
||||
|
||||
CoreListener *coreListener() const;
|
||||
|
||||
CommonVcsSettings settings() const;
|
||||
|
||||
// Model of user nick names used for the submit
|
||||
@@ -70,6 +71,7 @@ public:
|
||||
|
||||
signals:
|
||||
void settingsChanged(const VcsBase::Internal::CommonVcsSettings &s);
|
||||
void submitEditorAboutToClose(VcsBase::VcsBaseSubmitEditor *e, bool *result);
|
||||
|
||||
private slots:
|
||||
void slotSettingsChanged();
|
||||
@@ -80,7 +82,6 @@ private:
|
||||
static VcsPlugin *m_instance;
|
||||
CommonOptionsPage *m_settingsPage;
|
||||
QStandardItemModel *m_nickNameModel;
|
||||
CoreListener *m_coreListener;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
Reference in New Issue
Block a user