From: Kashyap Ramesh Puranik Date: Sun, 28 Jun 2009 05:16:46 +0000 (+0000) Subject: Adding the 'addAlias mode', its incomplete. X-Git-Tag: v4.3.80~1^2~3 X-Git-Url: https://git.rmz.fi/?a=commitdiff_plain;h=2f40577d80aaaeb6e74e3d1fda10017ae830f6c3;p=libqmvoc.git Adding the 'addAlias mode', its incomplete. svn path=/branches/kalzium/gsoc2009/kalzium/libscience/; revision=988417 --- diff --git a/libscience/data/CMakeLists.txt b/libscience/data/CMakeLists.txt index f2ae647..00a769e 100755 --- a/libscience/data/CMakeLists.txt +++ b/libscience/data/CMakeLists.txt @@ -3,6 +3,7 @@ install(FILES elements.xml isotopes.xml symbols.csv + symbols2.csv spectra.xml DESTINATION ${DATA_INSTALL_DIR}/libkdeedu/data/ ) diff --git a/libscience/data/symbols.csv b/libscience/data/symbols.csv index 3afa27d..30b0b05 100644 --- a/libscience/data/symbols.csv +++ b/libscience/data/symbols.csv @@ -1,2 +1,3 @@ "Et","C2H5" "Me","CH3" +"Ph","C6H5" diff --git a/libscience/moleculeparser.cpp b/libscience/moleculeparser.cpp index 9f29814..ccd963b 100644 --- a/libscience/moleculeparser.cpp +++ b/libscience/moleculeparser.cpp @@ -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()) {