aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/qt-breakpad/qtcrashhandler/detaildialog.cpp
blob: c34bcbe96bad807bac4d18fb2c9e1adb5be53d59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0

#include "detaildialog.h"

#include <QDialogButtonBox>
#include <QTextBrowser>
#include <QVBoxLayout>

DetailDialog::DetailDialog(QWidget *parent) :
    QDialog(parent)
{
    resize(640, 480);
    QVBoxLayout *verticalLayout = new QVBoxLayout(this);
    textBrowser = new QTextBrowser(this);
    verticalLayout->addWidget(textBrowser);
    buttonBox = new QDialogButtonBox(this);
    buttonBox->setOrientation(Qt::Horizontal);
    buttonBox->setStandardButtons(QDialogButtonBox::Close);

    verticalLayout->addWidget(buttonBox);
    connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept);
    connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
}

DetailDialog::~DetailDialog()
{
}

void DetailDialog::setText(const QString &text)
{
    textBrowser->setPlainText(text);
}