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:
hjk
2024-07-31 08:13:55 +02:00
parent 35deb730cb
commit bf0041919b
16 changed files with 29 additions and 40 deletions

View File

@@ -464,8 +464,8 @@ public:
void openMemoryEditor();
static void showModuleSymbols(const Utils::FilePath &moduleName, const QVector<Symbol> &symbols);
static void showModuleSections(const Utils::FilePath &moduleName, const QVector<Section> &sections);
static void showModuleSymbols(const Utils::FilePath &moduleName, const QList<Symbol> &symbols);
static void showModuleSections(const Utils::FilePath &moduleName, const QList<Section> &sections);
void handleExecDetach();
void handleExecContinue();

View File

@@ -97,7 +97,7 @@ public:
QString m_name;
QString m_parentPerspectiveId;
QString m_settingsId;
QVector<DockOperation> m_dockOperations;
QList<DockOperation> m_dockOperations;
QPointer<QWidget> m_centralWidget;
Perspective::Callback m_aboutToActivateCallback;
QPointer<QWidget> m_innerToolBar;

View File

@@ -656,7 +656,7 @@ public:
ActionContainer *m_menu = nullptr;
QVector<DebuggerRunTool *> m_scheduledStarts;
QList<DebuggerRunTool *> m_scheduledStarts;
ProxyAction m_visibleStartAction; // The fat debug button
ProxyAction m_hiddenStopAction;

View File

@@ -9,7 +9,6 @@
#include <QJsonValue>
#include <QJsonObject>
#include <QVarLengthArray>
#include <QVector>
#include <utils/filepath.h>
#include <utils/textutils.h>
@@ -143,7 +142,7 @@ public:
QString m_name;
QString m_data;
using Children = QVector<GdbMi>;
using Children = QList<GdbMi>;
enum Type { Invalid, Const, Tuple, List };
Type m_type = Invalid;

View File

@@ -99,7 +99,7 @@ public:
public:
DebuggerEngine *m_engine;
QVector<QPointer<DebuggerToolTipWidget>> m_tooltips;
QList<QPointer<DebuggerToolTipWidget>> m_tooltips;
bool m_debugModeActive = false;
};

View File

@@ -3,9 +3,9 @@
#pragma once
#include <QStringList>
#include <QHash>
#include <QVector>
#include <QList>
#include <QString>
namespace Debugger::Internal {
@@ -54,7 +54,7 @@ public:
int size() const { return m_data.size(); }
const DisassemblerLine &at(int i) const { return m_data.at(i); }
int lineForAddress(quint64 address) const;
QVector<DisassemblerLine> data() const { return m_data; }
QList<DisassemblerLine> data() const { return m_data; }
quint64 startAddress() const;
quint64 endAddress() const;
@@ -62,7 +62,7 @@ public:
private:
QString m_lastFunction;
int m_bytesLength = 0;
QVector<DisassemblerLine> m_data;
QList<DisassemblerLine> m_data;
QHash<quint64, int> m_rowCache;
};

View File

@@ -3766,7 +3766,7 @@ bool GdbEngine::handleCliDisassemblerResult(const QString &output, DisassemblerA
for (const QString &line : lineList)
dlines.appendUnparsed(line);
QVector<DisassemblerLine> lines = dlines.data();
QList<DisassemblerLine> lines = dlines.data();
using LineMap = QMap<quint64, LineData>;
LineMap lineMap;

View File

@@ -32,7 +32,7 @@ public:
QString demangled;
};
using Symbols = QVector<Symbol>;
using Symbols = QList<Symbol>;
//////////////////////////////////////////////////////////////////
//
@@ -50,7 +50,7 @@ public:
QString flags;
};
using Sections = QVector<Section>;
using Sections = QList<Section>;
//////////////////////////////////////////////////////////////////
//
@@ -79,7 +79,7 @@ public:
Utils::ElfData elfData;
};
using Modules = QVector<Module>;
using Modules = QList<Module>;
//////////////////////////////////////////////////////////////////
//

View File

@@ -88,7 +88,7 @@ public:
PeripheralRegisterAccess access = PeripheralRegisterAccess::Unknown;
PeripheralRegisterFormat format = PeripheralRegisterFormat::Hexadecimal;
QVector<PeripheralRegisterField> fields;
QList<PeripheralRegisterField> fields;
PeripheralRegisterValue currentValue;
PeripheralRegisterValue previousValue;
@@ -107,12 +107,12 @@ public:
int size = 0; // in bits
PeripheralRegisterAccess access = PeripheralRegisterAccess::Unknown;
bool active = false;
QVector<PeripheralRegister> registers;
QList<PeripheralRegister> registers;
};
// PeripheralRegisterGroups
using PeripheralRegisterGroups = QVector<PeripheralRegisterGroup>;
using PeripheralRegisterGroups = QList<PeripheralRegisterGroup>;
// PeripheralRegisterItem's

View File

@@ -26,7 +26,7 @@ public:
private:
QmlJS::Engine m_engine;
QVector<int> m_stateStack;
QList<int> m_stateStack;
QList<int> m_tokens;
QString m_code;
};

View File

@@ -346,7 +346,7 @@ static QString selectedText(QWidget *widget, bool useAll)
QTC_ASSERT(model, return {});
const int ncols = model->columnCount(QModelIndex());
QVector<int> largestColumnWidths(ncols, 0);
QList<int> largestColumnWidths(ncols, 0);
QSet<QModelIndex> selected;
if (QItemSelectionModel *selection = view->selectionModel()) {

View File

@@ -3,17 +3,12 @@
#pragma once
#include <QList>
#include <QString>
#include <QVector>
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
////////////////////////////////////////////////////////////////////////
//
// ThreadData
//
////////////////////////////////////////////////////////////////////////
/*! A structure containing information about a single thread. */
struct ThreadData
@@ -54,7 +49,6 @@ struct ThreadData
QString name;
};
using Threads = QVector<ThreadData>;
using Threads = QList<ThreadData>;
} // namespace Internal
} // namespace Debugger
} // Debugger::Internal

View File

@@ -38,7 +38,7 @@ public:
};
Q_GLOBAL_STATIC(QLibrary, gUvscLibrary)
Q_GLOBAL_STATIC(QVector<UvscClient *>, gUvscClients)
Q_GLOBAL_STATIC(QList<UvscClient *>, gUvscClients)
static QMutex gUvscsGuard;

View File

@@ -495,7 +495,7 @@ void UvscEngine::doUpdateLocals(const UpdateParameters &params)
watchHandler()->notifyUpdateStarted(params);
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.
QMetaObject::invokeMethod(this, [this, partial] { handleUpdateLocals(partial); },
Qt::QueuedConnection);

View File

@@ -97,7 +97,7 @@ using MemoryMarkupList = QList<MemoryMarkup>;
// over the children.
using ColorNumberToolTip = QPair<int, QString>;
using ColorNumberToolTips = QVector<ColorNumberToolTip>;
using ColorNumberToolTips = QList<ColorNumberToolTip>;
struct TypeInfo
{

View File

@@ -6,16 +6,13 @@
#include "watchdata.h"
#include "debuggerengine.h"
#include <QVector>
namespace Debugger {
namespace Internal {
namespace Debugger::Internal {
class DebuggerCommand;
class DebuggerEngine;
class WatchModel;
using DisplayFormats = QVector<DisplayFormat>;
using DisplayFormats = QList<DisplayFormat>;
class WatchModelBase : public Utils::TreeModel<WatchItem, WatchItem>
{
@@ -105,7 +102,6 @@ private:
WatchModel *m_model; // Owned.
};
} // namespace Internal
} // namespace Debugger
} // Debugger::Internal
Q_DECLARE_METATYPE(Debugger::Internal::DisplayFormat)