debuggerkitinformation.h 3.05 KB
Newer Older
hjk's avatar
hjk committed
1
/****************************************************************************
2
**
3
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
hjk's avatar
hjk committed
4
** Contact: http://www.qt-project.org/legal
5
**
hjk's avatar
hjk committed
6
** This file is part of Qt Creator.
7
**
hjk's avatar
hjk committed
8 9 10 11 12
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia.  For licensing terms and
Eike Ziller's avatar
Eike Ziller committed
13 14
** conditions see http://www.qt.io/licensing.  For further information
** use the contact form at http://www.qt.io/contact-us.
15 16
**
** GNU Lesser General Public License Usage
hjk's avatar
hjk committed
17
** Alternatively, this file may be used under the terms of the GNU Lesser
Eike Ziller's avatar
Eike Ziller committed
18 19 20 21 22 23
** General Public License version 2.1 or version 3 as published by the Free
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** LICENSE.LGPLv3 included in the packaging of this file.  Please review the
** following information to ensure the GNU Lesser General Public License
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
hjk's avatar
hjk committed
24 25 26 27 28 29
**
** In addition, as a special exception, Digia gives you certain additional
** rights.  These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
30

Tobias Hunger's avatar
Tobias Hunger committed
31 32
#ifndef DEBUGGER_DEBUGGERKITINFORMATION_H
#define DEBUGGER_DEBUGGERKITINFORMATION_H
33

Tobias Hunger's avatar
Tobias Hunger committed
34
#include "debugger_global.h"
35
#include "debuggerconstants.h"
36
#include "debuggeritem.h"
37

38
#include <projectexplorer/abi.h>
Tobias Hunger's avatar
Tobias Hunger committed
39
#include <projectexplorer/kitinformation.h>
40

41 42
#include <utils/persistentsettings.h>

Tobias Hunger's avatar
Tobias Hunger committed
43
namespace Debugger {
44

45 46 47
class DEBUGGER_EXPORT DebuggerKitInformation : public ProjectExplorer::KitInformation
{
    Q_OBJECT
48

49
public:
Tobias Hunger's avatar
Tobias Hunger committed
50
    DebuggerKitInformation();
Tobias Hunger's avatar
Tobias Hunger committed
51

52
    QVariant defaultValue(ProjectExplorer::Kit *k) const;
53

54
    QList<ProjectExplorer::Task> validate(const ProjectExplorer::Kit *k) const
55
        { return DebuggerKitInformation::validateDebugger(k); }
56

57
    void setup(ProjectExplorer::Kit *k);
58
    void fix(ProjectExplorer::Kit *k);
59

60 61
    static const DebuggerItem *debugger(const ProjectExplorer::Kit *kit);

62 63
    static QList<ProjectExplorer::Task> validateDebugger(const ProjectExplorer::Kit *k);
    static bool isValidDebugger(const ProjectExplorer::Kit *k);
64

Tobias Hunger's avatar
Tobias Hunger committed
65
    ProjectExplorer::KitConfigWidget *createConfigWidget(ProjectExplorer::Kit *k) const;
66
    bool resolveMacro(const ProjectExplorer::Kit *kit, const QString &name, QString *ret) const;
67

68
    ItemList toUserOutput(const ProjectExplorer::Kit *k) const;
69

70
    static void setDebugger(ProjectExplorer::Kit *k, const QVariant &id);
71

72
    static Core::Id id();
73 74 75
    static Utils::FileName debuggerCommand(const ProjectExplorer::Kit *k);
    static DebuggerEngineType engineType(const ProjectExplorer::Kit *k);
    static QString displayString(const ProjectExplorer::Kit *k);
76 77
};

Tobias Hunger's avatar
Tobias Hunger committed
78
} // namespace Debugger
79

Tobias Hunger's avatar
Tobias Hunger committed
80
#endif // DEBUGGER_DEBUGGERKITINFORMATION_H