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
4985371b
Commit
4985371b
authored
13 years ago
by
Ivan Ilin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:Sankore/Sankore-3.1
parents
1fc6a86b
f3146a02
Changes
32
Hide whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
72 additions
and
326 deletions
+72
-326
UBCFFSubsetAdaptor.cpp
src/adaptors/UBCFFSubsetAdaptor.cpp
+1
-4
UBExportAdaptor.cpp
src/adaptors/UBExportAdaptor.cpp
+0
-1
UBMetadataDcSubsetAdaptor.cpp
src/adaptors/UBMetadataDcSubsetAdaptor.cpp
+0
-2
UBDocumentPublisher.cpp
src/adaptors/publishing/UBDocumentPublisher.cpp
+0
-3
UBBoardController.cpp
src/board/UBBoardController.cpp
+1
-3
UBBoardPaletteManager.cpp
src/board/UBBoardPaletteManager.cpp
+1
-1
UBLibraryController.cpp
src/board/UBLibraryController.cpp
+3
-4
UBApplication.cpp
src/core/UBApplication.cpp
+1
-2
UBPersistenceManager.cpp
src/core/UBPersistenceManager.cpp
+1
-2
UBSettings.cpp
src/core/UBSettings.cpp
+13
-30
UBDesktopAnnotationController.cpp
src/desktop/UBDesktopAnnotationController.cpp
+1
-0
UBDocumentController.cpp
src/document/UBDocumentController.cpp
+0
-1
UBGraphicsScene.cpp
src/domain/UBGraphicsScene.cpp
+0
-13
UBDesktopServices.h
src/frameworks/UBDesktopServices.h
+0
-34
UBDesktopServices_linux.cpp
src/frameworks/UBDesktopServices_linux.cpp
+0
-21
UBDesktopServices_mac.cpp
src/frameworks/UBDesktopServices_mac.cpp
+0
-103
UBDesktopServices_win.cpp
src/frameworks/UBDesktopServices_win.cpp
+0
-23
UBFileSystemUtils.cpp
src/frameworks/UBFileSystemUtils.cpp
+3
-4
frameworks.pri
src/frameworks/frameworks.pri
+41
-46
UBActionPalette.cpp
src/gui/UBActionPalette.cpp
+0
-4
UBDocumentNavigator.cpp
src/gui/UBDocumentNavigator.cpp
+0
-7
UBMagnifer.cpp
src/gui/UBMagnifer.cpp
+0
-1
UBToolWidget.cpp
src/gui/UBToolWidget.cpp
+0
-1
UBNetworkAccessManager.cpp
src/network/UBNetworkAccessManager.cpp
+0
-2
UBPodcastController.cpp
src/podcast/UBPodcastController.cpp
+0
-1
UBQuickTimeVideoEncoder.cpp
src/podcast/quicktime/UBQuickTimeVideoEncoder.cpp
+0
-1
UBWindowsMediaVideoEncoder.cpp
src/podcast/windowsmedia/UBWindowsMediaVideoEncoder.cpp
+0
-1
UBSoftwareUpdateController.cpp
src/softwareupdate/UBSoftwareUpdateController.cpp
+0
-1
UBGraphicsCache.cpp
src/tools/UBGraphicsCache.cpp
+1
-2
UniboardSankoreTransition.cpp
src/transition/UniboardSankoreTransition.cpp
+3
-4
UBTrapFlashController.cpp
src/web/UBTrapFlashController.cpp
+1
-1
WBDownloadManager.cpp
src/web/browser/WBDownloadManager.cpp
+1
-3
No files found.
src/adaptors/UBCFFSubsetAdaptor.cpp
View file @
4985371b
...
@@ -729,10 +729,8 @@ bool UBCFFSubsetAdaptor::UBCFFSubsetReader::parseSvgFlash(const QDomElement &ele
...
@@ -729,10 +729,8 @@ bool UBCFFSubsetAdaptor::UBCFFSubsetReader::parseSvgFlash(const QDomElement &ele
QTransform
transform
;
QTransform
transform
;
QString
textTransform
=
element
.
attribute
(
aTransform
);
QString
textTransform
=
element
.
attribute
(
aTransform
);
bool
hastransform
=
false
;
if
(
!
textTransform
.
isNull
())
{
if
(
!
textTransform
.
isNull
())
{
transform
=
transformFromString
(
textTransform
);
transform
=
transformFromString
(
textTransform
);
hastransform
=
true
;
}
}
repositionSvgItem
(
flashItem
,
width
,
height
,
x
,
y
,
true
,
transform
);
repositionSvgItem
(
flashItem
,
width
,
height
,
x
,
y
,
true
,
transform
);
hashSceneItem
(
element
,
flashItem
);
hashSceneItem
(
element
,
flashItem
);
...
@@ -923,13 +921,12 @@ bool UBCFFSubsetAdaptor::UBCFFSubsetReader::parseIwbElement(QDomElement &element
...
@@ -923,13 +921,12 @@ bool UBCFFSubsetAdaptor::UBCFFSubsetReader::parseIwbElement(QDomElement &element
}
}
bool
locked
=
false
;
bool
locked
=
false
;
bool
isBackground
=
false
;
bool
isEditableItem
=
false
;
bool
isEditableItem
=
false
;
bool
isEditable
=
false
;
//Text items to convert to UBGraphicsTextItem only
bool
isEditable
=
false
;
//Text items to convert to UBGraphicsTextItem only
QString
IDRef
=
element
.
attribute
(
aRef
);
QString
IDRef
=
element
.
attribute
(
aRef
);
if
(
!
IDRef
.
isNull
())
{
if
(
!
IDRef
.
isNull
())
{
isBackground
=
element
.
hasAttribute
(
aBackground
)
?
strToBool
(
element
.
attribute
(
aBackground
))
:
false
;
element
.
hasAttribute
(
aBackground
)
?
strToBool
(
element
.
attribute
(
aBackground
))
:
false
;
locked
=
element
.
hasAttribute
(
aBackground
)
?
strToBool
(
element
.
attribute
(
aBackground
))
:
false
;
locked
=
element
.
hasAttribute
(
aBackground
)
?
strToBool
(
element
.
attribute
(
aBackground
))
:
false
;
isEditableItem
=
element
.
hasAttribute
(
aEditable
);
isEditableItem
=
element
.
hasAttribute
(
aEditable
);
if
(
isEditableItem
)
if
(
isEditableItem
)
...
...
This diff is collapsed.
Click to expand it.
src/adaptors/UBExportAdaptor.cpp
View file @
4985371b
...
@@ -17,7 +17,6 @@
...
@@ -17,7 +17,6 @@
#include "document/UBDocumentProxy.h"
#include "document/UBDocumentProxy.h"
#include "frameworks/UBDesktopServices.h"
#include "frameworks/UBFileSystemUtils.h"
#include "frameworks/UBFileSystemUtils.h"
#include "core/UBSettings.h"
#include "core/UBSettings.h"
...
...
This diff is collapsed.
Click to expand it.
src/adaptors/UBMetadataDcSubsetAdaptor.cpp
View file @
4985371b
...
@@ -90,8 +90,6 @@ void UBMetadataDcSubsetAdaptor::persist(UBDocumentProxy* proxy)
...
@@ -90,8 +90,6 @@ void UBMetadataDcSubsetAdaptor::persist(UBDocumentProxy* proxy)
xmlWriter
.
writeStartElement
(
"Description"
);
xmlWriter
.
writeStartElement
(
"Description"
);
xmlWriter
.
writeAttribute
(
"about"
,
proxy
->
metaData
(
UBSettings
::
documentIdentifer
).
toString
());
xmlWriter
.
writeAttribute
(
"about"
,
proxy
->
metaData
(
UBSettings
::
documentIdentifer
).
toString
());
QDate
today
=
QDate
::
currentDate
();
xmlWriter
.
writeTextElement
(
nsDc
,
"title"
,
proxy
->
metaData
(
UBSettings
::
documentName
).
toString
());
xmlWriter
.
writeTextElement
(
nsDc
,
"title"
,
proxy
->
metaData
(
UBSettings
::
documentName
).
toString
());
xmlWriter
.
writeTextElement
(
nsDc
,
"type"
,
proxy
->
metaData
(
UBSettings
::
documentGroupName
).
toString
());
xmlWriter
.
writeTextElement
(
nsDc
,
"type"
,
proxy
->
metaData
(
UBSettings
::
documentGroupName
).
toString
());
xmlWriter
.
writeTextElement
(
nsDc
,
"date"
,
QDate
::
currentDate
().
toString
(
"yyyy-MM-dd"
));
xmlWriter
.
writeTextElement
(
nsDc
,
"date"
,
QDate
::
currentDate
().
toString
(
"yyyy-MM-dd"
));
...
...
This diff is collapsed.
Click to expand it.
src/adaptors/publishing/UBDocumentPublisher.cpp
View file @
4985371b
...
@@ -240,8 +240,6 @@ void UBDocumentPublisher::upgradeDocumentForPublishing()
...
@@ -240,8 +240,6 @@ void UBDocumentPublisher::upgradeDocumentForPublishing()
{
{
UBGraphicsScene
*
scene
=
UBSvgSubsetAdaptor
::
loadScene
(
mPublishingDocument
,
pageIndex
);
UBGraphicsScene
*
scene
=
UBSvgSubsetAdaptor
::
loadScene
(
mPublishingDocument
,
pageIndex
);
bool
sceneHasWidget
=
false
;
QList
<
UBGraphicsW3CWidgetItem
*>
widgets
;
QList
<
UBGraphicsW3CWidgetItem
*>
widgets
;
foreach
(
QGraphicsItem
*
item
,
scene
->
items
()){
foreach
(
QGraphicsItem
*
item
,
scene
->
items
()){
...
@@ -249,7 +247,6 @@ void UBDocumentPublisher::upgradeDocumentForPublishing()
...
@@ -249,7 +247,6 @@ void UBDocumentPublisher::upgradeDocumentForPublishing()
if
(
widgetItem
){
if
(
widgetItem
){
generateWidgetPropertyScript
(
widgetItem
,
pageIndex
+
1
);
generateWidgetPropertyScript
(
widgetItem
,
pageIndex
+
1
);
sceneHasWidget
=
true
;
widgets
<<
widgetItem
;
widgets
<<
widgetItem
;
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
src/board/UBBoardController.cpp
View file @
4985371b
...
@@ -1184,7 +1184,6 @@ void UBBoardController::ClearUndoStack()
...
@@ -1184,7 +1184,6 @@ void UBBoardController::ClearUndoStack()
{
{
QSet
<
QGraphicsItem
*>
uniqueItems
;
QSet
<
QGraphicsItem
*>
uniqueItems
;
// go through all stack command
// go through all stack command
int
count
=
UBApplication
::
undoStack
->
count
();
for
(
int
i
=
0
;
i
<
UBApplication
::
undoStack
->
count
();
i
++
)
for
(
int
i
=
0
;
i
<
UBApplication
::
undoStack
->
count
();
i
++
)
{
{
...
@@ -1214,7 +1213,6 @@ void UBBoardController::ClearUndoStack()
...
@@ -1214,7 +1213,6 @@ void UBBoardController::ClearUndoStack()
// clear stack, and command list
// clear stack, and command list
UBApplication
::
undoStack
->
clear
();
UBApplication
::
undoStack
->
clear
();
count
=
UBApplication
::
undoStack
->
count
();
// go through all unique items, and check, ot on scene, or not.
// go through all unique items, and check, ot on scene, or not.
// if not on scene, than item can be deleted
// if not on scene, than item can be deleted
...
@@ -1226,7 +1224,7 @@ void UBBoardController::ClearUndoStack()
...
@@ -1226,7 +1224,7 @@ void UBBoardController::ClearUndoStack()
UBGraphicsScene
*
scene
=
(
UBGraphicsScene
*
)
item
->
scene
();
UBGraphicsScene
*
scene
=
(
UBGraphicsScene
*
)
item
->
scene
();
if
(
!
scene
)
if
(
!
scene
)
{
{
bool
retCode
=
mActiveScene
->
deleteItem
(
item
);
mActiveScene
->
deleteItem
(
item
);
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
src/board/UBBoardPaletteManager.cpp
View file @
4985371b
...
@@ -81,8 +81,8 @@ UBBoardPaletteManager::UBBoardPaletteManager(QWidget* container, UBBoardControll
...
@@ -81,8 +81,8 @@ UBBoardPaletteManager::UBBoardPaletteManager(QWidget* container, UBBoardControll
,
mpLibWidget
(
NULL
)
,
mpLibWidget
(
NULL
)
,
mpCachePropWidget
(
NULL
)
,
mpCachePropWidget
(
NULL
)
,
mpTeacherBarWidget
(
NULL
)
,
mpTeacherBarWidget
(
NULL
)
,
mpDesktopLibWidget
(
NULL
)
,
mpDownloadWidget
(
NULL
)
,
mpDownloadWidget
(
NULL
)
,
mpDesktopLibWidget
(
NULL
)
,
mDownloadInProgress
(
false
)
,
mDownloadInProgress
(
false
)
{
{
setupPalettes
();
setupPalettes
();
...
...
This diff is collapsed.
Click to expand it.
src/board/UBLibraryController.cpp
View file @
4985371b
...
@@ -16,7 +16,6 @@
...
@@ -16,7 +16,6 @@
#include "frameworks/UBFileSystemUtils.h"
#include "frameworks/UBFileSystemUtils.h"
#include "frameworks/UBPlatformUtils.h"
#include "frameworks/UBPlatformUtils.h"
#include "frameworks/UBDesktopServices.h"
#include "core/UBApplication.h"
#include "core/UBApplication.h"
#include "core/UBPersistenceManager.h"
#include "core/UBPersistenceManager.h"
...
@@ -54,13 +53,13 @@ UBLibraryController::UBLibraryController(QWidget *pParentWidget) :
...
@@ -54,13 +53,13 @@ UBLibraryController::UBLibraryController(QWidget *pParentWidget) :
{
{
readFavoriteList
();
readFavoriteList
();
mAudioStandardDirectoryPath
=
QUrl
::
fromLocalFile
(
UB
DesktopServices
::
storageLocation
(
QDesktopServices
::
MusicLocation
));
mAudioStandardDirectoryPath
=
QUrl
::
fromLocalFile
(
Q
DesktopServices
::
storageLocation
(
QDesktopServices
::
MusicLocation
));
userPath
(
mAudioStandardDirectoryPath
);
userPath
(
mAudioStandardDirectoryPath
);
mVideoStandardDirectoryPath
=
QUrl
::
fromLocalFile
(
UB
DesktopServices
::
storageLocation
(
QDesktopServices
::
MoviesLocation
));
mVideoStandardDirectoryPath
=
QUrl
::
fromLocalFile
(
Q
DesktopServices
::
storageLocation
(
QDesktopServices
::
MoviesLocation
));
userPath
(
mVideoStandardDirectoryPath
);
userPath
(
mVideoStandardDirectoryPath
);
mPicturesStandardDirectoryPath
=
QUrl
::
fromLocalFile
(
UB
DesktopServices
::
storageLocation
(
QDesktopServices
::
PicturesLocation
));
mPicturesStandardDirectoryPath
=
QUrl
::
fromLocalFile
(
Q
DesktopServices
::
storageLocation
(
QDesktopServices
::
PicturesLocation
));
userPath
(
mPicturesStandardDirectoryPath
);
userPath
(
mPicturesStandardDirectoryPath
);
mInteractiveUserDirectoryPath
=
QUrl
::
fromLocalFile
(
UBSettings
::
settings
()
->
uniboardInteractiveUserDirectory
());
mInteractiveUserDirectoryPath
=
QUrl
::
fromLocalFile
(
UBSettings
::
settings
()
->
uniboardInteractiveUserDirectory
());
...
...
This diff is collapsed.
Click to expand it.
src/core/UBApplication.cpp
View file @
4985371b
...
@@ -109,7 +109,7 @@ UBApplication::UBApplication(const QString &id, int &argc, char **argv) : QtSing
...
@@ -109,7 +109,7 @@ UBApplication::UBApplication(const QString &id, int &argc, char **argv) : QtSing
setOrganizationName
(
"Sankore"
);
setOrganizationName
(
"Sankore"
);
setOrganizationDomain
(
"sankore.org"
);
setOrganizationDomain
(
"sankore.org"
);
setApplicationName
(
"
Sankore 3.1
"
);
setApplicationName
(
"
Open-Sankore
"
);
setApplicationVersion
(
UBVERSION
);
setApplicationVersion
(
UBVERSION
);
...
@@ -222,7 +222,6 @@ int UBApplication::exec(const QString& pFileToImport)
...
@@ -222,7 +222,6 @@ int UBApplication::exec(const QString& pFileToImport)
QWebSettings
*
gs
=
QWebSettings
::
globalSettings
();
QWebSettings
*
gs
=
QWebSettings
::
globalSettings
();
gs
->
setAttribute
(
QWebSettings
::
JavaEnabled
,
true
);
gs
->
setAttribute
(
QWebSettings
::
JavaEnabled
,
true
);
gs
->
setAttribute
(
QWebSettings
::
PluginsEnabled
,
true
);
gs
->
setAttribute
(
QWebSettings
::
PluginsEnabled
,
true
);
gs
->
setAttribute
(
QWebSettings
::
JavaEnabled
,
true
);
gs
->
setAttribute
(
QWebSettings
::
LocalStorageDatabaseEnabled
,
true
);
gs
->
setAttribute
(
QWebSettings
::
LocalStorageDatabaseEnabled
,
true
);
gs
->
setAttribute
(
QWebSettings
::
OfflineWebApplicationCacheEnabled
,
true
);
gs
->
setAttribute
(
QWebSettings
::
OfflineWebApplicationCacheEnabled
,
true
);
gs
->
setAttribute
(
QWebSettings
::
OfflineStorageDatabaseEnabled
,
true
);
gs
->
setAttribute
(
QWebSettings
::
OfflineStorageDatabaseEnabled
,
true
);
...
...
This diff is collapsed.
Click to expand it.
src/core/UBPersistenceManager.cpp
View file @
4985371b
...
@@ -20,7 +20,6 @@
...
@@ -20,7 +20,6 @@
#include "frameworks/UBPlatformUtils.h"
#include "frameworks/UBPlatformUtils.h"
#include "frameworks/UBFileSystemUtils.h"
#include "frameworks/UBFileSystemUtils.h"
#include "frameworks/UBDesktopServices.h"
#include "core/UBApplication.h"
#include "core/UBApplication.h"
#include "core/UBSettings.h"
#include "core/UBSettings.h"
...
@@ -171,7 +170,7 @@ QStringList UBPersistenceManager::allGips()
...
@@ -171,7 +170,7 @@ QStringList UBPersistenceManager::allGips()
QStringList
UBPersistenceManager
::
allSounds
()
QStringList
UBPersistenceManager
::
allSounds
()
{
{
QString
soundLibraryPath
=
UB
DesktopServices
::
storageLocation
(
QDesktopServices
::
MusicLocation
);
QString
soundLibraryPath
=
Q
DesktopServices
::
storageLocation
(
QDesktopServices
::
MusicLocation
);
QDir
dir
(
soundLibraryPath
);
QDir
dir
(
soundLibraryPath
);
...
...
This diff is collapsed.
Click to expand it.
src/core/UBSettings.cpp
View file @
4985371b
...
@@ -13,7 +13,6 @@
...
@@ -13,7 +13,6 @@
#include "frameworks/UBPlatformUtils.h"
#include "frameworks/UBPlatformUtils.h"
#include "frameworks/UBFileSystemUtils.h"
#include "frameworks/UBFileSystemUtils.h"
#include "frameworks/UBDesktopServices.h"
#include "frameworks/UBCryptoUtils.h"
#include "frameworks/UBCryptoUtils.h"
#include "UB.h"
#include "UB.h"
...
@@ -294,15 +293,15 @@ void UBSettings::init()
...
@@ -294,15 +293,15 @@ void UBSettings::init()
mirroringRefreshRateInFps
=
new
UBSetting
(
this
,
"Mirroring"
,
"RefreshRateInFramePerSecond"
,
QVariant
(
defaultRefreshRateInFramePerSecond
));
mirroringRefreshRateInFps
=
new
UBSetting
(
this
,
"Mirroring"
,
"RefreshRateInFramePerSecond"
,
QVariant
(
defaultRefreshRateInFramePerSecond
));
lastImportFilePath
=
new
UBSetting
(
this
,
"Import"
,
"LastImportFilePath"
,
QVariant
(
UB
DesktopServices
::
storageLocation
(
QDesktopServices
::
DocumentsLocation
)));
lastImportFilePath
=
new
UBSetting
(
this
,
"Import"
,
"LastImportFilePath"
,
QVariant
(
Q
DesktopServices
::
storageLocation
(
QDesktopServices
::
DocumentsLocation
)));
lastImportFolderPath
=
new
UBSetting
(
this
,
"Import"
,
"LastImportFolderPath"
,
QVariant
(
UB
DesktopServices
::
storageLocation
(
QDesktopServices
::
DocumentsLocation
)));
lastImportFolderPath
=
new
UBSetting
(
this
,
"Import"
,
"LastImportFolderPath"
,
QVariant
(
Q
DesktopServices
::
storageLocation
(
QDesktopServices
::
DocumentsLocation
)));
lastExportFilePath
=
new
UBSetting
(
this
,
"Export"
,
"LastExportFilePath"
,
QVariant
(
UB
DesktopServices
::
storageLocation
(
QDesktopServices
::
DocumentsLocation
)));
lastExportFilePath
=
new
UBSetting
(
this
,
"Export"
,
"LastExportFilePath"
,
QVariant
(
Q
DesktopServices
::
storageLocation
(
QDesktopServices
::
DocumentsLocation
)));
lastExportDirPath
=
new
UBSetting
(
this
,
"Export"
,
"LastExportDirPath"
,
QVariant
(
UB
DesktopServices
::
storageLocation
(
QDesktopServices
::
DocumentsLocation
)));
lastExportDirPath
=
new
UBSetting
(
this
,
"Export"
,
"LastExportDirPath"
,
QVariant
(
Q
DesktopServices
::
storageLocation
(
QDesktopServices
::
DocumentsLocation
)));
lastImportToLibraryPath
=
new
UBSetting
(
this
,
"Library"
,
"LastImportToLibraryPath"
,
QVariant
(
UB
DesktopServices
::
storageLocation
(
QDesktopServices
::
DocumentsLocation
)));
lastImportToLibraryPath
=
new
UBSetting
(
this
,
"Library"
,
"LastImportToLibraryPath"
,
QVariant
(
Q
DesktopServices
::
storageLocation
(
QDesktopServices
::
DocumentsLocation
)));
lastPicturePath
=
new
UBSetting
(
this
,
"Library"
,
"LastPicturePath"
,
QVariant
(
UB
DesktopServices
::
storageLocation
(
QDesktopServices
::
PicturesLocation
)));
lastPicturePath
=
new
UBSetting
(
this
,
"Library"
,
"LastPicturePath"
,
QVariant
(
Q
DesktopServices
::
storageLocation
(
QDesktopServices
::
PicturesLocation
)));
lastWidgetPath
=
new
UBSetting
(
this
,
"Library"
,
"LastWidgetPath"
,
QVariant
(
UB
DesktopServices
::
storageLocation
(
QDesktopServices
::
DocumentsLocation
)));
lastWidgetPath
=
new
UBSetting
(
this
,
"Library"
,
"LastWidgetPath"
,
QVariant
(
Q
DesktopServices
::
storageLocation
(
QDesktopServices
::
DocumentsLocation
)));
lastVideoPath
=
new
UBSetting
(
this
,
"Library"
,
"LastVideoPath"
,
QVariant
(
UB
DesktopServices
::
storageLocation
(
QDesktopServices
::
MoviesLocation
)));
lastVideoPath
=
new
UBSetting
(
this
,
"Library"
,
"LastVideoPath"
,
QVariant
(
Q
DesktopServices
::
storageLocation
(
QDesktopServices
::
MoviesLocation
)));
defaultDocumentGroupName
=
tr
(
"Untitled Documents"
);
defaultDocumentGroupName
=
tr
(
"Untitled Documents"
);
documentTrashGroupName
=
tr
(
"Trash"
);
documentTrashGroupName
=
tr
(
"Trash"
);
...
@@ -761,8 +760,8 @@ QString UBSettings::uniboardDataDirectory()
...
@@ -761,8 +760,8 @@ QString UBSettings::uniboardDataDirectory()
// ", defaulting to " + UBDesktopServices::storageLocation(QDesktopServices::DataLocation);
// ", defaulting to " + UBDesktopServices::storageLocation(QDesktopServices::DataLocation);
}
}
}
}
QString
qtDataPath
=
UBFileSystemUtils
::
normalizeFilePath
(
UB
DesktopServices
::
storageLocation
(
QDesktopServices
::
DataLocation
));
QString
qtDataPath
=
UBFileSystemUtils
::
normalizeFilePath
(
Q
DesktopServices
::
storageLocation
(
QDesktopServices
::
DataLocation
));
qtDataPath
.
replace
(
"/Sankore"
,
""
);
qtDataPath
.
replace
(
"/
Open-
Sankore"
,
""
);
return
qtDataPath
;
return
qtDataPath
;
}
}
...
@@ -770,7 +769,7 @@ QString UBSettings::uniboardDataDirectory()
...
@@ -770,7 +769,7 @@ QString UBSettings::uniboardDataDirectory()
QString
UBSettings
::
uniboardUserImageDirectory
()
QString
UBSettings
::
uniboardUserImageDirectory
()
{
{
QString
valideUserImageDirectory
=
QString
valideUserImageDirectory
=
UB
DesktopServices
::
storageLocation
(
QDesktopServices
::
PicturesLocation
)
Q
DesktopServices
::
storageLocation
(
QDesktopServices
::
PicturesLocation
)
+
"/"
+
QCoreApplication
::
applicationName
();
+
"/"
+
QCoreApplication
::
applicationName
();
bool
hasCreatedDir
=
false
;
bool
hasCreatedDir
=
false
;
...
@@ -852,9 +851,7 @@ QString UBSettings::defaultUserImagesDirectory()
...
@@ -852,9 +851,7 @@ QString UBSettings::defaultUserImagesDirectory()
QString
UBSettings
::
uniboardUserVideoDirectory
()
QString
UBSettings
::
uniboardUserVideoDirectory
()
{
{
QString
valideUserVideoDirectory
=
QString
valideUserVideoDirectory
=
UBDesktopServices
::
storageLocation
(
QDesktopServices
::
MoviesLocation
);
QDesktopServices
::
storageLocation
(
QDesktopServices
::
MoviesLocation
);
bool
hasCreatedDir
=
false
;
// first look into the application settings
// first look into the application settings
if
(
sAppSettings
&&
getAppSettings
()
->
contains
(
"App/UserVideoDirectory"
))
if
(
sAppSettings
&&
getAppSettings
()
->
contains
(
"App/UserVideoDirectory"
))
...
@@ -889,7 +886,6 @@ QString UBSettings::uniboardUserVideoDirectory()
...
@@ -889,7 +886,6 @@ QString UBSettings::uniboardUserVideoDirectory()
if
(
!
dir
.
exists
())
if
(
!
dir
.
exists
())
{
{
dir
.
mkpath
(
userVideoDirectory
);
dir
.
mkpath
(
userVideoDirectory
);
hasCreatedDir
=
true
;
}
}
if
(
dir
.
exists
())
if
(
dir
.
exists
())
...
@@ -898,7 +894,6 @@ QString UBSettings::uniboardUserVideoDirectory()
...
@@ -898,7 +894,6 @@ QString UBSettings::uniboardUserVideoDirectory()
}
}
else
else
{
{
hasCreatedDir
=
false
;
qWarning
()
<<
"Failed to interpret App/UserVideoDirectory config : "
qWarning
()
<<
"Failed to interpret App/UserVideoDirectory config : "
+
getAppSettings
()
->
value
(
"App/UserVideoDirectory"
).
toString
()
+
getAppSettings
()
->
value
(
"App/UserVideoDirectory"
).
toString
()
+
", defaulting to "
+
valideUserVideoDirectory
;
+
", defaulting to "
+
valideUserVideoDirectory
;
...
@@ -927,9 +922,7 @@ QString UBSettings::uniboardUserVideoDirectory()
...
@@ -927,9 +922,7 @@ QString UBSettings::uniboardUserVideoDirectory()
QString
UBSettings
::
podcastRecordingDirectory
()
QString
UBSettings
::
podcastRecordingDirectory
()
{
{
QString
validePodcastRecordingDirectory
=
QString
validePodcastRecordingDirectory
=
UBDesktopServices
::
storageLocation
(
QDesktopServices
::
DesktopLocation
);
QDesktopServices
::
storageLocation
(
QDesktopServices
::
DesktopLocation
);
bool
hasCreatedDir
=
false
;
// first look into the application settings
// first look into the application settings
if
(
sAppSettings
&&
getAppSettings
()
->
contains
(
"Podcast/RecordingDirectory"
))
if
(
sAppSettings
&&
getAppSettings
()
->
contains
(
"Podcast/RecordingDirectory"
))
...
@@ -964,7 +957,6 @@ QString UBSettings::podcastRecordingDirectory()
...
@@ -964,7 +957,6 @@ QString UBSettings::podcastRecordingDirectory()
if
(
!
dir
.
exists
())
if
(
!
dir
.
exists
())
{
{
dir
.
mkpath
(
userPodcastRecordingDirectory
);
dir
.
mkpath
(
userPodcastRecordingDirectory
);
hasCreatedDir
=
true
;
}
}
if
(
dir
.
exists
())
if
(
dir
.
exists
())
...
@@ -973,7 +965,6 @@ QString UBSettings::podcastRecordingDirectory()
...
@@ -973,7 +965,6 @@ QString UBSettings::podcastRecordingDirectory()
}
}
else
else
{
{
hasCreatedDir
=
false
;
qWarning
()
<<
"Failed to interpret Podcast/RecordingDirectory config : "
qWarning
()
<<
"Failed to interpret Podcast/RecordingDirectory config : "
+
getAppSettings
()
->
value
(
"Podcast/RecordingDirectory"
).
toString
()
+
getAppSettings
()
->
value
(
"Podcast/RecordingDirectory"
).
toString
()
+
", defaulting to user Desktop"
;
+
", defaulting to user Desktop"
;
...
@@ -1099,8 +1090,6 @@ QString UBSettings::uniboardInteractiveUserDirectory()
...
@@ -1099,8 +1090,6 @@ QString UBSettings::uniboardInteractiveUserDirectory()
{
{
QString
valideUserInteractiveDirectory
=
uniboardDataDirectory
()
+
"/interactive content"
;
QString
valideUserInteractiveDirectory
=
uniboardDataDirectory
()
+
"/interactive content"
;
bool
hasCreatedDir
=
false
;
// first look into the application settings
// first look into the application settings
if
(
sAppSettings
&&
getAppSettings
()
->
contains
(
"App/UserInteractiveContentDirectory"
))
if
(
sAppSettings
&&
getAppSettings
()
->
contains
(
"App/UserInteractiveContentDirectory"
))
{
{
...
@@ -1129,7 +1118,6 @@ QString UBSettings::uniboardInteractiveUserDirectory()
...
@@ -1129,7 +1118,6 @@ QString UBSettings::uniboardInteractiveUserDirectory()
if
(
!
dir
.
exists
())
if
(
!
dir
.
exists
())
{
{
dir
.
mkpath
(
userWidgetDirectory
);
dir
.
mkpath
(
userWidgetDirectory
);
hasCreatedDir
=
true
;
}
}
if
(
dir
.
exists
())
if
(
dir
.
exists
())
...
@@ -1138,7 +1126,6 @@ QString UBSettings::uniboardInteractiveUserDirectory()
...
@@ -1138,7 +1126,6 @@ QString UBSettings::uniboardInteractiveUserDirectory()
}
}
else
else
{
{
hasCreatedDir
=
false
;
qWarning
()
<<
"Failed to interpret App/UserInteractiveContentDirectory config : "
qWarning
()
<<
"Failed to interpret App/UserInteractiveContentDirectory config : "
+
getAppSettings
()
->
value
(
"App/UserInteractiveContentDirectory"
).
toString
()
+
getAppSettings
()
->
value
(
"App/UserInteractiveContentDirectory"
).
toString
()
+
", defaulting to "
+
valideUserInteractiveDirectory
;
+
", defaulting to "
+
valideUserInteractiveDirectory
;
...
@@ -1194,8 +1181,6 @@ QString UBSettings::uniboardInteractiveFavoritesDirectory()
...
@@ -1194,8 +1181,6 @@ QString UBSettings::uniboardInteractiveFavoritesDirectory()
{
{
QString
valideUserInteractiveDirectory
=
uniboardDataDirectory
()
+
"/interactive favorites"
;
QString
valideUserInteractiveDirectory
=
uniboardDataDirectory
()
+
"/interactive favorites"
;
bool
hasCreatedDir
=
false
;
// first look into the application settings
// first look into the application settings
if
(
sAppSettings
&&
getAppSettings
()
->
contains
(
"App/UserInteractiveFavoritesDirectory"
))
if
(
sAppSettings
&&
getAppSettings
()
->
contains
(
"App/UserInteractiveFavoritesDirectory"
))
{
{
...
@@ -1224,7 +1209,6 @@ QString UBSettings::uniboardInteractiveFavoritesDirectory()
...
@@ -1224,7 +1209,6 @@ QString UBSettings::uniboardInteractiveFavoritesDirectory()
if
(
!
dir
.
exists
())
if
(
!
dir
.
exists
())
{
{
dir
.
mkpath
(
userWidgetDirectory
);
dir
.
mkpath
(
userWidgetDirectory
);
hasCreatedDir
=
true
;
}
}
if
(
dir
.
exists
())
if
(
dir
.
exists
())
...
@@ -1233,7 +1217,6 @@ QString UBSettings::uniboardInteractiveFavoritesDirectory()
...
@@ -1233,7 +1217,6 @@ QString UBSettings::uniboardInteractiveFavoritesDirectory()
}
}
else
else
{
{
hasCreatedDir
=
false
;
qWarning
()
<<
"Failed to interpret App/UserInteractiveFavoritesDirectory config : "
qWarning
()
<<
"Failed to interpret App/UserInteractiveFavoritesDirectory config : "
+
getAppSettings
()
->
value
(
"App/UserInteractiveFavoritesDirectory"
).
toString
()
+
getAppSettings
()
->
value
(
"App/UserInteractiveFavoritesDirectory"
).
toString
()
+
", defaulting to "
+
valideUserInteractiveDirectory
;
+
", defaulting to "
+
valideUserInteractiveDirectory
;
...
...
This diff is collapsed.
Click to expand it.
src/desktop/UBDesktopAnnotationController.cpp
View file @
4985371b
...
@@ -372,6 +372,7 @@ void UBDesktopAnnotationController::close()
...
@@ -372,6 +372,7 @@ void UBDesktopAnnotationController::close()
void
UBDesktopAnnotationController
::
stylusToolChanged
(
int
tool
)
void
UBDesktopAnnotationController
::
stylusToolChanged
(
int
tool
)
{
{
Q_UNUSED
(
tool
);
// UBStylusTool::Enum eTool = (UBStylusTool::Enum)tool;
// UBStylusTool::Enum eTool = (UBStylusTool::Enum)tool;
// if(eTool != UBStylusTool::Selector && eTool != UBStylusTool::Text)
// if(eTool != UBStylusTool::Selector && eTool != UBStylusTool::Text)
// {
// {
...
...
This diff is collapsed.
Click to expand it.
src/document/UBDocumentController.cpp
View file @
4985371b
...
@@ -19,7 +19,6 @@
...
@@ -19,7 +19,6 @@
#include "frameworks/UBFileSystemUtils.h"
#include "frameworks/UBFileSystemUtils.h"
#include "frameworks/UBStringUtils.h"
#include "frameworks/UBStringUtils.h"
#include "frameworks/UBDesktopServices.h"
#include "frameworks/UBPlatformUtils.h"
#include "frameworks/UBPlatformUtils.h"
#include "core/UBApplication.h"
#include "core/UBApplication.h"
...
...
This diff is collapsed.
Click to expand it.
src/domain/UBGraphicsScene.cpp
View file @
4985371b
...
@@ -1632,8 +1632,6 @@ void UBGraphicsScene::addMagnifier(UBMagnifierParams params)
...
@@ -1632,8 +1632,6 @@ void UBGraphicsScene::addMagnifier(UBMagnifierParams params)
QGraphicsView
*
cView
=
(
QGraphicsView
*
)
UBApplication
::
boardController
->
controlView
();
QGraphicsView
*
cView
=
(
QGraphicsView
*
)
UBApplication
::
boardController
->
controlView
();
QGraphicsView
*
dView
=
(
QGraphicsView
*
)
UBApplication
::
boardController
->
displayView
();
QGraphicsView
*
dView
=
(
QGraphicsView
*
)
UBApplication
::
boardController
->
displayView
();
QPoint
ccZeroPoint
=
cContainer
->
mapToGlobal
(
QPoint
(
0
,
0
));
QPoint
cvZeroPoint
=
cView
->
mapToGlobal
(
QPoint
(
0
,
0
));
QPoint
dvZeroPoint
=
dView
->
mapToGlobal
(
QPoint
(
0
,
0
));
QPoint
dvZeroPoint
=
dView
->
mapToGlobal
(
QPoint
(
0
,
0
));
int
cvW
=
cView
->
width
();
int
cvW
=
cView
->
width
();
...
@@ -1681,8 +1679,6 @@ void UBGraphicsScene::moveMagnifier(QPoint newPos)
...
@@ -1681,8 +1679,6 @@ void UBGraphicsScene::moveMagnifier(QPoint newPos)
QGraphicsView
*
cView
=
(
QGraphicsView
*
)
UBApplication
::
boardController
->
controlView
();
QGraphicsView
*
cView
=
(
QGraphicsView
*
)
UBApplication
::
boardController
->
controlView
();
QGraphicsView
*
dView
=
(
QGraphicsView
*
)
UBApplication
::
boardController
->
displayView
();
QGraphicsView
*
dView
=
(
QGraphicsView
*
)
UBApplication
::
boardController
->
displayView
();
QPoint
ccZeroPoint
=
cContainer
->
mapToGlobal
(
QPoint
(
0
,
0
));
QPoint
cvZeroPoint
=
cView
->
mapToGlobal
(
QPoint
(
0
,
0
));
QPoint
dvZeroPoint
=
dView
->
mapToGlobal
(
QPoint
(
0
,
0
));
QPoint
dvZeroPoint
=
dView
->
mapToGlobal
(
QPoint
(
0
,
0
));
int
cvW
=
cView
->
width
();
int
cvW
=
cView
->
width
();
...
@@ -1759,16 +1755,7 @@ void UBGraphicsScene::addCache()
...
@@ -1759,16 +1755,7 @@ void UBGraphicsScene::addCache()
{
{
UBGraphicsCache
*
cache
=
new
UBGraphicsCache
();
UBGraphicsCache
*
cache
=
new
UBGraphicsCache
();
mTools
<<
cache
;
mTools
<<
cache
;
QGraphicsView
*
view
;
if
(
UBApplication
::
applicationController
->
displayManager
()
->
hasDisplay
())
{
view
=
(
QGraphicsView
*
)(
UBApplication
::
boardController
->
displayView
());
}
else
{
view
=
(
QGraphicsView
*
)(
UBApplication
::
boardController
->
controlView
());
}
addItem
(
cache
);
addItem
(
cache
);
cache
->
setVisible
(
true
);
cache
->
setVisible
(
true
);
cache
->
setSelected
(
true
);
cache
->
setSelected
(
true
);
...
...
This diff is collapsed.
Click to expand it.
src/frameworks/UBDesktopServices.h
deleted
100644 → 0
View file @
1fc6a86b
/*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef UBDESKTOPSERVICES_H_
#define UBDESKTOPSERVICES_H_
#include <QtCore/qglobal.h>
#include <QDesktopServices>
#include "core/memcheck.h"
// TODO Qt 4.6 #error Delete this UBDesktopServices class,
// it was used to work around a bug in Qt 4.4 that was fixed in Qt 4.5 and another that should be fixed
// in 4.5.1
class
UBDesktopServices
:
public
QDesktopServices
{
public
:
static
QString
storageLocation
(
StandardLocation
type
);
};
#endif
/* UBDESKTOPSERVICES_H_ */
This diff is collapsed.
Click to expand it.
src/frameworks/UBDesktopServices_linux.cpp
deleted
100644 → 0
View file @
1fc6a86b
/*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "UBDesktopServices.h"
QString
UBDesktopServices
::
storageLocation
(
StandardLocation
type
)
{
return
QDesktopServices
::
storageLocation
(
type
);
}
This diff is collapsed.
Click to expand it.
src/frameworks/UBDesktopServices_mac.cpp
deleted
100644 → 0
View file @
1fc6a86b
/*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "UBDesktopServices.h"
#include <QtCore>
#import <Carbon/Carbon.h>
/*
Translates a QDesktopServices::StandardLocation into the mac equivalent.
*/
OSType
translateLocation
(
QDesktopServices
::
StandardLocation
type
)
{
switch
(
type
)
{
case
QDesktopServices
:
:
DesktopLocation
:
return
kDesktopFolderType
;
break
;
case
QDesktopServices
:
:
DocumentsLocation
:
return
kDocumentsFolderType
;
break
;
case
QDesktopServices
:
:
FontsLocation
:
// There are at least two different font directories on the mac: /Library/Fonts and ~/Library/Fonts.
// To select a specific one we have to specify a different first parameter when calling FSFindFolder.
return
kFontsFolderType
;
break
;
case
QDesktopServices
:
:
ApplicationsLocation
:
return
kApplicationsFolderType
;
break
;
case
QDesktopServices
:
:
MusicLocation
:
return
kMusicDocumentsFolderType
;
break
;
case
QDesktopServices
:
:
MoviesLocation
:
return
kMovieDocumentsFolderType
;
break
;
case
QDesktopServices
:
:
PicturesLocation
:
return
kPictureDocumentsFolderType
;
break
;
case
QDesktopServices
:
:
TempLocation
:
return
kTemporaryFolderType
;
break
;
case
QDesktopServices
:
:
DataLocation
:
return
kApplicationSupportFolderType
;
break
;
case
QDesktopServices
:
:
CacheLocation
:
return
kCachedDataFolderType
;
break
;
default:
return
kDesktopFolderType
;
break
;
}
}
/*
Constructs a full unicode path from a FSRef.
*/
static
QString
getFullPath
(
const
FSRef
&
ref
)
{
QByteArray
ba
(
2048
,
0
);
if
(
FSRefMakePath
(
&
ref
,
reinterpret_cast
<
UInt8
*>
(
ba
.
data
()),
ba
.
size
())
==
noErr
)
return
QString
::
fromUtf8
(
ba
).
normalized
(
QString
::
NormalizationForm_C
);
return
QString
();
}
// Mac OS X implementation of QDesktopServices is bugged in Qt 4.4,
// we use the implementation inspired from Qt 4.5 snapshot
QString
UBDesktopServices
::
storageLocation
(
StandardLocation
type
)
{
if
(
QDesktopServices
::
HomeLocation
==
type
)
return
QDir
::
homePath
();
else
if
(
QDesktopServices
::
TempLocation
==
type
)
return
QDir
::
tempPath
();
short
domain
=
kOnAppropriateDisk
;
if
(
QDesktopServices
::
DataLocation
==
type
||
QDesktopServices
::
CacheLocation
==
type
)
domain
=
kUserDomain
;
// http://developer.apple.com/documentation/Carbon/Reference/Folder_Manager/Reference/reference.html
FSRef
ref
;
OSErr
err
=
FSFindFolder
(
domain
,
translateLocation
(
type
),
false
,
&
ref
);
if
(
err
)
return
QString
();
QString
path
=
getFullPath
(
ref
);
if
(
QDesktopServices
::
DataLocation
==
type
||
QDesktopServices
::
CacheLocation
==
type
)
path
+=
"/Sankore/Sankore"
;
return
path
;
}
This diff is collapsed.
Click to expand it.
src/frameworks/UBDesktopServices_win.cpp
deleted
100644 → 0
View file @
1fc6a86b
/*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "UBDesktopServices.h"
#include "core/memcheck.h"
QString
UBDesktopServices
::
storageLocation
(
StandardLocation
type
)
{
// Windows implementation of QDesktopServices is fine
return
QDesktopServices
::
storageLocation
(
type
);
}
This diff is collapsed.
Click to expand it.
src/frameworks/UBFileSystemUtils.cpp
View file @
4985371b
...
@@ -14,7 +14,6 @@
...
@@ -14,7 +14,6 @@
*/
*/
#include "UBFileSystemUtils.h"
#include "UBFileSystemUtils.h"
#include "UBDesktopServices.h"
#include <QtGui>
#include <QtGui>
...
@@ -57,12 +56,12 @@ bool UBFileSystemUtils::isAZipFile(QString &filePath)
...
@@ -57,12 +56,12 @@ bool UBFileSystemUtils::isAZipFile(QString &filePath)
QString
UBFileSystemUtils
::
defaultTempDirPath
()
QString
UBFileSystemUtils
::
defaultTempDirPath
()
{
{
return
UB
DesktopServices
::
storageLocation
(
QDesktopServices
::
TempLocation
)
+
"/"
+
defaultTempDirName
();
return
Q
DesktopServices
::
storageLocation
(
QDesktopServices
::
TempLocation
)
+
"/"
+
defaultTempDirName
();
}
}
QString
UBFileSystemUtils
::
createTempDir
(
const
QString
&
templateString
,
bool
autoDeleteOnExit
)
QString
UBFileSystemUtils
::
createTempDir
(
const
QString
&
templateString
,
bool
autoDeleteOnExit
)
{
{
QString
appTempDir
=
UB
DesktopServices
::
storageLocation
(
QDesktopServices
::
TempLocation
)
QString
appTempDir
=
Q
DesktopServices
::
storageLocation
(
QDesktopServices
::
TempLocation
)
+
"/"
+
templateString
;
+
"/"
+
templateString
;
int
index
=
0
;
int
index
=
0
;
...
@@ -127,7 +126,7 @@ void UBFileSystemUtils::deleteAllTempDirCreatedDuringSession()
...
@@ -127,7 +126,7 @@ void UBFileSystemUtils::deleteAllTempDirCreatedDuringSession()
void
UBFileSystemUtils
::
cleanupGhostTempFolders
(
const
QString
&
templateString
)
void
UBFileSystemUtils
::
cleanupGhostTempFolders
(
const
QString
&
templateString
)
{
{
QDir
dir
(
UB
DesktopServices
::
storageLocation
(
QDesktopServices
::
TempLocation
));
QDir
dir
(
Q
DesktopServices
::
storageLocation
(
QDesktopServices
::
TempLocation
));
foreach
(
QFileInfo
dirContent
,
dir
.
entryInfoList
(
QDir
::
Dirs
foreach
(
QFileInfo
dirContent
,
dir
.
entryInfoList
(
QDir
::
Dirs
|
QDir
::
NoDotAndDotDot
|
QDir
::
Hidden
,
QDir
::
Name
))
|
QDir
::
NoDotAndDotDot
|
QDir
::
Hidden
,
QDir
::
Name
))
{
{
...
...
This diff is collapsed.
Click to expand it.
src/frameworks/frameworks.pri
View file @
4985371b
HEADERS += src/frameworks/UBGeometryUtils.h \
HEADERS += src/frameworks/UBGeometryUtils.h \
src/frameworks/UBDesktopServices.h \
src/frameworks/UBPlatformUtils.h \
src/frameworks/UBPlatformUtils.h \
src/frameworks/UBFileSystemUtils.h \
src/frameworks/UBFileSystemUtils.h \
src/frameworks/UBStringUtils.h \
src/frameworks/UBStringUtils.h \
src/frameworks/UBVersion.h \
src/frameworks/UBVersion.h \
src/frameworks/UBCoreGraphicsScene.h \
src/frameworks/UBCoreGraphicsScene.h \
src/frameworks/UBCryptoUtils.h \
src/frameworks/UBCryptoUtils.h \
src/frameworks/UBBase32.h
src/frameworks/UBBase32.h
SOURCES += src/frameworks/UBGeometryUtils.cpp \
SOURCES += src/frameworks/UBGeometryUtils.cpp \
src/frameworks/UBPlatformUtils.cpp \
src/frameworks/UBPlatformUtils.cpp \
src/frameworks/UBFileSystemUtils.cpp \
src/frameworks/UBFileSystemUtils.cpp \
src/frameworks/UBStringUtils.cpp \
src/frameworks/UBStringUtils.cpp \
src/frameworks/UBVersion.cpp \
src/frameworks/UBVersion.cpp \
src/frameworks/UBCoreGraphicsScene.cpp \
src/frameworks/UBCoreGraphicsScene.cpp \
src/frameworks/UBCryptoUtils.cpp \
src/frameworks/UBCryptoUtils.cpp \
src/frameworks/UBBase32.cpp
src/frameworks/UBBase32.cpp
win32 {
win32 {
SOURCES += src/frameworks/UBPlatformUtils_win.cpp
SOURCES += src/frameworks/UBPlatformUtils_win.cpp \
}
src/frameworks/UBDesktopServices_win.cpp
}
macx {
macx {
SOURCES += src/frameworks/UBPlatformUtils_mac.mm
SOURCES += src/frameworks/UBPlatformUtils_mac.mm \
}
src/frameworks/UBDesktopServices_mac.cpp
}
linux-g++ {
SOURCES += src/frameworks/UBPlatformUtils_linux.cpp
linux-g++ {
}
linux-g++-32 {
SOURCES += src/frameworks/UBPlatformUtils_linux.cpp \
src/frameworks/UBDesktopServices_linux.cpp
SOURCES += src/frameworks/UBPlatformUtils_linux.cpp
}
}
linux-g++-32 {
SOURCES += src/frameworks/UBPlatformUtils_linux.cpp \
src/frameworks/UBDesktopServices_linux.cpp
}
This diff is collapsed.
Click to expand it.
src/gui/UBActionPalette.cpp
View file @
4985371b
...
@@ -306,9 +306,5 @@ UBActionPaletteButton* UBActionPalette::getButtonFromAction(QAction *action)
...
@@ -306,9 +306,5 @@ UBActionPaletteButton* UBActionPalette::getButtonFromAction(QAction *action)
bool
UBActionPaletteButton
::
hitButton
(
const
QPoint
&
pos
)
const
bool
UBActionPaletteButton
::
hitButton
(
const
QPoint
&
pos
)
const
{
{
Q_UNUSED
(
pos
);
Q_UNUSED
(
pos
);
// if(isChecked())
// {
// return false;
// }
return
true
;
return
true
;
}
}
This diff is collapsed.
Click to expand it.
src/gui/UBDocumentNavigator.cpp
View file @
4985371b
...
@@ -105,7 +105,6 @@ void UBDocumentNavigator::generateThumbnails()
...
@@ -105,7 +105,6 @@ void UBDocumentNavigator::generateThumbnails()
// Get the thumbnails
// Get the thumbnails
QList
<
QPixmap
>
thumbs
=
UBThumbnailAdaptor
::
load
(
mCrntDoc
);
QList
<
QPixmap
>
thumbs
=
UBThumbnailAdaptor
::
load
(
mCrntDoc
);
QGraphicsPixmapItem
*
selection
=
NULL
;
for
(
int
i
=
0
;
i
<
thumbs
.
count
();
i
++
)
for
(
int
i
=
0
;
i
<
thumbs
.
count
();
i
++
)
{
{
...
@@ -115,7 +114,6 @@ void UBDocumentNavigator::generateThumbnails()
...
@@ -115,7 +114,6 @@ void UBDocumentNavigator::generateThumbnails()
// Get the selected item
// Get the selected item
if
(
UBApplication
::
boardController
->
activeSceneIndex
()
==
i
)
if
(
UBApplication
::
boardController
->
activeSceneIndex
()
==
i
)
{
{
selection
=
pixmapItem
;
mCrntItem
=
dynamic_cast
<
UBSceneThumbnailNavigPixmap
*>
(
pixmapItem
);
mCrntItem
=
dynamic_cast
<
UBSceneThumbnailNavigPixmap
*>
(
pixmapItem
);
mCrntItem
->
setSelected
(
true
);
mCrntItem
->
setSelected
(
true
);
}
}
...
@@ -290,11 +288,6 @@ void UBDocumentNavigator::refreshScene()
...
@@ -290,11 +288,6 @@ void UBDocumentNavigator::refreshScene()
mLabels
.
at
(
i
)
->
setPos
(
pos
);
mLabels
.
at
(
i
)
->
setPos
(
pos
);
}
}
}
}
QScrollBar
*
vertScrollBar
=
verticalScrollBar
();
int
scrollBarThickness
=
0
;
if
(
vertScrollBar
&&
vertScrollBar
->
isVisible
())
scrollBarThickness
=
vertScrollBar
->
width
();
}
}
/**
/**
...
...
This diff is collapsed.
Click to expand it.
src/gui/UBMagnifer.cpp
View file @
4985371b
...
@@ -204,7 +204,6 @@ void UBMagnifier::mouseMoveEvent ( QMouseEvent * event )
...
@@ -204,7 +204,6 @@ void UBMagnifier::mouseMoveEvent ( QMouseEvent * event )
{
{
if
(
mShouldMoveWidget
&&
(
event
->
buttons
()
&
Qt
::
LeftButton
))
if
(
mShouldMoveWidget
&&
(
event
->
buttons
()
&
Qt
::
LeftButton
))
{
{
QPoint
offset
=
event
->
pos
()
-
mMousePressPos
;
move
(
pos
()
-
mMousePressPos
+
event
->
pos
());
move
(
pos
()
-
mMousePressPos
+
event
->
pos
());
event
->
accept
();
event
->
accept
();
...
...
This diff is collapsed.
Click to expand it.
src/gui/UBToolWidget.cpp
View file @
4985371b
...
@@ -183,7 +183,6 @@ void UBToolWidget::mouseMoveEvent ( QMouseEvent * event )
...
@@ -183,7 +183,6 @@ void UBToolWidget::mouseMoveEvent ( QMouseEvent * event )
{
{
if
(
mShouldMoveWidget
&&
(
event
->
buttons
()
&
Qt
::
LeftButton
))
if
(
mShouldMoveWidget
&&
(
event
->
buttons
()
&
Qt
::
LeftButton
))
{
{
QPoint
offset
=
event
->
pos
()
-
mMousePressPos
;
move
(
pos
()
-
mMousePressPos
+
event
->
pos
());
move
(
pos
()
-
mMousePressPos
+
event
->
pos
());
event
->
accept
();
event
->
accept
();
}
}
...
...
This diff is collapsed.
Click to expand it.
src/network/UBNetworkAccessManager.cpp
View file @
4985371b
...
@@ -17,8 +17,6 @@
...
@@ -17,8 +17,6 @@
#include <QtGui>
#include <QtGui>
#include <QtNetwork>
#include <QtNetwork>
#include "frameworks/UBDesktopServices.h"
#include "core/UBApplication.h"
#include "core/UBApplication.h"
#include "core/UBApplicationController.h"
#include "core/UBApplicationController.h"
#include "core/UBSettings.h"
#include "core/UBSettings.h"
...
...
This diff is collapsed.
Click to expand it.
src/podcast/UBPodcastController.cpp
View file @
4985371b
...
@@ -15,7 +15,6 @@
...
@@ -15,7 +15,6 @@
#include "UBPodcastController.h"
#include "UBPodcastController.h"
#include "frameworks/UBDesktopServices.h"
#include "frameworks/UBFileSystemUtils.h"
#include "frameworks/UBFileSystemUtils.h"
#include "frameworks/UBStringUtils.h"
#include "frameworks/UBStringUtils.h"
#include "frameworks/UBPlatformUtils.h"
#include "frameworks/UBPlatformUtils.h"
...
...
This diff is collapsed.
Click to expand it.
src/podcast/quicktime/UBQuickTimeVideoEncoder.cpp
View file @
4985371b
...
@@ -19,7 +19,6 @@
...
@@ -19,7 +19,6 @@
#include <QtGui>
#include <QtGui>
#include "frameworks/UBDesktopServices.h"
#include "frameworks/UBFileSystemUtils.h"
#include "frameworks/UBFileSystemUtils.h"
#include "core/UBApplication.h"
#include "core/UBApplication.h"
...
...
This diff is collapsed.
Click to expand it.
src/podcast/windowsmedia/UBWindowsMediaVideoEncoder.cpp
View file @
4985371b
...
@@ -17,7 +17,6 @@
...
@@ -17,7 +17,6 @@
#include <QtGui>
#include <QtGui>
#include "frameworks/UBDesktopServices.h"
#include "frameworks/UBFileSystemUtils.h"
#include "frameworks/UBFileSystemUtils.h"
#include "core/UBApplication.h"
#include "core/UBApplication.h"
...
...
This diff is collapsed.
Click to expand it.
src/softwareupdate/UBSoftwareUpdateController.cpp
View file @
4985371b
...
@@ -14,7 +14,6 @@
...
@@ -14,7 +14,6 @@
*/
*/
//#include "frameworks/UBVersion.h"
//#include "frameworks/UBVersion.h"
//#include "frameworks/UBDesktopServices.h"
//#include "frameworks/UBFileSystemUtils.h"
//#include "frameworks/UBFileSystemUtils.h"
//#include "frameworks/UBPlatformUtils.h"
//#include "frameworks/UBPlatformUtils.h"
...
...
This diff is collapsed.
Click to expand it.
src/tools/UBGraphicsCache.cpp
View file @
4985371b
...
@@ -89,10 +89,9 @@ void UBGraphicsCache::init()
...
@@ -89,10 +89,9 @@ void UBGraphicsCache::init()
void
UBGraphicsCache
::
paint
(
QPainter
*
painter
,
const
QStyleOptionGraphicsItem
*
option
,
QWidget
*
widget
)
void
UBGraphicsCache
::
paint
(
QPainter
*
painter
,
const
QStyleOptionGraphicsItem
*
option
,
QWidget
*
widget
)
{
{
//
Q_UNUSED(option);
Q_UNUSED
(
option
);
Q_UNUSED
(
widget
);
Q_UNUSED
(
widget
);
// setZValue(CACHE_ZVALUE);
UBGraphicsItem
::
assignZValue
(
this
,
CACHE_ZVALUE
);
UBGraphicsItem
::
assignZValue
(
this
,
CACHE_ZVALUE
);
painter
->
setBrush
(
mMaskColor
);
painter
->
setBrush
(
mMaskColor
);
...
...
This diff is collapsed.
Click to expand it.
src/transition/UniboardSankoreTransition.cpp
View file @
4985371b
...
@@ -15,7 +15,6 @@
...
@@ -15,7 +15,6 @@
#include "UniboardSankoreTransition.h"
#include "UniboardSankoreTransition.h"
#include "core/UBSettings.h"
#include "core/UBSettings.h"
#include "frameworks/UBDesktopServices.h"
#include "frameworks/UBFileSystemUtils.h"
#include "frameworks/UBFileSystemUtils.h"
#include "core/UBApplication.h"
#include "core/UBApplication.h"
#include "core/UBPersistenceManager.h"
#include "core/UBPersistenceManager.h"
...
@@ -28,9 +27,9 @@ UniboardSankoreTransition::UniboardSankoreTransition(QObject *parent) :
...
@@ -28,9 +27,9 @@ UniboardSankoreTransition::UniboardSankoreTransition(QObject *parent) :
,
mTransitionDlg
(
NULL
)
,
mTransitionDlg
(
NULL
)
,
mThread
(
NULL
)
,
mThread
(
NULL
)
{
{
mOldSankoreDirectory
=
UBFileSystemUtils
::
normalizeFilePath
(
UB
DesktopServices
::
storageLocation
(
QDesktopServices
::
DataLocation
));
mOldSankoreDirectory
=
UBFileSystemUtils
::
normalizeFilePath
(
Q
DesktopServices
::
storageLocation
(
QDesktopServices
::
DataLocation
));
mUniboardSourceDirectory
=
UBFileSystemUtils
::
normalizeFilePath
(
UB
DesktopServices
::
storageLocation
(
QDesktopServices
::
DataLocation
));
mUniboardSourceDirectory
=
UBFileSystemUtils
::
normalizeFilePath
(
Q
DesktopServices
::
storageLocation
(
QDesktopServices
::
DataLocation
));
#if defined(Q_WS_MACX)
#if defined(Q_WS_MACX)
mOldSankoreDirectory
.
replace
(
"Sankore/Sankore 3.1"
,
"Sankore"
);
mOldSankoreDirectory
.
replace
(
"Sankore/Sankore 3.1"
,
"Sankore"
);
mUniboardSourceDirectory
.
replace
(
"Sankore/Sankore 3.1"
,
"Uniboard"
);
mUniboardSourceDirectory
.
replace
(
"Sankore/Sankore 3.1"
,
"Uniboard"
);
...
@@ -86,7 +85,7 @@ void UniboardSankoreTransition::documentTransition()
...
@@ -86,7 +85,7 @@ void UniboardSankoreTransition::documentTransition()
QFileInfoList
fileInfoList
=
UBFileSystemUtils
::
allElementsInDirectory
(
uniboardDocumentDirectory
);
QFileInfoList
fileInfoList
=
UBFileSystemUtils
::
allElementsInDirectory
(
uniboardDocumentDirectory
);
fileInfoList
<<
UBFileSystemUtils
::
allElementsInDirectory
(
mOldSankoreDirectory
+
"/document"
);
fileInfoList
<<
UBFileSystemUtils
::
allElementsInDirectory
(
mOldSankoreDirectory
+
"/document"
);
QString
backupDirectoryPath
=
UBFileSystemUtils
::
normalizeFilePath
(
UB
DesktopServices
::
storageLocation
(
QDesktopServices
::
DesktopLocation
));
QString
backupDirectoryPath
=
UBFileSystemUtils
::
normalizeFilePath
(
Q
DesktopServices
::
storageLocation
(
QDesktopServices
::
DesktopLocation
));
if
(
fileInfoList
.
count
()
!=
0
){
if
(
fileInfoList
.
count
()
!=
0
){
mTransitionDlg
=
new
UBUpdateDlg
(
NULL
,
fileInfoList
.
count
(),
backupDirectoryPath
);
mTransitionDlg
=
new
UBUpdateDlg
(
NULL
,
fileInfoList
.
count
(),
backupDirectoryPath
);
...
...
This diff is collapsed.
Click to expand it.
src/web/UBTrapFlashController.cpp
View file @
4985371b
...
@@ -116,7 +116,7 @@ void UBTrapFlashController::text_Changed(const QString &newText)
...
@@ -116,7 +116,7 @@ void UBTrapFlashController::text_Changed(const QString &newText)
void
UBTrapFlashController
::
text_Edited
(
const
QString
&
newText
)
void
UBTrapFlashController
::
text_Edited
(
const
QString
&
newText
)
{
{
Q_UNUSED
(
newText
);
}
}
void
UBTrapFlashController
::
hideTrapFlash
()
void
UBTrapFlashController
::
hideTrapFlash
()
...
...
This diff is collapsed.
Click to expand it.
src/web/browser/WBDownloadManager.cpp
View file @
4985371b
...
@@ -58,8 +58,6 @@
...
@@ -58,8 +58,6 @@
#include <QtGui>
#include <QtGui>
#include <QtWebKit>
#include <QtWebKit>
#include "frameworks/UBDesktopServices.h"
#include "network/UBAutoSaver.h"
#include "network/UBAutoSaver.h"
#include "network/UBNetworkAccessManager.h"
#include "network/UBNetworkAccessManager.h"
#include "frameworks/UBFileSystemUtils.h"
#include "frameworks/UBFileSystemUtils.h"
...
@@ -134,7 +132,7 @@ void WBDownloadItem::getFileName()
...
@@ -134,7 +132,7 @@ void WBDownloadItem::getFileName()
{
{
QSettings
settings
;
QSettings
settings
;
settings
.
beginGroup
(
QLatin1String
(
"downloadmanager"
));
settings
.
beginGroup
(
QLatin1String
(
"downloadmanager"
));
QString
defaultLocation
=
!
mCustomDownloadPath
.
isEmpty
()
?
mCustomDownloadPath
:
UB
DesktopServices
::
storageLocation
(
QDesktopServices
::
DesktopLocation
);
QString
defaultLocation
=
!
mCustomDownloadPath
.
isEmpty
()
?
mCustomDownloadPath
:
Q
DesktopServices
::
storageLocation
(
QDesktopServices
::
DesktopLocation
);
QString
downloadDirectory
=
settings
.
value
(
QLatin1String
(
"downloadDirectory"
),
defaultLocation
).
toString
();
QString
downloadDirectory
=
settings
.
value
(
QLatin1String
(
"downloadDirectory"
),
defaultLocation
).
toString
();
if
(
!
downloadDirectory
.
isEmpty
())
if
(
!
downloadDirectory
.
isEmpty
())
downloadDirectory
+=
QLatin1Char
(
'/'
);
downloadDirectory
+=
QLatin1Char
(
'/'
);
...
...
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