Skip to main content
summaryrefslogtreecommitdiffstats
path: root/qt
diff options
context:
space:
mode:
authorDoug Schaefer2016-10-20 20:00:25 -0400
committerDoug Schaefer2016-10-20 20:01:52 -0400
commitfa84dad3705980c4ce1d5950f63112cd9a75a6b0 (patch)
tree87f5294a4cc96b4bfc554f0e98ac3dbd7d0c3ec0 /qt
parent0868cf82ee5fc5bbb5d88f63db57d42489a54242 (diff)
downloadorg.eclipse.cdt-fa84dad3705980c4ce1d5950f63112cd9a75a6b0.tar.gz
org.eclipse.cdt-fa84dad3705980c4ce1d5950f63112cd9a75a6b0.tar.xz
org.eclipse.cdt-fa84dad3705980c4ce1d5950f63112cd9a75a6b0.zip
Make launchMode a core thing and add Debug for CMake configs.
Diffstat (limited to 'qt')
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/build/QtBuildConfiguration.java26
1 files changed, 15 insertions, 11 deletions
diff --git a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/build/QtBuildConfiguration.java b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/build/QtBuildConfiguration.java
index d2bd857627..3236ea2af0 100644
--- a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/build/QtBuildConfiguration.java
+++ b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/build/QtBuildConfiguration.java
@@ -57,7 +57,6 @@ public class QtBuildConfiguration extends CBuildConfiguration
private static final String QTINSTALL_SPEC = "cdt.qt.install.spec"; //$NON-NLS-1$
private static final String LAUNCH_MODE = "cdt.qt.launchMode"; //$NON-NLS-1$
- private final String launchMode;
private final String qtInstallSpec;
private IQtInstall qtInstall;
private Map<String, String> properties;
@@ -89,15 +88,23 @@ public class QtBuildConfiguration extends CBuildConfiguration
Activator.error(String.format("Qt Install for build configuration %s not found.", name)));
}
- launchMode = settings.get(LAUNCH_MODE, null); // $NON-NLS-1$
+ String oldLaunchMode = settings.get(LAUNCH_MODE, null);
+ if (oldLaunchMode != null) {
+ setLaunchMode(oldLaunchMode);
+ settings.remove(LAUNCH_MODE);
+ try {
+ settings.flush();
+ } catch (BackingStoreException e) {
+ Activator.log(e);
+ }
+ }
}
QtBuildConfiguration(IBuildConfiguration config, String name, IToolChain toolChain, IQtInstall qtInstall,
String launchMode) throws CoreException {
- super(config, name, toolChain);
+ super(config, name, toolChain, launchMode);
this.qtInstall = qtInstall;
this.qtInstallSpec = qtInstall.getSpec();
- this.launchMode = launchMode;
IQtInstallManager manager = Activator.getService(IQtInstallManager.class);
manager.addListener(this);
@@ -136,17 +143,13 @@ public class QtBuildConfiguration extends CBuildConfiguration
}
@Override
- public String getLaunchMode() {
- return launchMode;
- }
-
- @Override
public Path getQmakeCommand() {
return getQtInstall().getQmakePath();
}
@Override
public String[] getQmakeConfig() {
+ String launchMode = getLaunchMode();
if (launchMode != null) {
switch (launchMode) {
case "run": //$NON-NLS-1$
@@ -185,7 +188,7 @@ public class QtBuildConfiguration extends CBuildConfiguration
case Platform.OS_WIN32:
return getBuildDirectory().resolve(projectName + ".exe"); //$NON-NLS-1$
case Platform.OS_LINUX:
- return getBuildDirectory().resolve(projectName); //$NON-NLS-1$
+ return getBuildDirectory().resolve(projectName);
default:
Path releaseFolder = getBuildDirectory().resolve("release"); //$NON-NLS-1$
return releaseFolder.resolve(projectName);
@@ -344,7 +347,8 @@ public class QtBuildConfiguration extends CBuildConfiguration
try (ErrorParserManager epm = new ErrorParserManager(project, getBuildDirectoryURI(), this,
getToolChain().getErrorParserIds())) {
// run make
- ProcessBuilder processBuilder = new ProcessBuilder(makeCommand.toString(), "all").directory(buildDir.toFile());
+ ProcessBuilder processBuilder = new ProcessBuilder(makeCommand.toString(), "all") //$NON-NLS-1$
+ .directory(buildDir.toFile());
setBuildEnvironment(processBuilder.environment());
Process process = processBuilder.start();
outStream.write(makeCommand.toString() + '\n');

Back to the top