]> Git trees. - libqmvoc.git/commitdiff
Remove enable sorting option which is not applicable any more. Used nowhere.
authorFrederik Gladhorn <gladhorn@kde.org>
Wed, 29 Aug 2007 13:21:39 +0000 (13:21 +0000)
committerFrederik Gladhorn <gladhorn@kde.org>
Wed, 29 Aug 2007 13:21:39 +0000 (13:21 +0000)
Was not even written in newer docs.

svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=706115

keduvocdocument/keduvocdocument.cpp
keduvocdocument/keduvocdocument.h
keduvocdocument/keduvockvtmlreader.cpp
keduvocdocument/keduvockvtmlwriter.cpp

index 2d3c9f84297f0d2db0480cfd239211cbe3c7298e..87177e8073d1ca509e679b14cc5ddc34f0b2189a 100644 (file)
@@ -68,7 +68,6 @@ public:
   KUrl                      m_url;
   QList<bool>               m_sortIdentifier;
   bool                      m_sortLesson;
-  bool                      m_sortingEnabled;
 
   // save these to document
   QStringList               m_identifiers;      //0= origin, 1,.. translations
@@ -91,6 +90,11 @@ public:
   QString                   m_version;
   QString                   m_csvDelimiter;
 
+  /** Categories that can later be used to sork kvtml files:
+    * language, music, children, anatomy
+    */
+  QString                   m_category;
+
   QList<KEduVocArticle>     m_articles;
   QList<KEduVocConjugation> m_conjugations;
 
@@ -115,7 +119,6 @@ void KEduVocDocument::KEduVocDocumentPrivate::init()
   m_sizeHints.clear();
   m_vocabulary.clear();
   m_dirty = false;
-  m_sortingEnabled = true;
   m_sortLesson = false;
   m_currentLesson = 0;
   m_queryorg = "";
@@ -812,18 +815,6 @@ void KEduVocDocument::setOriginalIdentifier(const QString &id)
 }
 
 
-void KEduVocDocument::setSortingEnabled(bool enable)
-{
-  d->m_sortingEnabled = enable;
-}
-
-
-bool KEduVocDocument::isSortingEnabled() const
-{
-  return d->m_sortingEnabled;
-}
-
-
 bool KEduVocDocument::isModified() const
 {
   return d->m_dirty;
index 8f83321fdb40bc6a143a8324bae75a78fcf46539..cc218f366915657a3b3b6a9450b782c67bf2ae06 100644 (file)
@@ -109,14 +109,6 @@ public:
   /** @returns the modification state of the doc */
   bool isModified() const;
 
-  /**
-   * Enables sorting
-   */
-  void setSortingEnabled(bool enable);
-
-  /** @returns whether sorting is enabled */
-  bool isSortingEnabled() const;
-
   /**
    * Sets the URL of the XML file
    */
@@ -125,11 +117,13 @@ public:
   /** @returns the URL of the XML file */
   KUrl url() const;
 
-  /** set the title of the XML file
+
+
+  /** set the title of the file
    * @param title title to set */
   void setTitle(const QString & title);
 
-  /** @returns the title of the XML file */
+  /** @returns the title of the file */
   QString title() const;
 
   /** set the author of the file
index b6947d685bfeda193789809725289bbb1452d131..35f9427e003c2a183444634f350740d09fba6434 100644 (file)
@@ -148,12 +148,6 @@ bool KEduVocKvtmlReader::readBody(QDomElement &domElementParent)
       return false;
   }
 
-  currentElement = domElementParent.firstChildElement(KV_OPTION_GRP);
-  if (!currentElement.isNull()) {
-    result = readOptions(currentElement);
-    if (!result)
-      return false;
-  }
 
   // initialize the list of predefined types
   m_doc->wordTypes()->createDefaultWordTypes();
@@ -617,25 +611,6 @@ bool KEduVocKvtmlReader::readConjug(QDomElement &domElementParent, QList<KEduVoc
 }
 
 
-bool KEduVocKvtmlReader::readOptions(QDomElement &domElementParent)
-{
-  m_doc->setSortingEnabled(true);
-  QDomElement currentElement = domElementParent.firstChildElement(KV_OPT_SORT);
-  if (!currentElement.isNull()) {
-    QDomAttr attribute = currentElement.attributeNode(KV_BOOL_FLAG);
-    if (!attribute.isNull())
-    {
-      bool ok = true;
-      m_doc->setSortingEnabled(attribute.value().toInt(&ok));  // returns 0 if the conversion fails
-      if (!ok)
-        m_doc->setSortingEnabled(true);
-    }
-  }
-
-  return true;
-}
-
-
 bool KEduVocKvtmlReader::readType(QDomElement &domElementParent)
 {
   QString s;
index 551ff199e4f57defc17e66ff58f4b4d3db17706f..d893c1bb7bb1811680c57cf607004a258e25a3ce 100644 (file)
@@ -80,9 +80,6 @@ bool KEduVocKvtmlWriter::writeDoc(KEduVocDocument *doc, const QString &generator
       return false;
   }
 
-  if (!writeOption(domDoc, domElementKvtml))
-    return false;
-
   if (!writeType(domDoc, domElementKvtml))
     return false;
 
@@ -438,19 +435,6 @@ bool KEduVocKvtmlWriter::writeArticle(QDomDocument &domDoc, QDomElement &domElem
 }
 
 
-bool KEduVocKvtmlWriter::writeOption(QDomDocument &domDoc, QDomElement &domElementParent)
-{
-  QDomElement domElementOption = domDoc.createElement(KV_OPTION_GRP);
-  QDomElement domElementSort = domDoc.createElement(KV_OPT_SORT);
-
-  domElementSort.setAttribute(KV_BOOL_FLAG, (m_doc->isSortingEnabled()?1:0));
-  domElementOption.appendChild(domElementSort);
-
-  domElementParent.appendChild(domElementOption);
-  return true;
-}
-
-
 bool KEduVocKvtmlWriter::writeType(QDomDocument &domDoc, QDomElement &domElementParent)
 {
 /** @todo port to new type handling