Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpenBoard
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lifo
Nicolas Ollinger
OpenBoard
Commits
3182e092
Commit
3182e092
authored
Oct 26, 2012
by
Claudio Valerio
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed trap flash issue
parent
1926d793
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
28 deletions
+38
-28
UBBoardController.cpp
src/board/UBBoardController.cpp
+30
-25
UBTrapFlashController.cpp
src/web/UBTrapFlashController.cpp
+8
-3
No files found.
src/board/UBBoardController.cpp
View file @
3182e092
...
@@ -1029,12 +1029,17 @@ void UBBoardController::downloadURL(const QUrl& url, QString contentSourceUrl, c
...
@@ -1029,12 +1029,17 @@ void UBBoardController::downloadURL(const QUrl& url, QString contentSourceUrl, c
}
}
else
else
{
{
QString
urlString
=
url
.
toString
();
int
parametersStringPosition
=
urlString
.
indexOf
(
"?"
);
if
(
parametersStringPosition
!=
-
1
)
urlString
=
urlString
.
left
(
parametersStringPosition
);
// When we fall there, it means that we are dropping something from the web to the board
// When we fall there, it means that we are dropping something from the web to the board
sDownloadFileDesc
desc
;
sDownloadFileDesc
desc
;
desc
.
modal
=
true
;
desc
.
modal
=
true
;
desc
.
srcUrl
=
url
.
toString
()
;
desc
.
srcUrl
=
url
String
;
desc
.
currentSize
=
0
;
desc
.
currentSize
=
0
;
desc
.
name
=
QFileInfo
(
url
.
toString
()
).
fileName
();
desc
.
name
=
QFileInfo
(
url
String
).
fileName
();
desc
.
totalSize
=
0
;
// The total size will be retrieved during the download
desc
.
totalSize
=
0
;
// The total size will be retrieved during the download
desc
.
pos
=
pPos
;
desc
.
pos
=
pPos
;
desc
.
size
=
pSize
;
desc
.
size
=
pSize
;
...
...
src/web/UBTrapFlashController.cpp
View file @
3182e092
...
@@ -370,6 +370,7 @@ QString UBTrapFlashController::generateFullPageHtml(const QString& pDirPath, boo
...
@@ -370,6 +370,7 @@ QString UBTrapFlashController::generateFullPageHtml(const QString& pDirPath, boo
QString
UBTrapFlashController
::
generateHtml
(
const
UBWebKitUtils
::
HtmlObject
&
pObject
,
QString
UBTrapFlashController
::
generateHtml
(
const
UBWebKitUtils
::
HtmlObject
&
pObject
,
const
QString
&
pDirPath
,
bool
pGenerateFile
)
const
QString
&
pDirPath
,
bool
pGenerateFile
)
{
{
qDebug
()
<<
pObject
.
source
;
QUrl
objectUrl
(
pObject
.
source
);
QUrl
objectUrl
(
pObject
.
source
);
QString
objectFullUrl
=
pObject
.
source
;
QString
objectFullUrl
=
pObject
.
source
;
if
(
!
objectUrl
.
isValid
())
if
(
!
objectUrl
.
isValid
())
...
@@ -471,9 +472,13 @@ QString UBTrapFlashController::generateHtml(const UBWebKitUtils::HtmlObject& pOb
...
@@ -471,9 +472,13 @@ QString UBTrapFlashController::generateHtml(const UBWebKitUtils::HtmlObject& pOb
QString
UBTrapFlashController
::
widgetNameForObject
(
UBWebKitUtils
::
HtmlObject
pObject
)
QString
UBTrapFlashController
::
widgetNameForObject
(
UBWebKitUtils
::
HtmlObject
pObject
)
{
{
int
lastSlashIndex
=
pObject
.
source
.
lastIndexOf
(
"/"
);
QString
url
=
pObject
.
source
;
int
parametersIndex
=
url
.
indexOf
(
"?"
);
if
(
parametersIndex
!=
-
1
)
url
=
url
.
left
(
parametersIndex
);
int
lastSlashIndex
=
url
.
lastIndexOf
(
"/"
);
QString
result
=
pObject
.
source
.
right
(
pObject
.
source
.
length
()
-
lastSlashIndex
);
QString
result
=
url
.
right
(
url
.
length
()
-
lastSlashIndex
);
result
=
UBFileSystemUtils
::
cleanName
(
result
);
result
=
UBFileSystemUtils
::
cleanName
(
result
);
return
result
;
return
result
;
...
...
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