Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-33655

QXmlQuery hangs on MacOsX 10.7, 10.8 and 10.9 with Qt 5.1/5.2 beta

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P1: Critical P1: Critical
    • None
    • 5.1.0 , 5.2.0 Beta1
    • XML: QtXmlPatterns
    • None
    • MacOSx 10.7, 10.8 & 10.9 with Qt5.1/Qt5.2 beta

      I'm trying to use QtXmlPatterns module in order to parse an XML file. Unfortunately using Qt5.1 on MacOsX 10.7&10.8 I found a problem I have not with Qt4.8.5.

      #include <QCoreApplication>
      #include <QGuiApplication>
      #include <QXmlQuery>
      #include <QStringList>
      #include <QDebug>
      
      int main(int argc, char *argv[])
      {
          //QGuiApplication a(argc, argv);
          QCoreApplication a(argc, argv);
          QXmlQuery qry;
          qry.setQuery("doc(\"file.xml\")");
          QStringList lst;
          qry.evaluateTo(&lst);
          qDebug() << lst;
          return 0;
      }
      

      this is the .pro I'm using.

      QT += core gui xmlpatterns
      TARGET = Test
      TEMPLATE = app
      CONFIG -= app_bundle
      SOURCES += main.cpp
      

      If I run a QCoreApplication everything works properly, instead if I switch on QGuiApplication (or a QApplication) this small program hangs forever on the evaluteTo function. It doesn't matter if file.xml exists or not.

      On Windows and on Linux the same program run smoothly even if I use the QCoreApplication or the QGuiApplication or the QApplication.

      I tried also to play a little with the QXmlQuery functions. If I call the setFocus function I got the same behaviour (with QCoreApplication everything it's ok, with QGuiApplication it hangs for ever on the setFocus function).

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            dedietri Gabriel de Dietrich (drgvond)
            inopportuno Guido Ranzuglia
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes