aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiguel Costa <miguel.costa@qt.io>2020-12-09 12:31:20 +0100
committerMiguel Costa <miguel.costa@qt.io>2020-12-10 13:10:47 +0000
commitcacba395bc4276267449146157a17aaee21f8801 (patch)
tree16a05c5245cebefaa415f3e2988b20ec10633024
parent53fc463d23843afbda7a379c7e2be7dcd4d622b4 (diff)
Avoid full rebuild in .ui IntelliSense refresh
When running uic after a .ui file was modified, and ahead of an IntelliSense update, will now only process the modified file. Previously all Qt tool sources were processed. Change-Id: Ibd44a9490b50186b9216b61d72d28220c88a0b60 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
-rw-r--r--src/qtvstools/Editors/Editor.QtDesigner.cs11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/qtvstools/Editors/Editor.QtDesigner.cs b/src/qtvstools/Editors/Editor.QtDesigner.cs
index 01dc46ec..13e3f60c 100644
--- a/src/qtvstools/Editors/Editor.QtDesigner.cs
+++ b/src/qtvstools/Editors/Editor.QtDesigner.cs
@@ -71,16 +71,21 @@ namespace QtVsTools.Editors
if (project == null)
return;
string filePath = document.FullName;
+ string[] itemId = null;
+ itemId = new[] { document.ProjectItem?.Name };
var lastWriteTime = File.GetLastWriteTime(filePath);
while (!process.WaitForExit(1000)) {
var latestWriteTime = File.GetLastWriteTime(filePath);
if (lastWriteTime != latestWriteTime) {
lastWriteTime = latestWriteTime;
- QtProjectTracker.RefreshIntelliSense(project, runQtTools: true);
+ QtProjectTracker.RefreshIntelliSense(
+ project, runQtTools: true, selectedFiles: itemId);
}
}
- if (lastWriteTime != File.GetLastWriteTime(filePath))
- QtProjectTracker.RefreshIntelliSense(project, runQtTools: true);
+ if (lastWriteTime != File.GetLastWriteTime(filePath)) {
+ QtProjectTracker.RefreshIntelliSense(
+ project, runQtTools: true, selectedFiles: itemId);
+ }
});
}
#endif