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

QOperatingSystemVersion::OSType enum missing Linux, Unix, QNX

    XMLWordPrintable

    Details

    • Type: Suggestion
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Won't Do
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Core: Other
    • Labels:
      None

      Description

      Adding distribution name into enum is not ok, but adding Linux is essential. I talk about `currentType()` method and OSType enum. I need to find out OS type (not distribution) as it's name.
      Missing Linux as a OS type stops me from using QOperatingSystemVersion.
      Also same is true to Unix and QNX operating systems.

      Sample use case

      determining desktop/mobile platform for using in file selector:

          QQmlApplicationEngine engine;
          QQmlFileSelector * selector = QQmlFileSelector::get(&engine);
          QOperatingSystemVersion::OSType os = QOperatingSystemVersion::currentType();
          switch (os) {
          case QOperatingSystemVersion::OSType::Android:
          case QOperatingSystemVersion::OSType::IOS:
              selector->setExtraSelectors(QStringList({"mobile"}));    
              break;
          case QOperatingSystemVersion::OSType::Windows:
          case QOperatingSystemVersion::OSType::MacOS:
          //how detect Linux as other desktop OS? <<<<<<<<<<<<<<<<<<<<<<<< ??
              selector->setExtraSelectors(QStringList({"desktop"}));    
              break;
          }
      

        Attachments

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

          Activity

            People

            Assignee:
            thiago Thiago Macieira
            Reporter:
            seyed_m S.M.Mousavi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes