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

List:       kde-commits
Subject:    KDE/kdelibs/kparts/tests
From:       Alex Merry <huntedhacker () tiscali ! co ! uk>
Date:       2007-09-01 23:46:10
Message-ID: 1188690370.374075.7239.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 707490 by alexmerry:

KLibFactory => KPluginFactory



 M  +3 -3      CMakeLists.txt  
 M  +4 -1      notepad.cpp  
 M  +1 -1      notepad.desktop  
 M  +1 -3      notepad.h  
 D             notepadpart.cpp  
 M  +1 -1      plugin_foobar.rc  
 M  +3 -3      plugin_spellcheck.cpp  
 M  +3 -3      plugin_spellcheck.h  
 M  +1 -1      plugin_spellcheck.rc  


--- trunk/KDE/kdelibs/kparts/tests/CMakeLists.txt #707489:707490
@@ -46,7 +46,7 @@
 set(spellcheckplugin_PART_SRCS plugin_spellcheck.cpp )
 
 
-kde4_add_plugin(spellcheckplugin WITH_PREFIX ${spellcheckplugin_PART_SRCS})
+kde4_add_plugin(spellcheckplugin ${spellcheckplugin_PART_SRCS})
 
 target_link_libraries(spellcheckplugin  ${KDE4_KPARTS_LIBS} )
 
@@ -55,10 +55,10 @@
 
 ########### next target ###############
 
-set(notepadpart_PART_SRCS notepadpart.cpp notepad.cpp)
+set(notepadpart_PART_SRCS notepad.cpp)
 
 
-kde4_add_plugin(notepadpart WITH_PREFIX ${notepadpart_PART_SRCS})
+kde4_add_plugin(notepadpart ${notepadpart_PART_SRCS})
 
 target_link_libraries(notepadpart  ${KDE4_KPARTS_LIBS} )
 set_target_properties(notepadpart PROPERTIES COMPILE_FLAGS \
                -DKDESRCDIR="\\"${CMAKE_CURRENT_SOURCE_DIR}\\"")
--- trunk/KDE/kdelibs/kparts/tests/notepad.cpp #707489:707490
@@ -17,9 +17,12 @@
 #include <kstatusbar.h>
 #include <kstandarddirs.h>
 
+K_PLUGIN_FACTORY(NotepadFactory, registerPlugin<NotepadPart>();)
+K_EXPORT_PLUGIN(NotepadFactory("notepadpart"))
+
 NotepadPart::NotepadPart( QWidget* parentWidget,
                           QObject* parent,
-                          const QStringList& )
+                          const QVariantList& )
  : KParts::ReadWritePart( parent )
 {
   setComponentData( NotepadFactory::componentData() );
--- trunk/KDE/kdelibs/kparts/tests/notepad.desktop #707489:707490
@@ -67,5 +67,5 @@
 Name[zh_TW]=記事本(範例)
 MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-c \
hdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
  ServiceTypes=KParts/ReadOnlyPart
-X-KDE-Library=libnotepadpart
+X-KDE-Library=notepadpart
 Type=Service
--- trunk/KDE/kdelibs/kparts/tests/notepad.h #707489:707490
@@ -19,7 +19,7 @@
 public:
   NotepadPart( QWidget* parentWidget,
                QObject* parent,
-               const QStringList& args = QStringList() );
+               const QVariantList& args = QVariantList() );
   virtual ~NotepadPart();
 
   virtual void setReadWrite( bool rw );
@@ -37,6 +37,4 @@
   QTextEdit * m_edit;
 };
 
-typedef KParts::GenericFactory<NotepadPart> NotepadFactory;
-
 #endif
--- trunk/KDE/kdelibs/kparts/tests/plugin_foobar.rc #707489:707490
@@ -1,5 +1,5 @@
 <!DOCTYPE kpartplugin>
-<kpartplugin library="libfoobar">
+<kpartplugin library="foobar">
 <MenuBar>
  <Menu name="file"><Text>&amp;File</Text>
   <Action name="searchreplace"/>
--- trunk/KDE/kdelibs/kparts/tests/plugin_spellcheck.cpp #707489:707490
@@ -9,7 +9,7 @@
 #include <kdebug.h>
 
 PluginSpellCheck::PluginSpellCheck( QObject* parent,
-                                    const QStringList& )
+                                    const QVariantList& )
     : Plugin( parent )
 {
     KAction* act = new KAction( "&Select current line (plugin)", this );
@@ -35,7 +35,7 @@
     }
 }
 
-K_EXPORT_COMPONENT_FACTORY( libspellcheckplugin,
-                            KGenericFactory<PluginSpellCheck> )
+K_PLUGIN_FACTORY(PluginSpellCheckFactory, registerPlugin<PluginSpellCheck>();)
+K_EXPORT_PLUGIN(PluginSpellCheckFactory("spellcheckplugin"))
 
 #include <plugin_spellcheck.moc>
--- trunk/KDE/kdelibs/kparts/tests/plugin_spellcheck.h #707489:707490
@@ -1,5 +1,5 @@
-#ifndef __plugin_spellcheck_h
-#define __plugin_spellcheck_h
+#ifndef plugin_spellcheck_h
+#define plugin_spellcheck_h
 
 #include <kparts/plugin.h>
 
@@ -8,7 +8,7 @@
     Q_OBJECT
 public:
     PluginSpellCheck( QObject* parent = 0,
-                      const QStringList& = QStringList() );
+                      const QVariantList& = QVariantList() );
     virtual ~PluginSpellCheck();
 
 public Q_SLOTS:
--- trunk/KDE/kdelibs/kparts/tests/plugin_spellcheck.rc #707489:707490
@@ -1,5 +1,5 @@
 <!DOCTYPE kpartplugin>
-<kpartplugin library="libspellcheckplugin">
+<kpartplugin library="spellcheckplugin">
 <MenuBar>
  <Menu name="edit"><Text>&amp;Edit</Text>
   <Action name="spellcheck"/>


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

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