Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Education
Cantor
Commits
7fb5f111
Commit
7fb5f111
authored
Jul 20, 2022
by
Alexander Semke
Browse files
Open URLs in the "Select Backend"-dialog in the external browser.
BUG: 456650
FIXED-IN: 22.08
parent
de5b2db9
Pipeline
#206998
passed with stage
in 5 minutes and 54 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/backendchoosedialog.cpp
View file @
7fb5f111
/*
SPDX-License-Identifier: GPL-2.0-or-later
SPDX-FileCopyrightText: 2009 Alexander Rieder <alexanderrieder@gmail.com>
SPDX-FileCopyrightText: 2019 Alexander Semke <alexander.semke@web.de>
SPDX-FileCopyrightText: 2019
-2022
Alexander Semke <alexander.semke@web.de>
*/
#include
"backendchoosedialog.h"
...
...
@@ -13,6 +13,7 @@
#include
<KSharedConfig>
#include
<KWindowConfig>
#include
<QDesktopServices>
#include
<QIcon>
#include
<QPushButton>
#include
<QWindow>
...
...
@@ -59,6 +60,7 @@ BackendChooseDialog::BackendChooseDialog(QWidget* parent) : QDialog(parent)
int
height
=
m_ui
.
backendList
->
iconSize
().
height
()
*
m_ui
.
backendList
->
count
();
m_ui
.
backendList
->
setMinimumSize
(
0
,
height
);
setWindowTitle
(
i18n
(
"Select the Backend"
));
setWindowIcon
(
QIcon
::
fromTheme
(
QLatin1String
(
"run-build"
)));
...
...
@@ -66,14 +68,21 @@ BackendChooseDialog::BackendChooseDialog(QWidget* parent) : QDialog(parent)
connect
(
m_ui
.
buttonBox
,
&
QDialogButtonBox
::
rejected
,
this
,
&
BackendChooseDialog
::
close
);
connect
(
this
,
&
BackendChooseDialog
::
accepted
,
this
,
&
BackendChooseDialog
::
onAccept
);
//restore saved settings if available
create
();
// ensure there's a window created
KConfigGroup
conf
(
KSharedConfig
::
openConfig
(),
"BackendChooseDialog"
);
if
(
conf
.
exists
())
{
KWindowConfig
::
restoreWindowSize
(
windowHandle
(),
conf
);
resize
(
windowHandle
()
->
size
());
// workaround for QTBUG-40584
}
else
resize
(
QSize
(
500
,
200
).
expandedTo
(
minimumSize
()));
// open URLs in the external browser
m_ui
.
descriptionView
->
setOpenLinks
(
false
);
connect
(
m_ui
.
descriptionView
,
&
QTextBrowser
::
anchorClicked
,
this
,
[
=
](
const
QUrl
&
link
)
{
QDesktopServices
::
openUrl
(
QUrl
(
link
));
});
//restore saved settings if available
create
();
// ensure there's a window created
KConfigGroup
conf
(
KSharedConfig
::
openConfig
(),
"BackendChooseDialog"
);
if
(
conf
.
exists
())
{
KWindowConfig
::
restoreWindowSize
(
windowHandle
(),
conf
);
resize
(
windowHandle
()
->
size
());
// workaround for QTBUG-40584
}
else
resize
(
QSize
(
500
,
200
).
expandedTo
(
minimumSize
()));
}
BackendChooseDialog
::~
BackendChooseDialog
()
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment