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
da5378a6
Commit
da5378a6
authored
Jan 14, 2016
by
Craig Watson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code clean-up
Mostly, removal of old code that had been commented out instead of removed
parent
631b070e
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
6 additions
and
51 deletions
+6
-51
UBBoardController.cpp
src/board/UBBoardController.cpp
+0
-7
UBFeaturesController.cpp
src/board/UBFeaturesController.cpp
+0
-4
UB.h
src/core/UB.h
+0
-2
UBApplication.cpp
src/core/UBApplication.cpp
+2
-4
UBApplicationController.h
src/core/UBApplicationController.h
+0
-5
UBGraphicsMediaItem.cpp
src/domain/UBGraphicsMediaItem.cpp
+4
-4
UBPlatformUtils_mac.mm
src/frameworks/UBPlatformUtils_mac.mm
+0
-11
UBFloatingPalette.cpp
src/gui/UBFloatingPalette.cpp
+0
-1
UBMagnifer.cpp
src/gui/UBMagnifer.cpp
+0
-1
UBGraphicsTriangle.cpp
src/tools/UBGraphicsTriangle.cpp
+0
-4
UBGraphicsTriangle.h
src/tools/UBGraphicsTriangle.h
+0
-1
UBToolsManager.cpp
src/tools/UBToolsManager.cpp
+0
-7
No files found.
src/board/UBBoardController.cpp
View file @
da5378a6
...
...
@@ -27,10 +27,7 @@
#include "UBBoardController.h"
//#include <QtGui>
#include <QtWidgets>
//#include <QtWebKit>
#include <QtWebKitWidgets>
#include "frameworks/UBFileSystemUtils.h"
...
...
@@ -992,8 +989,6 @@ void UBBoardController::downloadURL(const QUrl& url, QString contentSourceUrl, c
if
(
isBackground
)
oldBackgroundObject
=
mActiveScene
->
backgroundObject
();
//if(sUrl.startsWith("uniboardTool://"))
//if(sUrl.startsWith("openboardTool://",Qt::CaseInsensitive))
if
(
sUrl
.
startsWith
(
"openboardtool://"
))
{
...
...
@@ -1094,7 +1089,6 @@ UBItem *UBBoardController::downloadFinished(bool pSuccess, QUrl sourceUrl, QUrl
mActiveScene
->
deselectAllItems
();
//if (!sourceUrl.toString().startsWith("file://") && !sourceUrl.toString().startsWith("uniboardTool://"))
if
(
!
sourceUrl
.
toString
().
startsWith
(
"file://"
)
&&
!
sourceUrl
.
toString
().
startsWith
(
"openboardtool://"
))
showMessage
(
tr
(
"Download finished"
));
...
...
@@ -1375,7 +1369,6 @@ UBItem *UBBoardController::downloadFinished(bool pSuccess, QUrl sourceUrl, QUrl
selectedDocument
()
->
setMetaData
(
UBSettings
::
documentUpdatedAt
,
UBStringUtils
::
toUtcIsoDateTime
(
QDateTime
::
currentDateTime
()));
}
}
//else if (UBMimeType::UniboardTool == itemMimeType)
else
if
(
UBMimeType
::
OpenboardTool
==
itemMimeType
)
{
qDebug
()
<<
"accepting mime type"
<<
mimeType
<<
"OpenBoard Tool"
;
...
...
src/board/UBFeaturesController.cpp
View file @
da5378a6
...
...
@@ -347,7 +347,6 @@ UBFeaturesController::UBFeaturesController(QWidget *pParentWidget) :
featuresModel
=
new
UBFeaturesModel
(
featuresList
,
this
);
//featuresModel->setSupportedDragActions(Qt::CopyAction | Qt::MoveAction);
//featuresModel->setSupportedDragActions(Qt::CopyAction | Qt::MoveAction);
featuresProxyModel
=
new
UBFeaturesProxyModel
(
this
);
featuresProxyModel
->
setFilterFixedString
(
rootPath
);
...
...
@@ -607,7 +606,6 @@ void UBFeaturesController::addToFavorite( const QUrl &path )
void
UBFeaturesController
::
removeFromFavorite
(
const
QUrl
&
path
,
bool
deleteManualy
)
{
// QString filePath = fileNameFromUrl( path );
if
(
favoriteSet
->
find
(
path
)
!=
favoriteSet
->
end
()
)
{
favoriteSet
->
erase
(
favoriteSet
->
find
(
path
)
);
...
...
@@ -622,7 +620,6 @@ void UBFeaturesController::removeFromFavorite( const QUrl &path, bool deleteManu
QString
UBFeaturesController
::
fileNameFromUrl
(
const
QUrl
&
url
)
{
QString
fileName
=
url
.
toString
();
//if ( fileName.contains( "uniboardTool://"))
if
(
fileName
.
contains
(
"OpenboardTool://"
))
return
fileName
;
return
url
.
toLocalFile
();
...
...
@@ -633,7 +630,6 @@ UBFeatureElementType UBFeaturesController::fileTypeFromUrl(const QString &path)
{
QFileInfo
fileInfo
(
path
);
//if ( path.contains("uniboardTool://"))
if
(
path
.
contains
(
"OpenboardTool://"
))
return
FEATURE_INTERNAL
;
...
...
src/core/UB.h
View file @
da5378a6
...
...
@@ -28,7 +28,6 @@
#ifndef UB_H_
#define UB_H_
//#include <QtGui>
#include <QtWidgets>
...
...
@@ -46,7 +45,6 @@ struct UBMimeType
Audio
,
Flash
,
PDF
,
//UniboardTool,
OpenboardTool
,
Group
,
UNKNOWN
...
...
src/core/UBApplication.cpp
View file @
da5378a6
...
...
@@ -183,20 +183,18 @@ UBApplication::~UBApplication()
QString
UBApplication
::
checkLanguageAvailabilityForSankore
(
QString
&
language
)
{
QStringList
availableTranslations
=
UBPlatformUtils
::
availableTranslations
();
//QStringList availableTranslations ;availableTranslations<< "OpenBoard_fr";
if
(
availableTranslations
.
contains
(
language
,
Qt
::
CaseInsensitive
))
return
language
;
else
{
if
(
language
.
length
()
>
2
){
QString
shortLanguageCode
=
language
.
left
(
2
);
//if(availableTranslations.contains(shortLanguageCode,Qt::CaseInsensitive))
foreach
(
const
QString
&
str
,
availableTranslations
)
{
if
(
str
.
contains
(
shortLanguageCode
))
return
shortLanguageCode
;
}
//if(availableTranslations.contains(shortLanguageCode))
//return shortLanguageCode;
}
}
return
QString
(
""
);
...
...
src/core/UBApplicationController.h
View file @
da5378a6
...
...
@@ -28,13 +28,10 @@
#ifndef UBAPPLICATIONCONTROLLER_H_
#define UBAPPLICATIONCONTROLLER_H_
//#include <QtGui>
#include <QtWidgets>
#include <QtNetwork>
//#include <QFtp>
//#include <QHttpResponseHeader>
#include <QNetworkAccessManager>
...
...
@@ -55,7 +52,6 @@ class UBSoftwareUpdate;
class
QNetworkAccessManager
;
class
QNetworkReply
;
class
QHttpPart
;
//class QHttp;
class
UBRightPalette
;
class
UBOpenSankoreImporter
;
class
QScriptValue
;
...
...
@@ -161,7 +157,6 @@ class UBApplicationController : public QObject
private
slots
:
void
updateRequestFinished
(
int
id
,
bool
error
);
//void updateHeaderReceived(QHttpResponseHeader header);
void
updateHeaderReceived
(
QNetworkRequest
header
);
protected
:
...
...
src/domain/UBGraphicsMediaItem.cpp
View file @
da5378a6
...
...
@@ -114,16 +114,16 @@ UBGraphicsMediaItem::UBGraphicsMediaItem(const QUrl& pMediaFileUrl, QGraphicsIte
Delegate
()
->
createControls
();
if
(
mediaType_Audio
==
mMediaType
)
Delegate
()
->
frame
()
->
setOperationMode
(
UBGraphicsDelegateFrame
::
ResizingHorizontally
);
else
else
{
Delegate
()
->
frame
()
->
setOperationMode
(
UBGraphicsDelegateFrame
::
Resizing
);
// Resize the widget as soon as the video's native size is known (it isn't at this stage)
connect
(
mVideoItem
,
SIGNAL
(
nativeSizeChanged
(
QSizeF
)),
this
,
SLOT
(
resize
(
QSizeF
)));
}
setData
(
UBGraphicsItemData
::
itemLayerType
,
QVariant
(
itemLayerType
::
ObjectItem
));
//Necessary to set if we want z value to be assigned correctly
connect
(
Delegate
(),
SIGNAL
(
showOnDisplayChanged
(
bool
)),
this
,
SLOT
(
showOnDisplayChanged
(
bool
)));
connect
(
mMediaObject
,
SIGNAL
(
videoAvailableChanged
(
bool
)),
this
,
SLOT
(
hasMediaChanged
(
bool
)));
// Resize the widget as soon as the video's native size is known (it isn't at this stage)
connect
(
mVideoItem
,
SIGNAL
(
nativeSizeChanged
(
QSizeF
)),
this
,
SLOT
(
resize
(
QSizeF
)));
}
...
...
src/frameworks/UBPlatformUtils_mac.mm
View file @
da5378a6
...
...
@@ -57,15 +57,6 @@ void UBPlatformUtils::init()
{
initializeKeyboardLayouts();
// qwidget_mac.mm qt_mac_set_fullscreen_mode uses kUIModeAllSuppressed which is unfortunate in our case
//
// http://developer.apple.com/mac/library/documentation/Carbon/Reference/Dock_Manager/Reference/reference.html#//apple_ref/c/func/SetSystemUIMode
//
//originalSetSystemUIMode = APEPatchCreate((const void *)SetSystemUIMode, (const void *)emptySetSystemUIMode);
//setDesktopMode(false);
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSString *currentPath = [[NSBundle mainBundle] pathForResource:@"Save PDF to OpenBoard" ofType:@"workflow"];
...
...
@@ -94,8 +85,6 @@ void UBPlatformUtils::init()
void UBPlatformUtils::setDesktopMode(bool desktop)
{
//qDebug() << "setDesktopMode called. desktop = " << desktop;
@try {
// temporarily disabled due to bug: when switching to desktop mode (and calling this),
// openboard switches right back to the board mode. clicking again on desktop mode works.
...
...
src/gui/UBFloatingPalette.cpp
View file @
da5378a6
...
...
@@ -60,7 +60,6 @@ UBFloatingPalette::UBFloatingPalette(Qt::Corner position, QWidget *parent)
#endif
#ifdef Q_OS_OSX
setAttribute
(
Qt
::
WA_MacAlwaysShowToolWindow
);
//setAttribute(Qt::WA_MacNonActivatingToolWindow); // no longer exists
setAttribute
(
Qt
::
WA_MacNoShadow
);
#endif
}
...
...
src/gui/UBMagnifer.cpp
View file @
da5378a6
...
...
@@ -85,7 +85,6 @@ UBMagnifier::UBMagnifier(QWidget *parent, bool isInteractive)
#endif
#ifdef Q_OS_OSX
setAttribute
(
Qt
::
WA_MacAlwaysShowToolWindow
);
//setAttribute(Qt::WA_MacNonActivatingToolWindow);
setAttribute
(
Qt
::
WA_MacNoShadow
);
#endif
}
...
...
src/tools/UBGraphicsTriangle.cpp
View file @
da5378a6
...
...
@@ -25,8 +25,6 @@
//#include <QGraphicsPolygonItem>
#include <QPolygonF>
#include <QtWidgets/QGraphicsPolygonItem>
...
...
@@ -143,7 +141,6 @@ void UBGraphicsTriangle::setOrientation(UBGraphicsTriangleOrientation orientatio
{
mOrientation
=
orientation
;
//calculatePoints(boundingRect());
calculatePoints
(
bounds_rect
);
QPolygonF
polygon
;
...
...
@@ -172,7 +169,6 @@ UBGraphicsScene* UBGraphicsTriangle::scene() const
void
UBGraphicsTriangle
::
calculatePoints
(
const
QRectF
&
r
)
{
//qDebug() << "UBGraphicsTriangle calculatePoints()"<<"r ="<<r<<"mOrientation ="<<mOrientation;
switch
(
mOrientation
)
{
...
...
src/tools/UBGraphicsTriangle.h
View file @
da5378a6
...
...
@@ -28,7 +28,6 @@
#ifndef UBGRAPHICSTRIANGLE_H_
#define UBGRAPHICSTRIANGLE_H_
//#include <QtGui>
#include <QtWidgets>
#include <QtSvg>
...
...
src/tools/UBToolsManager.cpp
View file @
da5378a6
...
...
@@ -49,7 +49,6 @@ void UBToolsManager::destroy()
UBToolsManager
::
UBToolsManager
(
QObject
*
parent
)
:
QObject
(
parent
)
{
//mask.id = "uniboardTool://uniboard.mnemis.com/mask";
mask
.
id
=
"openboardtool://openboard/mask"
;
mask
.
icon
=
QPixmap
(
":/images/toolPalette/maskTool.png"
);
...
...
@@ -58,7 +57,6 @@ UBToolsManager::UBToolsManager(QObject *parent)
mToolsIcon
.
insert
(
mask
.
id
,
":/images/toolPalette/maskTool.png"
);
mDescriptors
<<
mask
;
//ruler.id = "uniboardTool://uniboard.mnemis.com/ruler";
ruler
.
id
=
"openboardtool://ruler"
;
ruler
.
icon
=
QPixmap
(
":/images/toolPalette/rulerTool.png"
);
...
...
@@ -67,7 +65,6 @@ UBToolsManager::UBToolsManager(QObject *parent)
mToolsIcon
.
insert
(
ruler
.
id
,
":/images/toolPalette/rulerTool.png"
);
mDescriptors
<<
ruler
;
//compass.id = "uniboardTool://uniboard.mnemis.com/compass";
compass
.
id
=
"openboardtool://compass"
;
compass
.
icon
=
QPixmap
(
":/images/toolPalette/compassTool.png"
);
...
...
@@ -76,7 +73,6 @@ UBToolsManager::UBToolsManager(QObject *parent)
mToolsIcon
.
insert
(
compass
.
id
,
":/images/toolPalette/compassTool.png"
);
mDescriptors
<<
compass
;
//protractor.id = "uniboardTool://uniboard.mnemis.com/protractor";
protractor
.
id
=
"openboardtool://protractor"
;
protractor
.
icon
=
QPixmap
(
":/images/toolPalette/protractorTool.png"
);
...
...
@@ -85,7 +81,6 @@ UBToolsManager::UBToolsManager(QObject *parent)
mToolsIcon
.
insert
(
protractor
.
id
,
":/images/toolPalette/protractorTool.png"
);
mDescriptors
<<
protractor
;
//triangle.id = "uniboardTool://uniboard.mnemis.com/triangle";
triangle
.
id
=
"openboardtool://triangle"
;
triangle
.
icon
=
QPixmap
(
":/images/toolPalette/triangleTool.png"
);
...
...
@@ -94,7 +89,6 @@ UBToolsManager::UBToolsManager(QObject *parent)
mToolsIcon
.
insert
(
triangle
.
id
,
":/images/toolPalette/triangleTool.png"
);
mDescriptors
<<
triangle
;
//magnifier.id = "uniboardTool://uniboard.mnemis.com/magnifier";
magnifier
.
id
=
"openboardtool://magnifier"
;
magnifier
.
icon
=
QPixmap
(
":/images/toolPalette/magnifierTool.png"
);
...
...
@@ -103,7 +97,6 @@ UBToolsManager::UBToolsManager(QObject *parent)
mToolsIcon
.
insert
(
magnifier
.
id
,
":/images/toolPalette/magnifierTool.png"
);
mDescriptors
<<
magnifier
;
//cache.id = "uniboardTool://uniboard.mnemis.com/cache";
cache
.
id
=
"openboardtool://cache"
;
cache
.
icon
=
QPixmap
(
":/images/toolPalette/cacheTool.png"
);
...
...
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