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
Marco Bubke
flatpak-qt-creator
Commits
9cbbeec6
Commit
9cbbeec6
authored
Jul 21, 2010
by
hjk
Browse files
debugger: move convienience function to DebuggerEngine base class
parent
b31a29b1
Changes
10
Hide whitespace changes
Inline
Side-by-side
src/plugins/debugger/debuggeragents.cpp
View file @
9cbbeec6
...
...
@@ -126,7 +126,7 @@ void MemoryViewAgent::createBinEditor(quint64 addr)
QMetaObject
::
invokeMethod
(
editor
->
widget
(),
"setLazyData"
,
Q_ARG
(
quint64
,
addr
),
Q_ARG
(
int
,
DataRange
),
Q_ARG
(
int
,
BinBlockSize
));
}
else
{
Debugger
Plu
gin
::
instance
()
->
showMessageBox
(
QMessageBox
::
Warning
,
Debugger
En
gin
e
::
showMessageBox
(
QMessageBox
::
Warning
,
tr
(
"No memory viewer available"
),
tr
(
"The memory contents cannot be shown as no viewer plugin "
"for binary data has been loaded."
));
...
...
src/plugins/debugger/debuggerengine.cpp
View file @
9cbbeec6
...
...
@@ -1422,7 +1422,7 @@ qint64 DebuggerEngine::inferiorPid() const
return
d
->
m_inferiorPid
;
}
DebuggerPlugin
*
DebuggerEngine
::
plugin
()
const
DebuggerPlugin
*
DebuggerEngine
::
plugin
()
{
return
DebuggerPlugin
::
instance
();
}
...
...
@@ -1475,6 +1475,12 @@ void DebuggerEngine::progressPing()
d
->
m_progress
.
setProgressValue
(
qMin
(
70
,
progress
+
1
));
}
QMessageBox
*
DebuggerEngine
::
showMessageBox
(
int
icon
,
const
QString
&
title
,
const
QString
&
text
,
int
buttons
)
{
return
plugin
()
->
showMessageBox
(
icon
,
title
,
text
,
buttons
);
}
}
// namespace Internal
}
// namespace Debugger
...
...
src/plugins/debugger/debuggerengine.h
View file @
9cbbeec6
...
...
@@ -43,6 +43,7 @@
QT_BEGIN_NAMESPACE
class
QDebug
;
class
QPoint
;
class
QMessageBox
;
QT_END_NAMESPACE
namespace
TextEditor
{
...
...
@@ -161,6 +162,10 @@ public:
virtual
void
assignValueInDebugger
(
const
QString
&
expr
,
const
QString
&
value
)
{
Q_UNUSED
(
expr
);
Q_UNUSED
(
value
);
}
// Convenience
static
QMessageBox
*
showMessageBox
(
int
icon
,
const
QString
&
title
,
const
QString
&
text
,
int
buttons
=
0
);
protected:
virtual
void
detachDebugger
()
{}
virtual
void
executeStep
()
{}
...
...
@@ -188,7 +193,7 @@ protected:
virtual
void
frameDown
();
public:
DebuggerPlugin
*
plugin
()
const
;
static
DebuggerPlugin
*
plugin
();
const
DebuggerStartParameters
&
startParameters
()
const
;
DebuggerStartParameters
&
startParameters
();
...
...
src/plugins/debugger/debuggerplugin.h
View file @
9cbbeec6
...
...
@@ -89,9 +89,6 @@ public:
static
void
startDebugger
(
ProjectExplorer
::
RunControl
*
runControl
);
static
void
displayDebugger
(
ProjectExplorer
::
RunControl
*
runControl
);
QMessageBox
*
showMessageBox
(
int
icon
,
const
QString
&
title
,
const
QString
&
text
,
int
buttons
=
0
);
const
CPlusPlus
::
Snapshot
&
cppCodeModelSnapshot
()
const
;
QIcon
locationMarkIcon
()
const
;
...
...
@@ -118,6 +115,9 @@ signals:
void
stateChanged
(
int
);
private:
QMessageBox
*
showMessageBox
(
int
icon
,
const
QString
&
title
,
const
QString
&
text
,
int
buttons
=
0
);
friend
class
Internal
::
DebuggerEngine
;
friend
class
Internal
::
DebuggerListener
;
...
...
src/plugins/debugger/gdb/abstractgdbadapter.h
View file @
9cbbeec6
...
...
@@ -92,8 +92,6 @@ protected:
{
return
m_engine
->
startParameters
();
}
void
showMessage
(
const
QString
&
msg
,
int
channel
=
LogDebug
,
int
timeout
=
1
)
{
m_engine
->
showMessage
(
msg
,
channel
,
timeout
);
}
void
showMessageBox
(
int
icon
,
const
QString
&
title
,
const
QString
&
text
)
const
{
m_engine
->
showMessageBox
(
icon
,
title
,
text
);
}
GdbEngine
*
const
m_engine
;
};
...
...
src/plugins/debugger/gdb/gdbengine.cpp
View file @
9cbbeec6
...
...
@@ -4232,12 +4232,6 @@ void GdbEngine::handleAdapterCrashed(const QString &msg)
showMessageBox
(
QMessageBox
::
Critical
,
tr
(
"Adapter crashed"
),
msg
);
}
QMessageBox
*
GdbEngine
::
showMessageBox
(
int
icon
,
const
QString
&
title
,
const
QString
&
text
,
int
buttons
)
{
return
plugin
()
->
showMessageBox
(
icon
,
title
,
text
,
buttons
);
}
void
GdbEngine
::
setUseDebuggingHelpers
(
const
QVariant
&
on
)
{
//qDebug() << "SWITCHING ON/OFF DUMPER DEBUGGING:" << on;
...
...
src/plugins/debugger/gdb/gdbengine.h
View file @
9cbbeec6
...
...
@@ -527,8 +527,6 @@ private: ////////// View & Data Stuff //////////
// Convenience Functions
//
QString
errorMessage
(
QProcess
::
ProcessError
error
);
QMessageBox
*
showMessageBox
(
int
icon
,
const
QString
&
title
,
const
QString
&
text
,
int
buttons
=
0
);
QMainWindow
*
mainWindow
()
const
;
AbstractGdbProcess
*
gdbProc
()
const
;
void
showExecutionError
(
const
QString
&
message
);
...
...
src/plugins/debugger/gdb/remotegdbserveradapter.cpp
View file @
9cbbeec6
...
...
@@ -128,7 +128,7 @@ void RemoteGdbServerAdapter::uploadProcError(QProcess::ProcessError error)
}
showMessage
(
msg
,
StatusBar
);
showMessageBox
(
QMessageBox
::
Critical
,
tr
(
"Error"
),
msg
);
DebuggerEngine
::
showMessageBox
(
QMessageBox
::
Critical
,
tr
(
"Error"
),
msg
);
}
void
RemoteGdbServerAdapter
::
readUploadStandardOutput
()
...
...
src/plugins/debugger/gdb/termgdbadapter.cpp
View file @
9cbbeec6
...
...
@@ -167,7 +167,7 @@ void TermGdbAdapter::interruptInferior()
void
TermGdbAdapter
::
stubMessage
(
const
QString
&
msg
,
bool
)
{
showMessageBox
(
QMessageBox
::
Critical
,
tr
(
"Debugger Error"
),
msg
);
DebuggerEngine
::
showMessageBox
(
QMessageBox
::
Critical
,
tr
(
"Debugger Error"
),
msg
);
}
void
TermGdbAdapter
::
stubExited
()
...
...
src/plugins/debugger/pdb/pdbengine.cpp
View file @
9cbbeec6
...
...
@@ -560,7 +560,7 @@ void PdbEngine::handlePdbError(QProcess::ProcessError error)
default:
//setState(EngineShutdownRequested, true);
m_pdbProc
.
kill
();
plugin
()
->
showMessageBox
(
QMessageBox
::
Critical
,
tr
(
"Pdb I/O Error"
),
showMessageBox
(
QMessageBox
::
Critical
,
tr
(
"Pdb I/O Error"
),
errorMessage
(
error
));
break
;
}
...
...
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