Skip to main content
summaryrefslogtreecommitdiffstats
path: root/qt
diff options
context:
space:
mode:
authorDoug Schaefer2017-10-16 15:06:37 -0400
committerDoug Schaefer2017-10-16 16:09:41 -0400
commit6f06e634c4a248e6335fc553d583d368480fc1d3 (patch)
treeb5a683fc06ff26d9297e5247c411db01afd31467 /qt
parent48d5342815f83539aa5d7d5fc354d61cfedf31b3 (diff)
downloadorg.eclipse.cdt-6f06e634c4a248e6335fc553d583d368480fc1d3.tar.gz
org.eclipse.cdt-6f06e634c4a248e6335fc553d583d368480fc1d3.tar.xz
org.eclipse.cdt-6f06e634c4a248e6335fc553d583d368480fc1d3.zip
Fix up handling of Qt build config defaults.
Don't rely on default properties any more. Make sure we can handle the cases when the properties are null. Change-Id: I8b359891286118553399e7635d2ea4b7f147892a
Diffstat (limited to 'qt')
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/build/QtBuildConfiguration.java47
1 files changed, 9 insertions, 38 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 3ef3b6983a..7f6c38fa4a 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
@@ -144,6 +144,7 @@ public class QtBuildConfiguration extends CBuildConfiguration
if (launchMode != null) {
settings.put(LAUNCH_MODE, launchMode);
}
+
try {
settings.flush();
} catch (BackingStoreException e) {
@@ -463,47 +464,17 @@ public class QtBuildConfiguration extends CBuildConfiguration
}
return buildCommand;
} else {
- return null;
- }
-
- }
-
- @Override
- public Map<String, String> getDefaultProperties() {
- Map<String, String> defaults = super.getDefaultProperties();
-
- String qmakeCommand = qtInstall.getQmakePath().toString();
- defaults.put(QMAKE_COMMAND, qmakeCommand);
-
- String qmakeArgs;
- String launchMode = getLaunchMode();
- if (launchMode != null) {
- switch (launchMode) {
- case "run": //$NON-NLS-1$
- qmakeArgs = "CONFIG-=debug_and_release CONFIG+=release"; //$NON-NLS-1$
- break;
- case "debug": //$NON-NLS-1$
- qmakeArgs = "CONFIG-=debug_and_release CONFIG+=debug"; //$NON-NLS-1$
- break;
- default:
- qmakeArgs = "CONFIG-=debug_and_release CONFIG+=launch_mode_" + launchMode; //$NON-NLS-1$
+ Path command = findCommand("make"); //$NON-NLS-1$
+ if (command == null) {
+ command = findCommand("mingw32-make"); //$NON-NLS-1$
}
- } else {
- qmakeArgs = "CONFIG+=debug_and_release CONFIG+=launch_modeall"; //$NON-NLS-1$
- }
- defaults.put(QMAKE_ARGS, qmakeArgs);
-
- String buildCommand = "make"; //$NON-NLS-1$
- if (findCommand(buildCommand) == null) {
- buildCommand = "mingw32-make"; //$NON-NLS-1$
- if (findCommand(buildCommand) == null) {
- // Neither was found, default to make
- buildCommand = "make"; //$NON-NLS-1$
+
+ if (command != null) {
+ return new String[] { command.toString() };
+ } else {
+ return null;
}
}
- defaults.put(BUILD_COMMAND, buildCommand);
-
- return defaults;
}
@Override

Back to the top