]> Git trees. - libqmvoc.git/commitdiff
made SharedKvtmlFiles into a namespace so you can call SharedKvtmlFiles::languages...
authorJeremy Paul Whiting <jpwhiting@kde.org>
Mon, 25 Jun 2007 19:25:35 +0000 (19:25 +0000)
committerJeremy Paul Whiting <jpwhiting@kde.org>
Mon, 25 Jun 2007 19:25:35 +0000 (19:25 +0000)
svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=680263

kdeeducore/sharedkvtmlfiles.cpp
kdeeducore/sharedkvtmlfiles.h

index 5bbef405e283a16696aaf6b225e02080d969e67a..595473695682ed3385cb8c4df9b28e4f802ce221 100644 (file)
@@ -38,8 +38,6 @@ class SharedKvtmlFilesPrivate
        {
        }
        
-       SharedKvtmlFiles instance;
-       
        /** scan the folder for documents, and record what is found */
        void rescan();
 
@@ -58,20 +56,6 @@ class SharedKvtmlFilesPrivate
 
 K_GLOBAL_STATIC(SharedKvtmlFilesPrivate, sharedKvtmlFilesPrivate)
 
-SharedKvtmlFiles *SharedKvtmlFiles::self()
-{
-    // returns the singleton; automatically creates a new instance if that has not happened yet.
-    return &sharedKvtmlFilesPrivate->instance;
-}
-
-SharedKvtmlFiles::SharedKvtmlFiles()
-{
-}
-
-SharedKvtmlFiles::~SharedKvtmlFiles()
-{
-}
-
 void SharedKvtmlFilesPrivate::rescan()
 {
        this->m_titleList.clear();
index 50fbfed9152df6aa871f6d795e8b5454fc915367..02f14cc59f309c7ce66e7bba59a8048412830eba 100644 (file)
@@ -35,43 +35,32 @@ class SharedKvtmlFilesPrivate;
  *about files found there
  *@author Jeremy Whiting
  */
-class KDEEDUCORE_EXPORT SharedKvtmlFiles
+namespace SharedKvtmlFiles
 {
-  friend class SharedKvtmlFilesPrivate;
-  public:
-    /** singleton accessor */
-    static SharedKvtmlFiles *self();
-
     /** get list of all languages found in any files */
-    QStringList languages();
-       
-       /** get list of filenames found of given language 
-        *@param language language requested QString() for all languages
-        *@return a list of filenames with words in language
-        */
-    QStringList fileNames(const QString &language = QString());
+    KDEEDUCORE_EXPORT QStringList languages();
+
+    /** get list of filenames found of given language 
+     *@param language language requested QString() for all languages
+     *@return a list of filenames with words in language
+     */
+    KDEEDUCORE_EXPORT QStringList fileNames(const QString &language = QString());
 
     /** get the list of document titles found of a given language
-         *@param language requested language QString() for all titles
-         *@return a list of document titles with words in language
-         */
-       QStringList titles(const QString &language = QString());
-       
-       /** get the list of document remarts found of a given language
-         *@param language requested language QString() for all comments
-         *@return a list of document remarks with words in language
-         */
-       QStringList comments(const QString &language = QString());
+     *@param language requested language QString() for all titles
+     *@return a list of document titles with words in language
+     */
+    KDEEDUCORE_EXPORT QStringList titles(const QString &language = QString());
+
+    /** get the list of document remarts found of a given language
+     *@param language requested language QString() for all comments
+     *@return a list of document remarks with words in language
+     */
+    KDEEDUCORE_EXPORT QStringList comments(const QString &language = QString());
 
-       /** rescan the shared kvtml locations */
-       void rescan();
+    /** rescan the shared kvtml locations */
+    KDEEDUCORE_EXPORT void rescan();
 
-  private:
-    /** default contstuctor */
-    SharedKvtmlFiles();
-       
-       /** default destructor */
-    ~SharedKvtmlFiles();
 };
 
 #endif