<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>117774</bug_id>
          
          <creation_ts>2005-12-06 08:56:09 +0000</creation_ts>
          <short_desc>Calculator doesn&apos;t do nothing</short_desc>
          <delta_ts>2005-12-30 10:54:47 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>kalzium</product>
          <component>Calculator</component>
          <version>unspecified</version>
          <rep_platform>Slackware</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Vito De Tullio">vito.detullio</reporter>
          <assigned_to name="Kalzium Developers">kalzium</assigned_to>
          
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>396030</commentid>
    <comment_count>0</comment_count>
    <who name="Vito De Tullio">vito.detullio</who>
    <bug_when>2005-12-06 08:56:09 +0000</bug_when>
    <thetext>Version:            (using KDE KDE 3.5.0)
Installed from:    Slackware Packages
OS:                Linux

If I try to calculate anything (from 2+2 to aH2O + bCO2 -&gt; cH2CO3) I got nothing.
Nor an error, nor the window I see in the help... I didn&apos;t see anything neither on the STDOUT!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>396073</commentid>
    <comment_count>1</comment_count>
    <who name="Davide Ferrari">vide80</who>
    <bug_when>2005-12-06 11:49:44 +0000</bug_when>
    <thetext>I can reproduce it on KDE 3.5.0 compiled from tarballs on Gentoo (so Kalzium 1.4.2)
There is no output at all, neither an error box. It seems that the Calculate button simply does nothing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>396100</commentid>
    <comment_count>2</comment_count>
    <who name="Pino Toscano">pino</who>
    <bug_when>2005-12-06 13:26:20 +0000</bug_when>
    <thetext>&gt; If I try to calculate anything (from 2+2 to aH2O + bCO2 -&gt; cH2CO3)


Wait. What are you trying to calculate, and where?
Kalzium has two types of calculators:
- one of them is in the sidebar and calculates the weight of a molecule (like 
C6H12O6)
- the other one (reachable from Tools-&gt;Equation Solver) solves equation like 
the last one you wrote (aH2O + bCO2 -&gt; cH2CO3). And this calculator solves 
prefectly this eqations, giving a=1, b=1 and c=1 as correct result.

So, I don&apos;t see any issue; otherwise, could you please be more precise?
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>396341</commentid>
    <comment_count>3</comment_count>
    <who name="Vito De Tullio">vito.detullio</who>
    <bug_when>2005-12-07 08:54:51 +0000</bug_when>
    <thetext>Well...
I can see just *ONE* calculator! (the one in the sidebar)
In Tools menu I can see just (from italian, re-translated to english) &quot;data diagram&quot; and &quot;glossary&quot;. No &quot;equation solver&quot; or something similar! This is strange!

As corncerns the sidebar calculator, if I enter just a molecule (like H2O or your C6H12O6) it runs smootly, but if I enter something else it does nothing. Coud be useful if kalzium pop up a &quot;error&quot; window, or something similar.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>396352</commentid>
    <comment_count>4</comment_count>
    <who name="Carsten Niehaus">cniehaus</who>
    <bug_when>2005-12-07 09:39:38 +0000</bug_when>
    <thetext>&gt;I can see just *ONE* calculator! (the one in the sidebar) 
&gt;In Tools menu I can see just (from italian, re-translated to english) &quot;data &gt;diagram&quot; and &quot;glossary&quot;. No &quot;equation solver&quot; or something similar! This is &gt;strange!

No, that is not strange. That is a &quot;bug&quot; in slackware: The new Kalzium is offering the new calculator only if on compiletime (!) OCamls and libfacile if found. You are using a binary version of Kalzium so you did nothing wrong. Please tell the Kalzium-packager of slackware that he needs to have ocaml and libfacile installed when configuring Kalzium. You can read this up in the README.packagers in Kalzium. Again: The two packages are *not* needed on runtime!
 
&gt;As corncerns the sidebar calculator, if I enter just a molecule (like H2O or &gt;your C6H12O6) it runs smootly, but if I enter something else it does nothing. &gt;Coud be useful if kalzium pop up a &quot;error&quot; window, or something similar.

What is &quot;something&quot; else? Please tell us exactly what is not working (which strings). You can only enter the symbols of existing elements.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>396387</commentid>
    <comment_count>5</comment_count>
    <who name="Vito De Tullio">vito.detullio</who>
    <bug_when>2005-12-07 12:43:11 +0000</bug_when>
    <thetext>My only problem in the molecular calculator is that it pass &quot;silently&quot; errors, and don&apos;d do anything if I enter wrong values such as &quot;H+H&quot; or, even worster, show &quot;partially right&quot; values if I enter &quot;H2ZO&quot; (it rekognize the &quot;H2&quot; part, and it show it&apos;s just H_2).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>396531</commentid>
    <comment_count>6</comment_count>
    <who name="Pino Toscano">pino</who>
    <bug_when>2005-12-07 19:50:50 +0000</bug_when>
    <thetext>&gt; if I enter wrong values such as &quot;H+H&quot;


Kalzium calculator is more a molecular weight measure than a really 
calculator, so that expression is not valid.

&gt; show &quot;partially right&quot; values if I enter &quot;H2ZO&quot; (it rekognize the &quot;H2&quot; part, 
&gt; and it show it&apos;s just H_2).


Ok, that one is a fault, and should be fixed, along with a notofication of the 
failed molecule parsing.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>402223</commentid>
    <comment_count>7</comment_count>
    <who name="">cniehaus</who>
    <bug_when>2005-12-29 13:59:06 +0000</bug_when>
    <thetext>Hi

In Kalzium you can calculate the molecular weight of a molecule. 

Calculate &quot;CO2Of&quot;. Of course there is no element &quot;f&quot;. The result is (on the 
shell)

kalzium: Found element C
kalzium: Found element O
kalzium: Weight of term = 12.0107
kalzium: [Element* MoleculeParser::lookupElement(const QString&amp;)] no such 
element: Of
kalzium: Weight of term = 31.9988
kalzium: Mass of CO2Of = 44.0095

The GUI presents 44.0095 as the result to the user. No errormessage. This is 
wrong for two reasons: 
1 - As the input was invalid there should be no result
2 - *If* we show a result it be neglect the &quot;f&quot; and display &quot;60.0089&quot; as a 
result because the would be correct for &quot;CO2O&quot;.


Now calculate &quot;CO2O&quot;:

kalzium: Found element C
kalzium: Found element O
kalzium: Weight of term = 12.0107
kalzium: Found element O
kalzium: Weight of term = 31.9988
kalzium: Weight of term = 15.9994
kalzium: Mass of CO2O = 60.0089

The result is correct and presented as 60.0089. 

Solution: Display a &quot;Invalid input&quot;-error.

Question 1: Is this the same as BUG 117774?
Question 2 (for the kde-i18n-folks): Would it be ok to display the new 
errormessage? I would introduce the new string today. I am not sure if this 
bugfix+new message would be covered by the current message-policy...

Carsten
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>402238</commentid>
    <comment_count>8</comment_count>
      <attachid>14063</attachid>
    <who name="Carsten Niehaus">cniehaus</who>
    <bug_when>2005-12-29 15:05:29 +0000</bug_when>
    <thetext>Created attachment 14063
Patch for this bug</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>402244</commentid>
    <comment_count>9</comment_count>
    <who name="">cniehaus</who>
    <bug_when>2005-12-29 15:37:45 +0000</bug_when>
    <thetext>Am Donnerstag, 29. Dezember 2005 15:05 schrieb Carsten Niehaus:
[bugs.kde.org quoted mail]

&gt; ------- Additional Comments From cniehaus kde org  2005-12-29 15:05 -------
&gt; Created an attachment (id=14063)
&gt;  --&gt; (http://bugs.kde.org/attachment.cgi?id=14063&amp;action=view)
&gt; Patch for this bug



This patch fixes both bugs: 

1: H2f       &lt;--  recoqnized as invalid input
2: Invalid input will be displayed as such

Ok to commit? This introduces one new string (i18n(&quot;Invalid input&quot;)

Carsten
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>402491</commentid>
    <comment_count>10</comment_count>
    <who name="">cniehaus</who>
    <bug_when>2005-12-30 10:54:46 +0000</bug_when>
    <thetext>SVN commit 492531 by cniehaus:

This fixes bug #117774 The calculator has two issues. First, it didn&apos;t
tell the user when the string was invalid (eg H2Ojdfkjd). Second,
it didn&apos;t stop calculating in some cases (H2g produces a different
error than H2Og, only the first stopped the calculation). With this commit
I am introducing a new string &quot;Invalid input&quot; which is displayed 
when the parser notices an error.
CCMAIL:kalzium@kde.org
BUG:117774


 M  +47 -43    molcalcwidget.cpp  
 M  +1 -0      molcalcwidget.h  
 M  +13 -6     moleculeparser.cpp  
 M  +3 -2      moleculeparser.h  


--- branches/KDE/3.5/kdeedu/kalzium/src/molcalcwidget.cpp #492530:492531
@@ -68,41 +68,53 @@
 
 void MolcalcWidget::updateUI()
 {
-	QString str;
+	if ( m_validInput ){
 
-	// The complexString stores the whole molecule like this:
-	// 1 Seaborgium. Cumulative Mass: 263.119 u (39.2564 %)
-	QString complexString;
-	
-	// Create the list of elements making up the molecule
-	ElementCountMap::Iterator  it    = m_elementMap.begin();
-	ElementCountMap::Iterator  itEnd = m_elementMap.end();
-	for ( ; it != itEnd; ++it ) {
-		// Update the resultLabel
-		str += i18n( &quot;For example: \&quot;1 Carbon\&quot; or \&quot;3 Oxygen\&quot;&quot;, &quot;%1 %2\n&quot; )
-		  .arg( (*it)-&gt;count() )
-		  .arg( (*it)-&gt;element()-&gt;elname() );
+		QString str;
 
-		complexString
-		  += i18n( &quot;For example: 1 Seaborgium. Cumulative Mass: 263.119 u (39.25%)&quot;,
-				   &quot;%1 %2. Cumulative Mass: %3 u (%4%)\n&quot; )
-		  .arg( (*it)-&gt;count() )
-		  .arg( (*it)-&gt;element()-&gt;elname() )
-		  .arg( (*it)-&gt;count() * (*it)-&gt;element()-&gt;mass() )
-		  .arg( KalziumUtils::strippedValue( (( (*it)-&gt;count() * (*it)-&gt;element()-&gt;mass() )
-											  / m_mass ) * 100 ) );
+		// The complexString stores the whole molecule like this:
+		// 1 Seaborgium. Cumulative Mass: 263.119 u (39.2564 %)
+		QString complexString;
+
+		// Create the list of elements making up the molecule
+		ElementCountMap::Iterator  it    = m_elementMap.begin();
+		ElementCountMap::Iterator  itEnd = m_elementMap.end();
+		for ( ; it != itEnd; ++it ) {
+			// Update the resultLabel
+			str += i18n( &quot;For example: \&quot;1 Carbon\&quot; or \&quot;3 Oxygen\&quot;&quot;, &quot;%1 %2\n&quot; )
+				.arg( (*it)-&gt;count() )
+				.arg( (*it)-&gt;element()-&gt;elname() );
+
+			complexString
+				+= i18n( &quot;For example: 1 Seaborgium. Cumulative Mass: 263.119 u (39.25%)&quot;,
+						&quot;%1 %2. Cumulative Mass: %3 u (%4%)\n&quot; )
+				.arg( (*it)-&gt;count() )
+				.arg( (*it)-&gt;element()-&gt;elname() )
+				.arg( (*it)-&gt;count() * (*it)-&gt;element()-&gt;mass() )
+				.arg( KalziumUtils::strippedValue( (( (*it)-&gt;count() * (*it)-&gt;element()-&gt;mass() )
+								/ m_mass ) * 100 ) );
+		}
+		resultLabel-&gt;setText( str );
+
+		// The composition
+		resultComposition-&gt;setText( compositionString(m_elementMap) );
+
+		// The mass
+		resultMass-&gt;setText( i18n( &quot;Molecular mass: %1 u&quot; ).arg( m_mass ) );
+
+		QToolTip::add( resultMass,        complexString );
+		QToolTip::add( resultComposition, complexString );
+		QToolTip::add( resultLabel,       complexString );
 	}
-	resultLabel-&gt;setText( str );
-	
-	// The composition
-	resultComposition-&gt;setText( compositionString(m_elementMap) );
-	
-	// The mass
-	resultMass-&gt;setText( i18n( &quot;Molecular mass: %1 u&quot; ).arg( m_mass ) );
-	
-	QToolTip::add( resultMass,        complexString );
-	QToolTip::add( resultComposition, complexString );
-	QToolTip::add( resultLabel,       complexString );
+	else{//the input was invalid, so tell this the user
+		resultComposition-&gt;setText( i18n( &quot;Invalid input&quot; ) );
+		resultLabel-&gt;setText( QString() );
+		resultMass-&gt;setText( QString() );
+		
+		QToolTip::add( resultMass,        i18n( &quot;Invalid input&quot; ) );
+		QToolTip::add( resultComposition, i18n( &quot;Invalid input&quot; ) );
+		QToolTip::add( resultLabel,       i18n( &quot;Invalid input&quot; ) );
+	}
 }
 
 
@@ -132,17 +144,9 @@
 
 	// Parse the molecule, and at the same time calculate the total
 	// mass, and the composition of it.
-	bool parseOk = m_parser.weight(molecule, &amp;m_mass, &amp;m_elementMap);
-
-	if (parseOk) {
-		kdDebug() &lt;&lt; &quot;Mass of &quot; &lt;&lt; molecule &lt;&lt; &quot; = &quot; &lt;&lt; m_mass &lt;&lt; endl;
-
-		updateUI();
-	}
-	else {
-		// FIXME: Do something better here.
-		kdDebug() &lt;&lt; &quot;Parse error&quot; &lt;&lt; endl;
-	}
+	m_validInput = m_parser.weight(molecule, &amp;m_mass, &amp;m_elementMap);
+	
+	updateUI();
 }
 
 
--- branches/KDE/3.5/kdeedu/kalzium/src/molcalcwidget.h #492530:492531
@@ -72,6 +72,7 @@
 		MoleculeParser   m_parser;
 		
 		double           m_mass;
+		bool 			 m_validInput;
 		ElementCountMap  m_elementMap;
 };
 
--- branches/KDE/3.5/kdeedu/kalzium/src/moleculeparser.cpp #492530:492531
@@ -124,8 +124,9 @@
 					   double          *_resultMass,
 					   ElementCountMap *_resultMap)
 {
-    // Clear the result variables.
+    // Clear the result variables and set m_error to false
     _resultMap-&gt;clear();
+	m_error = false;
     *_resultMass = 0.0;
 
 	// Initialize the parsing process, and parse te molecule.
@@ -135,6 +136,9 @@
     if (nextToken() != -1)
 		return false;
 
+	if ( m_error )//there was an error in the input...
+		return false;
+
     return true;
 }
 
@@ -286,12 +290,15 @@
     const EList::ConstIterator  end = elementList.constEnd();
 
     for (; it != end; ++it) {
-	if ( (*it)-&gt;symbol() == _name ) {
-	    kdDebug() &lt;&lt; &quot;Found element &quot; &lt;&lt; _name &lt;&lt; endl;
-	    return *it;
-	}
+		if ( (*it)-&gt;symbol() == _name ) {
+			kdDebug() &lt;&lt; &quot;Found element &quot; &lt;&lt; _name &lt;&lt; endl;
+			return *it;
+		}
     }
 
-    kdDebug() &lt;&lt; k_funcinfo &lt;&lt; &quot;no such element: &quot; &lt;&lt; _name &lt;&lt; endl;
+	//if there is an error make m_error true.
+	m_error = true;
+
+    kdDebug() &lt;&lt; k_funcinfo &lt;&lt; &quot;no such element, parsing error!: &quot; &lt;&lt; _name &lt;&lt; endl;
     return NULL;
 }
--- branches/KDE/3.5/kdeedu/kalzium/src/moleculeparser.h #492530:492531
@@ -103,8 +103,6 @@
     bool  weight(QString         _moleculeString,
 				 double          *_resultMass,
 				 ElementCountMap *_resultMap);
-    //QMap&lt;Element*, int&gt;   elementMap();
-    //QValueList&lt;Element*&gt;  elementList();
 
  private:
     // Helper functions
@@ -117,6 +115,9 @@
 
     QMap&lt;Element*, int&gt; m_elementMap;
 
+	//if this booloean is &quot;true&quot; the parser found an error
+	bool m_error;
+
 protected:
 
     /**
</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>14063</attachid>
            <date>2005-12-29 15:05:29 +0000</date>
            <delta_ts>2005-12-29 15:05:29 +0000</delta_ts>
            <desc>Patch for this bug</desc>
            <filename>moleculeparserbug.patch</filename>
            <type>text/plain</type>
            <size>5908</size>
            <attacher name="Carsten Niehaus">cniehaus</attacher>
            
              <data encoding="base64">SW5kZXg6IG1vbGVjdWxlcGFyc2VyLmgKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gbW9sZWN1bGVwYXJzZXIuaAko
cmV2aXNpb24gNDkyMjgyKQorKysgbW9sZWN1bGVwYXJzZXIuaAkod29ya2luZyBjb3B5KQpAQCAt
MTAzLDggKzEwMyw2IEBACiAgICAgYm9vbCAgd2VpZ2h0KFFTdHJpbmcgICAgICAgICBfbW9sZWN1
bGVTdHJpbmcsCiAJCQkJIGRvdWJsZSAgICAgICAgICAqX3Jlc3VsdE1hc3MsCiAJCQkJIEVsZW1l
bnRDb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uZDsgKytpdCkgewotCWlm
ICggKCppdCktPnN5bWJvbCgpID09IF9uYW1lICkgewotCSAgICBrZERlYnVnKCkgPDwgIkZvdW5k
IGVsZW1lbnQgIiA8PCBfbmFtZSA8PCBlbmRsOwotCSAgICByZXR1cm4gKml0OwotCX0KKwkJaWYg
KCAoKml0KS0+c3ltYm9sKCkgPT0gX25hbWUgKSB7CisJCQlrZERlYnVnKCkgPDwgIkZvdW5kIGVs
ZW1lbnQgIiA8PCBfbmFtZSA8PCBlbmRsOworCQkJcmV0dXJuICppdDsKKwkJfQogICAgIH0KIAot
ICAgIGtkRGVidWcoKSA8PCBrX2Z1bmNpbmZvIDw8ICJubyBzdWNoIGVsZW1lbnQ6ICIgPDwgX25h
bWUgPDwgZW5kbDsKKwkvL2lmIHRoZXJlIGlzIGFuIGVycm9yIG1ha2UgbV9lcnJvciB0cnVlLgor
CW1fZXJyb3IgPSB0cnVlOworCisgICAga2REZWJ1ZygpIDw8IGtfZnVuY2luZm8gPDwgIm5vIHN1
Y2ggZWxlbWVudCwgcGFyc2luZyBlcnJvciE6ICIgPDwgX25hbWUgPDwgZW5kbDsKICAgICByZXR1
cm4gTlVMTDsKIH0KSW5kZXg6IG1vbGNhbGN3aWRnZXQuaAo9PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBtb2xjYWxj
d2lkZ2V0LmgJKHJldmlzaW9uIDQ5MjI4MikKKysrIG1vbGNhbGN3aWRnZXQuaAkod29ya2luZyBj
b3B5KQpAQCAtNzIsNiArNzIsNyBAQAogCQlNb2xlY3VsZVBhcnNlciAgIG1fcGFyc2VyOwogCQkK
IAkJZG91YmxlICAgICAgICAgICBtX21hc3M7CisJCWJvb2wgCQkJIG1fdmFsaWRJbnB1dDsKIAkJ
RWxlbWVudENvdW50TWFwICBtX2VsZW1lbnRNYXA7CiB9OwogCg==
</data>

          </attachment>
      

    </bug>

</bugzilla>