diff --git a/src/plugins/debugger/gdb/trkgdbadapter.cpp b/src/plugins/debugger/gdb/trkgdbadapter.cpp index f12697546b3a4620725cb4298de3729714ecec73..a2b735777c4bb3f4a1279889769f35d934b226fb 100644 --- a/src/plugins/debugger/gdb/trkgdbadapter.cpp +++ b/src/plugins/debugger/gdb/trkgdbadapter.cpp @@ -1710,29 +1710,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()); @@ -1762,9 +1739,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 0c364a300df5cfd99dee048ac5649723f0495381..d67204615c9e060aaf6a4b159cc39b62e933cb17 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 c6f8cac0e8a11169c55cbc9998b939faee77d9e2..f4a288fe0743d902d641867db7fe4c34d8ebc89e 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 b77a030c1a50a63b9145dad39e9a3bdf611b390a..d61014a58774c5d8cb569c6862c6326e3758be67 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 f8786a979d94c2f591e6689c3007fadbc3173516..4af063e9b538d1a24adc0193a807629a77777bb4 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>