summaryrefslogtreecommitdiffstats
path: root/utils/regtools/qeditor
diff options
context:
space:
mode:
Diffstat (limited to 'utils/regtools/qeditor')
-rw-r--r--utils/regtools/qeditor/backend.cpp4
-rw-r--r--utils/regtools/qeditor/backend.h6
-rw-r--r--utils/regtools/qeditor/mainwindow.cpp4
-rw-r--r--utils/regtools/qeditor/qeditor.pro4
-rw-r--r--utils/regtools/qeditor/regedit.cpp6
-rw-r--r--utils/regtools/qeditor/utils.cpp2
6 files changed, 16 insertions, 10 deletions
diff --git a/utils/regtools/qeditor/backend.cpp b/utils/regtools/qeditor/backend.cpp
index 7091a0c77f..cbaff7370d 100644
--- a/utils/regtools/qeditor/backend.cpp
+++ b/utils/regtools/qeditor/backend.cpp
@@ -35,8 +35,8 @@ SocFile::SocFile()
SocFile::SocFile(const QString& filename)
:m_filename(filename)
{
- m_valid = soc_desc_parse_xml(filename.toStdString(), m_soc);
- soc_desc_normalize(m_soc);
+ m_valid = parse_xml(filename.toStdString(), m_soc);
+ normalize(m_soc);
}
bool SocFile::IsValid()
diff --git a/utils/regtools/qeditor/backend.h b/utils/regtools/qeditor/backend.h
index b2f53c9ed5..934c1c359b 100644
--- a/utils/regtools/qeditor/backend.h
+++ b/utils/regtools/qeditor/backend.h
@@ -29,7 +29,11 @@
#ifdef HAVE_HWSTUB
#include "hwstub.h"
#endif
-#include "soc_desc.hpp"
+#include "soc_desc_v1.hpp"
+
+/* we don't want to import the entire soc_desc except for a few selected
+ * pieces */
+using namespace soc_desc_v1;
class IoBackend : public QObject
{
diff --git a/utils/regtools/qeditor/mainwindow.cpp b/utils/regtools/qeditor/mainwindow.cpp
index 9cea728d6e..b44306d701 100644
--- a/utils/regtools/qeditor/mainwindow.cpp
+++ b/utils/regtools/qeditor/mainwindow.cpp
@@ -161,12 +161,14 @@ void MainWindow::OnQuit()
void MainWindow::OnAbout()
{
+ QString soc_desc_ver = QString("%1.%2.%3").arg(MAJOR_VERSION)
+ .arg(MINOR_VERSION).arg(REVISION_VERSION);
QMessageBox::about(this, "About",
"<h1>QEditor</h1>"
"<h2>Version "APP_VERSION"</h2>"
"<p>Written by Amaury Pouly</p>"
"<p>Libraries:</p>"
- "<ul><li>soc_desc: "SOCDESC_VERSION"</li>"
+ "<ul><li>soc_desc: " + soc_desc_ver + "</li>"
#ifdef HAVE_HWSTUB
"<li>hwstub: "HWSTUB_VERSION"</li>"
#else
diff --git a/utils/regtools/qeditor/qeditor.pro b/utils/regtools/qeditor/qeditor.pro
index eecc0aba3f..265cc93171 100644
--- a/utils/regtools/qeditor/qeditor.pro
+++ b/utils/regtools/qeditor/qeditor.pro
@@ -5,14 +5,14 @@ HEADERS += mainwindow.h backend.h regtab.h analyser.h settings.h \
SOURCES += main.cpp mainwindow.cpp regtab.cpp backend.cpp analyser.cpp \
std_analysers.cpp settings.cpp utils.cpp regdisplaypanel.cpp regedit.cpp
LIBS += -L../lib/ -lsocdesc -lxml2
-INCLUDEPATH += ../lib/ ../../hwstub/lib
+INCLUDEPATH += ../include/ ../../hwstub/lib
DEPENDPATH += ../
libsocdesc.commands = cd ../lib && make
QMAKE_EXTRA_TARGETS += libsocdesc
PRE_TARGETDEPS += libsocdesc
-VERSION = 2.0.4
+VERSION = 2.1.0
DEFINES += APP_VERSION=\\\"$$VERSION\\\"
diff --git a/utils/regtools/qeditor/regedit.cpp b/utils/regtools/qeditor/regedit.cpp
index 851e054eb0..8b4bfb7c49 100644
--- a/utils/regtools/qeditor/regedit.cpp
+++ b/utils/regtools/qeditor/regedit.cpp
@@ -421,7 +421,7 @@ void RegEditPanel::OnFormulaGenerate(bool checked)
map["n"] = n;
std::string err;
soc_word_t res;
- if(!soc_desc_evaluate_formula(formula, map, res, err))
+ if(!evaluate_formula(formula, map, res, err))
{
qDebug() << "Cannot evaluator " << QString::fromStdString(formula)
<< "for n=" << n << ": " << QString::fromStdString(err);
@@ -1051,8 +1051,8 @@ void RegEdit::OnNew()
bool RegEdit::SaveSocFile(const QString& filename)
{
- soc_desc_normalize(m_cur_socfile.GetSoc());
- if(!soc_desc_produce_xml(filename.toStdString(), m_cur_socfile.GetSoc()))
+ normalize(m_cur_socfile.GetSoc());
+ if(!produce_xml(filename.toStdString(), m_cur_socfile.GetSoc()))
{
QMessageBox::warning(this, "The description was not saved",
"There was an error when saving the file");
diff --git a/utils/regtools/qeditor/utils.cpp b/utils/regtools/qeditor/utils.cpp
index e4a872ed49..2ee1bc6db5 100644
--- a/utils/regtools/qeditor/utils.cpp
+++ b/utils/regtools/qeditor/utils.cpp
@@ -1004,7 +1004,7 @@ void MyTextEditor::SetReadOnly(bool en)
if(en)
m_toolbar->hide();
else
- m_toolbar->hide();
+ m_toolbar->show();
m_edit->setReadOnly(en);
}