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

Building applications which use QtDBus fails when QT_NO_CAST_FROM_ASCII is defined and clang is used

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • 4.8.1
    • 4.8.0, 4.8.1, 4.8.x, 5.0.0
    • D-Bus
    • None
    • clang 3.0
    • 71e88ddd54bd869271cdf37c349c1ad26d1c4b7c 3de1e6f26b692a8261b40decc2d81286b01c1461

    Description

      Commit 5be6cf0a6e306ed3a51ed5ba89317b1317544eea changed the signature of QDBusServer's constructor from `const QString &address, QObject *parent = 0)' to `const QString &address = "unix:tmpdir=/tmp", QObject *parent = 0)'.

      When some code #includes <QtDBus/QtDBus>, which in turn ends up including qdbusserver.h, clang fails to compile the code with the following error message:

      In file included from /usr/home/rakuco/kde4/qt4/include/QtDBus/QtDBus:19:
      /usr/home/rakuco/kde4/qt4/include/QtDBus/qdbusserver.h:64:42: error: calling a private constructor of class 'QString'
      QDBusServer(const QString &address = "unix:tmpdir=/tmp", QObject *parent = 0);
      ^
      /usr/home/rakuco/kde4/qt4/include/QtCore/qstring.h:597:5: note: declared private here
      QString(const char *ch);
      ^
      1 error generated.

      This is FreeBSD's clang:
      % clang --version
      FreeBSD clang version 3.0 (branches/release_30 142614) 20111021
      Target: x86_64-unknown-freebsd9.0
      Thread model: posix

      Building the attached testcase with a recent enough version of clang should trigger the problem.

      Attachments

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

        Activity

          People

            earthdomain Earth Domain (Inactive)
            rakuco Raphael Kubo da Costa
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes