mirror of
https://github.com/ONLYOFFICE/desktop-apps.git
synced 2026-02-10 18:05:16 +08:00
.
This commit is contained in:
@ -156,6 +156,14 @@ app_linux {
|
||||
LIBS += $$PWD/$$CORE_3DPARTY_PATH/icu/$$PLATFORM_BUILD/build/libicudata.so.58
|
||||
|
||||
DEFINES += DOCUMENTSCORE_OPENSSL_SUPPORT
|
||||
|
||||
isEqual(QT_MAJOR_VERSION, 5) {
|
||||
lessThan(QT_MINOR_VERSION, 10) {
|
||||
DEFINES += _QTVER_DOWNGRADE
|
||||
message("QTVER_DOWNGRADE")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -45,9 +45,36 @@
|
||||
CFileDialogWrapper::CFileDialogWrapper(HWND hParentWnd) : QWinWidget(hParentWnd)
|
||||
#else
|
||||
// because bug in cef - 'open/save dialog' doesn't open for second time
|
||||
#define FILEDIALOG_DONT_USE_NATIVEDIALOGS
|
||||
//#define FILEDIALOG_DONT_USE_MODAL
|
||||
#if !defined(FILEDIALOG_DONT_USE_NATIVEDIALOGS) && !defined(FILEDIALOG_DONT_USE_MODAL)
|
||||
#define FILEDIALOG_DONT_USE_MODAL
|
||||
#endif
|
||||
//
|
||||
class CParentDisable
|
||||
{
|
||||
private:
|
||||
QWidget* m_pChild;
|
||||
public:
|
||||
CParentDisable(QWidget* parent)
|
||||
{
|
||||
if (!parent)
|
||||
{
|
||||
m_pChild = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
m_pChild = new QWidget(parent);
|
||||
m_pChild->setGeometry(0, 0, parent->width(), parent->height());
|
||||
m_pChild->setStyleSheet("background-color: rgba(255,0,0,0)");
|
||||
m_pChild->setAttribute(Qt::WA_NoSystemBackground);
|
||||
m_pChild->setAttribute(Qt::WA_TranslucentBackground);
|
||||
m_pChild->show();
|
||||
}
|
||||
~CParentDisable()
|
||||
{
|
||||
if (m_pChild)
|
||||
m_pChild->deleteLater();
|
||||
}
|
||||
};
|
||||
|
||||
CFileDialogWrapper::CFileDialogWrapper(QWidget * parent) : QObject(parent)
|
||||
#endif
|
||||
@ -141,6 +168,10 @@ bool CFileDialogWrapper::modalSaveAs(QString& fileName)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32
|
||||
CParentDisable oDisabler((QWidget *)parent());
|
||||
#endif
|
||||
|
||||
while (true) {
|
||||
fileName = _exec_dialog(_parent, _croped_name, _filters, _sel_filter);
|
||||
|
||||
@ -225,6 +256,10 @@ QStringList CFileDialogWrapper::modalOpen(const QString& path, const QString& fi
|
||||
QFileDialog::Options();
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32
|
||||
CParentDisable oDisabler((QWidget *)parent());
|
||||
#endif
|
||||
|
||||
return multi ? QFileDialog::getOpenFileNames(_parent, tr("Open Document"), path, _filter_, &_sel_filter, _opts) :
|
||||
QStringList(QFileDialog::getOpenFileName(_parent, tr("Open Document"), path, _filter_, &_sel_filter, _opts));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user