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

qsharedpointer autotest fails to build

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 4.7.0
    • 4.6.2
    • None
    • OpenSolaris b132, amd64, Sun Studio 12 U 1
    • ae6be1c945030051ed069a4418e0453d7836daad

    Description

      the qsharedpointer autotest fails to build with the below message:

      test@qttest:~/tmp/qt/tests/auto/qsharedpointer$ gmake
      /export/home/test/tmp/qt/bin/moc -DSRCDIR=\"/export/home/test/tmp/qt/tests/auto/qsharedpointer/\" -DDEFAULT_MAKESPEC=\"/export/home/test/tmp/qt/mkspecs/solaris-cc\" -DQT_CORE_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_SHARED -I../../../mkspecs/solaris-cc -I. -I../../../include/QtCore -I../../../include -I../../../include/QtTest -I.moc/debug-shared -I/usr/sfw/include tst_qsharedpointer.cpp -o .moc/debug-shared/tst_qsharedpointer.moc
      /export/home/test/bin/CC -c -g -mt -DSRCDIR=\"/export/home/test/tmp/qt/tests/auto/qsharedpointer/\" -DDEFAULT_MAKESPEC=\"/export/home/test/tmp/qt/mkspecs/solaris-cc\" -DQT_CORE_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_SHARED -I../../../mkspecs/solaris-cc -I. -I../../../include/QtCore -I../../../include -I../../../include/QtTest -I.moc/debug-shared -I/usr/sfw/include -o .obj/debug-shared/tst_qsharedpointer.o tst_qsharedpointer.cpp
      "../../../include/QtCore/../../src/corelib/tools/qsharedpointer_impl.h", line 578: Error: d is not accessible from QWeakPointer<Data>::QWeakPointer(const QSharedPointer<Data>&).
      "tst_qsharedpointer.cpp", line 241: Where: While instantiating "QWeakPointer<Data>::QWeakPointer(const QSharedPointer<Data>&)".
      "tst_qsharedpointer.cpp", line 241: Where: Instantiated from non-template code.
      1 Error(s) detected.
      gmake: *** [.obj/debug-shared/tst_qsharedpointer.o] Error 1

      this patch helped:
      diff --git a/src/corelib/tools/qsharedpointer_impl.h b/src/corelib/tools/qsharedpointer_impl.h
      index e25e0c1..e380e91 100644
      — a/src/corelib/tools/qsharedpointer_impl.h
      +++ b/src/corelib/tools/qsharedpointer_impl.h
      @@ -158,7 +158,8 @@ namespace QtSharedPointer {
      #if defined(Q_NO_TEMPLATE_FRIENDS)
      public:
      #else

      • template <class X> friend class QWeakPointer;
        + //template <class X> friend class QWeakPointer;
        + template <class X> friend class ::QWeakPointer;
        #endif

      Type *value;
      @@ -401,7 +402,8 @@ namespace QtSharedPointer {
      public:
      #else
      template <class X> friend class ExternalRefCount;

      • template <class X> friend class QWeakPointer;
        + //template <class X> friend class QWeakPointer;
        + template <class X> friend class ::QWeakPointer;
        template <class X, class Y> friend QSharedPointer<X> copyAndSetPointer(X * ptr, const QSharedPointer<Y> &src);
        #endif

      Attachments

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

        Activity

          People

            tmacieir Thiago Macieira (closed Nokia identity) (Inactive)
            hajma Pavel Heimlich
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes