Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Kdenlive
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
261
Issues
261
List
Boards
Labels
Service Desk
Milestones
Merge Requests
16
Merge Requests
16
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Multimedia
Kdenlive
Commits
eefecf92
Commit
eefecf92
authored
Jan 09, 2021
by
Julius Künzel
Committed by
Jean-Baptiste Mardelle
Jan 10, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix broken Freesound login and import
Signed-off-by:
Julius Künzel
<
jk.kdedev@smartlab.uber.space
>
parent
b1d63b64
Pipeline
#47149
passed with stage
in 10 minutes and 29 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
10 deletions
+8
-10
src/qt-oauth-lib/logindialog.cpp
src/qt-oauth-lib/logindialog.cpp
+5
-5
src/utils/resourcewidget.cpp
src/utils/resourcewidget.cpp
+3
-5
No files found.
src/qt-oauth-lib/logindialog.cpp
View file @
eefecf92
...
...
@@ -83,15 +83,15 @@ void LoginDialog::slotRejected()
void
LoginDialog
::
urlChanged
(
const
QUrl
&
url
)
{
// qCDebug(KDENLIVE_LOG) << "URL =" << url;
const
QString
str
=
url
.
toString
(
);
const
int
posCode
=
str
.
indexOf
(
QLatin1String
(
"
&
code="
));
const
int
posErr
=
str
.
indexOf
(
QLatin1String
(
"
&
error="
));
const
QString
str
=
url
.
query
(
QUrl
::
FullyDecoded
);
const
int
posCode
=
str
.
indexOf
(
QLatin1String
(
"code="
));
const
int
posErr
=
str
.
indexOf
(
QLatin1String
(
"error="
));
if
(
posCode
!=
-
1
)
{
m_strAuthCode
=
str
.
mid
(
posCode
+
6
);
m_strAuthCode
=
str
.
mid
(
posCode
+
5
);
emit
authCodeObtained
();
QDialog
::
accept
();
}
else
if
(
posErr
!=
-
1
)
{
QString
sError
=
str
.
mid
(
posErr
+
7
);
QString
sError
=
str
.
mid
(
posErr
+
6
);
if
(
sError
==
QLatin1String
(
"access_denied"
))
{
emit
accessDenied
();
}
...
...
src/utils/resourcewidget.cpp
View file @
eefecf92
...
...
@@ -18,9 +18,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/
/*
*
*/
#include "resourcewidget.h"
#include "archiveorg.h"
#include "freesound.h"
...
...
@@ -758,7 +755,7 @@ void ResourceWidget::slotAccessTokenReceived(const QString &sAccessToken)
QUrl
srcUrl
(
m_currentInfo
.
itemDownload
);
request
.
setUrl
(
srcUrl
);
// Download url of a freesound file
// eg https://www.freesound.org/apiv2/sounds/39206/download/
request
.
setRawHeader
(
QByteArray
(
"Authorization"
),
QByteArray
(
"Bearer
"
).
append
(
sAccessToken
.
toUtf8
()));
request
.
setRawHeader
(
QByteArray
(
"Authorization"
),
QByteArray
(
"Bearer
"
).
append
(
sAccessToken
.
toUtf8
()));
//Space after "Bearer" is necessary
m_meta
=
QString
();
m_desc
=
QStringLiteral
(
"<br><b>"
)
+
i18n
(
"Starting File Download"
)
+
QStringLiteral
(
"</b><br>"
);
...
...
@@ -792,6 +789,7 @@ QString ResourceWidget::GetSaveFileNameAndPathS(const QString &path, const QStri
{
return
saveUrlstring
;
}
if
(
QFile
::
exists
(
saveUrlstring
))
{
int
ret
=
QMessageBox
::
warning
(
this
,
i18n
(
"File Exists"
),
i18n
(
"Do you want to overwrite the existing file?"
),
QMessageBox
::
Yes
|
QMessageBox
::
No
,
QMessageBox
::
No
);
...
...
@@ -835,7 +833,7 @@ void ResourceWidget::DownloadRequestFinished(QNetworkReply *reply)
file
.
close
();
KMessageBox
::
information
(
this
,
i18n
(
"Resource saved to %1"
,
m_saveLocation
),
i18n
(
"Data Imported"
));
emit
addClip
(
QUrl
(
m_saveLocation
),
QString
());
// MainWindow::slotDownloadResources() links this signal to MainWindow::slotAddProjectClip
emit
addClip
(
QUrl
::
fromLocalFile
(
m_saveLocation
),
QString
());
// MainWindow::slotDownloadResources() links this signal to MainWindow::slotAddProjectClip
m_desc
.
append
(
QStringLiteral
(
"<br>"
)
+
i18n
(
"Saved file to"
)
+
QStringLiteral
(
"<br>"
));
m_desc
.
append
(
m_saveLocation
);
...
...
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