mirror of
https://github.com/ONLYOFFICE/desktop-apps.git
synced 2026-02-10 18:05:16 +08:00
[win-nix] refactoring
This commit is contained in:
@ -156,7 +156,6 @@ win32 {
|
||||
|
||||
LIBS += -L$$CORE_LIB_PATH_PLATFORM -lPdfReader -lPdfWriter -lDjVuFile -lXpsFile -lHtmlRenderer -lUnicodeConverter -lhunspell -looxmlsignature -lkernel -lgraphics
|
||||
|
||||
DEFINES += SUPPORT_EMBEDDED_MEDIA
|
||||
INCLUDEPATH += ../../core-ext/desktop-sdk-wrapper/additional
|
||||
QT += multimedia multimediawidgets
|
||||
build_xp {
|
||||
|
||||
@ -56,16 +56,12 @@ CAscApplicationManagerWrapper::CAscApplicationManagerWrapper()
|
||||
QObject::connect(this, &CAscApplicationManagerWrapper::coreEvent,
|
||||
this, &CAscApplicationManagerWrapper::onCoreEvent);
|
||||
|
||||
#ifdef SUPPORT_EMBEDDED_MEDIA
|
||||
NSBaseVideoLibrary::Init(nullptr);
|
||||
#endif
|
||||
}
|
||||
|
||||
CAscApplicationManagerWrapper::~CAscApplicationManagerWrapper()
|
||||
{
|
||||
#ifdef SUPPORT_EMBEDDED_MEDIA
|
||||
NSBaseVideoLibrary::Destroy();
|
||||
#endif
|
||||
|
||||
// CSingleWindow * _sw = nullptr;
|
||||
// for (auto const& w : m_vecEditors) {
|
||||
@ -467,7 +463,6 @@ bool CAscApplicationManagerWrapper::processCommonEvent(NSEditorApi::CAscCefMenuE
|
||||
|
||||
return true;}
|
||||
|
||||
#ifdef SUPPORT_EMBEDDED_MEDIA
|
||||
case ASC_MENU_EVENT_TYPE_SYSTEM_EXTERNAL_MEDIA_START:
|
||||
case ASC_MENU_EVENT_TYPE_SYSTEM_EXTERNAL_MEDIA_END: {
|
||||
CCefView * _cef = GetViewById(event->get_SenderId());
|
||||
@ -483,7 +478,6 @@ bool CAscApplicationManagerWrapper::processCommonEvent(NSEditorApi::CAscCefMenuE
|
||||
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
default: break;
|
||||
}
|
||||
@ -726,7 +720,7 @@ void CAscApplicationManagerWrapper::closeEditorWindow(const size_t p)
|
||||
// QMutexLocker locker( &_app.m_oMutex );
|
||||
|
||||
if ( p ) {
|
||||
#if (__GNUC__ <= 4 && __GNUC_MINOR__ < 9)
|
||||
#if defined(__GNUC__) && __GNUC__ <= 4 && __GNUC_MINOR__ < 9
|
||||
vector<size_t>::iterator
|
||||
#else
|
||||
vector<size_t>::const_iterator
|
||||
|
||||
@ -34,9 +34,7 @@
|
||||
#define CASCAPPLICATIONMANAGERWRAPPER_PRIVATE_H
|
||||
|
||||
#include "cascapplicationmanagerwrapper.h"
|
||||
#ifdef SUPPORT_EMBEDDED_MEDIA
|
||||
# include "qcefview_media.h"
|
||||
#endif
|
||||
#include "qcefview_media.h"
|
||||
|
||||
class CAscApplicationManagerWrapper::CAscApplicationManagerWrapper_Private
|
||||
{
|
||||
@ -53,11 +51,7 @@ public:
|
||||
void applyStylesheets() {}
|
||||
QCefView * createView(QWidget * parent)
|
||||
{
|
||||
#ifdef SUPPORT_EMBEDDED_MEDIA
|
||||
return new QCefView_Media(parent);
|
||||
#else
|
||||
return new QCefView(parent);
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -306,8 +306,8 @@ QString Utils::encodeJson(const QString& s)
|
||||
|
||||
wstring Utils::encodeJson(const wstring& s)
|
||||
{
|
||||
#if (__GNUC__ <= 4 && __GNUC_MINOR__ < 9)
|
||||
QString::fromStdWString(s).replace("\"", "\\\"").toStdWString();
|
||||
#if defined(__GNUC__) && __GNUC__ <= 4 && __GNUC_MINOR__ < 9
|
||||
return QString::fromStdWString(s).replace("\"", "\\\"").toStdWString();
|
||||
#else
|
||||
return std::regex_replace(wstring(s), std::wregex(L"\""), L"\\\"");
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user