summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Cullmann <cullmann@kde.org>2014-01-22 13:04:48 (GMT)
committerChristoph Cullmann <cullmann@kde.org>2014-01-22 13:04:48 (GMT)
commit1bed751cd26ac57983d4d15309d5f4f6d41c8db2 (patch)
tree928d2dffa6bac894c445dbcab0e97177146d0e6f
parent4a3e0d86762ff8bda3e28d9146ddfc9348171263 (diff)
fix viewChanged signals
-rw-r--r--addons/kate/filebrowser/katefilebrowser.cpp2
-rw-r--r--addons/kate/project/kateprojectpluginview.cpp2
-rw-r--r--addons/kate/search/plugin_search.cpp2
-rw-r--r--addons/kate/symbolviewer/plugin_katesymbolviewer.cpp2
-rw-r--r--addons/kate/tabbarextension/plugin_katetabbarextension.cpp2
-rw-r--r--addons/kate/tabify/tabify.cpp2
-rw-r--r--kate/app/katemainwindow.cpp6
-rw-r--r--kate/app/kateviewmanager.cpp11
-rw-r--r--kate/app/kateviewmanager.h2
9 files changed, 17 insertions, 14 deletions
diff --git a/addons/kate/filebrowser/katefilebrowser.cpp b/addons/kate/filebrowser/katefilebrowser.cpp
index 0be8f65..2fde05b 100644
--- a/addons/kate/filebrowser/katefilebrowser.cpp
+++ b/addons/kate/filebrowser/katefilebrowser.cpp
@@ -125,7 +125,7 @@ KateFileBrowser::KateFileBrowser(KTextEditor::MainWindow *mainWindow,
m_filter->setWhatsThis(i18n("Enter a name filter to limit which files are displayed."));
connect(m_dirOperator, SIGNAL(fileSelected(KFileItem)), this, SLOT(fileSelected(KFileItem)));
- connect(m_mainWindow, SIGNAL(viewChanged()), this, SLOT(autoSyncFolder()));
+ connect(m_mainWindow, SIGNAL(viewChanged(KTextEditor::View *)), this, SLOT(autoSyncFolder()));
}
KateFileBrowser::~KateFileBrowser()
diff --git a/addons/kate/project/kateprojectpluginview.cpp b/addons/kate/project/kateprojectpluginview.cpp
index 10de289..74ed5a5 100644
--- a/addons/kate/project/kateprojectpluginview.cpp
+++ b/addons/kate/project/kateprojectpluginview.cpp
@@ -80,7 +80,7 @@ KateProjectPluginView::KateProjectPluginView( KateProjectPlugin *plugin, KTextEd
* connect to important signals, e.g. for auto project view creation
*/
connect (m_plugin, SIGNAL(projectCreated (KateProject *)), this, SLOT(viewForProject (KateProject *)));
- connect (m_mainWindow, SIGNAL(viewChanged ()), this, SLOT(slotViewChanged ()));
+ connect (m_mainWindow, SIGNAL(viewChanged (KTextEditor::View *)), this, SLOT(slotViewChanged ()));
connect (m_projectsCombo, SIGNAL(currentIndexChanged (int)), this, SLOT(slotCurrentChanged (int)));
connect (m_mainWindow, SIGNAL(viewCreated (KTextEditor::View *)), this, SLOT(slotViewCreated (KTextEditor::View *)));
connect (m_reloadButton, SIGNAL(clicked (bool)), this, SLOT(slotProjectReload ()));
diff --git a/addons/kate/search/plugin_search.cpp b/addons/kate/search/plugin_search.cpp
index 2cdc850..f96a802 100644
--- a/addons/kate/search/plugin_search.cpp
+++ b/addons/kate/search/plugin_search.cpp
@@ -372,7 +372,7 @@ m_mainWindow (mainWin)
connect(m_mainWindow, SIGNAL(pluginViewDeleted (const QString &, Kate::PluginView *))
, this, SLOT(slotPluginViewDeleted (const QString &, Kate::PluginView *)));
- connect(m_mainWindow, SIGNAL(viewChanged()), this, SLOT(docViewChanged()));
+ connect(m_mainWindow, SIGNAL(viewChanged(KTextEditor::View *)), this, SLOT(docViewChanged()));
// update once project plugin state manually
diff --git a/addons/kate/symbolviewer/plugin_katesymbolviewer.cpp b/addons/kate/symbolviewer/plugin_katesymbolviewer.cpp
index 05d2e29..a8fd688 100644
--- a/addons/kate/symbolviewer/plugin_katesymbolviewer.cpp
+++ b/addons/kate/symbolviewer/plugin_katesymbolviewer.cpp
@@ -120,7 +120,7 @@ m_plugin(plugin)
connect(m_symbols, SIGNAL(itemActivated(QTreeWidgetItem*,int)), this, SLOT(goToSymbol(QTreeWidgetItem*)));
connect(m_symbols, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(slotShowContextMenu(QPoint)));
- connect(mainWindow(), SIGNAL(viewChanged()), this, SLOT(slotDocChanged()));
+ connect(mainWindow(), SIGNAL(viewChanged(KTextEditor::View *)), this, SLOT(slotDocChanged()));
QStringList titles;
titles << i18nc("@title:column", "Symbols") << i18nc("@title:column", "Position");
diff --git a/addons/kate/tabbarextension/plugin_katetabbarextension.cpp b/addons/kate/tabbarextension/plugin_katetabbarextension.cpp
index 0792ff9..d83e5e5 100644
--- a/addons/kate/tabbarextension/plugin_katetabbarextension.cpp
+++ b/addons/kate/tabbarextension/plugin_katetabbarextension.cpp
@@ -57,7 +57,7 @@ PluginView::PluginView( Kate::MainWindow* mainwindow )
this, SLOT(slotDocumentCreated(KTextEditor::Document*)) );
connect( Kate::application()->documentManager(), SIGNAL(documentDeleted(KTextEditor::Document*)),
this, SLOT(slotDocumentDeleted(KTextEditor::Document*)) );
- connect( mainWindow(), SIGNAL(viewChanged()),
+ connect( mainWindow(), SIGNAL(viewChanged(KTextEditor::View *)),
this, SLOT(slotViewChanged()) );
connect( tabbar, SIGNAL(currentChanged(int)),
diff --git a/addons/kate/tabify/tabify.cpp b/addons/kate/tabify/tabify.cpp
index ce808a6..ab91476 100644
--- a/addons/kate/tabify/tabify.cpp
+++ b/addons/kate/tabify/tabify.cpp
@@ -59,7 +59,7 @@ TabBarPluginView::TabBarPluginView(Kate::MainWindow* mainwindow)
this, SLOT(slotDocumentCreated(KTextEditor::Document*)));
connect(Kate::application()->documentManager(), SIGNAL(documentDeleted(KTextEditor::Document*)),
this, SLOT(slotDocumentDeleted(KTextEditor::Document*)));
- connect(mainWindow(), SIGNAL(viewChanged()),
+ connect(mainWindow(), SIGNAL(viewChanged(KTextEditor::View *)),
this, SLOT(slotViewChanged()));
connect(m_tabBar, SIGNAL(currentChanged(int)), this, SLOT(slotTabChanged(int)));
diff --git a/kate/app/katemainwindow.cpp b/kate/app/katemainwindow.cpp
index 2edb479..e6bfc28 100644
--- a/kate/app/katemainwindow.cpp
+++ b/kate/app/katemainwindow.cpp
@@ -355,9 +355,9 @@ void KateMainWindow::setupActions()
a->setText( i18n("&About Editor Component") );
connect( a, SIGNAL(triggered()), this, SLOT(aboutEditor()) );
- connect(m_viewManager, SIGNAL(viewChanged()), this, SLOT(slotWindowActivated()));
- connect(m_viewManager, SIGNAL(viewChanged()), this, SLOT(slotUpdateOpenWith()));
- connect(m_viewManager, SIGNAL(viewChanged()), this, SLOT(slotUpdateBottomViewBar()));
+ connect(m_viewManager, SIGNAL(viewChanged(KTextEditor::View*)), this, SLOT(slotWindowActivated()));
+ connect(m_viewManager, SIGNAL(viewChanged(KTextEditor::View*)), this, SLOT(slotUpdateOpenWith()));
+ connect(m_viewManager, SIGNAL(viewChanged(KTextEditor::View*)), this, SLOT(slotUpdateBottomViewBar()));
// re-route signals to our wrapper
connect (m_viewManager, SIGNAL(viewChanged(KTextEditor::View*)), m_wrapper, SIGNAL(viewChanged(KTextEditor::View*)));
diff --git a/kate/app/kateviewmanager.cpp b/kate/app/kateviewmanager.cpp
index 6da1b14..b2b382c 100644
--- a/kate/app/kateviewmanager.cpp
+++ b/kate/app/kateviewmanager.cpp
@@ -84,7 +84,7 @@ KateViewManager::KateViewManager (QWidget *parentW, KateMainWindow *parent)
vs->setActive( true );
m_viewSpaceList.append(vs);
- connect( this, SIGNAL(viewChanged()), this, SLOT(slotViewChanged()) );
+ connect( this, SIGNAL(viewChanged(KTextEditor::View*)), this, SLOT(slotViewChanged()) );
connect(KateDocManager::self(), SIGNAL(documentCreatedViewManager(KTextEditor::Document*)), this, SLOT(documentCreated(KTextEditor::Document*)));
connect(KateDocManager::self(), SIGNAL(documentDeleted(KTextEditor::Document*)), this, SLOT(documentDeleted(KTextEditor::Document*)));
@@ -570,7 +570,6 @@ void KateViewManager::activateView ( KTextEditor::View *view )
// remember age of this view
m_lruViews[view] = m_minAge--;
- emit viewChanged();
emit viewChanged(view);
}
}
@@ -646,7 +645,12 @@ void KateViewManager::closeViews(KTextEditor::Document *doc)
deleteView( closeList.takeFirst(), true );
if (m_blockViewCreationAndActivation) return;
- QTimer::singleShot(0, this, SIGNAL(viewChanged()));
+ QTimer::singleShot(0, this, SLOT(slotDelayedViewChanged()));
+}
+
+void KateViewManager::slotDelayedViewChanged ()
+{
+ emit viewChanged (activeView());
}
void KateViewManager::splitViewSpace( KateViewSpace* vs, // = 0
@@ -777,7 +781,6 @@ void KateViewManager::removeViewSpace (KateViewSpace *viewspace)
updateViewSpaceActions ();
- emit viewChanged();
emit viewChanged(v);
}
diff --git a/kate/app/kateviewmanager.h b/kate/app/kateviewmanager.h
index 25097e4..437a400 100644
--- a/kate/app/kateviewmanager.h
+++ b/kate/app/kateviewmanager.h
@@ -94,6 +94,7 @@ class KateViewManager : public QSplitter
private Q_SLOTS:
void activateView ( KTextEditor::View *view );
void activateSpace ( KTextEditor::View* v );
+ void slotDelayedViewChanged ();
public Q_SLOTS:
void slotDocumentNew ();
@@ -112,7 +113,6 @@ class KateViewManager : public QSplitter
Q_SIGNALS:
void statChanged ();
- void viewChanged ();
void viewChanged (KTextEditor::View *);
void viewCreated (KTextEditor::View *);