forked from qt-creator/qt-creator
debugger: make qt source path configurable
This commit is contained in:
@@ -126,6 +126,7 @@ QWidget *CommonOptionsPage::createPage(QWidget *parent)
|
||||
m_group.insert(debuggerCore()->action(VerboseLog), 0);
|
||||
m_group.insert(debuggerCore()->action(BreakOnThrow), 0);
|
||||
m_group.insert(debuggerCore()->action(BreakOnCatch), 0);
|
||||
m_group.insert(debuggerCore()->action(QtSourcesLocation), 0);
|
||||
#ifdef Q_OS_WIN
|
||||
Utils::SavedAction *registerAction = debuggerCore()->action(RegisterForPostMortem);
|
||||
m_group.insert(registerAction,
|
||||
|
@@ -129,6 +129,32 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="sourcesBox">
|
||||
<property name="title">
|
||||
<string>Sources</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="sourcesGridLayout">
|
||||
<item row="7" column="0">
|
||||
<widget class="QLabel" name="labelMaximalStackDepth">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Qt Sources:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<widget class="Utils::PathChooser" name="qtSourcesChooser" native="true">
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
@@ -147,6 +173,13 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>Utils::PathChooser</class>
|
||||
<extends>QWidget</extends>
|
||||
<header location="global">utils/pathchooser.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
@@ -400,6 +400,11 @@ DebuggerSettings::DebuggerSettings(QSettings *settings)
|
||||
item->setSettingsKey(debugModeGroup, QLatin1String("WatchdogTimeout"));
|
||||
item->setDefaultValue(20);
|
||||
insertItem(GdbWatchdogTimeout, item);
|
||||
|
||||
item = new SavedAction(this);
|
||||
item->setSettingsKey(debugModeGroup, QLatin1String("QtSourcesLocation"));
|
||||
item->setDefaultValue(QString());
|
||||
insertItem(QtSourcesLocation, item);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -88,6 +88,7 @@ enum DebuggerActionCode
|
||||
UseDebuggingHelpers,
|
||||
UseCustomDebuggingHelperLocation,
|
||||
CustomDebuggingHelperLocation,
|
||||
QtSourcesLocation,
|
||||
|
||||
UseCodeModel,
|
||||
ShowThreadNames,
|
||||
|
@@ -601,10 +601,6 @@ static DebuggerStartParameters localStartParameters(RunConfiguration *runConfigu
|
||||
//qDebug() << "DUMPER: " << sp.dumperLibrary << sp.dumperLibraryLocations;
|
||||
sp.displayName = rc->displayName();
|
||||
|
||||
// Find qtInstallPath.
|
||||
QString qmakePath = DebuggingHelperLibrary::findSystemQt(rc->environment());
|
||||
if (!qmakePath.isEmpty())
|
||||
sp.qtInstallPath = findQtInstallPath(qmakePath);
|
||||
return sp;
|
||||
}
|
||||
|
||||
|
@@ -117,7 +117,6 @@ public:
|
||||
|
||||
QString debuggerCommand;
|
||||
ProjectExplorer::Abi toolChainAbi;
|
||||
QString qtInstallPath;
|
||||
|
||||
QString dumperLibrary;
|
||||
QStringList dumperLibraryLocations;
|
||||
|
@@ -4492,7 +4492,8 @@ void GdbEngine::notifyInferiorSetupFailed()
|
||||
void GdbEngine::handleInferiorPrepared()
|
||||
{
|
||||
QTC_ASSERT(state() == InferiorSetupRequested, qDebug() << state());
|
||||
const QByteArray qtInstallPath = startParameters().qtInstallPath.toLocal8Bit();
|
||||
const QByteArray qtInstallPath =
|
||||
debuggerCore()->action(QtSourcesLocation)->value().toString().toLocal8Bit();
|
||||
if (!qtInstallPath.isEmpty()) {
|
||||
QByteArray qtBuildPath;
|
||||
#if defined(Q_OS_WIN)
|
||||
|
@@ -2060,14 +2060,6 @@ struct Ty
|
||||
};
|
||||
|
||||
void testStuff()
|
||||
{
|
||||
char *x = "0\032\0333";
|
||||
char *y = "0\032\0333";
|
||||
char *z = "0\032\0333";
|
||||
int i = 1;
|
||||
}
|
||||
|
||||
void testStuff5()
|
||||
{
|
||||
using namespace std;
|
||||
typedef map<string, list<string> > map_t;
|
||||
|
Reference in New Issue
Block a user