1
0
Fork 0

Fix QRC URL creation for older Qt versions

This commit is contained in:
James Turner 2017-04-11 08:06:45 +01:00
parent fac0341e04
commit 8dbd3f8bd5

View file

@ -285,7 +285,7 @@ void LauncherMainWindow::buildSettingsSections()
QStringList sections = QStringList() << "general" << "mp" << "downloads" << "view" << "render";
Q_FOREACH (QString section, sections) {
QQmlComponent* comp = new QQmlComponent(m_qmlEngine, "qrc:/settings/" + section, this);
QQmlComponent* comp = new QQmlComponent(m_qmlEngine, QUrl("qrc:///settings/" + section), this);
if (comp->isError()) {
qWarning() << "Errors parsing settings section:" << section << "\n" << comp->errorString();
} else {
@ -319,7 +319,7 @@ void LauncherMainWindow::buildEnvironmentSections()
QStringList sections = QStringList() << "time" << "weather";
Q_FOREACH (QString section, sections) {
QQmlComponent* comp = new QQmlComponent(m_qmlEngine, "qrc:/environment/" + section, this);
QQmlComponent* comp = new QQmlComponent(m_qmlEngine, QUrl("qrc:///environment/" + section), this);
if (comp->isError()) {
qWarning() << "Errors parsing environment section:" << section << "\n" << comp->errorString();
} else {