aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarsten Heimrich <karsten.heimrich@qt.io>2022-04-20 15:30:23 +0200
committerKarsten Heimrich <karsten.heimrich@qt.io>2022-04-22 16:13:49 +0000
commit0c9776a4d12e7f012a9f6710daece4acc6c4a3a8 (patch)
tree714423c5e6159b9115874b1c52645d7acd9cbbbe
parent51da4e2b20302ce5aa41d9758fedb4af1b9557f6 (diff)
Fix Qt6 modules handling and some qt module wizard typos
Fixes: QTVSADDINBUG-925 Fixes: QTVSADDINBUG-937 Fixes: QTVSADDINBUG-951 Fixes: QTVSADDINBUG-972 Fixes: QTVSADDINBUG-974 Change-Id: Ifee7d19560cd0ce8d7c6f2563f3f7198453c20fd Reviewed-by: Miguel Costa <miguel.costa@qt.io>
-rw-r--r--QtVsTools.Core/MsBuildProject.cs4
-rw-r--r--QtVsTools.Core/ProjectExporter.cs9
-rw-r--r--QtVsTools.Core/QtModules.cs56
-rw-r--r--QtVsTools.Core/QtProject.cs20
-rw-r--r--QtVsTools.Core/VersionInformation.cs4
-rw-r--r--QtVsTools.Package/Legacy/FormProjectQtSettings.cs9
-rw-r--r--QtVsTools.Package/QtMsBuild/QtModulesEditor.cs12
-rw-r--r--QtVsTools.Package/QtVsTools.Package.csproj4
-rw-r--r--QtVsTools.Package/qt6modules.xml502
-rw-r--r--QtVsTools.Wizards/ItemWizard/QtClass/QtClassWizard.cs2
-rw-r--r--QtVsTools.Wizards/ItemWizard/Translation/TranslationWizard.cs2
-rw-r--r--QtVsTools.Wizards/ItemWizard/WidgetsClass/WidgetsClassWizard.cs2
-rw-r--r--QtVsTools.Wizards/ProjectWizard/ConfigPage.xaml.cs30
13 files changed, 608 insertions, 48 deletions
diff --git a/QtVsTools.Core/MsBuildProject.cs b/QtVsTools.Core/MsBuildProject.cs
index dda6f54a..b97c2951 100644
--- a/QtVsTools.Core/MsBuildProject.cs
+++ b/QtVsTools.Core/MsBuildProject.cs
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2017 The Qt Company Ltd.
+** Copyright (C) 2022 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt VS Tools.
@@ -597,7 +597,7 @@ namespace QtVsTools.Core
var moduleLibs = new HashSet<string>();
// Go through all known Qt modules and check which ones are currently being used
- foreach (var module in QtModules.Instance.GetAvailableModules()) {
+ foreach (var module in QtModules.Instance.GetAvailableModules(defaultVersion.qtMajor)) {
if (IsModuleUsed(module, compiler, linker)) {
diff --git a/QtVsTools.Core/ProjectExporter.cs b/QtVsTools.Core/ProjectExporter.cs
index cc6a725d..06b9a599 100644
--- a/QtVsTools.Core/ProjectExporter.cs
+++ b/QtVsTools.Core/ProjectExporter.cs
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2022 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt VS Tools.
@@ -501,7 +501,12 @@ namespace QtVsTools.Core
{
ThreadHelper.ThrowIfNotOnUIThread();
- foreach (var module in QtModules.Instance.GetAvailableModules()) {
+ var vm = QtVersionManager.The();
+ var versionInfo = vm.GetVersionInfo(qtPrj.Project);
+ if (versionInfo == null)
+ versionInfo = vm.GetVersionInfo(vm.GetDefaultVersion());
+
+ foreach (var module in QtModules.Instance.GetAvailableModules(versionInfo.qtMajor)) {
if (!qtPrj.HasModule(module.Id))
continue;
diff --git a/QtVsTools.Core/QtModules.cs b/QtVsTools.Core/QtModules.cs
index 547aaa88..a7796655 100644
--- a/QtVsTools.Core/QtModules.cs
+++ b/QtVsTools.Core/QtModules.cs
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2022 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt VS Tools.
@@ -39,31 +39,57 @@ namespace QtVsTools.Core
public class QtModules
{
public static QtModules Instance { get; } = new QtModules();
- private readonly Dictionary<int, QtModule> modules = new Dictionary<int, QtModule>();
+ private List<QtModule> qt5list = null, qt6list = null;
+ private readonly Dictionary<int, QtModule> qt5modules = new Dictionary<int, QtModule>();
+ private readonly Dictionary<int, QtModule> qt6modules = new Dictionary<int, QtModule>();
- public QtModule Module(int id)
+ public QtModule Module(int id, uint major)
{
- modules.TryGetValue(id, out QtModule module);
+ QtModule module = null;
+ if (major < 6)
+ qt5modules.TryGetValue(id, out module);
+ if (major == 6)
+ qt6modules.TryGetValue(id, out module);
+ if (major > 6)
+ throw new QtVSException("Unsupported Qt version.");
return module;
}
- public List<QtModule> GetAvailableModules()
+ public List<QtModule> GetAvailableModules(uint major)
{
- var lst = new List<QtModule>(modules.Count);
- foreach (var entry in modules)
- lst.Add(entry.Value);
- return lst;
+ if (major < 6) {
+ if (qt5list == null) {
+ qt5list = new List<QtModule>(qt5modules.Count);
+ foreach (var entry in qt5modules)
+ qt5list.Add(entry.Value);
+ }
+ return qt5list;
+ }
+ if (major == 6) {
+ if (qt6list == null) {
+ qt6list = new List<QtModule>(qt6modules.Count);
+ foreach (var entry in qt6modules)
+ qt6list.Add(entry.Value);
+ }
+ return qt6list;
+ }
+ if (major > 6)
+ throw new QtVSException("Unsupported Qt version.");
+ return null;
}
private QtModules()
{
- var uri = new Uri(
- System.Reflection.Assembly.GetExecutingAssembly().EscapedCodeBase);
- var pkgInstallPath = Path.GetDirectoryName(
- Uri.UnescapeDataString(uri.AbsolutePath)) + @"\";
+ var uri = new Uri(System.Reflection.Assembly.GetExecutingAssembly().EscapedCodeBase);
+ var pkgInstallPath = Path.GetDirectoryName(Uri.UnescapeDataString(uri.AbsolutePath));
- var modulesFile = Path.Combine(pkgInstallPath, "qtmodules.xml");
+ FillModules(Path.Combine(pkgInstallPath, "qtmodules.xml"), ref qt5modules);
+ FillModules(Path.Combine(pkgInstallPath, "qt6modules.xml"), ref qt6modules);
+ }
+
+ private void FillModules(string modulesFile, ref Dictionary<int, QtModule> dict)
+ {
if (!File.Exists(modulesFile))
return;
@@ -101,7 +127,7 @@ namespace QtVsTools.Core
Messages.Print("\r\nCritical error: incorrect format of qtmodules.xml");
throw new QtVSException("qtmodules.xml");
}
- modules.Add(id, module);
+ dict.Add(id, module);
}
}
}
diff --git a/QtVsTools.Core/QtProject.cs b/QtVsTools.Core/QtProject.cs
index 0f157aba..8a9c14f7 100644
--- a/QtVsTools.Core/QtProject.cs
+++ b/QtVsTools.Core/QtProject.cs
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2022 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt VS Tools.
@@ -343,7 +343,7 @@ namespace QtVsTools.Core
foreach (VCConfiguration config in (IVCCollection)vcPro.Configurations) {
- var info = QtModules.Instance.Module(id);
+ var info = QtModules.Instance.Module(id, versionInfo.qtMajor);
if (FormatVersion >= Resources.qtMinFormatVersion_Settings) {
var config3 = config as VCConfiguration3;
if (config3 == null)
@@ -400,11 +400,16 @@ namespace QtVsTools.Core
{
ThreadHelper.ThrowIfNotOnUIThread();
+ var vm = QtVersionManager.The();
+ var versionInfo = vm.GetVersionInfo(Project);
+ if (versionInfo == null)
+ versionInfo = vm.GetVersionInfo(vm.GetDefaultVersion());
+
foreach (VCConfiguration config in (IVCCollection)vcPro.Configurations) {
var compiler = CompilerToolWrapper.Create(config);
var linker = (VCLinkerTool)((IVCCollection)config.Tools).Item("VCLinkerTool");
- var info = QtModules.Instance.Module(id);
+ var info = QtModules.Instance.Module(id, versionInfo.qtMajor);
if (compiler != null) {
foreach (var define in info.Defines)
compiler.RemovePreprocessorDefinition(define);
@@ -420,11 +425,6 @@ namespace QtVsTools.Core
}
if (linker != null && linker.AdditionalDependencies != null) {
var linkerWrapper = new LinkerToolWrapper(linker);
- var vm = QtVersionManager.The();
- var versionInfo = vm.GetVersionInfo(Project);
- if (versionInfo == null)
- versionInfo = vm.GetVersionInfo(vm.GetDefaultVersion());
-
var moduleLibs = info.GetLibs(IsDebugConfiguration(config), versionInfo);
var additionalDependencies = linkerWrapper.AdditionalDependencies;
var dependenciesChanged = false;
@@ -449,7 +449,7 @@ namespace QtVsTools.Core
var additionalDependencies = linkerWrapper.AdditionalDependencies;
var libsDesktop = new List<string>();
- foreach (var module in QtModules.Instance.GetAvailableModules()) {
+ foreach (var module in QtModules.Instance.GetAvailableModules(newVersion.qtMajor)) {
if (HasModule(module.Id))
libsDesktop.AddRange(module.AdditionalLibraries);
}
@@ -500,7 +500,7 @@ namespace QtVsTools.Core
versionInfo = vm.GetVersionInfo(vm.GetDefaultVersion());
if (versionInfo == null)
return false; // neither a default or project Qt version
- var info = QtModules.Instance.Module(id);
+ var info = QtModules.Instance.Module(id, versionInfo.qtMajor);
if (info == null)
return false;
diff --git a/QtVsTools.Core/VersionInformation.cs b/QtVsTools.Core/VersionInformation.cs
index 5c7780b2..b1c862ff 100644
--- a/QtVsTools.Core/VersionInformation.cs
+++ b/QtVsTools.Core/VersionInformation.cs
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2022 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt VS Tools.
@@ -142,7 +142,7 @@ namespace QtVsTools.Core
var tempProData = new StringBuilder();
tempProData.AppendLine("SOURCES = main.cpp");
- var modules = QtModules.Instance.GetAvailableModules()
+ var modules = QtModules.Instance.GetAvailableModules(qtMajor)
.Where((QtModule mi) => mi.Selectable);
foreach (QtModule mi in modules) {
diff --git a/QtVsTools.Package/Legacy/FormProjectQtSettings.cs b/QtVsTools.Package/Legacy/FormProjectQtSettings.cs
index fad42371..b636e626 100644
--- a/QtVsTools.Package/Legacy/FormProjectQtSettings.cs
+++ b/QtVsTools.Package/Legacy/FormProjectQtSettings.cs
@@ -67,7 +67,12 @@ namespace QtVsTools.Legacy
tabControl1.TabPages[0].Text = "Properties";
tabControl1.TabPages[1].Text = "Qt Modules";
- var modules = QtModules.Instance.GetAvailableModules()
+ var vm = QtVersionManager.The();
+ var versionInfo = vm.GetVersionInfo(project);
+ if (versionInfo == null)
+ versionInfo = vm.GetVersionInfo(vm.GetDefaultVersion());
+
+ var modules = QtModules.Instance.GetAvailableModules(versionInfo.qtMajor)
.Where(x => x.Selectable)
.OrderBy(x => x.Name);
foreach (var module in modules) {
@@ -143,8 +148,8 @@ namespace QtVsTools.Legacy
moduleMap[i] = item;
// Disable if module not installed
- var info = QtModules.Instance.Module(item.moduleId);
var versionInfo = versionManager.GetVersionInfo(qtVersion);
+ var info = QtModules.Instance.Module(item.moduleId, versionInfo.qtMajor);
if (info != null && versionInfo != null) {
var libraryPrefix = info.LibraryPrefix;
if (libraryPrefix.StartsWith("Qt", StringComparison.Ordinal))
diff --git a/QtVsTools.Package/QtMsBuild/QtModulesEditor.cs b/QtVsTools.Package/QtMsBuild/QtModulesEditor.cs
index 2dae4f39..1d098c6d 100644
--- a/QtVsTools.Package/QtMsBuild/QtModulesEditor.cs
+++ b/QtVsTools.Package/QtMsBuild/QtModulesEditor.cs
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2021 The Qt Company Ltd.
+** Copyright (C) 2022 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt VS Tools.
@@ -49,7 +49,15 @@ namespace QtVsTools.QtMsBuild
{
await Task.Yield();
- var modules = QtModules.Instance.GetAvailableModules()
+ var qtSettings = ruleProperty.ContainingRule;
+ var qtVersion = await qtSettings.GetPropertyValueAsync("QtInstall");
+
+ var vm = QtVersionManager.The();
+ var versionInfo = vm.GetVersionInfo(qtVersion);
+ if (versionInfo == null)
+ versionInfo = vm.GetVersionInfo(vm.GetDefaultVersion());
+
+ var modules = QtModules.Instance.GetAvailableModules(versionInfo.qtMajor)
.Where(x => !string.IsNullOrEmpty(x.proVarQT))
.Select(x => new QtModulesPopup.Module
{
diff --git a/QtVsTools.Package/QtVsTools.Package.csproj b/QtVsTools.Package/QtVsTools.Package.csproj
index 634a02b7..01fd640e 100644
--- a/QtVsTools.Package/QtVsTools.Package.csproj
+++ b/QtVsTools.Package/QtVsTools.Package.csproj
@@ -502,6 +502,10 @@
<IncludeInVSIX>true</IncludeInVSIX>
<SubType>Designer</SubType>
</Content>
+ <Content Include="qt6modules.xml">
+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+ <IncludeInVSIX>true</IncludeInVSIX>
+ </Content>
<Content Include="QtVsTools.ico" />
<Content Include="QtVsTools.Qml.Debug.pkgdef">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
diff --git a/QtVsTools.Package/qt6modules.xml b/QtVsTools.Package/qt6modules.xml
new file mode 100644
index 00000000..ec4c0aaa
--- /dev/null
+++ b/QtVsTools.Package/qt6modules.xml
@@ -0,0 +1,502 @@
+<?xml version="1.0" encoding="utf-8"?>
+<QtVsTools>
+
+ <!-- Qt Essentials -->
+
+ <Module Id="1">
+ <Name>Qt Core</Name>
+ <Selectable>true</Selectable>
+ <LibraryPrefix>QtCore</LibraryPrefix>
+ <HasDLL>true</HasDLL>
+ <proVarQT>core</proVarQT>
+ <IncludePath>$(QTDIR)\include\QtCore</IncludePath>
+ <Defines>QT_CORE_LIB</Defines>
+ <Tag>Essential</Tag>
+ </Module>
+ <Module Id="2">
+ <Name>Qt D-Bus</Name>
+ <Selectable>true</Selectable>
+ <LibraryPrefix>QtDBus</LibraryPrefix>
+ <HasDLL>true</HasDLL>
+ <proVarQT>dbus</proVarQT>
+ <IncludePath>$(QTDIR)\include\QtDBus</IncludePath>
+ <Defines>QT_DBUS_LIB</Defines>
+ <Tag>Essential</Tag>
+ </Module>
+ <Module Id="3">
+ <Name>Qt GUI</Name>
+ <Selectable>true</Selectable>
+ <LibraryPrefix>QtGui</LibraryPrefix>
+ <HasDLL>true</HasDLL>
+ <proVarQT>gui</proVarQT>
+ <IncludePath>$(QTDIR)\include\QtGui</IncludePath>
+ <Defines>QT_GUI_LIB</Defines>
+ <Tag>Essential</Tag>
+ </Module>
+ <Module Id="4">
+ <Name>Qt Network</Name>
+ <Selectable>true</Selectable>
+ <LibraryPrefix>QtNetwork</LibraryPrefix>
+ <HasDLL>true</HasDLL>
+ <proVarQT>network</proVarQT>
+ <IncludePath>$(QTDIR)\include\QtNetwork</IncludePath>
+ <Defines>QT_NETWORK_LIB</Defines>
+ <Tag>Essential</Tag>
+ </Module>
+ <Module Id="5">
+ <Name>Qt QML</Name>
+ <Selectable>true</Selectable>
+ <LibraryPrefix>QtQml</LibraryPrefix>
+ <HasDLL>true</HasDLL>
+ <proVarQT>qml</proVarQT>
+ <IncludePath>$(QTDIR)\include\QtQml</IncludePath>
+ <Defines>QT_QML_LIB</Defines>
+ <Tag>Essential</Tag>
+ </Module>
+ <Module Id="6">
+ <Name>Qt Quick</Name>
+ <Selectable>true</Selectable>
+ <LibraryPrefix>QtQuick</LibraryPrefix>
+ <HasDLL>true</HasDLL>
+ <proVarQT>quick</proVarQT>
+ <IncludePath>$(QTDIR)\include\QtQuick</IncludePath>
+ <Defines>QT_QUICK_LIB</Defines>
+ <Tag>Essential</Tag>
+ </Module>
+ <Module Id="7">
+ <Name>Qt Quick Controls</Name>
+ <Selectable>true</Selectable>
+ <LibraryPrefix>QtQuickControls2</LibraryPrefix>
+ <HasDLL>true</HasDLL>
+ <proVarQT>quickcontrols2</proVarQT>
+ <IncludePath>$(QTDIR)\include\QtQuickControls2</IncludePath>
+ <Defines>QT_QUICKCONTROLS2_LIB</Defines>
+ <Tag>Essential</Tag>
+ </Module>
+ <Module Id="8">
+ <Name>Qt Quick Dialogs</Name>
+ <Selectable>true</Selectable>
+ <LibraryPrefix>QtQuickDialogs2</LibraryPrefix>
+ <HasDLL>true</HasDLL>
+ <proVarQT>quickdialogs2</proVarQT>
+ <IncludePath>$(QTDIR)\include\QtQuickDialogs2</IncludePath>
+ <Defines>QT_QUICKDIALOGS2_LIB</Defines>
+ <Tag>Essential</Tag>
+ </Module>
+ <Module Id="9">
+ <Name>Qt Quick Layouts</Name>
+ <Selectable>true</Selectable>
+ <LibraryPrefix>QtQuickLayouts</LibraryPrefix>
+ <HasDLL>true</HasDLL>
+ <proVarQT>quicklayouts</proVarQT>
+ <IncludePath>$(QTDIR)\include\QtQuickLayouts</IncludePath>
+ <Defines>QT_QUICKLAYOUTS_LIB</Defines>
+ <Tag>Essential</Tag>
+ </Module>
+ <Module Id="10">
+ <Name>Qt Quick Test</Name>
+ <Selectable>true</Selectable>
+ <LibraryPrefix>QtQuickTest</LibraryPrefix>
+ <HasDLL>true</HasDLL>
+ <proVarQT>qmltest</proVarQT>
+ <IncludePath>$(QTDIR)\include\QtQuickTest</IncludePath>
+ <Defines>QT_QMLTEST_LIB</Defines>
+ <Tag>Essential</Tag>
+ </Module>
+ <Module Id="11">
+ <Name>Qt Test</Name>
+ <Selectable>true</Selectable>
+ <LibraryPrefix>QtTest</LibraryPrefix>
+ <HasDLL>true</HasDLL>
+ <proVarQT>testlib</proVarQT>
+ <IncludePath>$(QTDIR)\include\QtTest</IncludePath>
+ <Defines>QT_TESTLIB_LIB</Defines>
+ <Tag>Essential</Tag>
+ </Module>
+ <Module Id="12">
+ <Name>Qt Widgets</Name>
+ <Selectable>true</Selectable>
+ <LibraryPrefix>QtWidgets</LibraryPrefix>
+ <HasDLL>true</HasDLL>
+ <proVarQT>widgets</proVarQT>
+ <IncludePath>$(QTDIR)\include\QtWidgets</IncludePath>
+ <Defines>QT_WIDGETS_LIB</Defines>
+ <Tag>Essential</Tag>
+ </Module>
+
+ <!-- Qt Add-Ons-->
+
+ <Module Id="13">
+ <Name>Active Qt (Server)</Name>
+ <Selectable>true</Selectable>
+ <LibraryPrefix>QtAxServer</LibraryPrefix>
+ <HasDLL>false</HasDLL>
+ <proVarQT>axserver</proVarQT>
+ <IncludePath>$(QTDIR)\include\ActiveQt</IncludePath>
+ <Defines>QAXSERVER</Defines>
+ <Defines>QT_AXSERVER_LIB</Defines>
+ <AdditionalLibraries>Qt6AxBase.lib</AdditionalLibraries>
+ <AdditionalLibrariesDebug>Qt6AxBased.lib</AdditionalLibrariesDebug>
+ </Module>
+ <Module Id="14">
+ <Name>Active Qt (Container)</Name>
+ <Selectable>true</Selectable>
+ <LibraryPrefix>QtAxContainer</LibraryPrefix>
+ <HasDLL>false</HasDLL>
+ <proVarQT>axcontainer</proVarQT>
+ <IncludePath>$(QTDIR)\include\ActiveQt</IncludePath>
+ <Defines>QT_AXCONTAINER_LIB</Defines>
+ <AdditionalLibraries>Qt6AxBase.lib</AdditionalLibraries>
+ <AdditionalLibrariesDebug>Qt6AxBased.lib</AdditionalLibrariesDebug>
+ </Module>
+ <Module Id="15">
+ <Name>Qt Bluetooth</Name>
+ <Selectable>true</Selectable>
+ <LibraryPrefix>QtBluetooth</LibraryPrefix>
+ <HasDLL>true</HasDLL>
+ <proVarQT>bluetooth</proVarQT>
+ <IncludePath>$(QTDIR)\include\QtBluetooth</IncludePath>
+ <Defines>QT_BLUETOOTH_LIB</Defines>
+ </Module>
+ <Module Id="16">
+ <Name>Qt 3D</Name>
+ <Selectable>true</Selectable>
+ <LibraryPrefix>Qt3DCore</LibraryPrefix>
+ <HasDLL>true</HasDLL>
+ <proVarQT>3dcore 3danimation 3dextras 3dinput 3dlogic 3drender</proVarQT>
+ <IncludePath>$(QTDIR)\include\Qt3DCore</IncludePath>
+ <IncludePath>$(QTDIR)\include\Qt3DAnimation</IncludePath>
+ <IncludePath>$(QTDIR)\include\Qt3DExtras</IncludePath>
+ <IncludePath>$(QTDIR)\include\Qt3DInput</IncludePath>
+ <IncludePath>$(QTDIR)\include\Qt3DLogic</IncludePath>
+ <IncludePath>$(QTDIR)\include\Qt3DRender</IncludePath>
+ <Defines>QT_3DCORE_LIB</Defines>
+ <Defines>QT_3DANIMATION_LIB</Defines>
+ <Defines>QT_3DEXTRAS_LIB</Defines>
+ <Defines>QT_3DINPUT_LIB</Defines>
+ <Defines>QT_3DLOGIC_LIB</Defines>
+ <Defines>QT_3DRENDER_LIB</Defines>
+ <AdditionalLibraries>Qt63DCore.lib</AdditionalLibraries>
+ <AdditionalLibraries>Qt63DAnimation.lib</AdditionalLibraries>
+ <AdditionalLibraries>Qt63DExtras.lib</AdditionalLibraries>
+ <AdditionalLibraries>Qt63DInput.lib</AdditionalLibraries>
+ <AdditionalLibraries>Qt63DLogic.lib</AdditionalLibraries>
+ <AdditionalLibraries>Qt63DRender.lib</AdditionalLibraries>
+ <AdditionalLibrariesDebug>Qt63DCored.lib</AdditionalLibrariesDebug>
+ <AdditionalLibrariesDebug>Qt63DAnimationd.lib</AdditionalLibrariesDebug>
+ <AdditionalLibrariesDebug>Qt63DExtrasd.lib</AdditionalLibrariesDebug>
+ <AdditionalLibrariesDebug>Qt63DInputd.lib</AdditionalLibrariesDebug>
+ <AdditionalLibrariesDebug>Qt63DLogicd.lib</AdditionalLibrariesDebug>
+ <AdditionalLibrariesDebug>Qt63DRenderd.lib</AdditionalLibrariesDebug>
+ </Module>
+ <Module Id="17">
+ <Name>Qt 5 Core Compatibility APIs</Name>
+ <Selectable>true</Selectable>
+ <LibraryPrefix>QtCore5Compat</LibraryPrefix>
+ <HasDLL>true</HasDLL>
+ <proVarQT>core5compat</proVarQT>
+ <IncludePath>$(QTDIR)\include\QtCore5Compat</IncludePath>
+ <Defines>QT_CORE5COMPAT_LIB</Defines>
+ </Module>
+ <Module Id="18"> <!-- TODO: Split? -->
+ <Name>Qt for Automation</Name>
+ <proVarQT>coap mqtt opcua</proVarQT>
+ <Selectable>true</Selectable>
+ <LibraryPrefix>QtCoap</LibraryPrefix>
+ <AdditionalLibraries>Qt6Coap.lib</AdditionalLibraries>
+ <AdditionalLibraries>Qt6Coapd.lib</AdditionalLibraries>
+ <AdditionalLibraries>Qt6Mqtt.lib</AdditionalLibraries>
+ <AdditionalLibraries>Qt6Mqttd.lib</AdditionalLibraries>
+ <AdditionalLibraries>Qt6OpcUa.lib</AdditionalLibraries>
+ <AdditionalLibraries>Qt6OpcUad.lib</AdditionalLibraries>
+ </Module>
+ <Module Id="19">
+ <Name>Qt Concurrent</Name>
+ <Selectable>true</Selectable>
+ <LibraryPrefix>QtConcurrent</LibraryPrefix>
+ <HasDLL>true</HasDLL>
+ <proVarQT>concurrent</proVarQT>
+ <IncludePath>$(QTDIR)\include\QtConcurrent</IncludePath>
+ <Defines>QT_CONCURRENT_LIB</Defines>
+ </Module>
+ <Module Id="20">
+ <Name>Qt Help</Name>
+ <Selectable>true</Selectable>
+ <LibraryPrefix>QtHelp</LibraryPrefix>
+ <HasDLL>true</HasDLL>
+ <proVarQT>help</proVarQT>
+ <IncludePath>$(QTDIR)\include\QtHelp</IncludePath>
+ <Defines>QT_HELP_LIB</Defines>
+ </Module>
+ <!--
+ Image formats
+ -->
+ <Module Id="21">
+ <Name>Qt OpenGL</Name>
+ <Selectable>true</Selectable>
+ <LibraryPrefix>QtOpenGL</LibraryPrefix>
+ <HasDLL>true</HasDLL>
+ <proVarQT>opengl</proVarQT>
+ <IncludePath>$(QTDIR)\include\QtOpenGL</IncludePath>
+ <Defines>QT_OPENGL_LIB</Defines>
+ </Module>
+ <Module Id="22">
+ <Name>Qt Multimedia</Name>
+ <Selectable>true</Selectable>
+ <LibraryPrefix>QtMultimedia</LibraryPrefix>
+ <HasDLL>true</HasDLL>
+ <proVarQT>multimedia</proVarQT>
+ <IncludePath>$(QTDIR)\include\QtMultimedia</IncludePath>
+ <Defines>QT_MULTIMEDIA_LIB</Defines>
+ </Module>
+ <Module Id="23">
+ <Name>Qt Print Support</Name>
+ <Selectable>true</Selectable>
+ <LibraryPrefix>QtPrintSupport</LibraryPrefix>
+ <HasDLL>true</HasDLL>
+ <proVarQT>printsupport</proVarQT>
+ <IncludePath>$(QTDIR)\include\QtPrintSupport</IncludePath>
+ <Defines>QT_PRINTSUPPORT_LIB</Defines>
+ </Module>
+ <Module Id="24">
+ <Name>Qt Quick Widgets</Name>
+ <Selectable>true</Selectable>
+ <LibraryPrefix>QtQuickWidgets</LibraryPrefix>
+ <HasDLL>true</HasDLL>
+ <proVarQT>quickwidgets</proVarQT>
+ <IncludePath>$(QTDIR)\include\QtQuickWidgets</IncludePath>
+ <Defines>QT_QUICKWIDGETS_LIB</Defines>
+ </Module>
+ <Module Id="25">
+ <Name>Qt Remote Objects</Name>
+ <Selectable>true</Selectable>
+ <LibraryPrefix>QtRemoteObjects</LibraryPrefix>
+ <HasDLL>true</HasDLL>
+ <proVarQT>remoteobjects</proVarQT>
+ <IncludePath>$(QTDIR)\include\QtRemoteObjects</IncludePath>
+ <Defines>QT_REMOTEOBJECTS_LIB</Defines>
+ </Module>
+ <Module Id="26">
+ <Name>Qt SCXML</Name>
+ <Selectable>true</Selectable>
+ <LibraryPrefix>QtScxml</LibraryPrefix>
+ <HasDLL>true</HasDLL>
+ <proVarQT>scxml</proVarQT>
+ <IncludePath>$(QTDIR)\include\QtScxml</IncludePath>
+ <Defines>QT_SCXML_LIB</Defines>
+ </Module>
+ <Module Id="27">
+ <Name>Qt Sensors</Name>
+ <Selectable>true</Selectable>
+ <LibraryPrefix>QtSensors</LibraryPrefix>
+ <HasDLL>true</HasDLL>
+ <proVarQT>sensors</proVarQT>
+ <IncludePath>$(QTDIR)\include\QtSensors</IncludePath>
+ <Defines>QT_SENSORS_LIB</Defines>
+ </Module>
+ <Module Id="28">
+ <Name>Qt Serial Bus</Name>
+ <Selectable>true</Selectable>
+ <LibraryPrefix>QtSerialBus</LibraryPrefix>
+ <HasDLL>true</HasDLL>
+ <proVarQT>serialbus</proVarQT>
+ <IncludePath>$(QTDIR)\include\QtSerialBus</IncludePath>
+ <Defines>QT_SERIALBUS_LIB</Defines>
+ </Module>
+ <Module Id="29">
+ <Name>Qt Serial Port</Name>
+ <Selectable>true</Selectable>
+ <LibraryPrefix>QtSerialPort</LibraryPrefix>
+ <HasDLL>true</HasDLL>
+ <proVarQT>serialport</proVarQT>
+ <IncludePath>$(QTDIR)\include\QtSerialPort</IncludePath>
+ <Defines>QT_SERIALPORT_LIB</Defines>
+ </Module>
+ <Module Id="30">
+ <Name>Qt SQL</Name>
+ <Selectable>true</Selectable>
+ <LibraryPrefix>QtSql</LibraryPrefix>
+ <HasDLL>true</HasDLL>
+ <proVarQT>sql</proVarQT>
+ <IncludePath>$(QTDIR)\include\QtSql</IncludePath>
+ <Defines>QT_SQL_LIB</Defines>
+ </Module>
+ <Module Id="31">
+ <Name>Qt State Machine</Name>
+ <Selectable>true</Selectable>
+ <LibraryPrefix>QtStateMachine</LibraryPrefix>
+ <HasDLL>true</HasDLL>
+ <proVarQT>statemachine</proVarQT>
+ <IncludePath>$(QTDIR)\include\QtStateMachine</IncludePath>
+ <Defines>QT_STATEMACHINE_LIB</Defines>
+ </Module>
+ <Module Id="32">
+ <Name>Qt SVG</Name>
+ <Selectable>true</Selectable>
+ <LibraryPrefix>QtSvg</LibraryPrefix>
+ <HasDLL>true</HasDLL>
+ <proVarQT>svg</proVarQT>
+ <IncludePath>$(QTDIR)\include\QtSvg</IncludePath>
+ <Defines>QT_SVG_LIB</Defines>
+ </Module>
+ <Module Id="33">
+ <Name>Qt UI Tools</Name>
+ <Selectable>true</Selectable>
+ <LibraryPrefix>QtUiTools</LibraryPrefix>
+ <HasDLL>false</HasDLL>
+ <proVarQT>uitools</proVarQT>
+ <IncludePath>$(QTDIR)\include\QtUiTools</IncludePath>
+ <Defines>QT_UITOOLS_LIB</Defines>
+ </Module>
+ <Module Id="34">
+ <Name>Qt WebChannel</Name>
+ <Selectable>true</Selectable>
+ <LibraryPrefix>QtWebChannel</LibraryPrefix>
+ <HasDLL>true</HasDLL>
+ <proVarQT>webchannel</proVarQT>
+ <IncludePath>$(QTDIR)\include\QtWebChannel</IncludePath>
+ <Defines>QT_WEBCHANNEL_LIB</Defines>
+ </Module>
+ <Module Id="35">
+ <Name>Qt WebEngine</Name>
+ <Selectable>true</Selectable>
+ <LibraryPrefix>QtWebEngine</LibraryPrefix>
+ <HasDLL>true</HasDLL>
+ <proVarQT>webenginecore</proVarQT>
+ <IncludePath>$(QTDIR)\include\QtWebEngine</IncludePath>
+ <IncludePath>$(QTDIR)\include\QtWebEngineCore</IncludePath>
+ <Defines>QT_WEBENGINE_LIB</Defines>
+ <Defines>QT_WEBENGINECORE_LIB</Defines>
+ <AdditionalLibraries>Qt6WebEngine.lib</AdditionalLibraries>
+ <AdditionalLibraries>Qt6WebEngineCore.lib</AdditionalLibraries>
+ <AdditionalLibrariesDebug>Qt6WebEngined.lib</AdditionalLibrariesDebug>
+ <AdditionalLibrariesDebug>Qt6WebEngineCored.lib</AdditionalLibrariesDebug>
+ </Module>
+ <Module Id="36">
+ <Name>Qt WebSockets</Name>
+ <Selectable>true</Selectable>
+ <LibraryPrefix>QtWebSockets</LibraryPrefix>
+ <HasDLL>true</HasDLL>
+ <proVarQT>websockets</proVarQT>
+ <IncludePath>$(QTDIR)\include\QtWebSockets</IncludePath>
+ <Defines>QT_WEBSOCKETS_LIB</Defines>
+ </Module>
+ <Module Id="37">
+ <Name>WebView</Name>
+ <proVarQT>webview</proVarQT>
+ <Selectable>true</Selectable>
+ <LibraryPrefix>QtWebView</LibraryPrefix>
+ </Module>
+ <Module Id="38">
+ <Name>Qt XML</Name>
+ <Selectable>true</Selectable>
+ <LibraryPrefix>QtXml</LibraryPrefix>
+ <HasDLL>true</HasDLL>
+ <proVarQT>xml</proVarQT>
+ <IncludePath>$(QTDIR)\include\QtXml</IncludePath>
+ <Defines>QT_XML_LIB</Defines>
+ </Module>
+ <Module Id="39">
+ <Name>Qt Positioning</Name>
+ <Selectable>true</Selectable>
+ <LibraryPrefix>QtPositioning</LibraryPrefix>
+ <HasDLL>true</HasDLL>
+ <proVarQT>positioning</proVarQT>
+ <IncludePath>$(QTDIR)\include\QtPositioning</IncludePath>
+ <Defines>QT_POSITIONING_LIB</Defines>
+ </Module>
+ <Module Id="40">
+ <Name>Qt NFC</Name>
+ <Selectable>true</Selectable>
+ <LibraryPrefix>QtNfc</LibraryPrefix>
+ <HasDLL>true</HasDLL>
+ <proVarQT>nfc</proVarQT>
+ <IncludePath>$(QTDIR)\include\QtNfc</IncludePath>
+ <Defines>QT_NFC_LIB</Defines>
+ </Module>
+ <Module Id="41">
+ <Name>Qt Charts</Name>
+ <Selectable>true</Selectable>
+ <LibraryPrefix>QtCharts</LibraryPrefix>
+ <HasDLL>true</HasDLL>
+ <proVarQT>charts</proVarQT>
+ <IncludePath>$(QTDIR)\include\QtCharts</IncludePath>
+ <Defines>QT_CHARTS_LIB</Defines>
+ </Module>
+ <Module Id="42">
+ <Name>Qt Data Visualization</Name>
+ <Selectable>true</Selectable>
+ <LibraryPrefix>QtDataVisualization</LibraryPrefix>
+ <HasDLL>true</HasDLL>
+ <proVarQT>datavisualization</proVarQT>
+ <IncludePath>$(QTDIR)\include\QtDataVisualization</IncludePath>
+ <Defines>QT_DATAVISUALIZATION_LIB</Defines>
+ </Module>
+ <!--
+ lottie
+ -->
+ <Module Id="44">
+ <Name>Qt Network Authorization</Name>
+ <Selectable>true</Selectable>
+ <LibraryPrefix>QtNetworkAuth</LibraryPrefix>
+ <HasDLL>true</HasDLL>
+ <proVarQT>networkauth</proVarQT>
+ <IncludePath>$(QTDIR)\include\QtNetworkAuth</IncludePath>
+ <Defines>QT_NETWORKAUTH_LIB</Defines>
+ </Module>
+ <Module Id="45">
+ <Name>Qt Virtual Keyboard</Name>
+ <proVarQT>virtualkeyboard</proVarQT>
+ <Selectable>true</Selectable>
+ <LibraryPrefix>QtVirtualKeyboard</LibraryPrefix>
+ </Module>
+ <Module Id="46">
+ <Name>Qt Quick 3D</Name>
+ <Selectable>true</Selectable>
+ <LibraryPrefix>Qt3DQuick</LibraryPrefix>
+ <HasDLL>true</HasDLL>
+ <proVarQT>3dquick</proVarQT>
+ <IncludePath>$(QTDIR)\include\Qt3DQuick</IncludePath>
+ <IncludePath>$(QTDIR)\include\Qt3DQuickAnimation</IncludePath>
+ <IncludePath>$(QTDIR)\include\Qt3DQuickExtras</IncludePath>
+ <IncludePath>$(QTDIR)\include\Qt3DQuickInput</IncludePath>
+ <IncludePath>$(QTDIR)\include\Qt3DQuickRender</IncludePath>
+ <IncludePath>$(QTDIR)\include\Qt3DQuickScene2D</IncludePath>
+ <Defines>QT_3DQUICK_LIB</Defines>
+ <Defines>QT_3DQUICKANIMATION_LIB</Defines>
+ <Defines>QT_3DQUICKEXTRAS_LIB</Defines>
+ <Defines>QT_3DQUICKINPUT_LIB</Defines>
+ <Defines>QT_3DQUICKRENDER_LIB</Defines>
+ <Defines>QT_3DQUICKSCENE2D_LIB</Defines>
+ <AdditionalLibraries>Qt63DQuick.lib</AdditionalLibraries>
+ <AdditionalLibraries>Qt63DQuickAnimation.lib</AdditionalLibraries>
+ <AdditionalLibraries>Qt63DQuickExtras.lib</AdditionalLibraries>
+ <AdditionalLibraries>Qt63DQuickInput.lib</AdditionalLibraries>
+ <AdditionalLibraries>Qt63DQuickRender.lib</AdditionalLibraries>
+ <AdditionalLibraries>Qt63DQuickScene2D.lib</AdditionalLibraries>
+ <AdditionalLibrariesDebug>Qt63DQuickd.lib</AdditionalLibrariesDebug>
+ <AdditionalLibrariesDebug>Qt63DQuickAnimationd.lib</AdditionalLibrariesDebug>
+ <AdditionalLibrariesDebug>Qt63DQuickExtrasd.lib</AdditionalLibrariesDebug>
+ <AdditionalLibrariesDebug>Qt63DQuickInputd.lib</AdditionalLibrariesDebug>
+ <AdditionalLibrariesDebug>Qt63DQuickRenderd.lib</AdditionalLibrariesDebug>
+ <AdditionalLibrariesDebug>Qt63DQuickScene2Dd.lib</AdditionalLibrariesDebug>
+ </Module>
+ <Module Id="47">
+ <Name>Qt Quick Timeline</Name>
+ <proVarQT>quicktimeline</proVarQT>
+ <Selectable>true</Selectable>
+ <LibraryPrefix>QtQuickTimeline</LibraryPrefix>
+ </Module>
+ <Module Id="48">
+ <Name>Qt Shader Tools</Name>
+ <proVarQT>shadertools</proVarQT>
+ <Selectable>true</Selectable>
+ <LibraryPrefix>QtShaderTools</LibraryPrefix>
+ </Module>
+ <Module Id="49">
+ <Name>Qt Wayland Compositor</Name>
+ <proVarQT>waylandcompositor</proVarQT>
+ <Selectable>true</Selectable>
+ <LibraryPrefix>QtWaylandCompositor</LibraryPrefix>
+ </Module>
+</QtVsTools>
diff --git a/QtVsTools.Wizards/ItemWizard/QtClass/QtClassWizard.cs b/QtVsTools.Wizards/ItemWizard/QtClass/QtClassWizard.cs
index 736d6307..b9415ca7 100644
--- a/QtVsTools.Wizards/ItemWizard/QtClass/QtClassWizard.cs
+++ b/QtVsTools.Wizards/ItemWizard/QtClass/QtClassWizard.cs
@@ -82,7 +82,7 @@ namespace QtVsTools.Wizards.ItemWizard
InsertQObjectMacro = true,
LowerCaseFileNames = false,
UsePrecompiledHeader = false,
- DefaultModules = new List<string> { "core" }
+ DefaultModules = new List<string> { "QtCore" }
});
protected override WizardWindow WizardWindow => Lazy.Get(() =>
diff --git a/QtVsTools.Wizards/ItemWizard/Translation/TranslationWizard.cs b/QtVsTools.Wizards/ItemWizard/Translation/TranslationWizard.cs
index 47ce5502..be5df2b1 100644
--- a/QtVsTools.Wizards/ItemWizard/Translation/TranslationWizard.cs
+++ b/QtVsTools.Wizards/ItemWizard/Translation/TranslationWizard.cs
@@ -66,7 +66,7 @@ namespace QtVsTools.Wizards.ItemWizard
protected override WizardData WizardData => Lazy.Get(() =>
WizardData, () => new TsWizardData
{
- DefaultModules = new List<string> { "core"}
+ DefaultModules = new List<string> { "QtCore"}
});
protected override WizardWindow WizardWindow => Lazy.Get(() =>
diff --git a/QtVsTools.Wizards/ItemWizard/WidgetsClass/WidgetsClassWizard.cs b/QtVsTools.Wizards/ItemWizard/WidgetsClass/WidgetsClassWizard.cs
index 972d43d2..5155de41 100644
--- a/QtVsTools.Wizards/ItemWizard/WidgetsClass/WidgetsClassWizard.cs
+++ b/QtVsTools.Wizards/ItemWizard/WidgetsClass/WidgetsClassWizard.cs
@@ -91,7 +91,7 @@ namespace QtVsTools.Wizards.ItemWizard
InsertQObjectMacro = true,
LowerCaseFileNames = false,
UsePrecompiledHeader = false,
- DefaultModules = new List<string> { "core", "gui", "widgets" }
+ DefaultModules = new List<string> { "QtCore", "QtGui", "QtWidgets" }
});
protected override WizardWindow WizardWindow => Lazy.Get(() =>
diff --git a/QtVsTools.Wizards/ProjectWizard/ConfigPage.xaml.cs b/QtVsTools.Wizards/ProjectWizard/ConfigPage.xaml.cs
index fcd99bac..4dedd10c 100644
--- a/QtVsTools.Wizards/ProjectWizard/ConfigPage.xaml.cs
+++ b/QtVsTools.Wizards/ProjectWizard/ConfigPage.xaml.cs
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2020 The Qt Company Ltd.
+** Copyright (C) 2022 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt VS Tools.
@@ -155,7 +155,15 @@ namespace QtVsTools.Wizards.ProjectWizard
{
Loaded -= OnLoaded;
- var qtModules = QtModules.Instance.GetAvailableModules()
+ qtVersionList = new[] { QT_VERSION_DEFAULT, QT_VERSION_BROWSE }
+ .Union(QtVersionManager.The().GetVersions());
+
+ if (defaultQtVersionInfo == null) {
+ Validate();
+ return;
+ }
+
+ var qtModules = QtModules.Instance.GetAvailableModules(defaultQtVersionInfo.qtMajor)
.Where((QtModule mi) => mi.Selectable)
.Select((QtModule mi) => new Module()
{
@@ -165,14 +173,6 @@ namespace QtVsTools.Wizards.ProjectWizard
IsReadOnly = Data.DefaultModules.Contains(mi.LibraryPrefix),
});
- qtVersionList = new[] { QT_VERSION_DEFAULT, QT_VERSION_BROWSE }
- .Union(QtVersionManager.The().GetVersions());
-
- if (defaultQtVersionInfo == null) {
- Validate();
- return;
- }
-
defaultConfigs = new CloneableList<Config> {
new Config {
Name = "Debug",
@@ -342,6 +342,16 @@ namespace QtVsTools.Wizards.ProjectWizard
config.Platform = config.QtVersion.is64Bit()
? ProjectPlatforms.X64.Cast<string>()
: ProjectPlatforms.Win32.Cast<string>();
+ config.Modules =
+ QtModules.Instance.GetAvailableModules(config.QtVersion.qtMajor)
+ .Where((QtModule mi) => mi.Selectable)
+ .Select((QtModule mi) => new Module()
+ {
+ Name = mi.Name,
+ Id = mi.proVarQT,
+ IsSelected = Data.DefaultModules.Contains(mi.LibraryPrefix),
+ IsReadOnly = Data.DefaultModules.Contains(mi.LibraryPrefix),
+ }).ToDictionary((Module m) => m.Name);
} else if (config.QtVersionPath.StartsWith("SSH:")) {
config.Target = ProjectTargets.LinuxSSH.Cast<string>();
} else if (config.QtVersionPath.StartsWith("WSL:")) {