forked from qt-creator/qt-creator
Debugger: Replace QVector with QList
The QContainer Naming War is over. QList won. Change-Id: I8193b1b51619502533b74d6e965ec9b664f8dbce Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -464,8 +464,8 @@ public:
|
|||||||
|
|
||||||
void openMemoryEditor();
|
void openMemoryEditor();
|
||||||
|
|
||||||
static void showModuleSymbols(const Utils::FilePath &moduleName, const QVector<Symbol> &symbols);
|
static void showModuleSymbols(const Utils::FilePath &moduleName, const QList<Symbol> &symbols);
|
||||||
static void showModuleSections(const Utils::FilePath &moduleName, const QVector<Section> §ions);
|
static void showModuleSections(const Utils::FilePath &moduleName, const QList<Section> §ions);
|
||||||
|
|
||||||
void handleExecDetach();
|
void handleExecDetach();
|
||||||
void handleExecContinue();
|
void handleExecContinue();
|
||||||
|
@@ -97,7 +97,7 @@ public:
|
|||||||
QString m_name;
|
QString m_name;
|
||||||
QString m_parentPerspectiveId;
|
QString m_parentPerspectiveId;
|
||||||
QString m_settingsId;
|
QString m_settingsId;
|
||||||
QVector<DockOperation> m_dockOperations;
|
QList<DockOperation> m_dockOperations;
|
||||||
QPointer<QWidget> m_centralWidget;
|
QPointer<QWidget> m_centralWidget;
|
||||||
Perspective::Callback m_aboutToActivateCallback;
|
Perspective::Callback m_aboutToActivateCallback;
|
||||||
QPointer<QWidget> m_innerToolBar;
|
QPointer<QWidget> m_innerToolBar;
|
||||||
|
@@ -656,7 +656,7 @@ public:
|
|||||||
|
|
||||||
ActionContainer *m_menu = nullptr;
|
ActionContainer *m_menu = nullptr;
|
||||||
|
|
||||||
QVector<DebuggerRunTool *> m_scheduledStarts;
|
QList<DebuggerRunTool *> m_scheduledStarts;
|
||||||
|
|
||||||
ProxyAction m_visibleStartAction; // The fat debug button
|
ProxyAction m_visibleStartAction; // The fat debug button
|
||||||
ProxyAction m_hiddenStopAction;
|
ProxyAction m_hiddenStopAction;
|
||||||
|
@@ -9,7 +9,6 @@
|
|||||||
#include <QJsonValue>
|
#include <QJsonValue>
|
||||||
#include <QJsonObject>
|
#include <QJsonObject>
|
||||||
#include <QVarLengthArray>
|
#include <QVarLengthArray>
|
||||||
#include <QVector>
|
|
||||||
|
|
||||||
#include <utils/filepath.h>
|
#include <utils/filepath.h>
|
||||||
#include <utils/textutils.h>
|
#include <utils/textutils.h>
|
||||||
@@ -143,7 +142,7 @@ public:
|
|||||||
QString m_name;
|
QString m_name;
|
||||||
QString m_data;
|
QString m_data;
|
||||||
|
|
||||||
using Children = QVector<GdbMi>;
|
using Children = QList<GdbMi>;
|
||||||
enum Type { Invalid, Const, Tuple, List };
|
enum Type { Invalid, Const, Tuple, List };
|
||||||
Type m_type = Invalid;
|
Type m_type = Invalid;
|
||||||
|
|
||||||
|
@@ -99,7 +99,7 @@ public:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
DebuggerEngine *m_engine;
|
DebuggerEngine *m_engine;
|
||||||
QVector<QPointer<DebuggerToolTipWidget>> m_tooltips;
|
QList<QPointer<DebuggerToolTipWidget>> m_tooltips;
|
||||||
bool m_debugModeActive = false;
|
bool m_debugModeActive = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -3,9 +3,9 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QStringList>
|
|
||||||
#include <QHash>
|
#include <QHash>
|
||||||
#include <QVector>
|
#include <QList>
|
||||||
|
#include <QString>
|
||||||
|
|
||||||
namespace Debugger::Internal {
|
namespace Debugger::Internal {
|
||||||
|
|
||||||
@@ -54,7 +54,7 @@ public:
|
|||||||
int size() const { return m_data.size(); }
|
int size() const { return m_data.size(); }
|
||||||
const DisassemblerLine &at(int i) const { return m_data.at(i); }
|
const DisassemblerLine &at(int i) const { return m_data.at(i); }
|
||||||
int lineForAddress(quint64 address) const;
|
int lineForAddress(quint64 address) const;
|
||||||
QVector<DisassemblerLine> data() const { return m_data; }
|
QList<DisassemblerLine> data() const { return m_data; }
|
||||||
|
|
||||||
quint64 startAddress() const;
|
quint64 startAddress() const;
|
||||||
quint64 endAddress() const;
|
quint64 endAddress() const;
|
||||||
@@ -62,7 +62,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
QString m_lastFunction;
|
QString m_lastFunction;
|
||||||
int m_bytesLength = 0;
|
int m_bytesLength = 0;
|
||||||
QVector<DisassemblerLine> m_data;
|
QList<DisassemblerLine> m_data;
|
||||||
QHash<quint64, int> m_rowCache;
|
QHash<quint64, int> m_rowCache;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -3766,7 +3766,7 @@ bool GdbEngine::handleCliDisassemblerResult(const QString &output, DisassemblerA
|
|||||||
for (const QString &line : lineList)
|
for (const QString &line : lineList)
|
||||||
dlines.appendUnparsed(line);
|
dlines.appendUnparsed(line);
|
||||||
|
|
||||||
QVector<DisassemblerLine> lines = dlines.data();
|
QList<DisassemblerLine> lines = dlines.data();
|
||||||
|
|
||||||
using LineMap = QMap<quint64, LineData>;
|
using LineMap = QMap<quint64, LineData>;
|
||||||
LineMap lineMap;
|
LineMap lineMap;
|
||||||
|
@@ -32,7 +32,7 @@ public:
|
|||||||
QString demangled;
|
QString demangled;
|
||||||
};
|
};
|
||||||
|
|
||||||
using Symbols = QVector<Symbol>;
|
using Symbols = QList<Symbol>;
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
@@ -50,7 +50,7 @@ public:
|
|||||||
QString flags;
|
QString flags;
|
||||||
};
|
};
|
||||||
|
|
||||||
using Sections = QVector<Section>;
|
using Sections = QList<Section>;
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
@@ -79,7 +79,7 @@ public:
|
|||||||
Utils::ElfData elfData;
|
Utils::ElfData elfData;
|
||||||
};
|
};
|
||||||
|
|
||||||
using Modules = QVector<Module>;
|
using Modules = QList<Module>;
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
|
@@ -88,7 +88,7 @@ public:
|
|||||||
PeripheralRegisterAccess access = PeripheralRegisterAccess::Unknown;
|
PeripheralRegisterAccess access = PeripheralRegisterAccess::Unknown;
|
||||||
PeripheralRegisterFormat format = PeripheralRegisterFormat::Hexadecimal;
|
PeripheralRegisterFormat format = PeripheralRegisterFormat::Hexadecimal;
|
||||||
|
|
||||||
QVector<PeripheralRegisterField> fields;
|
QList<PeripheralRegisterField> fields;
|
||||||
|
|
||||||
PeripheralRegisterValue currentValue;
|
PeripheralRegisterValue currentValue;
|
||||||
PeripheralRegisterValue previousValue;
|
PeripheralRegisterValue previousValue;
|
||||||
@@ -107,12 +107,12 @@ public:
|
|||||||
int size = 0; // in bits
|
int size = 0; // in bits
|
||||||
PeripheralRegisterAccess access = PeripheralRegisterAccess::Unknown;
|
PeripheralRegisterAccess access = PeripheralRegisterAccess::Unknown;
|
||||||
bool active = false;
|
bool active = false;
|
||||||
QVector<PeripheralRegister> registers;
|
QList<PeripheralRegister> registers;
|
||||||
};
|
};
|
||||||
|
|
||||||
// PeripheralRegisterGroups
|
// PeripheralRegisterGroups
|
||||||
|
|
||||||
using PeripheralRegisterGroups = QVector<PeripheralRegisterGroup>;
|
using PeripheralRegisterGroups = QList<PeripheralRegisterGroup>;
|
||||||
|
|
||||||
// PeripheralRegisterItem's
|
// PeripheralRegisterItem's
|
||||||
|
|
||||||
|
@@ -26,7 +26,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
QmlJS::Engine m_engine;
|
QmlJS::Engine m_engine;
|
||||||
QVector<int> m_stateStack;
|
QList<int> m_stateStack;
|
||||||
QList<int> m_tokens;
|
QList<int> m_tokens;
|
||||||
QString m_code;
|
QString m_code;
|
||||||
};
|
};
|
||||||
|
@@ -346,7 +346,7 @@ static QString selectedText(QWidget *widget, bool useAll)
|
|||||||
QTC_ASSERT(model, return {});
|
QTC_ASSERT(model, return {});
|
||||||
|
|
||||||
const int ncols = model->columnCount(QModelIndex());
|
const int ncols = model->columnCount(QModelIndex());
|
||||||
QVector<int> largestColumnWidths(ncols, 0);
|
QList<int> largestColumnWidths(ncols, 0);
|
||||||
|
|
||||||
QSet<QModelIndex> selected;
|
QSet<QModelIndex> selected;
|
||||||
if (QItemSelectionModel *selection = view->selectionModel()) {
|
if (QItemSelectionModel *selection = view->selectionModel()) {
|
||||||
|
@@ -3,17 +3,12 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <QList>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QVector>
|
|
||||||
|
|
||||||
namespace Debugger {
|
namespace Debugger::Internal {
|
||||||
namespace Internal {
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// ThreadData
|
// ThreadData
|
||||||
//
|
|
||||||
////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
/*! A structure containing information about a single thread. */
|
/*! A structure containing information about a single thread. */
|
||||||
struct ThreadData
|
struct ThreadData
|
||||||
@@ -54,7 +49,6 @@ struct ThreadData
|
|||||||
QString name;
|
QString name;
|
||||||
};
|
};
|
||||||
|
|
||||||
using Threads = QVector<ThreadData>;
|
using Threads = QList<ThreadData>;
|
||||||
|
|
||||||
} // namespace Internal
|
} // Debugger::Internal
|
||||||
} // namespace Debugger
|
|
||||||
|
@@ -38,7 +38,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
Q_GLOBAL_STATIC(QLibrary, gUvscLibrary)
|
Q_GLOBAL_STATIC(QLibrary, gUvscLibrary)
|
||||||
Q_GLOBAL_STATIC(QVector<UvscClient *>, gUvscClients)
|
Q_GLOBAL_STATIC(QList<UvscClient *>, gUvscClients)
|
||||||
|
|
||||||
static QMutex gUvscsGuard;
|
static QMutex gUvscsGuard;
|
||||||
|
|
||||||
|
@@ -495,7 +495,7 @@ void UvscEngine::doUpdateLocals(const UpdateParameters ¶ms)
|
|||||||
watchHandler()->notifyUpdateStarted(params);
|
watchHandler()->notifyUpdateStarted(params);
|
||||||
|
|
||||||
const bool partial = !params.partialVariable.isEmpty();
|
const bool partial = !params.partialVariable.isEmpty();
|
||||||
// This is a workaround to avoid a strange QVector index assertion
|
// This is a workaround to avoid a strange QList index assertion
|
||||||
// inside of the watch model.
|
// inside of the watch model.
|
||||||
QMetaObject::invokeMethod(this, [this, partial] { handleUpdateLocals(partial); },
|
QMetaObject::invokeMethod(this, [this, partial] { handleUpdateLocals(partial); },
|
||||||
Qt::QueuedConnection);
|
Qt::QueuedConnection);
|
||||||
|
@@ -97,7 +97,7 @@ using MemoryMarkupList = QList<MemoryMarkup>;
|
|||||||
// over the children.
|
// over the children.
|
||||||
|
|
||||||
using ColorNumberToolTip = QPair<int, QString>;
|
using ColorNumberToolTip = QPair<int, QString>;
|
||||||
using ColorNumberToolTips = QVector<ColorNumberToolTip>;
|
using ColorNumberToolTips = QList<ColorNumberToolTip>;
|
||||||
|
|
||||||
struct TypeInfo
|
struct TypeInfo
|
||||||
{
|
{
|
||||||
|
@@ -6,16 +6,13 @@
|
|||||||
#include "watchdata.h"
|
#include "watchdata.h"
|
||||||
#include "debuggerengine.h"
|
#include "debuggerengine.h"
|
||||||
|
|
||||||
#include <QVector>
|
namespace Debugger::Internal {
|
||||||
|
|
||||||
namespace Debugger {
|
|
||||||
namespace Internal {
|
|
||||||
|
|
||||||
class DebuggerCommand;
|
class DebuggerCommand;
|
||||||
class DebuggerEngine;
|
class DebuggerEngine;
|
||||||
class WatchModel;
|
class WatchModel;
|
||||||
|
|
||||||
using DisplayFormats = QVector<DisplayFormat>;
|
using DisplayFormats = QList<DisplayFormat>;
|
||||||
|
|
||||||
class WatchModelBase : public Utils::TreeModel<WatchItem, WatchItem>
|
class WatchModelBase : public Utils::TreeModel<WatchItem, WatchItem>
|
||||||
{
|
{
|
||||||
@@ -105,7 +102,6 @@ private:
|
|||||||
WatchModel *m_model; // Owned.
|
WatchModel *m_model; // Owned.
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // Debugger::Internal
|
||||||
} // namespace Debugger
|
|
||||||
|
|
||||||
Q_DECLARE_METATYPE(Debugger::Internal::DisplayFormat)
|
Q_DECLARE_METATYPE(Debugger::Internal::DisplayFormat)
|
||||||
|
Reference in New Issue
Block a user