git-svn-id: svn://db.shs.com.ru/libs@110 a8b55f48-bf90-11e4-a774-851b48703e85

This commit is contained in:
2016-08-01 11:46:05 +00:00
parent 71cfb447ce
commit bf7c678313
3 changed files with 9 additions and 4 deletions

View File

@@ -24,8 +24,8 @@ else ()
endif () endif ()
target_link_libraries(${PROJECT_NAME} ${PIP_LIBRARY}) target_link_libraries(${PROJECT_NAME} ${PIP_LIBRARY})
add_executable(cdutilsngtest "cdutilstest.cpp") add_executable(cdutilstest "cdutilstest.cpp")
target_link_libraries(cdutilsngtest ${PIP_LIBRARY} ${PROJECT_NAME}) target_link_libraries(cdutilstest ${PIP_LIBRARY} ${PROJECT_NAME})
if (NOT DEFINED ENV{QNX_HOST}) if (NOT DEFINED ENV{QNX_HOST})
if (PULT) if (PULT)

View File

@@ -67,7 +67,7 @@ __Core_Initializer__::__Core_Initializer__() {
__Core_Initializer__::~__Core_Initializer__() { __Core_Initializer__::~__Core_Initializer__() {
count_--; count_--;
if (count_ > 1) return; if (count_ > 0) return;
//piCout << "delete PIInit"; //piCout << "delete PIInit";
if (__instance__ != 0) { if (__instance__ != 0) {
delete __instance__; delete __instance__;
@@ -136,6 +136,7 @@ void Core::k_update(PIIODevice * d) {
K_KeepNamesRequest(&kn); K_KeepNamesRequest(&kn);
} }
uk.update(k_, kn); uk.update(k_, kn);
piCout << k_.count() << uk.count();
k_ = uk; k_ = uk;
} }

View File

@@ -29,6 +29,8 @@ config(piqt(config_), QIODevice::ReadWrite) {
session.addEntry(ui->checkKHideNormal); session.addEntry(ui->checkKHideNormal);
session.addEntry(ui->checkKHideExpressions); session.addEntry(ui->checkKHideExpressions);
session.addEntry(ui->checkKAutoCalculate); session.addEntry(ui->checkKAutoCalculate);
session.addEntry(ui->spinHistory);
session.addEntry(ui->spinBuffer);
needWrite = isPause = false; needWrite = isPause = false;
timer = 0; timer = 0;
//x.resize(KX_X_PACKET_NUM); //x.resize(KX_X_PACKET_NUM);
@@ -58,6 +60,7 @@ config(piqt(config_), QIODevice::ReadWrite) {
connect(ui->checkKHideExpressions, SIGNAL(toggled(bool)), this, SLOT(filterTree())); connect(ui->checkKHideExpressions, SIGNAL(toggled(bool)), this, SLOT(filterTree()));
connect(ui->lineKSearch, SIGNAL(textChanged(QString)), this, SLOT(filterTree())); connect(ui->lineKSearch, SIGNAL(textChanged(QString)), this, SLOT(filterTree()));
session.load(); session.load();
on_spinBuffer_editingFinished();
K.configure(config_); K.configure(config_);
K.readFile(); K.readFile();
updateKDesc(); updateKDesc();
@@ -98,7 +101,7 @@ bool CD_Pult::eventFilter(QObject * o, QEvent * e) {
} }
return QMainWindow::eventFilter(o, e); return QMainWindow::eventFilter(o, e);
} }
int ind = o->property("index").toInt(); //int ind = o->property("index").toInt();
//qDebug() << "event" << i << e->type(); //qDebug() << "event" << i << e->type();
switch (e->type()) { switch (e->type()) {
case QEvent::Enter: case QEvent::Enter:
@@ -296,6 +299,7 @@ void CD_Pult::on_buttonSetKDesc_clicked() {
if (ret.isEmpty()) return; if (ret.isEmpty()) return;
kdesc_file = Q2PIString(QDir::current().relativeFilePath(ret)); kdesc_file = Q2PIString(QDir::current().relativeFilePath(ret));
PIFile f(kdesc_file, PIIODevice::ReadOnly); PIFile f(kdesc_file, PIIODevice::ReadOnly);
piCout << "open description:" << Q2PIString(ret);
K.update(&f); K.update(&f);
updateKDesc(true); updateKDesc(true);
} }