Add dptr to KReportAsyncItemBase
Details
Diff Detail
- Repository
- R14 KReport
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
src/common/KReportAsyncItemBase.h | ||
---|---|---|
38 | Does this need added to _all_ QObject derived classes? |
src/common/KReportAsyncItemBase.cpp | ||
---|---|---|
22 | -> class Q_DECL_HIDDEN | |
src/common/KReportAsyncItemBase.h | ||
38 | Yes and to all classes with d-pointers even without QObject. Exception are classes having explicitly implemented copy constructors and assignment operators. And e.g. KDbTableSchema and KDbQuerySchema have some custom constructors that are close to copy constructors but still use Q_DISABLE_COPY because we don't want assignments for them or copying on construction. The rule above is not limited to classes having d-pointers but I routinely iterated over d-pointers in KReport and elsewhere to add Q_DISABLE_COPY. It can be true that also class not having a d-pointer should have Q_DISABLE_COPY set: 1. when 'by design' we don't want copying, 2. when compiler's default implementation of copy constructor's and assignment operator will be just wrong because e.g. we're allocating an attribute on heap (copying only copies the pointer then --> crash) See also https://community.kde.org/Kexi/Junior_Jobs/Add_d-pointers and the Qt docs. | |
src/wrtembed/KReportDesignerItemRectBase.cpp | ||
41 | Could int dpiX = KReportPrivate::dpiX(); be written above instead? Same for dpiY. | |
43 | Ah and this one is not needed, already wrote int grabAction = 0; above |