summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2010-09-29 09:28:52 +0200
committerFriedemann Kleint <Friedemann.Kleint@nokia.com>2010-09-29 09:28:52 +0200
commit29e0f0d46b87c7cb3a9e15ac4de19d2b42f487df (patch)
tree22c995f14d59781f33471104bad1f933055cac81 /src/plugins
parent8ff81fd75d93f7b1f5bcc68d6a08b5c72a269c35 (diff)
parentd7fec2ae1e48eff1dffdf9c8e8efce9b647cb1ad (diff)
downloadqt-creator-29e0f0d46b87c7cb3a9e15ac4de19d2b42f487df.tar.gz
Merge remote branch 'origin/2.1'
Conflicts: src/plugins/qt4projectmanager/wizards/mobilelibraryparameters.cpp
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/classview/classviewnavigationwidget.cpp2
-rw-r--r--src/plugins/debugger/breakbyfunction.ui58
-rw-r--r--src/plugins/debugger/breakcondition.ui34
-rw-r--r--src/plugins/debugger/breakhandler.cpp12
-rw-r--r--src/plugins/debugger/breakhandler.h3
-rw-r--r--src/plugins/debugger/breakpoint.cpp9
-rw-r--r--src/plugins/debugger/breakpoint.h9
-rw-r--r--src/plugins/debugger/breakpoint.ui56
-rw-r--r--src/plugins/debugger/breakwindow.cpp134
-rw-r--r--src/plugins/debugger/breakwindow.h1
-rw-r--r--src/plugins/debugger/cdb/cdbbreakpoint.cpp7
-rw-r--r--src/plugins/debugger/cdb/cdbengine.cpp2
-rw-r--r--src/plugins/debugger/cdb/cdbmodules.cpp28
-rw-r--r--src/plugins/debugger/cdb/cdboptions.cpp6
-rw-r--r--src/plugins/debugger/cdb/cdboptions.h5
-rw-r--r--src/plugins/debugger/cdb/cdboptionspage.cpp5
-rw-r--r--src/plugins/debugger/cdb/cdboptionspagewidget.ui11
-rw-r--r--src/plugins/debugger/cdb/corebreakpoint.cpp3
-rw-r--r--src/plugins/debugger/debugger.pro1
-rw-r--r--src/plugins/debugger/debuggeractions.cpp3
-rw-r--r--src/plugins/debugger/debuggeractions.h1
-rw-r--r--src/plugins/debugger/debuggerconstants.h2
-rw-r--r--src/plugins/debugger/debuggerplugin.cpp12
-rw-r--r--src/plugins/debugger/debuggeruiswitcher.cpp95
-rw-r--r--src/plugins/debugger/debuggeruiswitcher.h3
-rw-r--r--src/plugins/debugger/gdb/classicgdbengine.cpp11
-rw-r--r--src/plugins/debugger/gdb/gdbengine.cpp9
-rw-r--r--src/plugins/debugger/gdb/gdbengine.h1
-rw-r--r--src/plugins/debugger/watchwindow.cpp21
-rw-r--r--src/plugins/git/gitsettings.cpp9
-rw-r--r--src/plugins/git/gitsettings.h1
-rw-r--r--src/plugins/projectexplorer/projecttreewidget.cpp6
-rw-r--r--src/plugins/projectexplorer/userfileaccessor.cpp12
-rw-r--r--src/plugins/qmljseditor/qmljsoutline.cpp2
-rw-r--r--src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp15
-rw-r--r--src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp16
-rw-r--r--src/plugins/qt4projectmanager/makestep.cpp10
-rw-r--r--src/plugins/qt4projectmanager/makestep.ui26
-rw-r--r--src/plugins/qt4projectmanager/qmakestep.cpp3
-rw-r--r--src/plugins/qt4projectmanager/qt-maemo/maemorunfactories.cpp8
-rw-r--r--src/plugins/qt4projectmanager/qt-maemo/maemosshrunner.cpp8
-rw-r--r--src/plugins/qt4projectmanager/wizards/mobilelibraryparameters.cpp2
-rw-r--r--src/plugins/qt4projectmanager/wizards/qmlstandaloneappwizard.cpp24
-rw-r--r--src/plugins/texteditor/fontsettingspage.cpp6
44 files changed, 321 insertions, 371 deletions
diff --git a/src/plugins/classview/classviewnavigationwidget.cpp b/src/plugins/classview/classviewnavigationwidget.cpp
index 8420284d81..35c1a179b3 100644
--- a/src/plugins/classview/classviewnavigationwidget.cpp
+++ b/src/plugins/classview/classviewnavigationwidget.cpp
@@ -137,7 +137,7 @@ QList<QToolButton *> NavigationWidget::createToolButtons()
d_ptr->fullProjectsModeButton->setIcon(
QIcon(QLatin1String(":/classview/images/hierarchicalmode.png")));
d_ptr->fullProjectsModeButton->setCheckable(true);
- d_ptr->fullProjectsModeButton->setToolTip(tr("Show subprojects"));
+ d_ptr->fullProjectsModeButton->setToolTip(tr("Show Subprojects"));
// by default - not a flat mode
setFlatMode(false);
diff --git a/src/plugins/debugger/breakbyfunction.ui b/src/plugins/debugger/breakbyfunction.ui
deleted file mode 100644
index d6c045219c..0000000000
--- a/src/plugins/debugger/breakbyfunction.ui
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>BreakByFunctionDialog</class>
- <widget class="QDialog" name="BreakByFunctionDialog">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>337</width>
- <height>101</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>Set Breakpoint at Function</string>
- </property>
- <layout class="QVBoxLayout">
- <property name="spacing">
- <number>6</number>
- </property>
- <property name="margin">
- <number>9</number>
- </property>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <widget class="QLabel" name="functionLabel">
- <property name="text">
- <string>Function to break on:</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLineEdit" name="functionLineEdit"/>
- </item>
- </layout>
- </item>
- <item>
- <widget class="Line" name="line">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QDialogButtonBox" name="buttonBox">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="standardButtons">
- <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/src/plugins/debugger/breakcondition.ui b/src/plugins/debugger/breakcondition.ui
index 73aaa8ac39..a3e2e9babb 100644
--- a/src/plugins/debugger/breakcondition.ui
+++ b/src/plugins/debugger/breakcondition.ui
@@ -14,63 +14,43 @@
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
- <widget class="QLabel" name="labelFileName">
- <property name="text">
- <string>File name:</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QLineEdit" name="lineEditFileName"/>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="labelLineNumber">
- <property name="text">
- <string>Line number:</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QLineEdit" name="lineEditLineNumber"/>
- </item>
- <item row="2" column="0">
<widget class="QLabel" name="labelFunction">
<property name="text">
<string>Function:</string>
</property>
</widget>
</item>
- <item row="2" column="1">
+ <item row="0" column="1">
<widget class="QLineEdit" name="lineEditFunction"/>
</item>
- <item row="3" column="0">
+ <item row="1" column="0">
<widget class="QLabel" name="labelCondition">
<property name="text">
<string>Condition:</string>
</property>
</widget>
</item>
- <item row="3" column="1">
+ <item row="1" column="1">
<widget class="QLineEdit" name="lineEditCondition"/>
</item>
- <item row="4" column="0">
+ <item row="2" column="0">
<widget class="QLabel" name="labelIgnoreCount">
<property name="text">
<string>Ignore count:</string>
</property>
</widget>
</item>
- <item row="4" column="1">
+ <item row="2" column="1">
<widget class="QLineEdit" name="lineEditIgnoreCount"/>
</item>
- <item row="5" column="0">
+ <item row="3" column="0">
<widget class="QLabel" name="labelThreadSpec">
<property name="text">
<string>Thread specification:</string>
</property>
</widget>
</item>
- <item row="5" column="1">
+ <item row="3" column="1">
<widget class="QLineEdit" name="lineEditThreadSpec"/>
</item>
</layout>
diff --git a/src/plugins/debugger/breakhandler.cpp b/src/plugins/debugger/breakhandler.cpp
index f5a14f1bdd..e0428f8cf5 100644
--- a/src/plugins/debugger/breakhandler.cpp
+++ b/src/plugins/debugger/breakhandler.cpp
@@ -285,6 +285,9 @@ QVariant BreakHandler::data(const QModelIndex &mi, int role) const
const BreakpointData *data = at(mi.row());
+ if (role == BreakpointRole)
+ return qulonglong(data);
+
if (role == BreakpointUseFullPathRole)
return data->useFullPath;
@@ -502,6 +505,15 @@ bool BreakHandler::setData(const QModelIndex &index, const QVariant &value, int
return false;
}
+void BreakHandler::reinsertBreakpoint(BreakpointData *data)
+{
+ // FIXME: Use some more direct method?
+ appendBreakpoint(data->clone());
+ removeBreakpoint(data);
+ m_engine->attemptBreakpointSynchronization();
+ emit layoutChanged();
+}
+
void BreakHandler::append(BreakpointData *data)
{
data->m_handler = this;
diff --git a/src/plugins/debugger/breakhandler.h b/src/plugins/debugger/breakhandler.h
index 432bf0a27a..9a9aa30289 100644
--- a/src/plugins/debugger/breakhandler.h
+++ b/src/plugins/debugger/breakhandler.h
@@ -66,7 +66,6 @@ public:
BreakpointData *at(int index) const;
int size() const { return m_bp.size(); }
bool hasPendingBreakpoints() const;
- void append(BreakpointData *data);
void removeAt(int index); // This also deletes the marker.
void clear(); // This also deletes all the marker.
int indexOf(BreakpointData *data) { return m_bp.indexOf(data); }
@@ -99,6 +98,7 @@ public:
public slots:
void appendBreakpoint(BreakpointData *data);
+ void reinsertBreakpoint(BreakpointData *data);
void toggleBreakpointEnabled(BreakpointData *data);
void breakByFunction(const QString &functionName);
void removeBreakpoint(int index);
@@ -119,6 +119,7 @@ private:
void loadBreakpoints();
void saveBreakpoints();
void removeBreakpointHelper(int index);
+ void append(BreakpointData *data);
const QIcon m_breakpointIcon;
const QIcon m_disabledBreakpointIcon;
diff --git a/src/plugins/debugger/breakpoint.cpp b/src/plugins/debugger/breakpoint.cpp
index 3d45c972b5..0c9fc2341b 100644
--- a/src/plugins/debugger/breakpoint.cpp
+++ b/src/plugins/debugger/breakpoint.cpp
@@ -159,6 +159,9 @@ private:
//
//////////////////////////////////////////////////////////////////
+const char *BreakpointData::throwFunction = "throw";
+const char *BreakpointData::catchFunction = "catch";
+
BreakpointData::BreakpointData() :
m_handler(0), enabled(true),
pending(true), type(BreakpointType),
@@ -364,6 +367,12 @@ bool BreakpointData::conditionsMatch() const
return s1 == s2;
}
+void BreakpointData::reinsertBreakpoint()
+{
+ QTC_ASSERT(m_handler, return);
+ m_handler->reinsertBreakpoint(this);
+}
+
} // namespace Internal
} // namespace Debugger
diff --git a/src/plugins/debugger/breakpoint.h b/src/plugins/debugger/breakpoint.h
index ffe6a654dd..e96a58bc83 100644
--- a/src/plugins/debugger/breakpoint.h
+++ b/src/plugins/debugger/breakpoint.h
@@ -56,6 +56,7 @@ public:
void updateMarker();
QString toToolTip() const;
BreakHandler *handler() { return m_handler; }
+ void reinsertBreakpoint();
bool isLocatedAt(const QString &fileName, int lineNumber,
bool useMarkerPosition) const;
@@ -65,6 +66,10 @@ public:
// This copies only the static data.
BreakpointData *clone() const;
+ // Generic name for function to break on 'throw'
+ static const char *throwFunction;
+ static const char *catchFunction;
+
private:
// Intentionally unimplemented.
// Making it copyable is tricky because of the markers.
@@ -89,7 +94,9 @@ public:
int lineNumber; // Line in source file.
quint64 address; // Address for watchpoints.
QByteArray threadSpec; // Thread specification.
- QString funcName; // Name of containing function.
+ // Name of containing function, special values:
+ // BreakpointData::throwFunction, BreakpointData::catchFunction
+ QString funcName;
bool useFullPath; // Should we use the full path when setting the bp?
// This is what gdb produced in response.
diff --git a/src/plugins/debugger/breakpoint.ui b/src/plugins/debugger/breakpoint.ui
index f9e09010ba..5842e70aca 100644
--- a/src/plugins/debugger/breakpoint.ui
+++ b/src/plugins/debugger/breakpoint.ui
@@ -6,12 +6,12 @@
<rect>
<x>0</x>
<y>0</y>
- <width>382</width>
- <height>280</height>
+ <width>558</width>
+ <height>302</height>
</rect>
</property>
<property name="windowTitle">
- <string>Dialog</string>
+ <string>Edit Breakpoint Properties</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
@@ -34,7 +34,7 @@
</widget>
</item>
<item row="1" column="1">
- <widget class="QLineEdit" name="lineEditFileName"/>
+ <widget class="Utils::PathChooser" name="pathChooserFileName"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="labelLineNumber">
@@ -46,55 +46,69 @@
<item row="2" column="1">
<widget class="QLineEdit" name="lineEditLineNumber"/>
</item>
+ <item row="3" column="1">
+ <widget class="QCheckBox" name="checkBoxUseFullPath">
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0">
+ <widget class="QLabel" name="labelUseFullPath">
+ <property name="text">
+ <string>Use full path:</string>
+ </property>
+ </widget>
+ </item>
<item row="4" column="0">
- <widget class="QLabel" name="labelFunction">
+ <widget class="QLabel" name="labelAddress">
<property name="text">
- <string>Function:</string>
+ <string>Address:</string>
</property>
</widget>
</item>
<item row="4" column="1">
- <widget class="QLineEdit" name="lineEditFunction"/>
+ <widget class="QLineEdit" name="lineEditAddress"/>
</item>
<item row="5" column="0">
- <widget class="QLabel" name="labelCondition">
+ <widget class="QLabel" name="labelFunction">
<property name="text">
- <string>Condition:</string>
+ <string>Function:</string>
</property>
</widget>
</item>
<item row="5" column="1">
- <widget class="QLineEdit" name="lineEditCondition"/>
+ <widget class="QLineEdit" name="lineEditFunction"/>
</item>
<item row="6" column="0">
- <widget class="QLabel" name="labelIgnoreCount">
+ <widget class="QLabel" name="labelCondition">
<property name="text">
- <string>Ignore count:</string>
+ <string>Condition:</string>
</property>
</widget>
</item>
<item row="6" column="1">
- <widget class="QLineEdit" name="lineEditIgnoreCount"/>
+ <widget class="QLineEdit" name="lineEditCondition"/>
</item>
<item row="7" column="0">
- <widget class="QLabel" name="labelThreadSpec">
+ <widget class="QLabel" name="labelIgnoreCount">
<property name="text">
- <string>Thread specification:</string>
+ <string>Ignore count:</string>
</property>
</widget>
</item>
<item row="7" column="1">
- <widget class="QLineEdit" name="lineEditThreadSpec"/>
+ <widget class="QLineEdit" name="lineEditIgnoreCount"/>
</item>
- <item row="3" column="0">
- <widget class="QLabel" name="labelAddress">
+ <item row="8" column="0">
+ <widget class="QLabel" name="labelThreadSpec">
<property name="text">
- <string>Address:</string>
+ <string>Thread specification:</string>
</property>
</widget>
</item>
- <item row="3" column="1">
- <widget class="QLineEdit" name="lineEditAddress"/>
+ <item row="8" column="1">
+ <widget class="QLineEdit" name="lineEditThreadSpec"/>
</item>
</layout>
</item>
diff --git a/src/plugins/debugger/breakwindow.cpp b/src/plugins/debugger/breakwindow.cpp
index 09e885fa62..38c97bc440 100644
--- a/src/plugins/debugger/breakwindow.cpp
+++ b/src/plugins/debugger/breakwindow.cpp
@@ -33,8 +33,8 @@
#include "debuggerconstants.h"
#include "ui_breakpoint.h"
#include "ui_breakcondition.h"
-#include "ui_breakbyfunction.h"
+#include <utils/pathchooser.h>
#include <utils/qtcassert.h>
#include <utils/savedaction.h>
@@ -64,7 +64,7 @@ class BreakpointDialog : public QDialog, public Ui::BreakpointDialog
{
Q_OBJECT
public:
- explicit BreakpointDialog(QWidget *parent)
+ explicit BreakpointDialog(QWidget *parent, BreakpointData *data)
: QDialog(parent)
{
setupUi(this);
@@ -72,8 +72,22 @@ public:
comboBoxType->insertItem(1, tr("Function Name"));
comboBoxType->insertItem(2, tr("Function \"main()\""));
comboBoxType->insertItem(3, tr("Address"));
- connect(comboBoxType, SIGNAL(activated(int)),
- SLOT(typeChanged(int)));
+ pathChooserFileName->lineEdit()->setText(data->fileName);
+ pathChooserFileName->setExpectedKind(Utils::PathChooser::File);
+ lineEditLineNumber->setText(QByteArray::number(data->lineNumber));
+ lineEditFunction->setText(data->funcName);
+ lineEditCondition->setText(data->condition);
+ lineEditIgnoreCount->setText(QByteArray::number(data->ignoreCount));
+ checkBoxUseFullPath->setChecked(data->useFullPath);
+ if (data->address)
+ lineEditAddress->setText("0x" + QByteArray::number(data->address, 16));
+ int initialType = 0;
+ if (!data->funcName.isEmpty())
+ initialType = lineEditFunction->text() == "main" ? 2 : 1;
+ if (data->address)
+ initialType = 3;
+ typeChanged(initialType);
+ connect(comboBoxType, SIGNAL(activated(int)), SLOT(typeChanged(int)));
}
public slots:
@@ -83,9 +97,11 @@ public slots:
const bool isFunctionVisible = index == 1;
const bool isAddressVisible = index == 3;
labelFileName->setEnabled(isLineVisible);
- lineEditFileName->setEnabled(isLineVisible);
+ pathChooserFileName->setEnabled(isLineVisible);
labelLineNumber->setEnabled(isLineVisible);
lineEditLineNumber->setEnabled(isLineVisible);
+ labelUseFullPath->setEnabled(isLineVisible);
+ checkBoxUseFullPath->setEnabled(isLineVisible);
labelFunction->setEnabled(isFunctionVisible);
lineEditFunction->setEnabled(isFunctionVisible);
labelAddress->setEnabled(isAddressVisible);
@@ -98,26 +114,6 @@ public slots:
///////////////////////////////////////////////////////////////////////
//
-// BreakByFunctionDialog
-//
-///////////////////////////////////////////////////////////////////////
-
-class BreakByFunctionDialog : public QDialog, Ui::BreakByFunctionDialog
-{
-public:
- explicit BreakByFunctionDialog(QWidget *parent)
- : QDialog(parent)
- {
- setupUi(this);
- connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
- connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
- }
- QString functionName() const { return functionLineEdit->text(); }
-};
-
-
-///////////////////////////////////////////////////////////////////////
-//
// BreakWindow
//
///////////////////////////////////////////////////////////////////////
@@ -279,16 +275,13 @@ void BreakWindow::contextMenuEvent(QContextMenuEvent *ev)
pathAction->setEnabled(si.size() > 0);
QAction *addBreakpointAction =
- new QAction(tr("Set Breakpoint..."), this);
- //QAction *breakAtFunctionAction =
- // new QAction(tr("Set Breakpoint at Function..."), this);
- //QAction *breakAtMainAction =
- // new QAction(tr("Set Breakpoint at Function \"main\""), this);
+ new QAction(tr("Add Breakpoint..."), this);
QAction *breakAtThrowAction =
new QAction(tr("Set Breakpoint at \"throw\""), this);
QAction *breakAtCatchAction =
new QAction(tr("Set Breakpoint at \"catch\""), this);
+ menu.addAction(addBreakpointAction);
menu.addAction(deleteAction);
menu.addAction(editBreakpointAction);
menu.addAction(associateBreakpointAction);
@@ -299,11 +292,8 @@ void BreakWindow::contextMenuEvent(QContextMenuEvent *ev)
menu.addAction(deleteByFileAction);
menu.addSeparator();
menu.addAction(synchronizeAction);
- menu.addSeparator();
- //menu.addAction(breakAtFunctionAction);
- //menu.addAction(breakAtMainAction);
- menu.addAction(addBreakpointAction);
if (engineCapabilities & BreakOnThrowAndCatchCapability) {
+ menu.addSeparator();
menu.addAction(breakAtThrowAction);
menu.addAction(breakAtCatchAction);
}
@@ -342,16 +332,10 @@ void BreakWindow::contextMenuEvent(QContextMenuEvent *ev)
setBreakpointsFullPath(si, !fullpath);
else if (act == addBreakpointAction)
addBreakpoint();
- //else if (act == breakAtFunctionAction) {
- // BreakByFunctionDialog dlg(this);
- // if (dlg.exec())
- // setModelData(RequestBreakByFunctionRole, dlg.functionName());
- //} else if (act == breakAtMainAction)
- // setModelData(RequestBreakByFunctionMainRole);
- else if (act == breakAtThrowAction)
- setModelData(RequestBreakByFunctionRole, "__cxa_throw");
- else if (act == breakAtCatchAction)
- setModelData(RequestBreakByFunctionRole, "__cxa_begin_catch");
+ else if (act == breakAtThrowAction)
+ setModelData(RequestBreakByFunctionRole, QLatin1String(BreakpointData::throwFunction));
+ else if (act == breakAtCatchAction)
+ setModelData(RequestBreakByFunctionRole, QLatin1String(BreakpointData::catchFunction));
}
void BreakWindow::setBreakpointsEnabled(const QModelIndexList &list, bool enabled)
@@ -392,51 +376,57 @@ void BreakWindow::deleteBreakpoints(QList<int> list)
setModelData(RequestSynchronizeBreakpointsRole);
}
-void BreakWindow::addBreakpoint()
+bool BreakWindow::editBreakpoint(BreakpointData *data)
{
- BreakpointDialog dialog(this);
+ BreakpointDialog dialog(this, data);
if (dialog.exec() == QDialog::Rejected)
- return;
+ return false;
+ bool ok = false;
+ data->lineNumber = dialog.lineEditLineNumber->text().toInt();
+ data->useFullPath = dialog.checkBoxUseFullPath->isChecked();
+ data->address = dialog.lineEditAddress->text().toULongLong(&ok, 0);
+ data->funcName = dialog.lineEditFunction->text();
+ data->fileName = dialog.pathChooserFileName->lineEdit()->text();
+ data->condition = dialog.lineEditCondition->text().toUtf8();
+ data->ignoreCount = dialog.lineEditIgnoreCount->text().toInt();
+ data->threadSpec = dialog.lineEditThreadSpec->text().toUtf8();
+ return true;
+}
+
+void BreakWindow::addBreakpoint()
+{
BreakpointData *data = new BreakpointData();
- if (!dialog.lineEditAddress->text().isEmpty()) {
- bool ok = false;
- data->address = dialog.lineEditAddress->text().toULongLong(&ok, 0);
- }
- if (!dialog.lineEditFunction->text().isEmpty())
- data->funcName = dialog.lineEditFunction->text();
- if (!dialog.lineEditFileName->text().isEmpty())
- data->fileName = dialog.lineEditFileName->text();
- if (!dialog.lineEditFileName->text().isEmpty())
- data->fileName = dialog.lineEditFileName->text();
- if (!dialog.lineEditCondition->text().isEmpty())
- data->condition = dialog.lineEditCondition->text().toUtf8();
- if (!dialog.lineEditIgnoreCount->text().isEmpty())
- data->ignoreCount = dialog.lineEditIgnoreCount->text().toInt();
- if (!dialog.lineEditThreadSpec->text().isEmpty())
- data->threadSpec = dialog.lineEditThreadSpec->text().toUtf8();
- setModelData(RequestBreakpointRole, QVariant::fromValue(data));
+ if (editBreakpoint(data))
+ setModelData(RequestBreakpointRole, QVariant::fromValue(data));
+ else
+ delete data;
}
void BreakWindow::editBreakpoints(const QModelIndexList &list)
{
+ if (list.size() == 1) {
+ QVariant var = model()->data(list.at(0), BreakpointRole);
+ BreakpointData *data = (BreakpointData *)var.toULongLong();
+ if (editBreakpoint(data))
+ data->reinsertBreakpoint();
+ return;
+ }
+
+ // This allows to change properties of multiple breakpoints at a time.
QDialog dlg(this);
Ui::BreakCondition ui;
ui.setupUi(&dlg);
QTC_ASSERT(!list.isEmpty(), return);
QModelIndex idx = list.front();
- const int row = idx.row();
- dlg.setWindowTitle(tr("Conditions on Breakpoint %1").arg(row));
+ dlg.setWindowTitle(tr("Edit Breakpoint Properties"));
ui.lineEditFunction->hide();
ui.labelFunction->hide();
- ui.lineEditFileName->hide();
- ui.labelFileName->hide();
- ui.lineEditLineNumber->hide();
- ui.labelLineNumber->hide();
QAbstractItemModel *m = model();
ui.lineEditCondition->setText(
m->data(idx, BreakpointConditionRole).toString());
- ui.lineEditIgnoreCount->setValidator(new QIntValidator(0, 2147483647, ui.lineEditIgnoreCount));
+ ui.lineEditIgnoreCount->setValidator(
+ new QIntValidator(0, 2147483647, ui.lineEditIgnoreCount));
ui.lineEditIgnoreCount->setText(
m->data(idx, BreakpointIgnoreCountRole).toString());
ui.lineEditThreadSpec->setText(
@@ -447,7 +437,7 @@ void BreakWindow::editBreakpoints(const QModelIndexList &list)
foreach (const QModelIndex &idx, list) {
//m->setData(idx.sibling(idx.row(), 1), ui.lineEditFunction->text());
- //m->setData(idx.sibling(idx.row(), 2), ui.lineEditFileName->text());
+ //m->setData(idx.sibling(idx.row(), 2), ui.pathChooserFileName->text());
//m->setData(idx.sibling(idx.row(), 3), ui.lineEditLineNumber->text());
m->setData(idx, ui.lineEditCondition->text(), BreakpointConditionRole);
m->setData(idx, ui.lineEditIgnoreCount->text(), BreakpointIgnoreCountRole);
diff --git a/src/plugins/debugger/breakwindow.h b/src/plugins/debugger/breakwindow.h
index 2a9e41b7a0..5b6b1cb969 100644
--- a/src/plugins/debugger/breakwindow.h
+++ b/src/plugins/debugger/breakwindow.h
@@ -62,6 +62,7 @@ private:
void deleteBreakpoints(const QModelIndexList &list);
void deleteBreakpoints(QList<int> rows);
void addBreakpoint();
+ bool editBreakpoint(BreakpointData *data); // Returns 'Accept'.
void editBreakpoints(const QModelIndexList &list);
void associateBreakpoint(const QModelIndexList &list, int thread);
void setBreakpointsEnabled(const QModelIndexList &list, bool enabled);
diff --git a/src/plugins/debugger/cdb/cdbbreakpoint.cpp b/src/plugins/debugger/cdb/cdbbreakpoint.cpp
index 5dbe1f6219..6115b60053 100644
--- a/src/plugins/debugger/cdb/cdbbreakpoint.cpp
+++ b/src/plugins/debugger/cdb/cdbbreakpoint.cpp
@@ -53,7 +53,8 @@ CdbCore::BreakPoint breakPointFromBreakPointData(const Debugger::Internal::Break
}
rc.fileName = QDir::toNativeSeparators(bpd.fileName);
rc.condition = bpd.condition;
- rc.funcName = bpd.funcName;
+ // Resolved function goes to bpd.bpFuncName.
+ rc.funcName = bpd.bpFuncName.isEmpty() ? bpd.funcName : bpd.bpFuncName;
rc.ignoreCount = bpd.ignoreCount;
rc.lineNumber = bpd.lineNumber;
rc.oneShot = false;
@@ -92,7 +93,8 @@ bool synchronizeBreakPoints(CIDebugControl* debugControl,
if (nbd->funcName.isEmpty()) {
breakPointOk = true;
} else {
- switch (resolveSymbol(syms, &nbd->funcName, &warning)) {
+ nbd->bpFuncName = nbd->funcName;
+ switch (resolveSymbol(syms, &nbd->bpFuncName, &warning)) {
case ResolveSymbolOk:
breakPointOk = true;
break;
@@ -128,7 +130,6 @@ bool synchronizeBreakPoints(CIDebugControl* debugControl,
nbd->bpThreadSpec = nbd->threadSpec;
nbd->bpFileName = nbd->fileName;
nbd->bpLineNumber = nbd->lineNumber;
- nbd->bpFuncName = nbd->funcName;
}
} // had symbol
if (!breakPointOk && !warning.isEmpty())
diff --git a/src/plugins/debugger/cdb/cdbengine.cpp b/src/plugins/debugger/cdb/cdbengine.cpp
index 66bc3067a7..363daa66d6 100644
--- a/src/plugins/debugger/cdb/cdbengine.cpp
+++ b/src/plugins/debugger/cdb/cdbengine.cpp
@@ -409,7 +409,7 @@ void CdbEngine::setupEngine()
m_d->m_inferiorStartupComplete = false;
// Options
QString errorMessage;
- if (!m_d->setBreakOnThrow(theDebuggerBoolSetting(BreakOnThrow), &errorMessage))
+ if (!m_d->setBreakOnThrow(m_d->m_options->breakOnException, &errorMessage))
showMessage(errorMessage, LogWarning);
m_d->setVerboseSymbolLoading(m_d->m_options->verboseSymbolLoading);
// Figure out dumper. @TODO: same in gdb...
diff --git a/src/plugins/debugger/cdb/cdbmodules.cpp b/src/plugins/debugger/cdb/cdbmodules.cpp
index 8082527e1e..ed5427375a 100644
--- a/src/plugins/debugger/cdb/cdbmodules.cpp
+++ b/src/plugins/debugger/cdb/cdbmodules.cpp
@@ -30,6 +30,7 @@
#include "cdbmodules.h"
#include "moduleshandler.h"
#include "cdbengine_p.h"
+#include "breakpoint.h"
#include <QtCore/QFileInfo>
#include <QtCore/QRegExp>
@@ -180,14 +181,35 @@ static ResolveSymbolResult resolveSymbol(CIDebugSymbols *syms, QString *symbol,
// Is it an incomplete symbol?
if (symbol->contains(QLatin1Char('!')))
return ResolveSymbolOk;
- // 'main' is a #define for gdb, but not for VS
- if (*symbol == QLatin1String("qMain"))
+ // Throw and catch
+ bool withinMSVCRunTime = false;
+ if (*symbol == QLatin1String(BreakpointData::throwFunction)) {
+ *symbol = QLatin1String("CxxThrowException");
+ withinMSVCRunTime = true;
+ } else if (*symbol == QLatin1String(BreakpointData::catchFunction)) {
+ *symbol = QLatin1String("__CxxCallCatchBlock");
+ withinMSVCRunTime = true;
+ } else if (*symbol == QLatin1String("qMain")) // 'main' is a #define for gdb, but not for VS
*symbol = QLatin1String("main");
// resolve
if (!searchSymbols(syms, *symbol, matches, errorMessage))
return ResolveSymbolError;
- if (matches->empty())
+ // Exception functions sometimes show up ambiguously as'QtGuid4!CxxThrowException',
+ // 'MSVCR100D!CxxThrowException', QtCored4!CxxThrowException',
+ // 'MSVCP100D!CxxThrowException' and 'msvcrt!CxxThrowException',
+ // 'OLEAUT32!CxxThrowException'...restrict to MSVC-RunTime (any MSVC version).
+ if (withinMSVCRunTime && matches->size() > 1) {
+ for (QStringList::iterator it = matches->begin(); it != matches->end(); )
+ if (it->startsWith(QLatin1String("MSVCR"))) {
+ ++it;
+ } else {
+ it = matches->erase(it);
+ }
+ }
+ if (matches->empty()) {
+ *errorMessage = QString::fromLatin1("No match for '%1' found").arg(*symbol);
return ResolveSymbolNotFound;
+ }
*symbol = matches->front();
if (matches->size() > 1) {
*errorMessage = QString::fromLatin1("Ambiguous symbol '%1': %2").
diff --git a/src/plugins/debugger/cdb/cdboptions.cpp b/src/plugins/debugger/cdb/cdboptions.cpp
index 9443cc531a..0f7e19945d 100644
--- a/src/plugins/debugger/cdb/cdboptions.cpp
+++ b/src/plugins/debugger/cdb/cdboptions.cpp
@@ -39,6 +39,7 @@ static const char *enabledKeyC = "Enabled";
static const char *pathKeyC = "Path";
static const char *symbolPathsKeyC = "SymbolPaths";
static const char *sourcePathsKeyC = "SourcePaths";
+static const char *breakOnExceptionKeyC = "BreakOnException";
static const char *verboseSymbolLoadingKeyC = "VerboseSymbolLoading";
static const char *fastLoadDebuggingHelpersKeyC = "FastLoadDebuggingHelpers";
@@ -47,6 +48,7 @@ namespace Internal {
CdbOptions::CdbOptions() :
enabled(false),
+ breakOnException(false),
verboseSymbolLoading(false),
fastLoadDebuggingHelpers(true)
{
@@ -83,6 +85,7 @@ void CdbOptions::fromSettings(const QSettings *s)
sourcePaths = s->value(keyRoot + QLatin1String(sourcePathsKeyC), QStringList()).toStringList();
verboseSymbolLoading = s->value(keyRoot + QLatin1String(verboseSymbolLoadingKeyC), false).toBool();
fastLoadDebuggingHelpers = s->value(keyRoot + QLatin1String(fastLoadDebuggingHelpersKeyC), true).toBool();
+ breakOnException = s->value(keyRoot + QLatin1String(breakOnExceptionKeyC), false).toBool();
}
void CdbOptions::toSettings(QSettings *s) const
@@ -94,6 +97,7 @@ void CdbOptions::toSettings(QSettings *s) const
s->setValue(QLatin1String(sourcePathsKeyC), sourcePaths);
s->setValue(QLatin1String(verboseSymbolLoadingKeyC), verboseSymbolLoading);
s->setValue(QLatin1String(fastLoadDebuggingHelpersKeyC), fastLoadDebuggingHelpers);
+ s->setValue(QLatin1String(breakOnExceptionKeyC), breakOnException);
s->endGroup();
}
@@ -108,6 +112,8 @@ unsigned CdbOptions::compare(const CdbOptions &rhs) const
rc |= SymbolOptionsChanged;
if (fastLoadDebuggingHelpers != rhs.fastLoadDebuggingHelpers)
rc |= FastLoadDebuggingHelpersChanged;
+ if (breakOnException != rhs.breakOnException)
+ rc |= OtherOptionsChanged;
return rc;
}
diff --git a/src/plugins/debugger/cdb/cdboptions.h b/src/plugins/debugger/cdb/cdboptions.h
index 43151aebc7..34db9ee1b8 100644
--- a/src/plugins/debugger/cdb/cdboptions.h
+++ b/src/plugins/debugger/cdb/cdboptions.h
@@ -52,7 +52,9 @@ public:
enum ChangeFlags { InitializationOptionsChanged = 0x1,
DebuggerPathsChanged = 0x2,
SymbolOptionsChanged = 0x4,
- FastLoadDebuggingHelpersChanged = 0x8 };
+ FastLoadDebuggingHelpersChanged = 0x8,
+ OtherOptionsChanged = 0x100
+ };
unsigned compare(const CdbOptions &s) const;
// Format a symbol server specification with a cache directory
@@ -67,6 +69,7 @@ public:
QString path;
QStringList symbolPaths;
QStringList sourcePaths;
+ bool breakOnException;
bool verboseSymbolLoading;
bool fastLoadDebuggingHelpers;
};
diff --git a/src/plugins/debugger/cdb/cdboptionspage.cpp b/src/plugins/debugger/cdb/cdboptionspage.cpp
index 84252e5204..a42d10fd6f 100644
--- a/src/plugins/debugger/cdb/cdboptionspage.cpp
+++ b/src/plugins/debugger/cdb/cdboptionspage.cpp
@@ -86,6 +86,7 @@ void CdbOptionsPageWidget::setOptions(CdbOptions &o)
m_ui.sourcePathListEditor->setPathList(o.sourcePaths);
m_ui.verboseSymbolLoadingCheckBox->setChecked(o.verboseSymbolLoading);
m_ui.fastLoadDebuggingHelpersCheckBox->setChecked(o.fastLoadDebuggingHelpers);
+ m_ui.breakOnExceptionCheckBox->setChecked(o.breakOnException);
}
CdbOptions CdbOptionsPageWidget::options() const
@@ -97,6 +98,7 @@ CdbOptions CdbOptionsPageWidget::options() const
rc.sourcePaths = m_ui.sourcePathListEditor->pathList();
rc.verboseSymbolLoading = m_ui.verboseSymbolLoadingCheckBox->isChecked();
rc.fastLoadDebuggingHelpers = m_ui.fastLoadDebuggingHelpersCheckBox->isChecked();
+ rc.breakOnException = m_ui.breakOnExceptionCheckBox->isChecked();
return rc;
}
@@ -134,7 +136,8 @@ QString CdbOptionsPageWidget::searchKeywords() const
QTextStream(&rc) << m_ui.pathLabel->text() << ' ' << m_ui.symbolPathLabel->text()
<< ' ' << m_ui.sourcePathLabel->text()
<< ' ' << m_ui.verboseSymbolLoadingCheckBox->text()
- << ' ' << m_ui.fastLoadDebuggingHelpersCheckBox->text();
+ << ' ' << m_ui.fastLoadDebuggingHelpersCheckBox->text()
+ << ' ' << m_ui.breakOnExceptionCheckBox->text();
rc.remove(QLatin1Char('&'));
return rc;
}
diff --git a/src/plugins/debugger/cdb/cdboptionspagewidget.ui b/src/plugins/debugger/cdb/cdboptionspagewidget.ui
index 26bbd3b900..60b0e99599 100644
--- a/src/plugins/debugger/cdb/cdboptionspagewidget.ui
+++ b/src/plugins/debugger/cdb/cdboptionspagewidget.ui
@@ -88,20 +88,27 @@
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
- <item row="0" column="0" colspan="2">
+ <item row="1" column="0" colspan="2">
<widget class="QCheckBox" name="verboseSymbolLoadingCheckBox">
<property name="text">
<string>Verbose symbol loading</string>
</property>
</widget>
</item>
- <item row="1" column="0">
+ <item row="2" column="0">
<widget class="QCheckBox" name="fastLoadDebuggingHelpersCheckBox">
<property name="text">
<string>Fast loading of debugging helpers</string>
</property>
</widget>
</item>
+ <item row="0" column="0" colspan="2">
+ <widget class="QCheckBox" name="breakOnExceptionCheckBox">
+ <property name="text">
+ <string>Break on exception</string>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
</item>
diff --git a/src/plugins/debugger/cdb/corebreakpoint.cpp b/src/plugins/debugger/cdb/corebreakpoint.cpp
index 4effa092d4..082ce38223 100644
--- a/src/plugins/debugger/cdb/corebreakpoint.cpp
+++ b/src/plugins/debugger/cdb/corebreakpoint.cpp
@@ -192,6 +192,9 @@ bool BreakPoint::apply(CIDebugBreakpoint *ibp, QString *errorMessage) const
*errorMessage = msgCannotSetBreakpoint(expr, msg);
return false;
}
+ hr = ibp->GetFlags(&flags);
+ if (SUCCEEDED(hr))
+ qDebug("BP %s Flags %x", qPrintable(expr), flags);
return true;
}
diff --git a/src/plugins/debugger/debugger.pro b/src/plugins/debugger/debugger.pro
index f4ebe54f72..62035c48e6 100644
--- a/src/plugins/debugger/debugger.pro
+++ b/src/plugins/debugger/debugger.pro
@@ -95,7 +95,6 @@ SOURCES += breakhandler.cpp \
FORMS += attachexternaldialog.ui \
attachcoredialog.ui \
attachtcfdialog.ui \
- breakbyfunction.ui \
breakcondition.ui \
breakpoint.ui \
dumperoptionpage.ui \
diff --git a/src/plugins/debugger/debuggeractions.cpp b/src/plugins/debugger/debuggeractions.cpp
index 8a0eba727c..670db758c0 100644
--- a/src/plugins/debugger/debuggeractions.cpp
+++ b/src/plugins/debugger/debuggeractions.cpp
@@ -317,9 +317,6 @@ DebuggerSettings *DebuggerSettings::instance()
item->setValue(true);
instance->insertItem(UseCodeModel, item);
- item = new SavedAction(instance);
- item->setText(tr("Recheck Debugging Helper Availability"));
- instance->insertItem(RecheckDebuggingHelpers, item);
//
// Breakpoints
diff --git a/src/plugins/debugger/debuggeractions.h b/src/plugins/debugger/debuggeractions.h
index 6fd56fb64f..c0ef28a8f3 100644
--- a/src/plugins/debugger/debuggeractions.h
+++ b/src/plugins/debugger/debuggeractions.h
@@ -94,7 +94,6 @@ enum DebuggerActionCode
OperateByInstruction,
AutoDerefPointers,
- RecheckDebuggingHelpers,
UseDebuggingHelpers,
UseCustomDebuggingHelperLocation,
CustomDebuggingHelperLocation,
diff --git a/src/plugins/debugger/debuggerconstants.h b/src/plugins/debugger/debuggerconstants.h
index 6f56ef5dbc..0360144147 100644
--- a/src/plugins/debugger/debuggerconstants.h
+++ b/src/plugins/debugger/debuggerconstants.h
@@ -47,7 +47,6 @@ const char * const STEPOUT = "Debugger.StepOut";
const char * const NEXT = "Debugger.NextLine";
const char * const REVERSE = "Debugger.ReverseDirection";
-const char * const M_DEBUG_DEBUGGING_LANGUAGES = "Debugger.Menu.View.DebugLanguages";
const char * const M_DEBUG_VIEWS = "Debugger.Menu.View.Debug";
const char * const C_DEBUGMODE = "Debugger.DebugMode";
@@ -204,6 +203,7 @@ enum ModelRoles
RequestExecuteCommandRole,
// Breakpoints
+ BreakpointRole,
BreakpointEnabledRole,
BreakpointUseFullPathRole,
BreakpointFunctionNameRole,
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index 56f165db76..08e992720f 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -1265,8 +1265,8 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments, QString *er
// Cpp/Qml ui setup
m_uiSwitcher = new DebuggerUISwitcher(m_debugMode, this);
ExtensionSystem::PluginManager::instance()->addObject(m_uiSwitcher);
- m_uiSwitcher->addLanguage(CppLanguage, tr("C++"), cppDebuggercontext);
- m_uiSwitcher->addLanguage(QmlLanguage, tr("QML/JavaScript"), qmlDebuggerContext);
+ m_uiSwitcher->addLanguage(CppLanguage, cppDebuggercontext);
+ m_uiSwitcher->addLanguage(QmlLanguage, qmlDebuggerContext);
// Dock widgets
m_breakDock = m_uiSwitcher->createDockWidget(CppLanguage, m_breakWindow);
@@ -2168,8 +2168,7 @@ void DebuggerPluginPrivate::setSimpleDockWidgetArrangement
if ((activeLanguages.testFlag(CppLanguage)
&& !activeLanguages.testFlag(QmlLanguage))
- || activeLanguages == AnyLanguage
- || !uiSwitcher->qmlInspectorWindow()) {
+ || activeLanguages == AnyLanguage) {
m_stackDock->show();
m_breakDock->show();
m_watchDock->show();
@@ -2180,7 +2179,8 @@ void DebuggerPluginPrivate::setSimpleDockWidgetArrangement
m_breakDock->show();
m_watchDock->show();
m_scriptConsoleDock->show();
- uiSwitcher->qmlInspectorWindow()->show();
+ if (uiSwitcher->qmlInspectorWindow())
+ uiSwitcher->qmlInspectorWindow()->show();
}
mw->splitDockWidget(mw->toolBarDockWidget(), m_stackDock, Qt::Vertical);
mw->splitDockWidget(m_stackDock, m_watchDock, Qt::Horizontal);
@@ -2235,7 +2235,6 @@ void DebuggerPluginPrivate::setInitialState()
m_actions.jumpToLineAction2->setEnabled(false);
m_actions.nextAction->setEnabled(false);
- theDebuggerAction(RecheckDebuggingHelpers)->setEnabled(false);
theDebuggerAction(AutoDerefPointers)->setEnabled(true);
theDebuggerAction(ExpandStack)->setEnabled(false);
theDebuggerAction(ExecuteCommand)->setEnabled(m_state == InferiorStopOk);
@@ -2347,7 +2346,6 @@ void DebuggerPluginPrivate::updateState(DebuggerEngine *engine)
m_actions.nextAction->setEnabled(stopped);
- theDebuggerAction(RecheckDebuggingHelpers)->setEnabled(actionsEnabled);
const bool canDeref = actionsEnabled
&& (m_capabilities & AutoDerefPointersCapability);
theDebuggerAction(AutoDerefPointers)->setEnabled(canDeref);
diff --git a/src/plugins/debugger/debuggeruiswitcher.cpp b/src/plugins/debugger/debuggeruiswitcher.cpp
index b3f40540c3..9c89368dbc 100644
--- a/src/plugins/debugger/debuggeruiswitcher.cpp
+++ b/src/plugins/debugger/debuggeruiswitcher.cpp
@@ -129,17 +129,12 @@ struct DebuggerUISwitcherPrivate
QHash<DebuggerLanguage, Context> m_contextsForLanguage;
- QActionGroup *m_languageActionGroup;
bool m_inDebugMode;
bool m_changingUI;
- ActionContainer *m_debuggerLanguageMenu;
DebuggerLanguages m_previousDebugLanguages;
DebuggerLanguages m_activeDebugLanguages;
- QAction *m_activateCppAction;
- QAction *m_activateQmlAction;
QAction *m_openMemoryEditorAction;
- bool m_qmlEnabled;
ActionContainer *m_viewsMenu;
ActionContainer *m_debugMenu;
@@ -160,21 +155,15 @@ DebuggerUISwitcherPrivate::DebuggerUISwitcherPrivate(DebuggerUISwitcher *q)
, m_supportedLanguages(AnyLanguage)
, m_languageCount(0)
, m_toolbarStack(new QStackedWidget)
- , m_languageActionGroup(new QActionGroup(q))
, m_inDebugMode(false)
, m_changingUI(false)
- , m_debuggerLanguageMenu(0)
, m_previousDebugLanguages(AnyLanguage)
, m_activeDebugLanguages(AnyLanguage)
- , m_activateCppAction(0)
- , m_activateQmlAction(0)
, m_openMemoryEditorAction(0)
- , m_qmlEnabled(false)
, m_viewsMenu(0)
, m_debugMenu(0)
, m_initialized(false)
{
- m_languageActionGroup->setExclusive(false);
}
DebuggerUISwitcher *DebuggerUISwitcherPrivate::m_instance = 0;
@@ -197,7 +186,6 @@ DebuggerUISwitcher::DebuggerUISwitcher(BaseMode *mode, QObject* parent)
d->m_debugMenu = am->actionContainer(ProjectExplorer::Constants::M_DEBUG);
d->m_viewsMenu = am->actionContainer(Core::Id(Core::Constants::M_WINDOW_VIEWS));
QTC_ASSERT(d->m_viewsMenu, return)
- d->m_debuggerLanguageMenu = am->createMenu(Constants::M_DEBUG_DEBUGGING_LANGUAGES);
DebuggerUISwitcherPrivate::m_instance = this;
}
@@ -268,43 +256,24 @@ void DebuggerUISwitcher::updateUiForRunConfiguration(ProjectExplorer::RunConfigu
void DebuggerUISwitcher::updateUiForCurrentRunConfiguration()
{
- if (d->m_previousRunConfiguration) {
- ProjectExplorer::RunConfiguration *rc = d->m_previousRunConfiguration.data();
-
- if (d->m_activateCppAction)
- d->m_activateCppAction->setChecked(rc->useCppDebugger());
- if (d->m_activateQmlAction)
- d->m_activateQmlAction->setChecked(rc->useQmlDebugger());
- }
-
updateActiveLanguages();
}
void DebuggerUISwitcher::updateActiveLanguages()
{
- DebuggerLanguages prevLanguages = d->m_activeDebugLanguages;
-
- d->m_activeDebugLanguages = AnyLanguage;
+ DebuggerLanguages newLanguages = AnyLanguage;
- if (d->m_activateCppAction->isChecked())
- d->m_activeDebugLanguages = CppLanguage;
-
- if (d->m_qmlEnabled && d->m_activateQmlAction->isChecked())
- d->m_activeDebugLanguages |= QmlLanguage;
-
- if (d->m_activeDebugLanguages == AnyLanguage) {
- // do mutual exclusive selection if qml is enabled. Otherwise, just keep
- // cpp language selected.
- if (prevLanguages & CppLanguage && d->m_qmlEnabled) {
- d->m_activeDebugLanguages = QmlLanguage;
- d->m_activateQmlAction->setChecked(true);
- } else {
- d->m_activateCppAction->setChecked(true);
- d->m_activeDebugLanguages = CppLanguage;
- }
+ if (d->m_previousRunConfiguration) {
+ if (d->m_previousRunConfiguration.data()->useCppDebugger())
+ newLanguages = CppLanguage;
+ if (d->m_previousRunConfiguration.data()->useQmlDebugger())
+ newLanguages |= QmlLanguage;
}
- emit activeLanguagesChanged(d->m_activeDebugLanguages);
+ if (newLanguages != d->m_activeDebugLanguages) {
+ d->m_activeDebugLanguages = newLanguages;
+ emit activeLanguagesChanged(d->m_activeDebugLanguages);
+ }
updateUi();
}
@@ -357,9 +326,6 @@ void DebuggerUISwitcher::createViewsMenuItems()
ActionManager *am = core->actionManager();
Context globalcontext(Core::Constants::C_GLOBAL);
- d->m_debugMenu->addMenu(d->m_debuggerLanguageMenu, Core::Constants::G_DEFAULT_THREE);
- d->m_debuggerLanguageMenu->menu()->setTitle(tr("&Debug Languages"));
-
d->m_openMemoryEditorAction = new QAction(this);
d->m_openMemoryEditorAction->setText(tr("Memory..."));
connect(d->m_openMemoryEditorAction, SIGNAL(triggered()),
@@ -390,8 +356,7 @@ DebuggerUISwitcher *DebuggerUISwitcher::instance()
return DebuggerUISwitcherPrivate::m_instance;
}
-void DebuggerUISwitcher::addLanguage(const DebuggerLanguage &languageId,
- const QString &languageName, const Context &context)
+void DebuggerUISwitcher::addLanguage(const DebuggerLanguage &languageId, const Context &context)
{
bool activate = (d->m_supportedLanguages == AnyLanguage);
d->m_supportedLanguages = d->m_supportedLanguages | languageId;
@@ -400,30 +365,6 @@ void DebuggerUISwitcher::addLanguage(const DebuggerLanguage &languageId,
d->m_toolBars.insert(languageId, 0);
d->m_contextsForLanguage.insert(languageId, context);
- ActionManager *am = ICore::instance()->actionManager();
-
- QAction *debuggableLang = new QAction(languageName, this);
- debuggableLang->setCheckable(true);
- debuggableLang->setText(languageName);
- d->m_languageActionGroup->addAction(debuggableLang);
- Command *activeDebugLanguageCmd = am->registerAction(debuggableLang,
- QString("Debugger.DebugLanguage." + languageName),
- Context(Core::Constants::C_GLOBAL));
- d->m_debuggerLanguageMenu->addAction(activeDebugLanguageCmd);
-
- QString shortcutPrefix = tr("Alt+L");
- QString shortcutIndex = QString::number(d->m_languageCount);
- activeDebugLanguageCmd->setDefaultKeySequence(QKeySequence(
- QString("%1,%2").arg(shortcutPrefix).arg(shortcutIndex)));
-
- if (languageId == QmlLanguage) {
- d->m_qmlEnabled = true;
- d->m_activateQmlAction = debuggableLang;
- } else if (!d->m_activateCppAction) {
- d->m_activateCppAction = debuggableLang;
- }
- connect(debuggableLang, SIGNAL(triggered()), SLOT(updateActiveLanguages()));
-
updateUiForRunConfiguration(0);
if (activate)
@@ -683,7 +624,7 @@ void DebuggerUISwitcher::writeSettings() const
}
settings->endGroup();
}
- if (d->m_qmlEnabled) {
+ {
settings->beginGroup(QLatin1String("DebugMode.CppQmlMode"));
QHashIterator<QString, QVariant> it(d->m_dockWidgetActiveStateQmlCpp);
while (it.hasNext()) {
@@ -706,13 +647,11 @@ void DebuggerUISwitcher::readSettings()
}
settings->endGroup();
- if (d->m_qmlEnabled) {
- settings->beginGroup(QLatin1String("DebugMode.CppQmlMode"));
- foreach (const QString &key, settings->childKeys()) {
- d->m_dockWidgetActiveStateQmlCpp.insert(key, settings->value(key));
- }
- settings->endGroup();
+ settings->beginGroup(QLatin1String("DebugMode.CppQmlMode"));
+ foreach (const QString &key, settings->childKeys()) {
+ d->m_dockWidgetActiveStateQmlCpp.insert(key, settings->value(key));
}
+ settings->endGroup();
// reset initial settings when there are none yet
DebuggerLanguages langs = d->m_activeDebugLanguages;
@@ -720,7 +659,7 @@ void DebuggerUISwitcher::readSettings()
d->m_activeDebugLanguages = CppLanguage;
resetDebuggerLayout();
}
- if (d->m_qmlEnabled && d->m_dockWidgetActiveStateQmlCpp.isEmpty()) {
+ if (d->m_dockWidgetActiveStateQmlCpp.isEmpty()) {
d->m_activeDebugLanguages = QmlLanguage;
resetDebuggerLayout();
}
diff --git a/src/plugins/debugger/debuggeruiswitcher.h b/src/plugins/debugger/debuggeruiswitcher.h
index 3fbd69b4b6..71b5728af3 100644
--- a/src/plugins/debugger/debuggeruiswitcher.h
+++ b/src/plugins/debugger/debuggeruiswitcher.h
@@ -76,8 +76,7 @@ public:
static DebuggerUISwitcher *instance();
// debuggable languages are registered with this function.
- void addLanguage(const DebuggerLanguage &language, const QString &languageName,
- const Core::Context &context);
+ void addLanguage(const DebuggerLanguage &language, const Core::Context &context);
// debugger toolbars are registered with this function
void setToolbar(const DebuggerLanguage &language, QWidget *widget);
diff --git a/src/plugins/debugger/gdb/classicgdbengine.cpp b/src/plugins/debugger/gdb/classicgdbengine.cpp
index 16d3a26855..6918f23c20 100644
--- a/src/plugins/debugger/gdb/classicgdbengine.cpp
+++ b/src/plugins/debugger/gdb/classicgdbengine.cpp
@@ -569,17 +569,6 @@ void GdbEngine::tryQueryDebuggingHelpersClassic()
CB(handleQueryDebuggingHelperClassic));
}
-void GdbEngine::recheckDebuggingHelperAvailabilityClassic()
-{
- PRECONDITION;
- if (m_gdbAdapter->dumperHandling() != AbstractGdbAdapter::DumperNotAvailable) {
- // Retrieve list of dumpable classes.
- postCommand("call (void*)qDumpObjectData440(1,0,0,0,0,0,0,0)");
- postCommand("p (char*)&qDumpOutBuffer",
- CB(handleQueryDebuggingHelperClassic));
- }
-}
-
// Called from CoreAdapter and AttachAdapter
void GdbEngine::updateAllClassic()
{
diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp
index 27311de6e8..739e37bec3 100644
--- a/src/plugins/debugger/gdb/gdbengine.cpp
+++ b/src/plugins/debugger/gdb/gdbengine.cpp
@@ -1781,8 +1781,6 @@ void GdbEngine::setupEngine()
this, SLOT(setUseDebuggingHelpers(QVariant)));
connect(theDebuggerAction(DebugDebuggingHelpers), SIGNAL(valueChanged(QVariant)),
this, SLOT(setDebugDebuggingHelpersClassic(QVariant)));
- connect(theDebuggerAction(RecheckDebuggingHelpers), SIGNAL(triggered()),
- this, SLOT(recheckDebuggingHelperAvailabilityClassic()));
}
QTC_ASSERT(state() == EngineSetupRequested, /**/);
@@ -2146,8 +2144,13 @@ static inline QByteArray bpAddressSpec(quint64 address)
QByteArray GdbEngine::breakpointLocation(const BreakpointData *data)
{
- if (!data->funcName.isEmpty())
+ if (!data->funcName.isEmpty()) {
+ if (data->funcName == QLatin1String(BreakpointData::throwFunction))
+ return QByteArray("__cxa_throw");
+ if (data->funcName == QLatin1String(BreakpointData::catchFunction))
+ return QByteArray("__cxa_begin_catch");
return data->funcName.toLatin1();
+ }
if (data->address)
return bpAddressSpec(data->address);
// In this case, data->funcName is something like '*0xdeadbeef'
diff --git a/src/plugins/debugger/gdb/gdbengine.h b/src/plugins/debugger/gdb/gdbengine.h
index c4b90b80da..210b1c6781 100644
--- a/src/plugins/debugger/gdb/gdbengine.h
+++ b/src/plugins/debugger/gdb/gdbengine.h
@@ -516,7 +516,6 @@ private: ////////// View & Data Stuff //////////
void setDebuggingHelperStateClassic(DebuggingHelperState);
void tryLoadDebuggingHelpersClassic();
void tryQueryDebuggingHelpersClassic();
- Q_SLOT void recheckDebuggingHelperAvailabilityClassic();
Q_SLOT void setDebugDebuggingHelpersClassic(const QVariant &on);
Q_SLOT void setUseDebuggingHelpers(const QVariant &on);
diff --git a/src/plugins/debugger/watchwindow.cpp b/src/plugins/debugger/watchwindow.cpp
index b1b46cc49a..878b0a11db 100644
--- a/src/plugins/debugger/watchwindow.cpp
+++ b/src/plugins/debugger/watchwindow.cpp
@@ -376,20 +376,8 @@ void WatchWindow::contextMenuEvent(QContextMenuEvent *ev)
menu.addAction(actSetWatchPointAtPointerValue);
menu.addSeparator();
- menu.addAction(theDebuggerAction(RecheckDebuggingHelpers));
menu.addAction(theDebuggerAction(UseDebuggingHelpers));
- QAction *actClearCodeModelSnapshot
- = new QAction(tr("Refresh Code Model Snapshot"), &menu);
- actClearCodeModelSnapshot->setEnabled(actionsEnabled
- && theDebuggerAction(UseCodeModel)->isChecked());
- menu.addAction(actClearCodeModelSnapshot);
- QAction *actShowInEditor
- = new QAction(tr("Show View Contents in Editor"), &menu);
- actShowInEditor->setEnabled(actionsEnabled);
- menu.addAction(actShowInEditor);
- menu.addSeparator();
menu.addAction(theDebuggerAction(UseToolTipsInLocalsView));
-
menu.addAction(theDebuggerAction(AutoDerefPointers));
menu.addAction(theDebuggerAction(ShowStdNamespace));
menu.addAction(theDebuggerAction(ShowQtNamespace));
@@ -403,6 +391,15 @@ void WatchWindow::contextMenuEvent(QContextMenuEvent *ev)
actAlwaysAdjustColumnWidth->setChecked(m_alwaysResizeColumnsToContents);
menu.addSeparator();
+ QAction *actClearCodeModelSnapshot
+ = new QAction(tr("Refresh Code Model Snapshot"), &menu);
+ actClearCodeModelSnapshot->setEnabled(actionsEnabled
+ && theDebuggerAction(UseCodeModel)->isChecked());
+ menu.addAction(actClearCodeModelSnapshot);
+ QAction *actShowInEditor
+ = new QAction(tr("Show View Contents in Editor"), &menu);
+ actShowInEditor->setEnabled(actionsEnabled);
+ menu.addAction(actShowInEditor);
menu.addAction(theDebuggerAction(SettingsDialog));
QAction *act = menu.exec(ev->globalPos());
diff --git a/src/plugins/git/gitsettings.cpp b/src/plugins/git/gitsettings.cpp
index 2a0110f23d..b860ce8790 100644
--- a/src/plugins/git/gitsettings.cpp
+++ b/src/plugins/git/gitsettings.cpp
@@ -128,11 +128,12 @@ QString GitSettings::gitBinaryPath(bool *ok, QString *errorMessage) const
if (errorMessage)
errorMessage->clear();
const QString binary = QLatin1String(Constants::GIT_BINARY);
+ QString currentPath = path;
// Easy, git is assumed to be elsewhere accessible
if (!adoptPath)
- return binary;
+ currentPath = QString::fromLocal8Bit(qgetenv("PATH"));
// Search in path?
- const QString pathBinary = Utils::SynchronousProcess::locateBinary(path, binary);
+ const QString pathBinary = Utils::SynchronousProcess::locateBinary(currentPath, binary);
if (pathBinary.isEmpty()) {
if (ok)
*ok = false;
@@ -144,5 +145,5 @@ QString GitSettings::gitBinaryPath(bool *ok, QString *errorMessage) const
return pathBinary;
}
-}
-}
+} // namespace Internal
+} // namespace Git
diff --git a/src/plugins/git/gitsettings.h b/src/plugins/git/gitsettings.h
index 0c73c45476..81cd280c6f 100644
--- a/src/plugins/git/gitsettings.h
+++ b/src/plugins/git/gitsettings.h
@@ -47,6 +47,7 @@ struct GitSettings
void fromSettings(QSettings *);
void toSettings(QSettings *) const;
+ /** Return the full path to the git executable */
QString gitBinaryPath(bool *ok = 0, QString *errorMessage = 0) const;
bool equals(const GitSettings &s) const;
diff --git a/src/plugins/projectexplorer/projecttreewidget.cpp b/src/plugins/projectexplorer/projecttreewidget.cpp
index 85109a4cd1..9a2e6815db 100644
--- a/src/plugins/projectexplorer/projecttreewidget.cpp
+++ b/src/plugins/projectexplorer/projecttreewidget.cpp
@@ -106,12 +106,12 @@ ProjectTreeWidget::ProjectTreeWidget(QWidget *parent)
layout->setContentsMargins(0, 0, 0, 0);
setLayout(layout);
- m_filterProjectsAction = new QAction(tr("Simplify tree"), this);
+ m_filterProjectsAction = new QAction(tr("Simplify Tree"), this);
m_filterProjectsAction->setCheckable(true);
m_filterProjectsAction->setChecked(false); // default is the traditional complex tree
connect(m_filterProjectsAction, SIGNAL(toggled(bool)), this, SLOT(setProjectFilter(bool)));
- m_filterGeneratedFilesAction = new QAction(tr("Hide generated files"), this);
+ m_filterGeneratedFilesAction = new QAction(tr("Hide Generated Files"), this);
m_filterGeneratedFilesAction->setCheckable(true);
m_filterGeneratedFilesAction->setChecked(true);
connect(m_filterGeneratedFilesAction, SIGNAL(toggled(bool)), this, SLOT(setGeneratedFilesFilter(bool)));
@@ -363,7 +363,7 @@ Core::NavigationView ProjectTreeWidgetFactory::createWidget()
QToolButton *filter = new QToolButton;
filter->setIcon(QIcon(QLatin1String(Core::Constants::ICON_FILTER)));
- filter->setToolTip(tr("Filter tree"));
+ filter->setToolTip(tr("Filter Tree"));
filter->setPopupMode(QToolButton::InstantPopup);
QMenu *filterMenu = new QMenu(filter);
filterMenu->addAction(ptw->m_filterProjectsAction);
diff --git a/src/plugins/projectexplorer/userfileaccessor.cpp b/src/plugins/projectexplorer/userfileaccessor.cpp
index 9ecf0f18c6..4642656e3a 100644
--- a/src/plugins/projectexplorer/userfileaccessor.cpp
+++ b/src/plugins/projectexplorer/userfileaccessor.cpp
@@ -161,7 +161,7 @@ public:
QString displayUserFileVersion() const
{
- return QLatin1String("2.2pre1");
+ return QLatin1String("2.1pre1");
}
QVariantMap update(Project *project, const QVariantMap &map);
@@ -178,13 +178,13 @@ public:
QString displayUserFileVersion() const
{
- return QLatin1String("2.2pre2");
+ return QLatin1String("2.1pre2");
}
QVariantMap update(Project *project, const QVariantMap &map);
};
-// Version 5 reflects the introduction of new deploy steps for Symbian/Maemo
+// Version 6 reflects the introduction of new deploy steps for Symbian/Maemo
class Version6Handler : public UserFileVersionHandler
{
public:
@@ -195,13 +195,13 @@ public:
QString displayUserFileVersion() const
{
- return QLatin1String("2.2pre3");
+ return QLatin1String("2.1pre3");
}
QVariantMap update(Project *project, const QVariantMap &map);
};
-// Version 5 reflects the introduction of new deploy configuration for Symbian
+// Version 7 reflects the introduction of new deploy configuration for Symbian
class Version7Handler : public UserFileVersionHandler
{
public:
@@ -212,7 +212,7 @@ public:
QString displayUserFileVersion() const
{
- return QLatin1String("2.2pre4");
+ return QLatin1String("2.1pre4");
}
QVariantMap update(Project *project, const QVariantMap &map);
diff --git a/src/plugins/qmljseditor/qmljsoutline.cpp b/src/plugins/qmljseditor/qmljsoutline.cpp
index 8d37863d6e..b1465819de 100644
--- a/src/plugins/qmljseditor/qmljsoutline.cpp
+++ b/src/plugins/qmljseditor/qmljsoutline.cpp
@@ -83,7 +83,7 @@ QmlJSOutlineWidget::QmlJSOutlineWidget(QWidget *parent) :
layout->addWidget(m_treeView);
m_showBindingsAction = new QAction(this);
- m_showBindingsAction->setText(tr("Show all bindings"));
+ m_showBindingsAction->setText(tr("Show All Bindings"));
m_showBindingsAction->setCheckable(true);
m_showBindingsAction->setChecked(true);
connect(m_showBindingsAction, SIGNAL(toggled(bool)), this, SLOT(setShowBindings(bool)));
diff --git a/src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp b/src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp
index 474e8bdec1..260cd60003 100644
--- a/src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp
+++ b/src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp
@@ -47,8 +47,8 @@ namespace Internal {
QmlProjectApplicationWizardDialog::QmlProjectApplicationWizardDialog(QWidget *parent) :
ProjectExplorer::BaseProjectWizardDialog(parent)
{
- setWindowTitle(tr("New QML Project"));
- setIntroDescription(tr("This wizard generates a QML application project."));
+ setWindowTitle(tr("New Qt Quick UI Project"));
+ setIntroDescription(tr("This wizard generates a Qt Quick UI project."));
}
QmlProjectApplicationWizard::QmlProjectApplicationWizard()
@@ -62,11 +62,14 @@ Core::BaseFileWizardParameters QmlProjectApplicationWizard::parameters()
{
Core::BaseFileWizardParameters parameters(ProjectWizard);
parameters.setIcon(QIcon(QLatin1String(Constants::QML_WIZARD_ICON)));
- parameters.setDisplayName(tr("Qt QML Application"));
- parameters.setDisplayName(tr("QML Application"));
+ parameters.setDisplayName(tr("Qt Quick UI"));
parameters.setId(QLatin1String("QA.QML Application"));
- parameters.setDescription(tr("Creates a QML application project with a single QML file containing the main view.\n\n"
- "QML application projects are executed by the Qt QML Viewer and do not need to be built."));
+
+ parameters.setDescription(tr("Creates a Qt Quick UI project with a single "
+ "QML file that contains the main view.\n\n"
+ "You can review Qt Quick UI projects in the QML Viewer and you need not build them. "
+ "You do not need to have the development environment installed "
+ "on your computer to create and run this type of projects."));
parameters.setCategory(QLatin1String(Constants::QML_WIZARD_CATEGORY));
parameters.setDisplayCategory(QCoreApplication::translate(Constants::QML_WIZARD_TR_SCOPE,
Constants::QML_WIZARD_TR_CATEGORY));
diff --git a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp
index 5b63607acd..3cd103a42d 100644
--- a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp
+++ b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp
@@ -42,6 +42,7 @@
#include <utils/synchronousprocess.h>
#include <utils/pathchooser.h>
#include <utils/debuggerlanguagechooser.h>
+#include <utils/detailswidget.h>
#include <qt4projectmanager/qtversionmanager.h>
#include <qt4projectmanager/qt4projectmanagerconstants.h>
@@ -150,8 +151,13 @@ static bool caseInsensitiveLessThan(const QString &s1, const QString &s2)
QWidget *QmlProjectRunConfiguration::createConfigurationWidget()
{
- QWidget *config = new QWidget;
- QFormLayout *form = new QFormLayout(config);
+ Utils::DetailsWidget *detailsWidget = new Utils::DetailsWidget();
+ detailsWidget->setState(Utils::DetailsWidget::NoSummary);
+
+ QWidget *formWidget = new QWidget(detailsWidget);
+ detailsWidget->setWidget(formWidget);
+ QFormLayout *form = new QFormLayout(formWidget);
+ form->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow);
m_fileListCombo = new QComboBox;
m_fileListCombo.data()->setModel(m_fileListModel);
@@ -174,7 +180,7 @@ QWidget *QmlProjectRunConfiguration::createConfigurationWidget()
connect(qmlViewerArgs, SIGNAL(textChanged(QString)), this, SLOT(onViewerArgsChanged()));
form->addRow(tr("Custom QML Viewer:"), qmlViewer);
- form->addRow(tr("QML Viewer arguments:"), qmlViewerArgs);
+ form->addRow(tr("Arguments:"), qmlViewerArgs);
form->addRow(QString(), m_qmlViewerExecutable.data());
QWidget *debuggerLabelWidget = new QWidget;
@@ -186,7 +192,7 @@ QWidget *QmlProjectRunConfiguration::createConfigurationWidget()
debuggerLabelLayout->addWidget(debuggerLabel);
debuggerLabelLayout->addStretch(10);
- Utils::DebuggerLanguageChooser *debuggerLanguageChooser = new Utils::DebuggerLanguageChooser(config);
+ Utils::DebuggerLanguageChooser *debuggerLanguageChooser = new Utils::DebuggerLanguageChooser(formWidget);
form->addRow(tr("Main QML file:"), m_fileListCombo.data());
form->addRow(debuggerLabelWidget, debuggerLanguageChooser);
@@ -202,7 +208,7 @@ QWidget *QmlProjectRunConfiguration::createConfigurationWidget()
connect(debuggerLanguageChooser, SIGNAL(qmlDebugServerPortChanged(uint)),
this, SLOT(qmlDebugServerPortChanged(uint)));
- return config;
+ return detailsWidget;
}
diff --git a/src/plugins/qt4projectmanager/makestep.cpp b/src/plugins/qt4projectmanager/makestep.cpp
index 4a42a65633..6fa06af26e 100644
--- a/src/plugins/qt4projectmanager/makestep.cpp
+++ b/src/plugins/qt4projectmanager/makestep.cpp
@@ -238,7 +238,11 @@ MakeStepConfigWidget::MakeStepConfigWidget(MakeStep *makeStep)
: BuildStepConfigWidget(), m_ui(new Ui::MakeStep), m_makeStep(makeStep), m_ignoreChange(false)
{
m_ui->setupUi(this);
- connect(m_ui->makeLineEdit, SIGNAL(textEdited(QString)),
+
+ m_ui->makePathChooser->setExpectedKind(Utils::PathChooser::ExistingCommand);
+ m_ui->makePathChooser->setBaseDirectory(Utils::PathChooser::homePath());
+
+ connect(m_ui->makePathChooser, SIGNAL(editingFinished()),
this, SLOT(makeEdited()));
connect(m_ui->makeArgumentsLineEdit, SIGNAL(textEdited(QString)),
this, SLOT(makeArgumentsLineEdited()));
@@ -336,7 +340,7 @@ void MakeStepConfigWidget::init()
updateMakeOverrideLabel();
const QString &makeCmd = m_makeStep->m_makeCmd;
- m_ui->makeLineEdit->setText(makeCmd);
+ m_ui->makePathChooser->setPath(makeCmd);
const QStringList &makeArguments = m_makeStep->userArguments();
m_ui->makeArgumentsLineEdit->setText(Utils::Environment::joinArgumentList(makeArguments));
@@ -345,7 +349,7 @@ void MakeStepConfigWidget::init()
void MakeStepConfigWidget::makeEdited()
{
- m_makeStep->m_makeCmd = m_ui->makeLineEdit->text();
+ m_makeStep->m_makeCmd = m_ui->makePathChooser->rawPath();
updateDetails();
}
diff --git a/src/plugins/qt4projectmanager/makestep.ui b/src/plugins/qt4projectmanager/makestep.ui
index 1dfff96f27..015936f46c 100644
--- a/src/plugins/qt4projectmanager/makestep.ui
+++ b/src/plugins/qt4projectmanager/makestep.ui
@@ -11,18 +11,14 @@
</rect>
</property>
<layout class="QFormLayout" name="formLayout">
+ <property name="fieldGrowthPolicy">
+ <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
+ </property>
<property name="margin">
<number>0</number>
</property>
- <item row="0" column="0">
- <widget class="QLabel" name="makeLabel">
- <property name="text">
- <string>Override %1:</string>
- </property>
- </widget>
- </item>
<item row="0" column="1">
- <widget class="QLineEdit" name="makeLineEdit"/>
+ <widget class="Utils::PathChooser" name="makePathChooser"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="makeArgumentsLabel">
@@ -34,8 +30,22 @@
<item row="1" column="1">
<widget class="QLineEdit" name="makeArgumentsLineEdit"/>
</item>
+ <item row="0" column="0">
+ <widget class="QLabel" name="makeLabel">
+ <property name="text">
+ <string>Override %1:</string>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
+ <customwidgets>
+ <customwidget>
+ <class>Utils::PathChooser</class>
+ <extends>QLineEdit</extends>
+ <header>utils/pathchooser.h</header>
+ </customwidget>
+ </customwidgets>
<resources/>
<connections/>
</ui>
diff --git a/src/plugins/qt4projectmanager/qmakestep.cpp b/src/plugins/qt4projectmanager/qmakestep.cpp
index df002105e1..eed72d54f9 100644
--- a/src/plugins/qt4projectmanager/qmakestep.cpp
+++ b/src/plugins/qt4projectmanager/qmakestep.cpp
@@ -116,11 +116,12 @@ QStringList QMakeStep::allArguments()
// Find out what flags we pass on to qmake
arguments << bc->configCommandLineArguments();
- arguments << moreArguments();
if (!additonalArguments.isEmpty())
arguments << additonalArguments;
+ arguments << moreArguments();
+
return arguments;
}
diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemorunfactories.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemorunfactories.cpp
index 0ee8512d1d..49c42bef3c 100644
--- a/src/plugins/qt4projectmanager/qt-maemo/maemorunfactories.cpp
+++ b/src/plugins/qt4projectmanager/qt-maemo/maemorunfactories.cpp
@@ -163,7 +163,8 @@ bool MaemoRunControlFactory::canRun(RunConfiguration *runConfiguration,
const MaemoRunConfiguration * const maemoRunConfig
= qobject_cast<MaemoRunConfiguration *>(runConfiguration);
if (!maemoRunConfig || !maemoRunConfig->deviceConfig().isValid()
- || !maemoRunConfig->toolchain())
+ || !maemoRunConfig->toolchain()
+ || maemoRunConfig->remoteExecutableFilePath().isEmpty())
return false;
const int freePortCount = maemoRunConfig->freePorts().count();
if (freePortCount == 0)
@@ -182,10 +183,11 @@ bool MaemoRunControlFactory::canRun(RunConfiguration *runConfiguration,
RunControl* MaemoRunControlFactory::create(RunConfiguration *runConfig,
const QString &mode)
{
- MaemoRunConfiguration *rc = qobject_cast<MaemoRunConfiguration *>(runConfig);
- Q_ASSERT(rc);
Q_ASSERT(mode == ProjectExplorer::Constants::RUNMODE
|| mode == ProjectExplorer::Constants::DEBUGMODE);
+ Q_ASSERT(canRun(runConfig, mode));
+ MaemoRunConfiguration *rc = qobject_cast<MaemoRunConfiguration *>(runConfig);
+ Q_ASSERT(rc);
if (mode == ProjectExplorer::Constants::RUNMODE)
return new MaemoRunControl(rc);
return MaemoDebugSupport::createDebugRunControl(rc);
diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemosshrunner.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemosshrunner.cpp
index 0ef0e95fc2..5ea12bc90e 100644
--- a/src/plugins/qt4projectmanager/qt-maemo/maemosshrunner.cpp
+++ b/src/plugins/qt4projectmanager/qt-maemo/maemosshrunner.cpp
@@ -143,11 +143,15 @@ void MaemoSshRunner::cleanup(bool initialCleanup)
emit reportProgress(tr("Killing remote process(es)..."));
m_shuttingDown = !initialCleanup;
+
+ // pkill behaves differently on Fremantle and Harmattan.
+ const char *const killTemplate = "pkill -%2 '^%1$'; pkill -%2 '/%1$';";
+
QString niceKill;
QString brutalKill;
foreach (const QString &proc, m_procsToKill) {
- niceKill += QString::fromLocal8Bit("pkill %1\\$;").arg(proc);
- brutalKill += QString::fromLocal8Bit("pkill -9 %1\\$;").arg(proc);
+ niceKill += QString::fromLocal8Bit(killTemplate).arg(proc).arg("SIGTERM");
+ brutalKill += QString::fromLocal8Bit(killTemplate).arg(proc).arg("SIGKILL");
}
QString remoteCall = niceKill + QLatin1String("sleep 1; ") + brutalKill;
remoteCall.remove(remoteCall.count() - 1, 1); // Get rid of trailing semicolon.
diff --git a/src/plugins/qt4projectmanager/wizards/mobilelibraryparameters.cpp b/src/plugins/qt4projectmanager/wizards/mobilelibraryparameters.cpp
index e38ea77b6b..79fbdde4b8 100644
--- a/src/plugins/qt4projectmanager/wizards/mobilelibraryparameters.cpp
+++ b/src/plugins/qt4projectmanager/wizards/mobilelibraryparameters.cpp
@@ -102,7 +102,7 @@ void MobileLibraryParameters::writeSymbianProFile(QTextStream &str) const
" addFiles.sources = " + fileName + ".dll\n"
" addFiles.path = !:/sys/bin\n"
" DEPLOYMENT += addFiles\n"
- "}\n";
+ "}";
}
void MobileLibraryParameters::writeMaemoProFile(QTextStream &str) const
diff --git a/src/plugins/qt4projectmanager/wizards/qmlstandaloneappwizard.cpp b/src/plugins/qt4projectmanager/wizards/qmlstandaloneappwizard.cpp
index bb4da242ea..600000d2c7 100644
--- a/src/plugins/qt4projectmanager/wizards/qmlstandaloneappwizard.cpp
+++ b/src/plugins/qt4projectmanager/wizards/qmlstandaloneappwizard.cpp
@@ -67,11 +67,11 @@ QmlStandaloneAppWizardDialog::QmlStandaloneAppWizardDialog(QmlStandaloneAppWizar
, m_qmlSourcesPage(0)
{
setWindowTitle(m_type == QmlStandaloneAppWizard::NewQmlFile
- ? tr("New QML Project")
- : tr("QML Project from existing, QML Viewer-based Project"));
+ ? tr("New Qt Quick Application")
+ : tr("Qt Quick Application from Existing QML Directory"));
setIntroDescription(m_type == QmlStandaloneAppWizard::NewQmlFile
- ? tr("This wizard generates a QML application project.")
- : tr("This wizard imports an existing, QML Viewer-based application and creates a standalone version of it."));
+ ? tr("This wizard generates a Qt Quick application project.")
+ : tr("This wizard imports an existing QML directory and creates a Qt Quick application project from it."));
if (m_type == QmlStandaloneAppWizard::ImportQmlFile) {
m_qmlSourcesPage = new QmlStandaloneAppWizardSourcesPage;
@@ -109,18 +109,16 @@ Core::BaseFileWizardParameters QmlStandaloneAppWizard::parameters(WizardType typ
Core::BaseFileWizardParameters parameters(ProjectWizard);
parameters.setIcon(QIcon(QLatin1String(Constants::ICON_QML_STANDALONE)));
parameters.setDisplayName(type == QmlStandaloneAppWizard::NewQmlFile
- ? tr("Qt QML Application")
- : tr("Qt QML Imported Application"));
+ ? tr("Qt Quick Application")
+ : tr("Import Existing QML Directory"));
parameters.setId(QLatin1String(type == QmlStandaloneAppWizard::NewQmlFile
? "QA.QMLA Application"
: "QA.QMLB Imported Application"));
parameters.setDescription(type == QmlStandaloneAppWizard::NewQmlFile
- ? tr("Creates a mobile-deployable Qt QML application "
- "project. A lightweight Qt/C++ application with a QDeclarativeView "
- "and a single QML file will be created.")
- : tr("Creates a mobile-deployable Qt QML application "
- "project. An existing, QML Viewer-based project will be imported and a lightweight "
- "Qt/C++ application with a QDeclarativeView will be created for it."));
+ ? tr("Creates a Qt Quick application that you can deploy to mobile devices.")
+ : tr("Imports an existing QML directory and converts it into a "
+ "Qt Quick application project. "
+ "You can deploy the application to mobile devices."));
parameters.setCategory(QLatin1String(Constants::QT_APP_WIZARD_CATEGORY));
parameters.setDisplayCategory(QCoreApplication::translate(Constants::QT_APP_WIZARD_TR_SCOPE,
Constants::QT_APP_WIZARD_TR_CATEGORY));
@@ -145,7 +143,7 @@ AbstractMobileAppWizardDialog *QmlStandaloneAppWizard::createWizardDialogInterna
if (!isNumber || majorVersion < 4)
continue;
const int minorVersion = versionString.mid(2, 1).toInt(&isNumber);
- if (!isNumber || minorVersion < 7)
+ if (!isNumber || (majorVersion == 4 && minorVersion < 7))
continue;
qmlQtVersions << qtVersion;
}
diff --git a/src/plugins/texteditor/fontsettingspage.cpp b/src/plugins/texteditor/fontsettingspage.cpp
index 0336d660b7..45882f7e0f 100644
--- a/src/plugins/texteditor/fontsettingspage.cpp
+++ b/src/plugins/texteditor/fontsettingspage.cpp
@@ -383,14 +383,14 @@ void FontSettingsPage::updatePointSizes()
d_ptr->ui.sizeComboBox->clear();
}
const QList<int> sizeLst = pointSizesForSelectedFont();
- int idx = 0;
+ int idx = -1;
int i = 0;
for (; i < sizeLst.count(); ++i) {
- if (idx == 0 && sizeLst.at(i) >= oldSize)
+ if (idx == -1 && sizeLst.at(i) >= oldSize)
idx = i;
d_ptr->ui.sizeComboBox->addItem(QString::number(sizeLst.at(i)));
}
- if (d_ptr->ui.sizeComboBox->count())
+ if (idx != -1)
d_ptr->ui.sizeComboBox->setCurrentIndex(idx);
}