summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Molkentin <daniel.molkentin@nokia.com>2009-10-09 14:20:14 +0200
committercon <qtc-committer@nokia.com>2009-10-09 19:17:36 +0200
commit8a7518ccae6254d2f60f96c43df338d23f3acc67 (patch)
tree15bbe93aaf32556f19ea19d1656af90cfdfc3ffc
parent035c4af1e32286b77476c04ca5eaf35b77176b65 (diff)
downloadqt-creator-8a7518ccae6254d2f60f96c43df338d23f3acc67.tar.gz
Remove cygwin options now that we have a GDB which was build with MinGW.
Also, remove COM port selection on windows. It is taken from the run configuration in case of Windows anyway. Reviewed-By: Friedemann Kleint (cherry picked from commit 555f8a02ec935bcb7fbdbdec4e12d16c632bdf27)
-rw-r--r--src/plugins/debugger/gdb/trkgdbadapter.cpp26
-rw-r--r--src/plugins/debugger/gdb/trkoptions.cpp30
-rw-r--r--src/plugins/debugger/gdb/trkoptions.h4
-rw-r--r--src/plugins/debugger/gdb/trkoptionswidget.cpp8
-rw-r--r--src/plugins/debugger/gdb/trkoptionswidget.ui13
5 files changed, 7 insertions, 74 deletions
diff --git a/src/plugins/debugger/gdb/trkgdbadapter.cpp b/src/plugins/debugger/gdb/trkgdbadapter.cpp
index 86c7e6f527..e4aa49cbef 100644
--- a/src/plugins/debugger/gdb/trkgdbadapter.cpp
+++ b/src/plugins/debugger/gdb/trkgdbadapter.cpp
@@ -1720,29 +1720,6 @@ void TrkGdbAdapter::handleFirstContinue(const GdbResponse &record)
}
}
-#ifdef Q_OS_WIN
-
-// Prepend environment of the Symbian Gdb by Cygwin '/bin'
-static void setGdbCygwinEnvironment(const QString &cygwin, QProcess *process)
-{
- if (cygwin.isEmpty() || !QFileInfo(cygwin).isDir())
- return;
- const QString cygwinBinPath = QDir::toNativeSeparators(cygwin) + QLatin1String("\\bin");
- QStringList env = process->environment();
- if (env.isEmpty())
- env = QProcess::systemEnvironment();
- const QRegExp pathPattern(QLatin1String("^PATH=.*"), Qt::CaseInsensitive);
- const int index = env.indexOf(pathPattern);
- if (index == -1)
- return;
- QString pathValue = env.at(index).mid(5);
- if (pathValue.startsWith(cygwinBinPath))
- return;
- env[index] = QLatin1String("PATH=") + cygwinBinPath + QLatin1Char(';');
- process->setEnvironment(env);
-}
-#endif
-
void TrkGdbAdapter::startGdb()
{
QTC_ASSERT(state() == AdapterStarting, qDebug() << state());
@@ -1772,9 +1749,6 @@ void TrkGdbAdapter::startGdb()
gdbArgs.append(QLatin1String("--nx")); // Do not read .gdbinit file
gdbArgs.append(QLatin1String("-i"));
gdbArgs.append(QLatin1String("mi"));
-#ifdef Q_OS_WIN
- setGdbCygwinEnvironment(m_options->cygwin, &m_gdbProc);
-#endif
m_gdbProc.start(m_options->gdb, gdbArgs);
}
diff --git a/src/plugins/debugger/gdb/trkoptions.cpp b/src/plugins/debugger/gdb/trkoptions.cpp
index 0c364a300d..d67204615c 100644
--- a/src/plugins/debugger/gdb/trkoptions.cpp
+++ b/src/plugins/debugger/gdb/trkoptions.cpp
@@ -54,24 +54,6 @@ static const char *modeKeyC = "Mode";
static const char *blueToothDeviceKeyC = "BlueToothDevice";
static const char *blueToothDeviceDefaultC = "/dev/rfcomm0";
static const char *gdbKeyC = "gdb";
-static const char *cygwinKeyC = "Cygwin";
-
-static inline QString cygwinDefault()
-{
-#ifdef Q_OS_WIN
- // Some smartness to check for Cygwin
- static bool firstTime = true;
- static QString rc = QLatin1String("C:/cygwin");
- if (firstTime) {
- if (!QFileInfo(rc).isDir())
- rc.clear();
- firstTime = false;
- }
- return rc;
-#else
- return QString();
-#endif
-}
namespace Debugger {
namespace Internal {
@@ -80,8 +62,7 @@ TrkOptions::TrkOptions() :
mode(modeDefault),
serialPort(QLatin1String(serialPortDefaultC)),
blueToothDevice(QLatin1String(blueToothDeviceDefaultC)),
- gdb(QLatin1String(gdbDefaultC)),
- cygwin(cygwinDefault())
+ gdb(QLatin1String(gdbDefaultC))
{
}
@@ -91,7 +72,6 @@ void TrkOptions::fromSettings(const QSettings *s)
mode = s->value(keyRoot + QLatin1String(modeKeyC), modeDefault).toInt();
serialPort = s->value(keyRoot + QLatin1String(serialPortKeyC), QLatin1String(serialPortDefaultC)).toString();
gdb = s->value(keyRoot + QLatin1String(gdbKeyC),QLatin1String(gdbDefaultC)).toString();
- cygwin = s->value(keyRoot + QLatin1String(cygwinKeyC), cygwinDefault()).toString();
blueToothDevice = s->value(keyRoot + QLatin1String(blueToothDeviceKeyC), QLatin1String(blueToothDeviceDefaultC)).toString();
}
@@ -102,7 +82,6 @@ void TrkOptions::toSettings(QSettings *s) const
s->setValue(QLatin1String(serialPortKeyC), serialPort);
s->setValue(QLatin1String(blueToothDeviceKeyC), blueToothDevice);
s->setValue(QLatin1String(gdbKeyC), gdb);
- s->setValue(QLatin1String(cygwinKeyC), cygwin);
s->endGroup();
}
@@ -117,10 +96,6 @@ bool TrkOptions::check(QString *errorMessage) const
*errorMessage = QCoreApplication::translate("TrkOptions", "The Symbian gdb executable '%1' could not be found in the search path.").arg(gdb);
return false;
}
- if (!cygwin.isEmpty() && !QFileInfo(cygwin).isDir()) {
- *errorMessage = QCoreApplication::translate("TrkOptions", "The Cygwin directory '%1' does not exist.").arg(cygwin);
- return false;
- }
return true;
}
@@ -129,8 +104,7 @@ bool TrkOptions::equals(const TrkOptions &o) const
return mode == o.mode
&& serialPort == o.serialPort
&& blueToothDevice == o.blueToothDevice
- && gdb == o.gdb
- && cygwin == o.cygwin;
+ && gdb == o.gdb;
}
QStringList TrkOptions::serialPorts()
diff --git a/src/plugins/debugger/gdb/trkoptions.h b/src/plugins/debugger/gdb/trkoptions.h
index c6f8cac0e8..f4a288fe07 100644
--- a/src/plugins/debugger/gdb/trkoptions.h
+++ b/src/plugins/debugger/gdb/trkoptions.h
@@ -40,8 +40,7 @@ namespace Debugger {
namespace Internal {
/* Parameter to be used for debugging S60 via TRK.
- * GDB is a Symbian-ARM Gdb. It is Cygwin-built on Windows; the cygwin
- * location 'x/bin' will prepended to the execution path.
+ * GDB is a Symbian-ARM Gdb.
* Communication happens either via BlueTooth (Linux only) or
* serial ports. */
@@ -64,7 +63,6 @@ struct TrkOptions
QString serialPort;
QString blueToothDevice;
QString gdb;
- QString cygwin; // ignored on Linux
};
inline bool operator==(const TrkOptions &o1, const TrkOptions &o2)
diff --git a/src/plugins/debugger/gdb/trkoptionswidget.cpp b/src/plugins/debugger/gdb/trkoptionswidget.cpp
index b77a030c1a..d61014a587 100644
--- a/src/plugins/debugger/gdb/trkoptionswidget.cpp
+++ b/src/plugins/debugger/gdb/trkoptionswidget.cpp
@@ -41,16 +41,12 @@ TrkOptionsWidget::TrkOptionsWidget(QWidget *parent) :
{
ui->setupUi(this);
ui->gdbChooser->setExpectedKind(Utils::PathChooser::Command);
- ui->cygwinChooser->setExpectedKind(Utils::PathChooser::Directory);
ui->blueToothComboBox->addItems(TrkOptions::blueToothDevices());
ui->serialComboBox->addItems(TrkOptions::serialPorts());
connect(ui->commComboBox, SIGNAL(currentIndexChanged(int)), ui->commStackedWidget, SLOT(setCurrentIndex(int)));
// No bluetooth on Windows yet...
#ifdef Q_OS_WIN
- ui->commComboBox->setEnabled(false);
-#else
- ui->cygwinChooser->setVisible(false);
- ui->cygwinLabel->setVisible(false);
+ ui->commGroupBox->setVisible(false);
#endif
}
@@ -78,7 +74,6 @@ void TrkOptionsWidget::setTrkOptions(const TrkOptions &o)
const int serialPortIndex = qMax(0, ui->serialComboBox->findText(o.serialPort));
ui->serialComboBox->setCurrentIndex(serialPortIndex);
ui->gdbChooser->setPath(o.gdb);
- ui->cygwinChooser->setPath(o.cygwin);
const int blueToothIndex = qMax(0, ui->blueToothComboBox->findText(o.blueToothDevice));
ui->blueToothComboBox->setCurrentIndex(blueToothIndex);
}
@@ -88,7 +83,6 @@ TrkOptions TrkOptionsWidget::trkOptions() const
TrkOptions rc;
rc.mode = ui->commComboBox->currentIndex();
rc.gdb = ui->gdbChooser->path();
- rc.cygwin = ui->cygwinChooser->path();
rc.blueToothDevice = ui->blueToothComboBox->currentText();
rc.serialPort = ui->serialComboBox->currentText();
return rc;
diff --git a/src/plugins/debugger/gdb/trkoptionswidget.ui b/src/plugins/debugger/gdb/trkoptionswidget.ui
index f8786a979d..4af063e9b5 100644
--- a/src/plugins/debugger/gdb/trkoptionswidget.ui
+++ b/src/plugins/debugger/gdb/trkoptionswidget.ui
@@ -20,6 +20,9 @@
<string>Gdb</string>
</property>
<layout class="QFormLayout" name="formLayout">
+ <property name="fieldGrowthPolicy">
+ <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
+ </property>
<item row="0" column="0">
<widget class="QLabel" name="gdbLabel">
<property name="text">
@@ -30,16 +33,6 @@
<item row="0" column="1">
<widget class="Utils::PathChooser" name="gdbChooser" native="true"/>
</item>
- <item row="1" column="0">
- <widget class="QLabel" name="cygwinLabel">
- <property name="text">
- <string>Cygwin location:</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="Utils::PathChooser" name="cygwinChooser" native="true"/>
- </item>
</layout>
</widget>
</item>