]> Git trees. - libqmvoc.git/commitdiff
misc stuff, like explicit for constructors, constness, pass-by-const-ref, etc
authorPino Toscano <pino@kde.org>
Wed, 28 Feb 2007 23:21:15 +0000 (23:21 +0000)
committerPino Toscano <pino@kde.org>
Wed, 28 Feb 2007 23:21:15 +0000 (23:21 +0000)
svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=638143

kdeeducore/keduvocdocument.cpp
kdeeducore/keduvocdocument.h
kdeeducore/keduvocexpression.h
kdeeducore/keduvocpaukerreader.cpp
kdeeducore/leitnerbox.cpp
kdeeducore/leitnerbox.h

index f00b3a087845ccba839ea68b56c843981aaa0ace..31cd4b0658cbe96ff83d498171d62c7e501f942e 100644 (file)
@@ -856,7 +856,7 @@ QList<int> KEduVocDocument::lessonsInQuery() const
 }
 
 
-void KEduVocDocument::setLessonsInQuery(QList<int> lesson_iq)
+void KEduVocDocument::setLessonsInQuery(const QList<int> &lesson_iq)
 {
   d->m_lessonsInQuery.clear();
   for (int i = 0; i < d->m_lessonDescriptions.count(); i++)
index 9b4ea55d3a441829933cbbc39014448f110baa36..51a7f9895aa0d68641e91025cb84f8bc345ef22e 100644 (file)
@@ -657,7 +657,7 @@ public:
   /**
    * Sets the lessons in the current query
    */
-  void setLessonsInQuery(QList<int>);
+  void setLessonsInQuery(const QList<int> &lesson_iq);
 
   QStringList lessonDescriptions() const;
 
index 0985188b89356f62f9c7758cc547adf0a506bb47..43e937086f5a9c1666edeff8795807fb55a146d1 100644 (file)
@@ -70,14 +70,14 @@ public:
 
   /** default constructor for an empty vocabulary expression
    */
-  KEduVocExpression();
+  explicit KEduVocExpression();
 
   /** Constructor for a vocabulary expression with an original
    *
    * @param expression       original
    * @param lesson           lesson number, 0 for none
    */
-  KEduVocExpression(const QString & expression, int lesson = 0);
+  explicit KEduVocExpression(const QString & expression, int lesson = 0);
 
   /** Constructor for a vocabulary expression with an original and one or more translations
    *
index a79e5d399d106664879a2b4320444699eae0c889..c596b52397d764e6909f57000229cbf5f708ca23 100644 (file)
@@ -75,6 +75,6 @@ QString KEduVocPaukerReader::cardText(const QDomNode & entry, const QString & ta
   if(!element.isNull())
     return element.text();
   else
-    return QString::null;
+    return QString();
 }
 
index a96d7c49eefb9e163780629a000bc74d21109c42..eef1e5d0adc3201d6f25795370f53dbb5d7065eb 100644 (file)
@@ -20,7 +20,7 @@ LeitnerBox::~LeitnerBox()
 {
 }
 
-int LeitnerBox::vocabCount()
+int LeitnerBox::vocabCount() const
 {
        return m_vocabCount;
 }
index 1767eb73a3aa67b37f88e10832d58a1a2efb89a2..7e74413b0f805d843c74f2a282fa59caf7658622 100644 (file)
@@ -39,7 +39,7 @@ public:
        /**
         * The constructor
         */
-       LeitnerBox();
+       explicit LeitnerBox();
 
        /**
         * The destructor
@@ -81,7 +81,7 @@ public:
         * Returns the current vocabCount
         * @return the number of cards/ vocabs that are currently assigned to the LeitnerBox.
         */
-       int vocabCount();
+       int vocabCount() const;
 
        /**
         * Returns a pointer to the LeitnerBox correct cards of this LeitnerBox here are assigned to