KDockMainWindow should get new parents!

Falk Brettschneider gigafalk at yahoo.com
Sat Jun 17 20:27:40 UTC 2000


Hi,

Simon Hausmann wrote:

> ;-) Sandy just sent me the whole thread.

>
> Regarding the code duplication of KParts::MainWindow::createGUI : I'm in
> favour of duplicating the code ;-) (at least for now, as it is binary
> compatible, in contrary to changing the inherittance of
> KParts::MainWindow) . But I'm waiting for David's input on this, he's
> usually the person making wiser decisions about how to avoid code
> duplication :-)

David Faure wrote to kde-core-devel:
> On Sat, Jun 17, 2000 at 01:20:07AM +0200, Falk Brettschneider wrote:
> > David Faure wrote:
> >
> > > Looks good... but you'll have to reimplement all that KParts::MainWindow
does,
> > > as I said previously. Namely, the part activation stuff.
> >
> > Yep, it doesn't seems to be much code but looks difficult to me (probably
'cause
> > it's completely new for me :).
> > But anyway it shouldn't be much different, should it?
>
> No, but duplicated - which I never like, but I see no other solution here.


>
>
> Regarding the KParts::PartManager-eventfilter-on-mainwindow issue:
> This might indeed be a problem for a toplevel "dock" window. However the
> reason why the partmanager has to be "restricted" on a certain toplevel
> widget is the koffice embedding (you can have one koffice document
> embedded in two different shells -> you have to treat the activation
> separately) .
>
> Well, but I see no problem with changing the toplevel widget check in the
> eventfilter to work on a list of widgets (with usually only one entry, but
> in case of undocked part widgets with multiple entries) .

Every created KDockWidget is a toplevel one, usually. The docking is done after
creation. So that problem hits us immediately. :)

>
>
> I'll take care of adding that. (in case you agree)
>
> Bye,
>  Simon

I have uploaded 3 files which you will need to kdelibs/kparts:
ftp://fara.cs.uni-potsdam.de/incoming/Makefile.am
ftp://fara.cs.uni-potsdam.de/incoming/dockmainwindow.h
ftp://fara.cs.uni-potsdam.de/incoming/dockmainwindow.cpp

It duplicates the KPart::MainWindow code.

Unfortunatelly, I've got a mystic error message when compiling kdelibs. :-(
Do you know why?

----------------------------------
make[3]: Entering directory `/home/falk/Projekte/kde2src/kdelibs/kparts'
/bin/sh ../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I.. -I./../
-I../kio/ -I../libltdl       -I../kfile -I../dcop -I../kdecore -I../kdeui
-I/home/falk/Projekte/kde2src/qt-copy/include -I/usr/X11R6/include
-I/opt/kde2/include     -g -ansi -D_XOPEN_SOURCE -D_BSD_SOURCE -fno-exceptions
-fno-rtti -fno-check-new -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes
-Wwrite-strings -Wno-long-long -fno-builtin -frtti -DQT_CLEAN_NAMESPACE  -c
dockmainwindow.cpp
g++ -DHAVE_CONFIG_H -I. -I. -I.. -I./../ -I../kio/ -I../libltdl -I../kfile
-I../dcop -I../kdecore -I../kdeui -I/home/falk/Projekte/kde2src/qt-copy/include
-I/usr/X11R6/include -I/opt/kde2/include -g -ansi -D_XOPEN_SOURCE -D_BSD_SOURCE
-fno-exceptions -fno-rtti -fno-check-new -Wall -pedantic -W -Wpointer-arith
-Wmissing-prototypes -Wwrite-strings -Wno-long-long -fno-builtin -frtti
-DQT_CLEAN_NAMESPACE -Wp,-MD,.deps/dockmainwindow.pp -c dockmainwindow.cpp  -fPIC
-DPIC -o .libs/dockmainwindow.o
dockmainwindow.cpp:52: syntax error before `::'
dockmainwindow.cpp:56: invalid use of `this' at top level
dockmainwindow.cpp:56: warning: ANSI C++ forbids declaration `setPartObject' with
no type
dockmainwindow.cpp:56: `int ::KParts::PartBase::setPartObject' is not a static
member of `class ::KParts::PartBase'
dockmainwindow.cpp:57: parse error before `}'
make[3]: *** [dockmainwindow.lo] Error 1
make[3]: Leaving directory `/home/falk/Projekte/kde2src/kdelibs/kparts'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/falk/Projekte/kde2src/kdelibs/kparts'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/falk/Projekte/kde2src/kdelibs'
make: *** [all-recursive-am] Error 2
falk at doki:~/Projekte/kde2src/kdelibs >
---------------------------------

Ciao,
  F at lk



__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com




More information about the KDevelop-devel mailing list