Commit 6cfc3ed3 authored by Robert Knight's avatar Robert Knight

KProcess -> K3Process, KProcIO -> K3ProcIO.

svn path=/branches/work/konsole-split-view/; revision=647320
parent a44a76b8
......@@ -175,11 +175,11 @@ void Pty::setWriteable(bool writeable)
Pty::Pty()
{
m_bufferFull = false;
connect(this, SIGNAL(receivedStdout(KProcess *, char *, int )),
this, SLOT(dataReceived(KProcess *,char *, int)));
connect(this, SIGNAL(processExited(KProcess *)),
connect(this, SIGNAL(receivedStdout(K3Process *, char *, int )),
this, SLOT(dataReceived(K3Process *,char *, int)));
connect(this, SIGNAL(processExited(K3Process *)),
this, SLOT(donePty()));
connect(this, SIGNAL(wroteStdin(KProcess *)),
connect(this, SIGNAL(wroteStdin(K3Process *)),
this, SLOT(writeReady()));
setUsePty(All, false); // utmp will be overridden later
......@@ -243,7 +243,7 @@ void Pty::send_bytes(const char* s, int len)
}
/*! indicates that a block of data is received */
void Pty::dataReceived(KProcess *,char *buf, int len)
void Pty::dataReceived(K3Process *,char *buf, int len)
{
// kDebug() << __FUNCTION__ << ": received " << len << " bytes - '" << buf << "'" << endl;
......
......@@ -21,16 +21,19 @@
#ifndef TE_PTY_H
#define TE_PTY_H
#include <kprocess.h>
// Qt
#include <QSocketNotifier>
#include <QStringList>
#include <QVector>
#include <QList>
// KDE
#include <K3Process>
namespace Konsole
{
class Pty: public KProcess
class Pty: public K3Process
{
Q_OBJECT
......@@ -85,7 +88,7 @@ Q_OBJECT
bool buffer_full() { return m_bufferFull; }
protected Q_SLOTS:
void dataReceived(KProcess *, char *buf, int len);
void dataReceived(K3Process *, char *buf, int len);
public Q_SLOTS:
void donePty();
......
......@@ -39,7 +39,7 @@
#include <KLocale>
#include <KMessageBox>
#include <KNotification>
#include <KProcIO>
#include <K3ProcIO>
#include <KRun>
#include <kshell.h>
#include <KStandardDirs>
......@@ -770,7 +770,7 @@ void Session::cancelZModem()
void Session::startZModem(const QString &zmodem, const QString &dir, const QStringList &list)
{
_zmodemBusy = true;
_zmodemProc = new KProcIO;
_zmodemProc = new K3ProcIO;
(*_zmodemProc) << zmodem << "-v";
for(QStringList::ConstIterator it = list.begin();
......@@ -782,15 +782,15 @@ void Session::startZModem(const QString &zmodem, const QString &dir, const QStri
if (!dir.isEmpty())
_zmodemProc->setWorkingDirectory(dir);
_zmodemProc->start(KProcIO::NotifyOnExit, false);
// Override the read-processing of KProcIO
disconnect(_zmodemProc,SIGNAL (receivedStdout (KProcess *, char *, int)), 0, 0);
connect(_zmodemProc,SIGNAL (receivedStdout (KProcess *, char *, int)),
this, SLOT(zmodemSendBlock(KProcess *, char *, int)));
connect(_zmodemProc,SIGNAL (receivedStderr (KProcess *, char *, int)),
this, SLOT(zmodemStatus(KProcess *, char *, int)));
connect(_zmodemProc,SIGNAL (processExited(KProcess *)),
_zmodemProc->start(K3ProcIO::NotifyOnExit, false);
// Override the read-processing of K3ProcIO
disconnect(_zmodemProc,SIGNAL (receivedStdout (K3Process *, char *, int)), 0, 0);
connect(_zmodemProc,SIGNAL (receivedStdout (K3Process *, char *, int)),
this, SLOT(zmodemSendBlock(K3Process *, char *, int)));
connect(_zmodemProc,SIGNAL (receivedStderr (K3Process *, char *, int)),
this, SLOT(zmodemStatus(K3Process *, char *, int)));
connect(_zmodemProc,SIGNAL (processExited(K3Process *)),
this, SLOT(zmodemDone()));
disconnect( _shellProcess,SIGNAL(block_in(const char*,int)), this, SLOT(onReceiveBlock(const char*,int)) );
......@@ -806,7 +806,7 @@ void Session::startZModem(const QString &zmodem, const QString &dir, const QStri
_zmodemProgress->show();
}
void Session::zmodemSendBlock(KProcess *, char *data, int len)
void Session::zmodemSendBlock(K3Process *, char *data, int len)
{
_shellProcess->send_bytes(data, len);
// qWarning("<-- %d bytes", len);
......@@ -823,7 +823,7 @@ void Session::zmodemContinue()
// qWarning("ZModem resume");
}
void Session::zmodemStatus(KProcess *, char *data, int len)
void Session::zmodemStatus(K3Process *, char *data, int len)
{
QByteArray msg(data, len+1);
while(!msg.isEmpty())
......
......@@ -26,8 +26,8 @@
#include <QByteArray>
// KDE
#include <kapplication.h>
#include <kmainwindow.h>
#include <KApplication>
#include <KMainWindow>
// Konsole
#include "Pty.h"
......@@ -35,8 +35,8 @@
#include "Vt102Emulation.h"
class KProcIO;
class KProcess;
class K3ProcIO;
class K3Process;
namespace Konsole
{
......@@ -236,8 +236,8 @@ public Q_SLOTS:
void slotZModemDetected();
void emitZModemDetected();
void zmodemStatus(KProcess *, char *data, int len);
void zmodemSendBlock(KProcess *, char *data, int len);
void zmodemStatus(K3Process *, char *data, int len);
void zmodemSendBlock(K3Process *, char *data, int len);
void zmodemRcvBlock(const char *data, int len);
void zmodemDone();
void zmodemContinue();
......@@ -321,7 +321,7 @@ private:
// ZModem
bool _zmodemBusy;
KProcIO* _zmodemProc;
K3ProcIO* _zmodemProc;
ZModemDialog* _zmodemProgress;
// Color/Font Changes by ESC Sequences
......
......@@ -2431,6 +2431,12 @@ bool TerminalDisplay::eventFilter( QObject *obj, QEvent *e )
if (ke->modifiers() & Qt::ControlModifier)
{
/*if ( ke->key() == Qt::Key_PageUp || ke->key() == Qt::Key_PageDown)
{
static_cast<QKeyEvent*>(e)->ignore();
return false;
}*/
if ( ke->key() == Qt::Key_S )
emit flowControlKeyPressed(true /*output suspended*/);
if ( ke->key() == Qt::Key_Q )
......@@ -2460,19 +2466,6 @@ bool TerminalDisplay::eventFilter( QObject *obj, QEvent *e )
return true;
}
// We no longer clear the selection when the clipboard changes
//
//if ( e->type() == QEvent::Enter )
//{
// QObject::disconnect( (QObject*)cb, SIGNAL(dataChanged()),
// this, SLOT(onClearSelection()) );
//}
//if ( e->type() == QEvent::Leave )
//{
// QObject::connect( (QObject*)cb, SIGNAL(dataChanged()),
// this, SLOT(onClearSelection()) );
//}*/
return QFrame::eventFilter( obj, e );
}
......
......@@ -144,7 +144,6 @@ TabbedViewContainer::TabbedViewContainer(QObject* parent) :
,_contextMenuTab(0)
{
_tabWidget = new KTabWidget();
_tabWidget->setDrawTabFrame(false);
_tabContextMenu = new KMenu(_tabWidget);
_newSessionButton = new QToolButton(_tabWidget);
......
......@@ -92,15 +92,21 @@ void ViewManager::setupActions()
connect( mergeAction , SIGNAL(triggered()) , _mainWindow , SLOT(mergeWindows()) );
QAction* nextViewAction = collection->addAction("next-view");
nextViewAction->setText( i18n("Next View") );
nextViewAction->setShortcut( QKeySequence(Qt::SHIFT+Qt::Key_Right) );
KAction* nextViewAction = new KAction( i18n("Next View") , this );
collection->addAction("next-view",nextViewAction);
KShortcut nextViewShortcut = nextViewAction->shortcut();
nextViewShortcut.setAlternate( QKeySequence(Qt::SHIFT+Qt::Key_Right) );
nextViewShortcut.setPrimary( QKeySequence(Qt::CTRL+Qt::Key_PageUp) );
nextViewAction->setShortcut(nextViewShortcut);
connect( nextViewAction, SIGNAL(triggered()) , this , SLOT(nextView()) );
_mainWindow->addAction(nextViewAction);
QAction* previousViewAction = collection->addAction("previous-view");
previousViewAction->setText( i18n("Previous View") );
previousViewAction->setShortcut( QKeySequence(Qt::SHIFT+Qt::Key_Left) );
KAction* previousViewAction = new KAction( i18n("Previous View") , this );
collection->addAction("previous-view",previousViewAction);
KShortcut previousViewShortcut = previousViewAction->shortcut();
previousViewShortcut.setPrimary( QKeySequence(Qt::SHIFT+Qt::Key_Left) );
previousViewShortcut.setAlternate( QKeySequence(Qt::CTRL+Qt::Key_PageDown) );
previousViewAction->setShortcut(previousViewShortcut);
connect( previousViewAction, SIGNAL(triggered()) , this , SLOT(previousView()) );
_mainWindow->addAction(previousViewAction);
......
......@@ -350,7 +350,7 @@ Konsole::~Konsole()
//wait for the session processes to terminate
while(sessionManager()->sessions().count() &&
KProcessController::theKProcessController->waitForProcessExit(1))
K3ProcessController::theK3ProcessController->waitForProcessExit(1))
{
//do nothing
}
......
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