Was listening to Mark Seeman on .Net Rocks, talking about Getting into the zone.
Got some good advice's, Instrumental music tends to be better to listen to than lyrics or someone is talking when trying to get "into the zone" or flow.
I usually had a podcast or a radio station on while working. But I get it now, listening and processing when someone is talking and in the same time as I'm working with my brain is reducing the mental performance. After changing to classical or instrumental music in my playlist at work, I can feel that it's faster to get into coding quicker when interrupted.
I also picked up the Pomodoro technique mentioned in the show, after reading up on the technique developed by Francesco Cirillo and setting a timer on 25 minutes when working and 5 minutes of rest between every "pomodoro"/work session, I can say it works for me, getting more done every day.
Sunday, September 21, 2014
Saturday, September 06, 2014
Solved: error: C2248: 'QObject::QObject' : cannot access private member declared in class 'QObject'
Added two classes A and B both inheriting QObject.
The compiler started complaining:
error: C2248: 'QObject::QObject' : cannot access private member declared in class 'QObject'
It complains because:
"The values stored in the various containers can be of any assignable data type. To qualify, a type must provide a default constructor, a copy constructor, and an assignment operator."
http://qt-project.org/doc/qt-4.8/containers.html
Solved the error by changing the QList to be a list of QSharedPointer:
#include <QObject>
#include "b.h"
class A : public QObject
{
Q_OBJECT
public:
explicit A(QObject *parent = 0);
QList<B> doStuff();
signals:
public slots:
};
But when adding implementation for A:#include <QObject>class B : public QObject{Q_OBJECTpublic:
explicit B(QObject *parent = 0);signals:
public slots:};
QList<GUIContainer> A::doStuff()
{
QList<B> list;
return list;
}
The compiler started complaining:
error: C2248: 'QObject::QObject' : cannot access private member declared in class 'QObject'
It complains because:
"The values stored in the various containers can be of any assignable data type. To qualify, a type must provide a default constructor, a copy constructor, and an assignment operator."
http://qt-project.org/doc/qt-4.8/containers.html
Solved the error by changing the QList to be a list of QSharedPointer:
QList<QSharedPointer<B> > doStuff();
Subscribe to:
Posts (Atom)