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

QUrl::removeAllQueryItems does not affect to QUrl instance

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Done
    • Affects Version/s: 5.4.0
    • Fix Version/s: 5.6.0
    • Component/s: Core: URL Handling
    • Labels:
      None

      Description

      Method code:

      // qurlquery.h
      
      inline void QUrl::removeAllQueryItems(const QString &key)
      { QUrlQuery q(*this); q.removeAllQueryItems(key); }
      

      This function does nothing with QUrl instance unlike neighbor function:

      inline void QUrl::removeQueryItem(const QString &key)
      { QUrlQuery q(*this); q.removeQueryItem(key); setQuery(q); }
      

      It seems like "setQuery(q);" statement should be added to the end of removeAllQueryItems method.

      Example:

      QByteArray const GROUP_NAME = "group";
      
      QUrl url;
      
      url.addQueryItem(GROUP_NAME, "value0");
      url.addQueryItem(GROUP_NAME, "value1");
      
      url.removeAllQueryItems(GROUP_NAME); // No one of query items removed here.
      
      qDebug() << url.queryItems().count();
      

        Attachments

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

          Activity

            People

            Assignee:
            thiago Thiago Macieira
            Reporter:
            hachemyzz Zaur Khachemizov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes