This patch fixes broken code-context help. Old version has buggy behavior:
- Place following code to some source file (line numbers is for example):
1: QHBoxLayout hbl; 2: QLayout* l = &hbl; 3: l->addWidget(new QPushButton); 4: hbl.addWidget(new QPushButton);
Restart KDevelop.
- Place cursor to addWidget in line 3 and call "Show Documentation" from context menu. Help page is shown and all it's OK.
- Place cursor to addWidget in line 4 and call help again. Help page is shown but with wrong contents.
- Place cursor again to addWidget in line 3 and call "Show documentation". Help page is shown but again with wrong contents.
- Such broken search will happens until next restart.
This behavior caused by wrong usage of documentation Url - it passed as baseUrl parameter of QWebView::setContent() method, which is wrong. Qt doc says:
External objects referenced in the content are located relative to baseUrl.
Therefore new version uses setUrl() method to set correct documentation Url.