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