2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
2022-12-21 10:12:09 +01:00
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
2011-02-22 12:58:32 +01:00
|
|
|
|
2016-03-18 07:55:01 +01:00
|
|
|
#pragma once
|
2011-02-22 12:58:32 +01:00
|
|
|
|
2023-07-26 07:39:55 +02:00
|
|
|
#include <utils/aspects.h>
|
2013-03-21 17:10:19 +01:00
|
|
|
|
2022-07-05 15:37:08 +02:00
|
|
|
namespace Debugger::Internal {
|
2012-11-10 23:29:43 +01:00
|
|
|
|
2023-07-18 10:49:35 +02:00
|
|
|
class SourcePathMapAspectPrivate;
|
|
|
|
|
|
|
|
|
|
// Entries starting with '(' are considered regular expressions in the ElfReader.
|
|
|
|
|
// This is useful when there are multiple build machines with different
|
|
|
|
|
// path, and the user would like to match anything up to some known
|
|
|
|
|
// directory to his local project.
|
|
|
|
|
// Syntax: (/home/.*)/KnownSubdir -> /home/my/project
|
|
|
|
|
using SourcePathMap = QMap<QString, QString>;
|
|
|
|
|
|
|
|
|
|
class SourcePathMapAspect : public Utils::TypedAspect<SourcePathMap>
|
|
|
|
|
{
|
|
|
|
|
public:
|
2023-07-21 12:37:43 +02:00
|
|
|
explicit SourcePathMapAspect(Utils::AspectContainer *container);
|
2023-07-18 10:49:35 +02:00
|
|
|
~SourcePathMapAspect() override;
|
|
|
|
|
|
2023-08-23 16:53:06 +02:00
|
|
|
void fromMap(const Utils::Store &map) override;
|
|
|
|
|
void toMap(Utils::Store &map) const override;
|
2023-07-18 10:49:35 +02:00
|
|
|
|
|
|
|
|
void addToLayout(Layouting::LayoutItem &parent) override;
|
|
|
|
|
|
|
|
|
|
void readSettings() override;
|
|
|
|
|
void writeSettings() const override;
|
|
|
|
|
|
2023-10-13 11:34:22 +02:00
|
|
|
bool isDirty() override;
|
|
|
|
|
|
2023-07-18 10:49:35 +02:00
|
|
|
private:
|
2023-07-20 14:25:13 +02:00
|
|
|
bool guiToBuffer() override;
|
2023-07-18 10:49:35 +02:00
|
|
|
void bufferToGui() override;
|
|
|
|
|
|
|
|
|
|
SourcePathMapAspectPrivate *d = nullptr;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class CommonSettings final : public Utils::AspectContainer
|
2011-02-22 12:58:32 +01:00
|
|
|
{
|
|
|
|
|
public:
|
2023-07-18 10:49:35 +02:00
|
|
|
CommonSettings();
|
|
|
|
|
~CommonSettings();
|
|
|
|
|
|
2023-07-21 12:37:43 +02:00
|
|
|
Utils::BoolAspect useAlternatingRowColors{this};
|
|
|
|
|
Utils::BoolAspect useAnnotationsInMainEditor{this};
|
|
|
|
|
Utils::BoolAspect useToolTipsInMainEditor{this};
|
|
|
|
|
Utils::BoolAspect closeSourceBuffersOnExit{this};
|
|
|
|
|
Utils::BoolAspect closeMemoryBuffersOnExit{this};
|
|
|
|
|
Utils::BoolAspect raiseOnInterrupt{this};
|
|
|
|
|
Utils::BoolAspect breakpointsFullPathByDefault{this};
|
|
|
|
|
Utils::BoolAspect warnOnReleaseBuilds{this};
|
|
|
|
|
Utils::IntegerAspect maximalStackDepth{this};
|
|
|
|
|
|
|
|
|
|
Utils::BoolAspect fontSizeFollowsEditor{this};
|
|
|
|
|
Utils::BoolAspect switchModeOnExit{this};
|
|
|
|
|
Utils::BoolAspect showQmlObjectTree{this};
|
|
|
|
|
Utils::BoolAspect stationaryEditorWhileStepping{this};
|
|
|
|
|
Utils::BoolAspect forceLoggingToConsole{this};
|
|
|
|
|
|
|
|
|
|
SourcePathMapAspect sourcePathMap{this};
|
2023-07-18 10:49:35 +02:00
|
|
|
|
|
|
|
|
Utils::BoolAspect *registerForPostMortem = nullptr;
|
2011-02-22 12:58:32 +01:00
|
|
|
};
|
|
|
|
|
|
2023-07-18 10:49:35 +02:00
|
|
|
CommonSettings &commonSettings();
|
|
|
|
|
|
2023-07-26 07:39:55 +02:00
|
|
|
|
|
|
|
|
class LocalsAndExpressionsSettings final : public Utils::AspectContainer
|
2011-02-22 12:58:32 +01:00
|
|
|
{
|
|
|
|
|
public:
|
2023-07-26 07:39:55 +02:00
|
|
|
LocalsAndExpressionsSettings();
|
|
|
|
|
|
|
|
|
|
Utils::BoolAspect useDebuggingHelpers{this};
|
|
|
|
|
Utils::BoolAspect useCodeModel{this};
|
|
|
|
|
Utils::BoolAspect showThreadNames{this};
|
|
|
|
|
Utils::FilePathAspect extraDumperFile{this}; // For loading a file. Recommended.
|
|
|
|
|
Utils::StringAspect extraDumperCommands{this}; // To modify an existing setup.
|
|
|
|
|
|
|
|
|
|
Utils::BoolAspect showStdNamespace{this};
|
|
|
|
|
Utils::BoolAspect showQtNamespace{this};
|
|
|
|
|
Utils::BoolAspect showQObjectNames{this};
|
|
|
|
|
|
|
|
|
|
Utils::IntegerAspect maximalStringLength{this};
|
|
|
|
|
Utils::IntegerAspect displayStringLimit{this};
|
|
|
|
|
Utils::IntegerAspect defaultArraySize{this};
|
2011-02-22 12:58:32 +01:00
|
|
|
};
|
|
|
|
|
|
2023-07-26 07:39:55 +02:00
|
|
|
LocalsAndExpressionsSettings &localsAndExpressionSettings();
|
|
|
|
|
|
|
|
|
|
|
2022-07-05 15:37:08 +02:00
|
|
|
} // Debugger::Internal
|
2023-07-18 10:49:35 +02:00
|
|
|
|
|
|
|
|
Q_DECLARE_METATYPE(Debugger::Internal::SourcePathMap)
|