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
02283ea8
Commit
02283ea8
authored
Sep 22, 2010
by
hjk
Browse files
debugger: rename output window into log window
parent
cf1ffdbc
Changes
6
Hide whitespace changes
Inline
Side-by-side
src/plugins/debugger/debugger.pro
View file @
02283ea8
...
...
@@ -17,77 +17,77 @@ QT += gui \
script
HEADERS
+=
breakhandler
.
h
\
breakwindow
.
h
\
breakpoint
.
h
\
breakwindow
.
h
\
consolewindow
.
h
\
debugger
agents
.
h
\
debugger
_global
.
h
\
debuggeractions
.
h
\
debuggeragents
.
h
\
debuggerconstants
.
h
\
debuggerdialogs
.
h
\
debuggerengine
.
h
\
debugger_global
.
h
\
debuggeroutputwindow
.
h
\
debuggermainwindow
.
h
\
debuggerplugin
.
h
\
debuggerrunner
.
h
\
debuggertooltip
.
h
\
debuggerstringutils
.
h
\
debuggertooltip
.
h
\
debuggeruiswitcher
.
h
\
logwindow
.
h
\
moduleshandler
.
h
\
moduleswindow
.
h
\
name_demangler
.
h
\
outputcollector
.
h
\
procinterrupt
.
h
\
registerhandler
.
h
\
registerwindow
.
h
\
sessionengine
.
h
\
stackframe
.
h
\
stackhandler
.
h
\
stackwindow
.
h
\
snapshothandler
.
h
\
snapshotwindow
.
h
\
sourcefileshandler
.
h
\
sourcefileswindow
.
h
\
stackframe
.
h
\
stackhandler
.
h
\
stackwindow
.
h
\
threadswindow
.
h
\
watchhandler
.
h
\
watchutils
.
h
\
watchwindow
.
h
\
name_demangler
.
h
\
debuggeruiswitcher
.
h
\
debuggermainwindow
.
h
\
threadshandler
.
h
SOURCES
+=
breakhandler
.
cpp
\
breakwindow
.
cpp
\
breakpoint
.
cpp
\
breakwindow
.
cpp
\
consolewindow
.
cpp
\
debuggeragents
.
cpp
\
debuggeractions
.
cpp
\
debuggeragents
.
cpp
\
debuggerdialogs
.
cpp
\
debuggerengine
.
cpp
\
debugger
output
window
.
cpp
\
debugger
main
window
.
cpp
\
debuggerplugin
.
cpp
\
debuggerrunner
.
cpp
\
debuggertooltip
.
cpp
\
debuggeruiswitcher
.
cpp
\
logwindow
.
cpp
\
moduleshandler
.
cpp
\
moduleswindow
.
cpp
\
name_demangler
.
cpp
\
outputcollector
.
cpp
\
procinterrupt
.
cpp
\
registerhandler
.
cpp
\
registerwindow
.
cpp
\
sessionengine
.
cpp
\
snapshothandler
.
cpp
\
snapshotwindow
.
cpp
\
stackhandler
.
cpp
\
stackwindow
.
cpp
\
sourcefileshandler
.
cpp
\
sourcefileswindow
.
cpp
\
stackhandler
.
cpp
\
stackwindow
.
cpp
\
threadshandler
.
cpp
\
threadswindow
.
cpp
\
watchdata
.
cpp
\
watchhandler
.
cpp
\
watchwindow
.
cpp
\
watchutils
.
cpp
\
name_demangler
.
cpp
\
debuggeruiswitcher
.
cpp
\
debuggermainwindow
.
cpp
\
threadshandler
.
cpp
\
sessionengine
.
cpp
\
watchwindow
.
cpp
\
stackframe
.
cpp
FORMS
+=
attachexternaldialog
.
ui
\
...
...
src/plugins/debugger/debuggerengine.cpp
View file @
02283ea8
...
...
@@ -32,10 +32,10 @@
#include "debuggeractions.h"
#include "debuggeragents.h"
#include "debuggerrunner.h"
#include "debuggeroutputwindow.h"
#include "debuggerplugin.h"
#include "debuggerstringutils.h"
#include "debuggertooltip.h"
#include "logwindow.h"
#include "breakhandler.h"
#include "moduleshandler.h"
...
...
src/plugins/debugger/debuggerplugin.cpp
View file @
02283ea8
...
...
@@ -35,7 +35,6 @@
#include "debuggerdialogs.h"
#include "debuggerengine.h"
#include "debuggermainwindow.h"
#include "debuggeroutputwindow.h"
#include "debuggerplugin.h"
#include "debuggerrunner.h"
#include "debuggerstringutils.h"
...
...
@@ -44,6 +43,7 @@
#include "breakwindow.h"
#include "consolewindow.h"
#include "logwindow.h"
#include "moduleswindow.h"
#include "registerwindow.h"
#include "snapshotwindow.h"
...
...
@@ -1019,7 +1019,7 @@ public:
SourceFilesWindow
*
m_sourceFilesWindow
;
QAbstractItemView
*
m_stackWindow
;
QAbstractItemView
*
m_threadsWindow
;
DebuggerOutput
Window
*
m_
output
Window
;
Log
Window
*
m_
log
Window
;
ScriptConsole
*
m_scriptConsoleWindow
;
SessionEngine
*
m_sessionEngine
;
...
...
@@ -1062,7 +1062,7 @@ DebuggerPluginPrivate::DebuggerPluginPrivate(DebuggerPlugin *plugin)
m_sourceFilesWindow
=
0
;
m_stackWindow
=
0
;
m_threadsWindow
=
0
;
m_
output
Window
=
0
;
m_
log
Window
=
0
;
m_scriptConsoleWindow
=
0
;
m_sessionEngine
=
0
;
...
...
@@ -1112,8 +1112,8 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments, QString *er
m_consoleWindow
->
setObjectName
(
QLatin1String
(
"CppDebugConsole"
));
m_modulesWindow
=
new
ModulesWindow
;
m_modulesWindow
->
setObjectName
(
QLatin1String
(
"CppDebugModules"
));
m_
output
Window
=
new
DebuggerOutput
Window
;
m_
output
Window
->
setObjectName
(
QLatin1String
(
"CppDebugOutput"
));
m_
log
Window
=
new
Log
Window
;
m_
log
Window
->
setObjectName
(
QLatin1String
(
"CppDebugOutput"
));
m_registerWindow
=
new
RegisterWindow
;
m_registerWindow
->
setObjectName
(
QLatin1String
(
"CppDebugRegisters"
));
...
...
@@ -1289,7 +1289,7 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments, QString *er
connect
(
m_registerDock
->
toggleViewAction
(),
SIGNAL
(
toggled
(
bool
)),
SLOT
(
registerDockToggled
(
bool
)),
Qt
::
QueuedConnection
);
m_outputDock
=
m_uiSwitcher
->
createDockWidget
(
AnyLanguage
,
m_
output
Window
,
m_outputDock
=
m_uiSwitcher
->
createDockWidget
(
AnyLanguage
,
m_
log
Window
,
Qt
::
TopDockWidgetArea
);
m_outputDock
->
setObjectName
(
QString
(
DOCKWIDGET_OUTPUT
));
...
...
@@ -2077,7 +2077,7 @@ void DebuggerPluginPrivate::fontSettingsChanged
{
int
size
=
settings
.
fontZoom
()
*
settings
.
fontSize
()
/
100
;
changeFontSize
(
m_breakWindow
,
size
);
changeFontSize
(
m_
output
Window
,
size
);
changeFontSize
(
m_
log
Window
,
size
);
changeFontSize
(
m_localsWindow
,
size
);
changeFontSize
(
m_modulesWindow
,
size
);
changeFontSize
(
m_consoleWindow
,
size
);
...
...
@@ -2120,7 +2120,7 @@ void DebuggerPluginPrivate::setBusyCursor(bool busy)
m_consoleWindow
->
setCursor
(
cursor
);
m_localsWindow
->
setCursor
(
cursor
);
m_modulesWindow
->
setCursor
(
cursor
);
m_
output
Window
->
setCursor
(
cursor
);
m_
log
Window
->
setCursor
(
cursor
);
m_registerWindow
->
setCursor
(
cursor
);
m_returnWindow
->
setCursor
(
cursor
);
m_sourceFilesWindow
->
setCursor
(
cursor
);
...
...
@@ -2409,9 +2409,9 @@ void DebuggerPluginPrivate::dumpLog()
if
(
!
file
.
open
(
QIODevice
::
WriteOnly
))
return
;
QTextStream
ts
(
&
file
);
ts
<<
m_
output
Window
->
inputContents
();
ts
<<
m_
log
Window
->
inputContents
();
ts
<<
"
\n\n
=======================================
\n\n
"
;
ts
<<
m_
output
Window
->
combinedContents
();
ts
<<
m_
log
Window
->
combinedContents
();
}
void
DebuggerPluginPrivate
::
clearStatusMessage
()
...
...
@@ -2673,7 +2673,7 @@ ExtensionSystem::IPlugin::ShutdownFlag DebuggerPlugin::aboutToShutdown()
void
DebuggerPlugin
::
showMessage
(
const
QString
&
msg
,
int
channel
,
int
timeout
)
{
//qDebug() << "PLUGIN OUTPUT: " << channel << msg;
DebuggerOutput
Window
*
ow
=
d
->
m_
output
Window
;
Log
Window
*
ow
=
d
->
m_
log
Window
;
ConsoleWindow
*
cw
=
d
->
m_consoleWindow
;
QTC_ASSERT
(
ow
,
return
);
switch
(
channel
)
{
...
...
src/plugins/debugger/gdb/gdbengine.cpp
View file @
02283ea8
...
...
@@ -66,7 +66,7 @@
#include "sourcefileswindow.h"
#include "debuggerdialogs.h"
#include "
debuggeroutput
window.h"
#include "
log
window.h"
#include <utils/qtcassert.h>
#include <utils/fancymainwindow.h>
...
...
@@ -2031,7 +2031,7 @@ void GdbEngine::setTokenBarrier()
PENDING_DEBUG
(
"
\n
--- token barrier ---
\n
"
);
showMessage
(
_
(
"--- token barrier ---"
),
LogMiscInput
);
if
(
theDebuggerBoolSetting
(
LogTimeStamps
))
showMessage
(
DebuggerOutput
Window
::
logTimeStamp
(),
LogMiscInput
);
showMessage
(
Log
Window
::
logTimeStamp
(),
LogMiscInput
);
m_oldestAcceptableToken
=
currentToken
();
}
...
...
@@ -3459,7 +3459,7 @@ void GdbEngine::rebuildWatchModel()
m_processedNames
.
clear
();
PENDING_DEBUG
(
"REBUILDING MODEL"
<<
count
);
if
(
theDebuggerBoolSetting
(
LogTimeStamps
))
showMessage
(
DebuggerOutput
Window
::
logTimeStamp
(),
LogMiscInput
);
showMessage
(
Log
Window
::
logTimeStamp
(),
LogMiscInput
);
showMessage
(
_
(
"<Rebuild Watchmodel %1>"
).
arg
(
count
),
LogMiscInput
);
showStatusMessage
(
tr
(
"Finished retrieving data"
),
400
);
watchHandler
()
->
endCycle
();
...
...
src/plugins/debugger/
debuggeroutput
window.cpp
→
src/plugins/debugger/
log
window.cpp
View file @
02283ea8
...
...
@@ -27,7 +27,7 @@
**
**************************************************************************/
#include "
debuggeroutput
window.h"
#include "
log
window.h"
#include "debuggeractions.h"
#include "debuggerconstants.h"
...
...
@@ -58,9 +58,8 @@
#include <utils/savedaction.h>
using
namespace
Debugger
;
using
namespace
Debugger
::
Internal
;
using
namespace
Find
;
namespace
Debugger
{
namespace
Internal
{
static
QChar
charForChannel
(
int
channel
)
{
...
...
@@ -360,7 +359,7 @@ public slots:
//
/////////////////////////////////////////////////////////////////////
DebuggerOutputWindow
::
DebuggerOutput
Window
(
QWidget
*
parent
)
LogWindow
::
Log
Window
(
QWidget
*
parent
)
:
QWidget
(
parent
)
{
setWindowTitle
(
tr
(
"Debugger"
));
...
...
@@ -392,11 +391,11 @@ DebuggerOutputWindow::DebuggerOutputWindow(QWidget *parent)
Aggregation
::
Aggregate
*
aggregate
=
new
Aggregation
::
Aggregate
;
aggregate
->
add
(
m_combinedText
);
aggregate
->
add
(
new
BaseTextFind
(
m_combinedText
));
aggregate
->
add
(
new
Find
::
BaseTextFind
(
m_combinedText
));
aggregate
=
new
Aggregation
::
Aggregate
;
aggregate
->
add
(
m_inputText
);
aggregate
->
add
(
new
BaseTextFind
(
m_inputText
));
aggregate
->
add
(
new
Find
::
BaseTextFind
(
m_inputText
));
connect
(
m_inputText
,
SIGNAL
(
statusMessageRequested
(
QString
,
int
)),
this
,
SIGNAL
(
statusMessageRequested
(
QString
,
int
)));
...
...
@@ -404,7 +403,7 @@ DebuggerOutputWindow::DebuggerOutputWindow(QWidget *parent)
m_combinedText
,
SLOT
(
gotoResult
(
int
)));
};
void
DebuggerOutput
Window
::
showOutput
(
int
channel
,
const
QString
&
output
)
void
Log
Window
::
showOutput
(
int
channel
,
const
QString
&
output
)
{
if
(
output
.
isEmpty
())
return
;
...
...
@@ -432,7 +431,7 @@ void DebuggerOutputWindow::showOutput(int channel, const QString &output)
}
}
void
DebuggerOutput
Window
::
showInput
(
int
channel
,
const
QString
&
input
)
void
Log
Window
::
showInput
(
int
channel
,
const
QString
&
input
)
{
Q_UNUSED
(
channel
)
if
(
theDebuggerBoolSetting
(
LogTimeStamps
))
...
...
@@ -444,30 +443,30 @@ void DebuggerOutputWindow::showInput(int channel, const QString &input)
m_inputText
->
ensureCursorVisible
();
}
void
DebuggerOutput
Window
::
clearContents
()
void
Log
Window
::
clearContents
()
{
m_combinedText
->
clear
();
m_inputText
->
clear
();
}
void
DebuggerOutput
Window
::
setCursor
(
const
QCursor
&
cursor
)
void
Log
Window
::
setCursor
(
const
QCursor
&
cursor
)
{
m_combinedText
->
viewport
()
->
setCursor
(
cursor
);
m_inputText
->
viewport
()
->
setCursor
(
cursor
);
QWidget
::
setCursor
(
cursor
);
}
QString
DebuggerOutput
Window
::
combinedContents
()
const
QString
Log
Window
::
combinedContents
()
const
{
return
m_combinedText
->
toPlainText
();
}
QString
DebuggerOutput
Window
::
inputContents
()
const
QString
Log
Window
::
inputContents
()
const
{
return
m_inputText
->
toPlainText
();
}
QString
DebuggerOutput
Window
::
logTimeStamp
()
QString
Log
Window
::
logTimeStamp
()
{
// Cache the last log time entry by ms. If time progresses,
// report the difference to the last time stamp in ms.
...
...
@@ -490,4 +489,7 @@ QString DebuggerOutputWindow::logTimeStamp()
return
lastTimeStamp
;
}
#include "debuggeroutputwindow.moc"
}
// namespace Internal
}
// namespace Debugger
#include "logwindow.moc"
src/plugins/debugger/
debuggeroutput
window.h
→
src/plugins/debugger/
log
window.h
View file @
02283ea8
...
...
@@ -27,8 +27,8 @@
**
**************************************************************************/
#ifndef DEBUGGER_
OUTPUT
WINDOW_H
#define DEBUGGER_
OUTPUT
WINDOW_H
#ifndef DEBUGGER_
LOG
WINDOW_H
#define DEBUGGER_
LOG
WINDOW_H
#include <QtGui/QWidget>
...
...
@@ -41,12 +41,12 @@ QT_END_NAMESPACE
namespace
Debugger
{
namespace
Internal
{
class
DebuggerOutput
Window
:
public
QWidget
class
Log
Window
:
public
QWidget
{
Q_OBJECT
public:
explicit
DebuggerOutput
Window
(
QWidget
*
parent
=
0
);
explicit
Log
Window
(
QWidget
*
parent
=
0
);
void
setCursor
(
const
QCursor
&
cursor
);
...
...
@@ -74,5 +74,5 @@ private:
}
// namespace Internal
}
// namespace Debugger
#endif // DEBUGGER_
OUTPUT
WINDOW_H
#endif // DEBUGGER_
LOG
WINDOW_H
Write
Preview
Markdown
is supported
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