* returns the human readable string for the missing CAS plugins in case * the project has some CAS content but the application was either not compiled with * CAS/Cantor support or the correspongind plugins for the required backends are missing. * * The returned text is in the form "Octave" or "Octave and Maxima" or "Octave, Maxima and Python", etc. */
| 47 | * The returned text is in the form "Octave" or "Octave and Maxima" or "Octave, Maxima and Python", etc. |
| 48 | */ |
| 49 | QString XmlStreamReader::missingCASWarning() const { |
| 50 | const int count = m_missingCASPlugins.count(); |
| 51 | if (count == 1) |
| 52 | return m_missingCASPlugins.constFirst(); |
| 53 | else { |
| 54 | QString msg; |
| 55 | for (int i = 0; i < count; ++i) { |
| 56 | if (!msg.isEmpty()) { |
| 57 | if (i == count - 1) |
| 58 | msg += QLatin1Char(' ') + i18n("and") + QLatin1Char(' '); |
| 59 | else |
| 60 | msg += QLatin1String(", "); |
| 61 | } |
| 62 | msg += m_missingCASPlugins.at(i); |
| 63 | } |
| 64 | return msg; |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | bool XmlStreamReader::hasWarnings() const { |
| 69 | return !m_warnings.isEmpty(); |