# HG changeset patch # User timkelly # Date 1265907110 21600 # Node ID 82e9add879bf0ce3fe7fff49880d426af6286eb7 # Parent 657e34ac671f8751e28bf7163e84107dd0b614f8# Parent e0580496bfa3e19a7ca19856f4cdd9faf2c4ada9 merge commit diff -r 657e34ac671f -r 82e9add879bf core/com.nokia.carbide.cpp.sdk.core/META-INF/MANIFEST.MF diff -r 657e34ac671f -r 82e9add879bf core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/AbstractSDKManager.java --- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/AbstractSDKManager.java Thu Feb 11 10:41:44 2010 -0600 +++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/AbstractSDKManager.java Thu Feb 11 10:51:50 2010 -0600 @@ -654,8 +654,23 @@ String overallOutput = null; String stdErrLine = null; try { - while ((stdErrLine = br.readLine()) != null) { - overallOutput += stdErrLine; + + // Only try for 10 seconds then bail in case Raptor hangs + int maxTries = 20; + int numTries = 0; + while (numTries < maxTries) { + try { + Thread.sleep(500); + } catch (InterruptedException e) { + // ignore + } + if (br.ready()) { + while ((stdErrLine = br.readLine()) != null) { + overallOutput += stdErrLine; + } + break; + } + numTries++; } } catch (IOException e) { e.printStackTrace(); diff -r 657e34ac671f -r 82e9add879bf core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/SDKManager.java diff -r 657e34ac671f -r 82e9add879bf project/com.nokia.carbide.cpp.project.core.tests/src/com/nokia/carbide/cpp/project/core/tests/QtPropertiesTest.java --- a/project/com.nokia.carbide.cpp.project.core.tests/src/com/nokia/carbide/cpp/project/core/tests/QtPropertiesTest.java Thu Feb 11 10:41:44 2010 -0600 +++ b/project/com.nokia.carbide.cpp.project.core.tests/src/com/nokia/carbide/cpp/project/core/tests/QtPropertiesTest.java Thu Feb 11 10:51:50 2010 -0600 @@ -152,14 +152,6 @@ break; } } -// if (store.contains(binpathKey)) { -// binpath = store.getString(binpathKey); -// System.out.println("Binpath: " + binpath); -// } -// if (store.contains(includepathKey)) { -// includepath = store.getString(includepathKey); -// System.out.println("Inc Path: " + includepath); -// } } return foundIndex; diff -r 657e34ac671f -r 82e9add879bf project/com.nokia.carbide.cpp.project.core/src/com/nokia/carbide/cpp/internal/api/project/core/ProjectCorePluginUtility.java --- a/project/com.nokia.carbide.cpp.project.core/src/com/nokia/carbide/cpp/internal/api/project/core/ProjectCorePluginUtility.java Thu Feb 11 10:41:44 2010 -0600 +++ b/project/com.nokia.carbide.cpp.project.core/src/com/nokia/carbide/cpp/internal/api/project/core/ProjectCorePluginUtility.java Thu Feb 11 10:51:50 2010 -0600 @@ -20,15 +20,20 @@ import java.util.Map; import org.eclipse.cdt.core.settings.model.ICProjectDescription; +import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.CoreException; import com.nokia.carbide.cdt.builder.CarbideBuilderPlugin; import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration; +import com.nokia.carbide.cdt.builder.project.ICarbideConfigurationChangedListener; import com.nokia.carbide.cdt.builder.project.ICarbideProjectInfo; import com.nokia.carbide.cdt.builder.project.ICarbideProjectModifier; import com.nokia.carbide.cdt.builder.project.ISISBuilderInfo; import com.nokia.carbide.cdt.internal.api.builder.SISBuilderInfo2; +import com.nokia.carbide.cpp.internal.qt.core.QtCorePlugin; +import com.nokia.carbide.cpp.internal.qt.core.QtSDKUtils; +import com.nokia.carbide.cpp.project.core.ProjectCorePlugin; import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext; public class ProjectCorePluginUtility { diff -r 657e34ac671f -r 82e9add879bf qt/com.nokia.carbide.cpp.qt.core/.settings/org.eclipse.jdt.core.prefs --- a/qt/com.nokia.carbide.cpp.qt.core/.settings/org.eclipse.jdt.core.prefs Thu Feb 11 10:41:44 2010 -0600 +++ b/qt/com.nokia.carbide.cpp.qt.core/.settings/org.eclipse.jdt.core.prefs Thu Feb 11 10:51:50 2010 -0600 @@ -1,7 +1,74 @@ -#Thu Jul 24 13:26:54 CDT 2008 +#Wed Feb 10 21:25:23 CST 2010 eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.autoboxing=ignore +org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning +org.eclipse.jdt.core.compiler.problem.deadCode=warning +org.eclipse.jdt.core.compiler.problem.deprecation=warning +org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled +org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled +org.eclipse.jdt.core.compiler.problem.discouragedReference=warning +org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore +org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled +org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore +org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning +org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning +org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore +org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning +org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore +org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning +org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning +org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore +org.eclipse.jdt.core.compiler.problem.nullReference=warning +org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning +org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore +org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore +org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore +org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore +org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning +org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore +org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning +org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled +org.eclipse.jdt.core.compiler.problem.unusedImport=warning +org.eclipse.jdt.core.compiler.problem.unusedLabel=warning +org.eclipse.jdt.core.compiler.problem.unusedLocal=warning +org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled +org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning +org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning org.eclipse.jdt.core.compiler.source=1.5 diff -r 657e34ac671f -r 82e9add879bf qt/com.nokia.carbide.cpp.qt.core/META-INF/MANIFEST.MF --- a/qt/com.nokia.carbide.cpp.qt.core/META-INF/MANIFEST.MF Thu Feb 11 10:41:44 2010 -0600 +++ b/qt/com.nokia.carbide.cpp.qt.core/META-INF/MANIFEST.MF Thu Feb 11 10:51:50 2010 -0600 @@ -7,11 +7,14 @@ Bundle-Vendor: Nokia Require-Bundle: org.eclipse.core.runtime, org.eclipse.cdt.core, + org.eclipse.ui, org.eclipse.core.resources, org.eclipse.jface, com.nokia.carbide.cpp.sdk.core, com.nokia.carbide.cpp.sdk.ui, - com.trolltech.qtcppproject;bundle-version="1.6.0";resolution:=optional + com.nokia.cpp.utils.core;bundle-version="1.0.0", + com.trolltech.qtcppproject;bundle-version="1.6.0";resolution:=optional, + com.trolltech.qtproject;bundle-version="1.6.0";resolution:=optional Bundle-RequiredExecutionEnvironment: J2SE-1.5 Bundle-ActivationPolicy: lazy Export-Package: com.nokia.carbide.cpp.internal.qt.core diff -r 657e34ac671f -r 82e9add879bf qt/com.nokia.carbide.cpp.qt.core/plugin.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/qt/com.nokia.carbide.cpp.qt.core/plugin.xml Thu Feb 11 10:51:50 2010 -0600 @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff -r 657e34ac671f -r 82e9add879bf qt/com.nokia.carbide.cpp.qt.core/src/com/nokia/carbide/cpp/internal/qt/core/QtCorePlugin.java --- a/qt/com.nokia.carbide.cpp.qt.core/src/com/nokia/carbide/cpp/internal/qt/core/QtCorePlugin.java Thu Feb 11 10:41:44 2010 -0600 +++ b/qt/com.nokia.carbide.cpp.qt.core/src/com/nokia/carbide/cpp/internal/qt/core/QtCorePlugin.java Thu Feb 11 10:51:50 2010 -0600 @@ -17,6 +17,8 @@ */ package com.nokia.carbide.cpp.internal.qt.core; +import java.util.List; + import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IProjectDescription; import org.eclipse.core.runtime.CoreException; @@ -24,6 +26,8 @@ import org.eclipse.core.runtime.Plugin; import org.osgi.framework.BundleContext; +import com.nokia.carbide.cpp.sdk.core.ISymbianSDK; +import com.nokia.carbide.cpp.sdk.core.SDKCorePlugin; import com.trolltech.qtcppproject.QtNature; public class QtCorePlugin extends Plugin { @@ -49,6 +53,7 @@ public void start(BundleContext context) throws Exception { super.start(context); plugin = this; + scanForQtSDKs(); } /* @@ -94,5 +99,12 @@ return false; } } + + private void scanForQtSDKs(){ + List sdkList = SDKCorePlugin.getSDKManager().getSDKList(); + for (ISymbianSDK sdk : sdkList){ + QtSDKUtils.addQtSDKForSymbianSDK(sdk, false); + } + } } diff -r 657e34ac671f -r 82e9add879bf qt/com.nokia.carbide.cpp.qt.ui/plugin.xml --- a/qt/com.nokia.carbide.cpp.qt.ui/plugin.xml Thu Feb 11 10:41:44 2010 -0600 +++ b/qt/com.nokia.carbide.cpp.qt.ui/plugin.xml Thu Feb 11 10:51:50 2010 -0600 @@ -87,5 +87,9 @@ class="com.nokia.carbide.cpp.internal.qt.ui.QMakeEnvironmentModifier"> + + + diff -r 657e34ac671f -r 82e9add879bf qt/com.nokia.carbide.cpp.qt.ui/src/com/nokia/carbide/cpp/internal/qt/ui/QtUIPlugin.java --- a/qt/com.nokia.carbide.cpp.qt.ui/src/com/nokia/carbide/cpp/internal/qt/ui/QtUIPlugin.java Thu Feb 11 10:41:44 2010 -0600 +++ b/qt/com.nokia.carbide.cpp.qt.ui/src/com/nokia/carbide/cpp/internal/qt/ui/QtUIPlugin.java Thu Feb 11 10:51:50 2010 -0600 @@ -19,6 +19,7 @@ import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IProject; +import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; @@ -32,12 +33,15 @@ import com.nokia.carbide.cdt.builder.CarbideBuilderPlugin; import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration; +import com.nokia.carbide.cdt.builder.project.ICarbideConfigurationChangedListener; import com.nokia.carbide.cdt.builder.project.ICarbideProjectInfo; import com.nokia.carbide.cdt.builder.project.ISISBuilderInfo; import com.nokia.carbide.cdt.internal.api.builder.SISBuilderInfo2; +import com.nokia.carbide.cpp.internal.qt.core.QtCorePlugin; +import com.nokia.carbide.cpp.internal.qt.core.QtSDKUtils; import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext; -public class QtUIPlugin extends AbstractUIPlugin { +public class QtUIPlugin extends AbstractUIPlugin implements ICarbideConfigurationChangedListener { // The plug-in ID public static final String PLUGIN_ID = "com.nokia.carbide.cpp.qt.ui"; //$NON-NLS-1$ @@ -58,6 +62,7 @@ public void start(BundleContext context) throws Exception { super.start(context); plugin = this; + CarbideBuilderPlugin.addBuildConfigChangedListener(this); } /* @@ -65,6 +70,7 @@ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) */ public void stop(BundleContext context) throws Exception { + CarbideBuilderPlugin.removeBuildConfigChangedListener(this); plugin = null; super.stop(context); } @@ -140,4 +146,28 @@ // PlatformUI.getWorkbench() throws if running headless } } + + public void buildConfigurationChanged(ICarbideBuildConfiguration currentConfig) { + checkDefaultQtSDKForProject(currentConfig); + } + + @SuppressWarnings("restriction") + private void checkDefaultQtSDKForProject(ICarbideBuildConfiguration currentConfig){ + IProject project = currentConfig.getCarbideProject().getProject(); + if (project != null && QtCorePlugin.isQtProject(project)) { + try { + String qtSDKName = QtSDKUtils.getQtSDKNameForSymbianSDK(currentConfig.getSDK()); + // If qtSDK is not internally installed or is set, don't change anything + if (qtSDKName == null || QtSDKUtils.getDefaultQtSDKForProject(project) == null) { + return; + } + + QtSDKUtils.setDefaultQtSDKForProject(project, qtSDKName); + + } catch (CoreException e) { + e.printStackTrace(); + } + } + + } } diff -r 657e34ac671f -r 82e9add879bf 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 Thu Feb 11 10:41:44 2010 -0600 +++ b/qt/com.nokia.carbide.cpp.qt.ui/src/com/nokia/carbide/cpp/internal/qt/ui/processes/ProjectCreatedTasksQt.java Thu Feb 11 10:51:50 2010 -0600 @@ -32,9 +32,11 @@ import org.eclipse.core.runtime.Status; 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; import com.nokia.carbide.cpp.project.ui.processes.ProjectCreatedTasks; import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext; +import com.nokia.carbide.cpp.sdk.core.ISymbianSDK; import com.nokia.carbide.template.engine.ITemplate; import com.nokia.carbide.templatewizard.process.IParameter; import com.trolltech.qtcppproject.QtProject; @@ -46,6 +48,7 @@ super(); } + @SuppressWarnings("restriction") @Override public void process(ITemplate template, List parameters, IProgressMonitor monitor) throws CoreException { @@ -81,6 +84,19 @@ // set the qmake generated pkg files to be built QtUIPlugin.setupSISBuilderSettings(project); + + // set the default Qt SDK + ISymbianSDK sdk = ((ISymbianBuildContext)listOfBuildConfigs.get(0)).getSDK(); + String qtSDKName = QtSDKUtils.getQtSDKNameForSymbianSDK(sdk); + if (qtSDKName == null){ + QtSDKUtils.addQtSDKForSymbianSDK(sdk, false); + qtSDKName = QtSDKUtils.getQtSDKNameForSymbianSDK(sdk); + } + + if (qtSDKName != null){ + QtSDKUtils.setDefaultQtSDKForProject(project, qtSDKName); + } + } } } diff -r 657e34ac671f -r 82e9add879bf qt/com.nokia.carbide.cpp.qt.ui/src/com/nokia/carbide/cpp/internal/qt/ui/wizard/QtProFileImportWizard.java --- a/qt/com.nokia.carbide.cpp.qt.ui/src/com/nokia/carbide/cpp/internal/qt/ui/wizard/QtProFileImportWizard.java Thu Feb 11 10:41:44 2010 -0600 +++ b/qt/com.nokia.carbide.cpp.qt.ui/src/com/nokia/carbide/cpp/internal/qt/ui/wizard/QtProFileImportWizard.java Thu Feb 11 10:51:50 2010 -0600 @@ -40,6 +40,7 @@ import com.nokia.carbide.cpp.internal.api.sdk.ISDKManagerInternal; import com.nokia.carbide.cpp.internal.project.ui.ProjectUIPlugin; 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; import com.nokia.carbide.cpp.project.core.ProjectCorePlugin; import com.nokia.carbide.cpp.sdk.core.*; @@ -120,7 +121,19 @@ // set the qmake generated pkg files to be built QtUIPlugin.setupSISBuilderSettings(newProject); - + + // Set the default Qt SDK, if any + ISymbianSDK sdk = selectedConfigs.get(0).getSDK(); + String qtSDKName = QtSDKUtils.getQtSDKNameForSymbianSDK(sdk); + if (qtSDKName == null){ + QtSDKUtils.addQtSDKForSymbianSDK(sdk, false); + qtSDKName = QtSDKUtils.getQtSDKNameForSymbianSDK(sdk); + } + + if (qtSDKName != null){ + QtSDKUtils.setDefaultQtSDKForProject(newProject, qtSDKName); + } + if (monitor.isCanceled()) { // the user canceled the import so delete the project newProject.delete(false, true, null);