remove "name" parameter in directory config file

Signed-off-by: Le Tan <tamlokveer@gmail.com>
This commit is contained in:
Le Tan 2016-10-23 19:49:21 +08:00
parent be625f561c
commit 30766f5738
2 changed files with 2 additions and 3 deletions

View File

@ -350,7 +350,7 @@ void VDirectoryTree::deleteDirectory()
QMessageBox msgBox(QMessageBox::Warning, tr("Warning"), QString("Are you sure you want to delete directory \"%1\"?")
.arg(curItemName), QMessageBox::Ok | QMessageBox::Cancel, this);
msgBox.setInformativeText(tr("This will delete any files under this directory."));
msgBox.setDefaultButton(QMessageBox::Ok);
msgBox.setDefaultButton(QMessageBox::Cancel);
if (msgBox.exec() == QMessageBox::Ok) {
deleteDirectoryAndUpdateTree(curItem);
}
@ -378,7 +378,6 @@ QTreeWidgetItem* VDirectoryTree::createDirectoryAndUpdateTree(QTreeWidgetItem *p
QJsonObject configJson;
configJson["version"] = "1";
configJson["name"] = name;
configJson["sub_directories"] = QJsonArray();
configJson["files"] = QJsonArray();

View File

@ -274,7 +274,7 @@ void VMainWindow::onDeleteNotebookBtnClicked()
QMessageBox msgBox(QMessageBox::Warning, tr("Warning"), QString("Are you sure you want to delete notebook \"%1\"?")
.arg(curName), QMessageBox::Ok | QMessageBox::Cancel, this);
msgBox.setInformativeText(QString("This will delete any files in this notebook (\"%1\").").arg(curPath));
msgBox.setDefaultButton(QMessageBox::Ok);
msgBox.setDefaultButton(QMessageBox::Cancel);
if (msgBox.exec() == QMessageBox::Ok) {
vnote->removeNotebook(curName);
}