Ported to QT5.9, which fixes 'MAC desktop mode not forwarding events'.

Cleanup related to QWebkit.
preferencesAboutTextFull
jpapale 4 years ago committed by John Papale
parent d5988f979c
commit 4293bfa51f
  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. 1
      src/core/UBApplication.cpp
  7. 3
      src/desktop/UBDesktopAnnotationController.cpp
  8. 3
      src/domain/UBGraphicsScene.cpp
  9. 1
      src/domain/UBGraphicsWidgetItem.h
  10. 8
      src/frameworks/UBPlatformUtils_mac.mm
  11. 1
      src/gui/UBFeaturesWidget.h
  12. 1
      src/gui/UBMainWindow.h
  13. 3
      src/network/UBCookieJar.cpp
  14. 1
      src/pdf/XPDFRenderer.h
  15. 1
      src/web/UBWebController.cpp
  16. 1
      src/web/UBWebController.h
  17. 3
      src/web/UBWebKitUtils.h
  18. 2
      src/web/browser/WBBrowserWindow.cpp
  19. 1
      src/web/browser/WBBrowserWindow.h
  20. 2
      src/web/browser/WBDownloadManager.cpp
  21. 2
      src/web/browser/WBHistory.cpp
  22. 2
      src/web/browser/WBHistory.h
  23. 2
      src/web/browser/WBTabWidget.h
  24. 1
      src/web/browser/WBToolBarSearch.cpp
  25. 2
      src/web/browser/WBWebTrapWebView.cpp
  26. 2
      src/web/browser/WBWebTrapWebView.h
  27. 1
      src/web/browser/WBWebView.cpp
  28. 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"

@ -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,6 +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);
#endif //Q_OS_OSX
#if defined(Q_OS_OSX) && (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
/* https://bugreports.qt.io/browse/QTBUG-81456 */ /* https://bugreports.qt.io/browse/QTBUG-81456 */
if (QOperatingSystemVersion::current().minorVersion() > 12) /* > Sierra */ if (QOperatingSystemVersion::current().minorVersion() > 12) /* > Sierra */
{ {

@ -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>
@ -2804,6 +2803,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;

@ -76,6 +76,7 @@ class XPDFRenderer : public PDFRenderer
void init(); void init();
struct PdfZoomCacheData { struct PdfZoomCacheData {
PdfZoomCacheData() : splashBitmap(nullptr), cachedPageNumber(-1), splash(nullptr), ratio(1.0) {};
PdfZoomCacheData(double const a_ratio) : splashBitmap(nullptr), cachedPageNumber(-1), splash(nullptr), ratio(a_ratio) {}; PdfZoomCacheData(double const a_ratio) : splashBitmap(nullptr), cachedPageNumber(-1), splash(nullptr), ratio(a_ratio) {};
~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