Select to view content in your preferred language

Qt 5.5 Support

3759
5
Jump to solution
07-06-2015 03:37 PM
AndyWright
Frequent Contributor

Can we create 10.2.6 API apps with the latest Qt 5.5 and Qt Creator 3.4.2 releases?

0 Kudos
1 Solution

Accepted Solutions
LucasDanzinger
Esri Frequent Contributor

We found one issue that I would like to add here. It is with the 5.5 kit for the iOS Simulator only, and devices themselves are not affected. During the build, the linker will fail with errors similar to the following

Undefined symbols for architecture i386:

"QProcess::waitForFinished(int)", referenced from:

EsriRuntimeQt::Local_server_impl::on_shutdown_server() in libEsriRuntimeQt_iphonesimulator.a(libArcGISQTRT-sim-release.o)

This is due to some removal of QProcess at 5.5 on iOS.

Workarounds include:

1) Use the 5.4 kit that we provide if you want to use the simulator

2) Create a dummy QProcess class to satisfy the linker. Please note that this is safe to do, however, it is not something that can be supported by Esri tech support or anything like that. Here is one example of how to do this.

Add QProcess_ios.h to the project:

#ifndef QProcess_ios_H
#define QProcess_ios_H


#include <QObject>
#include <QIODevice>
typedef struct _PROCESS_INFORMATION *Q_PID;
class QProcess {
  enum ProcessChannelMode {};
  enum ProcessState {};


  QProcess(QObject*);
  ~QProcess();
  bool waitForStarted(int);
  bool waitForReadyRead(int);
  bool waitForFinished(int);
  void setWorkingDirectory(const QString&);
  void setProcessChannelMode(ProcessChannelMode);
  void close();
  void start(const QString&, const QStringList&, QIODevice::OpenMode);
  bool canReadLine() const;
  Q_PID pid() const;
  QProcess::ProcessState state() const;
  int exitCode() const;
};


#endif // QProcess_ios_H






Along with QProcess_ios.cpp:

#include "QProcess_ios.h"


QProcess::QProcess(QObject*) { }
QProcess::~QProcess() { }
bool QProcess::waitForStarted(int) { return false; }
bool QProcess::waitForReadyRead(int) { return false; }
bool QProcess::waitForFinished(int) { return false; }
void QProcess::setWorkingDirectory(const QString&) { }
void QProcess::setProcessChannelMode(ProcessChannelMode) { }
void QProcess::close() { }
void QProcess::start(const QString&, const QStringList&, QIODevice::OpenMode) { }
bool QProcess::canReadLine() const { return false; }
Q_PID QProcess::pid() const { return Q_PID(); }
QProcess::ProcessState QProcess::state() const { return (QProcess::ProcessState)0; }
int QProcess::exitCode() const { return 0; }


And in the .pro file, add this:

iphonesimulator: {
  HEADERS += QProcess_ios.h
  SOURCES += QProcess_ios.cpp
}

Hope this helps.

Thanks,

Luke

View solution in original post

0 Kudos
5 Replies
LucasDanzinger
Esri Frequent Contributor

Yes, it should work. We tested against 5.5 pre-release during the 10.2.6 certification, and found only a few minor (if any) issues. If you just run the post installer against your new kits/qt creator, it should be good to go.

0 Kudos
AndyWright
Frequent Contributor

Do you have a list of these minor issues that you could share? With my luck one of them will probably stop us in our tracks …

0 Kudos
LucasDanzinger
Esri Frequent Contributor

The only issue that we saw with pre-release 5.5 was that there were some binary compatibility issues on Windows. We reported those and they were fixed for the final release, so you should be good to go with 10.2.6 of the SDK and 5.5 of Qt. If you find any issues, please report them.

Thanks,

Luke

0 Kudos
AndyWright
Frequent Contributor

Thanks Luke. I’ll give it a shot …

0 Kudos
LucasDanzinger
Esri Frequent Contributor

We found one issue that I would like to add here. It is with the 5.5 kit for the iOS Simulator only, and devices themselves are not affected. During the build, the linker will fail with errors similar to the following

Undefined symbols for architecture i386:

"QProcess::waitForFinished(int)", referenced from:

EsriRuntimeQt::Local_server_impl::on_shutdown_server() in libEsriRuntimeQt_iphonesimulator.a(libArcGISQTRT-sim-release.o)

This is due to some removal of QProcess at 5.5 on iOS.

Workarounds include:

1) Use the 5.4 kit that we provide if you want to use the simulator

2) Create a dummy QProcess class to satisfy the linker. Please note that this is safe to do, however, it is not something that can be supported by Esri tech support or anything like that. Here is one example of how to do this.

Add QProcess_ios.h to the project:

#ifndef QProcess_ios_H
#define QProcess_ios_H


#include <QObject>
#include <QIODevice>
typedef struct _PROCESS_INFORMATION *Q_PID;
class QProcess {
  enum ProcessChannelMode {};
  enum ProcessState {};


  QProcess(QObject*);
  ~QProcess();
  bool waitForStarted(int);
  bool waitForReadyRead(int);
  bool waitForFinished(int);
  void setWorkingDirectory(const QString&);
  void setProcessChannelMode(ProcessChannelMode);
  void close();
  void start(const QString&, const QStringList&, QIODevice::OpenMode);
  bool canReadLine() const;
  Q_PID pid() const;
  QProcess::ProcessState state() const;
  int exitCode() const;
};


#endif // QProcess_ios_H






Along with QProcess_ios.cpp:

#include "QProcess_ios.h"


QProcess::QProcess(QObject*) { }
QProcess::~QProcess() { }
bool QProcess::waitForStarted(int) { return false; }
bool QProcess::waitForReadyRead(int) { return false; }
bool QProcess::waitForFinished(int) { return false; }
void QProcess::setWorkingDirectory(const QString&) { }
void QProcess::setProcessChannelMode(ProcessChannelMode) { }
void QProcess::close() { }
void QProcess::start(const QString&, const QStringList&, QIODevice::OpenMode) { }
bool QProcess::canReadLine() const { return false; }
Q_PID QProcess::pid() const { return Q_PID(); }
QProcess::ProcessState QProcess::state() const { return (QProcess::ProcessState)0; }
int QProcess::exitCode() const { return 0; }


And in the .pro file, add this:

iphonesimulator: {
  HEADERS += QProcess_ios.h
  SOURCES += QProcess_ios.cpp
}

Hope this helps.

Thanks,

Luke

0 Kudos