Commit c2c5cf7b authored by Adrian Page's avatar Adrian Page

Adapt to new kdelibs snapshot.


svn path=/trunk/koffice/; revision=538807
parent aaa0220f
...@@ -37,10 +37,9 @@ typedef KGenericFactory<GrayPlugin> GrayPluginFactory; ...@@ -37,10 +37,9 @@ typedef KGenericFactory<GrayPlugin> GrayPluginFactory;
K_EXPORT_COMPONENT_FACTORY( kritagrayplugin, GrayPluginFactory( "kritacore" ) ) K_EXPORT_COMPONENT_FACTORY( kritagrayplugin, GrayPluginFactory( "kritacore" ) )
GrayPlugin::GrayPlugin(QObject *parent, const char *name, const QStringList &) GrayPlugin::GrayPlugin(QObject *parent, const QStringList &)
: KParts::Plugin(parent) : KParts::Plugin(parent)
{ {
setObjectName(name);
setInstance(GrayPluginFactory::instance()); setInstance(GrayPluginFactory::instance());
// This is not a gui plugin; only load it when the doc is created. // This is not a gui plugin; only load it when the doc is created.
......
...@@ -28,7 +28,7 @@ class GrayPlugin : public KParts::Plugin ...@@ -28,7 +28,7 @@ class GrayPlugin : public KParts::Plugin
{ {
Q_OBJECT Q_OBJECT
public: public:
GrayPlugin(QObject *parent, const char *name, const QStringList &); GrayPlugin(QObject *parent, const QStringList &);
virtual ~GrayPlugin(); virtual ~GrayPlugin();
}; };
......
...@@ -35,10 +35,9 @@ typedef KGenericFactory<RGBF32Plugin> RGBF32PluginFactory; ...@@ -35,10 +35,9 @@ typedef KGenericFactory<RGBF32Plugin> RGBF32PluginFactory;
K_EXPORT_COMPONENT_FACTORY( krita_rgb_f32_plugin, RGBF32PluginFactory( "krita" ) ) K_EXPORT_COMPONENT_FACTORY( krita_rgb_f32_plugin, RGBF32PluginFactory( "krita" ) )
RGBF32Plugin::RGBF32Plugin(QObject *parent, const char *name, const QStringList &) RGBF32Plugin::RGBF32Plugin(QObject *parent, const QStringList &)
: KParts::Plugin(parent) : KParts::Plugin(parent)
{ {
setObjectName(name);
setInstance(RGBF32PluginFactory::instance()); setInstance(RGBF32PluginFactory::instance());
if ( parent->inherits("KisColorSpaceFactoryRegistry") ) if ( parent->inherits("KisColorSpaceFactoryRegistry") )
......
...@@ -29,7 +29,7 @@ class RGBF32Plugin : public KParts::Plugin ...@@ -29,7 +29,7 @@ class RGBF32Plugin : public KParts::Plugin
{ {
Q_OBJECT Q_OBJECT
public: public:
RGBF32Plugin(QObject *parent, const char *name, const QStringList &); RGBF32Plugin(QObject *parent, const QStringList &);
virtual ~RGBF32Plugin(); virtual ~RGBF32Plugin();
}; };
......
...@@ -34,10 +34,9 @@ typedef KGenericFactory<RGBU16Plugin> RGBU16PluginFactory; ...@@ -34,10 +34,9 @@ typedef KGenericFactory<RGBU16Plugin> RGBU16PluginFactory;
K_EXPORT_COMPONENT_FACTORY( krita_rgb_u16_plugin, RGBU16PluginFactory( "krita" ) ) K_EXPORT_COMPONENT_FACTORY( krita_rgb_u16_plugin, RGBU16PluginFactory( "krita" ) )
RGBU16Plugin::RGBU16Plugin(QObject *parent, const char *name, const QStringList &) RGBU16Plugin::RGBU16Plugin(QObject *parent, const QStringList &)
: KParts::Plugin(parent) : KParts::Plugin(parent)
{ {
setObjectName(name);
setInstance(RGBU16PluginFactory::instance()); setInstance(RGBU16PluginFactory::instance());
if ( parent->inherits("KisColorSpaceFactoryRegistry") ) if ( parent->inherits("KisColorSpaceFactoryRegistry") )
......
...@@ -28,7 +28,7 @@ class RGBU16Plugin : public KParts::Plugin ...@@ -28,7 +28,7 @@ class RGBU16Plugin : public KParts::Plugin
{ {
Q_OBJECT Q_OBJECT
public: public:
RGBU16Plugin(QObject *parent, const char *name, const QStringList &); RGBU16Plugin(QObject *parent, const QStringList &);
virtual ~RGBU16Plugin(); virtual ~RGBU16Plugin();
}; };
......
...@@ -43,10 +43,9 @@ typedef KGenericFactory<RGBPlugin> RGBPluginFactory; ...@@ -43,10 +43,9 @@ typedef KGenericFactory<RGBPlugin> RGBPluginFactory;
K_EXPORT_COMPONENT_FACTORY( kritargbplugin, RGBPluginFactory( "krita" ) ) K_EXPORT_COMPONENT_FACTORY( kritargbplugin, RGBPluginFactory( "krita" ) )
RGBPlugin::RGBPlugin(QObject *parent, const char *name, const QStringList &) RGBPlugin::RGBPlugin(QObject *parent, const QStringList &)
: KParts::Plugin(parent) : KParts::Plugin(parent)
{ {
setObjectName(name);
setInstance(RGBPluginFactory::instance()); setInstance(RGBPluginFactory::instance());
if ( parent->inherits("KisColorSpaceFactoryRegistry") ) if ( parent->inherits("KisColorSpaceFactoryRegistry") )
......
...@@ -28,7 +28,7 @@ class RGBPlugin : public KParts::Plugin ...@@ -28,7 +28,7 @@ class RGBPlugin : public KParts::Plugin
{ {
Q_OBJECT Q_OBJECT
public: public:
RGBPlugin(QObject *parent, const char *name, const QStringList &); RGBPlugin(QObject *parent, const QStringList &);
virtual ~RGBPlugin(); virtual ~RGBPlugin();
}; };
......
...@@ -51,7 +51,7 @@ KisFilterRegistry::KisFilterRegistry() ...@@ -51,7 +51,7 @@ KisFilterRegistry::KisFilterRegistry()
KService::Ptr service = *iter; KService::Ptr service = *iter;
int errCode = 0; int errCode = 0;
KParts::Plugin* plugin = KParts::Plugin* plugin =
KParts::ComponentFactory::createInstanceFromService<KParts::Plugin> ( service, this, 0, QStringList(), &errCode); KParts::ComponentFactory::createInstanceFromService<KParts::Plugin> ( service, this, QStringList(), &errCode);
if ( plugin ) if ( plugin )
kDebug(DBG_AREA_PLUGINS) << "found plugin " << service->property("Name").toString() << "\n"; kDebug(DBG_AREA_PLUGINS) << "found plugin " << service->property("Name").toString() << "\n";
else { else {
......
...@@ -54,7 +54,7 @@ KisPaintOpRegistry::KisPaintOpRegistry() ...@@ -54,7 +54,7 @@ KisPaintOpRegistry::KisPaintOpRegistry()
KService::Ptr service = *iter; KService::Ptr service = *iter;
int errCode = 0; int errCode = 0;
KParts::Plugin* plugin = KParts::Plugin* plugin =
KParts::ComponentFactory::createInstanceFromService<KParts::Plugin> ( service, this, 0, QStringList(), &errCode); KParts::ComponentFactory::createInstanceFromService<KParts::Plugin> ( service, this, QStringList(), &errCode);
if ( plugin ) if ( plugin )
kDebug(41006) << "found plugin " << service->property("Name").toString() << "\n"; kDebug(41006) << "found plugin " << service->property("Name").toString() << "\n";
else { else {
......
...@@ -78,7 +78,7 @@ KisColorSpaceFactoryRegistry::KisColorSpaceFactoryRegistry(QStringList profileFi ...@@ -78,7 +78,7 @@ KisColorSpaceFactoryRegistry::KisColorSpaceFactoryRegistry(QStringList profileFi
KService::Ptr service = *iter; KService::Ptr service = *iter;
int errCode = 0; int errCode = 0;
KParts::Plugin* plugin = KParts::Plugin* plugin =
KParts::ComponentFactory::createInstanceFromService<KParts::Plugin> ( service, this, 0, QStringList(), &errCode); KParts::ComponentFactory::createInstanceFromService<KParts::Plugin> ( service, this, QStringList(), &errCode);
if ( plugin ) if ( plugin )
kDebug(DBG_AREA_PLUGINS) << "found colorspace " << service->property("Name").toString() << "\n"; kDebug(DBG_AREA_PLUGINS) << "found colorspace " << service->property("Name").toString() << "\n";
else { else {
......
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
#include <koFrameButton.h> #include <koFrameButton.h>
#include <kactioncollection.h> #include <kactioncollection.h>
#include <kactionclasses.h> #include <kactionclasses.h>
#include <k3widgetaction.h>
#include "kis_resourceserver.h" #include "kis_resourceserver.h"
#include "kis_controlframe.h" #include "kis_controlframe.h"
...@@ -109,7 +110,7 @@ KisControlFrame::KisControlFrame( KMainWindow * /*window*/, KisView * view, cons ...@@ -109,7 +110,7 @@ KisControlFrame::KisControlFrame( KMainWindow * /*window*/, KisView * view, cons
m_brushWidget->setText( i18n("Brush Shapes") ); m_brushWidget->setText( i18n("Brush Shapes") );
m_brushWidget->setToolTip( i18n("Brush Shapes") ); m_brushWidget->setToolTip( i18n("Brush Shapes") );
// XXX: An action without a slot -- that's silly, what kind of action could we use here? // XXX: An action without a slot -- that's silly, what kind of action could we use here?
KAction * action = new KWidgetAction(m_brushWidget, KAction * action = new K3WidgetAction(m_brushWidget,
i18n("&Brush"), i18n("&Brush"),
0, 0,
view, view,
...@@ -121,7 +122,7 @@ KisControlFrame::KisControlFrame( KMainWindow * /*window*/, KisView * view, cons ...@@ -121,7 +122,7 @@ KisControlFrame::KisControlFrame( KMainWindow * /*window*/, KisView * view, cons
m_patternWidget = new KisIconWidget(view, "patterns"); m_patternWidget = new KisIconWidget(view, "patterns");
m_patternWidget->setText( i18n("Fill Patterns") ); m_patternWidget->setText( i18n("Fill Patterns") );
m_patternWidget->setToolTip( i18n("Fill Patterns") ); m_patternWidget->setToolTip( i18n("Fill Patterns") );
action = new KWidgetAction(m_patternWidget, action = new K3WidgetAction(m_patternWidget,
i18n("&Patterns"), i18n("&Patterns"),
0, 0,
view, view,
...@@ -132,7 +133,7 @@ KisControlFrame::KisControlFrame( KMainWindow * /*window*/, KisView * view, cons ...@@ -132,7 +133,7 @@ KisControlFrame::KisControlFrame( KMainWindow * /*window*/, KisView * view, cons
m_gradientWidget = new KisIconWidget(view, "gradients"); m_gradientWidget = new KisIconWidget(view, "gradients");
m_gradientWidget->setText( i18n("Gradients") ); m_gradientWidget->setText( i18n("Gradients") );
m_gradientWidget->setToolTip( i18n("Gradients") ); m_gradientWidget->setToolTip( i18n("Gradients") );
action = new KWidgetAction(m_gradientWidget, action = new K3WidgetAction(m_gradientWidget,
i18n("&Gradients"), i18n("&Gradients"),
0, 0,
view, view,
...@@ -141,7 +142,7 @@ KisControlFrame::KisControlFrame( KMainWindow * /*window*/, KisView * view, cons ...@@ -141,7 +142,7 @@ KisControlFrame::KisControlFrame( KMainWindow * /*window*/, KisView * view, cons
"gradients"); "gradients");
m_paintopBox = new KisPaintopBox( view, view, "paintopbox" ); m_paintopBox = new KisPaintopBox( view, view, "paintopbox" );
action = new KWidgetAction(m_paintopBox, action = new K3WidgetAction(m_paintopBox,
i18n("&Painter's Tools"), i18n("&Painter's Tools"),
0, 0,
view, view,
......
...@@ -76,13 +76,13 @@ KisFactory::~KisFactory() ...@@ -76,13 +76,13 @@ KisFactory::~KisFactory()
* Create the document * Create the document
*/ */
KParts::Part* KisFactory::createPartObject( QWidget *parentWidget, KParts::Part* KisFactory::createPartObject( QWidget *parentWidget,
const char *widgetName, QObject* parent, QObject* parent,
const char* name, const char* classname, const QStringList & ) const char* classname, const QStringList & )
{ {
bool bWantKoDocument = ( strcmp( classname, "KoDocument" ) == 0 ); bool bWantKoDocument = ( strcmp( classname, "KoDocument" ) == 0 );
KisDoc *doc = new KisDoc( parentWidget, KisDoc *doc = new KisDoc( parentWidget,
widgetName, parent, name, !bWantKoDocument ); 0, parent, 0, !bWantKoDocument );
Q_CHECK_PTR(doc); Q_CHECK_PTR(doc);
if ( !bWantKoDocument ) if ( !bWantKoDocument )
...@@ -100,7 +100,7 @@ KAboutData* KisFactory::aboutData() ...@@ -100,7 +100,7 @@ KAboutData* KisFactory::aboutData()
KInstance* KisFactory::instance() KInstance* KisFactory::instance()
{ {
QString homedir = getenv("HOME"); QString homedir = getenv("HOME");
if ( !s_instance ) if ( !s_instance )
{ {
s_instance = new KInstance(s_aboutData); s_instance = new KInstance(s_aboutData);
...@@ -122,7 +122,7 @@ KInstance* KisFactory::instance() ...@@ -122,7 +122,7 @@ KInstance* KisFactory::instance()
s_instance->dirs()->addResourceType("kis_brushes", KStandardDirs::kde_default("data") + "krita/brushes/"); s_instance->dirs()->addResourceType("kis_brushes", KStandardDirs::kde_default("data") + "krita/brushes/");
s_instance->dirs()->addResourceDir("kis_brushes", "/usr/share/create/brushes/gimp"); s_instance->dirs()->addResourceDir("kis_brushes", "/usr/share/create/brushes/gimp");
s_instance->dirs()->addResourceDir("kis_brushes", QDir::homePath() + QString("/.create/brushes/gimp")); s_instance->dirs()->addResourceDir("kis_brushes", QDir::homePath() + QString("/.create/brushes/gimp"));
s_instance->dirs()->addResourceType("kis_patterns", KStandardDirs::kde_default("data") + "krita/patterns/"); s_instance->dirs()->addResourceType("kis_patterns", KStandardDirs::kde_default("data") + "krita/patterns/");
s_instance->dirs()->addResourceDir("kis_patterns", "/usr/share/create/patterns/gimp"); s_instance->dirs()->addResourceDir("kis_patterns", "/usr/share/create/patterns/gimp");
s_instance->dirs()->addResourceDir("kis_patterns", QDir::homePath() + QString("/.create/patterns/gimp")); s_instance->dirs()->addResourceDir("kis_patterns", QDir::homePath() + QString("/.create/patterns/gimp"));
...@@ -130,7 +130,7 @@ KInstance* KisFactory::instance() ...@@ -130,7 +130,7 @@ KInstance* KisFactory::instance()
s_instance->dirs()->addResourceType("kis_gradients", KStandardDirs::kde_default("data") + "krita/gradients/"); s_instance->dirs()->addResourceType("kis_gradients", KStandardDirs::kde_default("data") + "krita/gradients/");
s_instance->dirs()->addResourceDir("kis_gradients", "/usr/share/create/gradients/gimp"); s_instance->dirs()->addResourceDir("kis_gradients", "/usr/share/create/gradients/gimp");
s_instance->dirs()->addResourceDir("kis_gradients", QDir::homePath() + QString("/.create/gradients/gimp")); s_instance->dirs()->addResourceDir("kis_gradients", QDir::homePath() + QString("/.create/gradients/gimp"));
s_instance->dirs()->addResourceType("kis_profiles", KStandardDirs::kde_default("data") + "krita/profiles/"); s_instance->dirs()->addResourceType("kis_profiles", KStandardDirs::kde_default("data") + "krita/profiles/");
s_instance->dirs()->addResourceDir("kis_profiles", "/usr/share/color/icc"); s_instance->dirs()->addResourceDir("kis_profiles", "/usr/share/color/icc");
s_instance->dirs()->addResourceDir("kis_profiles", QDir::homePath() + QString("/.icc")); s_instance->dirs()->addResourceDir("kis_profiles", QDir::homePath() + QString("/.icc"));
......
...@@ -41,9 +41,7 @@ public: ...@@ -41,9 +41,7 @@ public:
~KisFactory(); ~KisFactory();
virtual KParts::Part *createPartObject(QWidget *parentWidget = 0, virtual KParts::Part *createPartObject(QWidget *parentWidget = 0,
const char *widgetName = 0,
QObject *parent = 0, QObject *parent = 0,
const char *name = 0,
const char *classname = "KoDocument", const char *classname = "KoDocument",
const QStringList &args = QStringList() ); const QStringList &args = QStringList() );
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include <qradiobutton.h> #include <qradiobutton.h>
#include <kaction.h> #include <kaction.h>
#include <ktoggleaction.h>
#include <kdialogbase.h> #include <kdialogbase.h>
#include <klocale.h> #include <klocale.h>
......
...@@ -48,7 +48,7 @@ KisToolRegistry::KisToolRegistry() ...@@ -48,7 +48,7 @@ KisToolRegistry::KisToolRegistry()
KService::Ptr service = *iter; KService::Ptr service = *iter;
int errCode = 0; int errCode = 0;
KParts::Plugin* plugin = KParts::Plugin* plugin =
KParts::ComponentFactory::createInstanceFromService<KParts::Plugin> ( service, this, 0, QStringList(), &errCode); KParts::ComponentFactory::createInstanceFromService<KParts::Plugin> ( service, this, QStringList(), &errCode);
if ( plugin ) if ( plugin )
kDebug(DBG_AREA_PLUGINS) << "found plugin " << service->property("Name").toString() << "\n"; kDebug(DBG_AREA_PLUGINS) << "found plugin " << service->property("Name").toString() << "\n";
else { else {
......
...@@ -341,7 +341,7 @@ KisView::KisView(KisDoc *doc, KisUndoAdapter *adapter, QWidget *parent, const ch ...@@ -341,7 +341,7 @@ KisView::KisView(KisDoc *doc, KisUndoAdapter *adapter, QWidget *parent, const ch
KService::Ptr service = *iter; KService::Ptr service = *iter;
int errCode = 0; int errCode = 0;
KParts::Plugin* plugin = KParts::Plugin* plugin =
KParts::ComponentFactory::createInstanceFromService<KParts::Plugin> ( service, this, 0, QStringList(), &errCode); KParts::ComponentFactory::createInstanceFromService<KParts::Plugin> ( service, this, QStringList(), &errCode);
if ( plugin ) { if ( plugin ) {
kDebug(41006) << "found plugin " << service->property("Name").toString() << "\n"; kDebug(41006) << "found plugin " << service->property("Name").toString() << "\n";
insertChildClient(plugin); insertChildClient(plugin);
......
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