QTfrontend/ui/widget/drawmapwidget.cpp
changeset 14841 b9437746bffb
parent 13245 950186baa764
equal deleted inserted replaced
14840:57ed3981db20 14841:b9437746bffb
   152         {
   152         {
   153             QMessageBox errorMsg(this);
   153             QMessageBox errorMsg(this);
   154             errorMsg.setIcon(QMessageBox::Warning);
   154             errorMsg.setIcon(QMessageBox::Warning);
   155             errorMsg.setWindowTitle(QMessageBox::tr("File error"));
   155             errorMsg.setWindowTitle(QMessageBox::tr("File error"));
   156             errorMsg.setText(QMessageBox::tr("Cannot open '%1' for writing").arg(fileName));
   156             errorMsg.setText(QMessageBox::tr("Cannot open '%1' for writing").arg(fileName));
       
   157             errorMsg.setTextFormat(Qt::PlainText);
   157             errorMsg.setWindowModality(Qt::WindowModal);
   158             errorMsg.setWindowModality(Qt::WindowModal);
   158             errorMsg.exec();
   159             errorMsg.exec();
   159         }
   160         }
   160         else
   161         else
   161             file.write(qCompress(m_scene->encode()).toBase64());
   162             file.write(qCompress(m_scene->encode()).toBase64());
   172         {
   173         {
   173             QMessageBox errorMsg(this);
   174             QMessageBox errorMsg(this);
   174             errorMsg.setIcon(QMessageBox::Warning);
   175             errorMsg.setIcon(QMessageBox::Warning);
   175             errorMsg.setWindowTitle(QMessageBox::tr("File error"));
   176             errorMsg.setWindowTitle(QMessageBox::tr("File error"));
   176             errorMsg.setText(QMessageBox::tr("Cannot open '%1' for reading").arg(fileName));
   177             errorMsg.setText(QMessageBox::tr("Cannot open '%1' for reading").arg(fileName));
       
   178             errorMsg.setTextFormat(Qt::PlainText);
   177             errorMsg.setWindowModality(Qt::WindowModal);
   179             errorMsg.setWindowModality(Qt::WindowModal);
   178             errorMsg.exec();
   180             errorMsg.exec();
   179         }
   181         }
   180         else
   182         else
   181             m_scene->decode(qUncompress(QByteArray::fromBase64(f.readAll())));
   183             m_scene->decode(qUncompress(QByteArray::fromBase64(f.readAll())));