[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/work/kviewshell-0.7/kviewshell/shell
From: Wilfried Huss <Wilfried.Huss () gmx ! at>
Date: 2006-09-25 13:03:58
Message-ID: 1159189438.422668.27359.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 588254 by whuss:
Fix crash when embedding into kile or ark.
kparts are really a messy business.
M +22 -3 kviewpart.cpp
--- branches/work/kviewshell-0.7/kviewshell/shell/kviewpart.cpp #588253:588254
@@ -877,8 +877,19 @@
multiPage->setParentWidget(mainWidget);
// Setup GUI that the multipage might wish to add
- factory()->addClient(multiPage);
+ // For some KPart hosts (kile for example) don't build their GUI with
+ // KXMLGUIFactory, and factory() returns 0. In these cases we cannot
+ // add gui items of the plugins.
+ if (factory())
+ {
+ factory()->addClient(multiPage);
+ }
+ else
+ {
+ kdError() << "factory() == NULL: cannot create plugin specific gui items." << endl;
+ }
+
// Setup shared data
multiPage->setupObservers(dataModel);
@@ -902,8 +913,16 @@
// Initialize documentPageCache.
pageCache->setRenderer(multiPage->getRenderer());
- if (oldMultiPage != 0) {
- factory()->removeClient(oldMultiPage);
+ if (oldMultiPage != 0)
+ {
+ if (factory())
+ {
+ factory()->removeClient(oldMultiPage);
+ }
+ else
+ {
+ kdError() << "factory() == NULL: cannot remove plugin specific gui items." << endl;
+ }
delete oldMultiPage;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic