Changeset View
Changeset View
Standalone View
Standalone View
src/backends/sage/sagesession.cpp
Show First 20 Lines • Show All 188 Lines • ▼ Show 20 Line(s) | 179 | { | |||
---|---|---|---|---|---|
189 | 189 | | |||
190 | m_dirWatch.addDir( m_tmpPath, KDirWatch::WatchFiles ); | 190 | m_dirWatch.addDir( m_tmpPath, KDirWatch::WatchFiles ); | ||
191 | } | 191 | } | ||
192 | 192 | | |||
193 | if(!m_isInitialized) | 193 | if(!m_isInitialized) | ||
194 | { | 194 | { | ||
195 | //try to guess the version of sage to determine | 195 | //try to guess the version of sage to determine | ||
196 | //if we have to use the legacy commands or not. | 196 | //if we have to use the legacy commands or not. | ||
197 | QRegExp versionExp(QLatin1String("Sage(?:Math)?\\s+Version\\s+(\\d+)\\.(\\d+)")); | 197 | QRegExp versionExp(QLatin1String("([a-zA-Z\\W])+\\s+(\\d+)\\.(\\d+)")); | ||
198 | int index=versionExp.indexIn(m_outputCache); | 198 | int index=versionExp.indexIn(m_outputCache); | ||
199 | if(index!=-1) | 199 | if(index!=-1) | ||
200 | { | 200 | { | ||
201 | QStringList version=versionExp.capturedTexts(); | 201 | QStringList version=versionExp.capturedTexts(); | ||
202 | qDebug()<<"found version: "<<version; | 202 | qDebug()<<"found version: "<<version; | ||
203 | if(version.size()>2) | 203 | if(version.size()>2) | ||
204 | { | 204 | { | ||
205 | int major=version[1].toInt(); | 205 | int major=version[1].toInt(); | ||
▲ Show 20 Lines • Show All 234 Lines • Show Last 20 Lines |