Oh, I tried that this afternoon ( MST )during my lunch break. (it's really bugging me ). I've tried creating kapplication objects and other techniques in code I have found by searching for "dcop" on the Google search engine., none of them take care of the runtime error I am getting. The only big difference I see between my test dcop application and my project is that in the test all of the work is done in the 'main' function, while in my project it is done in the object's constructor function.
Something I haven't tried as a solution ( because it destroys the encapsulation ), is to create the dcopclient pointer in the 'main' function, and pass it down to the main Widget, and then have the main Widget pass it to the bottom level object that needs it, by adding it as a parameter to that object's constructor.
This seems like a lot work and bad programming for me to manager the Master and PCM mixer objects in Linux ( via kmix ), perhaps there is a nothing way? Originally I did it via QProcess using the dcop binary, but I am REALLY trying to avoid that approach.
Btw, here is the project's make file:
|
Source code
|
1
2
3
4
5
6
7
8
|
TEMPLATE = app
CONFIG -= moc
INCLUDEPATH += . /usr/include/kde
LIBS += -lkdecore -lDCOP
# Input
HEADERS += mediamaster.h mplayer.h
SOURCES += main.cpp mediamaster.cpp mplayer.cpp
|
And I do greatly appreciate the help I have been getting. This type of problem usually has a cause that is staring me in the face, I just have to discern it from the rest of the code.