Commit 90a97f7a authored by Christoph Cullmann's avatar Christoph Cullmann

let it run ;)

parent fd12769a
......@@ -84,21 +84,21 @@ class Editor;
* way the user can choose the editor implementation. The Factory itself is
* not needed to get the Editor with the help of the EditorChooser.
*
* \see KParts::Factory, KTextEditor::Editor
* \see KPluginFactory, KTextEditor::Editor
* \author Christoph Cullmann \<cullmann@kde.org\>
*/
class KTEXTEDITOR_EXPORT Factory : public KParts::Factory
class KTEXTEDITOR_EXPORT Factory : public KPluginFactory
{
Q_OBJECT
public:
/**
* Constructor.
* This constructor creates a factory for a plugin with the given \p componentName.
*
* Create a new Factory with \p parent.
* \param parent parent object
* \param componentName the component name of the plugin
* \param parent a parent object
*/
Factory ( QObject *parent );
explicit Factory (const char *componentName = 0, QObject *parent = 0);
/**
* Virtual destructor.
......
......@@ -59,8 +59,8 @@
using namespace KTextEditor;
Factory::Factory( QObject *parent )
: KParts::Factory( parent )
Factory::Factory (const char *componentName, QObject *parent)
: KPluginFactory ( componentName, parent )
, d(0)
{
}
......
......@@ -271,14 +271,10 @@ void KWrite::slotNew()
void KWrite::slotOpen()
{
const KEncodingFileDialog::Result r=KEncodingFileDialog::getOpenUrlsAndEncoding(KWriteApp::self()->editor()->defaultEncoding(), m_view->document()->url(),QString(),this,i18n("Open File"));
#if 0 // FIXME KF5
for (QUrl::List::ConstIterator i=r.URLs.constBegin(); i != r.URLs.constEnd(); ++i)
{
Q_FOREACH (QUrl url, r.URLs) {
encoding = r.encoding;
slotOpen ( *i );
slotOpen ( url );
}
#endif
}
void KWrite::slotOpen( const QUrl& url )
......
......@@ -142,7 +142,7 @@ KateDocument::KateDocument ( bool bSingleViewMode, bool bBrowserView,
m_readWriteStateBeforeLoading (false),
m_isUntitled(true)
{
setComponentData ( KateGlobal::self()->componentData () );
setComponentData ( *KateGlobal::self()->aboutData () );
/**
* avoid spamming plasma and other window managers with progress dialogs
......
......@@ -40,12 +40,13 @@ class KateFactory : public KTextEditor::Factory
public:
/**
* constructor, ref the editor, too keep it alive
* @param parent parent object
* @param name name of factory
* This constructor creates a factory for a plugin with the given \p componentName.
*
* \param componentName the component name of the plugin
* \param parent a parent object
*/
KateFactory ( QObject *parent = 0 )
: KTextEditor::Factory (parent)
explicit KateFactory (const char *componentName = 0, QObject *parent = 0)
: KTextEditor::Factory (componentName, parent)
{
KateGlobal::incRef ();
}
......@@ -60,16 +61,24 @@ class KateFactory : public KTextEditor::Factory
KTextEditor::Editor *editor () { return KateGlobal::self(); }
/**
* reimplemented create object method
* @param parentWidget parent widget
* @param parent QObject parent
* @param args additional arguments
* @return constructed part object
* This function is called when the factory asked to create an Object.
*
* You may reimplement it to provide a very flexible factory. This is especially useful to
* provide generic factories for plugins implemeted using a scripting language.
*
* \param iface The staticMetaObject::className() string identifying the plugin interface that
* was requested. E.g. for KCModule plugins this string will be "KCModule".
* \param parentWidget Only used if the requested plugin is a KPart.
* \param parent The parent object for the plugin object.
* \param args A plugin specific list of arbitrary arguments.
* \param keyword A string that uniquely identifies the plugin. If a KService is used this
* keyword is read from the X-KDE-PluginKeyword entry in the .desktop file.
*/
KParts::Part *createPartObject ( QWidget *parentWidget, QObject *parent, const char *_classname, const QStringList & )
virtual QObject *create(const char *iface, QWidget *parentWidget, QObject *parent, const QVariantList &args, const QString &keyword)
{
QByteArray classname( _classname );
QByteArray classname( iface );
// default to the kparts::* behavior of having one single widget() if the user don't requested a pure document
bool bWantSingleView = ( classname != "KTextEditor::Document" );
......
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