Merge remote-tracking branch 'origin/dev-qt5.1x_mac' into dev-qt5.1x

preferencesAboutTextFull
Clément Fauconnier 4 years ago
commit d324fc742a
  1. 18
      OpenBoard.pro
  2. 1
      src/api/UBLibraryAPI.h
  3. 1
      src/api/UBW3CWidgetAPI.cpp
  4. 1
      src/board/UBBoardController.cpp
  5. 1
      src/board/UBBoardPaletteManager.h
  6. 4
      src/core/UB.h
  7. 1
      src/core/UBApplication.cpp
  8. 31
      src/desktop/UBDesktopAnnotationController.cpp
  9. 4
      src/desktop/UBDesktopPalette.cpp
  10. 3
      src/domain/UBGraphicsScene.cpp
  11. 1
      src/domain/UBGraphicsWidgetItem.h
  12. 8
      src/frameworks/UBPlatformUtils_mac.mm
  13. 1
      src/gui/UBFeaturesWidget.h
  14. 1
      src/gui/UBMainWindow.h
  15. 3
      src/network/UBCookieJar.cpp
  16. 1
      src/pdf/XPDFRenderer.h
  17. 1
      src/web/UBWebController.cpp
  18. 1
      src/web/UBWebController.h
  19. 3
      src/web/UBWebKitUtils.h
  20. 2
      src/web/browser/WBBrowserWindow.cpp
  21. 1
      src/web/browser/WBBrowserWindow.h
  22. 2
      src/web/browser/WBDownloadManager.cpp
  23. 2
      src/web/browser/WBHistory.cpp
  24. 2
      src/web/browser/WBHistory.h
  25. 2
      src/web/browser/WBTabWidget.h
  26. 1
      src/web/browser/WBToolBarSearch.cpp
  27. 2
      src/web/browser/WBWebTrapWebView.cpp
  28. 2
      src/web/browser/WBWebTrapWebView.h
  29. 1
      src/web/browser/WBWebView.cpp
  30. 1
      src/web/browser/WBWebView.h

@ -161,6 +161,8 @@ win32 {
} }
macx { macx {
DEFINES += Q_WS_MACX
LIBS += -framework Foundation LIBS += -framework Foundation
LIBS += -framework Cocoa LIBS += -framework Cocoa
LIBS += -framework Carbon LIBS += -framework Carbon
@ -169,11 +171,23 @@ macx {
LIBS += -lcrypto LIBS += -lcrypto
LIBS += -L/usr/local/opt/openssl/lib LIBS += -L/usr/local/opt/openssl/lib
LIBS += -L/usr/local/opt/quazip/lib -lquazip
# quazip depends on QT. Current is 5.14, so if you wish to build
# OB using a previous QT version, you have to build your own quazip,
# otherwise it won't link.
equals(QT_MAJOR_VERSION, 5):lessThan(QT_MINOR_VERSION, 14) {
LIBS += "-L../OpenBoard-ThirdParty/quazip/lib/macx" "-lquazip"
} else {
LIBS += -L/usr/local/opt/quazip/lib -lquazip
}
LIBS += -L/usr/local/opt/ffmpeg/lib LIBS += -L/usr/local/opt/ffmpeg/lib
INCLUDEPATH += /usr/local/opt/openssl/include INCLUDEPATH += /usr/local/opt/openssl/include
INCLUDEPATH += /usr/local/opt/ffmpeg/include INCLUDEPATH += /usr/local/opt/ffmpeg/include
INCLUDEPATH += /usr/local/opt/quazip/include/quazip equals(QT_MAJOR_VERSION, 5):lessThan(QT_MINOR_VERSION, 14) {
INCLUDEPATH += ../OpenBoard-ThirdParty/quazip/quazip-0.7.1
} else {
INCLUDEPATH += /usr/local/opt/quazip/include/quazip
}
LIBS += -L/usr/local/opt/poppler/lib -lpoppler LIBS += -L/usr/local/opt/poppler/lib -lpoppler
INCLUDEPATH += /usr/local/opt/poppler/include INCLUDEPATH += /usr/local/opt/poppler/include

@ -31,7 +31,6 @@
#define UBLIBRARYAPI_H_ #define UBLIBRARYAPI_H_
#include <QtGui> #include <QtGui>
#include <QtWebKit>
#include <QWebView> #include <QWebView>
class UBLibraryAPI : public QObject class UBLibraryAPI : public QObject

@ -30,7 +30,6 @@
#include "UBW3CWidgetAPI.h" #include "UBW3CWidgetAPI.h"
#include <QtGui> #include <QtGui>
#include <QtWebKit>
#include "core/UBApplication.h" #include "core/UBApplication.h"
#include "core/UBApplicationController.h" #include "core/UBApplicationController.h"

@ -30,7 +30,6 @@
#include "UBBoardController.h" #include "UBBoardController.h"
#include <QtWidgets> #include <QtWidgets>
#include <QtWebKitWidgets>
#include "frameworks/UBFileSystemUtils.h" #include "frameworks/UBFileSystemUtils.h"
#include "frameworks/UBPlatformUtils.h" #include "frameworks/UBPlatformUtils.h"

@ -31,7 +31,6 @@
#define UBBOARDPALETTEMANAGER_H_ #define UBBOARDPALETTEMANAGER_H_
#include <QtGui> #include <QtGui>
#include <QtWebKit>
#include "gui/UBLeftPalette.h" #include "gui/UBLeftPalette.h"
#include "gui/UBRightPalette.h" #include "gui/UBRightPalette.h"

@ -35,6 +35,10 @@
#define UB_MAX_ZOOM 9 #define UB_MAX_ZOOM 9
#if defined(Q_OS_LINUX) || (defined(Q_OS_OSX) && (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)))
#define UB_REQUIRES_MASK_UPDATE 1
#endif
struct UBMimeType struct UBMimeType
{ {
enum Enum enum Enum

@ -30,7 +30,6 @@
#include "UBApplication.h" #include "UBApplication.h"
#include <QtGui> #include <QtGui>
#include <QtWebKit>
#include <QtXml> #include <QtXml>
#include <QFontDatabase> #include <QFontDatabase>
#include <QStyleFactory> #include <QStyleFactory>

@ -84,18 +84,9 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent, UB
mTransparentDrawingView->setAttribute(Qt::WA_TranslucentBackground, true); mTransparentDrawingView->setAttribute(Qt::WA_TranslucentBackground, true);
#ifdef Q_OS_OSX #ifdef Q_OS_OSX
mTransparentDrawingView->setAttribute(Qt::WA_MacNoShadow, true); mTransparentDrawingView->setAttribute(Qt::WA_MacNoShadow, true);
/* https://bugreports.qt.io/browse/QTBUG-81456 */ #endif //Q_OS_OSX
if (QOperatingSystemVersion::current().minorVersion() > 12) /* > Sierra */
{
mTransparentDrawingView->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnBottomHint | Qt::Window | Qt::NoDropShadowWindowHint | Qt::X11BypassWindowManagerHint);
}
else
{
mTransparentDrawingView->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | Qt::Window | Qt::NoDropShadowWindowHint | Qt::X11BypassWindowManagerHint);
}
#else
mTransparentDrawingView->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | Qt::Window | Qt::NoDropShadowWindowHint | Qt::X11BypassWindowManagerHint); mTransparentDrawingView->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | Qt::Window | Qt::NoDropShadowWindowHint | Qt::X11BypassWindowManagerHint);
#endif
mTransparentDrawingView->setCacheMode(QGraphicsView::CacheNone); mTransparentDrawingView->setCacheMode(QGraphicsView::CacheNone);
mTransparentDrawingView->resize(UBApplication::desktop()->width(), UBApplication::desktop()->height()); mTransparentDrawingView->resize(UBApplication::desktop()->width(), UBApplication::desktop()->height());
@ -121,7 +112,7 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent, UB
connect( UBApplication::boardController->paletteManager()->mKeyboardPalette, SIGNAL(keyboardActivated(bool)), connect( UBApplication::boardController->paletteManager()->mKeyboardPalette, SIGNAL(keyboardActivated(bool)),
mTransparentDrawingView, SLOT(virtualKeyboardActivated(bool))); mTransparentDrawingView, SLOT(virtualKeyboardActivated(bool)));
#ifdef Q_OS_LINUX #ifdef UB_REQUIRES_MASK_UPDATE
connect(UBApplication::boardController->paletteManager()->mKeyboardPalette, SIGNAL(moved(QPoint)), this, SLOT(refreshMask())); connect(UBApplication::boardController->paletteManager()->mKeyboardPalette, SIGNAL(moved(QPoint)), this, SLOT(refreshMask()));
connect(UBApplication::mainWindow->actionVirtualKeyboard, SIGNAL(triggered(bool)), this, SLOT(refreshMask())); connect(UBApplication::mainWindow->actionVirtualKeyboard, SIGNAL(triggered(bool)), this, SLOT(refreshMask()));
connect(mDesktopPalette,SIGNAL(refreshMask()), this, SLOT(refreshMask())); connect(mDesktopPalette,SIGNAL(refreshMask()), this, SLOT(refreshMask()));
@ -176,7 +167,7 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent, UB
connect(&mHoldTimerMarker, SIGNAL(timeout()), this, SLOT(markerActionReleased())); connect(&mHoldTimerMarker, SIGNAL(timeout()), this, SLOT(markerActionReleased()));
connect(&mHoldTimerEraser, SIGNAL(timeout()), this, SLOT(eraserActionReleased())); connect(&mHoldTimerEraser, SIGNAL(timeout()), this, SLOT(eraserActionReleased()));
#ifdef Q_OS_LINUX #ifdef UB_REQUIRES_MASK_UPDATE
connect(mDesktopPalette, SIGNAL(moving()), this, SLOT(refreshMask())); connect(mDesktopPalette, SIGNAL(moving()), this, SLOT(refreshMask()));
connect(UBApplication::boardController->paletteManager()->rightPalette(), SIGNAL(resized()), this, SLOT(refreshMask())); connect(UBApplication::boardController->paletteManager()->rightPalette(), SIGNAL(resized()), this, SLOT(refreshMask()));
connect(UBApplication::boardController->paletteManager()->addItemPalette(), SIGNAL(closed()), this, SLOT(refreshMask())); connect(UBApplication::boardController->paletteManager()->addItemPalette(), SIGNAL(closed()), this, SLOT(refreshMask()));
@ -356,9 +347,9 @@ void UBDesktopAnnotationController::showWindow()
mDesktopPalette->appear(); mDesktopPalette->appear();
#ifdef Q_OS_LINUX #ifdef UB_REQUIRES_MASK_UPDATE
updateMask(true); updateMask(true);
#endif #endif // UB_REQUIRES_MASK_UPDATE
} }
@ -401,9 +392,9 @@ void UBDesktopAnnotationController::updateBackground()
|| UBDrawingController::drawingController()->stylusTool() == UBStylusTool::Selector) || UBDrawingController::drawingController()->stylusTool() == UBStylusTool::Selector)
{ {
newBrush = QBrush(Qt::transparent); newBrush = QBrush(Qt::transparent);
#ifdef Q_OS_LINUX #ifdef UB_REQUIRES_MASK_UPDATE
updateMask(true); updateMask(true);
#endif #endif //UB_REQUIRES_MASK_UPDATE
} }
else else
{ {
@ -412,9 +403,9 @@ void UBDesktopAnnotationController::updateBackground()
#else #else
newBrush = QBrush(QColor(127, 127, 127, 1)); newBrush = QBrush(QColor(127, 127, 127, 1));
#endif #endif
#ifdef Q_OS_LINUX #ifdef UB_REQUIRES_MASK_UPDATE
updateMask(false); updateMask(false);
#endif #endif //UB_REQUIRES_MASK_UPDATE
} }
if (mTransparentDrawingScene && mTransparentDrawingScene->backgroundBrush() != newBrush) if (mTransparentDrawingScene && mTransparentDrawingScene->backgroundBrush() != newBrush)
@ -920,7 +911,6 @@ void UBDesktopAnnotationController::updateMask(bool bTransparent)
p.drawRect(tabsPalette); p.drawRect(tabsPalette);
} }
#ifdef Q_OS_LINUX
//Rquiered only for compiz wm //Rquiered only for compiz wm
//TODO. Window manager detection screen //TODO. Window manager detection screen
@ -928,7 +918,6 @@ void UBDesktopAnnotationController::updateMask(bool bTransparent)
p.drawRect(UBApplication::boardController->paletteManager()->addItemPalette()->geometry()); p.drawRect(UBApplication::boardController->paletteManager()->addItemPalette()->geometry());
} }
#endif
p.end(); p.end();

@ -173,7 +173,7 @@ void UBDesktopPalette::minimizeMe(eMinimizedLocation location)
adjustSizeAndPosition(); adjustSizeAndPosition();
#ifdef Q_OS_LINUX #ifdef UB_REQUIRES_MASK_UPDATE
emit refreshMask(); emit refreshMask();
#endif #endif
} }
@ -203,7 +203,7 @@ void UBDesktopPalette::maximizeMe()
// Notify that the maximization has been done // Notify that the maximization has been done
emit maximized(); emit maximized();
#ifdef Q_OS_LINUX #ifdef UB_REQUIRES_MASK_UPDATE
emit refreshMask(); emit refreshMask();
#endif #endif
} }

@ -30,7 +30,6 @@
#include "UBGraphicsScene.h" #include "UBGraphicsScene.h"
#include <QtGui> #include <QtGui>
#include <QtWebKit>
#include <QtSvg> #include <QtSvg>
#include <QGraphicsView> #include <QGraphicsView>
#include <QGraphicsVideoItem> #include <QGraphicsVideoItem>
@ -2805,6 +2804,8 @@ void UBGraphicsScene::simplifyCurrentStroke()
} }
void UBGraphicsScene::setDocumentUpdated() void UBGraphicsScene::setDocumentUpdated()
{ {
if (document()) if (document())

@ -31,7 +31,6 @@
#define UBGRAPHICSWIDGETITEM_H #define UBGRAPHICSWIDGETITEM_H
#include <QtGui> #include <QtGui>
#include <QtWebKit>
#include <QDomElement> #include <QDomElement>
#include <QGraphicsWebView> #include <QGraphicsWebView>

@ -88,6 +88,7 @@ void UBPlatformUtils::setDesktopMode(bool desktop)
{ {
@try { @try {
#if defined(Q_OS_OSX) && (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
// temporarily disabled due to bug: when switching to desktop mode (and calling this), // 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. // openboard switches right back to the board mode. clicking again on desktop mode works.
if (desktop) { if (desktop) {
@ -95,6 +96,9 @@ void UBPlatformUtils::setDesktopMode(bool desktop)
} }
else else
[NSApp setPresentationOptions:NSApplicationPresentationHideMenuBar | NSApplicationPresentationHideDock]; [NSApp setPresentationOptions:NSApplicationPresentationHideMenuBar | NSApplicationPresentationHideDock];
#else // QT_VERSION_CHECK(5, 10, 0)
[NSApp setPresentationOptions:NSApplicationPresentationHideMenuBar | NSApplicationPresentationHideDock];
#endif // QT_VERSION_CHECK(5, 10, 0)
} }
@catch(NSException * exception) { @catch(NSException * exception) {
@ -526,6 +530,7 @@ QString UBPlatformUtils::urlFromClipboard()
void UBPlatformUtils::toggleFinder(const bool on) void UBPlatformUtils::toggleFinder(const bool on)
{ {
#if defined(Q_OS_OSX) && (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
if (on) if (on)
{ {
[NSApp setPresentationOptions:NSApplicationPresentationDefault]; [NSApp setPresentationOptions:NSApplicationPresentationDefault];
@ -534,6 +539,9 @@ void UBPlatformUtils::toggleFinder(const bool on)
{ {
[NSApp setPresentationOptions:NSApplicationPresentationHideMenuBar | NSApplicationPresentationHideDock]; [NSApp setPresentationOptions:NSApplicationPresentationHideMenuBar | NSApplicationPresentationHideDock];
} }
#else // QT_VERSION_CHECK(5, 10, 0)
Q_UNUSED(on);
#endif //QT_VERSION_CHECK(5, 10, 0)
} }

@ -54,7 +54,6 @@
#include "api/UBWidgetUniboardAPI.h" #include "api/UBWidgetUniboardAPI.h"
#include "UBFeaturesActionBar.h" #include "UBFeaturesActionBar.h"
#include "UBRubberBand.h" #include "UBRubberBand.h"
#include <QtWebKit>
#include <QWebView> #include <QWebView>
#include <QWebSettings> #include <QWebSettings>

@ -32,7 +32,6 @@
#include <QMainWindow> #include <QMainWindow>
#include <QWidget> #include <QWidget>
#include <QtWebKitWidgets/QWebView>
#include <QMessageBox> #include <QMessageBox>
#include "UBDownloadWidget.h" #include "UBDownloadWidget.h"

@ -75,8 +75,7 @@
#include "core/UBSettings.h" #include "core/UBSettings.h"
#include <QtGui> #include <QtGui>
#include <QtWebKit> #include <QWebSettings>
#include "core/memcheck.h" #include "core/memcheck.h"
static const unsigned int JAR_VERSION = 23; static const unsigned int JAR_VERSION = 23;

@ -94,6 +94,7 @@ class XPDFRenderer : public PDFRenderer
void init(); void init();
struct PdfZoomCacheData { struct PdfZoomCacheData {
PdfZoomCacheData() : splashBitmap(nullptr), cachedPageNumber(-1), splash(nullptr), ratio(1.0), hasToBeProcessed(false) {};
PdfZoomCacheData(double const a_ratio) : splashBitmap(nullptr), cachedPageNumber(-1), splash(nullptr), ratio(a_ratio), hasToBeProcessed(false) {}; PdfZoomCacheData(double const a_ratio) : splashBitmap(nullptr), cachedPageNumber(-1), splash(nullptr), ratio(a_ratio), hasToBeProcessed(false) {};
~PdfZoomCacheData() {}; ~PdfZoomCacheData() {};
SplashBitmap* splashBitmap; SplashBitmap* splashBitmap;

@ -31,6 +31,7 @@
#include <QDomDocument> #include <QDomDocument>
#include <QXmlQuery> #include <QXmlQuery>
#include <QWebFrame> #include <QWebFrame>
#include <QWebElementCollection>
#include "frameworks/UBPlatformUtils.h" #include "frameworks/UBPlatformUtils.h"

@ -31,7 +31,6 @@
#define UBWEBCONTROLLER_H_ #define UBWEBCONTROLLER_H_
#include <QtGui> #include <QtGui>
#include <QtWebKit>
#include <QWebView> #include <QWebView>
#include "UBOEmbedParser.h" #include "UBOEmbedParser.h"

@ -30,7 +30,8 @@
#ifndef UBWEBKITUTILS_H_ #ifndef UBWEBKITUTILS_H_
#define UBWEBKITUTILS_H_ #define UBWEBKITUTILS_H_
#include <QtWebKit> // Forward declarations.
class QWebFrame;
class UBWebKitUtils class UBWebKitUtils
{ {

@ -71,7 +71,7 @@
#include "WBBrowserWindow.h" #include "WBBrowserWindow.h"
#include <QtGui> #include <QtGui>
#include <QtWebKit> #include <QWebHistory>
#include <QDesktopWidget> #include <QDesktopWidget>
#include "core/UBSettings.h" #include "core/UBSettings.h"

@ -72,7 +72,6 @@
#define WBBROWSERMAINWINDOW_H #define WBBROWSERMAINWINDOW_H
#include <QtGui> #include <QtGui>
#include <QtWebKit>
class WBChaseWidget; class WBChaseWidget;
class WBTabWidget; class WBTabWidget;

@ -71,8 +71,8 @@
#include "WBDownloadManager.h" #include "WBDownloadManager.h"
#include <QtGui> #include <QtGui>
#include <QtWebKit>
#include <QFileDialog> #include <QFileDialog>
#include <QWebSettings>
#include "network/UBAutoSaver.h" #include "network/UBAutoSaver.h"
#include "network/UBNetworkAccessManager.h" #include "network/UBNetworkAccessManager.h"

@ -73,7 +73,7 @@
#include "WBBrowserWindow.h" #include "WBBrowserWindow.h"
#include <QtGui> #include <QtGui>
#include <QtWebKit> #include <QWebSettings>
#include "core/UBSettings.h" #include "core/UBSettings.h"
#include "network/UBAutoSaver.h" #include "network/UBAutoSaver.h"

@ -74,7 +74,7 @@
#include "WBModelMenu.h" #include "WBModelMenu.h"
#include <QtGui> #include <QtGui>
#include <QtWebKit> #include <QWebHistoryInterface>
class WBHistoryItem class WBHistoryItem
{ {

@ -118,8 +118,6 @@ class WBTabBar : public QTabBar
QPoint mDragStartPos; QPoint mDragStartPos;
}; };
#include <QtWebKit>
class WBWebView; class WBWebView;
/*! /*!

@ -71,7 +71,6 @@
#include "WBToolBarSearch.h" #include "WBToolBarSearch.h"
#include <QtGui> #include <QtGui>
#include <QtWebKit>
#include <QMenu> #include <QMenu>
#include <QCompleter> #include <QCompleter>

@ -30,7 +30,7 @@
#include "WBWebTrapWebView.h" #include "WBWebTrapWebView.h"
#include <QtGui> #include <QtGui>
#include <QtWebKit> #include <QWebElement>
#include <QWebHitTestResult> #include <QWebHitTestResult>
#include <QWebFrame> #include <QWebFrame>

@ -31,10 +31,8 @@
#define WBWEBTRAPWEBVIEW_H_ #define WBWEBTRAPWEBVIEW_H_
#include <QtGui> #include <QtGui>
#include <QtWebKit>
#include <QWebView> #include <QWebView>
class WBWebTrapWebView : public QWebView class WBWebTrapWebView : public QWebView
{ {
Q_OBJECT; Q_OBJECT;

@ -82,7 +82,6 @@
#include "network/UBCookieJar.h" #include "network/UBCookieJar.h"
#include <QtGui> #include <QtGui>
#include <QtWebKit>
#include <QtUiTools/QUiLoader> #include <QtUiTools/QUiLoader>
#include <QMessageBox> #include <QMessageBox>
#include <QWebFrame> #include <QWebFrame>

@ -72,7 +72,6 @@
#define WBWEBVIEW_H #define WBWEBVIEW_H
#include <QtGui> #include <QtGui>
#include <QtWebKit>
#include "WBWebTrapWebView.h" #include "WBWebTrapWebView.h"
#include "web/UBWebPage.h" #include "web/UBWebPage.h"

Loading…
Cancel
Save