Changeset View
Changeset View
Standalone View
Standalone View
src/declarativeimports/core/tooltipdialog.cpp
Show First 20 Lines • Show All 50 Lines • ▼ Show 20 Line(s) | |||||
51 | QQuickItem *ToolTipDialog::loadDefaultItem() | 51 | QQuickItem *ToolTipDialog::loadDefaultItem() | ||
52 | { | 52 | { | ||
53 | if (!m_qmlObject) { | 53 | if (!m_qmlObject) { | ||
54 | m_qmlObject = new KDeclarative::QmlObjectSharedEngine(this); | 54 | m_qmlObject = new KDeclarative::QmlObjectSharedEngine(this); | ||
55 | } | 55 | } | ||
56 | 56 | | |||
57 | if (!m_qmlObject->rootObject()) { | 57 | if (!m_qmlObject->rootObject()) { | ||
58 | //HACK: search our own import | 58 | //HACK: search our own import | ||
59 | foreach (const QString &path, m_qmlObject->engine()->importPathList()) { | 59 | const auto paths = m_qmlObject->engine()->importPathList(); | ||
60 | for (const QString &path : paths) { | ||||
apol: same?
If we have to open an incidence for every comment this gets exhausting. | |||||
60 | if (QFile::exists(path + QStringLiteral("/org/kde/plasma/core"))) { | 61 | if (QFile::exists(path + QStringLiteral("/org/kde/plasma/core"))) { | ||
61 | m_qmlObject->setSource(QUrl::fromLocalFile(path + QStringLiteral("/org/kde/plasma/core/private/DefaultToolTip.qml"))); | 62 | m_qmlObject->setSource(QUrl::fromLocalFile(path + QStringLiteral("/org/kde/plasma/core/private/DefaultToolTip.qml"))); | ||
62 | break; | 63 | break; | ||
63 | } | 64 | } | ||
64 | } | 65 | } | ||
65 | } | 66 | } | ||
66 | 67 | | |||
67 | return qobject_cast<QQuickItem *>(m_qmlObject->rootObject()); | 68 | return qobject_cast<QQuickItem *>(m_qmlObject->rootObject()); | ||
▲ Show 20 Lines • Show All 77 Lines • Show Last 20 Lines |
same?
If we have to open an incidence for every comment this gets exhausting.