qsharedpointer Questions

2

Solved

I have read from the Qt documentations about QPointer, QSharedPointer and QWeakPointer classes. It says: QPointer is a template class that provides guarded pointers to Qt objects and behaves lik...
Protest asked 10/3, 2014 at 15:18

2

Solved

I have a situation where a QSharedPointer managed object signalizes that it has finished it's purpose and is ready for deletion soon (after execution left the function emitting my readyForDeletion ...
Menchaca asked 27/9, 2012 at 14:28

1

Is there any good practice or regulation on how to use a QSharedPointer object as method parameter or return value of a method ? By value: LMNode::setParent(QSharedPointer<LMNode> parent) {...
Assistance asked 7/9, 2017 at 16:7

2

Solved

I have following code example: #include <QCoreApplication> #include <QSharedPointer> #include <QDebug> #include <memory> class A { public: A() { throw 1; } ~A() { qD...
Correlation asked 15/12, 2015 at 14:8

2

Solved

Yesterday I ran into misery which took me 24 hours of frustration. The problem boiled down to unexpected crashes occurring on random basis. To complicate things, debugging reports had absolutely ra...
Bozovich asked 15/3, 2013 at 20:52

2

Solved

I am researching this but I don't see a conclusive answer. Does a Qt widget application clean up the memory when it exits? Does it make any difference deriving from QObject? If there is garbage col...
Freedwoman asked 27/8, 2015 at 14:58

0

It is often stated that dereferencing a smart pointer does not have notable performance impacts. (For example here: C Smart Pointer Performance) I am now wondering if this is really true. I unders...
Brazell asked 10/8, 2015 at 11:57

1

Solved

In this question I was able to adapt the QObject method QMetaObject::Connection QObject::connect(const QObject * sender, const char * signal, const QObject * receiver, const char * method, Qt:...
Lolita asked 23/3, 2015 at 18:50

2

Solved

My application contained several functions like this: void SomeClass::set_data_provider(DataProvider *data_provider) { connect(data_provider, SIGNAL(data_available(int)), this, SLOT(data_availab...
Nolly asked 10/2, 2015 at 21:3

2

Solved

I need a pointer container that takes ownership of the pointers - i.e. when an element is removed, or the container goes out of scope, it frees all its pointers, like in boost::ptr_vector. QList&l...
Mercurio asked 17/12, 2014 at 10:16

1

Solved

I have the following code: QPair<QSharedPointer<unsigned int>, int> someclass::somefunction() { int siz = data_size(); QSharedPointer<unsigned int> buffer(new unsigned int[siz]...
Remonaremonetize asked 24/10, 2011 at 12:40

1

Solved

What is the difference between these two types of pointers? As far as I can read, QSharedPointer can handle situation well, so what is the need for QSharedDataPointer?
Rani asked 6/10, 2010 at 22:59
1

© 2022 - 2024 — McMap. All rights reserved.