Commit f1fd2750 authored by Pino Toscano's avatar Pino Toscano

save a pointer to save some casts

svn path=/trunk/playground/graphics/okular/; revision=641327
parent 3507d4e6
......@@ -1601,7 +1601,7 @@ void Part::updateAboutBackendAction()
* BrowserExtension class
*/
BrowserExtension::BrowserExtension(Part* parent)
: KParts::BrowserExtension( parent )
: KParts::BrowserExtension( parent ), m_part( parent )
{
emit enableAction("print", true);
setURLDropHandlingEnabled(true);
......@@ -1610,7 +1610,7 @@ BrowserExtension::BrowserExtension(Part* parent)
void BrowserExtension::print()
{
static_cast<Part*>(parent())->slotPrint();
m_part->slotPrint();
}
......
......@@ -241,6 +241,9 @@ class BrowserExtension : public KParts::BrowserExtension
public slots:
// Automatically detected by the host.
void print();
private:
Part *m_part;
};
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment