refine more messages to use tr()

This commit is contained in:
Le Tan 2017-03-04 14:28:09 +08:00
parent 38b18af4ab
commit f46b023d1b
9 changed files with 181 additions and 33 deletions

View File

@ -38,7 +38,7 @@ void VSettingsDialog::loadConfiguration()
return; return;
err: err:
VUtils::showMessage(QMessageBox::Warning, tr("Warning"), VUtils::showMessage(QMessageBox::Warning, tr("Warning"),
QString("Fail to load configuration."), "", tr("Fail to load configuration."), "",
QMessageBox::Ok, QMessageBox::Ok, NULL); QMessageBox::Ok, QMessageBox::Ok, NULL);
QMetaObject::invokeMethod(this, "reject", Qt::QueuedConnection); QMetaObject::invokeMethod(this, "reject", Qt::QueuedConnection);
} }
@ -57,7 +57,7 @@ void VSettingsDialog::saveConfiguration()
return; return;
err: err:
VUtils::showMessage(QMessageBox::Warning, tr("Warning"), VUtils::showMessage(QMessageBox::Warning, tr("Warning"),
QString("Fail to save configuration. Please try it again."), "", tr("Fail to save configuration. Please try it again."), "",
QMessageBox::Ok, QMessageBox::Ok, NULL); QMessageBox::Ok, QMessageBox::Ok, NULL);
} }

Binary file not shown.

View File

@ -6,7 +6,7 @@
<message> <message>
<location filename="../dialog/vdirinfodialog.cpp" line="21"/> <location filename="../dialog/vdirinfodialog.cpp" line="21"/>
<source>Directory &amp;name:</source> <source>Directory &amp;name:</source>
<translation> (&amp;V):</translation> <translation> (&amp;N):</translation>
</message> </message>
</context> </context>
<context> <context>
@ -16,6 +16,11 @@
<source>Warning</source> <source>Warning</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<location filename="../vdirectory.cpp" line="525"/>
<source>Fail to copy image %1.</source>
<translation>: %1</translation>
</message>
<message> <message>
<location filename="../vdirectory.cpp" line="526"/> <location filename="../vdirectory.cpp" line="526"/>
<source>Please check if there already exists a file with the same name and then manually copy it.</source> <source>Please check if there already exists a file with the same name and then manually copy it.</source>
@ -105,16 +110,63 @@
<source>Warning</source> <source>Warning</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<location filename="../vdirectorytree.cpp" line="94"/>
<source>Fail to open notebook %1.</source>
<translation>: %1</translation>
</message>
<message>
<location filename="../vdirectorytree.cpp" line="137"/>
<source>Fail to open directory %1.</source>
<translation>: %1</translation>
</message>
<message>
<location filename="../vdirectorytree.cpp" line="298"/>
<source>Create sub-directory under %1.</source>
<translation> %1 </translation>
</message>
<message>
<location filename="../vdirectorytree.cpp" line="299"/>
<location filename="../vdirectorytree.cpp" line="331"/>
<source>Directory &amp;name:</source>
<translation> (&amp;N):</translation>
</message>
<message> <message>
<location filename="../vdirectorytree.cpp" line="303"/> <location filename="../vdirectorytree.cpp" line="303"/>
<source>Create Directory</source> <source>Create Directory</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<location filename="../vdirectorytree.cpp" line="307"/>
<source>Name already exists under %1. Please choose another name.</source>
<translation> %1 </translation>
</message>
<message>
<location filename="../vdirectorytree.cpp" line="314"/>
<location filename="../vdirectorytree.cpp" line="346"/>
<source>Fail to create directory %1.</source>
<translation>: %1</translation>
</message>
<message>
<location filename="../vdirectorytree.cpp" line="330"/>
<source>Create root directory in notebook %1.</source>
<translation> %1 </translation>
</message>
<message> <message>
<location filename="../vdirectorytree.cpp" line="335"/> <location filename="../vdirectorytree.cpp" line="335"/>
<source>Create Root Directory</source> <source>Create Root Directory</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<location filename="../vdirectorytree.cpp" line="339"/>
<source>Name already exists in notebook %1. Please choose another name.</source>
<translation> %1 </translation>
</message>
<message>
<location filename="../vdirectorytree.cpp" line="365"/>
<source>Are you sure to delete directory %1?</source>
<translation>: %1</translation>
</message>
<message> <message>
<location filename="../vdirectorytree.cpp" line="366"/> <location filename="../vdirectorytree.cpp" line="366"/>
<source>This will delete any files under this directory.</source> <source>This will delete any files under this directory.</source>
@ -125,6 +177,21 @@
<source>Directory Information</source> <source>Directory Information</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<location filename="../vdirectorytree.cpp" line="413"/>
<source>Fail to rename directory %1.</source>
<translation>: %1</translation>
</message>
<message>
<location filename="../vdirectorytree.cpp" line="555"/>
<source>Fail to copy directory %1.</source>
<translation>: %1</translation>
</message>
<message>
<location filename="../vdirectorytree.cpp" line="556"/>
<source>Please check if there alread exists a directory with the same name.</source>
<translation></translation>
</message>
</context> </context>
<context> <context>
<name>VEditTab</name> <name>VEditTab</name>
@ -133,6 +200,11 @@
<source>Information</source> <source>Information</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<location filename="../vedittab.cpp" line="209"/>
<source>Note %1 has been modified.</source>
<translation> %1 </translation>
</message>
<message> <message>
<location filename="../vedittab.cpp" line="210"/> <location filename="../vedittab.cpp" line="210"/>
<source>Do you want to save your changes?</source> <source>Do you want to save your changes?</source>
@ -150,6 +222,16 @@
<source>Fail to save note.</source> <source>Fail to save note.</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<location filename="../vedittab.cpp" line="244"/>
<source>%1 being written has been removed.</source>
<translation>: %1</translation>
</message>
<message>
<location filename="../vedittab.cpp" line="252"/>
<source>Fail to write to disk when saving a note. Please try it again.</source>
<translation></translation>
</message>
</context> </context>
<context> <context>
<name>VEditWindow</name> <name>VEditWindow</name>
@ -279,18 +361,58 @@
<source>Note Information</source> <source>Note Information</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<location filename="../vfilelist.cpp" line="176"/>
<source>Create a note in %1.</source>
<translation> %1 </translation>
</message>
<message>
<location filename="../vfilelist.cpp" line="177"/>
<source>Note &amp;name:</source>
<translation> (&amp;N):</translation>
</message>
<message>
<location filename="../vfilelist.cpp" line="180"/>
<source>Create Note</source>
<translation></translation>
</message>
<message>
<location filename="../vfilelist.cpp" line="184"/>
<source>Name already exists. Please choose another name.</source>
<translation></translation>
</message>
<message> <message>
<location filename="../vfilelist.cpp" line="190"/> <location filename="../vfilelist.cpp" line="190"/>
<location filename="../vfilelist.cpp" line="247"/> <location filename="../vfilelist.cpp" line="247"/>
<location filename="../vfilelist.cpp" line="432"/> <location filename="../vfilelist.cpp" line="433"/>
<source>Warning</source> <source>Warning</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<location filename="../vfilelist.cpp" line="191"/>
<source>Fail to create note %1.</source>
<translation>: %1</translation>
</message>
<message> <message>
<location filename="../vfilelist.cpp" line="248"/> <location filename="../vfilelist.cpp" line="248"/>
<source>Are you sure to delete note %1?</source>
<translation>: %1</translation>
</message>
<message>
<location filename="../vfilelist.cpp" line="249"/>
<source>This may be unrecoverable!</source> <source>This may be unrecoverable!</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<location filename="../vfilelist.cpp" line="434"/>
<source>The renaming will change the note type.</source>
<translation></translation>
</message>
<message>
<location filename="../vfilelist.cpp" line="435"/>
<source>You should close the note %1 before continue.</source>
<translation>: %1</translation>
</message>
</context> </context>
<context> <context>
<name>VFindReplaceDialog</name> <name>VFindReplaceDialog</name>
@ -720,6 +842,11 @@
<source>Import Notes From File</source> <source>Import Notes From File</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<location filename="../vmainwindow.cpp" line="543"/>
<source>Imported notes: %1 succeed, %2 failed.</source>
<translation>: %1 %2 </translation>
</message>
<message> <message>
<location filename="../vmainwindow.cpp" line="629"/> <location filename="../vmainwindow.cpp" line="629"/>
<source>Use system&apos;s background color configuration for Markdown rendering</source> <source>Use system&apos;s background color configuration for Markdown rendering</source>
@ -961,6 +1088,16 @@ Visit https://github.com/tamlok/vnote.git for more information.</source>
<source>Warning</source> <source>Warning</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<location filename="../vnotebookselector.cpp" line="216"/>
<source>Are you sure to delete notebook %1?</source>
<translation>: %1</translation>
</message>
<message>
<location filename="../vnotebookselector.cpp" line="217"/>
<source>This will delete any files in this notebook (%1).</source>
<translation> (%1)</translation>
</message>
<message> <message>
<location filename="../vnotebookselector.cpp" line="264"/> <location filename="../vnotebookselector.cpp" line="264"/>
<source>Notebook Information</source> <source>Notebook Information</source>
@ -985,5 +1122,15 @@ Visit https://github.com/tamlok/vnote.git for more information.</source>
<source>Warning</source> <source>Warning</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<location filename="../dialog/vsettingsdialog.cpp" line="41"/>
<source>Fail to load configuration.</source>
<translation></translation>
</message>
<message>
<location filename="../dialog/vsettingsdialog.cpp" line="60"/>
<source>Fail to save configuration. Please try it again.</source>
<translation></translation>
</message>
</context> </context>
</TS> </TS>

View File

@ -522,7 +522,7 @@ VFile *VDirectory::copyFile(VDirectory *p_destDir, const QString &p_destName,
nrPasted++; nrPasted++;
} else { } else {
VUtils::showMessage(QMessageBox::Warning, tr("Warning"), VUtils::showMessage(QMessageBox::Warning, tr("Warning"),
QString("Fail to copy image %1.").arg(images[i]), tr("Fail to copy image %1.").arg(images[i]),
tr("Please check if there already exists a file with the same name and then manually copy it."), tr("Please check if there already exists a file with the same name and then manually copy it."),
QMessageBox::Ok, QMessageBox::Ok, NULL); QMessageBox::Ok, QMessageBox::Ok, NULL);
} }

View File

@ -91,7 +91,7 @@ void VDirectoryTree::setNotebook(VNotebook *p_notebook)
} }
if (!m_notebook->open()) { if (!m_notebook->open()) {
VUtils::showMessage(QMessageBox::Warning, tr("Warning"), VUtils::showMessage(QMessageBox::Warning, tr("Warning"),
QString("Fail to open notebook %1.").arg(m_notebook->getName()), "", tr("Fail to open notebook %1.").arg(m_notebook->getName()), "",
QMessageBox::Ok, QMessageBox::Ok, this); QMessageBox::Ok, QMessageBox::Ok, this);
clear(); clear();
return; return;
@ -134,7 +134,7 @@ void VDirectoryTree::updateDirectoryTreeOne(QTreeWidgetItem *p_parent, int depth
VDirectory *dir = getVDirectory(p_parent); VDirectory *dir = getVDirectory(p_parent);
if (!dir->open()) { if (!dir->open()) {
VUtils::showMessage(QMessageBox::Warning, tr("Warning"), VUtils::showMessage(QMessageBox::Warning, tr("Warning"),
QString("Fail to open directory %1.").arg(dir->getName()), "", tr("Fail to open directory %1.").arg(dir->getName()), "",
QMessageBox::Ok, QMessageBox::Ok, this); QMessageBox::Ok, QMessageBox::Ok, this);
return; return;
} }
@ -295,8 +295,8 @@ void VDirectoryTree::newSubDirectory()
} }
VDirectory *curDir = getVDirectory(curItem); VDirectory *curDir = getVDirectory(curItem);
QString info = QString("Create sub-directory under %1.").arg(curDir->getName()); QString info = tr("Create sub-directory under %1.").arg(curDir->getName());
QString text("Directory &name:"); QString text(tr("Directory &name:"));
QString defaultText("new_directory"); QString defaultText("new_directory");
do { do {
@ -304,14 +304,14 @@ void VDirectoryTree::newSubDirectory()
if (dialog.exec() == QDialog::Accepted) { if (dialog.exec() == QDialog::Accepted) {
QString name = dialog.getNameInput(); QString name = dialog.getNameInput();
if (curDir->findSubDirectory(name)) { if (curDir->findSubDirectory(name)) {
info = QString("Name already exists under %1. Please choose another name.").arg(curDir->getName()); info = tr("Name already exists under %1. Please choose another name.").arg(curDir->getName());
defaultText = name; defaultText = name;
continue; continue;
} }
VDirectory *subDir = curDir->createSubDirectory(name); VDirectory *subDir = curDir->createSubDirectory(name);
if (!subDir) { if (!subDir) {
VUtils::showMessage(QMessageBox::Warning, tr("Warning"), VUtils::showMessage(QMessageBox::Warning, tr("Warning"),
QString("Fail to create directory %1.").arg(name), "", tr("Fail to create directory %1.").arg(name), "",
QMessageBox::Ok, QMessageBox::Ok, this); QMessageBox::Ok, QMessageBox::Ok, this);
return; return;
} }
@ -327,8 +327,8 @@ void VDirectoryTree::newRootDirectory()
if (!m_notebook) { if (!m_notebook) {
return; return;
} }
QString info = QString("Create root directory in notebook %1.").arg(m_notebook->getName()); QString info = tr("Create root directory in notebook %1.").arg(m_notebook->getName());
QString text("Directory &name:"); QString text(tr("Directory &name:"));
QString defaultText("new_directory"); QString defaultText("new_directory");
VDirectory *rootDir = m_notebook->getRootDir(); VDirectory *rootDir = m_notebook->getRootDir();
do { do {
@ -336,14 +336,14 @@ void VDirectoryTree::newRootDirectory()
if (dialog.exec() == QDialog::Accepted) { if (dialog.exec() == QDialog::Accepted) {
QString name = dialog.getNameInput(); QString name = dialog.getNameInput();
if (rootDir->findSubDirectory(name)) { if (rootDir->findSubDirectory(name)) {
info = QString("Name already exists in notebook %1. Please choose another name.").arg(m_notebook->getName()); info = tr("Name already exists in notebook %1. Please choose another name.").arg(m_notebook->getName());
defaultText = name; defaultText = name;
continue; continue;
} }
VDirectory *subDir = rootDir->createSubDirectory(name); VDirectory *subDir = rootDir->createSubDirectory(name);
if (!subDir) { if (!subDir) {
VUtils::showMessage(QMessageBox::Warning, tr("Warning"), VUtils::showMessage(QMessageBox::Warning, tr("Warning"),
QString("Fail to create directory %1.").arg(name), "", tr("Fail to create directory %1.").arg(name), "",
QMessageBox::Ok, QMessageBox::Ok, this); QMessageBox::Ok, QMessageBox::Ok, this);
return; return;
} }
@ -362,7 +362,7 @@ void VDirectoryTree::deleteDirectory()
} }
VDirectory *curDir = getVDirectory(curItem); VDirectory *curDir = getVDirectory(curItem);
int ret = VUtils::showMessage(QMessageBox::Warning, tr("Warning"), int ret = VUtils::showMessage(QMessageBox::Warning, tr("Warning"),
QString("Are you sure to delete directory %1?").arg(curDir->getName()), tr("Are you sure to delete directory %1?").arg(curDir->getName()),
tr("This will delete any files under this directory."), QMessageBox::Ok | QMessageBox::Cancel, tr("This will delete any files under this directory."), QMessageBox::Ok | QMessageBox::Cancel,
QMessageBox::Ok, this); QMessageBox::Ok, this);
if (ret == QMessageBox::Ok) { if (ret == QMessageBox::Ok) {
@ -410,7 +410,7 @@ void VDirectoryTree::editDirectoryInfo()
} }
if (!curDir->rename(name)) { if (!curDir->rename(name)) {
VUtils::showMessage(QMessageBox::Warning, tr("Warning"), VUtils::showMessage(QMessageBox::Warning, tr("Warning"),
QString("Fail to rename directory %1.").arg(curName), "", tr("Fail to rename directory %1.").arg(curName), "",
QMessageBox::Ok, QMessageBox::Ok, this); QMessageBox::Ok, QMessageBox::Ok, this);
return; return;
} }
@ -552,8 +552,8 @@ bool VDirectoryTree::copyDirectory(VDirectory *p_destDir, const QString &p_destN
emit directoryUpdated(destDir); emit directoryUpdated(destDir);
} else { } else {
VUtils::showMessage(QMessageBox::Warning, tr("Warning"), VUtils::showMessage(QMessageBox::Warning, tr("Warning"),
QString("Fail to copy directory %1.").arg(srcName), tr("Fail to copy directory %1.").arg(srcName),
QString("Please check if there alread exists a directory with the same name."), tr("Please check if there alread exists a directory with the same name."),
QMessageBox::Ok, QMessageBox::Ok, this); QMessageBox::Ok, QMessageBox::Ok, this);
} }

View File

@ -206,7 +206,7 @@ void VEditTab::readFile()
if (m_textEditor->isModified()) { if (m_textEditor->isModified()) {
// Prompt to save the changes // Prompt to save the changes
int ret = VUtils::showMessage(QMessageBox::Information, tr("Information"), int ret = VUtils::showMessage(QMessageBox::Information, tr("Information"),
QString("Note %1 has been modified.").arg(m_file->getName()), tr("Note %1 has been modified.").arg(m_file->getName()),
tr("Do you want to save your changes?"), tr("Do you want to save your changes?"),
QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel, QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel,
QMessageBox::Save, this); QMessageBox::Save, this);
@ -241,7 +241,7 @@ bool VEditTab::saveFile()
if (!QFile(filePath).exists()) { if (!QFile(filePath).exists()) {
qWarning() << filePath << "being written has been removed"; qWarning() << filePath << "being written has been removed";
VUtils::showMessage(QMessageBox::Warning, tr("Warning"), tr("Fail to save note."), VUtils::showMessage(QMessageBox::Warning, tr("Warning"), tr("Fail to save note."),
QString("%1 being written has been removed.").arg(filePath), tr("%1 being written has been removed.").arg(filePath),
QMessageBox::Ok, QMessageBox::Ok, this); QMessageBox::Ok, QMessageBox::Ok, this);
return false; return false;
} }
@ -249,7 +249,7 @@ bool VEditTab::saveFile()
ret = m_file->save(); ret = m_file->save();
if (!ret) { if (!ret) {
VUtils::showMessage(QMessageBox::Warning, tr("Warning"), tr("Fail to save note."), VUtils::showMessage(QMessageBox::Warning, tr("Warning"), tr("Fail to save note."),
QString("Fail to write to disk when saving a note. Please try it again."), tr("Fail to write to disk when saving a note. Please try it again."),
QMessageBox::Ok, QMessageBox::Ok, this); QMessageBox::Ok, QMessageBox::Ok, this);
m_textEditor->setModified(true); m_textEditor->setModified(true);
} }

View File

@ -173,22 +173,22 @@ void VFileList::newFile()
if (!m_directory) { if (!m_directory) {
return; return;
} }
QString info = QString("Create a note under %1.").arg(m_directory->getName()); QString info = tr("Create a note in %1.").arg(m_directory->getName());
QString text("&Note name:"); QString text(tr("Note &name:"));
QString defaultText("new_note"); QString defaultText("new_note");
do { do {
VNewFileDialog dialog(QString("Create Note"), info, text, defaultText, this); VNewFileDialog dialog(tr("Create Note"), info, text, defaultText, this);
if (dialog.exec() == QDialog::Accepted) { if (dialog.exec() == QDialog::Accepted) {
QString name = dialog.getNameInput(); QString name = dialog.getNameInput();
if (m_directory->findFile(name)) { if (m_directory->findFile(name)) {
info = "Name already exists. Please choose another name."; info = tr("Name already exists. Please choose another name.");
defaultText = name; defaultText = name;
continue; continue;
} }
VFile *file = m_directory->createFile(name); VFile *file = m_directory->createFile(name);
if (!file) { if (!file) {
VUtils::showMessage(QMessageBox::Warning, tr("Warning"), VUtils::showMessage(QMessageBox::Warning, tr("Warning"),
QString("Fail to create note %1.").arg(name), "", tr("Fail to create note %1.").arg(name), "",
QMessageBox::Ok, QMessageBox::Ok, this); QMessageBox::Ok, QMessageBox::Ok, this);
return; return;
} }
@ -245,7 +245,8 @@ void VFileList::deleteFile(VFile *p_file)
VDirectory *dir = p_file->getDirectory(); VDirectory *dir = p_file->getDirectory();
QString fileName = p_file->getName(); QString fileName = p_file->getName();
int ret = VUtils::showMessage(QMessageBox::Warning, tr("Warning"), int ret = VUtils::showMessage(QMessageBox::Warning, tr("Warning"),
QString("Are you sure to delete note %1?").arg(fileName), tr("This may be unrecoverable!"), tr("Are you sure to delete note %1?").arg(fileName),
tr("This may be unrecoverable!"),
QMessageBox::Ok | QMessageBox::Cancel, QMessageBox::Ok, this); QMessageBox::Ok | QMessageBox::Cancel, QMessageBox::Ok, this);
if (ret == QMessageBox::Ok) { if (ret == QMessageBox::Ok) {
editArea->closeFile(p_file, true); editArea->closeFile(p_file, true);
@ -430,8 +431,8 @@ bool VFileList::copyFile(VDirectory *p_destDir, const QString &p_destName, VFile
if (docType != newDocType) { if (docType != newDocType) {
if (editArea->isFileOpened(p_file)) { if (editArea->isFileOpened(p_file)) {
int ret = VUtils::showMessage(QMessageBox::Warning, tr("Warning"), int ret = VUtils::showMessage(QMessageBox::Warning, tr("Warning"),
QString("The renaming will change the note type."), tr("The renaming will change the note type."),
QString("You should close the note %1 before continue.").arg(p_file->getName()), tr("You should close the note %1 before continue.").arg(p_file->getName()),
QMessageBox::Ok | QMessageBox::Cancel, QMessageBox::Ok, this); QMessageBox::Ok | QMessageBox::Cancel, QMessageBox::Ok, this);
if (QMessageBox::Ok == ret) { if (QMessageBox::Ok == ret) {
if (!editArea->closeFile(p_file, false)) { if (!editArea->closeFile(p_file, false)) {

View File

@ -540,7 +540,7 @@ void VMainWindow::importNoteFromFile()
} }
} }
QMessageBox msgBox(QMessageBox::Information, tr("Import Notes From File"), QMessageBox msgBox(QMessageBox::Information, tr("Import Notes From File"),
QString("Imported notes: %1 succeed, %2 failed.") tr("Imported notes: %1 succeed, %2 failed.")
.arg(files.size() - failedFiles.size()).arg(failedFiles.size()), .arg(files.size() - failedFiles.size()).arg(failedFiles.size()),
QMessageBox::Ok, this); QMessageBox::Ok, this);
if (!failedFiles.isEmpty()) { if (!failedFiles.isEmpty()) {

View File

@ -213,8 +213,8 @@ void VNotebookSelector::deleteNotebook()
QString curPath = notebook->getPath(); QString curPath = notebook->getPath();
int ret = VUtils::showMessage(QMessageBox::Warning, tr("Warning"), int ret = VUtils::showMessage(QMessageBox::Warning, tr("Warning"),
QString("Are you sure to delete notebook %1?").arg(curName), tr("Are you sure to delete notebook %1?").arg(curName),
QString("This will delete any files in this notebook (%1).").arg(curPath), tr("This will delete any files in this notebook (%1).").arg(curPath),
QMessageBox::Ok | QMessageBox::Cancel, QMessageBox::Ok, this); QMessageBox::Ok | QMessageBox::Cancel, QMessageBox::Ok, this);
if (ret == QMessageBox::Ok) { if (ret == QMessageBox::Ok) {
m_editArea->closeFile(notebook, true); m_editArea->closeFile(notebook, true);