# HG changeset patch
# User timkelly
# Date 1267114824 21600
# Node ID ef5a4ad94acfe7d0d5c73596165d5d8d906fe647
# Parent 82708fe77230860e271dd3a49c3ae7ce02126ff6
Add support for qmke command provider extension.
diff -r 82708fe77230 -r ef5a4ad94acf qt/com.nokia.carbide.cpp.qt.ui/plugin.xml
--- a/qt/com.nokia.carbide.cpp.qt.ui/plugin.xml Wed Feb 24 15:58:49 2010 -0600
+++ b/qt/com.nokia.carbide.cpp.qt.ui/plugin.xml Thu Feb 25 10:20:24 2010 -0600
@@ -97,5 +97,14 @@
name="com.nokia.carbide.cpp.internal.qt.core.SDK-HookClient"/>
+
+
+
+
diff -r 82708fe77230 -r ef5a4ad94acf qt/com.nokia.carbide.cpp.qt.ui/src/com/nokia/carbide/cpp/internal/qt/ui/CarbideQmakeCommandProvider.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qt/com.nokia.carbide.cpp.qt.ui/src/com/nokia/carbide/cpp/internal/qt/ui/CarbideQmakeCommandProvider.java Thu Feb 25 10:20:24 2010 -0600
@@ -0,0 +1,50 @@
+package com.nokia.carbide.cpp.internal.qt.ui;
+
+import java.util.List;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+
+import com.nokia.carbide.cdt.builder.CarbideBuilderPlugin;
+import com.trolltech.qtcppproject.qmake.IQtQmakeCommandProvider;
+
+public class CarbideQmakeCommandProvider implements IQtQmakeCommandProvider {
+
+ public static final String SYMBIAN_ABLD_SPEC = "symbian-abld";
+ public static final String SYMBIAN_SBSV2_SPEC = "symbian-sbsv2";
+
+ public List getAdditionalArgs(IProject project) {
+
+ // Do nothing....
+ return null;
+ }
+
+ public String getProviderMkspec(IProject project) {
+ if (CarbideBuilderPlugin.getBuildManager().isCarbideSBSv2Project(project)){
+ return SYMBIAN_SBSV2_SPEC;
+ } else if (CarbideBuilderPlugin.getBuildManager().isCarbideProject(project)) {
+ return SYMBIAN_ABLD_SPEC;
+ }
+
+ // Project may just be being created so check the project session properties
+ boolean sbsv2Project = false;
+ Object property = null;
+ try {
+ property = project.getSessionProperty(CarbideBuilderPlugin.SBSV2_PROJECT);
+ //project.setSessionProperty(key, value)
+ } catch (CoreException e) {
+ e.printStackTrace();
+ }
+ if (property != null && property instanceof Boolean) {
+ sbsv2Project = ((Boolean)property).booleanValue();
+ }
+
+ if (sbsv2Project){
+ return SYMBIAN_SBSV2_SPEC;
+ } else {
+ return SYMBIAN_ABLD_SPEC;
+ }
+
+ }
+
+}
diff -r 82708fe77230 -r ef5a4ad94acf qt/com.nokia.carbide.cpp.qt.ui/src/com/nokia/carbide/cpp/internal/qt/ui/processes/ProjectCreatedTasksQt.java
--- a/qt/com.nokia.carbide.cpp.qt.ui/src/com/nokia/carbide/cpp/internal/qt/ui/processes/ProjectCreatedTasksQt.java Wed Feb 24 15:58:49 2010 -0600
+++ b/qt/com.nokia.carbide.cpp.qt.ui/src/com/nokia/carbide/cpp/internal/qt/ui/processes/ProjectCreatedTasksQt.java Thu Feb 25 10:20:24 2010 -0600
@@ -31,6 +31,7 @@
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
+import com.nokia.carbide.cdt.builder.CarbideBuilderPlugin;
import com.nokia.carbide.cpp.internal.qt.core.QtCorePlugin;
import com.nokia.carbide.cpp.internal.qt.core.QtSDKUtils;
import com.nokia.carbide.cpp.internal.qt.ui.QtUIPlugin;
@@ -60,7 +61,7 @@
if (project != null) {
// add qt nature here
QtCorePlugin.addQtNature(project, monitor);
-
+
// enable the pro file listener by default
new QtProject(project).setRunQMakeWhenProFileChanges(true);
@@ -83,6 +84,9 @@
Map envMods = new HashMap();
envMods.put("EPOCROOT", epocroot.setDevice(null).toOSString());
+ // Make sure we set the session property so when qmake is called we know the proper -spec to invoke
+ project.setSessionProperty(CarbideBuilderPlugin.SBSV2_PROJECT, Boolean.valueOf(useSBSv2Builder));
+
// run qmake to ensure bld.inf file exists
String errMsg = QMakeRunner.runQMake(project, envMods, monitor);
if (errMsg != null) {