Commit 0d0ff493 authored by Christoph Cullmann's avatar Christoph Cullmann

less public API

parent aada429e
......@@ -62,6 +62,7 @@ KateViewManager::KateViewManager(QWidget *parentW, KateMainWindow *parent)
, m_blockViewCreationAndActivation(false)
, m_activeViewRunning(false)
, m_minAge(0)
, m_guiMergedView(nullptr)
{
// while init
m_init = true;
......@@ -69,8 +70,6 @@ KateViewManager::KateViewManager(QWidget *parentW, KateMainWindow *parent)
// important, set them up, as we use them in other methodes
setupActions();
guiMergedView = 0;
// resize mode
setOpaqueResize(style()->styleHint(QStyle::SH_Splitter_OpaqueResize, 0, this));
......@@ -119,9 +118,9 @@ KateViewManager::~KateViewManager()
/**
* remove the single client that is registered at the factory, if any
*/
if (guiMergedView) {
mainWindow()->guiFactory()->removeClient(guiMergedView);
guiMergedView = nullptr;
if (m_guiMergedView) {
mainWindow()->guiFactory()->removeClient(m_guiMergedView);
m_guiMergedView = nullptr;
}
}
......@@ -498,9 +497,9 @@ bool KateViewManager::deleteView(KTextEditor::View *view)
/**
* deregister if needed
*/
if (guiMergedView == view) {
mainWindow()->guiFactory()->removeClient(guiMergedView);
guiMergedView = nullptr;
if (m_guiMergedView == view) {
mainWindow()->guiFactory()->removeClient(m_guiMergedView);
m_guiMergedView = nullptr;
}
#ifdef KActivities_FOUND
......@@ -647,15 +646,15 @@ void KateViewManager::activateView(KTextEditor::View *view)
mainWindow()->toolBar()->hide(); // hide to avoid toolbar flickering
}
if (guiMergedView) {
mainWindow()->guiFactory()->removeClient(guiMergedView);
guiMergedView = nullptr;
if (m_guiMergedView) {
mainWindow()->guiFactory()->removeClient(m_guiMergedView);
m_guiMergedView = nullptr;
}
if (!m_blockViewCreationAndActivation) {
mainWindow()->guiFactory()->addClient(view);
guiMergedView = view;
m_guiMergedView = view;
}
if (toolbarVisible) {
......@@ -940,9 +939,9 @@ void KateViewManager::restoreViewConfiguration(const KConfigGroup &config)
/**
* remove the single client that is registered at the factory, if any
*/
if (guiMergedView) {
mainWindow()->guiFactory()->removeClient(guiMergedView);
guiMergedView = nullptr;
if (m_guiMergedView) {
mainWindow()->guiFactory()->removeClient(m_guiMergedView);
m_guiMergedView = nullptr;
}
/**
......
......@@ -54,14 +54,14 @@ public:
KateViewManager(QWidget *parentW, KateMainWindow *parent);
~KateViewManager();
void updateViewSpaceActions();
private:
/**
* create all actions needed for the view manager
*/
void setupActions();
void updateViewSpaceActions();
public:
/* This will save the splitter configuration */
void saveViewConfiguration(KConfigGroup &group);
......@@ -104,9 +104,6 @@ public Q_SLOTS:
void activateNextView();
void activatePrevView();
protected:
QPointer<KTextEditor::View> guiMergedView;
Q_SIGNALS:
void viewChanged(KTextEditor::View *);
void viewCreated(KTextEditor::View *);
......@@ -276,6 +273,11 @@ private:
* current minimal age
*/
qint64 m_minAge;
/**
* the view that is ATM merged to the xml gui factory
*/
QPointer<KTextEditor::View> m_guiMergedView;
};
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment