Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ChromiumBasedEditors/lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1109,7 +1109,7 @@ target_sources(ascdocumentscore PRIVATE ${ASCDOCUMENTSCORE_HEADERS} ${ASCDOCUMEN
# Add Crypto & Compound dependencies
target_link_directories(ascdocumentscore PRIVATE "${CORE_BUILDS_LIBRARIES_PATH}"
$<$<CONFIG:Debug>:${CEF_ROOT}/Debug>
$<$<CONFIG:Release>:${CEF_ROOT}/Release>
$<$<NOT:$<CONFIG:Debug>>:${CEF_ROOT}/Release>
)

# Boost and ICU
Expand Down Expand Up @@ -1181,7 +1181,7 @@ add_officeutils(editors_helper ${CORE_ROOT_DIR}/OfficeUtils)

target_link_directories(editors_helper PRIVATE
$<$<CONFIG:Debug>:${CEF_ROOT}/Debug>
$<$<CONFIG:Release>:${CEF_ROOT}/Release>
$<$<NOT:$<CONFIG:Debug>>:${CEF_ROOT}/Release>
)

target_link_libraries(editors_helper PUBLIC
Expand Down
10 changes: 2 additions & 8 deletions ChromiumBasedEditors/lib/qt_wrapper/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ set(CMAKE_AUTORCC ON)
include(${CORE_ROOT_DIR}/common.cmake)



# Paths
set(CORE_ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../../core")
set(PWD_ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}")
Expand Down Expand Up @@ -89,13 +88,8 @@ endif()
if(UNIX AND NOT APPLE)
target_compile_definitions(qtascdocumentscore PRIVATE _LINUX LINUX OS_LINUX _X11)

# Qt5/6 Linux handling
if(QT_VERSION_MAJOR LESS_EQUAL 5)
find_package(Qt5 REQUIRED COMPONENTS X11Extras)
target_link_libraries(qtascdocumentscore PRIVATE Qt5::X11Extras)
else()
target_link_libraries(qtascdocumentscore PRIVATE Qt6::GuiPrivate)
endif()
# Qt6 Linux handling
target_link_libraries(qtascdocumentscore PRIVATE Qt${QT_VERSION_MAJOR}::GuiPrivate)

#target_link_options(qtascdocumentscore PRIVATE "-Wl,-unresolved-symbols=ignore-in-shared-libs")

Expand Down
4 changes: 2 additions & 2 deletions ChromiumBasedEditors/lib/qt_wrapper/include/qcefview.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,12 @@ class DESKTOP_DECL QCefView : public QWidget, public CCefViewWidgetImpl

void Init();

signals:
Q_SIGNALS:
void closeWidget(QCloseEvent *);
void _loaded();
void _closed();

protected slots:
protected Q_SLOTS:
void _loadedSlot();
void _closedSlot();
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class DESKTOP_DECL QCefView_Media : public QCefView
protected:
QAscVideoView* m_pMediaView;

protected slots:
protected Q_SLOTS:
void onMediaKeyDown(int key, Qt::KeyboardModifiers mods);
};

Expand Down
6 changes: 1 addition & 5 deletions ChromiumBasedEditors/lib/qt_wrapper/qtascdocumentscore.pro
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,7 @@ core_windows {
}

core_linux {
!greaterThan(QT_MAJOR_VERSION, 5) {
QT += x11extras
} else {
QT += gui-private
}
QT += gui-private

LIBS += -Wl,-unresolved-symbols=ignore-in-shared-libs
ADD_DEPENDENCY(graphics, kernel, UnicodeConverter)
Expand Down
4 changes: 2 additions & 2 deletions ChromiumBasedEditors/lib/qt_wrapper/src/qascprinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ void QAscPrinterContext::GetPhysicalRect(int& nX, int& nY, int& nW, int& nH)
return;
}

#ifndef QT_VERSION_6
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QRect rect1 = m_oPrinter.pageRect();
QRect rect2 = m_oPrinter.paperRect();
#else
Expand All @@ -142,7 +142,7 @@ void QAscPrinterContext::GetPrintAreaSize(int& nW, int& nH)
return;
}

#ifndef QT_VERSION_6
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QRect rect = m_oPrinter.pageRect();
#else
QRect rect = m_oPrinter.pageLayout().fullRectPixels(m_oPrinter.resolution());
Expand Down
4 changes: 4 additions & 0 deletions ChromiumBasedEditors/lib/qt_wrapper/src/qcefview_media.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,16 @@ QCefView_Media::~QCefView_Media()
}

#ifdef _LINUX
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
#include <QX11Info>
#endif
QWidget* getMainPanel(QWidget* widget, int& x, int& y)
{
x = 0; y = 0;
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
if (!QX11Info::isCompositingManagerRunning())
return widget;
#endif

QWidget* cur = widget;
while (cur->parentWidget() && cur->objectName() != "mainPanel")
Expand Down
23 changes: 9 additions & 14 deletions ChromiumBasedEditors/lib/qt_wrapper/src/qdpichecker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,16 @@
#include <QApplication>
#include "./../include/qcefview.h"

#ifdef QT_VERSION_LESS_5_15
#include <QDesktopWidget>
#endif

#ifdef _LINUX
#ifndef QT_VERSION_6
#include <QX11Info>
#else
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
#include <QtGui/private/qtx11extras_p.h>
#else
#include <QX11Info>
#endif
#endif



QDpiChecker::QDpiChecker(CAscApplicationManager* pManager) : CAscDpiChecker(pManager)
{
}
Expand Down Expand Up @@ -75,16 +73,17 @@ int QDpiChecker::GetMonitorDpi(int nScreenNumber, unsigned int* dx, unsigned int
int nDpiY = _screen->physicalDotsPerInchY();

#ifdef _LINUX
if ( QX11Info::isPlatformX11() )
if (QX11Info::isPlatformX11())
{
int _x11_dpix = QX11Info::appDpiX(nScreenNumber),
_x11_dpiy = QX11Info::appDpiY(nScreenNumber);

if ( nDpiX < _x11_dpix ) nDpiX = _x11_dpix;
if ( nDpiY < _x11_dpiy ) nDpiY = _x11_dpiy;
if (nDpiX < _x11_dpix) nDpiX = _x11_dpix;
if (nDpiY < _x11_dpiy) nDpiY = _x11_dpiy;
}
#endif


QSize size = _screen->size();
if (size.width() <= 1600 && size.height() <= 900)
{
Expand Down Expand Up @@ -122,10 +121,6 @@ int QDpiChecker::GetWidgetDpi(QWidget* w, unsigned int* dx, unsigned int* dy)
*dy = 96;
return 0;
}
#ifndef QT_VERSION_LESS_5_15
int nScreenNumber = QApplication::screens().indexOf(w->screen());
#else
int nScreenNumber = QApplication::desktop()->screenNumber(w);
#endif
return GetMonitorDpi(nScreenNumber, dx, dy);
}
2 changes: 1 addition & 1 deletion ChromiumBasedEditors/videoplayerlib/src/lib_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ LONG WINAPI vlc_exception_filter(struct _EXCEPTION_POINTERS *lpExceptionInfo)
return EXCEPTION_CONTINUE_EXECUTION;
}

#ifdef QT_VERSION_6
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
#include <QOperatingSystemVersion>
static void CheckWindowsOld()
{
Expand Down
2 changes: 1 addition & 1 deletion ChromiumBasedEditors/videoplayerlib/src/qascmediaplayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <QWidget>
#include <QMediaPlayer>

#ifdef QT_VERSION_6
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
#include <QAudioOutput>

typedef QMediaPlayer::PlaybackState QMediaPlayer_State;
Expand Down
4 changes: 2 additions & 2 deletions ChromiumBasedEditors/videoplayerlib/src/qascvideowidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,14 @@ QAscVideoWidget::QAscVideoWidget(QWidget *parent)
#endif

#ifndef USE_VLC_LIBRARY
#ifndef QT_VERSION_6
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
m_pEngine->setNotifyInterval(500);
#endif
#else
m_pEngine->setNotifyInterval(500);
#endif

#ifdef QT_VERSION_6
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
QObject::connect(m_pEngine, &QMediaPlayer::playbackStateChanged, this, &QAscVideoWidget::slotChangeState);
#else
QObject::connect(m_pEngine, &QMediaPlayer::stateChanged, this, &QAscVideoWidget::slotChangeState);
Expand Down
5 changes: 3 additions & 2 deletions ChromiumBasedEditors/videoplayerlib/src/qmultimedia.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@

#include <QVideoWidget>
#include <QMediaPlayer>
#include <QtGlobal>
#include "./qascmediaplayer.h"

static QMediaPlayer_State getPlayerState(QMediaPlayer* player)
{
#ifdef QT_VERSION_6
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
return player->playbackState();
#else
return player->state();
Expand All @@ -17,7 +18,7 @@ static QMediaPlayer_State getPlayerState(QMediaPlayer* player)

static bool isVideoAvailable(QMediaPlayer* player)
{
#ifdef QT_VERSION_6
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
return player->videoOutput() != nullptr;
#else
return player->isVideoAvailable();
Expand Down
2 changes: 1 addition & 1 deletion ChromiumBasedEditors/videoplayerlib/src/qvideoplaylist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ QVideoPlaylist::QVideoPlaylist(QWidget *parent) : QWidget(parent)
QObject::connect(m_pCheckPlayer, SIGNAL(durationChanged(qint64)), this, SLOT(_onSlotDurationChanged(qint64)));
QObject::connect(m_pCheckPlayer, SIGNAL(mediaStatusChanged(QMediaPlayer::MediaStatus)), this, SLOT(_onSlotMediaStatusChanged(QMediaPlayer::MediaStatus)));

#ifndef QT_VERSION_6
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QObject::connect(m_pCheckPlayer, SIGNAL(mediaChanged(QMediaContent)), this, SLOT(_onSlotMediaChanged(QMediaContent)));
QObject::connect(m_pCheckPlayer, SIGNAL(error(QMediaPlayer::Error)), this, SLOT(_onSlotError(QMediaPlayer::Error)));
#else
Expand Down