Details
-
Suggestion
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
None
-
9f9c40b29 (master)
Description
// main.cpp int main(int argc, char *argv[]) { QGuiApplication app(argc, argv); QQmlApplicationEngine engine; const QUrl url(u"qrc:/main.qml"_qs); // "Follow Symbol Under Cursor" on the string literal should open qrc:/main.qml engine.load(url); return app.exec(); } // main.qml Window { Image { source: "qrc:/myimage.png" // "Follow Symbol Under Cursor" on the string literal should open qrc:/myimage.png } Component.onCompleted: { console.log( Qt.resolvedUrl("data/config.ini") ) // "Follow Symbol Under Cursor" on the string literal should open "qrc:/data/config.ini" } }
If it is not feasible for the code model itself to differentiate between URL literals from regular string literals (and evaluate relative URLs), perhaps this can be implemented as a separate function ("Open Resource Under Cursor"?) instead of "Follow Symbol Under Cursor". When activated, the function would check if the cursor is over a string literal, and if so, try to figure out the location of the specified file.
Attachments
Issue Links
- is required for
-
QTCREATORBUG-28113 Suggestions pick list
-
- Reported
-