[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwrite-devel
Subject:    Re: KDE/kdelibs
From:       Dominik Haumann <dhdev () gmx ! de>
Date:       2007-09-16 22:25:21
Message-ID: 200709170025.21611.dhdev () gmx ! de
[Download RAW message or body]

On Monday 17 September 2007, Dominik Haumann wrote:
> SVN commit 713276 by dhaumann:
>
> katepart
> * remove kpluginselector fork
didn't do anything anyway yet.


With regard to the other thrad: The attached patch removes the functions 
which need te be removed to make this work. I'll commit today if there are 
no objections.

Dominik

["ktexteditor-adaption.diff" (text/x-diff)]

Index: interfaces/ktexteditor/plugin.h
===================================================================
--- interfaces/ktexteditor/plugin.h	(Revision 713276)
+++ interfaces/ktexteditor/plugin.h	(Arbeitskopie)
@@ -51,15 +51,8 @@
  *
  * \section plugin_config Configuration Management
  *
- * If your plugin supports a config dialog overwrite configDialogSupported()
- * and return \e true (The default implementation returns \e false and
- * indicates that the plugin does not support a config dialog). The config
- * dialog can be shown by calling configDialog(), it can also be called from
- * a KTextEditor implementation (e.g. the KTextEditor implementation might
- * have a listview that shows all available plugins along with a
- * \e Configure... button). To save or load plugin settings writeConfig() and
- * readConfig() is called by the Editor part. Usually you do not have to call
- * readConfig() and writeConfig() yourself.
+ * @todo write docu about config pages
+ * @todo write docu about save/load settings
  *
  * \section plugin_sessions Session Management
  *
@@ -192,52 +185,6 @@
      */
     virtual void removeView (View *view) { Q_UNUSED(view); }
 
-  /*
-   * Configuration management.
-   * Default implementation just for convenience, does nothing
-   * and says this plugin supports no config dialog.
-   */
-  public:
-    /**
-     * Read the editor configuration from the KConfig \p config.
-     * If \p config is NULL you can kapp->config() as fallback solution.
-     * readConfig() is called from the Editor implementation, so you
-     * never have to call it yourself.
-     *
-     * \param config config object
-     * \see writeConfig()
-     */
-    virtual void readConfig (KConfig *config = 0) { Q_UNUSED(config); }
-
-    /**
-     * Write the editor configuration to the KConfig \p config.
-     * If \p config is NULL you can kapp->config() as fallback solution.
-     * writeConfig() is called from the Editor implementation, so you
-     * never have to call it yourself.
-     *
-     * \param config config object
-     * \see readConfig()
-     */
-    virtual void writeConfig (KConfig *config = 0) { Q_UNUSED(config); }
-
-    /**
-     * Check, whether the plugin has support for a config dialog.
-     * \return \e true, if the plugin has a config dialog, otherwise \e false
-     * \see configDialog()
-     */
-    virtual bool configDialogSupported () const { return false; }
-
-    /**
-     * Show the config dialog for the plugin.
-     * Changes should be applied to the plugin, but not saved to the disk
-     * immediately. writeConfig() is called by the Editor implementation to
-     * save the plugin's settings, e.g. when a plugin is unloaded.
-     *
-     * \param parent parent widget
-     * \see configDialogSupported()
-     */
-    virtual void configDialog (QWidget *parent) { Q_UNUSED(parent); }
-
   private:
     class PluginPrivate* const d;
 };
Index: kate/utils/katepluginmanager.cpp
===================================================================
--- kate/utils/katepluginmanager.cpp	(Revision 713276)
+++ kate/utils/katepluginmanager.cpp	(Arbeitskopie)
@@ -185,17 +185,12 @@
 
   item.plugin = KTextEditor::createPlugin (item.service, this);
   item.load = (item.plugin != 0);
-  if (item.plugin)
-    item.plugin->readConfig(m_config);
 }
 
 void KatePluginManager::unloadPlugin (KatePluginInfo &item)
 {
-  if (item.plugin) {
-    item.plugin->writeConfig(m_config);
-    delete item.plugin;
-    item.plugin = 0L;
-  }
+  delete item.plugin;
+  item.plugin = 0L;
   item.load = false;
 }
 


_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic