--- a/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/ProjectUIPlugin.java Mon May 17 16:11:42 2010 -0500
+++ b/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/ProjectUIPlugin.java Wed May 19 10:09:01 2010 -0500
@@ -62,6 +62,9 @@
// The shared instance
private static ProjectUIPlugin plugin;
+ // YUCK: Project nature copied from QtUtils
+ public static final String QT_NATURE_ID = "com.trolltech.qtcppproject.QtNature";
+
/**
* The constructor
@@ -181,6 +184,10 @@
job.setRule(null); // no rule needed here - could just block important jobs
job.schedule();
+ if (isQtProject(project))
+ return; // Qt project wizards flip to their own perspective
+
+
// set the perspective to Carbide C/C++
try {
IWorkbench workbench = getDefault().getWorkbench();
@@ -246,6 +253,19 @@
}
}
+ private static boolean isQtProject(IProject project) {
+ if (project == null){
+ return false;
+ }
+ try {
+ return project.hasNature(QT_NATURE_ID);
+ } catch (CoreException e){
+ e.printStackTrace();
+ }
+ return false;
+
+ }
+
public static boolean keepProjectsInSync() {
IPreferenceStore store = ProjectUIPlugin.getDefault().getPreferenceStore();
return store.getBoolean(PreferenceConstants.PREF_KEEP_PROJECTS_IN_SYNC);