Esempio n. 1
0
void CandidateWindowProxy::initializeProcess()
{
    if (process->state() != QProcess::NotRunning) {
        return;
    }
    process->close();
    QString style = candidateWindowStyle();

#if QT_VERSION < 0x050000
    const char *path = UIM_LIBEXECDIR "/uim-candwin-qt4";
#else
    const char *path = UIM_LIBEXECDIR "/uim-candwin-qt5";
#endif

    if (!QFileInfo(path).isExecutable()) {
      static bool warned = false;
      if (!warned) {
        qWarning("Candwin executable '%s' is not executable", path);
        warned = true;
      }
      return;
    }

    process->start(path, QStringList() << style);
    process->waitForStarted();
}
Esempio n. 2
0
void CandidateWindowProxy::initializeProcess()
{
    if (process->state() != QProcess::NotRunning) {
        return;
    }
    process->close();
    QString style = candidateWindowStyle();
#if QT_VERSION < 0x050000
    process->start(UIM_LIBEXECDIR "/uim-candwin-qt4", QStringList() << style);
#else
    process->start(UIM_LIBEXECDIR "/uim-candwin-qt5", QStringList() << style);
#endif
    process->waitForStarted();
}