remove operators in QPIConfig::Entry

git-svn-id: svn://db.shs.com.ru/libs@946 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
2020-04-14 18:51:00 +00:00
parent 5eefb1ebe5
commit 14bbb32503
10 changed files with 77 additions and 93 deletions

View File

@@ -126,25 +126,25 @@ bool CDPultWindow::load(const QString & path) {
QPIConfig conf(path, QIODevice::ReadOnly);
QAD::File f = editFileK->value().value<QAD::File>();
checkSyncFiles->setChecked(false);
editFileK->setValue(QVariant::fromValue(QAD::File(conf.getValue("file_k").value(), f.filter)));
editFileX->setValue(QVariant::fromValue(QAD::File(conf.getValue("file_x").value(), f.filter)));
editFileC->setValue(QVariant::fromValue(QAD::File(conf.getValue("file_c").value(), f.filter)));
editFileM->setValue(QVariant::fromValue(QAD::File(conf.getValue("file_m").value(), f.filter)));
checkSyncFiles->setChecked(conf.getValue("sync_files"));
lineSessionName->setText(conf.getValue("session_name"));
last_icon = conf.getValue("icon_path", "").value();
setAppIcon(conf.getValue("icon", QByteArray()));
checkHasK->setChecked(conf.getValue("has_k"));
checkHasX->setChecked(conf.getValue("has_x"));
checkHasC->setChecked(conf.getValue("has_c"));
checkHasM->setChecked(conf.getValue("has_m"));
checkDefaultConfig->setChecked(conf.getValue("default_config"));
codeConfig->setText(QByteArray2QString(conf.getValue("config", QByteArray())));
editFileK->setValue(QVariant::fromValue(QAD::File(conf.getValue("file_k").toString(), f.filter)));
editFileX->setValue(QVariant::fromValue(QAD::File(conf.getValue("file_x").toString(), f.filter)));
editFileC->setValue(QVariant::fromValue(QAD::File(conf.getValue("file_c").toString(), f.filter)));
editFileM->setValue(QVariant::fromValue(QAD::File(conf.getValue("file_m").toString(), f.filter)));
checkSyncFiles->setChecked(conf.getValue("sync_files").toBool());
lineSessionName->setText(conf.getValue("session_name").toString());
last_icon = conf.getValue("icon_path").toString();
setAppIcon(conf.getValue("icon").toByteArray());
checkHasK->setChecked(conf.getValue("has_k").toBool());
checkHasX->setChecked(conf.getValue("has_x").toBool());
checkHasC->setChecked(conf.getValue("has_c").toBool());
checkHasM->setChecked(conf.getValue("has_m").toBool());
checkDefaultConfig->setChecked(conf.getValue("default_config").toBool());
codeConfig->setText(QByteArray2QString(conf.getValue("config").toByteArray()));
if (codeConfig->text().isEmpty())
codeConfig->setText(def_config);
session_gr = conf.getValue("session_gr", QByteArray());
session_dk = conf.getValue("session_dk", QByteArray());
session_mw = conf.getValue("session_mw", QByteArray());
session_gr = conf.getValue("session_gr").toByteArray();
session_dk = conf.getValue("session_dk").toByteArray();
session_mw = conf.getValue("session_mw").toByteArray();
setChanged(false);
file_name = path;
apply(true);
@@ -185,7 +185,7 @@ bool CDPultWindow::save(const QString & path) {
void CDPultWindow::loadingSession(QPIConfig & conf) {
setRecentFiles(conf.getValue("recent files", QStringList()));
setRecentFiles(conf.getValue("recent files").toStringList());
}