Verified Commit 671e923a authored by Alexander Lohnau's avatar Alexander Lohnau
Browse files

Ship scienceconstants.xml file as part of qrc

It is an essential part of the app, consequently we want to make sure it is always shipped as part of it
parent c4bba7d8
......@@ -144,7 +144,6 @@ install(TARGETS kcalc ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} )
install( PROGRAMS org.kde.kcalc.desktop DESTINATION ${KDE_INSTALL_APPDIR})
install( FILES org.kde.kcalc.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
install( FILES kcalc.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR})
install( FILES scienceconstants.xml DESTINATION ${KDE_INSTALL_DATADIR}/kcalc)
install( FILES kcalcrc.upd DESTINATION ${KDE_INSTALL_DATADIR}/kconf_update)
ki18n_install(po)
......
......@@ -3,5 +3,8 @@
<qresource prefix="/kxmlgui5/kcalc">
<file>kcalcui.rc</file>
</qresource>
<qresource prefix="/kcalc">
<file>scienceconstants.xml</file>
</qresource>
</RCC>
......@@ -49,7 +49,7 @@ ConstantCategory stringToCategory(const QString &s)
void KCalcConstMenu::init_consts()
{
QDomDocument doc(QStringLiteral("list_of_constants"));
QFile file(QStandardPaths::locate(QStandardPaths::DataLocation, QStringLiteral("scienceconstants.xml")));
QFile file(QStringLiteral(":/kcalc/scienceconstants.xml"));
if (!file.open(QIODevice::ReadOnly)) {
qDebug() << "Did not find file \"scienceconstants.xml\". No constants will be available.";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment