mirror of
https://github.com/ONLYOFFICE/desktop-apps.git
synced 2026-04-07 14:09:22 +08:00
Merge pull request 'Fix bug 71725' (#132) from fix/bug-71725 into release/v8.3.0
This commit is contained in:
@ -250,7 +250,7 @@ public:
|
||||
QFileInfo _info(opts.url);
|
||||
if ( /*!data->get_IsRecover() &&*/ !_info.exists() ) {
|
||||
int res = CMessage::showMessage(m_appmanager.mainWindow()->handle(),
|
||||
QObject::tr("%1 doesn't exists!<br>Remove file from the list?").arg(_info.fileName()),
|
||||
QObject::tr("%1 doesn't exists!<br>Remove file from the list?").arg(_info.fileName().toHtmlEscaped()),
|
||||
MsgType::MSG_WARN, MsgBtns::mbYesDefNo);
|
||||
if ( res == MODAL_RESULT_YES ) {
|
||||
AscAppManager::sendCommandTo(SEND_TO_ALL_START_PAGE, "file:skip", QString::number(opts.id));
|
||||
|
||||
@ -45,12 +45,15 @@ auto ellipsis_text_(const QWidget * widget, const QString& str, Qt::TextElideMod
|
||||
|
||||
CElipsisLabel::CElipsisLabel(QWidget *parent, Qt::WindowFlags f)
|
||||
: QLabel(parent, f)
|
||||
{}
|
||||
{
|
||||
setTextFormat(Qt::PlainText);
|
||||
}
|
||||
|
||||
CElipsisLabel::CElipsisLabel(const QString &text, QWidget *parent)
|
||||
: QLabel(text, parent)
|
||||
, orig_text(text)
|
||||
{
|
||||
setTextFormat(Qt::PlainText);
|
||||
// QString elt = elipsis_text(this, text, Qt::ElideMiddle);
|
||||
// setText(elt);
|
||||
}
|
||||
|
||||
@ -196,7 +196,7 @@ bool CFileDialogWrapper::modalSaveAs(QString& fileName, int selected)
|
||||
if ( info.exists() ) {
|
||||
QWidget * _mess_parent = (QWidget *)parent();
|
||||
int _answ = CMessage::showMessage(_mess_parent,
|
||||
tr("%1 already exists.<br>Do you want to replace it?").arg(info.fileName()),
|
||||
tr("%1 already exists.<br>Do you want to replace it?").arg(info.fileName().toHtmlEscaped()),
|
||||
MsgType::MSG_WARN, MsgBtns::mbYesNo);
|
||||
if ( MODAL_RESULT_NO == _answ ) {
|
||||
continue;
|
||||
|
||||
@ -187,6 +187,7 @@ QtMsg::QtMsg(QWidget * p)
|
||||
// m_message->setWordWrap(true);
|
||||
m_message->setProperty("class", "msg-report");
|
||||
m_message->setStyleSheet(QString("margin-bottom: %1px;").arg(int(8*m_priv->dpiRatio)));
|
||||
m_message->setTextFormat(Qt::PlainText);
|
||||
|
||||
QFormLayout * _f_layout = new QFormLayout;
|
||||
_f_layout->addWidget(m_message);
|
||||
|
||||
@ -124,6 +124,7 @@ Tab::Tab(QWidget *parent) :
|
||||
|
||||
text_label = new QLabel(this);
|
||||
text_label->setObjectName("tabText");
|
||||
text_label->setTextFormat(Qt::PlainText);
|
||||
text_label->setAlignment((AscAppManager::isRtlEnabled() ? Qt::AlignRight : Qt::AlignLeft) | Qt::AlignVCenter | Qt::AlignAbsolute);
|
||||
text_label->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
|
||||
lut->addWidget(text_label);
|
||||
|
||||
@ -74,6 +74,7 @@ CToolTip::CToolTip(QWidget * parent, const QString &text,
|
||||
setLayout(lut);
|
||||
layout()->setContentsMargins(margins, margins, margins, margins);
|
||||
m_label = new QLabel(this);
|
||||
m_label->setTextFormat(Qt::PlainText);
|
||||
layout()->addWidget(m_label);
|
||||
m_label->setText(text);
|
||||
parent->installEventFilter(this);
|
||||
|
||||
@ -708,7 +708,7 @@ int CMainWindow::trySaveDocument(int index)
|
||||
toggleButtonMain(false);
|
||||
m_pTabs->setCurrentIndex(index);
|
||||
|
||||
modal_res = CMessage::showMessage(this, getSaveMessage().arg(m_pTabs->titleByIndex(index)),
|
||||
modal_res = CMessage::showMessage(this, getSaveMessage().arg(m_pTabs->titleByIndex(index).toHtmlEscaped()),
|
||||
MsgType::MSG_WARN, MsgBtns::mbYesDefNoCancel);
|
||||
switch (modal_res) {
|
||||
case MODAL_RESULT_NO: break;
|
||||
@ -969,7 +969,7 @@ void CMainWindow::onLocalFileRecent(const COpenOptions& opts)
|
||||
if ( !match.hasMatch() ) {
|
||||
QFileInfo _info(opts.url);
|
||||
if ( opts.srctype != etRecoveryFile && !_info.exists() ) {
|
||||
int modal_res = CMessage::showMessage(this, tr("%1 doesn't exists!<br>Remove file from the list?").arg(_info.fileName()),
|
||||
int modal_res = CMessage::showMessage(this, tr("%1 doesn't exists!<br>Remove file from the list?").arg(_info.fileName().toHtmlEscaped()),
|
||||
MsgType::MSG_WARN, MsgBtns::mbYesDefNo);
|
||||
if (modal_res == MODAL_RESULT_YES) {
|
||||
AscAppManager::sendCommandTo(SEND_TO_ALL_START_PAGE, "file:skip", QString::number(opts.id));
|
||||
@ -1024,7 +1024,7 @@ void CMainWindow::onLocalFileLocation(QString path)
|
||||
if ( _info.exists() ) {
|
||||
Utils::openFileLocation(_path);
|
||||
} else {
|
||||
int res = CMessage::showMessage(this, QObject::tr("%1 doesn't exists!<br>Remove file from the list?").arg(_info.fileName()),
|
||||
int res = CMessage::showMessage(this, QObject::tr("%1 doesn't exists!<br>Remove file from the list?").arg(_info.fileName().toHtmlEscaped()),
|
||||
MsgType::MSG_WARN, MsgBtns::mbYesDefNo);
|
||||
if ( res == MODAL_RESULT_YES )
|
||||
AscAppManager::sendCommandTo(SEND_TO_ALL_START_PAGE, "file:skip", QString::number(id));
|
||||
|
||||
Reference in New Issue
Block a user