From 95deb56500828450147787e99c789e9e39a10fe7 Mon Sep 17 00:00:00 2001 From: Olivier Langella <olivier.langella@u-psud.fr> Date: Sat, 9 Sep 2017 21:10:43 +0200 Subject: [PATCH] qt5 migration --- src/core/project.cpp | 2 +- src/files/xpipfile.cpp | 5 +++-- src/gui/workerthread.cpp | 5 ++--- src/input/xpipsaxhandler.cpp | 8 +++++--- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/core/project.cpp b/src/core/project.cpp index 8bcf4dc7b..d5c84e7bb 100644 --- a/src/core/project.cpp +++ b/src/core/project.cpp @@ -121,7 +121,7 @@ void Project::readXpipFile(WorkMonitorInterface * p_monitor, QFileInfo xpip_file simplereader.setContentHandler(parser); simplereader.setErrorHandler(parser); - qDebug() << "Read XPIP XML result file '" << xpip_fileinfo.absoluteFilePath() << "'"; + qDebug() << "Project::readXpipFile Read XPIP XML result file '" << xpip_fileinfo.absoluteFilePath() << "'"; QFile qfile(xpip_fileinfo.absoluteFilePath()); QXmlInputSource xmlInputSource(&qfile); diff --git a/src/files/xpipfile.cpp b/src/files/xpipfile.cpp index e433e0b46..2906563f4 100644 --- a/src/files/xpipfile.cpp +++ b/src/files/xpipfile.cpp @@ -29,7 +29,7 @@ XpipFile::XpipFile(const QUrl & xpip_source) : _xpip_source(xpip_source) XpipFile::XpipFile(const QFileInfo & xpip_source): _xpip_source(xpip_source.absoluteFilePath()) { - + qDebug() << "XpipFile::XpipFile begin " << _xpip_source.toString() << " " <<xpip_source.absoluteFilePath(); } XpipFile::XpipFile(const XpipFile & other) : _xpip_source(other._xpip_source) { @@ -41,9 +41,10 @@ XpipFile::~XpipFile() } ProjectSp XpipFile::getProjectSp(WorkMonitorInterface * p_monitor) const { + qDebug() << "XpipFile::getProjectSp begin " << _xpip_source.toString(); ProjectSp project_sp = Project().makeProjectSp(); - project_sp.get()->readXpipFile(p_monitor, QFileInfo(_xpip_source.toLocalFile())); + project_sp.get()->readXpipFile(p_monitor, QFileInfo(_xpip_source.toString())); return (project_sp); diff --git a/src/gui/workerthread.cpp b/src/gui/workerthread.cpp index 25a6c1b22..115c9cf7c 100644 --- a/src/gui/workerthread.cpp +++ b/src/gui/workerthread.cpp @@ -171,10 +171,9 @@ WorkerThread::~WorkerThread() void WorkerThread::doXpipFileLoad(QString filename) { qDebug() << "WorkerThread::doXpipFileLoad begin "<< filename; try { - QFileInfo new_xpip_file; - new_xpip_file.setFile(filename); + QFileInfo new_xpip_file(filename); emit loadingMessage(tr("loading XPIP file")); - + qDebug() << "WorkerThread::doXpipFileLoad new_xpip_file "<< new_xpip_file.absoluteFilePath(); XpipFile xpip_file(new_xpip_file); ProjectSp project_sp = xpip_file.getProjectSp(_p_work_monitor); diff --git a/src/input/xpipsaxhandler.cpp b/src/input/xpipsaxhandler.cpp index b2ee2199b..2f2517ebc 100644 --- a/src/input/xpipsaxhandler.cpp +++ b/src/input/xpipsaxhandler.cpp @@ -28,7 +28,9 @@ XpipSaxHandler::XpipSaxHandler(WorkMonitorInterface * p_monitor, Project * p_project):_p_project(p_project) { + qDebug() << "XpipSaxHandler::XpipSaxHandler begin" ; _p_monitor = p_monitor; + qDebug() << "XpipSaxHandler::XpipSaxHandler end" ; } XpipSaxHandler::~XpipSaxHandler() @@ -39,7 +41,7 @@ XpipSaxHandler::~XpipSaxHandler() bool XpipSaxHandler::startElement(const QString & namespaceURI, const QString & localName, const QString & qName, const QXmlAttributes & attributes) { - // qDebug() << namespaceURI << " " << localName << " " << qName ; + qDebug()<< "XpipSaxHandler::startElement begin" << namespaceURI << " " << localName << " " << qName ; _tag_stack.push_back(qName); bool is_ok = true; @@ -153,10 +155,10 @@ bool XpipSaxHandler::startElement_information(QXmlAttributes attributes) { qDebug() << "startElement_information "; _p_project->setCombineMode(true); if (attributes.value("Data_Type").simplified() == "indiv") { - _p_project->setCombineMode(false); + _p_project->setCombineMode(false); } _total_protein_match = attributes.value("match_number").toUInt(); - + _p_monitor->setProgressMaximumValue(_total_protein_match); qDebug() << "startElement_information end" ; return true; -- GitLab