[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: konsole patch
From: Bernd Gehrmann <bernd () physik ! hu-berlin ! de>
Date: 2001-06-27 16:28:29
[Download RAW message or body]
The konsole part always gives warnings about non-existing
slots, making debugging programs embedding it difficult.
This patch fixes this and also removes an unjustified and
error-prone QWidget->QMainWindow cast.
The patch is a hack, but as the way TESession interacts
with the shell is a hack anyway, I don't see any better
way of fixing it.
Bernd.
["konsole.patch" (TEXT/PLAIN)]
? konsole.patch
Index: konsole_part.C
===================================================================
RCS file: /home/kde/kdebase/konsole/src/konsole_part.C,v
retrieving revision 1.31
diff -u -r1.31 konsole_part.C
--- konsole_part.C 2001/06/13 20:17:01 1.31
+++ konsole_part.C 2001/06/27 16:23:45
@@ -117,7 +117,7 @@
te->setScrollbarLocation(TEWidget::SCRRIGHT);
setWidget(te);
// faking a KMainwindow - TESession assumes that (wrong design!)
- initial = new TESession((KMainWindow*)parentWidget,
+ initial = new TESession(parentWidget,
te,shell,eargs,"xterm");
connect( initial,SIGNAL(done(TESession*,int)),
this,SLOT(doneSession(TESession*,int)) );
Index: session.C
===================================================================
RCS file: /home/kde/kdebase/konsole/src/session.C,v
retrieving revision 1.37
diff -u -r1.37 session.C
--- session.C 2001/06/13 20:17:01 1.37
+++ session.C 2001/06/27 16:23:45
@@ -1,4 +1,5 @@
#include "session.h"
+#include <qmetaobject.h>
#include <qpushbutton.h>
#include <kdebug.h>
@@ -18,7 +19,7 @@
of the abilities of the framework - multible sessions.
*/
-TESession::TESession(KMainWindow* main, TEWidget* te, const char* _pgm, \
QStrList & _args, const char *_term) +TESession::TESession(QWidget* main, \
TEWidget* te, const char* _pgm, QStrList & _args, const char *_term) : \
schema_no(0) , font_no(3)
, pgm(_pgm)
@@ -40,11 +41,15 @@
// 'main' should do those connects itself, somehow.
// These aren't KTMW's slots, but konsole's.(David)
- connect( em,SIGNAL(ImageSizeChanged(int,int)),main,SLOT(notifySize(int,int)));
- connect( em,SIGNAL(sndBlock(const char*,int)),sh,SLOT(send_bytes(const \
char*,int)) );
- connect( em,SIGNAL(changeColumns(int)),main,SLOT(changeColumns(int)) );
- connect( em,SIGNAL(changeTitle(int, const \
QString&)),main,SLOT(changeTitle(int, const QString&)) ); + QStrList \
slotNames = main->metaObject()->slotNames(true); + if \
(slotNames.find("notifySize(int,int)") != -1) + connect( \
em,SIGNAL(ImageSizeChanged(int,int)),main,SLOT(notifySize(int,int))); + if \
(slotNames.find("changeColumns(int)") != -1) + connect( \
em,SIGNAL(changeColumns(int)),main,SLOT(changeColumns(int)) ); + if \
(slotNames.find("changeTitle(int,const QString&)") != -1) + connect( \
em,SIGNAL(changeTitle(int, const QString&)),main,SLOT(changeTitle(int, \
const QString&)) ); // connect( em,SIGNAL(changeTitle(int, const \
QString&)),this,SLOT(saveChangedTitle(int, const QString&)) ); + connect( \
em,SIGNAL(sndBlock(const char*,int)),sh,SLOT(send_bytes(const char*,int)) \
); connect( sh,SIGNAL(done(int)), this,SLOT(done(int)) );
//kdDebug()<<"TESession ctor() done"<<endl;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic