Skip to main content
summaryrefslogtreecommitdiffstats
path: root/qt
diff options
context:
space:
mode:
authorDoug Schaefer2016-08-25 15:52:40 -0400
committerGerrit Code Review @ Eclipse.org2016-08-25 16:49:28 -0400
commit50bc082f8413b14cd7f5c5c6b72b493c6e43539e (patch)
tree37d90e309b5620586687398bd01cdd75978da3f8 /qt
parent6cbe4a684917c9b7d04d23b9313bede705150b95 (diff)
downloadorg.eclipse.cdt-50bc082f8413b14cd7f5c5c6b72b493c6e43539e.tar.gz
org.eclipse.cdt-50bc082f8413b14cd7f5c5c6b72b493c6e43539e.tar.xz
org.eclipse.cdt-50bc082f8413b14cd7f5c5c6b72b493c6e43539e.zip
Bug 174176 - Hook up CMake build to LaunchBar to select toolchain files
Use launch target os and cpu arch properties to pick toolchains and toolchain files. UI to add toolchain files. And build support. Also some clean up of Qt as I found bugs. Change-Id: Icd1da43460b5954eea15e95ed8ec27850fc4e54e
Diffstat (limited to 'qt')
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/QtInstallManager.java4
-rw-r--r--qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/Messages.java2
-rw-r--r--qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/messages.properties4
-rw-r--r--qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/preferences/NewQtInstallWizardPage.java2
-rw-r--r--qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/preferences/QtPreferencePage.java17
5 files changed, 18 insertions, 11 deletions
diff --git a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/QtInstallManager.java b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/QtInstallManager.java
index c8cbcd0ac8..b4988a486d 100644
--- a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/QtInstallManager.java
+++ b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/QtInstallManager.java
@@ -28,7 +28,7 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtensionPoint;
import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.preferences.ConfigurationScope;
+import org.eclipse.core.runtime.preferences.InstanceScope;
import org.osgi.service.prefs.BackingStoreException;
import org.osgi.service.prefs.Preferences;
@@ -39,7 +39,7 @@ public class QtInstallManager implements IQtInstallManager {
private List<IQtInstallListener> listeners = new LinkedList<>();
private Preferences getPreferences() {
- return ConfigurationScope.INSTANCE.getNode(Activator.ID).node("qtInstalls"); //$NON-NLS-1$
+ return InstanceScope.INSTANCE.getNode(Activator.ID).node("qtInstalls"); //$NON-NLS-1$
}
private void initInstalls() {
diff --git a/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/Messages.java b/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/Messages.java
index 70ca439e7e..4d5c663e07 100644
--- a/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/Messages.java
+++ b/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/Messages.java
@@ -19,8 +19,6 @@ public class Messages extends NLS {
public static String NewQtInstallWizardPage_3;
public static String NewQtInstallWizardPage_4;
public static String NewQtInstallWizardPage_5;
- public static String NewQtInstallWizardPage_6;
- public static String NewQtInstallWizardPage_7;
public static String NewQtInstallWizardPage_8;
public static String NewQtInstallWizardPage_9;
public static String QtPreferencePage_0;
diff --git a/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/messages.properties b/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/messages.properties
index 5654d25abc..2f96228e73 100644
--- a/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/messages.properties
+++ b/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/messages.properties
@@ -6,14 +6,12 @@ NewQtInstallWizardPage_2=Name:
NewQtInstallWizardPage_3=Location:
NewQtInstallWizardPage_4=Browse...
NewQtInstallWizardPage_5=Select location of qmake
-NewQtInstallWizardPage_6=qmake.exe
-NewQtInstallWizardPage_7=qmake
NewQtInstallWizardPage_8=Get Qt Spec
NewQtInstallWizardPage_9=mkspec:
QtPreferencePage_0=Qt Installs
QtPreferencePage_1=Location
QtPreferencePage_2=mkspec
-QtPreferencePage_3=Add
+QtPreferencePage_3=Add...
QtPreferencePage_4=Remove
QtPreferencePage_5=Remove Qt Install
QtPreferencePage_6=Are you sure you want to remove the selected Qt installs?
diff --git a/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/preferences/NewQtInstallWizardPage.java b/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/preferences/NewQtInstallWizardPage.java
index bb7d113d17..fc3ee5de8f 100644
--- a/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/preferences/NewQtInstallWizardPage.java
+++ b/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/preferences/NewQtInstallWizardPage.java
@@ -69,7 +69,7 @@ public class NewQtInstallWizardPage extends WizardPage {
FileDialog dialog = new FileDialog(getShell(), SWT.OPEN);
dialog.setText(Messages.NewQtInstallWizardPage_5);
dialog.setFilterExtensions(
- new String[] { Platform.getOS().equals(Platform.OS_WIN32) ? Messages.NewQtInstallWizardPage_6 : Messages.NewQtInstallWizardPage_7 });
+ new String[] { Platform.getOS().equals(Platform.OS_WIN32) ? "qmake.exe" : "qmake" }); //$NON-NLS-1$ //$NON-NLS-2$
String selected = dialog.open();
if (selected != null) {
locationText.setText(selected);
diff --git a/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/preferences/QtPreferencePage.java b/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/preferences/QtPreferencePage.java
index 142e87a5b0..82c8217bdd 100644
--- a/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/preferences/QtPreferencePage.java
+++ b/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/preferences/QtPreferencePage.java
@@ -103,7 +103,11 @@ public class QtPreferencePage extends PreferencePage implements IWorkbenchPrefer
WizardDialog dialog = new WizardDialog(getShell(), wizard);
if (dialog.open() == Window.OK) {
IQtInstall install = wizard.getInstall();
- installsToAdd.put(install.getQmakePath(), install);
+ if (installsToRemove.containsKey(install.getQmakePath())) {
+ installsToRemove.remove(install.getQmakePath());
+ } else {
+ installsToAdd.put(install.getQmakePath(), install);
+ }
updateTable();
}
}
@@ -117,7 +121,11 @@ public class QtPreferencePage extends PreferencePage implements IWorkbenchPrefer
if (MessageDialog.openConfirm(getShell(), Messages.QtPreferencePage_5, Messages.QtPreferencePage_6)) {
for (TableItem item : installTable.getSelection()) {
IQtInstall install = (IQtInstall) item.getData();
- installsToRemove.put(install.getQmakePath(), install);
+ if (installsToAdd.containsKey(install.getQmakePath())) {
+ installsToAdd.remove(install.getQmakePath());
+ } else {
+ installsToRemove.put(install.getQmakePath(), install);
+ }
updateTable();
}
}
@@ -153,7 +161,10 @@ public class QtPreferencePage extends PreferencePage implements IWorkbenchPrefer
for (IQtInstall install : sorted) {
TableItem item = new TableItem(installTable, SWT.NONE);
item.setText(0, install.getQmakePath().toString());
- item.setText(1, install.getSpec());
+ String spec = install.getSpec();
+ if (spec != null) {
+ item.setText(1, install.getSpec());
+ }
item.setData(install);
}
}

Back to the top