-
Suggestion
-
Resolution: Unresolved
-
P4: Low
-
None
-
Qt Creator 3.3.0-beta1
-
None
If I have files like this
| deployment.pri | main.cpp | main.qml | qml.qrc | withsubdirectoryimport.pro | \---testdir MyText.qml
and I want to refactor something from the main.qml
import QtQuick 2.3 import QtQuick.Controls 1.2 import "testdir" ApplicationWindow { visible: true width: 640 height: 480 title: qsTr("Hello World") menuBar: MenuBar { Menu { title: qsTr("File") MenuItem { text: qsTr("Exit") onTriggered: Qt.quit(); } } } MyText { anchors.centerIn: parent height: 100 width: 100 } }
for example I am right clicking on Menu: "Refactoring" -> "Move Component to Separate file" I am getting this:
import QtQuick 2.3 import QtQuick.Controls 1.2 import "testdir" Menu { title: qsTr("File") MenuItem { text: qsTr("Exit") onTriggered: Qt.quit(); } }
It would be very good if the local import 'import "testdir"' wouldn't be moved to the new component file.
- relates to
-
QTCREATORBUG-11351 All QML imports are dragged to a refactored new item, even when not needed
-
- Reported
-
-
QTCREATORBUG-29897 Multiple issues with "Move Component to Separate file"
-
- Reported
-