Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Disabling the QString ctor: QString::QString(const QByteArray & ba) without also disabling QString::QString(const char * str)

    General and Desktop
    1
    1
    395
    Loading More Posts
    • 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.
    • N
      nairolf last edited by

      Hello everyone,

      please excuse my english.

      Is there any way to disable the QString ctor: QString::QString(const QByteArray & ba) without also disabling QString::QString(const char * str)?
      QT_NO_CAST_FROM_ASCII sadly does both.

      A temporary adjustment in qstring.h or qstring.cpp would also do the job. Just need to find a few issues in my project.

      Sort of (conditional) breakpoint for the ctor QString::QString(const QByteArray & ba) would also be ok. But I can't figure out how to set one, because there is no "real" ctor for QString::QString(const QByteArray & ba) but it is somehow done by the const char* ctor (inline).

      Best regards,
      Florian.

      1 Reply Last reply Reply Quote 0
      • First post
        Last post