My question is about a method of KHTMLPart.
About the Widget... well i don't know how to answer the question.
I've got this:
/*
* We connect the signal onUrl of the new part
* to the slotCursoirOnUrl slot, so that the part can
* acknowledge that laprt is on a url.
*/
connect(khtmlpart,
SIGNAL(onURL(const QString &)),
this,
SLOT(slotCursorOnUrl(const QString &)));
void KGenerator::slotCursorOnUrl(const QString & url) {
cout << "in KGenerator::slotCursorOnUrl, the destination url is: " << urlDestination << "\n"<< endl;
delete urlDestination;
urlDestination = new QString(url);
cout << "It then becomes: " << urlDestination << "\n"<< endl;
statusBar()->changeItem(*urlDestination,0);
}
/**
*
*
*/
void KGenerator::slotForbiddenLink() {
if ( *urlDestination != QString::null) {
KHTMLPart * khtmlpart = NULL;
if ((khtmlpart = returnActiveFrame())) {
forbiddenLinkList->insertItem((completeURL(*urlDestination)).prettyURL());
// khtmlpart->openURL(*urlDestination);
// forbiddenLinkList->insertItem((khtmlpart->url()).prettyURL());
} else {
cout << "mistake with forbidden url" << endl;
}
}
}
The problem is that the completeURL method is protected... so we can't build this code.
What i want to do is manage to insert a complete url into our list. (by complete url, i mean the full url "http:\\
www.blabla....\newThing.html" and not only "\newThing.html"
Thanks again!