Uploaded image for project: 'Qt Safe Renderer'
  1. Qt Safe Renderer
  2. QSR-948

Qt Cluster Example has hard-coded override for the IP address and port

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • QSR 1.2
    • Examples
    • None
    • Windows

    Description

      Qt Cluster Example main.cpp overrides the IP address and port environmental variables.

          //Find the ip address to the environment variable
          QString ipAddress;
          QList<QHostAddress> ipAddressesList = QNetworkInterface::allAddresses();
          // use the first non-localhost IPv4 address
          for (int i = 0; i < ipAddressesList.size(); ++i) {
              if (ipAddressesList.at(i) != QHostAddress::LocalHost &&
                  ipAddressesList.at(i).toIPv4Address()) {
                  ipAddress = ipAddressesList.at(i).toString();
                  break;
              }
          }
          // if we did not find one, use IPv4 localhost
          if (ipAddress.isEmpty())
              ipAddress = QHostAddress(QHostAddress::LocalHost).toString();
      
          qputenv("QT_SAFERENDER_IPADDRESS", ipAddress.toLocal8Bit());
          qputenv("QT_SAFERENDER_PORT", "32112");
      

      Attachments

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

        Activity

          People

            teemu.holappa Teemu Holappa
            assaarel Asmo Saarela (Inactive)
            Veli-Pekka Heinonen Veli-Pekka Heinonen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes