Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
a0fa3832
Commit
a0fa3832
authored
Apr 08, 2009
by
con
Browse files
Show a useful dialog when debugger can't find debugging helper.
Reviewed-by:
hjk
<
qtc-committer@nokia.com
>
parent
e7e0fe74
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/plugins/debugger/gdbengine.cpp
View file @
a0fa3832
...
...
@@ -47,6 +47,7 @@
#include "debuggerdialogs.h"
#include <utils/qtcassert.h>
#include <coreplugin/icore.h>
#include <QtCore/QDebug>
#include <QtCore/QDir>
...
...
@@ -60,6 +61,8 @@
#include <QtGui/QMainWindow>
#include <QtGui/QMessageBox>
#include <QtGui/QToolTip>
#include <QtGui/QDialogButtonBox>
#include <QtGui/QPushButton>
#if defined(Q_OS_LINUX) || defined(Q_OS_MAC)
#include <unistd.h>
...
...
@@ -4040,6 +4043,29 @@ QString GdbEngine::dumperLibraryName() const
return
q
->
m_dumperLib
;
}
void
GdbEngine
::
showDebuggingHelperWarning
()
{
QMessageBox
dialog
(
q
->
mainWindow
());
QPushButton
*
qtPref
=
dialog
.
addButton
(
tr
(
"Open Qt preferences"
),
QMessageBox
::
ActionRole
);
QPushButton
*
helperOff
=
dialog
.
addButton
(
tr
(
"Turn helper usage off"
),
QMessageBox
::
ActionRole
);
QPushButton
*
justContinue
=
dialog
.
addButton
(
tr
(
"Continue anyway"
),
QMessageBox
::
AcceptRole
);
dialog
.
setDefaultButton
(
justContinue
);
dialog
.
setWindowTitle
(
tr
(
"Debugging helper missing"
));
dialog
.
setText
(
tr
(
"The debugger did not find the debugging helper library."
));
dialog
.
setInformativeText
(
tr
(
"The debugging helper is used to nicely format the values of Qt "
"data types and some STL data types. "
"It must be compiled for each Qt version, "
"you can do this in the Qt preferences page by selecting "
"a Qt installation and clicking on 'Rebuild' for the debugging "
"helper."
));
dialog
.
exec
();
if
(
dialog
.
clickedButton
()
==
qtPref
)
{
Core
::
ICore
::
instance
()
->
showOptionsDialog
(
"Qt4"
,
"Qt Versions"
);
}
else
if
(
dialog
.
clickedButton
()
==
helperOff
)
{
theDebuggerAction
(
UseDebuggingHelpers
)
->
setValue
(
qVariantFromValue
(
false
),
false
);
}
}
void
GdbEngine
::
tryLoadDebuggingHelpers
()
{
if
(
m_debuggingHelperState
!=
DebuggingHelperUninitialized
)
...
...
@@ -4055,6 +4081,8 @@ void GdbEngine::tryLoadDebuggingHelpers()
" %1 EXISTS: %2, EXECUTABLE: %3"
).
arg
(
lib
)
.
arg
(
QFileInfo
(
lib
).
exists
())
.
arg
(
QFileInfo
(
lib
).
isExecutable
()));
if
(
theDebuggerBoolSetting
(
UseDebuggingHelpers
))
showDebuggingHelperWarning
();
return
;
}
...
...
src/plugins/debugger/gdbengine.h
View file @
a0fa3832
...
...
@@ -136,6 +136,7 @@ private:
//
// Own stuff
//
void
showDebuggingHelperWarning
();
int
currentFrame
()
const
;
QString
currentWorkingDirectory
()
const
{
return
m_pwd
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment