Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Kdenlive
Commits
cb7c5bcc
Commit
cb7c5bcc
authored
Jan 15, 2022
by
Julius Künzel
Browse files
[Setup Wizard] Show codes if there are only info messages, fix doc link
parent
ea53d574
Pipeline
#123808
passed with stage
in 9 minutes and 8 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/dialogs/wizard.cpp
View file @
cb7c5bcc
...
...
@@ -42,6 +42,7 @@ SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
#if KIO_VERSION >= QT_VERSION_CHECK(5,71,0)
#include <KIO/OpenUrlJob>
#include <KIO/JobUiDelegate>
#endif
// Recommended MLT version
...
...
@@ -116,8 +117,18 @@ Wizard::Wizard(bool autoClose, bool appImageCheck, QWidget *parent)
lab
->
setText
(
i18n
(
"Startup error or warning, check our <a href='#'>online manual</a>."
));
connect
(
lab
,
&
QLabel
::
linkActivated
,
this
,
&
Wizard
::
slotOpenManual
);
m_startLayout
->
addWidget
(
lab
);
}
else
{
// Everything is ok, auto close the wizard
}
if
(
!
m_infos
.
isEmpty
())
{
auto
*
errorLabel
=
new
KMessageWidget
(
this
);
errorLabel
->
setText
(
QStringLiteral
(
"<ul>"
)
+
m_infos
+
QStringLiteral
(
"</ul>"
));
errorLabel
->
setMessageType
(
KMessageWidget
::
Information
);
errorLabel
->
setWordWrap
(
true
);
errorLabel
->
setCloseButtonVisible
(
false
);
m_startLayout
->
addWidget
(
errorLabel
);
errorLabel
->
show
();
}
if
(
m_errors
.
isEmpty
()
&&
m_warnings
.
isEmpty
())
{
// Everything is ok only some info message, show codec status
m_page
->
setComplete
(
true
);
if
(
autoClose
)
{
QTimer
::
singleShot
(
0
,
this
,
&
QDialog
::
accept
);
...
...
@@ -175,15 +186,6 @@ Wizard::Wizard(bool autoClose, bool appImageCheck, QWidget *parent)
m_startLayout
->
addWidget
(
errorLabel
);
errorLabel
->
show
();
}
if
(
!
m_infos
.
isEmpty
())
{
auto
*
errorLabel
=
new
KMessageWidget
(
this
);
errorLabel
->
setText
(
QStringLiteral
(
"<ul>"
)
+
m_infos
+
QStringLiteral
(
"</ul>"
));
errorLabel
->
setMessageType
(
KMessageWidget
::
Information
);
errorLabel
->
setWordWrap
(
true
);
errorLabel
->
setCloseButtonVisible
(
false
);
m_startLayout
->
addWidget
(
errorLabel
);
errorLabel
->
show
();
}
// build profiles lists
/*QMap<QString, QString> profilesInfo = ProfilesDialog::getProfilesInfo();
QMap<QString, QString>::const_iterator i = profilesInfo.constBegin();
...
...
@@ -826,7 +828,12 @@ bool Wizard::isOk() const
void
Wizard
::
slotOpenManual
()
{
#if KIO_VERSION >= QT_VERSION_CHECK(5,71,0)
KIO
::
OpenUrlJob
(
QUrl
(
QStringLiteral
(
"https://kdenlive.org/troubleshooting"
)),
QStringLiteral
(
"text/html"
));
auto
*
job
=
new
KIO
::
OpenUrlJob
(
QUrl
(
QStringLiteral
(
"https://kdenlive.org/troubleshooting"
)));
job
->
setUiDelegate
(
new
KIO
::
JobUiDelegate
(
KJobUiDelegate
::
AutoHandlingEnabled
,
this
));
// methods like setRunExecutables, setSuggestedFilename, setEnableExternalBrowser, setFollowRedirections
// exist in both classes
job
->
start
();
//KIO::OpenUrlJob(QUrl(QStringLiteral("https://kdenlive.org/troubleshooting")), QStringLiteral("text/html"));
#else
KRun
::
runUrl
(
QUrl
(
QStringLiteral
(
"https://kdenlive.org/troubleshooting"
)),
QStringLiteral
(
"text/html"
),
this
,
KRun
::
RunFlags
());
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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