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

Strange behavior of QDesktopServices::openUrl

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Not Evaluated
    • Resolution: Done
    • 5.1.0
    • 5.1.1
    • Core: Other
    • None
    • Windows 7 x64 English locale, Qt 5.0.2, Qt 5.1.0
    • eb5749e8d9e873ac5aec2ba042d7a04b894f1421

    Description

      Switched from Qt5.0.2 to Qt5.1.0 and noticed that my application started opening incorrect URLs in a browser.

      Here is an example code:

      main.cpp
      #include <QApplication>
      #include <QDesktopServices>
      #include <QUrl>
      
      int main(int argc, char *argv[])
      {
          QApplication a(argc, argv);
      
          QDesktopServices::openUrl(QUrl(QString("http://test.org/?/profile/5")));
          
          return EXIT_SUCCESS;
      }
      

      When running it with Qt5.0.2, http://test.org/?/profile/5 opens, but when running with Qt5.1.0 http://test.org/?\profile\5 does.

      It's somehow related to the '?' character - removing it fixes the slashes.

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-32311
          # Subject Branch Project Status CR V

          Activity

            People

              thiago Thiago Macieira
              nurupo nurupo
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes