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

QUrl::removeAllQueryItems does not affect to QUrl instance

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.6.0
    • 5.4.0
    • Core: URL Handling
    • 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

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

        Activity

          People

            thiago Thiago Macieira
            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