formatting
This commit is contained in:
parent
afb40c9f0a
commit
a01ae48964
|
@ -148,7 +148,7 @@ bool MessageBrowser::eventFilter(QObject* watched, QEvent* event) {
|
|||
return false;
|
||||
}
|
||||
|
||||
void MessageBrowser::onAnchorClicked(const QUrl &url) {
|
||||
void MessageBrowser::onAnchorClicked(const QUrl& url) {
|
||||
if (url.toString().startsWith(INTERNAL_URL_PASSATTACHMENT) &&
|
||||
m_root != nullptr &&
|
||||
m_root->getParentServiceRoot()->downloadAttachmentOnMyOwn(url)) {
|
||||
|
@ -165,6 +165,7 @@ void MessageBrowser::onAnchorClicked(const QUrl &url) {
|
|||
else {
|
||||
// User clicked some URL. Open it in external browser or download?
|
||||
MessageBox box(qApp->mainFormWidget());
|
||||
|
||||
box.setText(tr("You clicked some link. You can download the link contents or open it in external web browser."));
|
||||
box.setInformativeText(tr("What action do you want to take?"));
|
||||
box.setDetailedText(url.toString());
|
||||
|
@ -173,6 +174,7 @@ void MessageBrowser::onAnchorClicked(const QUrl &url) {
|
|||
QAbstractButton* btn_download = box.addButton(tr("Download"), QMessageBox::ButtonRole::ActionRole);
|
||||
QAbstractButton* btn_cancel = box.addButton(QMessageBox::StandardButton::Cancel);
|
||||
bool always;
|
||||
|
||||
MessageBox::setCheckBox(&box, tr("Always open links in external browser."), &always);
|
||||
|
||||
box.setDefaultButton(QMessageBox::StandardButton::Cancel);
|
||||
|
@ -208,7 +210,7 @@ void MessageBrowser::reloadFontSettings() {
|
|||
m_txtBrowser->setFont(fon);
|
||||
}
|
||||
|
||||
void MessageBrowser::loadUrl(const QString &url) {
|
||||
void MessageBrowser::loadUrl(const QString& url) {
|
||||
onAnchorClicked(url);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue