Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
flatpak-qt-creator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Marco Bubke
flatpak-qt-creator
Commits
ac73d0a9
Commit
ac73d0a9
authored
14 years ago
by
Olivier Goffart
Browse files
Options
Downloads
Patches
Plain Diff
debugger: Remove or comment out code that is not being used.
Will help to clean up later.
parent
39773861
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/plugins/debugger/qml/qmlengine.cpp
+5
-126
5 additions, 126 deletions
src/plugins/debugger/qml/qmlengine.cpp
src/plugins/debugger/qml/qmlengine.h
+0
-40
0 additions, 40 deletions
src/plugins/debugger/qml/qmlengine.h
with
5 additions
and
166 deletions
src/plugins/debugger/qml/qmlengine.cpp
+
5
−
126
View file @
ac73d0a9
...
...
@@ -98,6 +98,7 @@ public:
//
///////////////////////////////////////////////////////////////////////
#if 0 //QmlJSInspector does that for us now.
class QmlDebuggerClient : public QDeclarativeDebugClient
{
Q_OBJECT
...
...
@@ -152,7 +153,7 @@ public:
QDeclarativeDebugConnection *m_connection;
QmlEngine *m_engine;
};
#endif
///////////////////////////////////////////////////////////////////////
//
...
...
@@ -163,12 +164,12 @@ public:
QmlEngine
::
QmlEngine
(
const
DebuggerStartParameters
&
startParameters
)
:
DebuggerEngine
(
startParameters
)
{
/*
m_conn = 0;
m_client = 0;
m_engineDebugInterface = 0;
m_frameRate = 0;
/*
m_watchTableModel = new Internal::WatchTableModel(0, this);
m_objectTreeWidget = new Internal::ObjectTree;
...
...
@@ -684,128 +685,6 @@ void QmlEngine::messageReceived(const QByteArray &message)
}
QString
QmlEngine
::
errorMessage
(
QProcess
::
ProcessError
error
)
{
switch
(
error
)
{
case
QProcess
::
FailedToStart
:
return
tr
(
"The Gdb process failed to start. Either the "
"invoked program is missing, or you may have insufficient "
"permissions to invoke the program."
);
case
QProcess
::
Crashed
:
return
tr
(
"The Gdb process crashed some time after starting "
"successfully."
);
case
QProcess
::
Timedout
:
return
tr
(
"The last waitFor...() function timed out. "
"The state of QProcess is unchanged, and you can try calling "
"waitFor...() again."
);
case
QProcess
::
WriteError
:
return
tr
(
"An error occurred when attempting to write "
"to the Gdb process. For example, the process may not be running, "
"or it may have closed its input channel."
);
case
QProcess
::
ReadError
:
return
tr
(
"An error occurred when attempting to read from "
"the Gdb process. For example, the process may not be running."
);
default:
return
tr
(
"An unknown error in the Gdb process occurred. "
);
}
}
void
QmlEngine
::
handleProcError
(
QProcess
::
ProcessError
error
)
{
showMessage
(
_
(
"HANDLE QML ERROR"
));
switch
(
error
)
{
case
QProcess
::
Crashed
:
break
;
// will get a processExited() as well
// impossible case QProcess::FailedToStart:
case
QProcess
::
ReadError
:
case
QProcess
::
WriteError
:
case
QProcess
::
Timedout
:
default:
//m_proc.kill();
notifyEngineIll
();
plugin
()
->
showMessageBox
(
QMessageBox
::
Critical
,
tr
(
"Gdb I/O Error"
),
errorMessage
(
error
));
break
;
}
}
void
QmlEngine
::
handleProcFinished
(
int
code
,
QProcess
::
ExitStatus
type
)
{
showMessage
(
_
(
"QML VIEWER PROCESS FINISHED, status %1, code %2"
).
arg
(
type
).
arg
(
code
));
notifyEngineIll
();
//setState(DebuggerNotReady, true);
}
void
QmlEngine
::
readProcStandardError
()
{
QString
msg
=
QString
::
fromUtf8
(
m_proc
.
readAllStandardError
());
if
(
!
m_conn
)
setupConnection
();
qDebug
()
<<
"STD ERR"
<<
msg
;
showMessage
(
msg
,
AppError
);
}
void
QmlEngine
::
readProcStandardOutput
()
{
QString
msg
=
QString
::
fromUtf8
(
m_proc
.
readAllStandardOutput
());
qDebug
()
<<
"STD OUT"
<<
msg
;
showMessage
(
msg
,
AppOutput
);
}
void
QmlEngine
::
connectionStateChanged
()
{
QTC_ASSERT
(
m_conn
,
return
);
QAbstractSocket
::
SocketState
state
=
m_conn
->
state
();
qDebug
()
<<
"CONNECTION STATE: "
<<
state
;
switch
(
state
)
{
case
QAbstractSocket
::
UnconnectedState
:
{
showStatusMessage
(
tr
(
"[QmlEngine] disconnected.
\n\n
"
));
// resetViews();
// updateMenuActions();
break
;
}
case
QAbstractSocket
::
HostLookupState
:
showStatusMessage
(
tr
(
"[QmlEngine] resolving host..."
));
break
;
case
QAbstractSocket
::
ConnectingState
:
showStatusMessage
(
tr
(
"[QmlEngine] connecting to debug server..."
));
break
;
case
QAbstractSocket
::
ConnectedState
:
showStatusMessage
(
tr
(
"[QmlEngine] connected.
\n
"
));
//setupConnection()
break
;
case
QAbstractSocket
::
ClosingState
:
showStatusMessage
(
tr
(
"[QmlEngine] closing..."
));
break
;
case
QAbstractSocket
::
BoundState
:
showStatusMessage
(
tr
(
"[QmlEngine] bound state"
));
break
;
case
QAbstractSocket
::
ListeningState
:
showStatusMessage
(
tr
(
"[QmlEngine] listening state"
));
break
;
default
:
showStatusMessage
(
tr
(
"[QmlEngine] unknown state: %1"
).
arg
(
state
));
break
;
}
}
void
QmlEngine
::
connectionError
()
{
QTC_ASSERT
(
m_conn
,
return
);
showStatusMessage
(
tr
(
"[QmlEngine] error: (%1) %2"
,
"%1=error code, %2=error message"
)
.
arg
(
m_conn
->
error
()).
arg
(
m_conn
->
errorString
()));
}
void
QmlEngine
::
connectionConnected
()
{
QTC_ASSERT
(
m_conn
,
return
);
showStatusMessage
(
tr
(
"[QmlEngine] error: (%1) %2"
,
"%1=error code, %2=error message"
)
.
arg
(
m_conn
->
error
()).
arg
(
m_conn
->
errorString
()));
}
#if 0
class EngineComboBox : public QComboBox
...
...
@@ -1349,7 +1228,7 @@ void QmlEngine::setSimpleDockWidgetArrangement()
mainWindow->setTrackingEnabled(true);
}
#endif
#if 0
void QmlEngine::reloadEngines()
{
//m_engineComboBox->setEnabled(false);
...
...
@@ -1500,7 +1379,7 @@ void QmlEngine::buildTree(const QDeclarativeDebugObjectReference &obj,
for (int i = 0; i < obj.children().size(); ++i)
buildTree(obj.children().at(i), iname + '.' + QByteArray::number(i));
}
#endif
#if 0
void QmlEngine::treeObjectActivated(const QDeclarativeDebugObjectReference &obj)
{
...
...
This diff is collapsed.
Click to expand it.
src/plugins/debugger/qml/qmlengine.h
+
0
−
40
View file @
ac73d0a9
...
...
@@ -128,47 +128,7 @@ private:
signals
:
void
sendMessage
(
const
QByteArray
&
msg
);
private
slots
:
void
handleProcFinished
(
int
,
QProcess
::
ExitStatus
status
);
void
handleProcError
(
QProcess
::
ProcessError
error
);
void
readProcStandardOutput
();
void
readProcStandardError
();
void
connectionError
();
void
connectionConnected
();
void
connectionStateChanged
();
void
reloadEngines
();
void
enginesChanged
();
void
queryEngineContext
(
const
QDeclarativeDebugEngineReference
&
engine
);
void
contextChanged
();
void
reloadObject
(
const
QDeclarativeDebugObjectReference
&
object
);
void
objectFetched
(
QDeclarativeDebugQuery
::
State
state
);
private
:
void
objectFetched
(
QDeclarativeDebugObjectQuery
*
query
,
QDeclarativeDebugQuery
::
State
state
);
void
contextChanged
(
QDeclarativeDebugRootContextQuery
*
query
);
void
enginesChanged
(
QDeclarativeDebugEnginesQuery
*
query
);
void
buildTree
(
const
QDeclarativeDebugObjectReference
&
obj
,
const
QByteArray
&
iname
);
QString
errorMessage
(
QProcess
::
ProcessError
error
);
QProcess
m_proc
;
QDeclarativeDebugConnection
*
m_conn
;
QDeclarativeEngineDebug
*
m_engineDebugInterface
;
QmlDebuggerClient
*
m_client
;
CanvasFrameRate
*
m_frameRate
;
enum
DebugMode
{
StandaloneMode
,
CppProjectWithQmlEngines
,
QmlProjectWithCppPlugins
};
QList
<
QDeclarativeDebugWatch
*>
m_watches
;
#if 0
void createDockWidgets();
bool connectToViewer(); // using host, port from widgets
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment