]> Git trees. - libqmvoc.git/commitdiff
Adding the 'addAlias mode', its incomplete.
authorKashyap Ramesh Puranik <kashthealien@gmail.com>
Sun, 28 Jun 2009 05:16:46 +0000 (05:16 +0000)
committerKashyap Ramesh Puranik <kashthealien@gmail.com>
Sun, 28 Jun 2009 05:16:46 +0000 (05:16 +0000)
svn path=/branches/kalzium/gsoc2009/kalzium/libscience/; revision=988417

libscience/data/CMakeLists.txt
libscience/data/symbols.csv
libscience/moleculeparser.cpp

index f2ae64743b74b685700d0e8c656d837627a488eb..00a769e9bb205da46f4a1def25483669df420300 100755 (executable)
@@ -3,6 +3,7 @@ install(FILES
    elements.xml
    isotopes.xml
    symbols.csv
+   symbols2.csv
    spectra.xml DESTINATION ${DATA_INSTALL_DIR}/libkdeedu/data/
 )
 
index 3afa27d950dd3a4424fea9b91adca7026518a0ee..30b0b05ed80a18269454b036cad4f9ad802f491d 100644 (file)
@@ -1,2 +1,3 @@
 "Et","C2H5"
 "Me","CH3"
+"Ph","C6H5"
index 9f29814f86587b758b82021704acf910381b101c..ccd963b6aa165155109a4b7ffccee6891e5239e4 100644 (file)
@@ -408,14 +408,14 @@ MoleculeParser::expandTerm (const QString& _group)
     
        // Find the system defined aliases      
        // Open the file
-       QString fileName = KStandardDirs::locate( "data", "libkdeedu/data/symbols.csv");
-       QFile file(fileName);
+       fileName = KStandardDirs::locate( "data", "libkdeedu/data/symbols.csv");
+       QFile file2(fileName);
        
        // Check file validity
-    if (!(!file.open(QIODevice::ReadOnly | QIODevice::Text)))
+    if (!(!file2.open(QIODevice::ReadOnly | QIODevice::Text)))
     {
            kDebug() << fileName << " opened";
-       QTextStream in(&file);
+       QTextStream in(&file2);
        
        // Get all shortForms and fullForms in the file.
        while (!in.atEnd()) {