Debugger: split editor related code off watchutils.{h,cpp}

This is now in sourceutils.{h,cpp} to make watchutils.{h,cpp}
better acessible to the debugger auto-tests.

Change-Id: Ie87e715bc7018ca190a460c37dfd19bc897059f0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This commit is contained in:
hjk
2013-01-24 16:33:17 +01:00
parent fb50278521
commit b6f187d0f2
14 changed files with 546 additions and 392 deletions

View File

@@ -30,29 +30,18 @@
#ifndef WATCHUTILS_H
#define WATCHUTILS_H
// NOTE: Don't add dependencies to other files.
// This is used in the debugger auto-tests.
#include <QSet>
#include <QString>
namespace TextEditor {
class ITextEditor;
}
namespace Core {
class IEditor;
}
namespace CPlusPlus {
class Snapshot;
}
namespace Debugger {
namespace Internal {
class WatchData;
class GdbMi;
QByteArray dotEscape(QByteArray str);
QString currentTime();
bool isSkippableFunction(const QString &funcName, const QString &fileName);
bool isLeavableFunction(const QString &funcName, const QString &fileName);
@@ -69,25 +58,12 @@ bool isIntOrFloatType(const QByteArray &type);
bool isIntType(const QByteArray &type);
QString formatToolTipAddress(quint64 a);
// Editor tooltip support
bool isCppEditor(Core::IEditor *editor);
QString cppExpressionAt(TextEditor::ITextEditor *editor, int pos,
int *line, int *column, QString *function = 0);
QString removeObviousSideEffects(const QString &exp);
QString fixCppExpression(const QString &exp);
QString cppFunctionAt(const QString &fileName, int line);
// Decode string data as returned by the dumper helpers.
void decodeArray(WatchData *list, const WatchData &tmplate,
const QByteArray &rawData, int encoding);
// Get variables that are not initialized at a certain line
// of a function from the code model. Shadowed variables will
// be reported using the debugger naming conventions '<shadowed n>'
bool getUninitializedVariables(const CPlusPlus::Snapshot &snapshot,
const QString &function, const QString &file, int line,
QStringList *uninitializedVariables);
//
// GdbMi interaction