Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [solved] How to use obsolete members from a class. QUrl in my case
Forum Updated to NodeBB v4.3 + New Features

[solved] How to use obsolete members from a class. QUrl in my case

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    darkp03
    wrote on last edited by
    #1

    Hi everyone!

    Im working on a project that was originally built on Qt 4.4.0 and im trying to make it work on the latest Qt. This is by far more complex than what I thought.

    Right now im working with the QUrl class, my program is using the queryItemValue method. According to the documentation, that method is obsolete http://qt-project.org/doc/qt-5/qurl-obsolete.html#queryItemValue but I quote

    bq. The following members of class QUrl are obsolete. They are provided to keep old source code working. We strongly advise against using them in new code.

    So, what I understand from this, is that Qt strongly advises not to use this method, but it still keeps it to be backwards compatible (and thats exacly what I want!).

    When I try to compile the following error appears

    bq. 'class QUrl' has no member named 'queryItemValue'

    And indeed, the method doesnt exist. When I list all of the methods available on the class, that one doesnt appear

    Why is it that I cant see this method? Do I have to place a compiler directive in order to make Qt use obsolete methods from classes?

    Any point or guideline is strongly appreciated.

    Im running Qt Creator 3.2.1 (opensource)
    Based on Qt 5.3.2 (MSVC 2010, 32bit)
    Built on Sep 12 2014 at 15:47:18

    Edit: Fixed spelling mistakes

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      This "email":http://lists.qt-project.org/pipermail/development/2011-October/000088.html is what you are looking for

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • D Offline
        D Offline
        darkp03
        wrote on last edited by
        #3

        Thanks! That solved it.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved