File: kjserrordlg.cpp

package info (click to toggle)
khtml 5.54.0-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 18,940 kB
  • sloc: cpp: 206,281; java: 4,060; ansic: 2,829; perl: 2,313; yacc: 1,497; python: 339; sh: 141; xml: 37; makefile: 7
file content (35 lines) | stat: -rw-r--r-- 735 bytes parent folder | download | duplicates (2)
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
34
35
#include "kjserrordlg.h"

#include <QPushButton>

KJSErrorDlg::KJSErrorDlg(QWidget *parent)
    : QDialog(parent)
{
    setupUi(this);
    QPushButton *clear = _buttonBox->addButton(i18n("C&lear"), QDialogButtonBox::ActionRole);
    clear->setIcon(QIcon::fromTheme("edit-clear-locationbar-ltr"));
    connect(clear, SIGNAL(clicked()), this, SLOT(clear()));
    connect(_buttonBox, SIGNAL(rejected()), this, SLOT(hide()));
    init();
}

void KJSErrorDlg::addError(const QString &error)
{
    _errorText->append(error);
}

void KJSErrorDlg::setURL(const QString &url)
{
    _url->setText(url);
}

void KJSErrorDlg::clear()
{
    _errorText->clear();
    init();
}

void KJSErrorDlg::init()
{
    _errorText->setAcceptRichText(false);
}