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
276ccde5
Commit
276ccde5
authored
11 years ago
by
-f
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ISSUE Sankore 1661
parent
bc0cffb4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
15 deletions
+14
-15
UBBoardController.cpp
src/board/UBBoardController.cpp
+5
-3
UBFeaturesController.cpp
src/board/UBFeaturesController.cpp
+9
-12
No files found.
src/board/UBBoardController.cpp
View file @
276ccde5
...
...
@@ -2366,11 +2366,13 @@ void UBBoardController::processMimeData(const QMimeData* pMimeData, const QPoint
if
(
""
!=
pMimeData
->
text
()){
// Sometimes, it is possible to have an URL as text. we check here if it is the case
QString
qsTmp
=
pMimeData
->
text
().
remove
(
QRegExp
(
"[
\\
0]"
));
if
(
qsTmp
.
startsWith
(
"http"
))
{
if
(
qsTmp
.
startsWith
(
"http"
))
downloadURL
(
QUrl
(
qsTmp
),
QString
(),
pPos
);
}
else
{
mActiveScene
->
addTextHtml
(
pMimeData
->
html
(),
pPos
);
if
(
mActiveScene
->
selectedItems
().
at
(
0
)
->
type
()
==
UBGraphicsItemType
::
TextItemType
)
dynamic_cast
<
UBGraphicsTextItem
*>
(
mActiveScene
->
selectedItems
().
at
(
0
))
->
setHtml
(
pMimeData
->
text
());
else
mActiveScene
->
addTextHtml
(
pMimeData
->
text
(),
pPos
);
}
}
else
{
...
...
This diff is collapsed.
Click to expand it.
src/board/UBFeaturesController.cpp
View file @
276ccde5
...
...
@@ -449,7 +449,7 @@ void UBFeaturesController::fileSystemScan(const QUrl & currentPath, const QStrin
if
(
fullFileName
.
contains
(
".thumbnail."
))
continue
;
UBFeature
testFeature
(
currVirtualPath
+
"/"
+
fileName
,
icon
,
fileName
,
QUrl
::
fromLocalFile
(
fullFileName
),
featureType
);
featuresList
->
append
(
testFeature
);
...
...
@@ -750,17 +750,17 @@ void UBFeaturesController::importImage( const QImage &image, const UBFeature &de
QDateTime
now
=
QDateTime
::
currentDateTime
();
static
int
imageCounter
=
0
;
mFileName
=
tr
(
"ImportedImage"
)
+
"-"
+
now
.
toString
(
"dd-MM-yyyy hh-mm-ss"
);
filePath
=
dest
.
getFullPath
().
toLocalFile
()
+
"/"
+
mFileName
;
if
(
QFile
::
exists
(
filePath
+
".png"
))
mFileName
+=
QString
(
"-[%1]"
).
arg
(
++
imageCounter
);
else
imageCounter
=
0
;
mFileName
+=
".png"
;
}
if
(
!
destination
.
getFullVirtualPath
().
startsWith
(
picturesElement
.
getFullVirtualPath
(),
Qt
::
CaseInsensitive
)
)
{
...
...
@@ -861,7 +861,7 @@ void UBFeaturesController::addDownloadedFile(const QUrl &sourceUrl, const QByteA
QString
fileName
;
QString
filePath
;
//Audio item
if
(
dest
==
picturesElement
)
{
...
...
@@ -913,7 +913,7 @@ UBFeature UBFeaturesController::moveItemToFolder( const QUrl &url, const UBFeatu
UBFeature
dest
=
destination
;
if
(
destination
!=
trashElement
&&
if
(
destination
!=
trashElement
&&
!
destination
.
getFullVirtualPath
().
startsWith
(
possibleDest
.
getFullVirtualPath
(),
Qt
::
CaseInsensitive
)
)
{
dest
=
possibleDest
;
...
...
@@ -930,9 +930,9 @@ UBFeature UBFeaturesController::moveItemToFolder( const QUrl &url, const UBFeatu
}
QImage
thumb
=
getIcon
(
newFullPath
);
UBFeatureElementType
type
=
FEATURE_ITEM
;
if
(
UBFileSystemUtils
::
mimeTypeFromFileName
(
newFullPath
).
contains
(
"application"
)
)
if
(
UBFileSystemUtils
::
mimeTypeFromFileName
(
newFullPath
).
contains
(
"application"
)
)
type
=
FEATURE_INTERACTIVE
;
UBFeature
newElement
(
destVirtualPath
+
"/"
+
name
,
thumb
,
name
,
QUrl
::
fromLocalFile
(
newFullPath
),
type
);
return
newElement
;
...
...
@@ -1042,11 +1042,8 @@ void UBFeaturesController::moveExternalData(const QUrl &url, const UBFeature &de
UBFeature
dest
=
destination
;
if
(
destination
!=
trashElement
&&
destination
!=
UBFeature
()
/*&& !destination.getFullVirtualPath().startsWith( possibleDest.getFullVirtualPath(), Qt::CaseInsensitive )*/
)
{
if
(
destination
!=
trashElement
&&
destination
!=
UBFeature
())
dest
=
possibleDest
;
}
UBFeatureElementType
type
=
fileTypeFromUrl
(
sourcePath
);
...
...
This diff is collapsed.
Click to expand it.
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