Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
flatpak-qt-creator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
cf1ffdbc
Commit
cf1ffdbc
authored
Sep 22, 2010
by
hjk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debugger: start implementing a debugger console
parent
d9f4cb41
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
478 additions
and
2 deletions
+478
-2
src/plugins/debugger/consolewindow.cpp
src/plugins/debugger/consolewindow.cpp
+381
-0
src/plugins/debugger/consolewindow.h
src/plugins/debugger/consolewindow.h
+76
-0
src/plugins/debugger/debugger.pro
src/plugins/debugger/debugger.pro
+2
-0
src/plugins/debugger/debuggerconstants.h
src/plugins/debugger/debuggerconstants.h
+1
-0
src/plugins/debugger/debuggerplugin.cpp
src/plugins/debugger/debuggerplugin.cpp
+18
-2
No files found.
src/plugins/debugger/consolewindow.cpp
0 → 100644
View file @
cf1ffdbc
This diff is collapsed.
Click to expand it.
src/plugins/debugger/consolewindow.h
0 → 100644
View file @
cf1ffdbc
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** Commercial Usage
**
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
**
** GNU Lesser General Public License Usage
**
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at http://qt.nokia.com/contact.
**
**************************************************************************/
#ifndef DEBUGGER_CONSOLEWINDOW_H
#define DEBUGGER_CONSOLEWINDOW_H
#include <QtGui/QWidget>
QT_BEGIN_NAMESPACE
class
QCursor
;
QT_END_NAMESPACE
namespace
Debugger
{
namespace
Internal
{
class
Console
;
class
ConsoleWindow
:
public
QWidget
{
Q_OBJECT
public:
explicit
ConsoleWindow
(
QWidget
*
parent
=
0
);
void
setCursor
(
const
QCursor
&
cursor
);
QString
combinedContents
()
const
;
QString
inputContents
()
const
;
static
QString
logTimeStamp
();
public
slots
:
void
clearContents
();
void
showOutput
(
int
channel
,
const
QString
&
output
);
void
showInput
(
int
channel
,
const
QString
&
input
);
signals:
void
showPage
();
void
statusMessageRequested
(
const
QString
&
msg
,
int
);
private:
Console
*
m_console
;
// combined input/output
};
}
// namespace Internal
}
// namespace Debugger
#endif // DEBUGGER_CONSOLEWINDOW_H
src/plugins/debugger/debugger.pro
View file @
cf1ffdbc
...
...
@@ -19,6 +19,7 @@ QT += gui \
HEADERS
+=
breakhandler
.
h
\
breakwindow
.
h
\
breakpoint
.
h
\
consolewindow
.
h
\
debuggeragents
.
h
\
debuggeractions
.
h
\
debuggerconstants
.
h
\
...
...
@@ -56,6 +57,7 @@ HEADERS += breakhandler.h \
SOURCES
+=
breakhandler
.
cpp
\
breakwindow
.
cpp
\
breakpoint
.
cpp
\
consolewindow
.
cpp
\
debuggeragents
.
cpp
\
debuggeractions
.
cpp
\
debuggerdialogs
.
cpp
\
...
...
src/plugins/debugger/debuggerconstants.h
View file @
cf1ffdbc
...
...
@@ -65,6 +65,7 @@ const char * const DEBUGGER_COMMON_SETTINGS_CATEGORY_ICON =
// dock widget names
const
char
*
const
DOCKWIDGET_BREAK
=
"Debugger.Docks.Break"
;
const
char
*
const
DOCKWIDGET_CONSOLE
=
"Debugger.Docks.Console"
;
const
char
*
const
DOCKWIDGET_MODULES
=
"Debugger.Docks.Modules"
;
const
char
*
const
DOCKWIDGET_REGISTER
=
"Debugger.Docks.Register"
;
const
char
*
const
DOCKWIDGET_OUTPUT
=
"Debugger.Docks.Output"
;
...
...
src/plugins/debugger/debuggerplugin.cpp
View file @
cf1ffdbc
...
...
@@ -43,6 +43,7 @@
#include "debuggeruiswitcher.h"
#include "breakwindow.h"
#include "consolewindow.h"
#include "moduleswindow.h"
#include "registerwindow.h"
#include "snapshotwindow.h"
...
...
@@ -993,6 +994,7 @@ public:
QComboBox
*
m_threadBox
;
QDockWidget
*
m_breakDock
;
QDockWidget
*
m_consoleDock
;
QDockWidget
*
m_modulesDock
;
QDockWidget
*
m_outputDock
;
QDockWidget
*
m_registerDock
;
...
...
@@ -1006,6 +1008,7 @@ public:
DebuggerActions
m_actions
;
BreakWindow
*
m_breakWindow
;
ConsoleWindow
*
m_consoleWindow
;
QTreeView
*
m_returnWindow
;
QTreeView
*
m_localsWindow
;
QTreeView
*
m_watchersWindow
;
...
...
@@ -1039,6 +1042,7 @@ DebuggerPluginPrivate::DebuggerPluginPrivate(DebuggerPlugin *plugin)
m_threadBox
=
0
;
m_breakDock
=
0
;
m_consoleDock
=
0
;
m_modulesDock
=
0
;
m_outputDock
=
0
;
m_registerDock
=
0
;
...
...
@@ -1104,6 +1108,8 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments, QString *er
m_breakWindow
=
new
BreakWindow
;
m_breakWindow
->
setObjectName
(
QLatin1String
(
"CppDebugBreakpoints"
));
m_consoleWindow
=
new
ConsoleWindow
;
m_consoleWindow
->
setObjectName
(
QLatin1String
(
"CppDebugConsole"
));
m_modulesWindow
=
new
ModulesWindow
;
m_modulesWindow
->
setObjectName
(
QLatin1String
(
"CppDebugModules"
));
m_outputWindow
=
new
DebuggerOutputWindow
;
...
...
@@ -1266,6 +1272,11 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments, QString *er
// Dock widgets
m_breakDock
=
m_uiSwitcher
->
createDockWidget
(
CppLanguage
,
m_breakWindow
);
m_breakDock
->
setObjectName
(
QString
(
DOCKWIDGET_BREAK
));
m_consoleDock
=
m_uiSwitcher
->
createDockWidget
(
CppLanguage
,
m_consoleWindow
,
Qt
::
TopDockWidgetArea
);
m_consoleDock
->
setObjectName
(
QString
(
DOCKWIDGET_OUTPUT
));
m_modulesDock
=
m_uiSwitcher
->
createDockWidget
(
CppLanguage
,
m_modulesWindow
,
Qt
::
TopDockWidgetArea
);
m_modulesDock
->
setObjectName
(
QString
(
DOCKWIDGET_MODULES
));
...
...
@@ -1281,6 +1292,7 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments, QString *er
m_outputDock
=
m_uiSwitcher
->
createDockWidget
(
AnyLanguage
,
m_outputWindow
,
Qt
::
TopDockWidgetArea
);
m_outputDock
->
setObjectName
(
QString
(
DOCKWIDGET_OUTPUT
));
m_snapshotDock
=
m_uiSwitcher
->
createDockWidget
(
CppLanguage
,
m_snapshotWindow
);
m_snapshotDock
->
setObjectName
(
QString
(
DOCKWIDGET_SNAPSHOTS
));
...
...
@@ -2065,9 +2077,10 @@ void DebuggerPluginPrivate::fontSettingsChanged
{
int
size
=
settings
.
fontZoom
()
*
settings
.
fontSize
()
/
100
;
changeFontSize
(
m_breakWindow
,
size
);
changeFontSize
(
m_outputWindow
,
size
);
changeFontSize
(
m_localsWindow
,
size
);
changeFontSize
(
m_modulesWindow
,
size
);
changeFontSize
(
m_
output
Window
,
size
);
changeFontSize
(
m_
console
Window
,
size
);
changeFontSize
(
m_registerWindow
,
size
);
changeFontSize
(
m_returnWindow
,
size
);
changeFontSize
(
m_sourceFilesWindow
,
size
);
...
...
@@ -2104,6 +2117,7 @@ void DebuggerPluginPrivate::setBusyCursor(bool busy)
m_busy
=
busy
;
QCursor
cursor
(
busy
?
Qt
::
BusyCursor
:
Qt
::
ArrowCursor
);
m_breakWindow
->
setCursor
(
cursor
);
m_consoleWindow
->
setCursor
(
cursor
);
m_localsWindow
->
setCursor
(
cursor
);
m_modulesWindow
->
setCursor
(
cursor
);
m_outputWindow
->
setCursor
(
cursor
);
...
...
@@ -2131,7 +2145,7 @@ void DebuggerPluginPrivate::setSimpleDockWidgetArrangement
}
foreach
(
QDockWidget
*
dockWidget
,
dockWidgets
)
{
if
(
dockWidget
==
m_outputDock
)
{
if
(
dockWidget
==
m_outputDock
||
dockWidget
==
m_consoleDock
)
{
mw
->
addDockWidget
(
Qt
::
TopDockWidgetArea
,
dockWidget
);
}
else
{
mw
->
addDockWidget
(
Qt
::
BottomDockWidgetArea
,
dockWidget
);
...
...
@@ -2660,6 +2674,7 @@ void DebuggerPlugin::showMessage(const QString &msg, int channel, int timeout)
{
//qDebug() << "PLUGIN OUTPUT: " << channel << msg;
DebuggerOutputWindow
*
ow
=
d
->
m_outputWindow
;
ConsoleWindow
*
cw
=
d
->
m_consoleWindow
;
QTC_ASSERT
(
ow
,
return
);
switch
(
channel
)
{
case
StatusBar
:
...
...
@@ -2679,6 +2694,7 @@ void DebuggerPlugin::showMessage(const QString &msg, int channel, int timeout)
break
;
default:
ow
->
showOutput
(
channel
,
msg
);
cw
->
showOutput
(
channel
,
msg
);
break
;
}
}
...
...
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