summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Humpula <michal.humpula@seznam.cz>2014-01-19 18:29:31 (GMT)
committerMichal Humpula <michal.humpula@seznam.cz>2014-01-19 18:29:33 (GMT)
commita14a93ee39af2e3d486dc6360ac61eae48d5a625 (patch)
treec23065798ef43491cb3db90f26314e1123870d24
parente6f7b7c8aea55a98852b41dd4f94eca20c5381f7 (diff)
kateconsole: fix runtime errors
* viewChanged new interface * mispelled plugin name
-rw-r--r--addons/kate/konsole/kateconsole.cpp14
-rw-r--r--addons/kate/konsole/kateconsole.h2
2 files changed, 8 insertions, 8 deletions
diff --git a/addons/kate/konsole/kateconsole.cpp b/addons/kate/konsole/kateconsole.cpp
index af67832..3c33263 100644
--- a/addons/kate/konsole/kateconsole.cpp
+++ b/addons/kate/konsole/kateconsole.cpp
@@ -139,7 +139,7 @@ KateConsole::KateConsole (KateKonsolePlugin* plugin, KTextEditor::MainWindow *mw
, m_toolView (parent)
, m_plugin(plugin)
{
- KXMLGUIClient::setComponentName (QLatin1String("kateconsole"), i18n ("Kate Terminal"));
+ KXMLGUIClient::setComponentName (QLatin1String("katekonsole"), i18n ("Kate Terminal"));
setXMLFile( QLatin1String("ui.rc") );
// make sure we have a vertical layout
@@ -277,7 +277,7 @@ void KateConsole::slotPipeToConsole ()
sendInput (v->document()->text());
}
-void KateConsole::slotSync()
+void KateConsole::slotSync(KTextEditor::View *)
{
if (m_mw->activeView() ) {
QUrl u = m_mw->activeView()->document()->url();
@@ -324,11 +324,11 @@ void KateConsole::slotToggleFocus()
void KateConsole::readConfig()
{
- disconnect( m_mw, SIGNAL(viewChanged()), this, SLOT(slotSync()) );
- if ( KConfigGroup(KSharedConfig::openConfig(), "Konsole").readEntry("AutoSyncronize", false) )
- connect( m_mw, SIGNAL(viewChanged()), SLOT(slotSync()) );
-
-
+ disconnect(m_mw, &KTextEditor::MainWindow::viewChanged, this, &KateConsole::slotSync);
+ if ( KConfigGroup(KSharedConfig::openConfig(), "Konsole").readEntry("AutoSyncronize", false) ) {
+ connect(m_mw, &KTextEditor::MainWindow::viewChanged, this, &KateConsole::slotSync);
+ }
+
if ( KConfigGroup(KSharedConfig::openConfig(), "Konsole").readEntry("SetEditor", false) )
::setenv( "EDITOR", "kate -b",1);
else
diff --git a/addons/kate/konsole/kateconsole.h b/addons/kate/konsole/kateconsole.h
index bd1f195..ea41ef4 100644
--- a/addons/kate/konsole/kateconsole.h
+++ b/addons/kate/konsole/kateconsole.h
@@ -142,7 +142,7 @@ class KateConsole : public QWidget, public KXMLGUIClient
/**
* synchronize the konsole with the current document (cd to the directory)
*/
- void slotSync();
+ void slotSync(KTextEditor::View *view = 0);
/**
* When syncing is done by the user, also show the terminal if it is hidden
*/